/* HandleTheLetter design system — shared by the public website and the app.
   Family resemblance with WireTheSun (Atkinson Hyperlegible, calm surfaces, floating glass island),
   with its own deep teal / blue / green identity. */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --bg: #f3f8f8;
  --bg-tint: #e8f2f1;
  --surface: #ffffff;
  --surface-2: #f7fbfb;
  --ink: #0f2a2e;
  --muted: #4a5f63;
  --line: #d5e3e3;
  --brand: #0c5b63;          /* deep teal — 7.6:1 on white */
  --brand-strong: #08434a;
  --brand-soft: #dcefed;
  --brand-ink: #ffffff;
  --blue: #1f5ba8;
  --blue-soft: #e3edf9;
  --green: #11704b;
  --green-soft: #ddf2e8;
  --warn: #8a4b00;
  --warn-soft: #fff1d6;
  --danger: #a3261b;
  --danger-soft: #fde6e3;
  --focus: #1f5ba8;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(12, 91, 99, 0.14);
  --shadow: 0 1px 2px rgba(15, 42, 46, 0.06), 0 8px 24px rgba(15, 42, 46, 0.07);
  --shadow-lg: 0 2px 6px rgba(15, 42, 46, 0.08), 0 18px 48px rgba(15, 42, 46, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", "Noto Sans", Roboto, Arial, sans-serif;
  --nav-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1416; --bg-tint: #0f1d20; --surface: #132427; --surface-2: #172b2f;
    --ink: #e5f0f0; --muted: #a1b6b8; --line: #27403f;
    --brand: #5cc2ba; --brand-strong: #84d6cf; --brand-soft: #143a3b; --brand-ink: #062326;
    --blue: #8ab6f0; --blue-soft: #16294a; --green: #6fd3a3; --green-soft: #12342a;
    --warn: #f3c46b; --warn-soft: #3a2a0c; --danger: #ff9c92; --danger-soft: #3d1714; --focus: #8ab6f0;
    --glass: rgba(16, 32, 35, 0.72); --glass-line: rgba(140, 214, 207, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1416; --bg-tint: #0f1d20; --surface: #132427; --surface-2: #172b2f;
  --ink: #e5f0f0; --muted: #a1b6b8; --line: #27403f;
  --brand: #5cc2ba; --brand-strong: #84d6cf; --brand-soft: #143a3b; --brand-ink: #062326;
  --blue: #8ab6f0; --blue-soft: #16294a; --green: #6fd3a3; --green-soft: #12342a;
  --warn: #f3c46b; --warn-soft: #3a2a0c; --danger: #ff9c92; --danger-soft: #3d1714; --focus: #8ab6f0;
  --glass: rgba(16, 32, 35, 0.72); --glass-line: rgba(140, 214, 207, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
}

/* Adjustable text size (Account → text size, or the A+ control) */
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
html[data-text="large"] { font-size: 118.75%; }
html[data-text="xlarge"] { font-size: 131.25%; }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.55; font-size: 1rem;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas, video { max-width: 100%; display: block; }
.registration-mail-icon { width: 48px; height: 48px; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: calc(12px + var(--safe-top)); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }

/* ───────── Floating navigation island ───────── */
.nav-island {
  position: fixed; z-index: 50;
  top: calc(10px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 20px); max-width: 1120px; min-height: var(--nav-h);
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px;
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-island { background: var(--surface); }
}
.nav-spacer { height: calc(var(--nav-h) + 30px + var(--safe-top)); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.08rem; white-space: nowrap; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .the { color: var(--brand); }
.nav-links { display: flex; gap: 4px; margin-inline-start: 12px; }
.nav-links a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }
.nav-tools { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.nav-select { position: relative; }
.nav-select > summary { list-style: none; cursor: pointer; }
.nav-select > summary::-webkit-details-marker { display: none; }
.nav-pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 220px; max-height: min(70vh, 520px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.nav-pop a, .nav-pop button {
  display: flex; width: 100%; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: start;
}
.nav-pop a:hover, .nav-pop button:hover, .nav-pop [aria-current="true"] { background: var(--brand-soft); }
.nav-pop .hint { color: var(--muted); font-size: 0.82rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; font-size: 0.92rem;
}
.icon-btn:hover { background: var(--brand-soft); }
.icon-btn svg { width: 22px; height: 22px; }
.nav-menu-btn { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
  .nav-island .hide-sm { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: calc(100% + 10px); inset-inline: 0; margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  border-radius: 16px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1.02rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease; text-align: center;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(12, 91, 99, 0.22); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-secondary { background: var(--surface); color: var(--brand-strong); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 0.95rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-round { width: 76px; height: 76px; padding: 0; border-radius: 999px; }

/* ───────── Cards ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-soft { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.card h3 { margin-bottom: 6px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-strong); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--ink); }
.notice svg { width: 22px; height: 22px; flex: none; color: var(--blue); margin-top: 2px; }
.notice-warn { background: var(--warn-soft); } .notice-warn svg { color: var(--warn); }
.notice-danger { background: var(--danger-soft); } .notice-danger svg { color: var(--danger); }
.notice-green { background: var(--green-soft); } .notice-green svg { color: var(--green); }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

/* ───────── Forms ───────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; }
.field .hint { color: var(--muted); font-size: 0.9rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.02rem;
}
textarea.input { min-height: 130px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error-text { color: var(--danger); font-weight: 700; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.segmented button { min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }

/* ───────── Public site ───────── */
.hero { padding: 24px 0 56px; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { color: var(--ink); }
.hero h1 .accent { color: var(--brand); }
.hero .lead { font-size: 1.22rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.trial-pill { display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 700; }
.trial-pill svg { width: 20px; height: 20px; }
.section { padding: 56px 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.step-card { position: relative; }
.step-num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }
.step-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.step-icon svg { width: 26px; height: 26px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.05rem; }
.check-list svg { width: 24px; height: 24px; color: var(--green); flex: none; }

/* Animated demonstration (scan → understand → reply → sign) */
.demo { position: relative; aspect-ratio: 4 / 4.4; max-width: 460px; margin: 0 auto; width: 100%; }
.demo-phone { position: absolute; inset: 0 8%; background: var(--surface); border: 1px solid var(--line); border-radius: 34px; box-shadow: var(--shadow-lg); padding: 18px; overflow: hidden; }
.demo-paper { background: #fffdf8; color: #2b2b2b; border-radius: 10px; padding: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.08); font-size: 0.78rem; transform: rotate(-3deg); animation: demo-straighten 9s ease-in-out infinite; }
.demo-paper .l { height: 7px; border-radius: 4px; background: #d9dfe0; margin: 7px 0; }
.demo-paper .l.s { width: 60%; } .demo-paper .l.m { width: 82%; }
.demo-scan { position: absolute; left: 18px; right: 18px; height: 3px; background: var(--brand); box-shadow: 0 0 18px var(--brand); border-radius: 3px; top: 30px; animation: demo-scan 9s ease-in-out infinite; }
.demo-card { margin-top: 12px; background: var(--brand-soft); border-radius: 14px; padding: 10px 12px; font-size: 0.86rem; opacity: 0; animation: demo-fade 9s ease-in-out infinite; }
.demo-card b { display: block; color: var(--brand-strong); }
.demo-card.d2 { animation-delay: .6s; } .demo-card.d3 { background: var(--warn-soft); animation-delay: 1.2s; } .demo-card.d4 { background: var(--green-soft); animation-delay: 1.8s; }
.demo-sign { position: absolute; right: 26px; bottom: 26px; width: 120px; height: 50px; color: var(--brand); }
.demo-sign path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: demo-sign 9s ease-in-out infinite; }
@keyframes demo-scan { 0% { top: 30px; opacity: 0 } 6% { opacity: 1 } 26% { top: 170px; opacity: 1 } 30%, 100% { top: 170px; opacity: 0 } }
@keyframes demo-straighten { 0%, 25% { transform: rotate(-3deg) } 32%, 100% { transform: rotate(0) } }
@keyframes demo-fade { 0%, 34% { opacity: 0; transform: translateY(8px) } 42%, 92% { opacity: 1; transform: none } 100% { opacity: 0 } }
@keyframes demo-sign { 0%, 72% { stroke-dashoffset: 260 } 86%, 100% { stroke-dashoffset: 0 } }

.price-card { display: flex; flex-direction: column; gap: 10px; }
.price-card .price { font-size: 2rem; font-weight: 700; }
.price-card .per { color: var(--muted); font-size: 0.95rem; }
.price-card.featured { border: 2px solid var(--brand); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose li { margin-bottom: 0.4em; }
.site-footer { margin-top: 40px; padding: 40px 0 calc(40px + var(--safe-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer a { color: var(--muted); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

/* ───────── App ───────── */
.app-main { padding: 8px 0 calc(110px + var(--safe-bottom)); }
.page-title { display: flex; align-items: center; gap: 12px; margin: 8px 0 20px; }
.page-title h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0; }
.action-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) { .action-grid { grid-template-columns: 1fr; } }
.action-tile {
  display: flex; align-items: center; gap: 16px; min-height: 108px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--surface); border: 2px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; text-align: start; font: inherit;
  box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease;
}
.action-tile:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-1px); }
.action-tile .ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.action-tile .ico svg { width: 34px; height: 34px; }
.action-tile strong { display: block; font-size: 1.2rem; }
.action-tile span { color: var(--muted); }
.action-tile.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.action-tile.primary span { color: color-mix(in srgb, var(--brand-ink) 82%, transparent); }
.action-tile.primary .ico { background: rgba(255,255,255,.16); color: var(--brand-ink); }
.voice-fab {
  position: fixed; z-index: 40; inset-inline-end: 18px; bottom: calc(18px + var(--safe-bottom));
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 22px 0 18px; border-radius: 999px; border: 0;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; box-shadow: var(--shadow-lg); cursor: pointer; text-decoration: none;
}
:root[data-theme="dark"] .voice-fab { color: #052016; }
.voice-fab svg { width: 26px; height: 26px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.list-item:hover { border-color: var(--brand); color: var(--ink); }
.list-item .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.list-item .ico svg { width: 24px; height: 24px; }
.qa { display: grid; gap: 12px; }
.qa-item { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.qa-item h3 { font-size: 1rem; color: var(--brand-strong); margin-bottom: 4px; }
.qa-item p { margin: 0; font-size: 1.08rem; }
.deadline-banner { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--warn-soft); border: 2px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.deadline-banner svg { width: 34px; height: 34px; color: var(--warn); flex: none; }
.deadline-banner strong { font-size: 1.25rem; display: block; }
.quote { border-inline-start: 4px solid var(--line); padding: 4px 12px; margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; white-space: pre-wrap; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: thin; }
.tabs button { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.progress { height: 12px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s ease; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps-list li { display: flex; gap: 12px; align-items: center; font-size: 1.05rem; }
.steps-list .dot { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--line); flex: none; display: grid; place-items: center; }
.steps-list .done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.steps-list .active .dot { border-color: var(--brand); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; }
.page-thumb { position: relative; flex: none; width: 92px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface); }
.page-thumb img { width: 100%; height: 124px; object-fit: cover; }
.page-thumb .n { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 7px; font-weight: 700; font-size: 0.85rem; }
.page-thumb.warn { border-color: var(--warn); }

/* Scanner */
.scanner { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: flex; flex-direction: column; }
.scanner video, .scanner .scan-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scanner .top, .scanner .bottom { position: relative; z-index: 2; padding: calc(12px + var(--safe-top)) 14px 12px; display: flex; gap: 10px; align-items: center; }
.scanner .bottom { margin-top: auto; padding: 14px 14px calc(18px + var(--safe-bottom)); flex-direction: column; background: linear-gradient(transparent, rgba(0,0,0,.72) 30%); }
.scanner .hint-pill { padding: 10px 16px; border-radius: 999px; background: rgba(0,0,0,.6); font-weight: 700; text-align: center; }
.scanner .icon-btn { color: #fff; background: rgba(0,0,0,.45); }
.shutter { width: 80px; height: 80px; border-radius: 999px; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.shutter:active { background: rgba(255,255,255,.6); }
.corner-editor { position: relative; touch-action: none; user-select: none; max-height: 62vh; }
.corner-editor canvas { width: 100%; height: auto; border-radius: 12px; }
.corner-handle { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 999px; border: 4px solid var(--brand); background: rgba(255,255,255,.55); touch-action: none; }

/* Letter preview / signature */
.preview-pages { display: grid; gap: 16px; justify-items: center; }
.preview-pages canvas { width: 100%; max-width: 640px; height: auto; background: #fff; box-shadow: var(--shadow-lg); border-radius: 4px; }
.sig-pad { width: 100%; height: 220px; border-radius: 16px; border: 2px dashed var(--brand); background: #fff; touch-action: none; cursor: crosshair; }
.editor-body { font-family: var(--font); }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(5, 20, 22, .55); display: grid; place-items: end center; padding: 0; }
@media (min-width: 640px) { .modal-backdrop { place-items: center; padding: 16px; } }
.modal { width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px 16px calc(20px + var(--safe-bottom)); box-shadow: var(--shadow-lg); }
@media (min-width: 640px) { .modal { border-radius: 24px; padding: 24px; } }
.toast { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-bottom)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .v { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .k { color: var(--muted); font-size: 0.9rem; }
.spinner { width: 42px; height: 42px; border-radius: 999px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }

[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .demo-card { opacity: 1; } .demo-sign path { stroke-dashoffset: 0; }
}
@media print {
  .nav-island, .nav-spacer, .voice-fab, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}

/* Inline icons inside controls */
.segmented button, .chip, .tabs button { display: inline-flex; align-items: center; gap: 8px; }
.segmented svg, .chip svg, .tabs svg, .card h3 svg, .badge svg { width: 20px; height: 20px; flex: none; }
.action-tile { color: var(--ink); }
