/* Fonts are bundled with the site (SIL Open Font License) so nothing is loaded from other websites. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/static/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/static/fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/static/fonts/literata-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
[hidden] { display: none !important; }
/* ------------------------------------------------------------------
   Current Affairs - reading design
   Idea: each kind of section is a different highlighter pen. The colour
   tells you what you are reading, and bold key terms get the pen mark.
   ------------------------------------------------------------------ */
:root {
  --bg: #f3f4fa;
  --surface: #ffffff;
  --ink: #161a3a;
  --muted: #5a6088;
  --line: #dcdfee;
  --brand: #8a171a;
  --brand-2: #f2b01e;
  --link: #2f3fb8;

  --c-why: #e39b0b;       --on-why: #2a1b00;
  --c-key: #b3262f;       --on-key: #fff;
  --c-impl: #4a4fd1;      --on-impl: #fff;
  --c-way: #1f8a52;       --on-way: #fff;
  --c-mains: #8a3aa3;     --on-mains: #fff;
  --c-other: #5a6088;     --on-other: #fff;
  --c-keywords: #5565d6;  --on-keywords: #fff;
  --c-places: #1c8fd6;    --on-places: #fff;
  --c-species: #3a9a46;   --on-species: #fff;
  --c-maps: #c76a1a;      --c-facts: #5a6088;

  --sh: 0 1px 2px rgb(22 26 58 / .06), 0 8px 24px -12px rgb(22 26 58 / .18);
  --font-ui: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-read: "Literata", Georgia, "Times New Roman", serif;
  --measure: 66ch;
}
:root[data-theme="dark"] {
  --bg: #0d1024; --surface: #161b38; --ink: #e9eaf6; --muted: #a0a6d0; --line: #272d56;
  --brand: #b32228; --link: #9aa7ff; --sh: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
  --c-why: #f0b030; --c-key: #e0525b; --c-impl: #7a7fff; --c-way: #3fb878; --c-mains: #b86ad2;
  --c-other: #8a90c0; --c-keywords: #8190ff; --c-places: #42b0f2; --c-species: #5cc068;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1024; --surface: #161b38; --ink: #e9eaf6; --muted: #a0a6d0; --line: #272d56;
    --brand: #b32228; --link: #9aa7ff; --sh: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
    --c-why: #f0b030; --c-key: #e0525b; --c-impl: #7a7fff; --c-way: #3fb878; --c-mains: #b86ad2;
    --c-other: #8a90c0; --c-keywords: #8190ff; --c-places: #42b0f2; --c-species: #5cc068;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-read); font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-ui); margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 62px; display: flex; align-items: center; gap: 18px; font-family: var(--font-ui); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 800; }
.top-nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 10px; border-radius: 8px; }
.top-nav a:hover, .top-nav a.on { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.search { position: relative; flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px 0 36px; font: 500 .95rem var(--font-ui); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.ghost { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 14px; font: 600 .9rem var(--font-ui); color: var(--ink); text-decoration: none; display: inline-block; }
.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.search-link { display: none; text-decoration: none; color: var(--ink); }
.primary { border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 11px 20px; font: 700 .98rem var(--font-ui); text-decoration: none; display: inline-block; }
.primary:hover { filter: brightness(1.12); }

.edit-switch { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px 6px 8px; font: 700 .9rem var(--font-ui); }
.edit-switch[hidden] { display: none; }
.sw-short { display: none; }
.ghost, .edit-switch { white-space: nowrap; }
.sw-track { width: 36px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.sw-dot { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.edit-switch[aria-checked="true"] { border-color: var(--c-way); }
.edit-switch[aria-checked="true"] .sw-track { background: var(--c-way); }
.edit-switch[aria-checked="true"] .sw-dot { transform: translateX(16px); }
.edit-bar { background: var(--brand-2); color: #2a1b00; font: 500 .92rem/1.4 var(--font-ui); padding: 9px 20px; text-align: center; }
.edit-bar[hidden] { display: none; }
.edit-done { margin-left: 12px; border: 0; background: #2a1b00; color: #fff; border-radius: 99px; padding: 4px 14px; font-weight: 700; }

/* ---------- masthead + hero (echoes the printed FINDER banner) ---------- */
.mast, .hero { background: var(--brand); color: #fff; }
.mast { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 44px; align-items: center; padding: 38px max(20px, calc((100% - 1180px) / 2)) 30px; border-radius: 0 0 32px 32px; }
.mast-date, .hero-date { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; font-family: var(--font-ui); }
.mast-day, .hero-day { font-size: clamp(6rem, 17vw, 10.5rem); font-weight: 800; line-height: .78; letter-spacing: -0.05em; }
.mast-meta, .hero-meta { display: flex; flex-direction: column; gap: 2px; font-size: 1.15rem; line-height: 1.15; }
.mast-meta strong, .hero-meta strong { color: var(--brand-2); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; }
.mast-meta span, .hero-meta span { opacity: .85; font-weight: 500; }
.mast-list { min-width: 0; }
.mast-label { font: 600 .9rem var(--font-ui); opacity: .8; margin-bottom: 6px; }
.mast-list ul, .hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.mast-list li a, .hero-list a { color: #fff; text-decoration: none; font: 600 1.08rem/1.3 var(--font-ui); display: inline-block; padding-left: 16px; position: relative; }
.mast-list li a::before, .hero-list a::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; background: var(--brand-2); border-radius: 2px; transform: rotate(45deg); }
.mast-list li a:hover, .hero-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mast-more { margin-top: 12px; font: 500 .95rem var(--font-ui); opacity: .9; }
.mast-more a { color: #fff; }
.pager { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; font: 600 .92rem var(--font-ui); border-top: 1px solid rgb(255 255 255 / .22); padding-top: 14px; margin-top: 8px; }
.pager a { color: #fff; text-decoration: none; opacity: .9; }
.pager a:hover { text-decoration: underline; }
.pager a[rel="next"] { margin-left: auto; }

.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 56px; align-items: center; padding: 48px max(20px, calc((100% - 1080px) / 2)) 44px; border-radius: 0 0 36px 36px; }
.hero-h { font-size: 1rem; font-weight: 600; opacity: .85; margin-bottom: 12px; letter-spacing: 0; }
.hero-cta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-family: var(--font-ui); }
.hero-cta .primary { background: var(--brand-2); color: #2a1b00; }
.hero-cta .muted { color: rgb(255 255 255 / .8); font-size: .92rem; }

/* ---------- layout ---------- */
.layout { max-width: 1180px; margin: 0 auto; padding: 36px 20px 80px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; }
.rail { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-family: var(--font-ui); }
.rail ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.rail a { display: block; padding: 7px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; line-height: 1.3; }
.rail a:hover { color: var(--ink); }
.rail a.on { color: var(--ink); border-left-color: var(--brand); }
.rail-keywords a.on { border-left-color: var(--c-keywords); } .rail-places a.on { border-left-color: var(--c-places); } .rail-species a.on { border-left-color: var(--c-species); }
.content { min-width: 0; max-width: 760px; }

/* ---------- article ---------- */
.article { margin-top: 84px; padding-top: 30px; border-top: 6px solid var(--brand); }
.article:first-child { margin-top: 0; }
.a-title { font-size: clamp(1.75rem, 3.6vw, 2.55rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; max-width: 24ch; text-wrap: balance; }
.syl { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.syl li { display: flex; gap: 12px; align-items: baseline; font: 500 .9rem/1.45 var(--font-ui); color: var(--muted); }
.syl-tag { flex: none; border-radius: 6px; padding: 2px 9px; font-weight: 700; color: #fff; background: #168a82; }
.syl-mains .syl-tag { background: var(--c-mains); }
.a-head .media { margin-top: 16px; }

.sec { --sec: var(--c-other); --on: var(--on-other); margin-top: 38px; }
.sec-why_in_focus { --sec: var(--c-why); --on: var(--on-why); }
.sec-key_highlights { --sec: var(--c-key); --on: var(--on-key); }
.sec-implications { --sec: var(--c-impl); --on: var(--on-impl); }
.sec-way_forward { --sec: var(--c-way); --on: var(--on-way); }
.sec-mains_question { --sec: var(--c-mains); --on: var(--on-mains); }
.sec-title { display: inline-block; background: var(--sec); color: var(--on); font-size: 1rem; font-weight: 700; letter-spacing: 0; padding: 4px 12px; border-radius: 7px; margin-bottom: 8px; }

.flow { max-width: var(--measure); }
.fact { --pad: 28px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 9px 0 9px var(--pad); align-items: start; }
.fact::before { content: ""; position: absolute; left: 7px; top: 1.18em; width: 8px; height: 8px; background: var(--sec); border-radius: 2px; transform: rotate(45deg); }
.fact.sub { margin-left: 22px; }
.fact.para { padding-left: 0; }
.fact.para::before { display: none; }
.flow strong, .ask-text strong { font-weight: 650; background: linear-gradient(transparent 50%, color-mix(in srgb, var(--sec, var(--c-other)) 34%, transparent) 50%); border-radius: 2px; }

.term { position: relative; margin: 12px 0; padding: 14px 16px 14px 18px; border-radius: 12px; background: color-mix(in srgb, var(--sec) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sec) 28%, var(--line)); border-left: 5px solid var(--sec); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: start; }
.term-name { font: 700 1rem var(--font-ui); letter-spacing: -0.005em; margin-bottom: 2px; }
.term-def { font-size: .98rem; line-height: 1.6; }
.term-def strong { font-weight: 700; }

.ask { margin-top: 6px; padding: 22px 24px; border-radius: 16px; background: color-mix(in srgb, var(--sec) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sec) 35%, var(--line)); max-width: var(--measure); }
.ask-text { font: italic 400 1.2rem/1.6 var(--font-read); }
.ask-meta { margin-top: 10px; font: 700 .88rem var(--font-ui); color: var(--sec); }

.pdf-fig { margin: 14px 0; padding: 5px; background: #fff; border-radius: 16px; box-shadow: var(--sh); max-width: 520px; }
.pdf-fig img { border-radius: 12px; width: 100%; }

/* ---------- special sections: keywords / places / species ---------- */
.special { --sec: var(--c-other); margin-top: 90px; }
.special-keywords { --sec: var(--c-keywords); } .special-places { --sec: var(--c-places); } .special-species { --sec: var(--c-species); }
.special-maps { --sec: var(--c-maps); } .special-facts { --sec: var(--c-facts); }
.sp-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sp-title::before { content: ""; width: 14px; height: 34px; border-radius: 5px; background: var(--sec); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; align-items: start; }
.card { background: var(--surface); border-radius: 18px; padding: 20px 20px 14px; box-shadow: var(--sh); border-top: 6px solid var(--sec); min-width: 0; }
.card-title { font-size: 1.22rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; text-decoration: underline; text-decoration-color: var(--sec); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.card .flow { max-width: none; font-size: .99rem; line-height: 1.62; }
.card .fact { grid-template-columns: minmax(0, 1fr); }
.card .term { grid-template-columns: minmax(0, 1fr); }

/* ---------- pictures you add ---------- */
.media { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; align-content: flex-start; max-width: 300px; }
.media:not(:has(.shot)) { display: none; }
.shot { position: relative; margin: 0; }
.shot-open { padding: 0; border: 0; background: none; display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--sh); }
.shot img { width: 136px; height: 102px; object-fit: cover; transition: transform .2s; }
.shot-open:hover img { transform: scale(1.04); }
.shot-del { display: none; position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: #d13b3b; color: #fff; font: 700 17px/1 var(--font-ui); place-items: center; padding: 0; }
.shot-del.sure { width: auto; border-radius: 99px; padding: 0 10px; font-size: .78rem; }
.add-shot { display: none; align-items: center; gap: 6px; border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); background: transparent; border-radius: 12px; padding: 6px 12px; min-height: 36px; font: 700 .85rem var(--font-ui); color: var(--muted); }
.add-shot:hover { border-color: var(--brand); color: var(--brand); }
body.editing .media { display: flex; }
body.editing .shot-del { display: grid; }
body.editing .add-shot { display: inline-flex; }
body.editing .fact:hover, body.editing .term:hover, body.editing .card:hover { outline: 2px dashed color-mix(in srgb, var(--brand-2) 70%, transparent); outline-offset: 3px; border-radius: 8px; }
body.editing .pasting { outline: 2px solid var(--brand-2); }
.drop { outline: 3px solid var(--c-way) !important; outline-offset: 3px; background: color-mix(in srgb, var(--c-way) 10%, transparent); }
.shot.busy img { filter: grayscale(1) blur(2px); opacity: .6; }
.shot.busy::after { content: "Saving"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 .8rem var(--font-ui); color: var(--ink); }

/* ---------- archive, tiles, search ---------- */
.h-section { font-size: 1.25rem; font-weight: 800; margin: 44px 0 16px; }
.arch-head { padding: 44px 0 4px; } .arch-head h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.arch-head p { margin-top: 8px; max-width: 56ch; } .arch-admin { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr)); gap: 14px; }
.tile { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.tile-day { font: 800 2.6rem/1 var(--font-ui); color: var(--brand); letter-spacing: -0.04em; }
:root[data-theme="dark"] .tile-day { color: #ef8a8f; }
.tile-meta { display: flex; flex-direction: column; font: 500 .85rem/1.25 var(--font-ui); color: var(--muted); } .tile-meta strong { color: var(--ink); font-weight: 700; }
.tile-titles { grid-column: 1 / -1; font: 500 .9rem/1.4 var(--font-ui); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-titles em { font-style: normal; color: var(--brand); font-weight: 700; }
.course-card { display: grid; gap: 6px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--brand); border-radius: 18px; padding: 20px 24px; text-decoration: none; color: var(--ink); box-shadow: var(--sh); }
.course-card:hover { border-left-color: var(--brand-2); }
.course-title { font: 800 1.5rem var(--font-ui); letter-spacing: -0.02em; } .course-blurb { color: var(--muted); font-size: .98rem; line-height: 1.55; } .course-stat { font: 600 .9rem var(--font-ui); }
.empty { max-width: 560px; margin: 90px auto; padding: 0 20px; } .empty h1, .empty h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; } .empty p { margin-bottom: 14px; }
.results { padding-top: 44px; padding-bottom: 80px; } .results h1 { font-size: 2rem; font-weight: 800; margin-bottom: 18px; }
.hits { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 760px; }
.hits a { display: block; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.hits a:hover { border-color: var(--brand); }
.hit-where { display: block; font: 700 .8rem var(--font-ui); color: var(--muted); margin-bottom: 3px; }
mark { background: color-mix(in srgb, var(--brand-2) 55%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.foot { text-align: center; color: var(--muted); font: 500 .85rem/1.5 var(--font-ui); padding: 30px 20px 50px; border-top: 1px solid var(--line); }

/* ---------- dialogs, toast ---------- */
.dlg { border: 0; border-radius: 20px; padding: 26px; width: min(92vw, 400px); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .5); font-family: var(--font-ui); }
.dlg::backdrop, .lightbox::backdrop { background: rgb(8 10 30 / .6); }
.dlg h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; } .dlg label { display: block; font-weight: 700; margin: 16px 0 6px; font-size: .9rem; }
.dlg input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 12px; font-size: 1rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; } .err { color: #d13b3b; font-weight: 600; margin-top: 10px; font-size: .92rem; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 14px; background: #fff; }
.lb-close { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 22px; z-index: 2; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 90px); background: var(--ink); color: var(--bg); font: 600 .95rem var(--font-ui); padding: 11px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s; z-index: 80; max-width: 92vw; }
.toast.show { transform: translate(-50%, 0); opacity: 1; } .toast.bad { background: #d13b3b; color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .rail { display: none; }
  .search { display: none; } .search-link { display: grid; } .top-actions { margin-left: auto; }
  .mast, .hero { grid-template-columns: minmax(0, 1fr); border-radius: 0 0 24px 24px; padding-top: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .fact, .term { grid-template-columns: minmax(0, 1fr); }
  .media { max-width: none; } .shot img { width: 120px; height: 90px; }
  .top-in { gap: 8px; padding: 0 12px; } .top-nav { display: none; } .sw-long { display: none; } .sw-short { display: inline; } .hint-desk { display: none; }
  .edit-switch { padding: 5px 11px 5px 6px; gap: 7px; } #signin-btn, #signout-btn { padding: 7px 11px; } .edit-bar { padding: 8px 12px; }
  .brand-name { display: none; } .article { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .top, .rail, .foot, .add-shot, .shot-del, .pager, .edit-bar { display: none !important; } .mast { background: none; color: #000; } .layout { display: block; } body { background: #fff; } }

/* the fact you jumped to from search */
@keyframes flash { 0% { background: color-mix(in srgb, var(--brand-2) 60%, transparent); } 100% { background: transparent; } }
.flash { animation: flash 2.4s ease-out 1; border-radius: 8px; }

.big-search { position: relative; max-width: 560px; margin: 0 0 26px; }
.big-search input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 18px; font: 500 1.05rem var(--font-ui); }
.lock-btn { margin-left: 12px; padding: 3px 12px; font-size: .82rem; }

/* ---- fetch all previous (edit mode only) ---- */
.edit-only { display: none; }
body.editing .edit-only { display: block; }
.bf-panel { margin: 0 0 28px; padding: 18px 20px; border: 1px dashed var(--accent, #8A171A); border-radius: 16px; background: var(--surface); }
.bf-panel[hidden] { display: none !important; }
.bf-head h2 { margin: 0 0 4px; font-size: 1.15rem; }
.bf-bar { height: 10px; border-radius: 99px; background: rgba(128,128,150,.22); overflow: hidden; margin: 12px 0 8px; }
.bf-bar span { display: block; height: 100%; width: 0; background: #1f9d6b; transition: width .6s; }
.bf-line { margin: 0 0 10px; }
.bf-actions { margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.bf-more { margin-top: 10px; }

.notice { margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 10px; border: 1px solid var(--line, #ffffff33); background: color-mix(in srgb, #F2B01E 14%, transparent); font-size: .95rem; line-height: 1.5; }
.bf-notes textarea { width: 100%; min-height: 9rem; margin: .5rem 0; padding: .6rem; border-radius: 8px; font: inherit; border: 1px solid var(--line, #ffffff33); background: transparent; color: inherit; }

.flow-page .lede { max-width: 60ch; }
.thread { margin: 1.6rem 0; padding: 1rem 1.2rem; border: 1px solid var(--line, #ffffff26); border-left: 4px solid #B3202A; border-radius: 12px; }
.thread h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.thread h2 .muted { font-size: .85rem; font-weight: 400; margin-left: .5rem; }
.steps { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px dashed var(--line, #ffffff33); }
.steps li { position: relative; margin: 0 0 .9rem; padding-left: .9rem; }
.steps li::before { content: ""; position: absolute; left: -1.5rem; top: .55em; width: .7rem; height: .7rem; border-radius: 50%; background: #F2B01E; }
.steps a { display: block; text-decoration: none; color: inherit; }
.fl-date { display: inline-block; font-size: .85rem; opacity: .75; margin-right: .5rem; }
.fl-title { font-weight: 600; }
.fl-why { display: block; font-size: .85rem; opacity: .7; }
.flow-box { margin-top: .8rem; padding: .7rem 1rem; border-radius: 10px; background: color-mix(in srgb, #F2B01E 10%, transparent); font-size: .95rem; }
.flow-row { margin: .2rem 0; display: grid; gap: .25rem; }
.flow-row a { color: inherit; text-decoration: none; }
.flow-row a:hover { text-decoration: underline; }
.flow-row em { display: block; font-size: .8rem; opacity: .7; }
.fl-summary { margin: 0 0 .9rem; max-width: 65ch; line-height: 1.55; }

.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; margin: 1.4rem 0; }
.ev-card { display: block; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--line, #ffffff26); border-top: 4px solid #B3202A; text-decoration: none; color: inherit; background: color-mix(in srgb, currentColor 4%, transparent); }
.ev-card:hover { border-top-color: #F2B01E; transform: translateY(-2px); }
.ev-card h2 { margin: 0 0 .4rem; font-size: 1.1rem; line-height: 1.3; }
.ev-sum { margin: 0 0 .6rem; font-size: .92rem; line-height: 1.5; opacity: .85; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ev-meta { margin: 0; font-size: .82rem; opacity: .65; }
.ev-start { margin: 1.2rem 0; padding: .9rem 1.1rem; border-radius: 12px; border-left: 4px solid #F2B01E; background: color-mix(in srgb, #F2B01E 10%, transparent); max-width: 70ch; }
.ev-start p { margin: .3rem 0 0; line-height: 1.55; }
.ev-line { list-style: none; margin: 1.6rem 0; padding: 0 0 0 1.4rem; border-left: 3px solid #B3202A; max-width: 72ch; }
.ev-line li { position: relative; margin: 0 0 1.6rem; padding-left: .8rem; }
.ev-line li::before { content: ""; position: absolute; left: -2.05rem; top: .3rem; width: .9rem; height: .9rem; border-radius: 50%; background: #F2B01E; border: 3px solid var(--bg, #0b0d24); }
.ev-line li:not(:last-child)::after { content: "then"; position: absolute; left: .8rem; bottom: -1.35rem; font-size: .75rem; opacity: .5; }
.ev-date { font-weight: 600; margin-right: .6rem; }
.ev-role { font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; border: 1px solid currentColor; opacity: .75; }
.role-trigger .ev-role { color: #F2B01E; opacity: 1; } .role-reaction .ev-role { color: #E8737B; opacity: 1; } .role-outcome .ev-role { color: #6FCF97; opacity: 1; }
.ev-line p { margin: .4rem 0; line-height: 1.55; }
.ev-line a { font-size: .9rem; }
.ev-chips { margin: .5rem 0 0; font-size: .9rem; } .ev-chips a { margin-left: .4rem; padding: .1rem .6rem; border-radius: 99px; background: #B3202A; color: #fff; text-decoration: none; }
.more-threads { margin: 2rem 0; } .fl-pending { margin: .6rem 0; }
