@font-face { font-family: Source; src: url('/assets/source-sans-latin.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: Bricolage; src: url('/assets/bricolage-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  color-scheme: light;
  --ink: #103c55; --muted: #466777; --paper: #fff; --soft: #f4f9fb; --line: #c5dce4;
  --accent: #08716b; --on-accent: #fff; --focus: #087d76; --selected: #e4f7f4;
  --good: #145d43; --good-bg: #e7f6ed; --warn: #744522; --warn-bg: #fff4e9;
  --error: #a33442; --error-bg: #fff1f3; --intro: #103c55; --intro-text: #f4f9fb; --intro-muted: #c4dce5;
  font: 16px/1.5 Source, system-ui, sans-serif;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --ink: #e5f3f8; --muted: #c4dce5; --paper: #15384b; --soft: #102a39; --line: #547489;
  --accent: #8fe6dc; --on-accent: #103c55; --focus: #8fe6dc; --selected: #245d69;
  --good: #bcf2d3; --good-bg: #214b43; --warn: #ffd3ab; --warn-bg: #593b2e;
  --error: #ffd2da; --error-bg: #553444; --intro: #17455b;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--soft); color: var(--ink); }
h1, h2 { font-family: Bricolage, system-ui, sans-serif; line-height: 1.13; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 0 0 .85rem; letter-spacing: -.025em; }
h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
p { margin: 0 0 .9rem; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.site-bar { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar-inner { width: min(1200px, 100%); margin: auto; min-height: 72px; padding: .7rem clamp(1rem, 4vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; text-decoration: none; color: var(--ink); font: 700 clamp(1rem, 2.5vw, 1.3rem)/1 Bricolage, system-ui; white-space: nowrap; }
.wordmark img { object-fit: contain; border-radius: 8px; }
.wordmark strong { color: var(--accent); }
.bar-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; }
.pilot, .status { display: inline-block; color: var(--warn); background: var(--warn-bg); font-size: .875rem; font-weight: 700; border-radius: 999px; padding: .3rem .67rem; }
.status-active, .status-approved { color: var(--good); background: var(--good-bg); }
.status-declined { color: var(--error); background: var(--error-bg); }
.workspace, .footer { width: min(1200px, 100%); margin: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.workspace { padding-block: clamp(1.3rem, 5vw, 3.3rem); }
.footer { color: var(--muted); padding-bottom: 1.5rem; font-size: .95rem; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); gap: 1.4rem; align-items: start; }
.intro, .card { border-radius: 16px; padding: clamp(1rem, 3.7vw, 2rem); }
.intro { background: var(--intro); color: var(--intro-text); border-top: 4px solid #18b5a5; }
.intro p { max-width: 31ch; color: var(--intro-muted); font-size: 1.12rem; }
.kicker { color: var(--accent); font-weight: 750; margin: 0 0 .55rem; }
.intro .kicker, .intro a { color: #8fe6dc; }
.intro a:focus-visible { outline-color: #8fe6dc; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: .6rem; font-weight: 700; }
.card { background: var(--paper); border: 1px solid var(--line); }
.entry-card form, .application form { display: grid; gap: 1rem; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; }
.fields .wide { grid-column: 1 / -1; }
label { display: grid; gap: .3rem; font-weight: 650; }
input:not([type=radio]), select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: .5rem .7rem; font: inherit; font-weight: 500; }
input[aria-invalid=true] { border-color: var(--error); }
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
legend { font-weight: 750; margin-bottom: .3rem; }
.hint, .application-info p { color: var(--muted); }
.inline-error { color: var(--error); }
.plan-choice { display: grid; grid-template-columns: min-content minmax(0,1fr) auto; gap: .6rem; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: .58rem .75rem; margin-top: .45rem; cursor: pointer; min-height: 52px; }
.plan-choice:has(input:checked) { border-color: var(--focus); background: var(--selected); }
.plan-choice:focus-within { outline: 1px solid var(--focus); }
.plan-choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--focus); }
.plan-choice small { display: block; color: var(--muted); font-weight: 500; }
.price { color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 8px; font: inherit; font-weight: 750; padding: .45rem .9rem; text-decoration: none; cursor: pointer; width: fit-content; }
.primary { color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent); }
.ghost { color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
.button:hover:not(:disabled) { filter: brightness(.94); }
.button:active:not(:disabled) { opacity: .82; }
.button:disabled { cursor: wait; opacity: .6; }
.notice { border-radius: 8px; padding: .75rem .9rem; margin: 0 0 .9rem; }
.notice.success { background: var(--good-bg); color: var(--good); }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice.info { background: var(--warn-bg); color: var(--warn); }
.notice label { margin-block: .7rem; }
.notice input { width: 100%; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 1.3rem; align-items: start; }
.panel-nav, .panel-content, .stat { min-width: 0; }
.panel-nav { padding: 1.1rem; }
.account-email, .application-info { overflow-wrap: anywhere; }
.application + .application { margin-top: .9rem; }
.application-info { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; }
.application-info h2 { margin-bottom: .25rem; }
.application form.review-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .6rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-block: .9rem; }
.stat { padding: 1rem; }
.stat span { color: var(--muted); display: block; }
.stat strong { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.empty .status { margin-bottom: .7rem; }
.empty p:last-child { margin-bottom: 0; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }
.skip { position: fixed; top: 0; left: .6rem; z-index: 2; background: var(--paper); padding: .75rem; }
.skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
  .entry-grid, .portal-grid { grid-template-columns: minmax(0,1fr); }
  .intro p { max-width: 44ch; }
}
@media (max-width: 470px) {
  .fields { grid-template-columns: minmax(0, 1fr); }
  .bar-actions .pilot { display: none; }
  .bar-inner { padding-inline: .8rem; }
  .summary-grid { grid-template-columns: minmax(0,1fr); }
  .application-info { flex-wrap: wrap; }
}
.issuer-section { margin-top: 1.3rem; }
.issuer-form { display: grid; gap: .8rem; margin-top: .85rem; }
.issuer-heading, .inline-action { display: flex; justify-content: space-between; align-items: start; gap: .7rem; flex-wrap: wrap; }
.issuer-heading h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.issuer-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.section-links { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin-bottom: 1rem; }
.section-links a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 650; }
.issuer-summary { margin-bottom: 1rem; }
.inline-action { align-items: center; border-bottom: 1px solid var(--line); min-height: 54px; }
.table-scroll { overflow: auto; }
.data { width: 100%; border-collapse: collapse; min-width: 24rem; }
.data th, .data td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); }
.data th { background: var(--soft); font-weight: 750; }
.data .number { text-align: right; font-variant-numeric: tabular-nums; }
.monospace, pre, code { font-family: ui-monospace, Consolas, monospace; }
.break-token, .table-scroll { overflow-wrap: anywhere; }
pre { overflow: auto; padding: .7rem; background: var(--soft); border-radius: 8px; }
.button:disabled { opacity: .6; cursor: default; }
.print-workspace { max-width: 920px; }
.print-document .issuer-heading h1 { font-size: 1.4rem; }
.print-document .print-details { min-width: 0; overflow-wrap: anywhere; }
.print-totals { max-width: 260px; margin-left: auto; }
.print-totals > div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 4px; }
.print-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.print-verification { text-align: center; break-inside: avoid; padding-top: 8px; border-top: 1px solid var(--line); }
.print-verification p { margin: 0; }
@page { margin: 13mm; size: letter; }
@media print {
  :root, :root[data-theme=dark] { color-scheme: light; --paper: #fff; --soft: #f5f7f7; --ink: #103c55; --muted: #466777; --accent: #08716b; --line: #c5dce4; }
  body { background: #fff; color: #103c55; }
  body:has(.print-document) .site-bar, body:has(.print-document) .footer, .no-print, body:has(.print-document) .skip { display:none; }
  .print-workspace { max-width:none; padding:0; width:100%; }
  .print-document { border:0; padding:0; }
  .print-document tr, .print-totals { break-inside:avoid; }
  .print-document thead { display:table-header-group; }
}
@media (max-width: 720px) { .issuer-config { grid-template-columns: minmax(0, 1fr); } }
.application h3, .issuer-form h3 { font: 750 1.1rem/1.2 Bricolage, sans-serif; margin: 0 0 .3rem; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.check input[type="checkbox"] { width: 19px; min-height: auto; height: 19px; margin: 0; flex-shrink: 0; accent-color: var(--focus); }
