/* Tilgo — The Quiet Ledger
   Shared design layer for the static redesign prototype. No build step. */

/* ---------- Foundations ---------- */
body { overflow-x: clip; }
.wrap { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 5000; transform: translateY(-150%); background: var(--mint); color: var(--pine-deep); padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.kicker, .kicker-teal, .kicker-rose { margin: 0 0 12px; font-size: .7rem; line-height: 1.2; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.kicker-rose { color: var(--rose); }

.brand, .nav-logo, .dash-logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.035em; }
.brand-mark, .nav-logo .mark, .dash-logo-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; background: var(--pine); color: var(--white); font-family: var(--font-ui); font-size: 1.15rem; font-weight: 800; box-shadow: inset -5px 5px 0 var(--mint); }
.brand-text, .dash-logo-text { font-size: 1.25rem; }

.btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 21px; border: 1px solid transparent; border-radius: 999px; background: var(--pine); color: var(--white); font-weight: 700; font-size: .88rem; line-height: 1.2; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 9px 22px rgba(10,41,38,.12); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary-dark { background: var(--pine); color: #fff; }
.btn-primary-dark:hover { background: var(--pine-deep); }
.btn-secondary, .btn-white { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline { background: transparent; color: var(--ink); border-color: #bfc9c0; }
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); background: rgba(8,127,115,.04); }
.btn-champagne { background: var(--mint); color: var(--pine-deep); border-color: var(--mint); }
.btn-champagne:hover { background: #d7fa96; }
.btn-danger { background: var(--rose); color: #fff; }
.btn-ghost { color: var(--muted); background: transparent; border: 0; }
.btn-sm { min-height: 40px; padding: 9px 17px; font-size: .8rem; }
.btn-lg { min-height: 54px; padding: 15px 27px; font-size: .94rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.i18n-select { min-height: 40px; padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--font-ui); font-size: .75rem; font-weight: 700; cursor: pointer; }
.i18n-select:hover { border-color: var(--teal); }
.i18n-corner--fixed { position: fixed; z-index: 100; top: 18px; right: 20px; }

.testmode-banner { background: var(--pine-deep); color: rgba(255,255,255,.84); text-align: center; padding: 9px 20px; font-size: .76rem; line-height: 1.5; }
.testmode-banner strong { color: var(--mint); }

/* ---------- Marketing navigation ---------- */
.site-nav, .nav { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(16,41,39,.11); background: rgba(245,243,236,.88); backdrop-filter: blur(18px); }
.nav-inner { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.nav-logo { justify-self: start; font-size: 1.25rem; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links .mobile-language { display: none; }
.nav-links a { position: relative; color: var(--ink-soft); font-size: .82rem; font-weight: 700; text-decoration: none; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--teal); transition: right .2s ease; }
.nav-links a:hover::after { right: 0; }
.nav-cta { justify-self: end; display: flex; align-items: center; gap: 9px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); align-items: center; justify-content: center; }
.nav-toggle svg { width: 21px; height: 21px; }
.nav-backdrop { display: none; }

/* ---------- Landing hero: an editorial cover with a working case file ---------- */
.hero { position: relative; overflow: clip; padding: clamp(38px,5vw,70px) 0 clamp(86px,9vw,132px); text-align: left; isolation: isolate; }
.hero::before { content: ''; position: absolute; z-index: -2; inset: 0; background-image: linear-gradient(rgba(16,41,39,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(16,41,39,.045) 1px,transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom,black,transparent 88%); }
.hero::after { content: ''; position: absolute; z-index: -1; width: 680px; height: 680px; right: -180px; top: -170px; border-radius: 50%; background: radial-gradient(circle,rgba(201,242,119,.38),rgba(201,242,119,0) 68%); transform-origin: center; }
.hero-folio { display: flex; align-items: center; gap: 15px; margin-bottom: clamp(38px,5vw,64px); color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .17em; line-height: 1; }
.hero-folio::before { content: ''; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 1px; background: var(--pine); box-shadow: 3px 3px 0 var(--mint); }
.hero-folio-rule { height: 1px; flex: 1; background: var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(400px,.96fr); gap: clamp(44px,6vw,88px); align-items: center; }
.hero-copy { min-width: 0; padding-bottom: 16px; }
.hero-badge { display: flex; align-items: center; gap: 9px; width: fit-content; margin: 0 0 26px; padding: 0 0 10px; border: 0; border-bottom: 1px solid #bfd3c3; border-radius: 0; background: transparent; color: var(--pine); font-size: .69rem; font-weight: 800; letter-spacing: .025em; }
.hero-badge::before { content: ''; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 1px; background: var(--mint); box-shadow: 0 0 0 4px rgba(201,242,119,.18); }
.hero h1 { position: relative; max-width: 760px; margin: 0 0 38px; color: var(--ink); font-family: var(--font-display); font-size: clamp(4rem,6.6vw,6.6rem); font-weight: 500; line-height: .88; letter-spacing: -.065em; }
.hero h1 > span { display: block; }
.hero h1 em { position: relative; display: block; width: fit-content; max-width: 100%; margin-left: clamp(18px,3vw,46px); color: var(--teal); font-weight: 400; font-style: italic; }
.hero h1 em::after { content: ''; position: absolute; left: 4%; right: -1%; bottom: -14px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7C70 1 180 10 298 3' fill='none' stroke='%23c9f277' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; pointer-events: none; }
.hero-subtitle { max-width: 555px; margin: 0 0 31px 18px; padding-left: 18px; border-left: 1px solid #bfc9c0; color: var(--ink-soft); font-size: clamp(.98rem,1.4vw,1.08rem); line-height: 1.75; }
.hero-actions { position: relative; display: flex; justify-content: flex-start; gap: 11px; flex-wrap: wrap; margin-left: 18px; }
.hero-actions .btn { position: relative; overflow: hidden; }
.hero-actions .btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg,transparent 30%,rgba(255,255,255,.18) 50%,transparent 70%); transform: translateX(-120%); transition: transform .55s ease; pointer-events: none; }
.hero-actions .btn:hover::before { transform: translateX(120%); }
.hero-actions .btn > span { position: relative; display: inline-block; transition: transform .2s ease; }
.hero-actions .btn-primary:hover > span { transform: translateX(2px); }
.hero-actions .btn-white::after { content: '↘'; position: relative; font-size: 1rem; transition: transform .2s ease; }
.hero-actions .btn-white:hover::after { transform: translate(2px,2px); }
.hero-proof { display: flex; align-items: center; justify-content: flex-start; gap: 9px; margin: 21px 0 0 18px; color: var(--muted); font-size: .73rem; }
.hero-proof svg { flex: 0 0 auto; padding: 3px; border-radius: 50%; background: var(--mint-soft); color: var(--teal); }

.hero-visual { position: relative; min-width: 0; margin-right: 8px; padding: 20px 0 65px; }
.hero-visual::before { content: ''; position: absolute; z-index: 0; inset: 9px -12px 48px 18px; border: 1px solid #cbd3c3; border-radius: 29px; background: #e3e6d9; transform: rotate(3deg); box-shadow: 0 15px 40px rgba(16,41,39,.06); }
.hero-visual::after { content: ''; position: absolute; z-index: 0; width: 105px; height: 160px; right: -23px; top: 4px; border-radius: 5px 22px 22px 5px; background: var(--mint); opacity: .82; transform: rotate(5deg); }
.case-tab { position: absolute; z-index: 4; top: 7px; right: 35px; padding: 6px 13px 5px; border-radius: 4px 4px 0 0; background: var(--mint); color: var(--pine-deep); font-size: .57rem; font-weight: 800; letter-spacing: .13em; transform: rotate(2deg); }
.ledger-card { position: relative; z-index: 2; overflow: hidden; padding: clamp(24px,3vw,34px); border: 1px solid rgba(255,255,255,.14); border-radius: 5px 28px 28px 28px; background: var(--pine-deep); color: #fff; box-shadow: 0 38px 80px rgba(10,41,38,.23),0 3px 0 rgba(255,255,255,.12) inset; }
.ledger-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 100% 0,rgba(201,242,119,.15),transparent 43%); }
.ledger-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid var(--line-dark); }
.ledger-eyebrow { margin: 0 0 5px; color: var(--mint); font-size: .62rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.ledger-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 500; letter-spacing: -.025em; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(201,242,119,.22); border-radius: 999px; color: var(--mint); font-size: .62rem; font-weight: 700; white-space: nowrap; }
.live-chip::before, .live-dot { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(201,242,119,.1); }
.ledger-summary { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px 0; }
.ledger-summary strong { display: block; min-width: 2ch; color: var(--white); font-family: var(--font-display); font-size: 3.25rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.ledger-summary p { max-width: 210px; margin: 7px 0 0; color: rgba(255,255,255,.58); font-size: .72rem; line-height: 1.55; }
.progress-ring { width: 86px; height: 86px; transform: rotate(-90deg); }
.progress-ring .ring-track { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 7; }
.progress-ring .ring-value { fill: none; stroke: var(--mint); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 213.63; stroke-dashoffset: 53.41; transition: stroke-dashoffset .85s cubic-bezier(.2,.75,.25,1); }
.progress-ring text { transform: rotate(90deg); transform-origin: center; fill: #fff; font: 700 15px var(--font-ui); font-variant-numeric: tabular-nums; text-anchor: middle; }
.ledger-list { position: relative; display: grid; gap: 9px; }
.ledger-row { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 59px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.045); transition: border-color .3s ease,background .3s ease; }
.ledger-row[data-state="deleted"] { border-color: rgba(201,242,119,.14); }
.ledger-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.08); color: var(--mint); font-size: .65rem; font-weight: 800; transition: background .3s ease; }
.ledger-row[data-state="deleted"] .ledger-icon { background: rgba(201,242,119,.13); }
.ledger-name { min-width: 0; }
.ledger-name strong { display: block; overflow: hidden; color: rgba(255,255,255,.9); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.ledger-name span { display: block; overflow: hidden; color: rgba(255,255,255,.45); font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.ledger-status { padding: 4px 8px; border-radius: 999px; background: rgba(201,242,119,.12); color: var(--mint); font-size: .57rem; font-weight: 800; white-space: nowrap; }
.ledger-status.pending { background: rgba(232,201,133,.12); color: var(--champagne); }
.ledger-row[data-state="sent"] .ledger-status { background: rgba(255,255,255,.075); color: rgba(255,255,255,.68); }
.mascot-note { position: absolute; z-index: 3; left: -38px; bottom: 0; display: flex; align-items: center; gap: 3px; width: 245px; padding: 10px 17px 10px 5px; border: 1px solid var(--line); border-radius: 5px 19px 19px 19px; background: var(--surface); box-shadow: var(--shadow); transform: rotate(-4deg); transform-origin: center; }
.mascot-note::before { content: ''; position: absolute; top: 10px; right: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: inset 0 0 0 2px var(--pine); }
.mascot-note img { width: 86px; height: 86px; object-fit: contain; transition: transform .3s ease; }
.mascot-note:hover img { transform: rotate(5deg); }
.mascot-note p { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 1rem; line-height: 1.2; }
.mascot-note p span { display: block; margin-top: 5px; color: var(--muted); font-family: var(--font-ui); font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.visual-redaction { position: absolute; right: -30px; bottom: 29px; z-index: 1; width: 180px; display: grid; gap: 8px; transform: rotate(7deg); }
.visual-redaction span { height: 11px; border-radius: 2px; background: var(--teal); opacity: .22; }
.visual-redaction span:nth-child(2) { width: 72%; }
.visual-redaction span:nth-child(3) { width: 88%; }

/* ---------- Landing sections ---------- */
.stats { padding: 0; border-block: 1px solid var(--line); background: rgba(255,254,249,.48); }
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.stat { position: relative; padding: 30px 28px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat:last-child { padding-right: 0; }
.stat-num { margin-bottom: 6px; color: var(--ink); font-family: var(--font-display); font-size: clamp(2rem,3.4vw,3rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.stat-label { color: var(--muted); font-size: .7rem; font-weight: 700; }
.section { padding: clamp(76px,9vw,132px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); align-items: end; gap: 36px; margin-bottom: clamp(42px,5vw,70px); text-align: left; }
.section-head .tag, .section-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 17px; padding: 0; background: none; color: var(--teal); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-head .tag::before, .section-tag::before { content: ''; width: 24px; height: 1px; background: currentColor; }
.section-head h2 { max-width: 720px; margin: 0; color: var(--ink); font-family: var(--font-display); font-size: clamp(2.5rem,4.5vw,4.4rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.section-head p { max-width: 460px; margin: 0 0 5px; color: var(--muted); font-size: .93rem; line-height: 1.75; }

.steps-section { position: relative; background: var(--pine-deep); color: #fff; }
.steps-section .section-head h2 { color: var(--white); }
.steps-section .section-head p { color: rgba(255,255,255,.58); }
.steps-section .section-head .tag { color: var(--mint); }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; counter-reset: steps; }
.step { position: relative; min-width: 0; padding: 31px 34px 8px; border: 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.13); border-radius: 0; background: transparent; }
.step:first-child { border-left: 0; padding-left: 0; }
.step:last-child { padding-right: 0; }
.step-num { display: block; width: auto; height: auto; margin-bottom: 46px; background: none; color: var(--mint); font-family: var(--font-display); font-size: 3.6rem; font-weight: 400; line-height: 1; }
.step h3 { margin-bottom: 13px; color: #fff; font-family: var(--font-display); font-size: 1.65rem; font-weight: 500; letter-spacing: -.02em; }
.step p { max-width: 310px; margin: 0; color: rgba(255,255,255,.6); font-size: .84rem; line-height: 1.75; }

.features-section { background: var(--surface); border-bottom: 1px solid var(--line); }
.features-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; }
.feature { position: relative; min-width: 0; min-height: 320px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 30px; border: 1px solid var(--line); border-radius: 5px 22px 22px 22px; background: var(--paper); overflow: hidden; transition: border-color .25s ease,box-shadow .25s ease,background .25s ease; }
.feature:hover { border-color: #aebfb2; box-shadow: 0 18px 45px rgba(16,41,39,.07); }
.feature-span-7 { grid-column: span 7; }
.feature-span-5 { grid-column: span 5; }
.feature-span-4 { grid-column: span 4; }
.feature-span-8 { grid-column: span 8; }
.feature-top { position: relative; z-index: 2; width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid #c8d5ca; border-radius: 13px; background: transparent; color: var(--teal); font-size: 0; transition: transform .25s ease,background .25s ease; }
.feature:hover .feature-icon { transform: rotate(-4deg); background: rgba(201,242,119,.15); }
.feature-icon svg { width: 22px; height: 22px; }
.feature-index { color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .13em; }
.feature-copy { position: relative; z-index: 2; max-width: 530px; margin-top: auto; padding-top: 35px; }
.feature h3 { margin: 0 0 11px; color: var(--ink); font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; line-height: 1.06; letter-spacing: -.03em; }
.feature p { max-width: 480px; margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.feature-dark { border-color: var(--pine); background: var(--pine); }
.feature-dark:hover { border-color: var(--teal-bright); box-shadow: 0 20px 48px rgba(10,41,38,.16); }
.feature-dark .feature-icon { border-color: rgba(255,255,255,.2); color: var(--mint); }
.feature-dark .feature-index { color: rgba(255,255,255,.42); }
.feature-dark h3 { color: #fff; }
.feature-dark p { color: rgba(255,255,255,.62); }
.feature-mint { border-color: #cde69c; background: var(--mint-soft); }
.feature-family { background: #edf0e7; }
.feature-authorization .feature-copy { max-width: calc(100% - 175px); }
.feature-document { position: absolute; right: 34px; bottom: 29px; width: 145px; height: 134px; padding: 25px 18px; border: 1px solid #d5d9ce; border-radius: 3px 11px 11px 11px; background: var(--surface); box-shadow: 9px 10px 0 rgba(201,242,119,.15); transform: rotate(-5deg); }
.document-line { display: block; height: 3px; margin-bottom: 8px; border-radius: 2px; background: #dce2d7; }
.document-line.short { width: 63%; }
.document-signature { position: absolute; left: 20px; bottom: 21px; color: var(--teal); font-family: var(--font-display); font-size: 1.45rem; font-style: italic; transform: rotate(-7deg); }
.document-law { position: absolute; right: 13px; top: 12px; color: var(--muted); font-size: .48rem; font-weight: 800; letter-spacing: .08em; }
.document-check { position: absolute; right: -10px; bottom: -10px; display: grid; place-items: center; width: 32px; height: 32px; border: 3px solid var(--pine); border-radius: 50%; background: var(--mint); color: var(--pine-deep); font-size: .8rem; font-weight: 800; }
.recheck-track { width: 100%; display: flex; align-items: center; gap: 8px; margin-top: 26px; color: var(--teal-dark); }
.recheck-track span { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border: 1px solid #a9c891; border-radius: 50%; background: rgba(255,254,249,.5); font-size: .75rem; font-weight: 800; }
.recheck-track span.is-done { background: var(--pine); color: var(--mint); border-color: var(--pine); }
.recheck-track i { height: 1px; flex: 1; background: repeating-linear-gradient(90deg,#9cb58b 0 4px,transparent 4px 8px); }
.alias-sketch { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 27px; }
.alias-sketch span, .alias-sketch i { padding: 6px 9px; border: 1px solid #ccd5ca; border-radius: 6px; background: var(--surface); color: var(--teal-dark); font-size: .61rem; font-style: normal; font-weight: 800; letter-spacing: .02em; box-shadow: 2px 2px 0 #e2e6dc; }
.alias-sketch span:nth-child(2) { transform: translateY(4px) rotate(2deg); }
.alias-sketch i { border-style: dashed; background: transparent; box-shadow: none; color: var(--muted); }
.family-sketch { width: 100%; display: flex; align-items: center; margin-top: 25px; }
.family-sketch span, .family-sketch i { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -6px; border: 2px solid #edf0e7; border-radius: 50%; background: var(--pine); color: var(--mint); font-size: .66rem; font-style: normal; font-weight: 800; }
.family-sketch span:first-child { margin-left: 0; background: var(--teal); color: #fff; }
.family-sketch span:nth-child(3) { background: #dfe5d7; color: var(--pine); }
.family-sketch i { background: var(--surface); color: var(--muted); }
.family-sketch b { width: 45px; height: 1px; margin-left: 14px; background: #bdc9ba; }
.family-sketch small { margin-left: auto; color: var(--teal-dark); font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.feature-watermark { display: none; }

.pricing-section { background: var(--paper); }
.pricing-toggle { display: flex; justify-content: flex-start; margin: -28px 0 40px; }
.toggle-group { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.toggle-btn { min-height: 42px; padding: 9px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 800; }
.toggle-btn.active { background: var(--pine); color: #fff; }
.toggle-btn .save { margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: var(--mint); color: var(--pine-deep); font-size: .62rem; }
.pricing-grid { max-width: 960px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 0; }
.price-card { min-width: 0; padding: clamp(27px,3vw,39px); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: none; }
.price-card:hover { transform: none; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--pine); background: var(--pine); color: #fff; box-shadow: none; }
.price-badge { position: static; display: inline-flex; transform: none; margin-bottom: 25px; padding: 5px 10px; border-radius: 999px; background: var(--mint); color: var(--pine-deep); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.price-name { margin-bottom: 20px; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.featured .price-name { color: rgba(255,255,255,.62); }
.price-amount { margin-bottom: 7px; color: var(--ink); font-family: var(--font-display); font-size: clamp(3.3rem,5vw,5rem); font-weight: 500; line-height: .9; letter-spacing: -.05em; }
.featured .price-amount { color: #fff; }
.price-period { min-height: 42px; margin-bottom: 24px; color: var(--muted); font-size: .75rem; }
.featured .price-period { color: rgba(255,255,255,.55); }
.price-features { display: grid; gap: 0; margin: 0 0 29px; padding: 0; list-style: none; }
.price-features li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .8rem; }
.price-features li::before { content: '✓'; display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 auto; border-radius: 50%; background: var(--mint-soft); color: var(--teal-dark); font-size: .65rem; font-weight: 800; }
.featured .price-features li { border-color: rgba(255,255,255,.13); color: rgba(255,255,255,.82); }
.featured .price-features li::before { background: rgba(201,242,119,.14); color: var(--mint); }
.price-card .btn { width: 100%; }
.featured .btn-primary { background: var(--mint); color: var(--pine-deep); }

.faq-section { border-top: 1px solid var(--line); background: var(--surface); }
.faq-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(40px,8vw,120px); align-items: start; }
.faq-layout .section-head { position: sticky; top: 120px; display: block; margin: 0; }
.faq-layout .section-head h2 { margin-bottom: 20px; }
.faq-list { max-width: none; margin: 0; border-top: 1px solid var(--line); }
.faq-item { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; overflow: visible; }
.faq-q { width: 100%; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.25; }
.faq-q::after { content: '+'; display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; color: var(--teal); font-family: var(--font-ui); font-size: 1rem; transition: transform .2s ease; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; max-height: none; overflow: hidden; transition: grid-template-rows .3s ease; }
.faq-a-inner { min-height: 0; overflow: hidden; padding: 0 54px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.8; }
.faq-item.open .faq-a { grid-template-rows: 1fr; max-height: none; }
.faq-item.open .faq-a-inner { padding-bottom: 25px; }

.cta-section { padding: clamp(65px,8vw,110px) 0; }
.cta-box { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 220px; align-items: center; gap: 30px; overflow: hidden; padding: clamp(38px,5vw,66px); border-radius: 30px; background: var(--pine-deep); color: #fff; }
.cta-box::before { content: ''; position: absolute; width: 400px; height: 400px; right: -100px; top: -180px; border: 1px solid rgba(201,242,119,.2); border-radius: 50%; box-shadow: 0 0 0 50px rgba(201,242,119,.035),0 0 0 100px rgba(201,242,119,.025); }
.cta-content { position: relative; z-index: 1; }
.cta-box h2 { max-width: 650px; margin: 0 0 15px; font-family: var(--font-display); font-size: clamp(2.3rem,4.5vw,4.3rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.cta-box p { max-width: 520px; margin: 0 0 27px; color: rgba(255,255,255,.62); font-size: .9rem; }
.cta-box .btn-primary { background: var(--mint); color: var(--pine-deep); }
.cta-mascot { position: relative; z-index: 1; width: 210px; justify-self: center; filter: drop-shadow(0 22px 20px rgba(0,0,0,.18)); }

.footer { margin: 0; padding: 64px 0 28px; border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3,1fr); gap: 50px; margin-bottom: 52px; }
.footer-brand .nav-logo { margin-bottom: 17px; }
.footer-brand p { max-width: 250px; margin: 0; color: var(--muted); font-size: .78rem; }
.footer-col h4 { margin: 5px 0 16px; color: var(--ink); font-size: .65rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.footer-col a { display: block; padding: 5px 0; color: var(--muted); font-size: .78rem; text-decoration: none; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }

/* ---------- Authentication & checkout ---------- */
.auth-page { min-height: 100vh; background: var(--paper); color: var(--ink-soft); }
.auth-shell { width: min(calc(100% - 40px),1100px); min-height: 100vh; margin: 0 auto; padding: 34px 0; display: flex; align-items: center; justify-content: center; }
.auth-split { display: grid; grid-template-columns: minmax(0,.9fr) minmax(420px,1.1fr); gap: 0; align-items: stretch; padding: 28px 0; }
.auth-aside { position: relative; overflow: hidden; min-height: 720px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px,4vw,54px); border-radius: 28px 0 0 28px; background: var(--pine-deep); color: #fff; }
.auth-aside::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom,black,transparent); }
.auth-aside::after { content: ''; position: absolute; width: 340px; height: 340px; right: -150px; bottom: -100px; border-radius: 50%; background: var(--mint); opacity: .09; filter: blur(2px); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .brand { color: #fff; }
.auth-aside .brand-mark { background: var(--mint); color: var(--pine-deep); box-shadow: none; }
.auth-aside-copy { max-width: 360px; }
.auth-aside-copy .kicker { color: var(--mint); }
.auth-aside-copy h2 { margin: 0 0 18px; font-family: var(--font-display); font-size: clamp(2.5rem,4vw,4rem); font-weight: 500; line-height: .96; letter-spacing: -.045em; }
.auth-aside-copy p { margin: 0; color: rgba(255,255,255,.6); font-size: .86rem; }
.auth-aside-foot { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.62); font-size: .7rem; }
.auth-aside-foot img { width: 70px; height: 70px; object-fit: contain; }
.auth-card { position: relative; width: 100%; max-width: 470px; padding: 38px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink-soft); }
.auth-split .auth-card { max-width: none; min-height: 720px; display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,4vw,58px); border-left: 0; border-radius: 0 28px 28px 0; box-shadow: 0 18px 60px rgba(16,41,39,.08); }
.auth-card > .brand { margin-bottom: 30px; }
.auth-card h1 { margin: 0 0 9px; color: var(--ink); font-family: var(--font-display); font-size: clamp(2rem,3vw,2.75rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.auth-subline { margin: 0 0 28px; color: var(--muted); font-size: .83rem; line-height: 1.65; }
.auth-card a { color: var(--teal); }
.auth-card a.brand { color: var(--ink); }
.auth-card a.btn { color: var(--white); }
.auth-card a.btn-outline, .auth-card a.btn-secondary, .auth-card a.btn-white { color: var(--ink); }
.auth-card a.btn-champagne { color: var(--pine-deep); }
.auth-card a:hover { text-decoration: underline; }
.auth-card a.btn:hover { text-decoration: none; }
.auth-card .brand:hover { text-decoration: none; }
.i18n-corner { position: absolute; z-index: 2; top: 18px; right: 18px; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--ink); font-size: .75rem; font-weight: 800; }
.form-group input, .modal-box input, .inline-add-form input, .sel-search, .ref-form input, #ref-code, #ref-name, #ref-email, #ref-commission { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #cbd4cb; border-radius: 12px; outline: none; background: #fff; color: var(--ink); font-family: var(--font-ui); font-size: .85rem; transition: border-color .2s,box-shadow .2s; }
.form-group input:focus, .modal-box input:focus, .inline-add-form input:focus, .sel-search:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(8,127,115,.1); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; width: 40px; height: 40px; transform: translateY(-50%); border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: .95rem; }
.helper { margin: 7px 0 0; color: var(--muted); font-size: .73rem; }
.auth-card .btn-primary, .auth-card .btn-primary-dark { width: 100%; min-height: 50px; margin-top: 8px; border-radius: 999px; }
.auth-footer { margin: 25px 0 0; color: var(--muted); text-align: center; font-size: .8rem; }
.auth-footer a { font-weight: 800; }
.error-banner, .success-banner { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #ecc5c5; border-radius: 12px; background: #fff2f0; color: #943e43; font-size: .78rem; }
.success-banner { border-color: #badcc7; background: #eef8ef; color: #276442; }
.checkbox-row { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 20px; }
.checkbox-row input[type=checkbox] { width: 19px; height: 19px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--teal); }
.checkbox-row label { color: var(--ink-soft); font-size: .77rem; font-weight: 500; line-height: 1.55; }
.checkbox-row a { font-weight: 700; }
.cycle-row { display: flex; padding: 4px; margin-bottom: 21px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.cycle-row button { flex: 1; min-height: 42px; padding: 9px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .76rem; font-weight: 800; }
.cycle-row button.active { background: var(--pine); color: #fff; }
.cycle-row .save { margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: var(--mint); color: var(--pine-deep); font-size: .6rem; }
.plan-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 25px; }
.plan-pick { position: relative; min-width: 0; padding: 20px 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer; }
.plan-pick:hover { border-color: var(--teal); }
.plan-pick.active { border-color: var(--teal); background: #f0f8ef; box-shadow: 0 0 0 1px var(--teal); }
.plan-pick .badge { position: absolute; top: -10px; left: 12px; transform: none; padding: 3px 8px; border-radius: 999px; background: var(--mint); color: var(--pine-deep); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.plan-pick .pn { margin-bottom: 9px; color: var(--ink); font-size: .76rem; font-weight: 800; }
.plan-pick .pp { margin-bottom: 5px; color: var(--teal); font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; line-height: 1; }
.plan-pick .pp span:last-child { color: var(--muted); font-family: var(--font-ui); font-size: .63rem; font-weight: 600; }
.plan-pick .pd { color: var(--muted); font-size: .67rem; }
.pw-strength { display: flex; gap: 4px; margin-top: 8px; }
.pw-strength .bar { height: 3px; flex: 1; border-radius: 3px; background: var(--line); }
.pw-strength .bar.weak { background: var(--rose); }
.pw-strength .bar.medium { background: var(--champagne); }
.pw-strength .bar.strong { background: var(--teal); }
.pw-strength-label { margin-top: 5px; color: var(--muted); font-size: .67rem; }
.vm-summary { color: var(--ink-soft); font-size: .8rem; line-height: 1.7; }
.vm-box { max-height: 190px; overflow-y: auto; margin: 12px 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-soft); white-space: pre-wrap; font-size: .74rem; }
.vm-actions { display: flex; gap: 9px; }
.btn-ghost { display: block; width: 100%; min-height: 44px; margin-top: 9px; padding: 10px; font-size: .76rem; font-weight: 700; }
.spinner { width: 32px; height: 32px; margin: 18px auto; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.checkout-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%; background: var(--mint-soft); color: var(--teal); font-size: 1.7rem; }

/* ---------- Legal documents ---------- */
.legal-page { background: var(--paper); color: var(--ink-soft); }
.legal-page .container { width: min(calc(100% - 48px),920px); margin: 0 auto; padding: 34px 0 100px; }
.legal-page .i18n-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 55px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--teal); }
.legal-page h1 { max-width: 760px; margin: 0 0 38px; color: var(--ink); font-family: var(--font-display); font-size: clamp(2.8rem,6vw,5rem); font-weight: 500; line-height: .95; letter-spacing: -.05em; }
.legal-page h2 { margin: 52px 0 17px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink); font-family: var(--font-display); font-size: clamp(1.45rem,2.5vw,1.85rem); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.legal-page h3 { margin: 29px 0 11px; color: var(--ink); font-size: .92rem; font-weight: 800; }
.legal-page p { margin: 0 0 15px; font-size: .9rem; line-height: 1.85; }
.legal-page ul { margin: 14px 0 21px; padding-left: 22px; }
.legal-page li { margin-bottom: 8px; padding-left: 5px; font-size: .88rem; line-height: 1.75; }
.legal-page a { color: var(--teal-dark); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-page .info-box { margin: 0 0 35px; padding: 25px 28px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 0 17px 17px 0; background: var(--surface); box-shadow: none; }
.legal-page .info-box p:last-child { margin-bottom: 0; }
.legal-page .label { color: var(--ink); font-weight: 800; }
.legal-note { margin-bottom: 28px; padding: 13px 16px; border: 1px solid #e3cf9c; border-radius: 12px; background: #fff7df; color: #755516; font-size: .78rem; }
.widerrufs-box { margin: 60px 0 35px; padding: clamp(23px,4vw,40px); border: 1px solid #a9c7b6; border-radius: 22px; background: #eef5e9; box-shadow: none; }
.legal-page .widerrufs-box h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-page .widerrufs-box h3 { color: var(--teal-dark); }
.muster-form { margin-top: 20px; padding: 20px; border: 1px dashed #a9c7b6; border-radius: 13px; background: rgba(255,254,249,.65); }
.muster-form p { font-size: .82rem; }
.legal-footer-nav { display: flex; gap: 9px 22px; flex-wrap: wrap; margin-top: 55px; padding-top: 23px; border-top: 1px solid var(--line); font-size: .75rem; font-weight: 700; }

/* ---------- Dashboard application shell ---------- */
.dashboard-page { background: #f2f3ed; }
.dashboard-layout { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.dash-sidebar { position: sticky; top: 0; z-index: 300; height: 100vh; display: flex; flex-direction: column; padding: 28px 20px 20px; overflow-y: auto; background: var(--pine-deep); color: #fff; }
.dash-logo { margin: 0 8px 38px; color: #fff; }
.dash-logo-mark { background: var(--mint); color: var(--pine-deep); box-shadow: none; }
.dash-nav { display: grid; gap: 5px; }
.dash-nav-item { position: relative; display: flex; align-items: center; min-height: 46px; padding: 11px 14px; border-radius: 12px; color: rgba(255,255,255,.58); font-size: .78rem; font-weight: 700; text-decoration: none; transition: background .2s,color .2s; }
.dash-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav-item.active { background: rgba(201,242,119,.12); color: var(--mint); }
.dash-nav-item.active::before { content: ''; width: 5px; height: 5px; margin-right: 10px; border-radius: 50%; background: var(--mint); }
.sidebar-family-card { margin: 0 0 24px; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.04); }
.sidebar-family-header { display: flex; align-items: center; gap: 7px; color: var(--mint); font-size: .7rem; font-weight: 800; }
.status-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--mint); }
.dash-sidebar > [data-i18n-switcher] { margin-top: auto; padding-top: 25px; }
.dash-sidebar .i18n-select { width: 100%; margin-top: 0; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; }
.dash-sidebar .i18n-select option { color: var(--ink); }
.dash-logout { display: block; width: 100%; min-height: 44px; margin-top: 9px; padding: 10px 13px; border: 0; background: transparent; color: rgba(255,255,255,.54); text-align: left; font-size: .74rem; font-weight: 700; }
.dash-logout:hover { color: #fff; }
.dash-main { min-width: 0; width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(30px,4vw,58px); }
.dash-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 34px; scroll-margin-top: 30px; }
.dash-top-left { min-width: 0; }
.dash-top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.dash-h1 { margin: 0 0 10px; color: var(--ink); font-family: var(--font-display); font-size: clamp(2.6rem,4vw,4.4rem); font-weight: 500; line-height: .95; letter-spacing: -.045em; overflow-wrap: anywhere; }
.dash-sub { max-width: 650px; margin: 0; color: var(--muted); font-size: .8rem; }
.art-pills { display: flex; gap: 8px; }
.art-pill, .update-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--teal-dark); font-size: .67rem; font-weight: 700; }
.dash-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.stat-tile { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.stat-tile-label { min-height: 34px; color: var(--muted); font-size: .67rem; font-weight: 700; line-height: 1.4; }
.stat-tile-num { margin-top: 16px; color: var(--ink); font-family: var(--font-display); font-size: clamp(2.3rem,3.5vw,3.4rem); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.casefile, .familly-aliases, .settings, .dual { margin-bottom: 22px; scroll-margin-top: 25px; }
.casefile { min-width: 0; padding: clamp(20px,2.4vw,30px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.casefile-head { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-bottom: 21px; }
.casefile-title { margin: 0 auto 0 0; color: var(--ink); font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.casefile-head .btn { margin-left: auto; }
.casefile-list { display: grid; gap: 0; }
.casefile-row { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.casefile-row:first-child { padding-top: 5px; border-top: 0; }
.cf-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--paper-deep); color: var(--pine); font-size: .67rem; font-weight: 800; }
.cf-body { min-width: 0; }
.cf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cf-top strong { min-width: 0; color: var(--ink); font-size: .83rem; overflow-wrap: anywhere; }
.cf-status, .verified-badge, .unverified-badge { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: .6rem; font-weight: 800; }
.cf-status.is-done, .verified-badge { background: #e4f3e5; color: #27704a; }
.cf-status.is-progress { background: var(--mint-soft); color: var(--teal-dark); }
.cf-status.is-waiting, .unverified-badge { background: #f7edd5; color: #84611e; }
.cf-status.is-danger { background: #fae5e3; color: #a33e43; }
.cf-desc { margin: 7px 0; color: var(--muted); font-size: .75rem; line-height: 1.6; overflow-wrap: anywhere; }
.cf-date { color: var(--muted); font-size: .64rem; overflow-wrap: anywhere; }
.cf-progress { height: 3px; margin-top: 12px; overflow: hidden; border-radius: 3px; background: var(--paper-deep); }
.cf-progress-bar { width: var(--pct,0%); height: 100%; border-radius: inherit; background: var(--teal); }
.empty-state { padding: 30px 18px; border: 1px dashed #c6d0c6; border-radius: 14px; color: var(--muted); text-align: center; font-size: .78rem; }
.inbox-item { margin-bottom: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.inbox-item > summary { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.inbox-item > summary::-webkit-details-marker { display: none; }
.inbox-item > summary::after { content: '▸'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.inbox-item[open] > summary::after { transform: rotate(90deg); }
.inbox-name { min-width: 130px; color: var(--ink); font-size: .77rem; font-weight: 800; }
.inbox-subject { flex: 1; min-width: 150px; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-date { color: var(--muted); font-size: .64rem; white-space: nowrap; }
.inbox-body { padding: 0 15px 15px; border-top: 1px dashed var(--line); }
.inbox-notes { margin: 12px 0 8px; font-size: .76rem; }
.inbox-body pre, #vmMailPre { max-height: 400px; overflow: auto; margin: 8px 0 0; padding: 14px; border-radius: 10px; background: var(--paper); color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; font-family: var(--font-ui); font-size: .74rem; line-height: 1.65; }
.dual { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.rechtslogik, .next-action, .family-block, .aliases-block { min-width: 0; padding: clamp(22px,2.5vw,30px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.rechtslogik { background: var(--pine); color: #fff; border-color: var(--pine); }
.dual-title { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; letter-spacing: -.02em; }
.rechtslogik .dual-title { margin-bottom: 20px; color: #fff; }
.art-block { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.art-block h4 { margin: 0 0 5px; color: var(--mint); font-size: .72rem; }
.art-block p, .next-action-text { margin: 0; color: rgba(255,255,255,.62); font-size: .74rem; line-height: 1.7; }
.next-action-text { color: var(--ink-soft); }
.family-grid, .alias-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-top: 20px; }
.family-tile, .alias-tile { min-width: 0; min-height: 125px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); overflow-wrap: anywhere; }
.family-tile strong, .alias-tile strong { color: var(--ink); font-size: .78rem; }
.family-tile.is-empty, .alias-tile.is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; border-style: dashed; background: transparent; text-align: center; cursor: pointer; }
.tile-add:hover { border-color: var(--teal); background: #f0f7ed; }
.inline-add-form { margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.inline-add-form .form-msg, .form-msg { display: none; margin-top: 8px; font-size: .72rem; }
.settings { padding-top: 12px; }
.settings > .dual-title { margin-bottom: 20px; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.setting-card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.setting-card h4 { margin: 0 0 10px; color: var(--ink); font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.setting-card p { min-height: 48px; margin: 0; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.setting-card.danger { border-color: #e7c6c4; background: #fff9f6; }
.dash-footer { padding: 28px 0 4px; color: var(--muted); text-align: center; font-size: .65rem; }
.modal-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(5,28,25,.68); backdrop-filter: blur(7px); }
.modal-box { width: min(100%,480px); max-height: min(88vh,800px); overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); box-shadow: var(--shadow-lg); }
.modal-box h4 { margin: 0 0 11px; color: var(--ink); font-family: var(--font-display); font-size: 1.65rem; font-weight: 500; line-height: 1.1; }
.modal-box label { display: block; margin: 14px 0 6px; color: var(--ink-soft); font-size: .7rem; font-weight: 800; }
.modal-box input, .modal-box select { min-height: 46px; }
.modal-error { display: none; margin-top: 11px; color: var(--rose); font-size: .73rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.start-modal-box { max-width: 650px; }
.sel-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.sel-search { flex: 1; min-width: 180px; }
.sel-count { margin: 0 0 9px; color: var(--teal-dark); font-size: .72rem; font-weight: 800; }
.sel-list { max-height: 43vh; overflow-y: auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.sel-group-head { margin: 13px 3px 5px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sel-item { display: flex; align-items: center; gap: 11px; min-height: 40px; margin: 0; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: .76rem; }
.sel-item:hover, .sel-item.is-on { background: #e7f2e3; }
.sel-item input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--teal); }
.sel-broker-name { color: var(--ink); font-weight: 600; }
.sel-empty { padding: 20px; color: var(--muted); text-align: center; font-size: .75rem; }
#toast { position: fixed; z-index: 2000; left: 50%; bottom: 24px; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--pine-deep); color: #fff; box-shadow: var(--shadow-lg); font-size: .75rem; text-align: center; }
.dash-mobile-bar, .dash-nav-backdrop { display: none; }

/* ---------- Admin ---------- */
.admin-page { background: #f2f3ed; }
.admin-page .auth-layout { width: min(calc(100% - 40px),1440px); margin: 0 auto; padding: 32px 0 70px; }
.admin-page .auth-card { max-width: none; padding: clamp(22px,3vw,38px); border-radius: 24px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 31px; flex-wrap: wrap; }
.admin-header h1 { margin: 25px 0 6px; font-size: clamp(2.3rem,4vw,3.8rem); }
.admin-header .auth-subline { margin-bottom: 0; }
.admin-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; max-width: 600px; }
#admin-user { width: 100%; color: var(--muted); text-align: right; font-size: .7rem; overflow-wrap: anywhere; }
.admin-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 20px; }
.admin-card { min-width: 0; margin-bottom: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: none; }
.admin-grid .admin-card { margin: 0; }
.admin-card h3 { margin: 0; color: var(--muted); font-size: .7rem; font-weight: 800; }
.stat-number { margin: 15px 0 5px; color: var(--ink); font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1; }
.stat-label { color: var(--muted); font-size: .65rem; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 0 0 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; }
.table-container { max-width: 100%; overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; color: var(--ink-soft); font-size: .72rem; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { background: var(--paper); color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .025em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f6f8f1; }
td .btn { white-space: nowrap; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .6rem; font-weight: 800; }
.badge-warning { background: #f7edd5; color: #84611e; }
.badge-success { background: #e4f3e5; color: #27704a; }
.badge-danger { background: #fae5e3; color: #a33e43; }
.badge-info { background: #e3f2ef; color: var(--teal-dark); }
.loading { padding: 25px; color: var(--muted); text-align: center; }
#analytics-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
#analytics-kpis > div { padding: 15px !important; border: 1px solid var(--line); border-radius: 13px !important; background: var(--paper) !important; }
#analytics-tables { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 18px; }
.ref-form { display: grid; grid-template-columns: 1fr 1fr 1fr 100px auto; gap: 8px; margin-bottom: 16px; }

/* ---------- Prototype preview badge ---------- */
.prototype-badge { position: fixed; z-index: 4500; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #b7ca96; border-radius: 999px; background: var(--mint-soft); color: var(--pine-deep); box-shadow: var(--shadow); font-size: .64rem; font-weight: 800; letter-spacing: .03em; pointer-events: none; }
.prototype-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ---------- Responsive: tablet ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0,1fr) minmax(340px,.82fr); gap: 38px; }
  .hero h1 { font-size: clamp(3.7rem,7vw,5.5rem); }
  .mascot-note { left: -15px; }
  .feature-span-4 { grid-column: span 6; }
  .feature-span-8 { grid-column: span 6; }
  .dashboard-layout { grid-template-columns: 220px minmax(0,1fr); }
  .dash-main { padding: 32px 26px; }
  .dash-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .family-grid, .alias-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #analytics-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ref-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .nav-inner { grid-template-columns: 1fr auto auto; min-height: 70px; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: fixed; z-index: 401; top: 0; right: 0; bottom: 0; width: min(86vw,360px); display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 95px 28px 30px; background: var(--pine-deep); clip-path: inset(0 0 0 100%); visibility: hidden; opacity: 0; pointer-events: none; transition: clip-path .28s ease,opacity .2s ease,visibility .28s; box-shadow: var(--shadow-lg); }
  .nav-links.open { clip-path: inset(0); visibility: visible; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.13); color: #fff; font-family: var(--font-display); font-size: 1.55rem; font-weight: 500; }
  .nav-links a::after { display: none; }
  .nav-toggle { position: relative; z-index: 402; }
  .nav-toggle[aria-expanded=true] { border-color: rgba(255,255,255,.25); color: #fff; }
  .nav-backdrop { position: fixed; z-index: 400; inset: 0; background: rgba(5,28,25,.58); backdrop-filter: blur(4px); }
  .nav-backdrop.open { display: block; }
  .nav-cta .btn-outline { display: none; }
  .hero { padding-top: 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 45px; }
  .hero-copy { max-width: 730px; }
  .hero h1 { font-size: clamp(4rem,11vw,6.2rem); }
  .hero-subtitle { max-width: 620px; }
  .hero-visual { width: min(100%,590px); margin: 0 auto; }
  .section-head { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .section-head p { max-width: 590px; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:first-child, .step:last-child { display: grid; grid-template-columns: 80px minmax(0,1fr); column-gap: 22px; padding: 28px 0; border-left: 0; }
  .step-num { grid-row: span 2; margin: 0; }
  .step h3 { margin-top: 4px; }
  .step p { max-width: 570px; }
  .feature-span-7, .feature-span-5, .feature-span-4, .feature-span-8 { grid-column: span 6; }
  .faq-layout { grid-template-columns: 1fr; gap: 40px; }
  .faq-layout .section-head { position: static; }
  .auth-split { grid-template-columns: minmax(0,.75fr) minmax(390px,1.25fr); }
  .auth-aside { padding: 30px; }
  .auth-aside-copy h2 { font-size: 2.8rem; }
  .dashboard-layout { display: block; }
  /* Drawer-Stacking wie auf der Landing: Backdrop 299 < Mobile-Bar 301 < Panel 302.
     So bleibt der Toggle über dem geblurrten Backdrop scharf/klickbar und das Panel
     liegt über Backdrop UND Bar (kein Verdecken der Logo-Zone). */
  .dash-mobile-bar { position: sticky; top: 0; z-index: 301; display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: rgba(245,243,236,.93); backdrop-filter: blur(15px); }
  /* Solange das Menü offen ist: backdrop-filter der Bar deaktivieren (Containing-Block-Falle,
     falls das Panel je in einen Ancestor mit backdrop-filter wandert) — analog Landing-Fix. */
  body.dash-menu-open .dash-mobile-bar { backdrop-filter: none; }
  .dash-mobile-bar .dash-logo { margin: 0; color: var(--ink); }
  .dash-mobile-bar .dash-logo-mark { background: var(--pine); color: #fff; }
  .dash-menu-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
  .dash-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 302; width: min(82vw,290px); height: 100dvh; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-sidebar .dash-nav-item { min-height: 52px; color: rgba(242,239,228,.82); font-family: var(--font-display); font-size: 1.12rem; font-weight: 500; }
  .dash-sidebar .dash-nav-item:hover { color: #fff; }
  .dash-sidebar .dash-nav-item.active { color: var(--mint); }
  .dash-sidebar .dash-logout { color: rgba(242,239,228,.62); }
  .dash-sidebar .dash-logout:hover { color: #fff; }
  .dash-nav-backdrop.open { position: fixed; z-index: 299; inset: 0; display: block; background: rgba(5,28,25,.58); backdrop-filter: blur(4px); }
  .dash-main { padding: 32px 24px 50px; }
  .dash-top { scroll-margin-top: 85px; }
  .casefile, .familly-aliases, .settings, .dual { scroll-margin-top: 82px; }
}

/* ---------- Responsive: phones ---------- */
@media (max-width: 700px) {
  html { scroll-padding-top: 80px; }
  .wrap { width: min(calc(100% - 34px),var(--max)); }
  .testmode-banner { padding: 9px 14px; font-size: .68rem; text-align: left; }
  .nav-inner { min-height: 64px; }
  .nav-cta [data-i18n-switcher] { display: none; }
  .nav-cta .btn-primary { min-height: 40px; padding: 8px 13px; font-size: .7rem; }
  .nav-links [data-i18n-switcher] { display: block; margin-top: 25px; }
  .hero { padding: 32px 0 70px; }
  .hero::before { background-size: 34px 34px; }
  .hero-folio { gap: 10px; margin-bottom: 38px; font-size: .51rem; letter-spacing: .13em; }
  .hero-grid { gap: 30px; }
  .hero h1 { margin-bottom: 35px; font-size: clamp(3.35rem,16vw,5.2rem); line-height: .89; }
  .hero h1 em { margin-left: clamp(8px,3vw,18px); }
  .hero-subtitle { margin-left: 0; padding-left: 14px; font-size: .93rem; line-height: 1.7; }
  .hero-actions { display: grid; grid-template-columns: 1fr; margin-left: 0; }
  .hero-actions .btn { width: 100%; }
  .hero-proof { align-items: flex-start; margin-left: 0; font-size: .68rem; line-height: 1.55; }
  .hero-visual { margin-right: 0; padding: 12px 0 76px; }
  .hero-visual::before { inset: 10px -5px 55px 10px; }
  .hero-visual::after { right: -8px; width: 60px; height: 110px; }
  .case-tab { right: 24px; }
  .ledger-card { padding: 22px 17px; border-radius: 5px 23px 23px 23px; }
  .ledger-head h2 { font-size: 1.5rem; }
  .ledger-summary strong { font-size: 2.7rem; }
  .ledger-row { grid-template-columns: 31px minmax(0,1fr) auto; gap: 9px; padding: 10px 8px; }
  .ledger-status { font-size: .53rem; }
  .mascot-note { left: 10px; bottom: 7px; width: 220px; }
  .mascot-note img { width: 72px; height: 72px; }
  .visual-redaction { display: none; }
  .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat, .stat:first-child, .stat:last-child { padding: 23px 15px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { padding-right: 0; }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat-num { font-size: 2.25rem; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 39px; }
  .section-head h2 { font-size: clamp(2.6rem,12vw,3.6rem); }
  .step, .step:first-child, .step:last-child { grid-template-columns: 60px minmax(0,1fr); column-gap: 14px; }
  .step-num { font-size: 2.8rem; }
  .step h3 { font-size: 1.45rem; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-span-7, .feature-span-5, .feature-span-4, .feature-span-8 { grid-column: auto; }
  .feature { min-height: 0; padding: 25px; }
  .feature-copy, .feature-authorization .feature-copy { max-width: 100%; margin-top: 44px; padding-top: 0; }
  .feature-document { position: relative; right: auto; bottom: auto; margin: 28px 4px 4px auto; }
  .feature h3 { font-size: 1.6rem; }
  .pricing-toggle { margin-top: -12px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-amount { font-size: 4rem; }
  .faq-q { min-height: 70px; font-size: 1.16rem; }
  .faq-a-inner { padding-right: 20px; }
  .cta-box { grid-template-columns: 1fr; padding: 34px 25px; border-radius: 24px; }
  .cta-box h2 { font-size: 2.8rem; }
  .cta-mascot { position: absolute; right: -32px; bottom: -35px; width: 140px; opacity: .24; }
  .cta-content { max-width: 100%; }
  .cta-box .btn { width: 100%; }
  .footer { padding-top: 48px; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 34px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 7px; }

  .auth-shell { width: min(calc(100% - 28px),540px); padding: 14px 0; }
  .auth-split { display: flex; flex-direction: column; padding: 14px 0; }
  .auth-aside { min-height: 0; padding: 24px; border-radius: 23px 23px 0 0; }
  .auth-aside .brand { margin-bottom: 28px; }
  .auth-aside-copy .kicker, .auth-aside-copy p, .auth-aside-foot { display: none; }
  .auth-aside-copy h2 { max-width: 340px; margin: 0; font-size: 2.25rem; }
  .auth-split .auth-card { min-height: 0; padding: 32px 23px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 23px 23px; }
  .auth-split .auth-card > .brand { display: none; }
  .auth-card { padding: 32px 23px; border-radius: 22px; }
  .auth-card h1 { font-size: 2.25rem; }
  .i18n-corner { top: 14px; right: 14px; }
  .auth-card .i18n-corner .i18n-select { width: 80px; padding-left: 9px; padding-right: 6px; font-size: .66rem; }
  .plan-row { grid-template-columns: 1fr; gap: 15px; }
  .plan-pick { padding: 19px 17px; }
  .vm-actions { flex-direction: column; }
  .i18n-corner--fixed { top: 10px; right: 10px; }

  .legal-page .container { width: min(calc(100% - 34px),920px); padding-top: 18px; }
  .legal-page .i18n-row { margin-bottom: 40px; }
  .legal-page h1 { font-size: clamp(2.65rem,13vw,4rem); }
  .legal-page h2 { margin-top: 41px; }
  .legal-page p, .legal-page li { font-size: .85rem; }
  .legal-page .info-box { padding: 20px; }
  .widerrufs-box { padding: 21px; }

  .dash-mobile-bar { padding-inline: 15px; }
  .dash-main { padding: 26px 15px 45px; }
  .dash-top { flex-direction: column; gap: 18px; }
  .dash-top-right { width: 100%; justify-content: space-between; }
  .dash-h1 { font-size: 2.75rem; }
  .dash-sub { font-size: .75rem; }
  .dash-stats { gap: 9px; }
  .stat-tile { padding: 17px 15px; }
  .stat-tile-label { min-height: 38px; font-size: .62rem; }
  .stat-tile-num { margin-top: 10px; font-size: 2.4rem; }
  .casefile { padding: 19px 15px; border-radius: 18px; }
  .casefile-head { align-items: flex-start; }
  .casefile-title { font-size: 1.4rem; }
  .casefile-head .update-pill { order: 3; }
  .casefile-head .btn { min-height: 40px; padding: 8px 11px; font-size: .67rem; }
  .casefile-row { grid-template-columns: 36px minmax(0,1fr); gap: 10px; }
  .cf-avatar { width: 36px; height: 36px; border-radius: 11px; font-size: .58rem; }
  .cf-top { align-items: flex-start; }
  .cf-top strong { font-size: .77rem; }
  .cf-status { font-size: .54rem; }
  .inbox-item > summary { gap: 8px; padding: 12px; }
  .inbox-name { min-width: 0; width: calc(100% - 25px); }
  .inbox-subject { order: 4; width: 100%; min-width: 0; white-space: normal; }
  .inbox-date { margin-left: auto; }
  .dual, .settings-grid { grid-template-columns: 1fr; }
  .family-grid, .alias-grid { grid-template-columns: 1fr; }
  .family-tile, .alias-tile { min-height: 105px; }
  .setting-card { padding: 21px; }
  .setting-card p { min-height: 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box { width: 100%; max-width: none; max-height: 91dvh; padding: 25px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 120px; }
  .plan-choice { align-items: flex-start !important; flex-direction: column; gap: 5px !important; border-radius: 15px; }
  .sel-toolbar .btn { width: 100%; }
  .sel-search { min-width: 100%; }

  .admin-page .auth-layout { width: min(calc(100% - 24px),1440px); padding-top: 12px; }
  .admin-page .auth-card { padding: 18px 13px; border-radius: 20px; }
  .admin-header { align-items: flex-start; }
  .admin-header h1 { font-size: 2.55rem; }
  .admin-toolbar { justify-content: flex-start; }
  #admin-user { text-align: left; }
  .admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .admin-card { padding: 17px 14px; }
  .stat-number { font-size: 2.5rem; }
  #analytics-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #analytics-tables { grid-template-columns: 1fr; }
  .ref-form { grid-template-columns: 1fr; }
  .table-container { overflow: visible; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table tr { margin-bottom: 11px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
  .responsive-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: right !important; white-space: normal; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); flex: 0 0 38%; color: var(--muted); text-align: left; font-size: .6rem; font-weight: 800; }
  .responsive-table td > * { max-width: 62%; }
  .responsive-table td a { overflow-wrap: anywhere; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 3.35rem; }
  .hero h1 em { margin-left: 0; }
  .nav-cta .btn-primary { display: none; }
  .ledger-summary { gap: 12px; }
  .progress-ring { width: 72px; height: 72px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .stat-tile { padding: 15px 12px; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Motion & accessibility ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1); }
  html.motion .reveal.is-visible { opacity: 1; transform: translateY(0); }
  html.motion .reveal-delay-1 { transition-delay: .08s; }
  html.motion .reveal-delay-2 { transition-delay: .16s; }
  html.motion .hero-visual.hero-enter { animation-delay: .22s; }
  html.motion .hero-enter { opacity: 0; animation: heroEnter .72s cubic-bezier(.2,.72,.25,1) both; }
  html.motion .hero h1.hero-enter { animation-delay: .08s; }
  html.motion .hero-subtitle.hero-enter { animation-delay: .16s; }
  html.motion .hero-actions.hero-enter { animation-delay: .24s; }
  html.motion .hero-proof.hero-enter { animation-delay: .32s; }
  .hero::after { animation: heroGlow 13s ease-in-out infinite alternate; }
  .live-chip::before, .live-dot { animation: livePulse 2.4s ease-in-out infinite; }
  .mascot-note { animation: mascotFloat 6s ease-in-out infinite; }
  .ledger-row.is-updating { animation: rowUpdate .65s ease; }
  .ledger-row.is-entering { animation: rowEnter .46s cubic-bezier(.2,.75,.25,1) both; }
  @keyframes heroEnter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes heroGlow { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-28px,24px,0) scale(1.08); } }
  @keyframes livePulse { 0%,100% { box-shadow: 0 0 0 3px rgba(201,242,119,.12); } 50% { box-shadow: 0 0 0 7px rgba(201,242,119,0); } }
  @keyframes mascotFloat { 0%,100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-7px); } }
  @keyframes rowUpdate { 0%,100% { background: rgba(255,255,255,.045); } 45% { background: rgba(201,242,119,.11); border-color: rgba(201,242,119,.35); } }
  @keyframes rowEnter { from { opacity: 0; transform: translateY(-13px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.motion .reveal, html.motion .hero-enter { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero::after, .mascot-note { animation: none !important; }
}
@media print {
  .i18n-row, .legal-footer-nav, .prototype-badge { display: none !important; }
  .legal-page .container { width: 100%; padding: 0; }
  .legal-page { background: #fff; }
}
