/* saraban — e-saraban for Thai local government
   TH Sarabun New (SIPA, GPL + font exception) is the same face used in the generated PDFs (FR-01-42). */
@font-face {
    font-family: "TH Sarabun New";
    src: url("fonts/THSarabunNew.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "TH Sarabun New";
    src: url("fonts/THSarabunNew-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/*
 * Typography
 * TH Sarabun New is small on screen: Thai base glyphs are 0.40 em tall and x-height is 0.34 em, against ~0.54 em
 * for common UI fonts. A 22 px root gives roughly the visual size of 16 px Tahoma. Stacked marks reach 0.83 em
 * above and 0.22 em below the baseline, so body text needs generous leading and headings never go below 1.25.
 * The root is set in % so a user's browser font-size preference still scales the whole page.
 * Smallest text (--text-xs) stays above 16 px (SRS UI-01).
 */
:root {
    --text-xs: 0.8rem;    /* 17.6 px — meta, badges */
    --text-sm: 0.9rem;    /* 19.8 px — secondary text */
    --text-base: 1rem;    /* 22 px — body */
    --text-md: 1.15rem;   /* 25 px — lead, card titles */
    --text-lg: 1.35rem;   /* 30 px — panel titles */
    --text-xl: 1.7rem;    /* 37 px */
    --text-2xl: 2.1rem;   /* 46 px — section titles */
    --text-3xl: 2.7rem;   /* 59 px — page title */

    --leading-tight: 1.25;
    --leading-snug: 1.4;
    --leading-body: 1.6;

    --paper: #f7f5ef;
    --surface: #ffffff;
    --ink: #1a2238;
    --ink-soft: #4d566b;
    --line: #e3dfd3;
    --brand: #1f3a6e;
    --brand-deep: #152a52;
    --brand-tint: #e8eef8;
    --gold: #c9962f;
    --gold-tint: #fbf3e2;
    --ok: #1d7a4c;
    --ok-tint: #e3f4ea;
    --bad: #b3261e;
    --bad-tint: #fbe7e5;
    --muted: #6e7589;
    --muted-tint: #eff0f3;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(26, 34, 56, .06), 0 8px 24px rgba(26, 34, 56, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 137.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "TH Sarabun New", "Sarabun", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
    font-size: var(--text-base);
    line-height: var(--leading-body);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: var(--leading-tight); margin: 0; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.75em; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 6px 12px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Buttons */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
    background: var(--brand); color: #fff; text-decoration: none; border: 0; cursor: pointer;
    font: inherit; font-size: var(--text-base); line-height: var(--leading-snug); font-weight: 700;
    padding: 6px 22px; border-radius: 10px;
}
.button:hover, .button:focus-visible { background: var(--brand-deep); }
.button--light { background: #fff; color: var(--brand); }
.button--light:hover, .button--light:focus-visible { background: var(--gold-tint); color: var(--brand-deep); }
.button--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .55); min-height: 40px; padding: 2px 16px; font-size: var(--text-sm); }
.button--ghost:hover, .button--ghost:focus-visible { background: rgba(255, 255, 255, .12); }
.button--lg { min-height: 54px; padding-inline: 28px; font-size: var(--text-md); }
.button--outline { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.button--outline:hover, .button--outline:focus-visible { background: var(--brand-tint); color: var(--brand-deep); }
.button--block { width: 100%; margin-top: 24px; min-height: 52px; }
.inline-form { margin: 0; }

/* Header */
.site-header { background: var(--brand); color: #fff; border-bottom: 3px solid var(--gold); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand__mark { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__title { font-size: var(--text-lg); font-weight: 700; line-height: var(--leading-tight); }
.brand__subtitle { font-size: var(--text-sm); line-height: var(--leading-snug); opacity: .85; }
.site-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.user-chip { display: flex; flex-direction: column; align-items: flex-end; color: #fff; text-decoration: none; line-height: var(--leading-tight); }
.user-chip__name { font-weight: 700; font-size: var(--text-sm); }
.user-chip__org { font-size: var(--text-xs); opacity: .8; }
.env-badge { flex: none; font-size: var(--text-xs); line-height: var(--leading-snug); padding: 2px 14px; border-radius: 999px; background: var(--gold-tint); color: #7a5412; font-weight: 700; }

.site-nav { background: var(--brand-deep); }
.site-nav__wrap { position: relative; }
.site-nav__inner { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
.site-nav__inner::-webkit-scrollbar { height: 4px; }
.site-nav__inner::-webkit-scrollbar-track { background: transparent; }
.site-nav__inner::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .35); border-radius: 999px; }
.site-nav__inner:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .55); }
.site-nav a { display: inline-flex; align-items: center; gap: 7px; color: #dbe4f5; text-decoration: none; font-size: var(--text-base); line-height: var(--leading-snug); padding: 8px 14px; white-space: nowrap; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a:focus-visible { color: #fff; border-bottom-color: var(--gold); }
.site-nav a.is-active { color: #fff; font-weight: 700; border-bottom-color: var(--gold); }
/* A menu item with a sub-menu: the list is position: fixed (placed by the script under its item) because the row
   scrolls sideways and would clip anything hanging below it. */
.site-nav__caret { display: inline-flex; margin-left: -2px; }
.site-nav__caret .icon { width: 16px; height: 16px; stroke-width: 2; transition: transform .2s; }
.site-nav__parent[aria-expanded="true"] { color: #fff; border-bottom-color: var(--gold); }
.site-nav__parent[aria-expanded="true"] .site-nav__caret .icon { transform: rotate(180deg); }
.site-nav__menu {
    position: fixed; z-index: 50; min-width: 260px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
    background: var(--surface); border-top: 3px solid var(--gold); border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 28px rgba(26, 34, 56, .2);
}
.site-nav__menu[hidden] { display: none; }
.site-nav .site-nav__menu a { color: var(--ink); padding: 8px 14px; border-bottom: 0; border-radius: 8px; }
.site-nav .site-nav__menu a:hover, .site-nav .site-nav__menu a:focus-visible { color: var(--brand-deep); background: var(--brand-tint); }
.site-nav .site-nav__menu a.is-active { color: var(--brand-deep); font-weight: 700; background: var(--brand-tint); box-shadow: inset 3px 0 0 var(--gold); }
/* Shown only while that side really has more menu hidden behind it. The fade tells the eye that the row is cut off. */
.site-nav__arrow {
    position: absolute; top: 0; bottom: 4px; width: 38px; display: flex; align-items: center; justify-content: center;
    border: 0; padding: 0; cursor: pointer; color: #fff; background: var(--brand-deep);
}
.site-nav__arrow[hidden] { display: none; }
.site-nav__arrow .icon { width: 20px; height: 20px; stroke-width: 2; }
.site-nav__arrow--start { left: 0; background: linear-gradient(90deg, var(--brand-deep) 65%, rgba(21, 42, 82, 0)); justify-content: flex-start; padding-left: 4px; }
.site-nav__arrow--end { right: 0; background: linear-gradient(270deg, var(--brand-deep) 65%, rgba(21, 42, 82, 0)); justify-content: flex-end; padding-right: 4px; }
.site-nav__arrow:hover, .site-nav__arrow:focus-visible { color: var(--gold); }

/* Icons — inline SVG, no icon font or CDN (the system must work inside a closed network) */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell .icon { width: 20px; height: 20px; }

.site-main { flex: 1; }

/* Sections */
.section { padding-block: 48px; }
.section + .section { padding-top: 8px; }
.section__head { margin-bottom: 24px; }
.section__eyebrow { color: #9a6f1c; font-weight: 700; font-size: var(--text-sm); line-height: var(--leading-snug); letter-spacing: .02em; }
.section__title { font-size: var(--text-2xl); }
.section__lead { color: var(--ink-soft); font-size: var(--text-md); line-height: var(--leading-body); margin-top: 6px; max-width: 58ch; }

/* Hero */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: var(--text-sm); line-height: var(--leading-snug); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fact { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; border-top: 3px solid var(--brand); }
.fact:nth-child(2) { border-top-color: var(--gold); }
.fact:nth-child(3) { border-top-color: var(--ok); }
.fact:nth-child(4) { border-top-color: #6b4fa0; }
.fact__value { font-size: var(--text-2xl); font-weight: 700; line-height: 1.1; color: var(--brand-deep); }
.fact__label { color: var(--ink-soft); font-size: var(--text-sm); line-height: var(--leading-snug); margin-top: 4px; }

/* Animated document flow */
.flow-anim { padding-top: 12px; }
.flow-anim__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.flow-anim__stage { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 8px 4px; overflow-x: auto; }
.flow-anim__svg { display: block; width: 100%; min-width: 860px; height: auto; font-family: "TH Sarabun New", "Sarabun", "Noto Sans Thai", sans-serif; }
.flow-anim__label { font-size: 26px; font-weight: 700; fill: var(--ink); }
.flow-anim__who { font-size: 18px; fill: var(--muted); }
.flow-anim__num-bg { fill: #c9962f; stroke: #fff; stroke-width: 3; }
.flow-anim__num { font-size: 17px; font-weight: 700; fill: #fff; }
.flow-anim__caption-title { font-size: 26px; font-weight: 700; fill: var(--brand-deep); }
.flow-anim__caption-text { font-size: 22px; fill: var(--ink-soft); }
/* The animation is the point of the panel; its pause control stays out of the way. */
.flow-anim__toggle { min-height: 34px; width: 34px; padding: 0; border-radius: 50%; flex: none; }
.flow-anim__toggle .icon { width: 18px; height: 18px; }
.flow-anim__dash { animation: flow-dash 1.6s linear infinite; }
@keyframes flow-dash { to { stroke-dashoffset: -32; } }
.flow-anim__list { margin: 18px 0 0; padding-left: 1.3em; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.6; columns: 2; column-gap: 32px; }
.flow-anim__list li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 820px) { .flow-anim__list { columns: 1; } }
@media (prefers-reduced-motion: reduce) {
    .flow-anim__dash { animation: none; }
    .flow-anim__token { display: none; }
}

.flow__ref { white-space: nowrap; align-self: flex-start; font-size: var(--text-xs); line-height: var(--leading-snug); background: var(--gold-tint); color: #7a5412; border-radius: 6px; padding: 1px 8px; }


/* Service status — the operator page at /system-status; not shown to the public */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.panel__title { font-size: var(--text-lg); }
.panel__meta { color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-snug); text-align: right; }
.services { list-style: none; margin: 0; padding: 0; }
.service { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); line-height: var(--leading-snug); }
.service:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px var(--muted-tint); }
.dot--up { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-tint); }
.dot--down { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-tint); }
.service__name { font-weight: 700; font-size: var(--text-base); }
.service__purpose { color: var(--ink-soft); font-size: var(--text-sm); }
.service__detail { grid-column: 2 / 4; color: var(--muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.state { font-size: var(--text-xs); line-height: var(--leading-snug); font-weight: 700; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.state--up { background: var(--ok-tint); color: var(--ok); }
.state--down { background: var(--bad-tint); color: var(--bad); }
.state--unconfigured { background: var(--muted-tint); color: var(--muted); }

/* The regulations and laws the system follows, on the public home page */


/* Sign-in */
.auth { padding-block: 56px 64px; background: linear-gradient(180deg, var(--brand-tint), var(--paper)); }
.auth__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 48px; align-items: center; }
.auth__intro h1 { font-size: var(--text-2xl); color: var(--brand-deep); margin-top: 4px; }
.auth__intro p { font-size: var(--text-md); color: var(--ink-soft); margin-top: 12px; max-width: 44ch; }
.auth__points { margin: 20px 0 0; padding-left: 1.2em; color: var(--ink-soft); font-size: var(--text-sm); line-height: var(--leading-body); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px 26px; }
.form-title { font-size: var(--text-xl); }
.field { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.field label { font-weight: 700; font-size: var(--text-sm); line-height: var(--leading-snug); }
.field input {
    font: inherit; font-size: var(--text-base); line-height: 1.4; color: var(--ink); background: #fff;
    min-height: 50px; padding: 6px 14px; border: 1px solid #cdc7b6; border-radius: 10px;
}
.field input:focus { border-color: var(--brand); outline: 3px solid rgba(31, 58, 110, .2); outline-offset: 0; }
.field__hint { font-size: var(--text-xs); color: var(--muted); line-height: var(--leading-snug); }
.alert { margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: var(--bad-tint); color: var(--bad); border: 1px solid #f0c4bf; font-size: var(--text-sm); line-height: 1.5; }
.form-note { margin-top: 16px; font-size: var(--text-xs); color: var(--muted); line-height: 1.5; }

/* Workspace */
.workspace-head { padding-block: 40px 8px; background: linear-gradient(180deg, var(--brand-tint), var(--paper)); }
.workspace-head h1 { font-size: var(--text-2xl); color: var(--brand-deep); margin-top: 2px; }
.workspace-head__meta { color: var(--ink-soft); margin-top: 8px; }
.workspace-head__positions { margin-top: 12px; }
.section--compact { padding-block: 24px 48px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border-top: 3px solid var(--gold); grid-column: 1 / -1; }
.stat__value { font-size: var(--text-3xl); font-weight: 700; line-height: 1.05; color: var(--brand-deep); }
.stat__label { font-size: var(--text-md); font-weight: 700; line-height: var(--leading-snug); margin-top: 4px; }
.stat__note { font-size: var(--text-sm); color: var(--muted); margin-top: 2px; }

/* Page chrome for app pages */
.page-head { padding-block: 32px 12px; background: linear-gradient(180deg, var(--brand-tint), var(--paper)); }
.page-head__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.page-head__title { font-size: var(--text-2xl); color: var(--brand-deep); margin-top: 2px; }
.page-head__lead { color: var(--ink-soft); margin-top: 6px; max-width: 64ch; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.button--secondary { background: var(--surface); color: var(--brand); border: 1px solid #c9d3e6; }
.button--secondary:hover, .button--secondary:focus-visible { background: var(--brand-tint); color: var(--brand-deep); }
.button--danger { background: var(--bad); }
.button--danger:hover, .button--danger:focus-visible { background: #8f1d17; }
.flash { margin-top: 16px; padding: 10px 16px; border-radius: 10px; font-size: var(--text-sm); line-height: 1.5; border: 1px solid; }
.flash--success { background: var(--ok-tint); color: #145c38; border-color: #b9e0c9; }
.flash--error { background: var(--bad-tint); color: var(--bad); border-color: #f0c4bf; }
.flash--warning { background: #fff6e0; color: #7a5200; border-color: #f0d9a0; }
.registry-check { font-size: 1.35rem; font-weight: 700; line-height: 1.5; padding: 0.75rem 1rem; border: 2px solid #c9a227; border-radius: 8px; background: #fffbef; }
.list-meta { color: var(--muted); font-size: var(--text-sm); margin: 12px 0; }
.empty { background: var(--surface); border: 1px dashed #cfc9b8; border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-soft); }
.empty strong { display: block; font-size: var(--text-md); color: var(--ink); }

/* Badges */
.badge { display: inline-block; font-size: var(--text-xs); font-weight: 700; line-height: 1.35; padding: 0 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge--urgent { background: #fff1d6; color: #8a5a00; }
.badge--very_urgent { background: #ffe0cc; color: #9a3d00; }
.badge--most_urgent { background: var(--bad); color: #fff; }
.badge--cancelled { background: var(--muted-tint); color: var(--muted); }

/* Forms */
.input { font: inherit; font-size: var(--text-base); line-height: 1.4; color: var(--ink); background: #fff; width: 100%; min-height: 48px; padding: 6px 12px; border: 1px solid #cdc7b6; border-radius: 10px; }
textarea.input { min-height: 0; resize: vertical; }
select.input { padding-right: 32px; }
.input:focus { border-color: var(--brand); outline: 3px solid rgba(31, 58, 110, .2); outline-offset: 0; }
.field__label { font-weight: 700; font-size: var(--text-sm); line-height: var(--leading-snug); }
.field--error .input { border-color: var(--bad); }
.field__error { color: var(--bad); font-size: var(--text-xs); line-height: var(--leading-snug); }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 20px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid__wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.form-aside .facts-list, .facts-list--padded { padding: 12px 20px 16px; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.field--inline { margin-top: 0; }
.field--grow { flex: 1 1 280px; }
.steps { margin: 0; padding: 12px 20px 16px 44px; font-size: var(--text-sm); line-height: 1.5; color: var(--ink-soft); }
.steps li + li { margin-top: 6px; }
.mail-body { margin: 0 20px 18px; padding: 12px 14px; background: var(--paper); border-radius: 10px; font-size: var(--text-sm); line-height: 1.5; max-height: 320px; overflow: auto; }

/* Definition lists */
.facts-list { margin: 0; }
.facts-list dt { font-size: var(--text-xs); color: var(--muted); font-weight: 700; margin-top: 10px; line-height: var(--leading-snug); }
.facts-list dt:first-child { margin-top: 0; }
.facts-list dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.facts-list--grid { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 8px 16px; }
.facts-list--grid dt { margin-top: 0; padding-top: 3px; }
.card__title { font-size: var(--text-lg); margin-bottom: 14px; }
details > summary.card__title { cursor: pointer; margin-bottom: 4px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; }

/* Intake */
.intake-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.intake-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; align-items: start; }
.intake-item__subject { font-size: var(--text-md); line-height: var(--leading-snug); margin-top: 4px; }
.intake-item__meta { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; }
.intake-item__hint { font-size: var(--text-sm); margin-top: 4px; }
.intake-item__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 220px; }
.dismiss summary { cursor: pointer; color: var(--bad); font-size: var(--text-sm); text-align: right; }
.dismiss__form { display: grid; gap: 8px; margin-top: 8px; width: min(320px, 70vw); }
.danger-zone summary { cursor: pointer; color: var(--bad); list-style: none; }
.danger-zone__form { display: grid; gap: 8px; padding: 0 20px 18px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs__item { padding: 4px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); font-size: var(--text-sm); }
.tabs__item.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

/* Forwarding */
.forward-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.checks { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.checks legend { margin-bottom: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: var(--text-sm); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.table-wrap--flat { box-shadow: none; border: 1px solid var(--line); }

/* Administration */
.chip--small { font-size: var(--text-xs); padding: 0 10px; margin: 0 4px 4px 0; display: inline-block; }
.unit-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.unit-row .input { flex: 1 1 240px; }
.workspace-head__links { margin-top: 6px; font-size: var(--text-sm); }

/* MFA */
.mfa-qr { display: block; width: 220px; height: 220px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mfa-secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; letter-spacing: .08em; background: var(--paper); padding: 8px 12px; border-radius: 8px; overflow-wrap: anywhere; }
.input--code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem; letter-spacing: .25em; max-width: 14ch; }
.recovery-codes { columns: 2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; line-height: 1.9; padding-left: 1.6em; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.45; }
.table th { text-align: left; font-size: var(--text-xs); color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; background: #fbfaf6; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-weight: 700; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table tr.is-cancelled td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(110, 117, 137, .5); }
.table tr.is-cancelled td .badge { text-decoration: none; }
.register-table { min-width: 1100px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pager a, .pager__current { min-width: 40px; text-align: center; padding: 2px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.pager__current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 12px 20px 16px; }
.timeline__item { position: relative; padding: 0 0 12px 18px; border-left: 2px solid var(--line); line-height: 1.45; }
.timeline__item::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__meta, .timeline__reason { display: block; color: var(--muted); font-size: var(--text-xs); }
.timeline__changes { margin: 4px 0 0; padding-left: 18px; font-size: var(--text-xs); color: var(--ink-soft); }

/* Print (แบบที่ ๑๓) */
.print-sheet { padding-block: 24px; }
.print-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.print-title { text-align: center; font-size: var(--text-xl); }
.print-subtitle { text-align: center; color: var(--ink-soft); margin-bottom: 14px; }
.print-table { width: 100%; border-collapse: collapse; background: #fff; font-size: var(--text-sm); line-height: 1.3; }
.print-table th, .print-table td { border: 1px solid #333; padding: 4px 6px; vertical-align: top; }
.print-table th { font-weight: 700; text-align: center; }
.print-table .num { text-align: center; }
.print-empty { text-align: center; color: var(--muted); padding: 24px; }
/* Cover sheets of classified letters (M10) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.card__meta { color: var(--ink-soft); font-size: var(--text-sm); line-height: var(--leading-snug); margin: 6px 0 0; }
.card__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.field--wide { grid-column: 1 / -1; }
.muted { color: var(--muted); }

@media print {
    .icon, .icon-sprite, .site-nav__arrow { display: none; }
    @page { size: A4 landscape; margin: 1.2cm; }
    html { font-size: 11pt; }
    body { background: #fff; }
    .site-header, .site-footer, .skip-link, .no-print { display: none !important; }
    .container { max-width: none; padding-inline: 0; }
    .print-sheet { padding-block: 0; }
    .print-table { font-size: 14pt; }
    .print-table thead { display: table-header-group; }
    .print-table tr { page-break-inside: avoid; }
}

/* Footer */
.site-footer { background: var(--brand-deep); color: #c8d3ea; margin-top: 40px; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 24px; padding-block: 24px; flex-wrap: wrap; }
.site-footer strong { color: #fff; font-size: var(--text-md); line-height: var(--leading-snug); }
.site-footer p { margin-top: 4px; font-size: var(--text-sm); line-height: 1.5; max-width: 68ch; }
.site-footer__meta { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--text-sm); line-height: var(--leading-snug); }

/* Legal pages (/privacy, /terms) and footer links */
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: var(--text-sm); }
.site-footer__links a { color: #fff; }
.legal { max-width: 820px; }
.legal h2 { font-size: var(--text-lg); margin-top: 24px; color: var(--brand-deep); }
.legal p, .legal li { line-height: var(--leading-body); color: var(--ink-soft); margin-top: 8px; }
.legal-draft { background: var(--gold-tint); border: 1px solid #ecd9ae; color: #7a5412; font-weight: 700; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; }

/* Error page */
.error-page { padding-block: 72px; text-align: center; }
.error-page__code { font-size: 5rem; font-weight: 700; color: var(--brand); line-height: 1; }
.error-page__title { font-size: var(--text-2xl); margin: 12px 0; }
.error-page p { color: var(--ink-soft); margin: 6px auto; max-width: 52ch; }
.error-page .button { margin-top: 20px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 1080px) {
}
@media (max-width: 820px) {
    .auth__grid, .workspace-grid, .form-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .form-grid, .facts-list--grid { grid-template-columns: minmax(0, 1fr); }
    .intake-item { grid-template-columns: minmax(0, 1fr); }
    .intake-item__actions { align-items: flex-start; }
    .dismiss summary { text-align: left; }
    .auth { padding-block: 32px 48px; }
}
@media (max-width: 560px) {
    html { font-size: 125%; } /* 20 px root on phones */
    .brand__subtitle, .user-chip__org { display: none; }
    .card { padding: 22px 18px; }
    .section__title { font-size: var(--text-xl); }
    .site-footer__meta { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ---- M02 เสนอและเกษียน ---- */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.thread__item { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: .75rem 1rem; background: var(--surface); }
.thread__item--propose, .thread__item--forward { border-left-color: var(--gold); }
.thread__item--return, .thread__item--recall { border-left-color: var(--bad); }
.thread__item--approve, .thread__item--acknowledge { border-left-color: var(--ok); }
.thread__head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--ink-soft); }
.thread__kind { font-weight: 700; color: var(--ink); }
.thread__time { margin-left: auto; }
.thread__body { margin: .4rem 0 0; line-height: var(--leading-body); white-space: normal; }
.thread__sign { display: flex; flex-direction: column; align-items: flex-end; margin-top: .5rem; font-size: var(--text-sm); line-height: var(--leading-snug); text-align: right; }
.thread__name { font-weight: 600; }
.thread__title { color: var(--ink-soft); }
.routing-status, .case-status { margin: 1rem 0 .5rem; line-height: var(--leading-snug); }
.desk-group { display: flex; align-items: center; gap: .5rem; margin: 1.5rem 0 .75rem; font-size: var(--text-lg); line-height: var(--leading-tight); }
.desk-group__count { min-width: 1.8em; padding: 0 .5em; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-size: var(--text-sm); text-align: center; }
.decision__body { display: grid; gap: 1rem; padding: 1rem 1.25rem 1.25rem; margin: 0; }
.decision__forward { border: 1px dashed var(--line); border-radius: 10px; padding: .75rem; margin: 0; display: grid; gap: .5rem; }
.badge--ok { background: var(--ok-tint); color: var(--ok); }
.file-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.file-list__item { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.file-list__name { font-weight: 600; overflow-wrap: anywhere; }
.file-list__meta { font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--ink-soft); }
.stamp-permanent { color: var(--bad); }
.stamp-keep { color: var(--brand); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tile a { display: block; padding: .9rem 1rem; text-decoration: none; color: inherit; }
.tile--alert { border-color: var(--bad); }
.tile__value { display: block; font-size: var(--text-2xl); line-height: var(--leading-tight); font-weight: 700; color: var(--brand); }
.tile--alert .tile__value { color: var(--bad); }
.tile__label { display: block; font-weight: 600; }
.tile__note { display: block; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--ink-soft); }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--brand); min-width: 2px; margin-bottom: 3px; }
.bar--out { background: var(--gold); }
.bell { display: inline-flex; align-items: center; gap: .35rem; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: inherit; text-decoration: none; font-size: var(--text-sm); }
.bell__count { min-width: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--gold); color: #1a2238; font-weight: 700; text-align: center; }


/* ตัวอย่างไฟล์ PDF ในหน้าประทับตรารับ (FR-04-22) — สูงพอให้เห็นครึ่งหน้ากระดาษโดยไม่ดันฟอร์มตกจอ */
.pdf-preview {
    width: 100%;
    height: 60vh;
    min-height: 320px;
    border: 1px solid var(--line, #d5d8dd);
    border-radius: 6px;
    background: #fff;
}

/* ผังตำแหน่งตรารับที่ประทับแล้ว (หน้า A4 ย่อส่วน) ให้เลือกที่ว่างได้โดยไม่ทับตราเดิม */
.stamp-map { display: flex; flex-wrap: wrap; gap: 12px; }
.stamp-map__page {
    position: relative;
    width: 126px;
    aspect-ratio: 210 / 297;
    border: 1px solid var(--line, #d5d8dd);
    background: #fff;
}
.stamp-map__caption { font-size: 0.8rem; text-align: center; }
.stamp-map__box {
    position: absolute;
    border: 1px solid #8a1c1c;
    background: rgba(138, 28, 28, 0.12);
    font-size: 0.55rem;
    line-height: 1.1;
    overflow: hidden;
}

/* หน้าวางตรารับ: ภาพหน้ากระดาษจริงและกรอบตราที่ลากวางได้ ตำแหน่งเป็นร้อยละของหน้า จึงย่อขยายตามจอได้ */
.stamp-canvas {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 210 / 297;
    border: 1px solid var(--line, #d5d8dd);
    background: #fff;
    touch-action: none;
    user-select: none;
    overflow: hidden;
}
.stamp-canvas__page { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp-canvas__locked-box {
    position: absolute;
    border: 1px solid #8a1c1c;
    background: rgba(138, 28, 28, 0.15);
    color: #8a1c1c;
    font-size: 0.6rem;
    line-height: 1.1;
    overflow: hidden;
    pointer-events: none;
}
.stamp-canvas__box {
    position: absolute;
    border: 2px solid #1d4ed8;
    background: rgba(29, 78, 216, 0.15);
    cursor: grab;
    touch-action: none;
}
.stamp-canvas__box:active { cursor: grabbing; }
.stamp-canvas__box:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.stamp-canvas__box.is-overlap { border-color: #b91c1c; background: rgba(185, 28, 28, 0.3); }

/* โหมดเต็มจอของหน้าวางตรา: หน้าต่างคลุมทั้งจอ (position: fixed) ใช้ได้แม้เบราว์เซอร์ไม่มี Fullscreen API */
.stamp-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stamp-preview-head .button, .stamp-fs .button { padding: 6px 12px; font-size: 0.9rem; min-height: 36px; }
.stamp-fs-lock, .stamp-fs-lock body { overflow: hidden; }
.stamp-fs {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background: #2b3038;
    animation: stamp-fs-in 0.15s ease-out;
}
.stamp-fs[hidden] { display: none; }
@keyframes stamp-fs-in { from { opacity: 0; } to { opacity: 1; } }
.stamp-fs__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line, #d5d8dd);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.stamp-fs__title { margin: 0; font-size: 1rem; flex: 1 1 100%; }
.stamp-fs__field { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.stamp-fs__field .input { width: 5.5em; padding: 4px 8px; min-height: 0; height: 36px; }
.stamp-fs__coords { font-variant-numeric: tabular-nums; font-size: 0.9rem; min-width: 14em; }
.stamp-fs__group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.stamp-fs__group [aria-pressed="true"] { background: var(--brand, #1d4ed8); color: #fff; border-color: var(--brand, #1d4ed8); }
.stamp-fs__alert { margin: 0; color: #b91c1c; font-weight: 600; font-size: 0.9rem; flex: 1 1 100%; }
.stamp-fs__viewport { flex: 1 1 auto; overflow: auto; padding: 16px; }
.stamp-fs__viewport .stamp-canvas { margin: 0 auto; }
@media (min-width: 768px) { .stamp-fs__title { flex: 0 1 auto; } }
@media (prefers-reduced-motion: reduce) { .stamp-fs { animation: none; } }

/* ==========================================================================
   หน้าแรกสาธารณะ (landing) — ทุกกฎอยู่ใต้ .lp / .lp-* จึงไม่กระทบหน้าอื่น
   กรมท่าเข้ม + ทอง บนพื้นกระดาษอุ่น ลายกนกวาดด้วย SVG ไม่ใช้ตราครุฑ และไม่โหลดฟอนต์หรือไลบรารีภายนอก
   ========================================================================== */
.lp {
    --lp-navy-950: #0c1a38;
    --lp-navy-900: #132850;
    --lp-navy-800: #1f3a6e;
    --lp-navy-100: #e8eef8;
    --lp-gold: #c9962f;
    --lp-gold-bright: #e0b458;
    --lp-gold-ink: #86600f;      /* ทองสำหรับตัวอักษรบนพื้นสว่าง (AA) */
    --lp-gold-tint: #fbf3e2;
    --lp-paper: #f7f5ef;
    --lp-sand: #f0ebde;
    --lp-line: #e6e0cf;
    --lp-ink: #1a2238;
    --lp-ink-soft: #4a5368;
    --lp-on-dark: #d9e2f3;
    --lp-radius: 18px;
    --lp-shadow-sm: 0 1px 2px rgba(12, 26, 56, .06), 0 4px 14px rgba(12, 26, 56, .06);
    --lp-shadow-lg: 0 2px 6px rgba(12, 26, 56, .08), 0 24px 60px -12px rgba(12, 26, 56, .28);
    --lp-space: clamp(56px, 7vw, 104px);
    overflow-x: clip;
}
.site-main:has(> .lp) + .site-footer { margin-top: 0; background: #0c1a38; border-top: 1px solid rgba(255, 255, 255, .08); }
.lp h2, .lp h3 { margin: 0; }
.lp p { margin: 0; }

/* Buttons */
.lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 6px 30px;
    border-radius: 14px; font: inherit; font-size: var(--text-md); font-weight: 700; line-height: 1.3; text-decoration: none;
    border: 1px solid transparent; transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.lp-btn--gold { background: linear-gradient(180deg, var(--lp-gold-bright), var(--lp-gold)); color: var(--lp-navy-950); box-shadow: 0 8px 24px -8px rgba(201, 150, 47, .7); }
.lp-btn--gold:hover, .lp-btn--gold:focus-visible { background: #ecc36b; color: var(--lp-navy-950); }
.lp-btn--glass { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .4); }
.lp-btn--glass:hover, .lp-btn--glass:focus-visible { background: rgba(255, 255, 255, .14); border-color: #fff; }
.lp-btn--navy { background: var(--lp-navy-800); color: #fff; }
.lp-btn--navy:hover, .lp-btn--navy:focus-visible { background: var(--lp-navy-950); }
.lp :focus-visible { outline: 3px solid var(--lp-gold-bright); outline-offset: 3px; }

/* Section rhythm */
.lp-section { padding-block: var(--lp-space); }
.lp-section--tight { padding-top: 0; }
.lp-band--white { background: #fff; }
.lp-band--paper { background: var(--lp-paper); }
.lp-band--sand { background: var(--lp-sand); }
.lp-band > .section { padding-block: var(--lp-space); }
.lp-head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 760px; }
.lp-head--center { margin-inline: auto; text-align: center; }
.lp-head--center .lp-lead { margin-inline: auto; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--lp-gold-ink); font-weight: 700; font-size: var(--text-sm); line-height: 1.4; letter-spacing: .03em; }
.lp-eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.lp-title { margin-top: 6px !important; font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.55rem); line-height: 1.25; color: var(--lp-navy-950); letter-spacing: -.005em; }
.lp-lead { margin-top: 10px !important; color: var(--lp-ink-soft); font-size: var(--text-md); line-height: 1.6; max-width: 60ch; }
.lp-tag { display: inline-block; align-self: flex-start; font-size: var(--text-xs); line-height: 1.4; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: var(--lp-gold-tint); color: var(--lp-gold-ink); border: 1px solid #efdcae; white-space: nowrap; }
.lp-split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.lp-head--side { position: sticky; top: 24px; margin-bottom: 0; }

/* Hero */
.lp-hero {
    position: relative; isolation: isolate; color: #fff; padding-block: clamp(48px, 6vw, 88px) clamp(40px, 5vw, 64px);
    background:
        radial-gradient(900px 520px at 88% 8%, rgba(201, 150, 47, .22), transparent 62%),
        radial-gradient(700px 480px at 0% 100%, rgba(62, 104, 178, .35), transparent 60%),
        linear-gradient(160deg, var(--lp-navy-950) 0%, var(--lp-navy-900) 55%, var(--lp-navy-800) 100%);
}
.lp-hero__motif { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: var(--lp-gold-bright); opacity: .09; -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%); mask-image: linear-gradient(100deg, transparent 20%, #000 75%); }
.lp-hero__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lp-kicker { display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(224, 180, 88, .45); color: #f3dca6; font-size: var(--text-sm); font-weight: 700; line-height: 1.4; }
.lp-hero__title { margin: 18px 0 0; font-size: clamp(2.3rem, 1.3rem + 3.1vw, 3.75rem); line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
.lp-hero__title span { background: linear-gradient(90deg, #f3d489, var(--lp-gold-bright) 60%, #d49d36); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hero__lead { margin-top: 18px !important; font-size: var(--text-md); line-height: 1.65; color: var(--lp-on-dark); max-width: 50ch; }
.lp-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.lp-hero__hint { margin-top: 22px !important; font-size: var(--text-sm); line-height: 1.55; color: #b9c6df; max-width: 52ch; padding-left: 14px; border-left: 3px solid var(--lp-gold); }
.lp-hero__hint strong { color: #fff; }

/* Hero product mockup — layered browser cards built from the real screenshots */
.lp-mock { position: relative; aspect-ratio: 1 / .82; }
.lp-mock__card { position: absolute; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--lp-shadow-lg); border: 1px solid rgba(255, 255, 255, .5); }
.lp-mock__card img { display: block; width: 100%; height: calc(100% - 30px); object-fit: cover; object-position: top left; }
.lp-mock__card--back { top: 0; right: 0; width: 70%; height: 82%; opacity: .92; }
.lp-mock__card--front { left: 0; bottom: 4%; width: 80%; height: 66%; }
.lp-mock__bar { display: flex; gap: 6px; align-items: center; height: 30px; padding-inline: 12px; background: #eef1f6; border-bottom: 1px solid #dde2ea; }
.lp-mock__bar i, .lp-browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #cfd5df; }
.lp-mock__bar i:first-child, .lp-browser__bar i:first-child { background: #e8a39c; }
.lp-mock__bar i:nth-child(2), .lp-browser__bar i:nth-child(2) { background: #ecd08f; }
.lp-mock__badge {
    position: absolute; right: 2%; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px;
    background: #fff; color: var(--lp-ink); border-radius: 14px; box-shadow: var(--lp-shadow-lg); border-left: 4px solid var(--lp-gold);
}
.lp-mock__badge svg { width: 34px; height: 34px; flex: none; color: #1d7a4c; }
.lp-mock__badge span { display: grid; font-size: var(--text-xs); line-height: 1.35; color: var(--lp-ink-soft); }
.lp-mock__badge strong { font-size: var(--text-base); color: var(--lp-navy-950); }

/* Facts strip */
.lp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: clamp(40px, 5vw, 64px) 0 0; border-radius: var(--lp-radius); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lp-fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 20px 26px; }
.lp-fact + .lp-fact { border-left: 1px solid rgba(255, 255, 255, .14); }
.lp-fact dd { margin: 0; font-size: clamp(2.1rem, 1.5rem + 1.6vw, 2.9rem); font-weight: 700; line-height: 1.1; color: var(--lp-gold-bright); }
.lp-fact dt { font-size: var(--text-sm); line-height: 1.4; color: var(--lp-on-dark); }

/* Lifecycle timeline */
.lp-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.lp-timeline::before { content: ""; position: absolute; top: 34px; left: 36px; right: calc((100% - 100px) / 6 - 36px); height: 2px; background: repeating-linear-gradient(90deg, var(--lp-gold) 0 10px, transparent 10px 18px); }
.lp-timeline__step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.lp-timeline__marker { position: relative; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--lp-navy-800); border: 2px solid var(--lp-gold); box-shadow: 0 0 0 8px #fff, var(--lp-shadow-sm); margin-bottom: 10px; transition: background-color .25s, color .25s; }
.lp-timeline__marker svg { width: 30px; height: 30px; }
.lp-timeline__no { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--lp-navy-800); color: #fff; font-size: var(--text-xs); font-weight: 700; line-height: 1; }
.lp-timeline__step:hover .lp-timeline__marker { background: var(--lp-navy-800); color: #fff; }
.lp-timeline__name { font-size: var(--text-lg); line-height: 1.25; color: var(--lp-navy-950); }
.lp-timeline__desc { color: var(--lp-ink-soft); font-size: var(--text-sm); line-height: 1.55; flex: 1; }
.lp-callout { margin-top: clamp(32px, 4vw, 48px) !important; padding: 20px 26px; border-radius: var(--lp-radius); background: linear-gradient(90deg, var(--lp-navy-100), #fff); border-left: 5px solid var(--lp-navy-800); line-height: 1.6; color: var(--lp-ink-soft); }
.lp-callout strong { display: block; color: var(--lp-navy-950); font-size: var(--text-md); }

/* Registers */
.lp-registers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lp-register { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 16px 20px; background: #fff; border-radius: 14px; box-shadow: var(--lp-shadow-sm); border: 1px solid var(--lp-line); transition: transform .2s, box-shadow .2s; }
.lp-register:hover { transform: translateY(-2px); box-shadow: var(--lp-shadow-lg); }
.lp-register__no { grid-row: span 2; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--lp-navy-800); color: #fff; font-weight: 700; font-size: var(--text-md); line-height: 1; box-shadow: inset 0 -3px 0 var(--lp-gold); }
.lp-register__name { font-weight: 700; font-size: var(--text-md); line-height: 1.3; color: var(--lp-navy-950); }
.lp-register__phase { font-size: var(--text-sm); line-height: 1.35; color: var(--lp-gold-ink); }

/* Screens gallery — a grid without JS, tabs with it */
.lp-screens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.lp-screen figure { margin: 0; }
.lp-browser { display: block; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--lp-line); box-shadow: var(--lp-shadow-lg); text-decoration: none; }
.lp-browser__bar { display: flex; gap: 6px; align-items: center; height: 38px; padding-inline: 14px; background: #eef1f6; border-bottom: 1px solid #dde2ea; }
.lp-browser__url { flex: 1; margin-left: 12px; max-width: 420px; padding: 0 14px; border-radius: 999px; background: #fff; color: #6b7386; font-size: var(--text-xs); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-browser__view { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--lp-navy-100); }
.lp-browser__view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s ease; }
.lp-browser:hover img { transform: scale(1.015); }
.lp-screen figcaption { display: grid; gap: 4px; padding: 16px 4px 0; }
.lp-screen figcaption strong { color: var(--lp-navy-950); font-size: var(--text-md); line-height: 1.3; }
.lp-screen figcaption span { color: var(--lp-ink-soft); font-size: var(--text-sm); line-height: 1.55; }
.lp-gallery.is-tabs { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.lp-gallery.is-tabs .lp-screens { display: block; }
.lp-gallery.is-tabs .lp-screen figcaption { display: none; }
.lp-gallery.is-tabs .lp-browser__view { aspect-ratio: 16 / 10.5; }
.lp-gallery__tabs { display: grid; gap: 8px; }
.lp-gallery__tab {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; padding: 14px 16px; text-align: left;
    font: inherit; color: var(--lp-ink); background: transparent; border: 1px solid transparent; border-radius: 14px; cursor: pointer; transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.lp-gallery__tab:hover { background: var(--lp-paper); }
.lp-gallery__tab[aria-selected="true"] { background: #fff; border-color: var(--lp-line); box-shadow: var(--lp-shadow-sm), inset 4px 0 0 var(--lp-gold); }
.lp-gallery__tab-no { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--lp-navy-100); color: var(--lp-navy-800); font-weight: 700; font-size: var(--text-sm); line-height: 1; }
.lp-gallery__tab[aria-selected="true"] .lp-gallery__tab-no { background: var(--lp-navy-800); color: #fff; }
.lp-gallery__tab strong { display: block; font-size: var(--text-md); line-height: 1.3; color: var(--lp-navy-950); }
.lp-gallery__tab small { display: none; margin-top: 4px; font-size: var(--text-sm); line-height: 1.5; color: var(--lp-ink-soft); }
.lp-gallery__tab[aria-selected="true"] small { display: block; }

/* Regulations */
.lp-standards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lp-standard { display: flex; gap: 16px; padding: 22px 24px; background: #fff; border-radius: var(--lp-radius); border: 1px solid var(--lp-line); box-shadow: var(--lp-shadow-sm); }
.lp-standard--main { grid-column: 1 / -1; align-items: center; background: linear-gradient(135deg, var(--lp-navy-900), var(--lp-navy-800)); border-color: transparent; color: var(--lp-on-dark); }
.lp-standard__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--lp-gold-tint); color: var(--lp-gold-ink); }
.lp-standard__icon svg { width: 24px; height: 24px; }
.lp-standard--main .lp-standard__icon { background: rgba(224, 180, 88, .18); color: var(--lp-gold-bright); }
.lp-standard__name { font-size: var(--text-md); line-height: 1.35; color: var(--lp-navy-950); }
.lp-standard--main .lp-standard__name { color: #fff; font-size: var(--text-lg); }
.lp-standard p { margin-top: 6px !important; font-size: var(--text-sm); line-height: 1.55; color: var(--lp-ink-soft); }
.lp-standard--main p { color: var(--lp-on-dark); }

/* Security band */
.lp-band--navy { position: relative; color: var(--lp-on-dark); background: radial-gradient(800px 400px at 100% 0%, rgba(201, 150, 47, .16), transparent 60%), linear-gradient(180deg, var(--lp-navy-950), var(--lp-navy-900)); }
.lp-band--navy .lp-title { color: #fff; }
.lp-band--navy .lp-eyebrow { color: var(--lp-gold-bright); }
.lp-band--navy .lp-lead { color: var(--lp-on-dark); }
.lp-assurances { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lp-assurance { padding: 26px 26px 24px; border-radius: var(--lp-radius); background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .12); transition: background-color .2s, border-color .2s; }
.lp-assurance:hover { background: rgba(255, 255, 255, .08); border-color: rgba(224, 180, 88, .5); }
.lp-assurance__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(224, 180, 88, .14); color: var(--lp-gold-bright); margin-bottom: 16px; }
.lp-assurance__icon svg { width: 28px; height: 28px; }
.lp-assurance h3 { font-size: var(--text-md); line-height: 1.35; color: #fff; }
.lp-assurance p { margin-top: 6px !important; font-size: var(--text-sm); line-height: 1.6; color: #c3cee4; }

/* Onboarding stepper */
.lp-stepper { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.lp-stepper::before { content: ""; position: absolute; top: 30px; left: 12%; right: 12%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--lp-navy-800), var(--lp-gold)); }
.lp-stepper__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 22px 24px; }
.lp-stepper__no { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; background: var(--lp-navy-800); color: #fff; font-size: var(--text-lg); font-weight: 700; line-height: 1; box-shadow: 0 0 0 6px #fff, 0 0 0 8px var(--lp-gold); }
.lp-stepper__item:last-child .lp-stepper__no { background: var(--lp-gold); color: var(--lp-navy-950); }
.lp-stepper__item h3 { font-size: var(--text-md); line-height: 1.3; color: var(--lp-navy-950); }
.lp-stepper__item p { font-size: var(--text-sm); line-height: 1.55; color: var(--lp-ink-soft); flex: 1; }
.lp-stepper__item .lp-tag { align-self: center; }

/* FAQ */
.lp-faq { display: grid; gap: 12px; }
.lp-faq__item { background: #fff; border: 1px solid var(--lp-line); border-radius: 14px; box-shadow: var(--lp-shadow-sm); transition: border-color .2s; }
.lp-faq__item[open] { border-color: #d9c28b; }
.lp-faq__item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 22px; cursor: pointer; font-weight: 700; font-size: var(--text-md); line-height: 1.35; color: var(--lp-navy-950); border-radius: 14px; }
.lp-faq__item summary::-webkit-details-marker { display: none; }
.lp-faq__item summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--lp-navy-100); color: var(--lp-navy-800); font-size: 1.2rem; line-height: 1; transition: transform .2s, background-color .2s; }
.lp-faq__item[open] summary::after { content: "−"; background: var(--lp-gold); color: var(--lp-navy-950); }
.lp-faq__item p { padding: 0 22px 20px; color: var(--lp-ink-soft); line-height: 1.65; }

/* Manual note */
.lp-manual { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 26px 30px; border-radius: var(--lp-radius); background: #fff; border: 1px solid var(--lp-line); box-shadow: var(--lp-shadow-sm); }
.lp-manual__icon { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: var(--lp-gold-tint); color: var(--lp-gold-ink); }
.lp-manual__icon svg { width: 30px; height: 30px; }
.lp-manual__text { flex: 1 1 360px; }
.lp-manual__text h2 { font-size: var(--text-lg); color: var(--lp-navy-950); line-height: 1.3; }
.lp-manual__text p { margin-top: 4px !important; color: var(--lp-ink-soft); font-size: var(--text-sm); line-height: 1.6; }

/* Closing CTA */
.lp-cta { position: relative; color: #fff; padding-block: clamp(48px, 6vw, 80px); background: radial-gradient(700px 300px at 15% 0%, rgba(224, 180, 88, .22), transparent 65%), linear-gradient(120deg, var(--lp-navy-900), var(--lp-navy-800)); border-top: 4px solid var(--lp-gold); }
.lp-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.lp-cta h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.25; }
.lp-cta p { margin-top: 8px !important; color: var(--lp-on-dark); font-size: var(--text-md); }
.lp-cta p a { color: var(--lp-gold-bright); font-weight: 700; text-underline-offset: 3px; }
.lp-cta p a:hover, .lp-cta p a:focus-visible { color: #fff; }
.lp-cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Motion — only for people who have not asked for less */
@media (prefers-reduced-motion: no-preference) {
    .lp-hero__copy { animation: lp-rise .7s ease-out both; }
    .lp-mock__card--back { animation: lp-rise .8s .1s ease-out both; }
    .lp-mock__card--front { animation: lp-rise .8s .2s ease-out both; }
    .lp-mock__badge { animation: lp-rise .8s .35s ease-out both, lp-float 6s 1.2s ease-in-out infinite; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lp-float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
    .lp *, .lp *::before, .lp *::after { transition: none !important; }
}

/* Responsive */
@media (max-width: 1080px) {
    .lp-timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
    .lp-timeline::before { display: none; }
    .lp-standards, .lp-assurances { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-gallery.is-tabs { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .lp-hero__grid, .lp-split, .lp-gallery.is-tabs { grid-template-columns: minmax(0, 1fr); }
    .lp-mock { max-width: 620px; width: 100%; margin-inline: auto; }
    .lp-head--side { position: static; margin-bottom: 28px; }
    .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-fact:nth-child(3) { border-left: 0; }
    .lp-fact:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .14); }
    .lp-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
    .lp-stepper::before { display: none; }
    .lp-gallery__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-gallery__tab small, .lp-gallery__tab[aria-selected="true"] small { display: none; }
    .lp-gallery.is-tabs .lp-screen figcaption { display: grid; }
}
@media (max-width: 640px) {
    .lp-timeline, .lp-registers, .lp-screens, .lp-standards, .lp-assurances, .lp-stepper { grid-template-columns: minmax(0, 1fr); }
    .lp-timeline { row-gap: 0; }
    .lp-timeline__step { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; padding-bottom: 26px; }
    .lp-timeline__step > :not(.lp-timeline__marker) { grid-column: 2; }
    .lp-timeline__step .lp-tag { justify-self: start; }
    .lp-timeline__marker { grid-row: span 3; width: 60px; height: 60px; margin: 0; box-shadow: var(--lp-shadow-sm); }
    .lp-timeline__step:not(:last-child)::before { content: ""; position: absolute; left: 29px; top: 66px; bottom: 4px; width: 2px; background: repeating-linear-gradient(180deg, var(--lp-gold) 0 8px, transparent 8px 14px); }
    .lp-stepper__item { display: grid; grid-template-columns: 62px minmax(0, 1fr); column-gap: 18px; text-align: left; align-items: start; padding: 0; }
    .lp-stepper__item > :not(.lp-stepper__no) { grid-column: 2; }
    .lp-stepper__no { grid-row: span 3; width: 52px; height: 52px; margin: 4px 0 0 4px; font-size: var(--text-md); }
    .lp-stepper__item .lp-tag { align-self: start; justify-self: start; }
    .lp-hero__actions .lp-btn, .lp-cta__actions .lp-btn { flex: 1 1 100%; }
    .lp-mock { aspect-ratio: 1 / .9; }
    .lp-mock__badge { right: 0; padding: 8px 12px; }
    .lp-fact { padding: 16px 18px; }
    .lp-gallery__tabs { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .lp-gallery__tab { padding: 10px 12px; }
    .lp-browser__bar { height: 30px; }
    .lp-manual { padding: 22px 20px; }
    .lp-kicker { font-size: var(--text-xs); }
}
