/* WORLDTECH DAILY EDITION
   A paper surface inside the dark WORLDTECH chrome: newspaper typography and
   rules, no neon and no fake dashboard. Loaded only by /daily and its archive,
   so the homepage and story pages carry none of this weight.

   Without JavaScript the pages simply stack and read top to bottom. daily.js
   adds .is-interactive, and only then does the spread and the page turn exist,
   so a script failure costs the animation, never the news. */

.daily,
.daily-archive-page { --ink: #14181d; --ink-soft: #4a545e; --paper: #f6f3ec;
  --paper-edge: #e3ddd0; --rule: #cdc5b4; --accent: #17414f; }

/* ---------------------------------------------------------------- masthead */
.daily-masthead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border-top: 3px solid var(--text); border-bottom: 1px solid var(--line);
  padding: 22px 0 18px; margin: 8px 0 20px; }
.daily-mark { width: 46px; height: 46px; border-radius: 9px; flex: none; background: #03070d; }
.daily-masthead-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-wordmark { font-size: 27px; font-weight: 900; letter-spacing: -1.3px; line-height: 1; }
.daily-wordmark > span { color: var(--cyan); }
.daily-title { font-family: Georgia, 'Times New Roman', serif; font-size: 15px;
  letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.daily-masthead-meta { margin-left: auto; text-align: right; display: flex;
  flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.daily-masthead-meta time { color: var(--text); letter-spacing: .04em; }
.daily-state { letter-spacing: .1em; text-transform: uppercase; font-size: 9px; }
.daily-archive-link { color: var(--cyan); font-size: 11px; }
.daily-standfirst { color: var(--muted); font-size: 13px; max-width: 70ch; margin: 0 0 18px; }

/* ----------------------------------------------------------------- toolbar */
.daily-tools { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.daily-tools button { border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px;
  font-size: 12px; color: var(--text); background: var(--panel); }
.daily-tools button:hover { border-color: #5d7d8c; color: var(--cyan); }
.daily-tools button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }

/* ------------------------------------------------------------- the pages */
.daily-book { display: flex; flex-direction: column; gap: 26px; }
.daily-page { background: var(--paper); color: var(--ink); padding: 34px 32px 30px;
  border: 1px solid var(--paper-edge); border-radius: 2px;
  box-shadow: 0 18px 44px #0006; }
.daily-page-head { display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 22px;
  font-family: Georgia, 'Times New Roman', serif; }
.daily-page-label { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.daily-page-number { font-size: 11px; color: var(--ink-soft); }

.daily-article { border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 18px; }
.daily-article:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.daily-kicker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px; }
.daily-status { font-size: 8px; font-weight: 600; letter-spacing: .08em; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 2px; padding: 2px 5px; }
.daily-headline { font-family: Georgia, 'Times New Roman', serif; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.12; margin: 0 0 10px; }
.daily-headline a { color: inherit; text-decoration: none; }
.daily-headline a:hover, .daily-headline a:focus-visible { color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px; }
.daily-lead .daily-headline { font-size: clamp(26px, 3.4vw, 40px); }
.daily-article .daily-headline { font-size: 20px; }
.daily-lede { font-family: Georgia, 'Times New Roman', serif; font-size: 15px;
  line-height: 1.62; color: #23292f; margin: 0 0 10px; }
.daily-lead .daily-lede { font-size: 16.5px; }
.daily-lead .daily-lede::first-letter { float: left; font-size: 52px; line-height: .82;
  padding: 6px 9px 0 0; font-weight: 700; }
.daily-byline { font-size: 10.5px; letter-spacing: .04em; color: var(--ink-soft); margin: 0; }
.daily-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Photographs keep the site's own media component and its credits; only the
   frame is re-dressed for paper. */
.daily-visual { margin: 0 0 12px; }
.daily-visual .story-visual { margin: 0; }
.daily-visual .media { height: 210px; border-color: var(--rule); }
.daily-lead .daily-visual .media { height: 300px; }
.daily-visual .media-credit, .daily-visual figcaption { color: var(--ink-soft); font-size: 10px;
  padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.daily-visual .media-credit a { color: var(--accent); }
.daily-visual .credit-more summary { color: var(--accent); font-size: 10px; }

/* Two columns of text once the page is wide enough to hold them. */
@media (min-width: 900px) {
  .daily-page-front .daily-lead { display: grid; grid-template-columns: 1.25fr 1fr;
    grid-template-areas: "kicker kicker" "head visual" "lede visual" "byline visual"; gap: 0 26px; }
  .daily-page-front .daily-lead .daily-kicker { grid-area: kicker; }
  .daily-page-front .daily-lead .daily-headline { grid-area: head; }
  .daily-page-front .daily-lead .daily-visual { grid-area: visual; }
  .daily-page-front .daily-lead .daily-lede { grid-area: lede; }
  .daily-page-front .daily-lead .daily-byline { grid-area: byline; align-self: start; }
}

/* ---------------------------------------------------------------- controls */
.daily-controls { display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 22px 0 8px; }
.daily-controls button { border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px;
  font-size: 13px; color: var(--text); background: var(--panel); }
.daily-controls button:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.daily-controls button:disabled { opacity: .45; }
.daily-position { font-size: 12px; color: var(--muted); margin: 0; min-width: 11ch; text-align: center; }
.daily-foot { font-size: 11px; color: var(--muted); max-width: 70ch; margin-top: 18px; }

/* ------------------------------------------------------- interactive spread */
/* Everything below applies only when daily.js has taken over. */
.daily.is-interactive .daily-book { position: relative; display: block;
  perspective: 2400px; perspective-origin: 50% 46%; touch-action: pan-y; }
.daily.is-interactive .daily-page { position: absolute; inset: 0; margin: 0;
  overflow: hidden; backface-visibility: hidden; }
.daily.is-interactive .daily-page[hidden] { display: none; }

/* Mobile and tablet: one page at a time, swiped. No two-page spread is ever
   squeezed onto a small screen. */
.daily.is-interactive.is-single .daily-book { height: 78vh; min-height: 520px; }
.daily.is-interactive.is-single .daily-page { padding: 24px 20px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; }
.daily.is-interactive.is-single .daily-page.is-current { display: block; }

/* Desktop: a real two-page spread with a spine. */
.daily.is-interactive.is-spread .daily-book { height: 86vh; min-height: 620px;
  display: grid; grid-template-columns: 1fr 1fr; }
.daily.is-interactive.is-spread .daily-book::after { content: ""; position: absolute;
  top: 0; bottom: 0; left: 50%; width: 46px; transform: translateX(-50%);
  background: linear-gradient(90deg, #0000, #00000024 38%, #00000038 50%, #00000024 62%, #0000);
  pointer-events: none; z-index: 6; }
.daily.is-interactive.is-spread .daily-page { position: absolute; top: 0; bottom: 0;
  width: 50%; overflow-y: auto; }
.daily.is-interactive.is-spread .daily-page.is-left { left: 0; right: auto; }
.daily.is-interactive.is-spread .daily-page.is-right { left: 50%; right: auto; }

/* The turning sheet: a leaf with the outgoing page on its front and the
   incoming one on its back, rotated about the spine. */
.daily-sheet { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%;
  transform-origin: left center; transform-style: preserve-3d; z-index: 8;
  will-change: transform; cursor: grab; }
.daily-sheet.is-dragging { cursor: grabbing; }
.daily-sheet.is-animating { transition: transform .62s cubic-bezier(.22, .61, .36, 1); }
.daily-sheet-face { position: absolute; inset: 0; overflow: hidden;
  backface-visibility: hidden; background: var(--paper); border: 1px solid var(--paper-edge); }
.daily-sheet-face.is-back { transform: rotateY(180deg); }
.daily-sheet-face > .daily-page { position: absolute; inset: 0; width: 100%;
  box-shadow: none; border: 0; }
/* Paper depth: a shadow that deepens as the leaf lifts, and the shading a
   curled sheet casts on the page beneath it. */
.daily-sheet-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #00000038, #0000 28%); opacity: .0; }
.daily-sheet.is-lifted .daily-sheet-shade { opacity: 1; }
.daily-sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: -18px 0 38px #0000004d; opacity: 0; transition: opacity .3s; }
.daily-sheet.is-lifted::after { opacity: 1; }

.daily-hint { font-size: 11px; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* Anyone who asked for less motion gets the same newspaper without the flip. */
@media (prefers-reduced-motion: reduce) {
  .daily-sheet, .daily-sheet.is-animating { transition: none !important; }
  .daily-sheet::after { transition: none; }
}

/* ----------------------------------------------------------------- archive */
.daily-archive { border-top: 1px solid var(--line); max-width: 760px; }
.daily-archive li { border-bottom: 1px solid var(--line); }
.daily-archive a { display: flex; align-items: center; gap: 12px; padding: 16px 4px; font-size: 15px; }
.daily-archive a:hover { color: var(--cyan); }
.daily-archive-today { font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px; padding: 2px 6px; color: var(--muted); }

@media (max-width: 720px) {
  .daily-masthead-meta { margin-left: 0; text-align: left; width: 100%; }
  .daily-page { padding: 22px 18px; }
}
