@font-face {
  font-family: "Asteria Display";
  src: url("/charter/assets/display.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
}

@font-face {
  font-family: "Asteria Sans";
  src: url("/charter/assets/body.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0b1621;
  --panel: #111f2d;
  --field: #0b1723;
  --text: #f3eee5;
  --muted: #b2c0cc;
  --gold: #dfbf83;
  --line: #9eb4c840;
  --display: "Asteria Display", Georgia, serif;
  --sans: "Asteria Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
}
a { color: inherit; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 12px; padding: 8px 14px; background: var(--gold); color: var(--night); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: flex; align-items: center; gap: 14px; width: max-content; text-decoration: none; }
.wordmark svg { width: 25px; height: 25px; fill: var(--gold); flex: 0 0 auto; }
.wordmark > span { font: 500 1.7rem/1 var(--display); letter-spacing: .14em; }
.wordmark small { display: block; margin-top: 7px; color: var(--gold); font: 600 .58rem/1.2 var(--sans); letter-spacing: .17em; }
.masthead-actions { display: flex; align-items: center; gap: clamp(10px, 3vw, 26px); }
.masthead-actions a { font-size: .88rem; color: var(--muted); text-underline-offset: 4px; white-space: nowrap; }
.masthead-actions a:hover { color: var(--text); }
.masthead-actions span { margin-left: 2px; }
main { flex: 1; }
.eyebrow { color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 1px; margin-right: 9px; vertical-align: middle; background: currentColor; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; }
h1 { font-size: clamp(3rem, 7.4vw, 5rem); line-height: .98; }
h2 { font-size: 2.1rem; line-height: 1.05; }
.gate { display: grid; grid-template-columns: 1.15fr 1fr; margin-block: clamp(28px, 6vw, 76px); border: 1px solid var(--line); }
.gate-intro {
  display: flex;
  align-items: flex-end;
  min-height: 490px;
  background:
    linear-gradient(180deg, #08131e16 10%, #08131ee8 96%),
    #172c39 url("/charter/assets/hero-sunset-small.webp") center / cover no-repeat;
}
.gate-intro-copy { padding: clamp(24px, 4vw, 54px); }
.gate-intro h1 { margin-block: 14px 16px; }
.gate-intro-copy > p:last-child { color: #ebedf0; max-width: 28ch; }
.gate-panel { display: flex; justify-content: center; flex-direction: column; padding: clamp(26px, 4.6vw, 64px); background: var(--panel); }
.gate-status { color: var(--muted); }
.gate-panel #retry { align-self: flex-start; margin-top: 20px; }
.form-intro { margin: 10px 0 24px; color: var(--muted); font-size: .95rem; }
label { display: block; margin: 17px 0 6px; font-size: .85rem; font-weight: 600; }
input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--field); color: var(--text); }
input:hover { border-color: var(--muted); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 3px; padding: 9px 17px; cursor: pointer; text-decoration: none; font-size: .86rem; font-weight: 600; white-space: nowrap; }
.button:disabled { cursor: progress; opacity: .65; }
.button-primary { color: #17202a; background: var(--gold); }
.button-primary:hover { background: #f2d89f; }
.button-outline { color: var(--text); background: transparent; border-color: var(--line); }
.button-outline:hover { background: #f3eee51a; border-color: var(--gold); }
#login { margin-top: 22px; width: 100%; }
.login-message { margin-top: 13px; color: #ffd6bd; font-size: .86rem; }
.library { padding-block: clamp(35px, 6vw, 68px); }
.library-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.library-heading h1 { margin-top: 8px; }
.library-heading h1:focus { outline: none; }
.report-count, .archive-heading span { color: var(--muted); font-size: .86rem; }
.library-message { margin-bottom: 16px; }
.latest {
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid #dfbf8363;
  background:
    linear-gradient(95deg, #081725 8%, #081725ed 50%, #0b172373 100%),
    #172c39 url("/charter/assets/hero-sunset-small.webp") center 48% / cover no-repeat;
}
.latest h2 { margin-block: 12px 7px; font-size: clamp(2.2rem, 4.8vw, 3.8rem); }
.latest .report-captain { color: var(--text); font-size: 1rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.latest .report-actions { margin-top: 22px; }
.archive { margin-top: 38px; }
.archive-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 13px; }
.archive-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--panel); }
.archive-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 15px clamp(16px, 3vw, 26px); }
.archive-list li + li { border-top: 1px solid var(--line); }
.report-name { font-size: 1.5rem; line-height: 1.2; }
.report-captain { display: block; color: var(--muted); font-size: .85rem; }
.archive-list .report-captain { margin-top: 5px; }
.empty { border: 1px solid var(--line); background: var(--panel); padding: 35px; }
.empty p { color: var(--muted); margin-top: 8px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; padding-block: 19px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.footer > span:first-child { letter-spacing: .13em; }

@media (max-width: 720px) {
  .shell { width: calc(100% - 36px); }
  .masthead-inner { min-height: 70px; }
  .gate { grid-template-columns: 1fr; }
  .gate-intro { min-height: 255px; }
  .gate-panel { padding: 26px; }
}

@media (max-width: 520px) {
  .masthead-inner { gap: 12px; }
  .masthead-actions { gap: 9px; }
  .masthead-actions a, .masthead-actions button { font-size: .76rem; }
  .masthead-actions button { padding-inline: 10px; }
  .wordmark { gap: 8px; }
  .wordmark svg { width: 19px; height: 19px; }
  .wordmark > span { font-size: 1.35rem; }
  .archive-list li { grid-template-columns: 1fr; }
  .latest { background-position: 58% center; }
}
