:root {
  color-scheme: light;
  --navy: #061c31;
  --ink: #10293e;
  --muted: #465b6d;
  --gold: #d5a848;
  --gold-dark: #855c08;
  --linen: #f3efe6;
  --paper: #fdfbf6;
  --border: #cdbc9c;
  --error: #8a2526;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
}
.shell { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
main { flex: 1; padding-block: clamp(2.5rem, 6vw, 5.75rem); }
h1, h2 { margin: 0; font: 400 2rem/1.15 var(--serif); }
h1 { font-size: clamp(2.6rem, 5.2vw, 4.8rem); letter-spacing: -.033em; }
p { margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--gold-dark); }
:focus-visible { outline: 2px solid #286198; outline-offset: 4px; }
.site-header, .site-footer { background: var(--navy); color: white; }
.site-header { border-bottom: 1px solid #ad873b66; }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.35rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; flex-shrink: 0; }
.brand-tree { width: 2.7rem; height: 2.7rem; object-fit: contain; }
.brand-wordmark { width: clamp(8rem, 22vw, 13rem); height: auto; }
.header-link { font-size: .92rem; color: white; }
.header-actions, .language-nav { display: flex; align-items: center; flex-wrap: wrap; }
.header-actions { gap: .45rem 1.4rem; }
.language-nav { gap: .45rem; }
.language-nav a { padding: .28rem .48rem; border: 1px solid #af884644; font-size: .85rem; text-decoration: none; }
.language-nav a[aria-current="page"] { border-color: #d5a848; color: #f1ce79; }
.site-header a:hover, .site-footer a:hover { color: #f1ce79; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: #f1ce79; }
.footer-inner { flex-wrap: wrap; color: #d6e0e8; font-size: .92rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; }
.intro { margin-bottom: clamp(2rem, 4vw, 3.3rem); }
.intro > :last-child:not(h1) { margin-top: 1.1rem; max-width: 46rem; color: var(--muted); font-size: 1.1rem; }
.eyebrow {
  margin-bottom: .85rem;
  color: var(--gold-dark);
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: start;
}
.report-grid--latest { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.card { padding: clamp(1.3rem, 3vw, 2.4rem); border: 1px solid var(--border); background: var(--paper); }
.card h2 { margin-bottom: .8rem; }
.card h3 { margin: 0 0 .7rem; font: 400 1.55rem/1.2 var(--serif); }
.report-preview { margin-bottom: 1.45rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.report-language { margin-bottom: .85rem; color: var(--gold-dark); font-size: .92rem; font-weight: 700; }
.archive { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.archive > h2 { margin-bottom: 1rem; }
.archive button:not(form button) { margin-top: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: .58rem 1.1rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--navy);
  font: 700 1rem/1.25 var(--sans);
  cursor: pointer;
}
.button:hover { border-color: #bc8c2e; background: #e2bb62; }
.button.outline { background: transparent; border-color: #987027; }
.button.outline:hover { background: #f5e8ca; }
.button:disabled { opacity: .65; cursor: wait; }
details summary.button::marker { content: ''; }
details summary.button::-webkit-details-marker { display: none; }
details[open] summary.button { background: transparent; border-color: #987027; }
form { display: grid; gap: .9rem; }
form button { justify-self: start; }
.download-form { margin-top: 1.1rem; }
label { display: grid; gap: .25rem; color: var(--ink); font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: .52rem .65rem;
  border: 1px solid #9dacad;
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
}
textarea { resize: vertical; }
.microcopy, .form-status { color: var(--muted); font-size: .92rem; }
.error { color: var(--error); }
.auth-panel, .upload-panel { max-width: 44rem; }
.auth-panel { margin-top: 1rem; }
.preview-editor { margin-top: 1.25rem; }
.retrieval-panel .form-status { margin-top: 1rem; }
.privacy-confirmation {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .6rem;
  font-weight: 400;
}
.privacy-confirmation input {
  width: 1.2rem;
  height: 1.2rem;
  min-height: 0;
  margin: .18rem 0 0;
  accent-color: var(--navy);
}
.privacy-document { max-width: 48rem; }
.privacy-document h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.privacy-document h2 { font-size: 1.65rem; }
.privacy-document p { margin-top: .85rem; }
.privacy-document section { margin-top: 2rem; }
.privacy-document h3 { margin: 1.1rem 0 0; font-size: 1.05rem; }
.recover-details { margin-top: 1.1rem; }
.recover-details > summary { cursor: pointer; }
.recover-details > form { margin-top: .8rem; }
.session-row, .date-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.session-row { margin-bottom: 1.2rem; align-items: center; }
.date-row > label { flex: 1 1 9rem; }
.table-container { overflow-x: auto; }
.log-filter { max-width: 28rem; margin-bottom: 1rem; }
.archive .log-delete { margin: 0; }
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { text-align: left; vertical-align: top; padding: .65rem .85rem; border: 1px solid var(--border); }
th { background: #f3e9d5; }
@media (max-width: 43rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; gap: .55rem; }
  .report-grid { grid-template-columns: 1fr; gap: 1rem; }
  .brand-tree { width: 2.1rem; height: 2.1rem; }
}
