/* Student Times — NYT-inspired mockup styles */

/* Self-hosted fonts (SIL OFL, see fonts/OFL.txt) — no external request, so the
   site runs under a strict CSP and stays private/offline-capable. @font-face
   font-family MUST be the literal family name (a var() here would break it). */
@font-face {
  font-family: "Old Standard TT";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/old-standard-tt-400.woff2") format("woff2");
}
@font-face {
  font-family: "Old Standard TT";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/old-standard-tt-700.woff2") format("woff2");
}
/* Playfair Display / Libre Franklin / Lora are variable — one file, 400–700. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/playfair-display.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/libre-franklin.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/lora.woff2") format("woff2");
}
@font-face {
  font-family: "UnifrakturMaguntia";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/unifraktur-maguntia-400.woff2") format("woff2");
}

:root {
  --ink: #121212;
  --muted: #666;
  --rule: #e2e2e2;
  --paper: #ffffff;
  --cream: #f7f5ef;
  --accent: #2e7d32;

  /* Typography tokens — the Design-tab font pickers set these via brand.js. */
  --font-display: "Old Standard TT", Georgia, "Times New Roman", serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
  --font-name: var(--font-display);   /* the masthead nameplate; may differ from headlines */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Accessibility ===== */
/* Visible focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to main content link — hidden until focused */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--accent);
  color: #fff !important;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .wl-splash { transition: opacity 0.01ms !important; }
}

/* ===== Top bar ===== */
/* A quiet utility strip. It sits directly above the masthead, so it stays
   muted by default and lets the paper's name lead — only the one action we
   actually want clicked carries the accent color. */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px 16px;
  flex-wrap: wrap;
}
.topbar-inner > div { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.topbar-inner > div:last-child { justify-content: flex-end; }
.topbar a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;          /* never split "Interested in writing?" mid-phrase */
  transition: color 0.15s ease;
}
.topbar a:hover,
.topbar a:focus-visible { color: var(--accent); }
/* The single reader-facing call to action. */
.topbar a.topbar-cta { color: var(--accent); }

/* ===== Masthead ===== */
.masthead {
  text-align: center;
  padding: 18px 20px 8px;
  border-bottom: 1px solid var(--rule);
}
.masthead h1 {
  font-family: var(--font-name);
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -1px;
  margin: 0;
}
.masthead .dateline {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* ===== Section nav ===== */
/* Section nav — NYT-style tabs: title-case links with an underline indicator on
   the active/hovered tab, framed by hairline rules. */
.sectionnav {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.sectionnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-sans);
}
.sectionnav-inner a {
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;               /* seat the underline on the nav's bottom rule */
  transition: color 120ms ease, border-color 120ms ease;
}
.sectionnav-inner a:hover {
  text-decoration: none;             /* use the tab underline, not the default link one */
  border-bottom-color: var(--muted);
}
.sectionnav a.active {
  font-weight: 700;
  border-bottom-color: var(--ink);
}
.sectionnav a.search-link {
  color: var(--muted);
  letter-spacing: 0;
}
.sectionnav a.search-link:hover {
  color: var(--ink);
  border-bottom-color: transparent;
}

/* ===== Search page ===== */
.search-form-page {
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.search-form-page input[type="search"] {
  flex: 1 1 280px;
  padding: 12px 14px;
  font-family: var(--font-serif);
  font-size: 17px;
  border: 1px solid var(--ink);
  background: #fff;
}
.search-form-page input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.search-form-page select {
  padding: 12px 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  border: 1px solid var(--rule);
  background: #fff;
}
.search-form-page .btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.search-form-page .btn-primary:hover { filter: brightness(0.92); }

.search-tip {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 24px;
}
.search-empty {
  padding: 30px 20px;
  background: var(--cream);
  text-align: center;
  font-size: 15px;
  color: #333;
}
.search-result {
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.search-result h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 6px;
}
.search-result p {
  font-size: 15px;
  color: #333;
  margin: 0 0 6px;
}
.search-result mark {
  background: #fff0a8;
  padding: 1px 2px;
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ===== Breaking news banner ===== */
.breaking-banner {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}
.breaking-banner .tag {
  background: #fff;
  color: var(--accent);
  padding: 2px 8px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Breaking news popup ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.popup-overlay.visible { display: flex; }
.popup {
  background: var(--paper);
  max-width: 480px;
  width: calc(100% - 40px);
  padding: 28px 28px 24px;
  position: relative;
  border-top: 4px solid var(--accent);
}
.popup .label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.popup h2 {
  font-size: 28px;
  margin: 8px 0 10px;
  line-height: 1.15;
}
.popup p {
  color: #333;
  font-size: 15px;
  margin: 0 0 16px;
}
.popup .popup-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}
.popup .popup-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--ink);
  padding: 8px 14px;
}

/* ===== Homepage grid ===== */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr;
  gap: 28px;
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
}

/* ===== Homepage — three-column magazine layout ===== */
.home-atlantic {
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 1000px) {
  .home-atlantic { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ha-right { grid-column: 1 / -1; border-top: 1px solid var(--ink); padding-top: 24px; }
}
@media (max-width: 640px) {
  .home-atlantic { grid-template-columns: 1fr; }
}

/* Left rail — two stacked stories */
.ha-left { display: flex; flex-direction: column; }
.ha-left-story { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
/* last-of-type, not last-child: the sponsor ad <div> can follow the stories,
   and the final story should still sit flush with no divider rule under it. */
.ha-left-story:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ha-left-media { display: block; margin-bottom: 12px; }
.ha-left-img { width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.ha-left-title { font-family: var(--font-serif); font-size: 25px; line-height: 1.14; font-weight: 700; margin: 0; }
.ha-left-title a { color: var(--ink); }

/* Center hero */
.ha-hero { text-align: center; }
.ha-hero-media { display: block; max-width: 460px; margin: 0 auto 16px; }
.ha-hero-img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.ha-hero .kicker { text-align: center; color: var(--muted); }
.ha-hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 6px 0 12px;
}
.ha-hero-title a { color: var(--ink); }
.ha-hero-deck {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.42;
  color: #333;
  margin: 0 auto 14px;
  max-width: 34em;
}

/* Right rail — headline + thumbnail list */
.ha-right { display: flex; flex-direction: column; }
.ha-right-item {
  display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rule);
}
.ha-right-item:last-of-type { border-bottom: none; }
.ha-right-text { min-width: 0; }
.ha-right-title { font-family: var(--font-serif); font-size: 19px; line-height: 1.18; font-weight: 700; margin: 0; }
.ha-right-title a { color: var(--ink); }
.ha-right-thumb { flex-shrink: 0; width: 82px; line-height: 0; }
.ha-right-img { width: 82px; height: 82px; object-fit: cover; display: block; }

/* Homepage bylines — uppercase sans author names, magazine style */
.ha-byline { font-family: var(--font-sans); margin-top: 10px; }
.ha-byline .byline-tag {
  text-transform: uppercase; letter-spacing: 0.6px; font-size: 11px; font-weight: 700;
  color: var(--ink); border: none; border-radius: 0; padding: 0; margin: 0 10px 0 0;
}
.ha-byline a.byline-tag:hover { color: var(--accent); }
.ha-byline .byline-tag-plain { color: var(--muted); }

/* Video thumbnails on the home grid */
.ha-video { position: relative; display: block; line-height: 0; }
.ha-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ha-video .play-icon {
  position: absolute; inset: 0; margin: auto; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; font-size: 15px;
}

/* Placeholder box shown where a photo will go (until one is added) */
.ha-ph {
  display: block;
  background-color: #ebe9e2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b3ada0' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4.5' width='18' height='15' rx='1.5'/><circle cx='8.5' cy='10' r='1.6'/><path d='M20 15l-4.5-4.5L7 19'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 34px;
}

/* Sponsor slot at the bottom of the right rail */
.ha-sponsor { margin-top: 4px; }
.ha-empty { color: var(--muted); font-style: italic; }

/* ===== Homepage drag-and-drop layout editor (editors only) ===== */
.wl-home-edit-bar {
  position: fixed; bottom: 20px; right: 20px; z-index: 300;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; padding: 8px 8px 8px 14px;
  border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-family: var(--font-sans);
}
.wl-home-edit-hint { font-size: 12px; color: rgba(255,255,255,0.8); }
.wl-home-edit-bar button {
  font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  border: none; border-radius: 999px; padding: 8px 16px;
}
#wl-home-edit-toggle { background: var(--accent); color: #fff; }
#wl-home-edit-toggle:hover { filter: brightness(0.92); }
#wl-home-edit-reset { background: transparent; color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.4); }
#wl-home-edit-reset:hover { background: rgba(255,255,255,0.12); }

body.wl-home-edit [data-home-id] {
  cursor: grab; position: relative;
  outline: 1px dashed var(--rule); outline-offset: 4px; border-radius: 2px;
  transition: outline-color 120ms ease;
}
body.wl-home-edit [data-home-id]:hover { outline-color: var(--muted); }
body.wl-home-edit [data-home-id].wl-dragging { opacity: 0.4; cursor: grabbing; }
body.wl-home-edit [data-home-id].wl-drop-target { outline: 2px solid var(--accent); outline-offset: 4px; }
/* In edit mode, clicks reorder — don't follow story links. */
body.wl-home-edit [data-home-id] a { pointer-events: none; }

/* Below the main grid */
.home-below { margin-top: 52px; }
.ha-more-head { margin-top: 8px; }
.ha-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 20px; }
.ha-more .ha-left-story { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

/* Homepage designated section blocks — one per editorial section, below the
   hero. Each leads with a large story and stacks up to three compact ones
   beside it; the lead side alternates block-to-block for a magazine rhythm. */
.home-section-block { margin-top: 56px; }

/* Header: display-serif section name over a single strong rule, accent "See all" */
.home-section-block .section-header {
  border-top: 2px solid var(--ink);
  border-bottom: none;
  padding: 12px 0 14px;
  margin-bottom: 26px;
  align-items: baseline;
}
.home-section-block .section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -0.4px;
}
.home-section-block .section-header h2 a { color: var(--ink); }
.home-section-block .section-header h2 a:hover { color: var(--accent); }
.home-section-block .see-all {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.home-section-block .see-all:hover { text-decoration: underline; }

/* Lead (wide) + stacked secondaries; flipped blocks put the lead on the right */
.hsb-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px 46px;
  align-items: start;
}
.home-section-block.hsb-flip .hsb-grid { grid-template-columns: 1fr 1.5fr; }
.home-section-block.hsb-flip .hsb-lead { order: 2; }

.hsb-lead-media { display: block; overflow: hidden; margin-bottom: 14px; }
.hsb-lead-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hsb-lead:hover .hsb-lead-img { transform: scale(1.035); }
.hsb-lead h3 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.12;
  font-weight: 700;
  margin: 2px 0 0;
}
.hsb-lead h3 a { color: var(--ink); }
.hsb-lead:hover h3 a { color: var(--accent); }
.hsb-lead .sec-deck { margin-top: 8px; }

.hsb-cards { display: flex; flex-direction: column; }
.hsb-mini {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 14px;
  align-items: start;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}
.hsb-mini:first-child { border-top: none; padding-top: 0; }
.hsb-mini:last-child { padding-bottom: 0; }
.hsb-mini h4 {
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 5px;
}
.hsb-mini h4 a { color: var(--ink); }
.hsb-mini h4 a:hover { color: var(--accent); }
.hsb-mini-thumb { line-height: 0; }
.hsb-mini-img { width: 92px; height: 69px; object-fit: cover; display: block; }

/* Stack to one column on narrow screens; the lead always comes first there */
@media (max-width: 700px) {
  .hsb-grid,
  .home-section-block.hsb-flip .hsb-grid { grid-template-columns: 1fr; gap: 20px; }
  .home-section-block.hsb-flip .hsb-lead { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hsb-lead-img { transition: none; }
}

.lede h2 {
  font-size: 44px;
  line-height: 1.05;
  margin: 8px 0 10px;
  font-weight: 700;
}
.lede .summary {
  font-size: 17px;
  color: #333;
}
.lede img {
  width: 100%;
  display: block;
  margin-bottom: 10px;
}
/* NYT-style byline: small sans in normal case (not all-caps), muted, with the
   author name in darker ink. */
.byline {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 8px;
}
.byline-link { color: var(--ink); font-weight: 600; }
.byline-link:hover { color: var(--accent); }

/* Author byline tags — each writer is a separate linked pill (never joined). */
.byline-tag {
  display: inline-block;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 1px 9px;
  margin: 0 5px 4px 0;
  font-size: 12px;
  line-height: 1.7;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
}
a.byline-tag:hover { border-color: var(--ink); text-decoration: none; }
.byline-tag-plain { color: var(--muted); }
.story {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.story:last-child { border-bottom: none; }
.story h3 {
  font-size: 22px;
  line-height: 1.15;
  margin: 4px 0 6px;
}
.story p {
  font-size: 14px;
  color: #333;
  margin: 0;
}
.kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 700;
}

/* ===== Section header (compact, used on utility pages) ===== */
.section-header {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.section-header h2 {
  font-size: 28px;
  margin: 0;
}
.section-header .see-all {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}

/* ===== Section hero (big display masthead for News/Features/Style/etc.) ===== */
/* Section page header — NYT op-ed style: left-aligned serif title with a muted
   eyebrow over a single hairline rule. No decorative flourish or tinted panel. */
.section-hero {
  text-align: left;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 28px;
}
.section-hero .kicker {
  color: var(--muted);
  letter-spacing: 1px;
  font-size: 11px;
}
.section-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.04;
  margin: 4px 0 6px;
  letter-spacing: -0.5px;
  font-weight: 700;
}
.section-hero-flourish { display: none; }

/* ===== Section page — NYT-style tiered grid (lead + cards + minis) ===== */
.sec-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 3px;
}
.sec-deck { font-size: 15px; color: #333; line-height: 1.45; margin: 6px 0 0; }
.sec-lead h2 a, .sec-card h3 a, .sec-mini h4 a { color: var(--ink); }
.sec-lead-media img, .sec-card-media img, .sec-mini-media img,
.sec-lead-media .photo, .sec-card-media .photo, .sec-mini-media .photo {
  width: 100%;
  display: block;
}

/* Lead: text left, large image right */
.sec-lead {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
  align-items: start;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.sec-lead h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.08;
  margin: 2px 0 0;
  font-weight: 700;
}

/* Secondary cards: image on top, 3 across */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 26px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--rule);
}
.sec-card-media { display: block; margin-bottom: 10px; }
.sec-card h3 { font-size: 20px; line-height: 1.2; margin: 2px 0 0; }

/* Overflow (everything past the top 4): a clean text list, no images */
.sec-more-wrap { margin-top: 6px; }
.sec-more-title {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  margin: 0;
}
.sec-more { list-style: none; padding: 0; margin: 0; }
.sec-mini { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sec-mini h4 { font-size: 18px; line-height: 1.25; margin: 0; font-weight: 700; }
.sec-mini .sec-eyebrow { margin-top: 4px; }

/* Heading that separates content-type blocks on a multi-type section page */
.sec-block-title {
  font-family: var(--font-sans);
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--ink);
  margin: 44px 0 20px;
}
.sec-block-title:first-child { margin-top: 0; }

/* Centerspread pieces (poems, art/photos, reveal-answer) on a section page */
.sec-pieces { display: grid; gap: 40px; }
.sec-pieces .print-piece { margin: 0; }
.sec-pieces .print-piece-head { margin-bottom: 14px; }
.sec-pieces .print-piece-head h3 { font-family: var(--font-serif); font-size: 26px; line-height: 1.15; margin: 6px 0 6px; font-weight: 700; }
.sec-pieces .poem-piece { background: rgba(46,125,50,0.05); padding: 22px 24px 18px; border-left: 3px solid var(--accent); }
.sec-pieces .poem-piece .print-piece-head h3 { color: var(--accent); }
.sec-pieces .poem-body { font-family: var(--font-serif); font-size: 17px; line-height: 1.6; color: var(--ink); }
.sec-pieces .poem-stanza { margin-bottom: 18px; }
.sec-pieces .poem-stanza p { margin: 0; padding: 0; }
.sec-pieces .poem-stanza p:nth-child(even) { padding-left: 24px; }
.sec-pieces .teacher-body p { font-family: var(--font-serif); font-size: 16px; line-height: 1.6; margin: 0 0 14px; }
.sec-pieces .print-piece-figure { margin: 0; }
.sec-pieces .print-piece-figure img { width: 100%; display: block; }
.sec-pieces .reveal { margin-top: 18px; background: var(--cream); padding: 12px 16px; border-left: 4px solid var(--accent); }
.sec-pieces .reveal summary { font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); cursor: pointer; list-style: none; }
.sec-pieces .reveal summary::-webkit-details-marker { display: none; }
.sec-pieces .reveal summary::before { content: "▸ "; color: var(--accent); display: inline-block; }
.sec-pieces .reveal[open] summary::before { content: "▾ "; }
.sec-pieces .reveal-body { font-family: var(--font-serif); font-size: 19px; margin-top: 10px; line-height: 1.4; }

/* Interactive puzzles embedded on a section page (auto-sized via postMessage) */
.sec-puzzles-frame { display: block; width: 100%; height: 900px; border: 0; background: #fff; }

/* Custom (editor-written) content on a section page, rendered in a sandbox */
.sec-custom { margin-top: 8px; }
.sec-custom-frame { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; }

.schedule-banner { background: #fff7e0; border: 1px solid #e2c766; color: #7a5c00; font-family: var(--font-sans); font-size: 14px; font-weight: 600; padding: 10px 14px; margin: 0 0 20px; }

@media (max-width: 640px) {
  .sec-lead { grid-template-columns: 1fr; }
  .sec-lead-media { order: -1; }   /* image above text on narrow screens */
}
.section-hero-deck {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  color: #333;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===== Masthead ornaments — decorative marks flanking the paper's name. ===== */
.masthead {
  position: relative;
}
/* The masthead flourish is a school-supplied file (config.js → ornament.file).
   It keeps the art's own colors — never tint it with --accent. Width, opacity,
   and mirroring are set from config.js by brand.js. */
.masthead-ornament {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: var(--ornament-opacity, 0.55);
  display: none;
  pointer-events: none;
}
.masthead-ornament img,
.masthead-ornament svg {
  display: block;
  width: var(--ornament-width, 72px);
  height: auto;
}
.masthead-ornament.left { left: clamp(20px, 8vw, 140px); }
.masthead-ornament.right { right: clamp(20px, 8vw, 140px); transform: translateY(-50%) scaleX(-1); }
/* Art with text or a crest reads backwards when flipped — ornament.mirror: false. */
.masthead-ornament.right.no-mirror { transform: translateY(-50%); }
@media (min-width: 880px) { .masthead-ornament { display: block; } }

/* Inline text editor (editors only) — hover hints the element is editable. */
.wl-text-editable {
  cursor: text;
  transition: outline-color 0.1s, background-color 0.1s;
  outline: 1px dashed transparent;
  outline-offset: 4px;
  border-radius: 2px;
}
.wl-text-editable:hover {
  outline-color: var(--accent);
  background-color: rgba(46, 125, 50, 0.06);
}
.wl-text-editable:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  background-color: rgba(46, 125, 50, 0.08);
}


/* ===== Game of the Week ===== */
.game-of-week {
  background: var(--accent);
  color: #fff;
  padding: 28px 32px 30px;
  margin-bottom: 28px;
  position: relative;
}
.game-of-week .gotw-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  background: #fff;
  color: var(--accent);
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 14px;
}
.game-of-week .gotw-kicker {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 4px;
}
.game-of-week .gotw-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 700;
}
.game-of-week .gotw-vs {
  font-style: italic;
  opacity: 0.85;
  font-weight: 400;
}
.game-of-week .gotw-meta {
  font-family: var(--font-sans);
  font-size: 15px;
  margin-bottom: 6px;
}
.game-of-week .gotw-note {
  font-family: var(--font-sans);
  font-size: 14px;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 6px;
}
.game-of-week .gotw-theme {
  display: inline-block;
  background: #fff;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  margin: 6px 0 14px;
}
.game-of-week .gotw-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border-bottom: 2px solid rgba(255,255,255,0.5);
  padding-bottom: 1px;
}
.game-of-week .gotw-link:hover { border-bottom-color: #fff; text-decoration: none; }

/* ===== Sports page: teams grid + weekly schedule ===== */
.sports-subsection {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.sports-sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sports-sub-head h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0;
  border-bottom: none;
}
.sports-more-link {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.3px;
}
.sports-more-link.muted { color: var(--muted); font-weight: 400; }

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.team-card {
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  padding: 12px 14px;
  background: #fff;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.15s;
}
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  text-decoration: none;
}
.team-card .team-sport {
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.team-card h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  margin: 0 0 10px;
  line-height: 1.2;
}
.team-card .team-record {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}
.team-card .record-big {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.team-card .record-pct {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
}
.team-card .team-record-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}


/* ===== Writer profile page ===== */
.writer-hero {
  padding: 8px 0 24px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 28px;
}
.writer-text h1 {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.05;
  margin: 4px 0 4px;
}
.writer-text .kicker { margin-bottom: 4px; }
.writer-year {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.writer-articles-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  margin: 0 0 18px;
}
.writer-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.writer-articles-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.writer-articles-list h3 {
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 6px;
}
.writer-articles-list p {
  font-size: 15px;
  color: #333;
  margin: 0 0 6px;
}
/* ===== Individual team page ===== */
.back-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.team-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 28px;
}
@media (max-width: 700px) { .team-hero { grid-template-columns: 1fr; } }
.team-hero h1 {
  font-size: 52px;
  line-height: 1.05;
  margin: 6px 0 8px;
  letter-spacing: -1px;
}
.team-hero .kicker { margin-bottom: 4px; }
.team-hero .team-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}
.record-block {
  text-align: center;
  padding: 14px 26px;
  background: var(--accent);
  color: #fff;
  min-width: 160px;
}
.record-block .record-label {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.85;
}
.record-block .record-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.record-block .record-sub {
  font-family: var(--font-sans);
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

.game-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
}
.game-table th, .game-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.game-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
}
.game-table .game-score {
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.game-table .game-note {
  color: var(--muted);
  font-size: 12px;
}

.result-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 10px;
  min-width: 26px;
  text-align: center;
}
.result-badge.result-w { background: var(--accent); color: #fff; }
.result-badge.result-l { background: #ddd; color: #444; }
.result-badge.result-t { background: #fff0a8; color: #6b5100; }

/* ===== Brackets ===== */
.bracket-section {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.bracket-title {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 0 0 4px;
}
.bracket-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.bracket-tree {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 8px 0 4px;
}
.bracket-round {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.bracket-round-title {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}
.bracket-matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
  flex: 1;
}
.bracket-match {
  border: 1px solid var(--rule);
  background: #fff;
  width: 220px;
  font-family: var(--font-sans);
  overflow: hidden;
}
.bracket-match.pending {
  background: var(--cream);
  border-style: dashed;
}
.bracket-team {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bracket-team:last-child { border-bottom: none; }
.bracket-team.won {
  background: var(--accent);
  color: #fff;
}
.bracket-team.lost {
  color: var(--muted);
  font-weight: 400;
}
.bracket-team.home-team:not(.won):not(.lost) {
  background: #fff8d6;
}
.bracket-team.home-team.won {
  background: var(--accent);
  box-shadow: inset 4px 0 0 #ffce47;
}
.bracket-result {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 12px;
  background: #fafafa;
  border-top: 1px solid var(--rule);
}
.bracket-scheduled {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 12px;
  border-top: 1px solid var(--rule);
}

/* ===== Section page article list ===== */
.article-list .story h3 { font-size: 26px; }
.article-list .story p { font-size: 15px; margin-top: 6px; }

/* ===== Article page ===== */
.article-page {
  max-width: 720px;
  margin: 0 auto;
}
.article-page .kicker { margin-bottom: 6px; }
.article-page h1 {
  font-size: 42px;
  line-height: 1.1;
  margin: 4px 0 14px;
}
.article-page .deck {
  font-size: 19px;
  color: #333;
  margin-bottom: 18px;
}
.article-page .byline { margin-bottom: 22px; }
.article-page img {
  width: 100%;
  display: block;
  margin: 0 0 10px;
}
.article-page .caption {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.article-page p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 18px;
}

/* Homepage video module */
.home-video-module {
  margin-top: 30px;
}
.home-video-featured {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s;
}
.home-video-featured:hover { text-decoration: none; transform: translateY(-2px); }
.home-video-featured:hover h3 { text-decoration: underline; }
.home-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  margin-bottom: 12px;
}
.home-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-video-text .kicker { margin-bottom: 6px; }
.home-video-text h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.home-video-text p {
  font-size: 15px;
  color: #333;
  line-height: 1.45;
  margin: 0 0 8px;
}

/* Video section */
.video-grid {
  display: grid;
  gap: 18px;
}
.video-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.video-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s;
}
.video-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.video-card:hover h4 { text-decoration: underline; }

.video-thumb {
  position: relative;
  background: #000;
  overflow: hidden;
}
.video-grid.wide .video-thumb { aspect-ratio: 16 / 9; }
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a2a2a, #555);
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  background: rgba(0,0,0,0.2);
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  pointer-events: none;
  transition: background 0.15s;
}
.video-card:hover .video-play { background: rgba(0,0,0,0.35); }
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  letter-spacing: 0.5px;
}
.video-body {
  padding: 10px 0 0;
}
.video-body h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.25;
  margin: 4px 0 6px;
}

/* Video embed (on video.html) */
.video-embed-wide {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 18px 0 10px;
  background: #000;
  padding-bottom: 56.25%;
}
.video-embed-wide iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-description {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
  max-width: 680px;
}

/* Gallery */
#art-gallery { margin: 28px 0 12px; }
.gallery-heading {
  font-family: var(--font-serif);
  font-size: 18px;
  margin: 0 0 10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.gallery-thumb {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.gallery-thumb:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 40px;
}
.lightbox-overlay.visible { display: flex; }
.lightbox-overlay .lb-img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  object-fit: contain;
}
.lightbox-overlay .lb-caption {
  position: absolute;
  bottom: 60px;
  left: 0; right: 0;
  color: #fff;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 0 20px;
}
.lightbox-overlay .lb-count {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 1px;
}
.lightbox-overlay button {
  position: absolute;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 30px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-overlay .lb-close { top: 20px; right: 20px; }
.lightbox-overlay .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-overlay .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-overlay button:hover { background: rgba(0,0,0,0.7); }

/* Generic movable element (cross-page) — row/column layout system */
.wl-row {
  display: flex;
  gap: 22px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.wl-row > * {
  flex: 1 1 0;
  min-width: 0;
}
.wl-row.wl-row-single { justify-content: center; }
.wl-row.wl-row-single > * { flex: 1 1 0; }
/* Section pages: article list should be about twice the width of the aside
   when they share a row (matches the old 2fr / 1fr grid). */
.wl-row > .article-list { flex: 2 1 0; }
.wl-row > aside { flex: 1 1 0; }

/* Columns inside a row — each column may stack multiple blocks vertically. */
.wl-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* A column that holds the article list behaves like the old 2-col grid: wider. */
.wl-row > .wl-col.wl-col-wide { flex: 2 1 0; }
.wl-row.wl-row-single > .wl-col.wl-col-wide { flex: 1 1 0; max-width: none; }

/* Row-gap drop zones — only visible while dragging in edit mode. */
.wl-row-gap { height: 0; }
body.wl-layout-edit .wl-row-gap {
  height: 12px;
  margin: 4px 0;
  border-radius: 3px;
  transition: background 0.15s, height 0.15s;
}
body.wl-layout-edit .wl-row-gap.wl-row-gap-active {
  background: rgba(46,125,50,0.28);
  height: 24px;
}

@media (max-width: 720px) {
  .wl-row { flex-direction: column; }
  .wl-row > * { width: 100%; }
  .wl-row > .wl-col { max-width: none; }
}

.wl-move-controls {
  display: none;
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--accent);
  color: #fff;
  padding: 4px 8px;
  z-index: 30;
  gap: 6px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
body.wl-layout-edit .wl-move-controls { display: flex; }
body.wl-layout-edit [data-move-key] {
  position: relative;
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  cursor: grab;
}
body.wl-layout-edit [data-move-key].wl-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.wl-move-controls .wl-move-label {
  text-transform: capitalize;
  letter-spacing: 0.3px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wl-move-controls .wl-mc-handle {
  padding-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.3);
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
}

/* Drop indicator bar, shown during drag on the target edge */
.wl-drop-indicator {
  position: fixed;
  background: var(--accent);
  z-index: 9999;
  pointer-events: none;
  display: none;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(46,125,50,0.6);
}

/* Reset button sits just above the Edit layout toggle */
.wl-layout-reset {
  position: fixed;
  bottom: 72px;
  right: 22px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 999px;
}
.wl-layout-reset:hover { background: var(--cream); }

/* ===== In-place layout editor (editors only) ===== */
.wl-block { position: relative; }

.wl-block-controls {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  padding: 4px 6px;
  z-index: 30;
  display: none;
  gap: 6px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  max-width: calc(100% - 4px);
}
body.wl-layout-edit .wl-block-controls { display: flex; }
body.wl-layout-edit .wl-block {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
  min-height: 36px;
}
.wl-block-controls .wl-block-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.wl-block-controls .wl-ctl {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  padding: 2px 8px;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  font-weight: 700;
}
.wl-block-controls .wl-ctl:hover:not(:disabled) { background: rgba(255,255,255,0.35); }
.wl-block-controls .wl-ctl:disabled { opacity: 0.35; cursor: default; }
.wl-block-controls .wl-ctl-zone {
  background: #fff;
  color: var(--ink);
  border: none;
  padding: 2px 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-transform: capitalize;
}

.wl-layout-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-radius: 999px;
}
.wl-layout-toggle:hover { filter: brightness(0.92); }
body.wl-layout-edit .wl-layout-toggle { background: #c9b458; }

/* When in edit mode, subtly highlight the zones so it's clear where a block
   lives and where it can go. */
body.wl-layout-edit [data-zone]:empty::after {
  content: "Empty zone — move blocks here";
  display: block;
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-style: italic;
  border: 2px dashed var(--rule);
}

/* Homepage layout (single column — main content fills the page) */
.home-layout { display: block; }
.home-main { min-width: 0; }

/* Tags */
.article-tags {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
/* Why a search result matched, when it matched on a tag rather than on text. */
.search-tags { margin-top: 6px; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.tag-chip {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  padding: 4px 10px;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
}
.tag-chip::before { content: "#"; color: var(--muted); margin-right: 2px; }
.tag-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.tag-chip:hover::before { color: rgba(255,255,255,0.7); }
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
}
.tag-chip .tag-count {
  background: var(--rule);
  color: var(--muted);
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10px;
}

.related-articles {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 3px solid var(--ink);
}
.related-articles .related-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.related-card {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0;
}
.related-card:hover { text-decoration: none; }
.related-card:hover h4 { text-decoration: underline; }
.related-card h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.25;
  margin: 4px 0 6px;
}
.related-card p {
  font-size: 14px;
  color: #333;
  margin: 0 0 6px;
  line-height: 1.4;
}

/* Card thumbnails (section pages + homepage cards) */
.card-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}
.card-video {
  position: relative;
  margin-bottom: 10px;
}
.card-video .card-photo { margin-bottom: 0; }
.card-video .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.15);
  pointer-events: none;
  transition: background 0.15s;
}
.card-video:hover .play-icon { background: rgba(0,0,0,0.3); }

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 0 0 10px;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.article-photo {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 10px;
}
.article-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.share-row {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.share-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--rule);
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.share-btn:hover { background: var(--cream); text-decoration: none; }

/* ===== Footer ===== */
footer {
  background: var(--accent);
  color: #fff;
  padding: 24px 20px;
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: center;
  line-height: 1.7;
}
footer a {
  color: #fff;
  text-decoration: underline;
}
footer a:hover { opacity: 0.85; }

/* ===== Splash screen ===== */
.wl-splash {
  position: fixed;
  inset: 0;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.7s ease;
}
.wl-splash.fade-out { opacity: 0; pointer-events: none; }
.wl-splash-stack {
  text-align: center;
  color: #fff;
}

.wl-splash-mark {
  font-family: var(--font-display);
  font-size: clamp(96px, 18vw, 240px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -4px;
  opacity: 0;
  animation: splash-fade-in 0.8s ease-out forwards;
}
@keyframes splash-fade-in {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* "The Student Times" types out one letter at a time. Each .wl-splash-letter
   carries an inline animation-delay that staggers its fade-in. */
.wl-splash-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 4vw, 48px);
  margin-top: 18px;
  white-space: nowrap;
}
.wl-splash-letter,
.wl-splash-space {
  display: inline-block;
  opacity: 0;
  animation-name: splash-letter-type;
  animation-duration: 0.25s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
.wl-splash-space { width: 0.35em; }
@keyframes splash-letter-type {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Account / auth ===== */
/* Account strip: the destination (Dashboard / My Account) is the one accent
   link; sign-in/out are secondary, and the separators recede. */
.topbar-account { color: var(--rule); }
.topbar-account a { color: var(--muted); font-weight: 600; }
.topbar-account a:hover,
.topbar-account a:focus-visible { color: var(--accent); }
.topbar-account a.wl-account-primary { color: var(--accent); }
.topbar-user { color: var(--ink); font-weight: 700; }

/* Standalone-demo scaffolding — a way into the dashboards without the host
   platform. Real controls should not have to compete with it, so it reads as
   a note rather than a fifth shouting link. */
.wl-demo-link {
  font-weight: 400 !important;
  font-style: italic;
  color: var(--muted) !important;
  opacity: 0.8;
}
.wl-demo-link:hover,
.wl-demo-link:focus-visible { opacity: 1; color: var(--accent) !important; }

.wl-writers-link { font-style: italic; color: var(--muted) !important; font-weight: 600; }
.wl-writers-link:hover,
.wl-writers-link:focus-visible { color: var(--accent) !important; }

.wl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.wl-modal-overlay.visible { display: flex; }
.wl-modal {
  background: #fff;
  padding: 28px 28px 22px;
  width: calc(100% - 40px);
  max-width: 380px;
  position: relative;
  border-top: 4px solid var(--accent);
  font-family: var(--font-sans);
}
.wl-modal h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  margin: 0 0 6px;
}
.wl-modal .wl-demo-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}
.wl-modal label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
}
.wl-modal input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid var(--rule);
  font-family: inherit;
  font-size: 14px;
  background: #fafafa;
  box-sizing: border-box;
}
.wl-modal input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.wl-modal .wl-error {
  color: #b8002a;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.wl-modal .wl-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
}
.wl-modal .wl-submit:hover { filter: brightness(0.92); }
.wl-modal-close {
  position: absolute;
  top: 8px; right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
}

.account-prompt {
  padding: 20px;
  background: var(--cream);
  font-size: 15px;
  color: #333;
}

/* ===== Page flourish (decorative filler) ===== */
.page-flourish {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent);
  opacity: 0.7;
  margin: 48px auto 20px;
  text-align: center;
}
.page-flourish svg {
  width: 100px;
  height: auto;
  display: block;
}
.page-flourish.flourish-large svg { width: 160px; }
.page-flourish-caption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
@media (prefers-reduced-motion: no-preference) {
  .page-flourish svg path { animation: flourish-draw 1.2s ease-out both; }
}
@keyframes flourish-draw {
  0%   { stroke-dasharray: 300; stroke-dashoffset: 300; opacity: 0; }
  100% { stroke-dasharray: 300; stroke-dashoffset: 0;   opacity: 1; }
}

/* Placeholder image boxes (no real images in mockup) */
.photo {
  background: #ece8df;
  aspect-ratio: 3 / 2;
}
.photo.wide { aspect-ratio: 16 / 9; }

/* Honeypot — a field only a bot will fill in. Kept out of sight, out of the
   tab order, and out of the accessibility tree (aria-hidden in the markup).
   Never use display:none alone: some bots skip those and fill the rest. */
.wl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== Editor: "Brand design" tab — site-wide settings, set apart from the
   content-section tabs. Right-aligned pill with a palette icon, not another
   underlined section tab. Lives here (not the per-page <style>) so it applies
   on every editor page. ===== */
.ed-tabs .ed-tab-brand {
  margin-left: auto;                    /* push to the far right, away from sections */
  align-self: center;
  border: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); /* cancel the 3px transparent tab underline */
  border-radius: 6px;
  padding: 7px 14px 7px 11px;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ed-tabs .ed-tab-brand::before {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin-right: 7px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M12%202C6.5%202%202%206%202%2011c0%204.4%203.6%208%208%208%20.7%200%201.3-.6%201.3-1.3%200-.3-.1-.6-.4-.9-.2-.3-.4-.6-.4-.9%200-.7.6-1.3%201.3-1.3H13c3.9%200%207-2.7%207-6%200-3.9-3.6-6.5-8-6.5zM6.5%2012a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203zm3-4a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203zm5%200a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M12%202C6.5%202%202%206%202%2011c0%204.4%203.6%208%208%208%20.7%200%201.3-.6%201.3-1.3%200-.3-.1-.6-.4-.9-.2-.3-.4-.6-.4-.9%200-.7.6-1.3%201.3-1.3H13c3.9%200%207-2.7%207-6%200-3.9-3.6-6.5-8-6.5zM6.5%2012a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203zm3-4a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203zm5%200a1.5%201.5%200%201%201%200-3%201.5%201.5%200%200%201%200%203z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}
.ed-tabs .ed-tab-brand:hover { background: var(--cream); color: var(--ink); border-color: var(--ink); }
.ed-tabs .ed-tab-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-tabs .ed-tab-brand.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
@media (max-width: 620px) {
  .ed-tabs .ed-tab-brand { margin-left: 0; }   /* don't strand it when tabs wrap */
}

/* Brand-design page header: title + a one-line "this is site-wide" subtitle. */
.section-header.brand-header { align-items: flex-start; }
.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin: 3px 0 0;
  max-width: 60ch;
  line-height: 1.4;
}

/* Date beside a front-page byline. Muted: it's orientation, not the story. */
.ha-date { color: var(--muted); white-space: nowrap; }

/* ===== Tag picker in the article editor =====
   A search rather than a row of checkboxes: a paper with thirty tags cannot
   show thirty checkboxes in a modal and call that a choice. */
.ed-tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1px solid var(--rule); border-radius: 999px;
  padding: 3px 6px 3px 11px; margin: 0 6px 6px 0;
  font-family: "Helvetica Neue", Arial, sans-serif; font-size: 13px; color: var(--ink);
  text-transform: none; letter-spacing: 0;
}
.ed-tag-chip button {
  border: none; background: none; cursor: pointer; padding: 0 4px;
  font-size: 16px; line-height: 1; color: var(--muted);
}
.ed-tag-chip button:hover { color: #b8002a; }
.ed-tag-chip button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.ed-tag-search-wrap { position: relative; }

/* The menu floats over the form rather than pushing it around as you type. */
#ed-tag-results {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%; z-index: 10;
  background: #fff; border: 1px solid var(--rule); border-top: none;
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}
#ed-tag-results.is-open { display: block; }
.ed-tag-option {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border: none; background: none; cursor: pointer;
  font-family: "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: var(--ink);
}
.ed-tag-option:hover, .ed-tag-option:focus-visible { background: var(--cream); outline: none; }
.ed-tag-empty {
  padding: 9px 12px; font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
