:root {
  --header: #162e51;       /* navy header strip */
  --page: #f7f9fb;        /* cool off-white page */
  --accent: #005ea2;      /* links, buttons, icons, rules */
  --accent-deep: #0b1f3a; /* body copy, headings, hover, footer, callouts */
  --panel: #e6ecf3;       /* form panel tint */
  --alert: #b50909;       /* errors and the emergency callout */
  --Soft: 5px;
  --Depth: 0 1px 2px rgba(0, 0, 0, 0.2);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--accent-deep);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}
.wrap { width: min(100% - 2rem, 70rem); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.site-header { background: var(--header); color: var(--page); border-bottom: 4px solid var(--alert); }
.site-header a { color: var(--page); }
.site-header :focus-visible { outline-color: var(--page); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .9rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.brand strong { font-size: 1.25rem; letter-spacing: .01em; }
.brand span { font-size: .9rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-header nav a { text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--page); }

/* Intro */
.intro { padding-block: 2.5rem 1.75rem; }
.intro h1 { padding-left: 1rem; border-left: 8px solid var(--header); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.1; margin: 0 0 .75rem; max-width: 20ch; letter-spacing: -.01em; }
.intro p { margin: 0; max-width: 55ch; font-size: 1.15rem; }

/* Layout */
.layout { display: grid; gap: 2rem; padding-bottom: 3rem; align-items: start; }
@media (min-width: 62rem) { .layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: 3rem; } }

/* Form */
#request-form { background: var(--panel); border: 2px solid var(--accent); border-top: 8px solid var(--header); border-radius: var(--Soft); padding: 1.5rem; box-shadow: var(--Depth); }
@media (min-width: 40rem) { #request-form { padding: 2rem; } }
fieldset + fieldset { border-top: 2px solid var(--accent); padding-top: 1.5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
legend { font-size: 1.3rem; font-weight: 700; padding: 0; margin-bottom: .75rem; }
.step { display: inline-block; min-width: 1.75rem; height: 1.75rem; line-height: 1.75rem; margin-right: .5rem; text-align: center; font-size: .95rem; border-radius: 50%; background: var(--header); color: var(--page); }
.hint { margin: 0 0 .75rem; font-size: .95rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .75rem; }
.tile { position: relative; box-shadow: var(--Depth); display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: .9rem; border: 2px solid var(--accent-deep); border-radius: var(--Soft); background: var(--page); color: var(--accent-deep); cursor: pointer; font-weight: 600; line-height: 1.25; }
.tile svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover { box-shadow: var(--Depth); }
.tile:has(input:checked) { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--page); box-shadow: var(--Depth); }
.tile:has(input:checked) svg { stroke: var(--page); }
.tile:has(input:focus-visible) { outline: 3px solid var(--accent-deep); outline-offset: 2px; }

.field { margin-bottom: 1.1rem; max-width: 36rem; }
label.lbl { display: block; font-weight: 600; margin-bottom: .3rem; }
.opt { font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], textarea {
  width: 100%; font: inherit; color: var(--accent-deep); background: var(--page);
  border: 2px solid var(--accent-deep); border-radius: var(--Soft); padding: .7rem .8rem;
  box-shadow: var(--Depth), inset 0 2px 0 rgba(11, 31, 58, .12);
}
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, input[type="password"]:hover, textarea:hover { border-color: var(--header); }
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: var(--accent); outline: 3px solid var(--accent); outline-offset: 0;
}
textarea { min-height: 7.5rem; resize: vertical; }
::placeholder { color: var(--accent); opacity: 1; }
[aria-invalid="true"] { border-color: var(--alert) !important; }
.error { color: var(--alert); font-size: .95rem; margin: .3rem 0 0; font-weight: 600; }
.error:empty { display: none; }
input[type="file"] { font: inherit; max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: .75rem; padding: .45rem .9rem; color: var(--accent); background: var(--page); border: 2px solid var(--accent); border-radius: var(--Soft); cursor: pointer; }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; accent-color: var(--accent); }

.btn { font: inherit; font-weight: 700; color: var(--page); background: var(--accent); border: 2px solid var(--accent); border-radius: var(--Soft); padding: .7rem 1.4rem; cursor: pointer; }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-deep); color: var(--page); }
.btn.inverse { background: var(--page); color: var(--accent-deep); border-color: var(--page); }
.btn.inverse:hover { background: var(--accent); color: var(--page); border-color: var(--page); }
@media (prefers-reduced-motion: no-preference) { .btn, .tile { transition: background-color .15s, color .15s, box-shadow .15s; } }

/* Confirmation */
.confirm { background: var(--accent-deep); color: var(--page); border-radius: var(--Soft); box-shadow: var(--Depth); padding: 2rem; }
.confirm[hidden], form[hidden] { display: none; }
.confirm h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.confirm .num { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: .02em; margin: .5rem 0 1rem; font-variant-numeric: tabular-nums; }
.confirm dl { margin: 0 0 1.5rem; display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
.confirm dt { font-weight: 700; }
.confirm dd { margin: 0; overflow-wrap: anywhere; }

/* Sidebar */
aside > section { margin-bottom: 2rem; }
aside h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
.callout { border-top: 6px solid var(--alert); background: var(--accent-deep); color: var(--page); border-radius: var(--Soft); padding: 1.1rem 1.2rem; box-shadow: var(--Depth); }
.callout h2 { margin-bottom: .4rem; }
.callout p { margin: 0 0 .5rem; }
.callout p:last-child { margin: 0; }
.callout a { color: var(--page); font-weight: 700; }
.status-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.status-form input { flex: 1 1 10rem; }
#status-result { margin: .6rem 0 0; min-height: 1.5rem; }

.recent { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--accent); }
.recent li { padding: .8rem 0; border-bottom: 1px solid var(--accent); }
.recent .top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.recent .kind { font-weight: 700; }
.recent .where { margin: .1rem 0 0; }
.recent .meta { margin: .1rem 0 0; font-size: .9rem; }
.pill { flex: none; font-size: .85rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); }
.pill.progress { background: var(--accent); color: var(--page); }
.pill.done { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--page); }

/* Footer */
footer { background: var(--accent-deep); color: var(--page); padding-block: 1.5rem; font-size: .95rem; }
footer a { color: var(--page); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
footer p { margin: 0; }

/* Account UI */
.userbar { display: inline-flex; align-items: center; gap: .75rem; padding-left: 1.5rem; border-left: 2px solid var(--page); }
.linklike { font: inherit; color: inherit; background: none; border: 0; padding: .25rem 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { text-decoration-thickness: 2px; }
.site-header .linklike:focus-visible { outline: 3px solid var(--page); outline-offset: 2px; }

.auth { max-width: 30rem; padding-block: 2.5rem 4rem; }
.auth h1 { padding-left: 1rem; border-left: 8px solid var(--header); }
.auth > p { margin: 0 0 1.5rem; }
.auth-card { background: var(--panel); border: 2px solid var(--accent); border-top: 8px solid var(--header); border-radius: var(--Soft); padding: 1.5rem; box-shadow: var(--Depth); }
.auth-card .field { max-width: none; }
.auth-card .btn { width: 100%; }
.auth-card .alt { margin: 1.25rem 0 0; text-align: center; }
.form-error { margin: 0 0 1rem; padding: .6rem .8rem; color: var(--alert); font-weight: 700; border-left: 6px solid var(--alert); background: var(--page); border-radius: var(--Soft); }
.form-error:empty { display: none; }
.notice { font-size: .95rem; margin: 0 0 1.25rem; }

.ts-slot { min-height: 65px; margin: 0 0 1rem; }
