:root {
  --ink: #10243c;
  --ink-2: #1e3d5e;
  --paper: #fbfaf6;
  --paper-deep: #f3f0e8;
  --line: #d8d4c8;
  --muted: #566579;
  --amber: #f2b84b;
  --amber-dark: #9b6510;
  --focus: #1266d6;
  --shadow: 0 22px 60px rgba(16, 36, 60, 0.17);
  --radius: 0.45rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--focus);
  border-radius: 0.35rem;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem clamp(1.25rem, 5vw, 5rem);
  color: #fff;
  background: var(--ink);
  border-bottom: 4px solid var(--amber);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.brand img { display: block; width: 2.75rem; height: 2.75rem; border-radius: 0.3rem; }
.brand strong { display: block; font-size: 1rem; letter-spacing: 0.02em; }
.brand small { display: block; margin-top: 0.05rem; color: #c7d5e5; font-size: 0.76rem; }
.header-status { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; color: #dbe7f2; font-size: 0.83rem; }
.header-status span { width: 0.5rem; height: 0.5rem; background: var(--amber); border-radius: 50%; }

main { width: min(1440px, 100%); margin: 0 auto; }
.document-intro { padding: clamp(2.5rem, 5.5vw, 4.75rem) clamp(1.25rem, 5vw, 5rem) 2.2rem; }
.eyebrow { color: var(--amber-dark); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.15em; line-height: 1; text-transform: uppercase; }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 2rem clamp(2rem, 4vw, 4.5rem);
  align-items: start;
  margin-top: 0.85rem;
}
h1, h2, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 1rem; color: var(--ink); font-size: clamp(2.35rem, 4.8vw, 4.8rem); font-weight: 720; letter-spacing: -0.05em; line-height: 0.98; }
h2 { margin: 0.45rem 0 0; font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -0.035em; }
.lede { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.12rem); }

.metadata {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2.75rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metadata > div { min-width: 0; padding: 1.1rem 1.2rem 1.15rem 0; }
.metadata > div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
dt { margin-bottom: 0.25rem; color: var(--muted); font-size: 0.72rem; font-weight: 760; letter-spacing: 0.1em; text-transform: uppercase; }
dd { margin: 0; font-weight: 700; }

.cover-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(16, 36, 60, 0.08);
  overflow: hidden;
}
.cover-media {
  background: #ebe7de;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 0;
}
.cover-media img {
  display: block;
  width: 100%;
  max-width: 290px;
  height: auto;
  box-shadow: 0 6px 18px rgba(16, 36, 60, 0.15);
  border-top-left-radius: 0.2rem;
  border-top-right-radius: 0.2rem;
}
.cover-content {
  padding: 1.15rem 1.25rem 1.35rem;
}
.cover-title {
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}
.cover-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.document-actions { display: grid; gap: 0.65rem; }
.button, .reader-toggle {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
}
.button svg, .reader-toggle svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-primary { color: var(--ink); background: var(--amber); }
.button-primary:hover { background: #ffc95c; }
.button-secondary { color: var(--ink); background: #ffffff; border-color: #bcc6cf; }
.button-secondary:hover { background: #f2f5f8; }
.button-compact { min-height: 2.75rem; padding: 0.55rem 0.85rem; font-size: 0.88rem; }

.reader-section { margin-top: 1rem; padding: clamp(1.5rem, 4vw, 3.25rem) clamp(1.25rem, 5vw, 5rem) clamp(2.25rem, 5vw, 4.5rem); background: var(--paper-deep); }
.reader-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.reader-controls { display: flex; align-items: center; gap: 0.6rem; }
.reader-toggle { color: #fff; background: var(--ink); min-height: 2.75rem; padding: 0.55rem 0.95rem; font-size: 0.88rem; }
.reader-toggle:hover { background: var(--ink-2); }
.reader-panel { overflow: hidden; height: min(78vh, 1020px); min-height: 640px; background: #2d3440; border: 1px solid #7e8790; box-shadow: var(--shadow); border-radius: var(--radius); }
.reader-panel:fullscreen { width: 100vw; height: 100vh; max-width: none; border: 0; border-radius: 0; background: #1f252d; }
.reader-panel:fullscreen iframe { height: 100%; }
iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.reader-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.86rem; }
.reader-note a { color: var(--ink-2); font-weight: 700; }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1.25rem, 5vw, 5rem) 2rem; color: var(--muted); font-size: 0.82rem; }
.site-footer p { margin-bottom: 0; }
.site-footer a { font-weight: 700; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .cover-card { max-width: 440px; }
  .metadata { grid-template-columns: 1fr 1fr; margin-top: 2rem; }
  .metadata > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metadata > div:nth-child(4) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .site-header { padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .header-status { display: none; }
  .document-intro { padding-top: 2.75rem; }
  .reader-heading { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .reader-panel { height: 72vh; min-height: 520px; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 460px) {
  h1 { font-size: 2.25rem; }
  .reader-controls { width: 100%; }
  .reader-controls .button, .reader-controls .reader-toggle { flex: 1; }
  .metadata > div { padding-right: 0.6rem; }
  .metadata > div + div { padding-left: 0.6rem; }
  .reader-panel { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
