/* DIGOSAR - site stylesheet. Light, institutional, Swiss grid (UI/UX Pro Max: Minimalism & Swiss Style,
   navy/slate + one blue accent). Headings EB Garamond, body Atkinson Hyperlegible, both self-hosted (OFL) so a
   visitor's browser contacts no third party. Motion reveals by transform only, never opacity (estate rule 83). */
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/atkinson-hyperlegible-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0f172a;          /* primary navy */
  --ink-2: #334155;        /* slate */
  --muted: #475569;
  --rule: #d9e0e8;
  --paper: #f8fafc;
  --card: #ffffff;
  --accent: #0369a1;       /* the one accent: links, focus, the report action */
  --accent-ink: #ffffff;
  --band: #eef2f6;
  --ok: #166534;
  --warn: #9a3412;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: #075985; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: 0.75rem; top: -3rem; background: var(--ink); color: #fff; padding: 0.5rem 0.9rem; z-index: 20; }
.skip:focus { top: 0.75rem; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }

/* masthead */
.masthead { background: var(--card); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--ink); }
.brand img { width: 2.6rem; height: 2.6rem; }
.brand .name { font: 600 1.35rem/1 var(--serif); letter-spacing: 0.14em; }
.brand .sub { display: block; font: 400 0.72rem/1.2 var(--sans); letter-spacing: 0.02em; color: var(--muted); margin-top: 0.25rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* page header */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--rule); background: var(--card); }
.eyebrow { font: 700 0.78rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); margin: 0 0 1rem; max-width: 22ch; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2rem); margin: 2.6rem 0 0.9rem; }
h3 { font-size: 1.3rem; margin: 1.8rem 0 0.6rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: var(--measure); margin: 0; }

main { display: block; }
.prose { max-width: var(--measure); padding: 1rem 0 3rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.tldr { background: var(--band); border-left: 4px solid var(--ink); padding: 1rem 1.25rem; margin: 2rem 0 0.5rem; max-width: var(--measure); }
.tldr p { margin: 0; }

/* the five-part grid on the home page */
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0 2.5rem; }
.grid > div { background: var(--card); padding: 1.3rem 1.3rem 1.4rem; }
.grid h3 { margin-top: 0; font-size: 1.15rem; }
.grid p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.num { font: 700 0.8rem/1 var(--mono); color: var(--accent); letter-spacing: 0.08em; display: block; margin-bottom: 0.6rem; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.6rem; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; color: var(--ink); background: var(--band); }
.table-scroll { overflow-x: auto; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; padding: 0.8rem 1.3rem; border: 0; border-radius: 2px; cursor: pointer; font-size: 1rem; }
.btn:hover { background: #075985; color: #fff; }
.btn[disabled] { background: #94a3b8; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.refs { font-size: 0.95rem; }
.refs li { margin-bottom: 0.55rem; }

/* report page */
.reporting { background: var(--card); border: 1px solid var(--rule); padding: 1.1rem 1.25rem; margin: 1.5rem 0; max-width: var(--measure); }
.reporting .label { font: 700 0.78rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.55rem; }
.reporting .title { font: 600 1.25rem/1.3 var(--serif); margin: 0 0 0.3rem; overflow-wrap: anywhere; }
.reporting .url { font: 400 0.95rem/1.4 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; margin: 0; }
.notice { max-width: var(--measure); background: var(--band); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.notice p { margin: 0.4rem 0; }
form.report { max-width: var(--measure); margin: 1.5rem 0 3rem; }
.field { margin: 0 0 1.25rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #94a3b8; padding: 0.7rem 0.8rem; border-radius: 2px; }
.field textarea { min-height: 12rem; resize: vertical; }
.field .hint { font-size: 0.92rem; color: var(--muted); margin: 0.35rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--warn); font-weight: 700; }
.receipt { font: 700 1.4rem/1.2 var(--mono); letter-spacing: 0.04em; color: var(--ink); }

/* footer */
.site-foot { border-top: 1px solid var(--rule); background: var(--card); padding: 2rem 0 2.5rem; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }

/* motion: settle into place by transform; text is legible from the first frame (rule 83) */
.rise { transform: translateY(10px); transition: transform 420ms cubic-bezier(.2,.7,.2,1); }
.rise.in { transform: none; }
@media (prefers-reduced-motion: reduce) { .rise, .rise.in { transform: none; transition: none; } }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .masthead .wrap { padding: 0.75rem 0; }
  .site-nav ul { gap: 0.2rem 0.9rem; }
  th, td { padding: 0.55rem 0.5rem; }
}
