/* Lapsefix design system: light, plain, one accent (deep teal #115e59 from the app icon).
   Public pages use .site, the signed-in app uses .appx. The only motion is a short fade-in
   on scroll and ordinary hover states, both disabled under prefers-reduced-motion. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-wght-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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-ext-wght-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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-greek-wght-normal.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
  --bg: #fafaf9;
  --panel: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #f0f1f3;
  --brand: #115e59;
  --brand-ink: #0d4a46;
  --brand-soft: #eef6f5;
  --good: #047857;
  --good-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --radius: 8px;
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 600; color: var(--ink); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.86em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.lf-word { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 1rem; letter-spacing: -0.01em; color: var(--ink); }
.lf-mark { flex: none; display: block; }

/* ---------- Shared primitives (app pages) ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--brand); border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 550; font-size: 0.9rem; cursor: pointer; background: var(--brand); color: #fff; transition: background-color .15s, border-color .15s; }
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #f9fafb; border-color: #d1d5db; }
.btn.ghost { background: transparent; color: var(--brand); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn.lg { padding: 11px 18px; font-size: 0.95rem; }
.btn.sm { padding: 5px 10px; font-size: 0.82rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: #fecaca; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: 6px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } h1 { font-size: 1.6rem; } }

.kpi .label { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.kpi .value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
.kpi.good .value { color: var(--good); }
.kpi.bad .value { color: var(--bad); }
.kpi.warn .value { color: var(--warn); }
.kpi.kpi-hero { border-top: 3px solid var(--brand); }
.kpi.kpi-hero .value { color: var(--brand); }

.section { padding: 28px 0; }
.page-head { padding: 32px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.78rem; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:hover td { background: #fafafa; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl a { color: var(--ink); font-weight: 550; }

.pill { display: inline-block; font-size: 0.74rem; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: #f3f4f6; color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.brand { background: var(--brand-soft); color: var(--brand-ink); }
a.pill:hover { text-decoration: none; background: #e5e7eb; }
a.pill.brand:hover { background: #dcefec; }

.bar { height: 8px; border-radius: 4px; background: #f3f4f6; overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.c-auto { background: #059669; }
.c-cust { background: #115e59; }
.c-lost { background: #dc2626; }
.c-risk { background: #d97706; }

.callout { border-radius: 6px; padding: 12px 14px; background: #f9fafb; border: 1px solid var(--line); font-size: 0.9rem; }
.callout.warn { background: var(--warn-soft); border-color: #fde68a; }
.callout.good { background: var(--good-soft); border-color: #a7f3d0; }

input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; font-size: 0.93rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 94, 89, .12); }
input[type=range] { accent-color: var(--brand); }
label.field { display: block; font-size: 0.85rem; font-weight: 550; margin-bottom: 6px; }
.eyebrow { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.feature .icon { display: none; }
.mock { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 550; }
details p { margin-top: 8px; color: var(--ink-2); }
iframe.email { width: 100%; height: 640px; border: 0; display: block; background: #f4f5f7; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 1px solid var(--line); position: relative; font-size: 0.88rem; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.cta-band { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.cta-band h2 { color: var(--ink) !important; }
.cta-band .btn { background: var(--brand) !important; color: #fff !important; }

/* ---------- App chrome (.appx) ---------- */
.appx { min-height: 100vh; display: flex; flex-direction: column; }
.ax-main { flex: 1; }
.ax-top { background: #fff; border-bottom: 1px solid var(--line); }
.ax-top-in { display: flex; align-items: center; gap: 28px; height: 56px; }
.ax-brand:hover { text-decoration: none; }
.ax-nav { display: flex; gap: 22px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.ax-nav a { color: var(--muted); font-weight: 500; font-size: 0.9rem; white-space: nowrap; }
.ax-nav a:hover { color: var(--ink); text-decoration: none; }
.testmode { font-size: 0.75rem; font-weight: 500; color: var(--warn); border: 1px solid #fde68a; background: var(--warn-soft); padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
@media (max-width: 640px) { .ax-top-in { gap: 16px; } .ax-brand .lf-word > span { display: none; } }
.footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 24px 0 40px; color: var(--muted); font-size: 0.82rem; }

.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 32px 0 4px; }
.dash-head h1 { margin: 0 0 4px; font-size: 1.6rem; }
.meta { font-size: 0.82rem; color: var(--muted); }
.meta span + span::before { content: " · "; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.card-h h3 { margin: 0; }
.rate { display: grid; grid-template-columns: 90px 1fr 56px; gap: 10px; align-items: center; font-size: 0.84rem; margin: 8px 0; }
.rate .track { height: 8px; border-radius: 4px; background: #f3f4f6; overflow: hidden; }
.rate .track i { display: block; height: 100%; width: var(--w); background: var(--brand); }
.rate .track i.muted-bar { background: #9ca3af; }
.rate b { text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.statline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
.statline b { color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.st-open { color: var(--warn); } .st-recovered { color: var(--good); } .st-lost { color: var(--bad); }
.status { font-size: 0.82rem; font-weight: 550; text-transform: capitalize; }

.outbox { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .outbox { grid-template-columns: 1fr; } }
.mail-list { padding: 0; max-height: 760px; overflow: auto; }
.mail-item { display: block; padding: 12px 16px; color: var(--ink); border-bottom: 1px solid var(--line-2); border-left: 2px solid transparent; }
.mail-item:last-child { border-bottom: 0; }
.mail-item:hover { background: #fafafa; text-decoration: none; }
.mail-item.on { background: var(--brand-soft); border-left-color: var(--brand); }
.mail-item b { display: block; font-size: 0.88rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .tiny { display: block; margin-top: 2px; }
.mail-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.mail-bar { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Public site (.site) ---------- */
.site { background: #fff; color: var(--ink); min-height: 100vh; }
.site a:hover { text-decoration: none; }
.s-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.s-nav { border-bottom: 1px solid var(--line); background: #fff; }
.s-nav-in { display: flex; align-items: center; gap: 36px; height: 60px; }
.s-brand:hover { text-decoration: none; }
.s-links { display: flex; gap: 26px; flex: 1; }
.s-links a { color: var(--ink-2); font-size: 0.9rem; }
.s-links a:hover { color: var(--ink); }
.s-nav-cta { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.s-signin { color: var(--ink-2); font-size: 0.9rem; }
.s-signin:hover { color: var(--ink); }
@media (max-width: 860px) { .s-links { display: none; } }

.s-btn { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 6px; font-size: 0.92rem; font-weight: 550; color: #fff !important; background: var(--brand); border: 1px solid var(--brand); transition: background-color .15s, border-color .15s; white-space: nowrap; }
.s-btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.s-btn-sm { padding: 6px 12px; font-size: 0.86rem; }
.s-btn-secondary { background: #fff; color: var(--ink) !important; border-color: #d1d5db; }
.s-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
.link { font-weight: 550; }
.link::after { content: " →"; }

.overline { font-size: 0.85rem; font-weight: 550; color: var(--brand); margin-bottom: 14px; }
.hero { padding: 72px 0 80px; border-bottom: 1px solid var(--line); background: var(--bg); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 64px; align-items: center; }
@media (max-width: 960px) { .hero-in { grid-template-columns: 1fr; gap: 48px; } .hero { padding: 48px 0 56px; } }
.hero h1 { font-size: 2.6rem; line-height: 1.15; letter-spacing: -0.025em; font-weight: 650; margin-bottom: 18px; }
@media (max-width: 640px) { .hero h1 { font-size: 2rem; } }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 560px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.note { font-size: 0.84rem; color: var(--muted); margin-top: 18px; }

.fig { margin: 0; }
.fig figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* Mockup of the Stripe Dashboard drawer (static, example data) */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06); font-size: 0.875rem; color: #30313d; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-title { font-weight: 650; font-size: 1rem; color: #1a1b25; }
.panel-sub { font-size: 0.8rem; color: #6a7383; }
.panel-btn { background: #635bff; color: #fff; font-size: 0.8rem; font-weight: 600; padding: 6px 10px; border-radius: 5px; white-space: nowrap; }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-stats span, .panel-stats small { display: block; font-size: 0.76rem; color: #6a7383; }
.panel-stats b { display: block; font-size: 1.15rem; font-weight: 650; color: #1a1b25; margin: 2px 0; font-variant-numeric: tabular-nums; }
.panel-list { padding: 14px 20px 8px; }
.panel-list-title { font-weight: 600; color: #1a1b25; margin-bottom: 6px; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.panel-row:first-of-type { border-top: 0; }
.panel-row b { display: block; font-weight: 550; color: #1a1b25; }
.panel-row small { display: block; font-size: 0.76rem; color: #6a7383; }
.panel-val { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.badge { font-size: 0.72rem; font-weight: 600; color: #a82c00; background: #fcedb9; padding: 1px 6px; border-radius: 4px; }

.sec { padding: 80px 0; border-bottom: 1px solid var(--line); }
.sec:last-of-type { border-bottom: 0; }
.sec h2 { font-size: 1.6rem; letter-spacing: -0.02em; font-weight: 650; margin-bottom: 14px; }
.sec p { color: var(--ink-2); max-width: 560px; }
.sec-head { margin-bottom: 40px; }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; gap: 32px; } .sec { padding: 56px 0; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--line); }
.steps li { padding-top: 22px; }
.steps .num { display: block; font-size: 0.85rem; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.steps h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.steps p { font-size: 0.92rem; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 0; } .steps li { padding: 18px 0; border-bottom: 1px solid var(--line); } }
.steps-compact { grid-template-columns: 1fr; gap: 0; margin: 28px 0; }
.steps-compact li { display: grid; grid-template-columns: 48px 1fr; column-gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps-compact .num { grid-row: span 2; margin: 0; }
.steps-compact h3 { margin-bottom: 4px; }

.mail { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.mail-head { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.84rem; }
.mail-head div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 2px 0; }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.mail-body { display: block; width: 100%; height: 640px; border: 0; background: #f4f5f7; }

.tbl-plain { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.tbl-plain th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.8rem; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl-plain td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.tbl-plain tfoot td { border-bottom: 0; border-top: 1px solid var(--line); font-weight: 600; background: #fafafa; }
.tbl-plain .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.aside { border: 1px solid var(--line); border-radius: 8px; padding: 24px; background: var(--bg); }
.aside h3 { margin-bottom: 8px; }
.aside p { font-size: 0.94rem; }

.faq details { padding: 16px 0; border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 550; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); font-size: 0.94rem; }

.page { padding: 72px 0 96px; }
.page-in { max-width: 680px; }
.page h1 { font-size: 2rem; letter-spacing: -0.02em; font-weight: 650; }
.page p { color: var(--ink-2); }

.s-foot { border-top: 1px solid var(--line); padding: 40px 0 32px; background: var(--bg); font-size: 0.86rem; }
.s-foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.s-foot-in p { color: var(--muted); margin: 10px 0 0; }
.s-foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.s-foot-links a { color: var(--ink-2); }
.s-foot-links a:hover { color: var(--ink); }
.s-foot-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }

/* Fade-in on scroll: only hidden while JS runs (html.js), so nothing is lost without JS. */
.js [data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity .35s ease-out, transform .35s ease-out; }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

@media (max-width: 560px) {
  .panel-head { flex-direction: column; }
  .panel-stats { padding: 16px; gap: 8px; }
  .panel-stats b { font-size: 1rem; }
  .panel-head, .panel-list { padding-left: 16px; padding-right: 16px; }
  .mail-body { height: 820px; }
  .tbl-plain th, .tbl-plain td { padding: 10px 10px; }
  .tbl-plain { font-size: 0.84rem; }
}
