/* lan-extra.css — WWII field-manual polish layered ON TOP of dossier.css.
   Fully additive + reversible: remove the <link> in base.html to revert.
   First pass: typography hierarchy, page-load motion, texture/stamps. */

/* ── 1. Typography & hierarchy ───────────────────────────────────────── */
.chapter-title { letter-spacing: 0.055em; }
.chapter-stamp { opacity: 0.88; }
.title-stamp   { letter-spacing: 0.04em; }
/* tighten the section-number stamp a touch */
.chapter-num { transform: translateY(2px); }

/* ── 2. Page-load reveal (staggered), motion-safe ────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .masthead, nav.toc, section.chapter {
    animation: lan-rise 0.5s cubic-bezier(.2,.7,.2,1) both;
  }
  nav.toc                       { animation-delay: 0.06s; }
  section.chapter               { animation-delay: 0.12s; }
  section.chapter:nth-of-type(2){ animation-delay: 0.18s; }
  section.chapter:nth-of-type(3){ animation-delay: 0.24s; }
  .stamp-decl { animation: lan-stamp 0.45s ease-out 0.55s both; transform-origin: center; }
}
@keyframes lan-rise  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lan-stamp { 0% { opacity: 0; transform: scale(1.7) rotate(-9deg); }
                       70%{ opacity: 1; transform: scale(0.94) rotate(-4deg); }
                       100%{ transform: scale(1) rotate(-4deg); } }

/* ── 3. Texture & stamps (faint, decorative, non-interactive) ────────── */
.lan-mark { position: absolute; pointer-events: none; user-select: none; z-index: 1; }
/* rotated "FILE COPY" intake stamp, upper-right */
.lan-filecopy {
  right: 54px; top: 78px; font-family: var(--stencil); font-size: 20px;
  letter-spacing: 0.22em; color: var(--alert); opacity: 0.15;
  border: 3px solid var(--alert); padding: 3px 10px; border-radius: 2px;
  transform: rotate(-13deg);
}
@media (max-width: 720px) { .lan-mark { display: none; } }

/* ── 4. Controls: buttons + inputs (were browser-default) ────────────── */
button, input[type="submit"], input[type="button"] {
  font-family: var(--stencil);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
  background: var(--olive);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 7px 15px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(26,20,14,0.3);   /* stamped / ammo-crate edge */
  transition: background .1s, transform .05s, box-shadow .05s;
}
button:hover, input[type="submit"]:hover { background: var(--olive-bright); }
button:active, input[type="submit"]:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(26,20,14,0.3);
}
button:focus-visible { outline: 2px solid var(--wsdod-blue); outline-offset: 2px; }
/* uniform olive field-green for all buttons (no blue/red variants) */

/* text/number/select inputs — typewriter on paper, hard edges */
input[type="text"], input[type="number"], input[type="search"],
input:not([type]), select, textarea {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink-margin);
  border-radius: 0;
  padding: 5px 7px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--wsdod-blue);
  box-shadow: inset 0 -2px 0 var(--wsdod-blue);
}
input::placeholder { color: var(--ink-faint); font-style: italic; }

/* PREVIEW banner (toggled by the preview_banner setting) */
.preview-banner {
  background: var(--alert); color: var(--paper); font-family: var(--stencil);
  letter-spacing: .2em; text-transform: uppercase; text-align: center;
  padding: 7px 10px; margin: 0 0 20px; font-size: 13px; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(26,20,14,0.25);
}

/* ── 5. Per-page flourishes ──────────────────────────────────────────── */
/* Bracket as a plotting board — faint blueprint grid behind the columns */
.bkt {
  background-color: rgba(240,233,214,0.45);
  background-image:
    repeating-linear-gradient(0deg,  rgba(30,58,95,0.06) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(30,58,95,0.06) 0 1px, transparent 1px 26px);
  border: 1px solid var(--ink-margin);
  padding: 16px;
}
.bkt-col > h4 { color: var(--wsdod-blue); }
.bkt-match { box-shadow: 1px 1px 0 rgba(26,20,14,0.12); }

/* Standings as a tally sheet — stamped rank, ruled rows */
table.standings-sheet td:first-child { font-family: var(--stencil); font-weight: 900; color: var(--alert); }
table.standings-sheet tbody tr { border-bottom: 1px solid var(--ink-margin); }

/* Saturday timetable as an ops board — monospace clock column */
table.ops-timetable td:first-child { font-family: var(--mono); color: var(--wsdod-blue); font-weight: 700; }

/* ── Narrow-screen / mobile pass ─────────────────────────────────────────
   The dossier is a print-width document; on phones, drop the decorative
   margin furniture, stack the masthead + index, and let wide data tables
   scroll instead of blowing out the layout. */
@media (max-width: 680px) {
  .dossier {
    padding-left: clamp(18px, 5vw, 34px);
    padding-right: clamp(16px, 5vw, 28px);
  }
  /* punch-holes + the vertical margin rule crowd a small screen */
  .binding-holes, .dossier::after { display: none; }
  .lan-filecopy, .stamp-decl { display: none; }

  .masthead { grid-template-columns: 1fr; gap: 14px; }
  .patch-block { padding-top: 0; }
  .masthead .lan-logo { width: 140px !important; }
  .masthead-meta .title-stamp { font-size: clamp(34px, 13vw, 56px); }

  /* index: single column, drop the page-number gutter */
  .toc-list { grid-template-columns: 1fr; column-gap: 0; }
  .toc-list .toc-page { display: none; }

  /* wide data tables scroll horizontally rather than overflow the page */
  .chapter-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  /* one-up grids on the smallest screens */
  .stn-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(auto-fill, minmax(45%, 1fr)); }
  .announce { flex-wrap: wrap; gap: 6px 10px; }
}
