:root {
  --wf-brand-1: #f2faf8;
  --wf-brand-2: #dbe9e7;
  --wf-brand-3: #62aba3;
  --wf-brand-4: #2a827b;
  --wf-brand-5: #136b65;
  --wf-brand-6: #054946;
  --wf-grey-1: #ffffff;
  --wf-grey-2: #f9fafb;
  --wf-grey-3: #f4f5f7;
  --wf-grey-5: #d9e2e8;
  --wf-grey-7: #5a6872;
  --wf-grey-8: #2c3439;
  --wf-gold-1: #fffaf4;
  --wf-gold-2: #f2ddcb;
  --wf-gold-3: #efbf94;
  --wf-gold-4: #f79a3e;
  --wf-gold-5: #a8632b;
  --wf-gold-6: #6d2f03;
  --wf-red-1: #fff6f6;
  --wf-red-2: #f7bfc0;
  --wf-red-5: #aa1f29;
  --wf-red-6: #820d17;
  --gradient-primary: linear-gradient(180deg, #2a827b 21%, #054946 100%);
  --gradient-primary-x: linear-gradient(90deg, #2a827b 21%, #054946 100%);

  --ink: var(--wf-grey-8);
  --ink-soft: var(--wf-grey-7);
  --rule: var(--wf-grey-5);
  --mist: var(--wf-grey-3);
  --paper: var(--wf-grey-1);
  --raised: var(--wf-grey-2);
  --control-line: #7f8c95;
  --brand: var(--wf-brand-4);
  --brand-text: var(--wf-brand-5);
  --brand-deep: var(--wf-brand-6);
  --brand-wash: var(--wf-brand-1);
  --brand-line: var(--wf-brand-2);
  --amber: var(--wf-gold-5);
  --amber-deep: var(--wf-gold-6);
  --amber-wash: var(--wf-gold-1);
  --amber-line: var(--wf-gold-2);
  --green: var(--wf-brand-6);
  --green-wash: var(--wf-brand-1);
  --bad: var(--wf-red-5);
  --bad-deep: var(--wf-red-6);
  --bad-wash: var(--wf-red-1);
  --bad-line: var(--wf-red-2);
  --focus: var(--wf-brand-5);

  --radius-xs: 0.25rem;
  --radius-s: 0.375rem;
  --radius-m: 0.5rem;
  --radius-l: 0.75rem;
  --shadow-1: 0 1px 2px 0 rgba(22, 34, 51, 0.05), 0 1px 6px -1px rgba(22, 34, 51, 0.04), 0 2px 4px 0 rgba(22, 34, 51, 0.03);
  --shadow-sheet: 0 1px 3px rgba(22, 34, 51, 0.08), 0 12px 28px -14px rgba(22, 34, 51, 0.22);
  --ui: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --doc: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--mist); color: var(--ink); font: 400 1rem/1.5 var(--ui); }
body { min-height: 100vh; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-deep); text-decoration-thickness: 2px; }
h1, h2, h3 { font-weight: 600; color: var(--ink); }
h1 { font-size: 1.875rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.4rem; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.75rem; }
h3 { font-size: 1rem; line-height: 1.4; margin: 1.25rem 0 0.4rem; }
p { margin: 0 0 0.8rem; }
b, strong { font-weight: 600; }
.muted { color: var(--ink-soft); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.top { background: var(--wf-brand-6) var(--gradient-primary); color: #fff; }
.top-inner { max-width: 76rem; min-height: 4rem; margin: 0 auto; padding: 0.75rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.wordmark { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 0.625rem; border-radius: var(--radius-s); }
.wordmark:hover { color: #fff; }
.wordmark svg { flex: none; width: 1.25rem; height: 1.25rem; padding: 0.375rem; box-sizing: content-box; background: #fff; color: var(--brand-text); border-radius: var(--radius-m); }
.account { color: #fff; font-size: 0.875rem; line-height: 1.5rem; padding-left: 1.25rem; border-left: 1px solid rgba(255, 255, 255, 0.4); }
.top .spacer { flex: 1; }
.session-chip { display: inline-flex; align-items: baseline; gap: 0.5rem; background: rgba(5, 73, 70, 0.6); border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; padding: 0.25rem 0.875rem; font-size: 0.875rem; color: #fff; }
.session-chip b { font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.top :focus-visible { outline-color: #fff; }

.nav { background: var(--paper); border-bottom: 1px solid var(--rule); }
.nav-inner { max-width: 76rem; margin: 0 auto; padding: 0 0.5rem; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav a { flex: none; padding: 0.875rem 0.75rem 0.75rem; color: var(--ink-soft); font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--brand-text); font-weight: 600; border-bottom-color: var(--brand); }
.nav a:focus-visible { outline-offset: -3px; border-radius: var(--radius-s); }
.nav .count { display: inline-block; min-width: 1.5em; margin-left: 0.375rem; padding: 0 0.4rem; border-radius: 999px; background: var(--brand-wash); border: 1px solid var(--brand-line); color: var(--brand-deep); font-size: 0.75rem; font-weight: 700; line-height: 1.4; text-align: center; }

.main { max-width: 76rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.pagehead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 1.25rem; }
.pagehead h1, .pagehead p { margin: 0; }
.crumbs { margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--ink-soft); }

.flash, .error-box, .arrival, .note { border: 1px solid; border-left-width: 4px; border-radius: var(--radius-m); padding: 0.75rem 1rem; }
.flash { background: var(--brand-wash); color: var(--brand-deep); border-color: var(--brand-line); border-left-color: var(--brand); }
.error-box { background: var(--bad-wash); color: var(--bad-deep); border-color: var(--bad-line); border-left-color: var(--bad); font-weight: 600; }
.arrival { display: none; background: var(--brand-wash); color: var(--brand-deep); border-color: var(--brand-line); border-left-color: var(--brand); margin-bottom: 1rem; }
.arrival.show { display: block; }
.arrival a { color: var(--brand-deep); font-weight: 600; }
.note { background: var(--amber-wash); color: var(--amber-deep); border-color: var(--amber-line); border-left-color: var(--wf-gold-4); }
.empty { background: var(--paper); border: 1px dashed var(--control-line); border-radius: var(--radius-l); padding: 1.5rem; color: var(--ink-soft); }

.list { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-1); }
.list-wrap { overflow-x: auto; }
.list table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.list th, .list td { padding: 0.75rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.list th { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); background: var(--raised); white-space: nowrap; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: var(--brand-wash); }
.list td.num a { font-weight: 600; }
.list td.subject a { font-weight: 600; color: var(--ink); text-decoration: none; }
.list td.subject a:hover { color: var(--brand-text); text-decoration: underline; }
.list .clip { display: block; margin-top: 0.125rem; color: var(--ink-soft); font-size: 0.8125rem; white-space: normal; }
.status { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.0625rem 0.625rem; border: 1px solid transparent; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.status::before { content: ""; flex: none; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; }
.status.created { background: var(--brand-wash); color: var(--brand-deep); border-color: var(--brand-line); }
.status.created::before { background: var(--brand); }
.status.attention { background: var(--amber-wash); color: var(--amber); border-color: var(--amber-line); }
.status.attention::before { background: var(--wf-gold-4); }
.status.open { background: var(--mist); color: var(--ink); border-color: var(--rule); }
.status.open::before { background: var(--ink-soft); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 25rem; gap: 1.5rem; align-items: start; margin-top: 1.25rem; }
.layout > * { min-width: 0; }
@media (min-width: 60.0625rem) {
  .layout > :last-child:not(:first-child) { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; scrollbar-width: thin; border-radius: var(--radius-l); }
}
@media (max-width: 60rem) { .layout { grid-template-columns: minmax(0, 1fr); } }
.mail, .panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); min-width: 0; box-shadow: var(--shadow-1); }
.mail-head { margin: 0; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 1rem; font-size: 0.9375rem; }
.mail-head dt { color: var(--ink-soft); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { padding: 1.25rem; white-space: pre-line; }
.attachment { margin: 0 1.25rem 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius-m); overflow: hidden; background: var(--mist); }
.attachment-bar { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 1rem; background: var(--paper); border-bottom: 1px solid var(--rule); font-size: 0.875rem; font-weight: 600; }
.attachment-bar svg { flex: none; color: var(--brand); }
.attachment-bar span { min-width: 0; overflow-wrap: anywhere; }
.document { margin: 1.25rem; padding: 2rem 2.25rem 2.25rem; max-width: 46rem; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-xs); box-shadow: var(--shadow-sheet); font-family: var(--doc); font-size: 1.0625rem; line-height: 1.65; color: #1f2629; }
.document h1, .document h2, .document h3 { font-family: var(--doc); color: #1f2629; letter-spacing: 0; }
.document h2 { font-size: 1.3rem; margin-top: 0.4rem; }
.document h3 { font-size: 1.08rem; margin-top: 1.4rem; }
.document > :last-child { margin-bottom: 0; }
.document hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5rem 0; }
.document table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0.6rem 0 1rem; font-size: 0.95rem; }
.document th, .document td { border: 1px solid var(--rule); padding: 0.35rem 0.6rem; text-align: left; vertical-align: top; }
.document th { background: var(--raised); font-weight: 600; }
.document ul, .document ol { padding-left: 1.4rem; }
.document a { color: var(--brand-text); }

.panel { padding: 1.25rem; }
.panel h2 { margin: 0 0 1rem; }
.panel + .panel { margin-top: 1rem; }
.panel > p:last-child { margin-bottom: 0; }
form.trip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.875rem 0.75rem; }
form.trip .wide { grid-column: 1 / -1; }
form.trip .wide > button[type="submit"] { width: 100%; margin-top: 0.25rem; }
.field { display: grid; gap: 0.375rem; align-content: start; min-width: 0; }
label { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
input, select, textarea { font: inherit; font-size: 1rem; width: 100%; min-height: 2.5rem; padding: 0.4375rem 0.75rem; border: 1px solid var(--control-line); border-radius: var(--radius-m); background-color: var(--raised); color: var(--ink); transition: border-color 120ms ease, background-color 120ms ease; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235a6872' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; text-overflow: ellipsis; }
input[type="date"] { min-width: 0; }
input::-webkit-date-and-time-value { text-align: left; }
textarea { resize: vertical; min-height: 5rem; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-text); background-color: var(--paper); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); background-color: var(--bad-wash); }
.field-error { color: var(--bad); font-size: 0.8125rem; font-weight: 600; }
button, .button { font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.25; min-height: 2.5rem; padding: 0.5625rem 1.125rem; border: 1px solid var(--brand); border-radius: var(--radius-m); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
button:hover, .button:hover { background: var(--brand-text); border-color: var(--brand-text); color: #fff; }
button:active, .button:active { background: var(--brand-deep); border-color: var(--brand-deep); }
button.secondary { background: var(--paper); color: var(--amber); border-color: var(--wf-gold-3); }
button.secondary:hover { background: var(--amber-wash); color: var(--amber-deep); border-color: var(--amber); }
button.ghost { background: var(--paper); color: var(--brand-text); border-color: var(--wf-brand-3); }
button.ghost:hover { background: var(--brand-wash); color: var(--brand-deep); border-color: var(--brand); }
button.current { box-shadow: inset 0 0 0 2px var(--paper); }
button.big, .button.big { font-size: 1.0625rem; min-height: 3rem; padding: 0.75rem 1.5rem; }
.hint { color: var(--ink-soft); font-size: 0.875rem; margin: 0; }

.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 34rem), 1fr)); gap: 1.25rem; }
.ticket { --stub: 9rem; --stub-h: 4rem; --notch: 1.5rem; --notch-bg: var(--mist); display: grid; grid-template-columns: minmax(0, 1fr) var(--stub); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); position: relative; overflow: hidden; box-shadow: var(--shadow-1); }
.ticket-main { padding: 1.25rem 1.5rem 1.375rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.route { display: flex; align-items: flex-start; gap: 0.75rem; }
.route .code { min-width: 0; font-size: 2.25rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.route .code:last-child { text-align: right; }
.route .city { display: block; margin-top: 0.375rem; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; line-height: 1.3; color: var(--ink-soft); }
.route .path { flex: 1; min-width: 2.5rem; height: 2px; margin-top: 1.0625rem; position: relative; background: repeating-linear-gradient(90deg, var(--wf-brand-3) 0 6px, transparent 6px 12px); }
.route .path svg { position: absolute; left: 50%; top: 50%; width: 1.25rem; height: 1.25rem; padding: 0 0.375rem; box-sizing: content-box; transform: translate(-50%, -50%); background: var(--paper); color: var(--brand); }
.ticket-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.75rem 1rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); }
.ticket-facts dt { font-size: 0.75rem; font-weight: 500; color: var(--ink-soft); }
.ticket-facts dd { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.ticket-stub { display: grid; align-content: center; justify-items: center; gap: 0.25rem; padding: 1.25rem 1rem; text-align: center; color: #fff; background: var(--wf-brand-6) var(--gradient-primary); background-clip: padding-box; border-left: 2px dashed var(--wf-brand-3); }
.ticket-stub .muted { color: #fff; font-size: 0.8125rem; font-weight: 500; }
.ticket-stub .no { color: #fff; font-size: 1.375rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-stub::after { content: ""; width: 4.5rem; height: 1.75rem; margin-top: 0.625rem; opacity: 0.8; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 4px, #fff 4px 5px, transparent 5px 7px, #fff 7px 10px, transparent 10px 12px, #fff 12px 13px, transparent 13px 16px); }
.ticket::before, .ticket::after { content: ""; position: absolute; z-index: 1; right: calc(var(--stub) - 1px - var(--notch) / 2); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--notch-bg); border: 1px solid var(--rule); }
.ticket::before { top: calc(var(--notch) / -2 - 1px); }
.ticket::after { bottom: calc(var(--notch) / -2 - 1px); }

.panel .ticket { --notch-bg: var(--paper); box-shadow: none; margin-bottom: 1rem; }
.panel .ticket-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel .route .code { font-size: 1.75rem; }
.panel .route .path { margin-top: 0.8125rem; }
.panel .ticket { grid-template-columns: minmax(0, 1fr); }
.panel .ticket-stub { height: var(--stub-h); grid-template-columns: auto auto minmax(0, 1fr); grid-auto-flow: column; align-items: center; justify-items: start; gap: 0.625rem; padding: 0 1.25rem; text-align: left; border-left: 0; border-top: 2px dashed var(--wf-brand-3); }
.panel .ticket-stub::after { justify-self: end; margin-top: 0; }
.panel .ticket::before, .panel .ticket::after { top: auto; right: auto; bottom: calc(var(--stub-h) - 1px - var(--notch) / 2); }
.panel .ticket::before { left: calc(var(--notch) / -2 - 1px); }
.panel .ticket::after { right: calc(var(--notch) / -2 - 1px); }
@media (max-width: 40rem) {
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-main { padding: 1rem 1.125rem 1.125rem; }
  .ticket-stub { height: var(--stub-h); grid-template-columns: auto auto minmax(0, 1fr); grid-auto-flow: column; align-items: center; justify-items: start; gap: 0.625rem; padding: 0 1.125rem; text-align: left; border-left: 0; border-top: 2px dashed var(--wf-brand-3); }
  .ticket-stub::after { justify-self: end; margin-top: 0; }
  .ticket::before, .ticket::after { top: auto; right: auto; bottom: calc(var(--stub-h) - 1px - var(--notch) / 2); }
  .ticket::before { left: calc(var(--notch) / -2 - 1px); }
  .ticket::after { right: calc(var(--notch) / -2 - 1px); }
  .route .code { font-size: 1.75rem; }
  .route .path { margin-top: 0.8125rem; }
  .ticket-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.landing { max-width: 60rem; margin: 1.5rem auto 0; display: grid; gap: 2rem; }
.landing-head h1 { font-size: 2.375rem; letter-spacing: -0.02em; color: var(--brand-deep); margin-bottom: 0.75rem; }
.landing-head p { font-size: 1.125rem; color: var(--ink-soft); max-width: 38rem; margin: 0; }
.choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
@media (max-width: 45rem) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); padding: 1.5rem; display: grid; gap: 0.75rem; align-content: start; min-width: 0; box-shadow: var(--shadow-1); }
.choice h2 { margin: 0; }
.choice p { margin: 0; }
.choice form { display: grid; gap: 0.625rem; justify-items: start; }
.choices .choice:first-child { box-shadow: inset 0 4px 0 var(--brand), var(--shadow-1); }
.id-input { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase; text-align: center; max-width: 12rem; font-variant-numeric: tabular-nums; }

.idcard { position: relative; overflow: hidden; max-width: 34rem; margin: 2.5rem auto 0; padding: 2.5rem 2rem 2rem; display: grid; gap: 1rem; justify-items: center; text-align: center; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.idcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 0.375rem; background: var(--wf-brand-6) var(--gradient-primary-x); }
.idcard h1, .idcard p { margin: 0; }
.idcard h1.muted { font-size: 1rem; font-weight: 500; line-height: 1.5; color: var(--ink-soft); }
.idcard .code { font-size: clamp(3rem, 15vw, 4.5rem); font-weight: 700; letter-spacing: 0.25em; line-height: 1; padding: 1.25rem 1.5rem 1.25rem calc(1.5rem + 0.25em); color: var(--brand-text); background: var(--brand-wash); border: 2px dashed var(--wf-brand-3); border-radius: var(--radius-l); font-variant-numeric: tabular-nums; }
.idcard .url { max-width: 100%; padding: 0.375rem 0.75rem; overflow-wrap: anywhere; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.875rem; color: var(--ink); background: var(--mist); border: 1px solid var(--rule); border-radius: var(--radius-s); }

.policy { max-width: 48rem; padding: 1.75rem 2rem; line-height: 1.6; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.policy > :first-child { font-size: 1.0625rem; }
.policy > :last-child { margin-bottom: 0; }
.policy h3 { margin-top: 1.5rem; font-size: 1.0625rem; }
.policy h3:first-of-type { margin-top: 1.25rem; }
.policy ul, .policy ol { padding-left: 1.25rem; margin: 0 0 0.8rem; }
.policy li { margin-bottom: 0.4rem; }
.policy li::marker { color: var(--brand); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.row, .choice form.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row p { margin: 0; width: 100%; }
input.narrow { width: 5.5rem; }

@media (max-width: 40rem) {
  .top-inner { min-height: 0; padding: 0.625rem 1rem; gap: 0.375rem 0.75rem; }
  .account { order: 4; flex-basis: 100%; padding-left: 0; border-left: 0; line-height: 1.4; }
  .nav-inner { padding: 0 0.25rem; gap: 0; }
  .main { padding: 1.25rem 1rem 3rem; }
  h1 { font-size: 1.5rem; }
  .landing { margin-top: 0.5rem; }
  .landing-head h1 { font-size: 1.875rem; }
  .choice { padding: 1.25rem; }
  .mail-head { padding: 0.875rem 1rem; gap: 0.125rem 0.75rem; }
  .mail-body { padding: 1rem; }
  .attachment { margin: 0 0.75rem 0.75rem; }
  .document { margin: 0.75rem; padding: 1.25rem 1.125rem; font-size: 1rem; line-height: 1.6; }
  .panel { padding: 1rem; }
  .policy { padding: 1.25rem; }
  .idcard { margin-top: 0.5rem; padding: 2rem 1.25rem 1.5rem; }
  .idcard .code { padding: 1rem 1rem 1rem calc(1rem + 0.25em); }
}
@media (max-width: 40rem) {
  .list table { font-size: 0.875rem; }
  .list .status { min-width: 7.5rem; white-space: normal; align-items: flex-start; border-radius: var(--radius-m); }
  .list .status::before { margin-top: calc((1.5em - 0.375rem) / 2); }
  .list th, .list td { padding: 0.625rem 0.5rem; }
  .list th:first-child, .list td:first-child { padding-left: 1rem; }
  .list th:last-child, .list td:last-child { padding-right: 1rem; }
  .list table.people, .list table.people tbody, .list table.people td { display: block; }
  .list table.people thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .list table.people tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "name name office" "dept role role" "email email email"; gap: 0.125rem 0.375rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); }
  .list table.people tbody tr:last-child { border-bottom: 0; }
  .list table.people td { padding: 0; border: 0; }
  .list table.people td:nth-child(1) { grid-area: name; font-size: 0.9375rem; }
  .list table.people td:nth-child(2) { grid-area: dept; color: var(--ink-soft); }
  .list table.people td:nth-child(3) { grid-area: role; color: var(--ink-soft); }
  .list table.people td:nth-child(3)::before { content: "\00b7"; content: "\00b7" / ""; margin-right: 0.375rem; }
  .list table.people td:nth-child(4) { grid-area: office; align-self: start; padding: 0 0.5rem; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-wash); color: var(--brand-deep); font-size: 0.8125rem; font-weight: 600; }
  .list table.people td:nth-child(5) { grid-area: email; font-size: 0.8125rem; color: var(--ink-soft); overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
