/* Bolbase site styles. Served with a content-hash URL via asset(); see static_cache_headers. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Light theme: the F2 stamp in navy on warm paper. */
:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --bg-alt: #f3efe6;
  --fg: #14233a;
  --muted: #56606e;
  --border: #e3ddd1;
  --accent: #1e3a5f;
  --accent-fg: #f7f2e8;
  --accent-soft: #e4eaf2;
  --card: #ffffff;
  --error: #b42318;
  --success-bg: #e7f6ec;
  --success-fg: #1a6b3a;
  --chip-blue: #dbe6f3;   --chip-blue-fg: #1e3a5f;
  --chip-amber: #fbeed3;  --chip-amber-fg: #7a4f00;
  --chip-violet: #ece6ff; --chip-violet-fg: #5b3cc4;
  --chip-green: #dcf3e5;  --chip-green-fg: #1a6b3a;
  --shadow: 0 10px 30px rgba(20, 35, 58, 0.08);
}

/* Dark theme: the F2 stamp in cream on deep navy. Same values twice: chosen theme, or device setting without JS. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1524;
  --bg-alt: #101f33;
  --fg: #efe9dd;
  --muted: #a7b1bf;
  --border: #22354d;
  --accent: #f3ead8;
  --accent-fg: #14233a;
  --accent-soft: #1a2c45;
  --card: #12233a;
  --error: #ff8a80;
  --success-bg: #12301f;
  --success-fg: #8fe0ad;
  --chip-blue: #1c3354;   --chip-blue-fg: #a9c5ea;
  --chip-amber: #3a2c0c;  --chip-amber-fg: #f3c56b;
  --chip-violet: #2a2150; --chip-violet-fg: #c3b2ff;
  --chip-green: #133322;  --chip-green-fg: #8fe0ad;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b1524;
    --bg-alt: #101f33;
    --fg: #efe9dd;
    --muted: #a7b1bf;
    --border: #22354d;
    --accent: #f3ead8;
    --accent-fg: #14233a;
    --accent-soft: #1a2c45;
    --card: #12233a;
    --error: #ff8a80;
    --success-bg: #12301f;
    --success-fg: #8fe0ad;
    --chip-blue: #1c3354;   --chip-blue-fg: #a9c5ea;
    --chip-amber: #3a2c0c;  --chip-amber-fg: #f3c56b;
    --chip-violet: #2a2150; --chip-violet-fg: #c3b2ff;
    --chip-green: #133322;  --chip-green-fg: #8fe0ad;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

/* Theme-specific logo: navy stamp on light, outlined stamp on dark. */
.logo-dark, .icon-sun { display: none; }
:root[data-theme="dark"] .logo-light, :root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .logo-dark, :root[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-light, :root:not([data-theme]) .icon-moon { display: none; }
  :root:not([data-theme]) .logo-dark, :root:not([data-theme]) .icon-sun { display: block; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }

/* Column layout keeps the footer at the bottom of the screen on short pages. */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
section[id] { scroll-margin-top: 4.5rem; }

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; font-family: "Fraunces", Georgia, serif; font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-top: 0.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 46rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.85em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 4rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px;
  color: var(--fg); text-decoration: none; flex-shrink: 0;
}
.brand-mark { width: 40px; height: 40px; }
.wordmark { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.4rem; letter-spacing: -0.01em; }
.footer-inner .brand { min-height: 0; gap: 0.45rem; }
.footer-inner .brand-mark { width: 28px; height: 28px; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: 0.6rem;
  background: transparent; color: var(--fg); cursor: pointer;
}
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle .icon { width: 1.25rem; height: 1.25rem; }

/* Mobile menu (a <details> element, so it works without JS) */
.mobile-menu { display: none; }
.mobile-menu summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 0.6rem; cursor: pointer; color: var(--fg);
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary:hover { background: var(--bg-alt); }
.mobile-menu summary .icon { width: 1.5rem; height: 1.5rem; }
.mobile-menu .icon-close, .mobile-menu[open] .icon-open { display: none; }
.mobile-menu[open] .icon-close { display: block; }
.mobile-menu-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  display: grid; padding: 0.25rem 1rem 1.25rem;
  background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  max-height: calc(100dvh - 4rem); overflow-y: auto;
}
.mobile-menu-panel a:not(.btn) {
  display: flex; align-items: center; min-height: 52px;
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-panel .btn { margin-top: 1rem; }
.brand-sm .wordmark { font-size: 1.1rem; }
.nav-links { display: flex; gap: 1.25rem; margin-left: 0.5rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--fg); }
.nav-actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: 0.6rem; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--border); color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--bg-alt); }

/* Flash */
.flashes { padding-top: 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: 0.6rem; background: var(--accent-soft); }
.flash-success { background: var(--success-bg); color: var(--success-fg); }
.flash-error { background: color-mix(in srgb, var(--error) 15%, var(--bg)); color: var(--error); }

/* Hero */
.hero { padding: 4.5rem 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); letter-spacing: -0.02em; margin: 0.5rem 0 1rem; }
.eyebrow {
  color: var(--accent); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.78rem;
}
.lede { color: var(--muted); font-size: 1.15rem; max-width: 34rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Product mock */
.mock {
  margin: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 0.9rem; box-shadow: var(--shadow); overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-alt);
}
.mock-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--border); }
.mock-title { margin-left: 0.6rem; font-weight: 600; font-size: 0.9rem; }
.mock-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mock-table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0.7rem 1rem;
}
.mock-table td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); white-space: nowrap; }
.mock figcaption {
  padding: 0.5rem 1rem; font-size: 0.75rem; color: var(--muted);
  border-top: 1px solid var(--border); text-align: right;
}
.mock-bl { display: none; }
.chip { white-space: nowrap; display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.chip-blue { background: var(--chip-blue); color: var(--chip-blue-fg); }
.chip-amber { background: var(--chip-amber); color: var(--chip-amber-fg); }
.chip-violet { background: var(--chip-violet); color: var(--chip-violet-fg); }
.chip-green { background: var(--chip-green); color: var(--chip-green-fg); }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-lede { color: var(--muted); font-size: 1.1rem; margin-top: 0.75rem; max-width: 40rem; }
.grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card, .feature {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0.8rem; padding: 1.4rem;
}
.card p, .feature p { color: var(--muted); margin-top: 0.5rem; font-size: 0.97rem; }
.feature h3::before {
  content: ""; display: block; width: 2rem; height: 0.25rem;
  border-radius: 1rem; background: var(--accent); margin-bottom: 0.9rem;
}

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
}
.steps li { border-top: 2px solid var(--border); padding-top: 1rem; }
.step-num {
  display: inline-flex; width: 2rem; height: 2rem; border-radius: 50%;
  align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 0.75rem;
}
.steps p { color: var(--muted); font-size: 0.93rem; margin-top: 0.4rem; }

/* FAQ */
.faq { margin-top: 2rem; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 1.1rem 0; min-height: 44px; }
.faq details p { color: var(--muted); margin: -0.4rem 0 1.1rem; }

/* Forms */
.form { margin-top: 2rem; display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--border); border-radius: 0.55rem; padding: 0.65rem 0.8rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.field-error { color: var(--error); font-size: 0.87rem; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Auth + account */
.nav-signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem;
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav-signin:hover { color: var(--accent); }
.muted { color: var(--muted); }
.icon { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }
.auth-card {
  max-width: 26rem; margin: 0 auto; background: var(--card);
  border: 1px solid var(--border); border-radius: 1rem; padding: 2rem; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.auth-buttons { display: grid; gap: 0.7rem; margin-top: 1.5rem; }
.btn-provider {
  justify-content: center; background: var(--card); color: var(--fg);
  border-color: var(--border); width: 100%;
}
.btn-provider:hover { background: var(--bg-alt); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.notice { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 0.6rem; background: var(--accent-soft); font-size: 0.92rem; }
.fine-print { margin-top: 1.25rem; color: var(--muted); font-size: 0.85rem; }
.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: 0.35rem; }
.panel {
  margin: 1.75rem 0; background: var(--card); border: 1px solid var(--border);
  border-radius: 0.9rem; padding: 1.4rem;
}
.panel-title { font-size: 1.15rem; margin: 0 0 0.75rem; }
.methods { list-style: none; margin: 0; padding: 0; }
.methods li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
}
.method-name { display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; font-weight: 600; min-width: 0; }
.method-name .muted, .account-email { overflow-wrap: anywhere; }
.method-name .muted { font-weight: 400; font-size: 0.9rem; }
.method-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.link-btn {
  background: none; border: 0; padding: 0 0.25rem; min-height: 44px;
  font: inherit; color: var(--error); cursor: pointer; font-size: 0.9rem;
}
.link-btn:hover { text-decoration: underline; }

/* Legal pages */
.prose h2 { font-size: 1.2rem; margin: 2.2rem 0 0.6rem; }
.prose p, .prose li { color: var(--fg); line-height: 1.7; }
.prose p + p { margin-top: 0.9rem; }
.prose ul { padding-left: 1.25rem; margin: 0.6rem 0 0; }
.prose li + li { margin-top: 0.45rem; }
.prose > .muted { margin: 0.4rem 0 1.5rem; }

/* Staff workspace */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 0.87rem; }
.chip-red { background: color-mix(in srgb, var(--error) 16%, var(--bg)); color: var(--error); }
.ws { padding-top: 2rem; }
.ws-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.ws-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.9rem;
  color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ws-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.ws-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ws-head .page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.ws-search { display: flex; gap: 0.5rem; margin-bottom: 1rem; max-width: 32rem; }
.ws-search input { flex: 1; min-width: 0; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: 0.55rem; padding: 0.65rem 0.8rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: 0.8rem; background: var(--card); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.data-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0.7rem 0.9rem; white-space: nowrap; }
.data-table td { padding: 0.65rem 0.9rem; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table td a { font-weight: 600; display: inline-flex; min-height: 44px; align-items: center; }
.edit-table td { padding: 0.35rem 0.4rem; }
/* Editable tables fill the container like every other table; min-widths keep columns usable (they scroll on phones). */
.edit-table input { font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--border); border-radius: 0.45rem; padding: 0.5rem 0.55rem; width: 100%; min-width: 9rem; min-height: 44px; }
.edit-table input.w-sm { min-width: 4.5rem; } .edit-table input.w-md { min-width: 6.5rem; } .edit-table input.w-lg { min-width: 14rem; }
.dropzone { position: relative; }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.dropzone-label {
  display: grid; justify-items: center; gap: 0.35rem; text-align: center; cursor: pointer;
  padding: 1.6rem 1rem; min-height: 9rem; align-content: center;
  border: 2px dashed var(--border); border-radius: 0.9rem; background: var(--bg); color: var(--fg);
  transition: border-color 0.15s, background-color 0.15s;
}
.dropzone-label:hover, .dropzone.is-over .dropzone-label { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
.dropzone-input:focus-visible + .dropzone-label { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone-icon { color: var(--muted); }
.dropzone.is-over .dropzone-icon, .dropzone.has-file .dropzone-icon { color: var(--accent); }
.dropzone-title { font-weight: 600; }
.dropzone-pick { text-decoration: underline; text-underline-offset: 3px; }
.dropzone-hint { font-size: 0.87rem; color: var(--muted); }
.dropzone-status { margin: 0.5rem 0 0; font-size: 0.93rem; overflow-wrap: anywhere; }
.dropzone-status:empty { display: none; }
.dropzone-status.is-error { color: var(--error); font-weight: 600; }
.dropzone.has-file .dropzone-label { border-style: solid; border-color: var(--accent); }
.dropzone.is-error .dropzone-label { border-color: var(--error); }
@media (hover: none) { .dz-drag { display: none; } .dropzone-pick { text-transform: capitalize; } }
@media (prefers-reduced-motion: reduce) { .dropzone-label { transition: none; } }
.edit-select { font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
               border-radius: 0.45rem; padding: 0.45rem 0.5rem; min-height: 44px; min-width: 7rem; width: 100%; }
.extras-table td:first-child { width: 36%; }
.extras-table input { width: 100%; min-width: 6rem; }
@media (max-width: 600px) {
  .extras-table thead { display: none; }
  .extras-table tr { display: block; padding: 0.5rem 0.6rem 0.6rem; }
  .extras-table tr + tr { border-top: 1px solid var(--border); }
  .extras-table td, .extras-table td:first-child { display: block; width: auto; border: 0; padding: 0.15rem 0; }
  .extras-table td:first-child input { font-weight: 600; }
}
.intent-choice { border: 0; padding: 0; margin: 0 0 0.25rem; display: grid; gap: 0.15rem; }
.intent-choice legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.intent-choice .radio { align-items: flex-start; padding: 0.35rem 0; }
.intent-choice .radio input { margin-top: 0.15rem; }
.intent-choice .radio small { display: block; color: var(--muted); }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.doc-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; }
.doc-list a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.ws-form { gap: 1.25rem; }
.ws-section { border: 1px solid var(--border); border-radius: 0.9rem; padding: 1.1rem 1.2rem 1.25rem; margin: 0; background: var(--card); min-width: 0; }
.ws-section legend { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.1rem; padding: 0 0.4rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.1rem; margin-top: 0.5rem; }
.form-grid .field-wide { grid-column: span 1; }
.form-grid .field { align-content: start; }
.field input[type="file"] { padding: 0.55rem; }
.ws-danger { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.link-btn-plain { color: var(--accent); }
.ws-subhead { margin: 2.5rem 0 1rem; font-size: 1.4rem; }
.ws-start { margin-top: 1.25rem; }
.ws-start .form { margin-top: 1rem; }
.ws-start form:not(.form) { margin-top: 0.9rem; }
.ws-start-title { font-size: 1.2rem; margin: 0 0 0.3rem; }
.ws-source { margin: 0 0 1.25rem; border: 1px solid var(--border); border-radius: 0.8rem; padding: 0 1rem; background: var(--card); }
.ws-source summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.ws-source pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; margin: 0 0 1rem; }
.progress-line { display: flex; align-items: center; gap: 0.75rem; }
.spinner { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .ws-head .btn { flex: 1 1 auto; }
}

[hidden] { display: none !important; }

/* PDF popup (static/js/pdfviewer.js) */
html.pdf-open { overflow: hidden; }
.pdf-modal { width: min(1100px, 96vw); height: 94vh; max-width: none; max-height: none; padding: 0; border: 1px solid var(--border);
             border-radius: 0.9rem; background: var(--card); color: var(--fg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); overflow: hidden; }
.pdf-modal[open] { display: flex; flex-direction: column; }
.pdf-modal::backdrop { background: rgba(10, 18, 30, 0.62); }
.pdf-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem 0.6rem 1.1rem; border-bottom: 1px solid var(--border); }
.pdf-title { flex: 1; min-width: 0; margin: 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.pdf-actions .btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.pdf-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 0.6rem;
             background: transparent; color: var(--fg); cursor: pointer; }
.pdf-close:hover { background: var(--bg); }
.pdf-body { flex: 1; min-height: 0; background: #525659; overflow: auto; -webkit-overflow-scrolling: touch; }
.pdf-frame { display: block; width: 100%; height: 100%; border: 0; background: #525659; }
.pdf-pages { display: grid; gap: 0.75rem; padding: 0.75rem; justify-items: center; }
.pdf-page { display: block; width: 100%; max-width: 900px; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.pdf-message { color: #f2f2f2; text-align: center; padding: 2rem 1rem; margin: 0; }
@media (max-width: 767px) {
  .pdf-modal { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; margin: 0; }
  .pdf-bar { padding: 0.45rem 0.5rem 0.45rem 0.9rem; gap: 0.4rem; }
  .pdf-actions .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pdf-actions .btn { padding: 0 0.7rem; min-width: 44px; justify-content: center; }
  .pdf-pages { padding: 0.5rem; gap: 0.5rem; }
}

/* Track & trace */
.track-search { max-width: 40rem; }
.track-search input { text-transform: uppercase; font-size: 16px; }
.track-result { margin: 1rem 0 0; }
.track-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.track-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem;
             padding: 0.5rem 0; border-top: 1px solid var(--border); }
.track-row:first-child { border-top: none; }
.track-ref { min-width: 0; overflow-wrap: anywhere; }
.track-ref .mono { font-size: 0.95rem; font-weight: 600; }
.track-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.track-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
.carrier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.carrier-card { display: grid; gap: 0.25rem; padding: 0.9rem 1rem; min-height: 44px; border: 1px solid var(--border); border-radius: 0.8rem;
                background: var(--card); color: var(--fg); text-decoration: none; }
.carrier-card:hover { border-color: var(--accent); }
.carrier-name { font-weight: 600; }
.carrier-card .mono { overflow-wrap: anywhere; }

/* Live tracking */
.live { border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.75rem 0.9rem; margin: 0.5rem 0 1rem; background: var(--bg); }
.live-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; }
.live-number { font-weight: 700; overflow-wrap: anywhere; }
.live-error { color: var(--error); margin: 0.5rem 0 0; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0.75rem 0 0.5rem; }
.live-grid dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.live-grid dd { margin: 0.15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.live-events { border-top: 1px solid var(--border); padding: 0.25rem 0; }
.live-events > summary { cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.timeline { list-style: none; margin: 0.25rem 0 0.5rem; padding: 0 0 0 1rem; border-left: 2px solid var(--border); display: grid; gap: 0.45rem; }
.timeline li { position: relative; display: grid; gap: 0.05rem; font-size: 0.92rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1rem - 5px); top: 0.35rem; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.timeline li.planned { opacity: 0.7; }
.timeline li.planned::before { background: var(--card); border: 2px solid var(--muted); width: 6px; height: 6px; }
.live-refresh { margin-top: 0.25rem; }
.live-start { margin: 0.5rem 0 1rem; }
@media (max-width: 640px) { .live-grid { grid-template-columns: 1fr; } }

/* Admin */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
             margin-left: 0.35rem; border-radius: 999px; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: -0.75rem 0 1.5rem; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.95rem; border-radius: 999px;
               border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.93rem; background: var(--card); }
.admin-nav a[aria-current="page"] { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); }
.admin-nav a[aria-current="page"] .nav-badge { background: var(--accent-fg); color: var(--accent); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.9rem; margin: 0 0 1.5rem; }
.stat { display: grid; gap: 0.2rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 0.9rem; background: var(--card);
        color: var(--fg); text-decoration: none; min-height: 44px; }
a.stat:hover { border-color: var(--accent); }
.stat-num { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat-num small { font-size: 1rem; color: var(--muted); }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.admin-alert { margin-bottom: 1.5rem; border-color: var(--chip-amber-fg); }
.plain-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.25rem; }
.plain-list a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; margin-right: 0.5rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0.75rem 0 1rem; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.inline-form .field { flex: 1 1 16rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; align-items: center; margin: 1rem 0; }
.filter-tabs a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.8rem; border-radius: 0.6rem;
                 color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.filter-tabs a[aria-current="page"] { color: var(--fg); background: var(--card); border: 1px solid var(--border); }
.filter-sep { width: 1px; height: 1.5rem; background: var(--border); margin: 0 0.4rem; }
.idea-list { display: grid; gap: 1rem; }
.idea-head { display: flex; gap: 1rem; align-items: flex-start; }
.idea-main { min-width: 0; flex: 1; }
.idea-title { font-size: 1.15rem; margin: 0.1rem 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.idea-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0.25rem 0 0; }
.vote { display: grid; justify-items: center; align-content: center; gap: 0.1rem; min-width: 3.25rem; min-height: 3.5rem; padding: 0.35rem;
        border: 1px solid var(--border); border-radius: 0.7rem; background: var(--bg); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.vote:hover { border-color: var(--accent); color: var(--fg); }
.vote.is-voted { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.idea-comments { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1rem; border-left: 2px solid var(--border); display: grid; gap: 0.75rem; }
.idea-comments p { margin: 0; }
.idea-reply { display: flex; gap: 0.5rem; align-items: flex-end; margin-top: 1rem; }
.idea-reply textarea { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--border);
                       border-radius: 0.55rem; padding: 0.6rem 0.75rem; min-height: 44px; resize: vertical; }
.idea-reply .btn { min-height: 44px; }
.idea-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1rem;
             padding-top: 0.75rem; border-top: 1px solid var(--border); }
.idea-status { display: flex; gap: 0.5rem; align-items: center; }
.idea-status select { font: inherit; font-size: 16px; color: var(--fg); background: var(--card); border: 1px solid var(--border);
                      border-radius: 0.55rem; padding: 0.45rem 0.6rem; min-height: 44px; }
.idea-status .btn { min-height: 44px; }
@media (max-width: 520px) {
  .kv { grid-template-columns: 1fr; gap: 0.1rem; }
  .kv dd { margin-bottom: 0.5rem; }
  .idea-reply { flex-direction: column; align-items: stretch; }
}
.ws-signatures { margin-top: 2rem; }
.team-actions { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; }
.team-actions .btn-sm { min-height: 44px; }
.ws-signatures .form { margin-top: 0.75rem; }
.field select { font: inherit; font-size: 16px; color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: 0.55rem; padding: 0.65rem 0.8rem; min-height: 44px; }

/* Signing */
.sign-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.25rem; margin: 1.25rem 0; }
.sign-meta dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.sign-meta dd { margin: 0.1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.sign-pages { display: grid; gap: 1rem; justify-items: start; margin: 1.5rem 0; }
.sign-page { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 0.5rem; background: #fff; box-shadow: var(--shadow); }
.sign-form { margin-top: 1.5rem; }
.sign-mode { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.sign-mode legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; }
.radio { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; }
.radio input, .consent input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex-shrink: 0; }
.sign-pad { position: relative; border: 1.5px dashed var(--border); border-radius: 0.7rem; background: #fff; }
.sign-pad canvas { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; border-radius: 0.7rem; }
.sign-pad-line { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 2.6rem; border-bottom: 1px solid #c9cfd8; pointer-events: none; }
.sign-clear { position: absolute; right: 0.6rem; top: 0.2rem; }
.sign-typed { border: 1.5px dashed var(--border); border-radius: 0.7rem; background: #fff; color: #14233a; min-height: 110px;
              display: flex; align-items: center; padding: 0 1.25rem; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 2rem; overflow-wrap: anywhere; }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.93rem; line-height: 1.5; padding: 0.5rem 0; cursor: pointer; }
.consent input { margin-top: 0.15rem; }
.flash-link a { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; font-size: 0.9rem; }
@media (max-width: 520px) { .sign-meta { grid-template-columns: 1fr; } }

/* Help */
.help-toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.help-toc a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.help-toc a:hover { background: var(--bg-alt); }
.prose h2[id] { scroll-margin-top: 4.5rem; }
.changelog { display: grid; gap: 1rem; margin-top: 1.25rem; }
.release { border: 1px solid var(--border); border-radius: 0.8rem; padding: 1.1rem 1.25rem; background: var(--card); }
.release h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.02rem; }
.release ul { margin-top: 0.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.site-footer .build { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .build:hover { color: var(--fg); text-decoration: underline; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 2rem; }
}
@media (max-width: 720px) {
  .nav { gap: 0.75rem; }
  .nav-links, .nav-cta { display: none; }
  .mobile-menu { display: block; }
  .nav-actions { gap: 0.25rem; }
  .btn-sm { min-height: 44px; }
  .hero { padding: 2.5rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .grid-4, .grid-3, .form-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .mock { overflow-x: auto; }
  .mock-table th, .mock-table td { padding: 0.7rem 0.75rem; }
  .mock-table td { white-space: normal; }
  .col-bl, .col-docs { display: none; }
  .mock-bl { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.72rem; }
  .auth-card { padding: 1.5rem; }
  .panel { padding: 1.1rem; }
  .footer-inner { gap: 0.25rem 1.5rem; }
}
@media (max-width: 480px) {
  .nav-signin, .nav-account { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .wordmark { font-size: 1.25rem; }
  .cta-row .btn { flex: 1 1 100%; }
  .form .btn { justify-self: stretch; }
}
