:root {
    --ink: #14211d;
    --muted: #5c6b66;
    --forest: #18392f;
    --forest-2: #285849;
    --mint: #bcead8;
    --mint-soft: #eaf8f2;
    --cream: #f6f3eb;
    --paper: #fffdfa;
    --line: #dce4df;
    --amber: #f0b55a;
    --amber-soft: #fff4dc;
    --red: #a53c34;
    --red-soft: #fff0ed;
    --shadow: 0 22px 70px rgba(20, 33, 29, 0.11);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 13px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family:
        Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.shell {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    color: white;
    background: var(--forest);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(220, 228, 223, 0.78);
    background: rgba(246, 243, 235, 0.92);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: white;
    background: var(--forest);
    font-family: Georgia, serif;
}

.site-menu {
    min-width: 0;
    display: flex;
    flex: 1;
    align-items: center;
    gap: 18px;
}

.site-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-left: auto;
    border: 1px solid #b9c8c2;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--forest);
    background: var(--paper);
    font-weight: 760;
    cursor: pointer;
}

.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

.site-menu-icon {
    position: relative;
}

.site-menu-icon::before,
.site-menu-icon::after {
    position: absolute;
    left: 0;
    content: "";
}

.site-menu-icon::before {
    top: -6px;
}

.site-menu-icon::after {
    top: 6px;
}

.primary-nav,
.guest-nav,
.account-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.primary-nav {
    margin-inline: auto;
}

.guest-nav {
    margin-left: auto;
}

.primary-nav a,
.guest-nav a,
.account-actions a,
.text-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 9px 0;
    color: var(--muted);
    background: transparent;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.primary-nav a:hover,
.guest-nav a:hover,
.account-actions a:hover,
.text-button:hover {
    color: var(--forest);
}

.account-name {
    max-width: 130px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-actions form {
    margin: 0;
}

.message-stack {
    display: grid;
    gap: 8px;
    padding-top: 18px;
}

.message {
    padding: 13px 16px;
    border: 1px solid #b9decf;
    border-radius: var(--radius-md);
    color: #184b39;
    background: var(--mint-soft);
}

.message-info {
    border-color: #d9d4bf;
    color: #58513c;
    background: #fffbea;
}

.message-error,
.message-danger {
    border-color: #edbbb4;
    color: var(--red);
    background: var(--red-soft);
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 20px;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

.button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(240, 181, 90, 0.72);
    outline-offset: 3px;
}

.button-primary {
    color: white;
    background: var(--forest);
    box-shadow: 0 10px 26px rgba(24, 57, 47, 0.18);
}

.button-primary:hover {
    background: var(--forest-2);
}

.button-secondary {
    color: var(--forest);
    border-color: #a9c7bc;
    background: var(--mint-soft);
}

.button-quiet {
    color: var(--forest);
    border-color: #b9c8c2;
    background: transparent;
}

.button-dark {
    color: white;
    background: var(--ink);
}

.button-light {
    color: var(--forest);
    background: white;
}

.button-full {
    width: 100%;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--forest-2);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 104px;
}

.hero::before {
    position: absolute;
    width: 620px;
    height: 620px;
    content: "";
    top: -310px;
    right: -180px;
    border-radius: 50%;
    background: rgba(188, 234, 216, 0.44);
    filter: blur(3px);
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 0.84fr);
    align-items: center;
    gap: 76px;
}

.hero h1,
.dashboard-heading h1,
.flow-copy h1 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.hero h1 {
    max-width: 690px;
    font-size: clamp(48px, 6vw, 78px);
    line-height: 1.03;
}

.hero h1 span {
    color: var(--forest-2);
}

.hero-lead {
    max-width: 600px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.inline-trust {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.demo-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    padding: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.demo-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.demo-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
}

.demo-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--forest);
    background: var(--mint-soft);
    font-size: 13px;
    font-weight: 750;
}

.demo-form {
    margin-top: 25px;
}

.money-pair {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 12px;
}

.money-pair label > span:first-child {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.money-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: white;
}

.money-field b {
    padding-left: 12px;
    color: var(--muted);
    font-size: 11px;
}

.money-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 13px 10px;
    color: var(--ink);
    background: transparent;
    font-size: 20px;
    font-weight: 750;
}

.money-field input:focus {
    outline: 0;
}

.money-field:focus-within {
    border-color: var(--forest-2);
    box-shadow: 0 0 0 3px rgba(40, 88, 73, 0.12);
}

.money-arrow {
    padding-bottom: 14px;
    color: var(--muted);
}

.demo-form .button {
    margin-top: 16px;
}

.demo-result {
    margin: 18px 0;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    background: var(--mint-soft);
}

.demo-result > span {
    display: block;
    color: var(--forest-2);
    font-size: 14px;
    font-weight: 750;
}

.demo-result strong {
    display: block;
    margin: 2px 0;
    color: var(--forest);
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1.2;
}

.demo-result small {
    font-family: inherit;
    font-size: 13px;
}

.demo-result p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.demo-result.result-over {
    background: var(--amber-soft);
}

.demo-result.result-over > span,
.demo-result.result-over strong {
    color: #80520e;
}

.demo-result.result-even {
    background: #f0f2f1;
}

.demo-save-message {
    margin: 12px 0 0;
    border: 1px solid #edbbb4;
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 13px;
}

.principles {
    padding: 94px 0;
    color: white;
    background: var(--forest);
}

.section-heading {
    max-width: 700px;
}

.section-heading .eyebrow {
    color: var(--mint);
}

.section-heading h2,
.boundary-card h2 {
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading > p:last-child {
    color: #bed1c9;
    font-size: 18px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 42px 0 0;
    padding: 0;
    list-style: none;
}

.step-grid li {
    min-height: 270px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.step-number {
    color: var(--mint);
    font-family: Georgia, serif;
    font-size: 22px;
}

.step-grid h3 {
    margin: 43px 0 8px;
    font-size: 21px;
}

.step-grid p {
    min-height: 56px;
    color: #bfd0c9;
}

.state-label {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.state-open {
    color: #684000;
    background: #ffd994;
}

.state-pending {
    color: #164c3a;
    background: var(--mint);
}

.state-done {
    color: #173726;
    background: #d3f6c7;
}

.boundary {
    padding: 78px 0;
}

.boundary-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 46px;
    background: var(--paper);
}

.boundary-card > p:not(.eyebrow) {
    max-width: 740px;
    margin: 20px 0 26px;
    color: var(--muted);
    font-size: 18px;
}

.dashboard-hero {
    padding: 54px 0 30px;
}

.dashboard-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.dashboard-heading h1 {
    max-width: 760px;
    font-size: clamp(36px, 4.5vw, 58px);
    line-height: 1.08;
}

.as-of {
    flex: 0 0 auto;
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.next-card {
    min-height: 245px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    border-radius: var(--radius-xl);
    padding: 34px;
    color: white;
    box-shadow: var(--shadow);
}

.next-card-first {
    background: linear-gradient(125deg, #18392f, #326c59);
}

.next-card-transfer {
    background: linear-gradient(125deg, #653e08, #a47122);
}

.next-card-allocate {
    background: linear-gradient(125deg, #203d56, #346987);
}

.next-card-normal {
    background: linear-gradient(125deg, #2c3a31, #586d5e);
}

.next-card-error {
    background: linear-gradient(125deg, #6d2b26, #9b4a3e);
}

.state-kicker {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.next-card h2 {
    max-width: 760px;
    margin: 10px 0 5px;
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 600;
    line-height: 1.12;
}

.next-card p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
}

.next-card .button {
    flex: 0 0 auto;
}

.dashboard-content {
    padding: 18px 0 70px;
}

.amount-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
}

.dashboard-history-link {
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.1rem;
}

.dashboard-history-link p {
    color: var(--muted);
    margin: 0.25rem 0 0;
}

@media (max-width: 640px) {
    .dashboard-history-link {
        align-items: stretch;
        flex-direction: column;
    }
}

.amount-strip article {
    padding: 24px;
}

.amount-strip article + article {
    border-left: 1px solid var(--line);
}

.amount-strip span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.amount-strip strong {
    display: block;
    margin-top: 5px;
    font-family: Georgia, serif;
    font-size: 30px;
}

.amount-strip small {
    font-family: inherit;
    font-size: 12px;
}

.amount-strip p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 25px;
    background: var(--paper);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    font-size: 24px;
}

.text-link,
.back-link {
    color: var(--forest-2);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #a9c7bc;
    text-underline-offset: 4px;
}

.goal-list,
.record-list {
    display: grid;
    gap: 1px;
    background: var(--line);
}

.goal-row,
.record-row {
    padding: 16px 0;
    background: var(--paper);
}

.goal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.goal-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.goal-title h3,
.record-row h3 {
    margin: 0;
    font-size: 16px;
}

.goal-name-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.goal-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 750;
}

.goal-status-active {
    color: var(--forest-2);
    background: #e7f1ed;
}

.goal-status-completed {
    color: #715219;
    background: #fff1cc;
}

.goal-status-archived {
    color: var(--muted);
    background: #ecefed;
}

.goal-title p,
.record-row p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    margin-top: 13px;
    border-radius: 999px;
    background: #e7ebe8;
}

.progress-track span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--forest-2);
}

.goal-pending {
    margin: 7px 0 0;
    color: #715219;
    font-size: 13px;
}

.goal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.goal-actions form {
    margin: 0;
}

.goal-secondary-action {
    min-height: 36px;
    border: 0;
    padding: 5px 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.goal-secondary-action:hover,
.goal-secondary-action:focus-visible {
    color: var(--forest-2);
}

.record-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.record-outcome {
    text-align: right;
}

.record-outcome strong,
.record-outcome span {
    display: block;
}

.record-outcome strong {
    font-size: 14px;
}

.record-outcome span {
    color: var(--muted);
    font-size: 12px;
}

.positive {
    color: #14714f;
}

.over-plan {
    color: var(--red);
}

.empty-state {
    border: 1px dashed #b8c6c0;
    border-radius: var(--radius-md);
    padding: 25px;
    background: #fafbf9;
}

.empty-state h2,
.empty-state h3 {
    margin: 0 0 5px;
}

.empty-state p {
    margin: 0 0 17px;
    color: var(--muted);
}

.truth-note {
    margin-top: 18px;
    border-left: 4px solid var(--amber);
    padding: 15px 18px;
    color: var(--muted);
    background: var(--amber-soft);
    font-size: 14px;
}

.flow-page {
    min-height: calc(100vh - 72px);
    padding: 48px 0 76px;
}

.flow-shell > .back-link {
    display: inline-block;
    margin-bottom: 28px;
}

.flow-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(430px, 1fr);
    align-items: start;
    gap: 76px;
}

.flow-copy {
    position: sticky;
    top: 120px;
    padding-top: 18px;
}

.flow-copy h1 {
    font-size: clamp(40px, 5vw, 62px);
    line-height: 1.06;
}

.flow-copy > p:not(.eyebrow) {
    max-width: 540px;
    color: var(--muted);
    font-size: 18px;
}

.flow-fact {
    margin-top: 34px;
    border-left: 3px solid var(--forest-2);
    padding: 5px 0 5px 18px;
}

.flow-fact span,
.flow-fact strong {
    display: block;
}

.flow-fact span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.flow-fact strong {
    margin: 4px 0;
}

.flow-fact p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.flow-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.success-receipt {
    margin-bottom: 24px;
    border-radius: var(--radius-lg);
    padding: 18px;
    color: #174a38;
    background: var(--mint-soft);
}

.success-receipt span,
.success-receipt strong {
    display: block;
}

.success-receipt span {
    font-size: 12px;
    font-weight: 800;
}

.success-receipt strong {
    margin: 3px 0;
    font-size: 20px;
}

.success-receipt p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.flow-form {
    display: grid;
    gap: 20px;
}

.field-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 750;
}

.field-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bfcac5;
    border-radius: var(--radius-md);
    padding: 11px 13px;
    color: var(--ink);
    background: white;
}

textarea.field-input {
    min-height: 92px;
    resize: vertical;
}

.field-input:focus {
    border-color: var(--forest-2);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 88, 73, 0.12);
}

.field-invalid .field-input {
    border-color: var(--red);
}

.field-help,
.field-errors p,
.form-errors p {
    margin: 5px 0 0;
    font-size: 13px;
}

.field-errors,
.form-errors {
    color: var(--red);
}

.form-errors {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: var(--red-soft);
}

.live-difference,
.form-boundary {
    margin: 0;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--muted);
    background: #f0f3f1;
    font-size: 13px;
}

.live-difference.is-kept {
    color: #174a38;
    background: var(--mint-soft);
}

.live-difference.is-over {
    color: #80520e;
    background: var(--amber-soft);
}

.flow-defer {
    justify-self: center;
    text-align: center;
    font-size: 14px;
}

.confirmation-check {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    border: 1px solid #e1d0a7;
    border-radius: var(--radius-md);
    padding: 14px;
    background: var(--amber-soft);
    font-size: 14px;
}

.confirmation-check input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--forest);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 34px 0;
    background: var(--paper);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 1.5fr) auto;
    align-items: center;
    gap: 30px;
}

.footer-inner p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.trust-copy {
    max-width: 540px;
}

.footer-inner a {
    color: var(--forest-2);
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 18px;
}

.guide-shell {
    max-width: 1100px;
}

.guide-filters,
.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.guide-filters {
    margin: 28px 0;
}

.guide-filter,
.guide-tags span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 13px;
    background: var(--paper);
    color: var(--forest-2);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.guide-filter:hover,
.guide-filter:focus-visible,
.guide-filter.is-active {
    border-color: var(--forest);
    background: var(--forest);
    color: #fff;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 34px);
    background: var(--paper);
    box-shadow: 0 12px 34px rgb(24 57 47 / 7%);
}

.guide-card-featured {
    border-top: 4px solid var(--forest-2);
}

.guide-card-meta,
.guide-byline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 18px;
    color: var(--muted);
    font-size: 13px;
}

.guide-card-meta span {
    color: var(--forest-2);
    font-weight: 800;
}

.guide-card h2 {
    margin: 20px 0 12px;
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.16;
}

.guide-card h2 a,
.guide-related a {
    color: var(--ink);
    text-decoration: none;
}

.guide-card h2 a:hover,
.guide-card h2 a:focus-visible,
.guide-related a:hover,
.guide-related a:focus-visible {
    color: var(--forest-2);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.guide-card > p {
    flex: 1;
    color: var(--muted);
    line-height: 1.65;
}

.guide-card .text-link {
    align-self: flex-start;
    margin-top: 18px;
}

.guide-empty {
    grid-column: 1 / -1;
}

.guide-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 30px 0;
}

.guide-pagination span {
    color: var(--muted);
    font-weight: 700;
}

.guide-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
}

.guide-cta h2,
.guide-cta p {
    margin-bottom: 0;
}

.guide-detail-shell {
    max-width: 1160px;
}

.guide-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 14px;
}

.guide-breadcrumbs a {
    color: var(--forest-2);
    font-weight: 700;
}

.guide-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(240px, 1fr);
    align-items: start;
    gap: 34px;
}

.guide-article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 5vw, 54px);
    background: var(--paper);
    box-shadow: 0 16px 44px rgb(24 57 47 / 8%);
}

.guide-article-header h1 {
    margin: 10px 0 18px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.04;
}

.guide-summary {
    margin: 30px 0 20px;
    border-left: 4px solid var(--forest-2);
    padding: 4px 0 4px 18px;
    color: var(--forest);
    font-size: 19px;
    line-height: 1.65;
}

.guide-image {
    width: 100%;
    margin: 28px 0;
    border-radius: var(--radius-md);
}

.guide-content {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.8;
}

.guide-content h2,
.guide-content h3 {
    margin: 2em 0 0.6em;
    line-height: 1.2;
}

.guide-content h2 {
    font-size: clamp(27px, 4vw, 36px);
}

.guide-content h3 {
    font-size: 23px;
}

.guide-content p,
.guide-content ul,
.guide-content ol,
.guide-content blockquote {
    margin: 0 0 1.25em;
}

.guide-content li + li {
    margin-top: 0.5em;
}

.guide-content a {
    color: var(--forest-2);
    font-weight: 700;
}

.guide-article-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    margin-top: 44px;
    border-top: 1px solid var(--line);
    padding-top: 22px;
    color: var(--muted);
    font-size: 13px;
}

.guide-article-footer > p {
    margin: 0;
}

.guide-actions {
    display: flex;
    gap: 8px;
}

.guide-share-status {
    grid-column: 1 / -1;
    color: var(--forest-2);
    font-weight: 700;
}

.guide-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 94px;
}

.guide-related {
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-related li + li {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.guide-related a,
.guide-related time {
    display: block;
}

.guide-related a {
    font-weight: 800;
    line-height: 1.4;
}

.guide-related time {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.footer-consent {
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
}

.footer-consent summary {
    width: max-content;
    color: var(--forest-2);
    cursor: pointer;
    font-weight: 700;
}

.footer-consent .consent-preference {
    max-width: 660px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--cream);
}

.consent-banner {
    position: fixed;
    z-index: 40;
    right: 20px;
    bottom: 20px;
    width: min(590px, calc(100% - 40px));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    border: 1px solid #b9c8c2;
    border-radius: var(--radius-lg);
    padding: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.consent-banner p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.consent-banner .consent-status {
    color: var(--red);
    font-weight: 750;
}

.consent-actions {
    display: flex;
    gap: 8px;
}

.consent-actions .button {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13px;
}

.consent-preference {
    display: grid;
    gap: 14px;
}

.consent-preference p {
    margin: 0;
}

.consent-preference-current {
    color: var(--forest-2);
}

.consent-preference .consent-status {
    color: var(--red);
    font-weight: 750;
}

.consent-preference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.consent-preference-actions .button {
    min-height: 44px;
}

.consent-preference-actions [aria-pressed="true"] {
    box-shadow: 0 0 0 3px rgb(24 57 47 / 16%);
}

.auth-page {
    min-height: calc(100vh - 72px);
    padding: 58px 0 82px;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(420px, 0.72fr);
    align-items: start;
    gap: 74px;
}

.auth-copy {
    position: sticky;
    top: 116px;
    padding-top: 20px;
}

.auth-copy h1 {
    max-width: 680px;
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(42px, 5.2vw, 68px);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.06;
}

.auth-copy > p:not(.eyebrow) {
    max-width: 590px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.auth-steps {
    display: grid;
    gap: 13px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.auth-steps li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.auth-steps li::before {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--forest);
    background: var(--mint);
    content: "✓";
    font-size: 12px;
    font-weight: 900;
}

.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 30px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h2 {
    margin: 0;
    font-size: 27px;
    line-height: 1.25;
}

.auth-card-header p {
    margin: 7px 0 0;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-field label,
.auth-field-heading label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 760;
}

.auth-field input,
.auth-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bfcac5;
    border-radius: var(--radius-md);
    padding: 11px 13px;
    color: var(--ink);
    background: white;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--forest-2);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 88, 73, 0.12);
}

.auth-field input[aria-invalid="true"],
.auth-field select[aria-invalid="true"] {
    border-color: var(--red);
}

.auth-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-field-heading label {
    margin-bottom: 7px;
}

.inline-control {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 8px 4px;
    color: var(--forest-2);
    background: transparent;
    font-size: 13px;
    font-weight: 760;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.auth-help {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-help ul {
    margin: 5px 0 0;
    padding-left: 18px;
}

.auth-errors {
    display: grid;
    gap: 3px;
    margin-top: 6px;
    color: var(--red);
    font-size: 13px;
}

.auth-errors p {
    margin: 0;
}

.auth-form-errors {
    border: 1px solid #edbbb4;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 13px;
}

.auth-form-errors p {
    margin: 0;
}

.captcha-box {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px;
    background: #f8faf8;
}

.captcha-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.captcha-preview img {
    width: 100%;
    max-width: 240px;
    height: 80px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.captcha-status {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
}

.auth-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-inline: 4px;
    color: var(--forest-2);
    font-weight: 760;
}

.auth-legal-notice {
    margin: 0;
    border-radius: var(--radius-md);
    padding: 11px 13px;
    color: var(--muted);
    background: #f0f3f1;
    font-size: 12px;
}

.auth-legal-notice a {
    color: var(--forest-2);
    font-weight: 760;
    text-underline-offset: 2px;
}

.auth-boundary {
    margin: 22px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.auth-boundary strong {
    color: var(--ink);
}

.onboarding-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.onboarding-actions .button {
    width: 100%;
}

.optional-fields {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: #f8faf8;
}

.optional-fields summary {
    color: var(--forest-2);
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
}

.optional-fields[open] summary {
    margin-bottom: 16px;
}

.optional-fields-body {
    display: grid;
    gap: 19px;
}

@media (max-width: 900px) {
    .header-inner {
        position: relative;
    }

    .site-menu-toggle {
        display: inline-flex;
    }

    .site-menu {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        display: none;
        gap: 12px;
        border: 1px solid var(--line);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        padding: 14px;
        background: var(--paper);
        box-shadow: 0 24px 45px rgba(20, 33, 29, 0.16);
    }

    .site-menu[data-open="true"] {
        display: grid;
    }

    .primary-nav,
    .account-actions {
        display: grid;
        align-items: stretch;
        gap: 2px;
        margin: 0;
    }

    .primary-nav a,
    .account-actions a,
    .account-actions .text-button {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 9px 12px;
    }

    .primary-nav a:hover,
    .account-actions a:hover,
    .account-actions .text-button:hover {
        background: var(--mint-soft);
    }

    .account-actions {
        border-top: 1px solid var(--line);
        padding-top: 10px;
    }

    .account-name {
        max-width: none;
        padding: 4px 12px 7px;
        overflow-wrap: anywhere;
        text-overflow: clip;
        white-space: normal;
    }

    .account-actions form {
        width: 100%;
    }

    .guest-nav {
        margin-left: auto;
    }

    .hero-grid,
    .flow-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-grid {
        max-width: 720px;
    }

    .flow-copy {
        position: static;
    }

    .step-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .step-grid li {
        min-height: 0;
    }

    .step-grid h3 {
        margin-top: 20px;
    }

    .amount-strip {
        grid-template-columns: 1fr;
    }

    .amount-strip article + article {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .guide-detail-grid {
        grid-template-columns: 1fr;
    }

    .guide-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-links {
        justify-content: flex-start;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .auth-copy {
        position: static;
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 28px, 1160px);
    }

    .header-inner {
        min-height: 64px;
    }

    .guest-nav a:first-child {
        display: none;
    }

    .hero {
        padding: 52px 0 66px;
    }

    .hero h1 {
        font-size: clamp(42px, 14vw, 62px);
    }

    .hero-lead {
        font-size: 17px;
    }

    .hero-actions {
        display: grid;
    }

    .hero-actions .button {
        width: 100%;
    }

    .demo-card,
    .flow-card {
        border-radius: 21px;
        padding: 20px;
    }

    .money-pair {
        grid-template-columns: 1fr;
    }

    .money-arrow {
        display: none;
    }

    .principles {
        padding: 65px 0;
    }

    .boundary {
        padding: 48px 0;
    }

    .boundary-card {
        padding: 28px 22px;
    }

    .dashboard-hero {
        padding-top: 36px;
    }

    .dashboard-heading {
        display: block;
    }

    .as-of {
        margin-top: 12px;
    }

    .next-card {
        min-height: 330px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
        padding: 25px;
    }

    .next-card .button {
        width: 100%;
    }

    .record-row {
        align-items: flex-start;
    }

    .record-outcome {
        max-width: 150px;
    }

    .flow-page {
        padding: 30px 0 55px;
    }

    .flow-copy h1 {
        font-size: 42px;
    }

    .consent-banner {
        right: 14px;
        bottom: 6px;
        width: calc(100% - 28px);
        grid-template-columns: 1fr;
        gap: 5px;
        border-radius: 16px;
        padding: 7px 11px;
    }

    .guide-grid,
    .guide-sidebar {
        grid-template-columns: 1fr;
    }

    .guide-cta,
    .guide-article-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .guide-actions .button {
        flex: 1;
    }

    .consent-banner strong {
        font-size: 13px;
        line-height: 1.35;
    }

    .consent-banner p {
        display: none;
    }

    .consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .consent-actions .button {
        min-height: 40px;
        padding: 6px 9px;
        font-size: 12px;
    }

    .auth-page {
        padding: 34px 0 58px;
    }

    .auth-layout {
        gap: 25px;
    }

    .auth-copy h1 {
        font-size: clamp(35px, 10.5vw, 40px);
        line-height: 1.08;
    }

    .auth-copy > p:not(.eyebrow) {
        margin-top: 13px;
        font-size: 15px;
    }

    .auth-steps {
        display: none;
    }

    .auth-card {
        border-radius: 21px;
        padding: 21px;
    }

    .auth-card-header {
        margin-bottom: 20px;
    }

    .auth-form {
        gap: 16px;
    }

    .captcha-preview {
        grid-template-columns: 1fr;
    }

    .captcha-preview .button {
        width: 100%;
    }

    .onboarding-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding-top: 24px;
    }

    .auth-layout {
        gap: 18px;
    }

    .auth-copy h1 {
        font-size: 32px;
    }

    .auth-copy > p:not(.eyebrow) {
        display: none;
    }
}

.document-page {
    padding: 68px 0 90px;
}

.document-shell {
    max-width: 880px;
}

.document-shell > h1 {
    margin: 8px 0 18px;
    font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
    font-size: clamp(44px, 7vw, 76px);
    letter-spacing: -0.045em;
}

.document-lead {
    max-width: 760px;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.75;
}

.document-card {
    margin-top: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.document-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.document-card p,
.document-card li {
    color: var(--muted);
    line-height: 1.75;
}

.document-card ul {
    padding-left: 1.25rem;
}

.document-card .button {
    margin-top: 12px;
}

.document-updated {
    margin-top: 26px;
    color: var(--muted);
    font-size: 14px;
}

.category-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-top: 8px;
}

.category-page-heading h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
    font-size: clamp(44px, 7vw, 76px);
    letter-spacing: -0.045em;
}

.category-page-heading .document-lead {
    margin-bottom: 0;
}

.category-page-heading > .button {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.category-list {
    display: grid;
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.category-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
}

.category-row + .category-row {
    border-top: 1px solid var(--line);
}

.category-swatch {
    width: 18px;
    height: 44px;
    border: 1px solid rgba(20, 33, 29, 0.12);
    border-radius: 999px;
}

.category-copy {
    min-width: 0;
}

.category-title-line,
.category-actions,
.category-form-actions,
.category-system-field {
    display: flex;
    align-items: center;
}

.category-title-line {
    flex-wrap: wrap;
    gap: 8px 12px;
}

.category-title-line h2 {
    margin: 0;
    font-size: 19px;
}

.category-kind {
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--forest-2);
    background: var(--mint-soft);
    font-size: 12px;
    font-weight: 750;
}

.category-copy p,
.category-copy small,
.category-delete-confirmation p,
.category-page-footer {
    color: var(--muted);
}

.category-copy p {
    margin: 2px 0 0;
}

.category-copy small {
    display: block;
    margin-top: 3px;
}

.category-actions {
    justify-content: flex-end;
    gap: 10px;
}

.button-compact {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 14px;
}

.button-danger {
    color: var(--red);
    border-color: #e2aaa4;
    background: var(--red-soft);
}

.category-delete {
    min-width: 78px;
}

.category-delete summary {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid #e2aaa4;
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--red);
    background: transparent;
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
    list-style: none;
}

.category-delete summary::-webkit-details-marker {
    display: none;
}

.category-delete-confirmation {
    width: min(280px, 70vw);
    margin-top: 10px;
    border: 1px solid #edbbb4;
    border-radius: var(--radius-md);
    padding: 14px;
    background: var(--red-soft);
}

.category-delete-confirmation p {
    margin: 0 0 10px;
    font-size: 13px;
}

.category-page-footer {
    margin-top: 24px;
}

.category-form input:not([type="checkbox"]) {
    width: 100%;
    min-height: 48px;
    border: 1px solid #bfcac5;
    border-radius: var(--radius-md);
    padding: 11px 13px;
    color: var(--ink);
    background: white;
}

.category-form input[type="color"] {
    min-height: 52px;
    padding: 6px;
}

.category-form input:not([type="checkbox"]):focus {
    border-color: var(--forest-2);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 88, 73, 0.12);
}

.category-form .field-invalid input {
    border-color: var(--red);
}

.category-form-grid {
    display: grid;
    grid-template-columns: minmax(140px, 0.45fr) minmax(0, 1fr);
    gap: 18px;
}

.category-system-field {
    gap: 10px;
    border-radius: var(--radius-md);
    padding: 13px 14px;
    background: #f0f3f1;
}

.category-system-field input {
    width: 18px;
    height: 18px;
}

.category-form-actions {
    flex-wrap: wrap;
    gap: 12px;
}

.request-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.request-list li {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(90px, auto);
    gap: 5px 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.request-list code,
.request-list time {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .document-page {
        padding: 36px 0 64px;
    }

    .document-lead {
        font-size: 17px;
    }

    .document-card {
        padding: 21px;
    }

    .category-page-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .category-page-heading > .button {
        width: 100%;
        margin-bottom: 0;
    }

    .category-row {
        grid-template-columns: 14px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        padding: 18px;
    }

    .category-swatch {
        width: 14px;
        height: 38px;
    }

    .category-actions {
        grid-column: 2;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .category-delete-confirmation {
        width: min(260px, calc(100vw - 96px));
    }

    .category-form-grid {
        grid-template-columns: 1fr;
    }

    .category-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .request-list li {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
