/* Night Desk: warm paper, ink rules, serif headlines, mono metadata. */
:root {
  --paper: #F7F5F0; --ink: #121212; --muted: #5A564F; --body: #3B3833; --rule: #D9D4CA; --panel: #EFEBE3;
  --track: #E6E1D7; --dark: #121212; --dark-fg: #F2EEE6; --dark-muted: #B5AFA5; --cyan: #4FD8F0;
  --accent: #0B6E8A; --green: #0E7A4B; --violet: #5B3DD6; --amber: #9A5A00;
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans CJK SC", "Noto Sans CJK JP", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--ink); text-decoration: none; }
.alarm { background: #A3180F; color: #fff; padding: 10px 16px; font: 500 13px/1.45 var(--sans); text-align: center; overflow-wrap: anywhere; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 18px 32px 64px; }
@media (max-width: 720px) { .wrap { padding: 14px 16px 48px; } }

/* top strip */
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.strip .right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 8px; vertical-align: middle; }
.pill { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 600; background: transparent; color: var(--ink); }
.pill:hover { color: var(--accent); border-color: var(--accent); }
.pill .count { font-family: var(--mono); font-size: 11px; font-weight: 500; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 999px; }
.pill .count.warn { background: var(--amber); }

/* front page nav bar: text links, admin tools after a hairline, the account menu last */
.topnav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 22px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.topnav > a { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; color: var(--ink); box-shadow: inset 0 -2px 0 transparent; }
.topnav > a:hover { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.topnav .count { font-family: var(--mono); font-size: 11px; font-weight: 500; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 999px; }
.topnav .count.warn { background: var(--amber); }
.topnav-sep { width: 1px; height: 16px; background: var(--rule); }
.strip > .topnav { margin-left: auto; }
.strip > .profile { margin-left: 10px; }
@media (max-width: 720px) {
  .strip > .mono { flex: 1; }
  .strip > .topnav { order: 3; width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .strip > .topnav::-webkit-scrollbar { display: none; }
  .strip > .topnav > a { flex: none; }
}
.profile { position: relative; }
.profile summary { list-style: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 50%; cursor: pointer; color: var(--ink); }
.profile summary::-webkit-details-marker { display: none; }
.profile summary:hover, .profile[open] summary { color: var(--accent); border-color: var(--accent); }
.profile-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 260px; max-width: calc(100vw - 32px); background: var(--paper); border: 1px solid var(--ink); box-shadow: 0 8px 24px rgba(18, 18, 18, 0.12); display: flex; flex-direction: column; font-weight: 500; }
.profile-who { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 12px; border-bottom: 1px solid var(--rule); }
.profile-email { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.profile-menu > a, .profile-menu button { display: flex; align-items: center; min-height: 44px; padding: 0 16px; width: 100%; border: 0; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.profile-menu > a:hover, .profile-menu button:hover { background: var(--panel); color: var(--accent); }
.profile-menu form { margin: 0; border-top: 1px solid var(--rule); }

/* section tabs on ops and the graph: one rule across, the open tab underlined */
.tabs { display: flex; align-items: center; gap: 0 26px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--rule); font-size: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 12px 0 11px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--rule); }
.tabs a[aria-current="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.tabs-sep { flex: none; width: 1px; height: 16px; background: var(--rule); margin: 0 -6px; }

/* masthead */
.masthead { border-top: 1px solid var(--ink); padding: 18px 0 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.masthead h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 60px; line-height: 1; letter-spacing: -0.025em; }
.masthead .tag { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); }
.masthead.front { border-bottom: 3px solid var(--ink); }
@media (max-width: 720px) { .masthead h1 { font-size: 44px; } }

/* compact header on inner pages */
.header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 3px solid var(--ink); }
.header .back { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.header .brand { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; }

/* kicker rows */
.khead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; flex-wrap: wrap; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.kicker.accent { color: var(--accent); }
.kicker.muted { color: var(--muted); }
.khead .sub { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }

/* THE WIRE ticker */
.wire { margin-top: 14px; background: var(--dark); color: var(--dark-fg); display: flex; align-items: stretch; min-height: 46px; border-radius: 3px; overflow: hidden; }
.wire-body { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; display: flex; align-items: center; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.wire-body::-webkit-scrollbar { display: none; }
.wire-empty { padding: 0 16px; font-size: 13px; color: var(--dark-muted); }
.wire-track { display: flex; width: max-content; }
.wire-track a { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 22px; min-height: 46px; color: var(--dark-fg); border-right: 1px solid #2E2C2A; white-space: nowrap; font-size: 13px; }
.wire-track a:hover { color: var(--cyan); }
.wire-track .t { font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.wire-track .p { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--dark-muted); }
.wire-pause { flex: none; width: 46px; border: none; border-left: 1px solid #3A3734; background: transparent; color: var(--dark-fg); display: flex; align-items: center; justify-content: center; }
.wire-pause[aria-pressed="true"] { color: var(--cyan); }
.kh { display: flex; align-items: baseline; gap: 14px; }
.scope-serif { font-family: var(--serif); font-size: 18px; }
.khead.strong { border-bottom-width: 3px; }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.pill.dark { background: var(--dark); color: var(--dark-fg); border-color: var(--dark); min-height: 40px; }
.pill.dark:hover { color: var(--cyan); }

/* in brief + front page foot */
.inbrief { margin-top: 28px; display: flex; flex-direction: column; }
.inbrief a { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.inbrief .k { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.inbrief .t { font-family: var(--serif); font-size: 17px; line-height: 1.3; }

/* THE DESKS: a band under the masthead, a small map and every desk across the page */
.deskband { margin-top: 14px; background: var(--dark); color: var(--dark-fg); border-radius: 3px; padding: 12px 14px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: center; }
.deskband > .slot { grid-column: 1 / -1; padding: 6px 0; }
.db-map svg { width: 100%; height: auto; display: block; }
.db-map path { transition: stroke .2s ease; }
.db-map path.lit { stroke: var(--cyan); }
.db-desks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px 6px; }
.db-desks a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 5px 8px; min-height: 44px; padding: 7px 10px 8px; border-radius: 3px; color: var(--dark-fg); }
.db-desks a:hover, .db-desks a:focus-visible { background: #22201E; color: var(--cyan); }
.db-desks .nm { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-desks .ct { font-family: var(--mono); font-size: 12px; color: var(--cyan); }
.db-desks .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: #2E2C2A; overflow: hidden; }
.db-desks .bar i { display: block; height: 100%; background: var(--cyan); opacity: 0.75; }
.db-desks a.quiet { color: var(--dark-muted); }
.db-desks a.quiet .ct { color: var(--dark-muted); }
@media (max-width: 1080px) { .deskband { grid-template-columns: 170px minmax(0, 1fr); } .db-desks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .deskband { display: block; padding: 8px; }
  .db-map { display: none; }
  .db-desks { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 132px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .db-desks::-webkit-scrollbar { display: none; }
}

/* regional desk */
.deskhead { padding: 26px 0 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.deskhead > div { display: flex; flex-direction: column; gap: 8px; }
.deskhead h1 { margin: 0; font-family: var(--serif); font-size: 60px; font-weight: 500; line-height: 0.95; letter-spacing: -0.025em; }
.deskhead .tag { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }
.nextdoor { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nextdoor > .mono { margin-right: 4px; }
.nextdoor a { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; font-weight: 500; }
.nextdoor a:hover { border-color: var(--accent); }
.deskrow { border-top: 1px solid var(--ink); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.deskleft { flex: 1 1 400px; max-width: 500px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.wherein { background: var(--dark); color: var(--dark-fg); border-radius: 3px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.wherein .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wherein .kicker { font-size: 11px; color: var(--cyan); }
.wherein .reset { min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid #4A4743; color: var(--dark-fg); font-size: 12px; display: inline-flex; align-items: center; }
.wherein .minimap svg { width: 100%; height: auto; display: block; }
.wherein .pins { display: flex; flex-wrap: wrap; gap: 6px; }
.wherein .pins a { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid #4A4743; color: var(--dark-fg); font-size: 12px; font-weight: 500; }
.wherein .pins a i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); display: inline-block; }
.wherein .pins a:hover, .wherein .pins a[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.wherein .pins .mono { opacity: 0.8; }
.readin { display: flex; flex-direction: column; gap: 10px; }
.langbar { display: flex; height: 12px; gap: 2px; }
.langbar span { display: block; }
.langkey { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--body); }
.langkey span { display: inline-flex; align-items: center; gap: 6px; }
.langkey i { width: 10px; height: 10px; display: inline-block; }
.readin p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 15px; line-height: 1.45; color: var(--muted); }
.ongoing { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.ongo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.ongo .txt { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ongo .st { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
.ongo .status { padding: 1px 7px; border-radius: 3px; background: var(--panel); color: var(--ink); }
.ongo .status.escalating { background: var(--accent); color: #fff; }
.ongo .status.developing { background: #D7E9EE; color: var(--accent); }
.ongo .status.building { background: #DCEBDD; color: var(--green); }
.ongo .status.cooling { background: var(--panel); color: var(--muted); }
.ongo .t { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; }
.ongo .n { font-size: 14px; line-height: 1.5; color: var(--body); }
.ongo .spark { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.headlines { margin-top: 40px; display: flex; flex-direction: column; }
.desklink { font-size: 11px; letter-spacing: 0.04em; text-transform: none; color: var(--accent); }
@media (max-width: 720px) { .deskhead h1 { font-size: 42px; } }

/* WHERE map panel */
.where { margin-top: 24px; background: var(--dark); color: var(--dark-fg); border-radius: 3px; padding: 18px 22px 16px; display: flex; flex-direction: column; gap: 10px; }
.where .top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.where .top .kicker { color: var(--cyan); }
.where .scope { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.where .reset { margin-left: auto; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #4A4743; background: transparent; color: var(--dark-fg); font-size: 13px; font-weight: 500; }
.where .reset:hover { border-color: var(--cyan); color: var(--cyan); }
.map { position: relative; }
.map svg { width: 100%; height: auto; display: block; }
.map .pin { position: absolute; transform: translate(-50%, -50%); min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; border: 1px solid #4A4743; background: rgba(18,18,18,0.86); color: var(--dark-fg); font-size: 12px; font-weight: 500; white-space: nowrap; }
.map .pin:hover, .map .pin[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.map .pin .n { font-family: var(--mono); font-weight: 500; opacity: 0.8; }
.map .pin .major { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); display: inline-block; box-shadow: 0 0 0 3px rgba(79,216,240,0.3); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--dark-muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@media (max-width: 720px) { .map .pin { font-size: 11px; padding: 0 8px; min-height: 26px; } .where .scope { font-size: 20px; } }

/* columns */
.cols { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 30px; border-left: 1px solid var(--rule); padding-left: 28px; }
@media (max-width: 720px) { .side { border-left: 0; padding-left: 0; } }

/* stories */
.empty { margin: 0; padding: 32px 0; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); }
.lead { display: flex; flex-direction: column; gap: 10px; padding: 22px 0 26px; border-bottom: 1px solid var(--rule); }
.lead h2 { margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; max-width: 820px; }
.lead .summary { margin: 0; font-size: 17px; line-height: 1.55; color: var(--body); max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 32px; }
.story { display: flex; flex-direction: column; gap: 8px; padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.story h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.18; }
.story .summary { margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); }
.story .kicker, .lead .kicker { font-size: 11px; }
.lead .kicker { font-size: 12px; }
.orig { margin: 0; font-size: 14px; color: var(--muted); }
.orig b { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.04em; margin-right: 6px; }
.meta { font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.meta form { display: inline; }
.meta button { border: 0; background: transparent; padding: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 24px; }
.meta button:hover, .meta button.on { color: var(--accent); }
.meta button.on { font-weight: 600; }
@media (max-width: 720px) { .lead h2 { font-size: 30px; } }

.thread { margin: 2px 0 0; padding: 0 0 0 14px; list-style: none; border-left: 2px solid var(--rule); display: flex; flex-direction: column; gap: 5px; }
.thread li { font-size: 14px; line-height: 1.4; }
.thread li a { font-family: var(--serif); font-size: 16px; }
.thread .mono { margin-left: 6px; }
.story .thread li a { font-size: 15px; }
.thread li.more a { margin-left: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* sidebar */
.brief p { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.42; }
.brief .note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 8px; }
.when .day { display: flex; gap: 14px; padding-top: 14px; }
.when .day > span { flex: none; width: 52px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; padding-top: 2px; color: var(--muted); }
.when .day > span.today { color: var(--accent); }
.when .items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--rule); padding-left: 14px; padding-bottom: 2px; }
.when .items a { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.when .items a i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--rule); margin-top: 6px; }
.when .items a i.major { background: var(--accent); }
.when .quiet { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14px; }

.latest .day > span { width: 60px; }
.latest .items .mono { font-size: 11px; }
.latest .items b.mono { font-weight: 500; font-size: 10px; letter-spacing: 0.04em; color: var(--muted); }
.morelink { margin: 20px 0 0; }

/* for you */
.foryou { margin-top: 36px; }

/* event page */
.hero { padding: 32px 0 28px; border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; gap: 14px; max-width: 1040px; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: 56px; font-weight: 500; line-height: 1.04; letter-spacing: -0.02em; }
.hero .lede { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--body); }
.hero .orig { font-size: 16px; }
@media (max-width: 720px) { .hero h1 { font-size: 34px; } .hero .lede { font-size: 18px; } }
.block { display: flex; flex-direction: column; gap: 0; }
.main .block + .block { margin-top: 36px; }
.langcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.langcols > div { padding: 18px 20px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.langcols > div + div { border-left: 1px solid var(--rule); padding-left: 20px; }
.langcols .lbl { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); }
.langcols p { margin: 0; font-size: 15px; line-height: 1.5; }
.langcols .q { font-family: var(--serif); font-size: 16px; line-height: 1.4; }
.bars { display: flex; flex-direction: column; gap: 9px; padding-top: 14px; }
.bars div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bars div > span:first-child { width: 110px; flex: none; }
.bars .track { flex: 1; height: 8px; background: var(--track); }
.bars .track i { display: block; height: 8px; background: var(--accent); }
.bars .n { font-family: var(--mono); font-size: 11px; width: 28px; text-align: right; }
.claims { margin: 0; padding: 0; list-style: none; }
.claims li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.claims li > span:first-child { flex: none; width: 28px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent); padding-top: 3px; }
.claims li > div { flex: 1; min-width: 0; }
.claims p { margin: 0 0 4px; font-size: 16px; line-height: 1.45; }
.claims .srcs { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.claims .srcs.thin { color: var(--amber); }
.claims .srcs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sources a.src { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.sources .t { font-size: 16px; font-weight: 500; }
.sources .t.serif { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.sources .d { font-size: 14px; color: var(--body); }
.sources .m { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }
.sources .more { padding: 12px 0; font-family: var(--mono); font-size: 12px; }
.locator svg { width: 100%; height: auto; display: block; background: var(--dark); border-radius: 3px; }
.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 14px; padding-top: 14px; }
.timeline li > span:first-child { flex: none; width: 60px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--accent); padding-top: 2px; }
.timeline li > span:last-child { flex: 1; border-left: 1px solid var(--rule); padding-left: 14px; font-size: 14px; line-height: 1.45; }
.timeline li.next > span:last-child { border-left: 1px dashed #A39C91; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--body); }
.related a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 17px; line-height: 1.3; }
.related .m { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; margin-top: 3px; }
.stat2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat2 > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.stat2 > div:nth-child(2n) { padding: 16px 0 16px 16px; border-left: 1px solid var(--rule); }
.stat2 .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); }
.stat2 .val { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1; }
.stat2 .val small { font-size: 14px; font-family: var(--sans); color: var(--muted); margin-left: 4px; }
.stat2 .sub { font-size: 12px; color: var(--muted); }

/* tables (audit) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 8px 0; border-bottom: 1px solid var(--ink); }
.table td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table td.mono, .table .mono { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.table tr.miss td:first-child { color: var(--amber); font-weight: 700; font-family: var(--mono); font-size: 11px; }
.table tr.hit td:first-child { color: var(--green); font-family: var(--mono); font-size: 11px; }
.table tr.single td:first-child { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.table a { text-decoration: underline; text-underline-offset: 3px; }
.tablebox { overflow-x: auto; }

/* follows */
.row { display: flex; gap: 8px; padding-top: 18px; }
.row input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ink); border-radius: 3px; background: #fff; font: inherit; font-size: 15px; }
.row button.pill { min-height: 44px; }
.follows { list-style: none; padding: 0; margin: 8px 0 0; }
.follows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 18px; }
.follows form { margin-left: auto; }
.follows button { border: 0; background: transparent; font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.follows button:hover { color: var(--accent); }
.hint { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 14px; }
.pagehead { padding: 28px 0 0; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pagehead h1 { margin: 0; font-family: var(--serif); font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.pagehead .tag { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); display: block; margin-top: 6px; }
code { font-family: var(--mono); font-size: 12px; background: var(--panel); padding: 1px 5px; border-radius: 3px; }

/* ops dashboard */
:root { --red: #A8321F; }
.flash { margin: 18px 0 0; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--accent); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 20px; border-top: 1px solid var(--ink); }
.tiles > div { padding: 16px 18px 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tiles .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.tiles .val { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1; }
.tiles .val small { font-size: 13px; font-family: var(--sans); color: var(--muted); margin-left: 5px; }
.tiles .sub { font-size: 12px; color: var(--muted); }
.ops-section { margin-top: 40px; }
.ops-cols { display: flex; flex-wrap: wrap; gap: 40px 48px; margin-top: 40px; }
.ops-cols > section { flex: 1 1 380px; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; color: var(--ink); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.badge.ok::before { background: var(--green); }
.badge.running::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.badge.queued::before, .badge.pending::before, .badge.never::before { background: transparent; border: 1.5px solid var(--muted); }
.badge.failed::before, .badge.abandoned::before { background: var(--red); border-radius: 1px; }
.badge.failing::before { background: var(--amber); border-radius: 1px; }
.badge.cancelled, .badge.skipped, .badge.off { color: var(--muted); }
.badge.cancelled::before, .badge.skipped::before, .badge.off::before { background: var(--rule); }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .badge.running::before { animation: none; } }
.errline { color: var(--red); font-size: 13px; overflow-wrap: anywhere; }
.colchart { margin-top: 14px; }
.colchart .plot { display: flex; align-items: flex-end; gap: 2px; height: 110px; border-bottom: 1px solid var(--ink); }
.colchart .plot > span { flex: 1 1 0; min-width: 2px; max-width: 28px; height: 100%; display: flex; align-items: flex-end; }
.colchart .plot i { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; }
.colchart .plot > span:hover i { background: var(--ink); }
.colchart .plot > span.none i { height: 4px; background: var(--amber); border-radius: 0; }
.colchart .axis { display: flex; justify-content: space-between; padding-top: 6px; }
.colchart .cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 6px; }
.keyline { display: inline-flex; align-items: center; gap: 6px; }
.keyline i { width: 10px; height: 4px; background: var(--amber); display: inline-block; }
.bars.wide div > span:first-child { width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars.wide .n { width: 64px; }
.bars .track i { border-radius: 0 3px 3px 0; }
.trigger { margin-top: 14px; display: flex; flex-direction: column; gap: 16px; }
.trigger .presets { display: flex; flex-wrap: wrap; gap: 8px; }
.trigger .opts { display: flex; flex-wrap: wrap; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.field input, .addfeed input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 3px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.field input { width: 170px; }
.trigger details { border-top: 1px solid var(--rule); padding-top: 12px; }
.trigger summary { cursor: pointer; font-size: 14px; font-weight: 500; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 24px; margin: 12px 0 14px; }
.checks label { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--body); min-height: 30px; }
.checks b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--ink); min-width: 56px; }
.linkbtn { border: 0; background: transparent; padding: 0; font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--accent); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 16px; }
.table td.nowrap { white-space: nowrap; }
.table tr.dim td { color: var(--muted); }
.table .url { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.stagebar { height: 8px; background: var(--track); min-width: 120px; }
.stagebar i { display: block; height: 8px; background: var(--accent); border-radius: 0 3px 3px 0; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.facts b { font-weight: 500; color: var(--ink); }
pre.log { margin: 8px 0 0; padding: 12px 14px; background: var(--dark); color: var(--dark-fg); font-family: var(--mono); font-size: 11px; line-height: 1.55; border-radius: 3px; overflow-x: auto; max-height: 320px; }
.addfeed { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }
.addfeed input { flex: 1 1 160px; min-width: 0; }
.addfeed input.wide { flex: 3 1 320px; }
.addfeed input.narrow { flex: 0 1 110px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; max-width: 760px; }
pre.log .t { color: var(--dark-muted); user-select: none; }

/* graph inspector (/kg) */
.kg-actors { max-width: 320px; }
.kg-actor { display: inline-block; margin: 0 6px 4px 0; padding: 1px 8px; border: 1px solid var(--ink); border-radius: 999px; font-size: 12px; line-height: 1.6; text-decoration: none !important; white-space: nowrap; }
.kg-actor.candidate { border-style: dashed; border-color: var(--muted); color: var(--muted); }
.kg-actor:hover { color: var(--accent); border-color: var(--accent); }
.kg-actor i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: 6px; }
.kg-flag { display: block; color: var(--amber) !important; }
.kg-flag.plain { color: var(--muted) !important; }
.kg-filters { display: inline-flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.kg-filters a { color: var(--muted); padding: 4px 0; }
.kg-filters a[aria-current="true"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.kg-search { margin-top: 20px; }
.kg-search select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 3px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.kg-head { display: block; }
.kg-head h1 { font-size: 40px; line-height: 1.08; max-width: 900px; }
.kg-head .mono { margin: 0 0 10px; }
.kg-fact { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--body); margin: 12px 0 0; max-width: 760px; }
@media (max-width: 720px) { .kg-head h1 { font-size: 30px; } }

/* streamed sections: skeleton placeholders until the section arrives (see _slot.html) */
.slot { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; }
.slot i { display: block; height: 14px; border-radius: 3px; background: currentColor; opacity: 0.08; animation: nd-pulse 1.4s ease-in-out infinite; }
.slot i:nth-child(3n+1) { width: 94%; } .slot i:nth-child(3n+2) { width: 78%; } .slot i:nth-child(3n) { width: 56%; }
.slot-lead i:first-child { height: 40px; width: 82%; margin-bottom: 6px; }
.slot-inline { display: inline-flex; vertical-align: middle; padding: 0; }
.slot-inline i { width: 10em !important; height: 0.9em; }
.wire .slot-inline { padding: 0 16px; }
.slot-failed { margin: 0; padding: 12px 0; font-family: var(--serif); font-style: italic; color: var(--muted); }
@keyframes nd-pulse { 50% { opacity: 0.16; } }
@media (prefers-reduced-motion: reduce) { .slot i { animation: none; } }

/* who sees what (base.html sets r-<role> on <html>; the server enforces it) */
html:not(.r-admin) .only-admin { display: none !important; }
html:not(.r-admin):not(.r-graph) .only-graph { display: none !important; }
html.r-none .only-member { display: none !important; }

/* landing page: signed out */
.land-mast { padding-bottom: 18px; }
.land-map { margin-top: 18px; background: var(--dark); border-radius: 3px; padding: 18px 18px 14px; overflow: hidden; }
.land-map svg { display: block; width: 100%; height: auto; }
.land-region { stroke: #34312E; stroke-width: 6.5; stroke-linecap: round; fill: none; transition: stroke .8s ease; }
.land-region.lit { stroke: #A39C91; }
.land-arc { fill: none; stroke: var(--cyan); stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .85; }
.land-src { fill: var(--cyan); opacity: 0; animation: land-src .5s ease forwards; }
.land-hit { fill: var(--cyan); }
.land-ring { fill: none; stroke: var(--cyan); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: land-ring 1.6s ease-out forwards; }
@keyframes land-src { to { opacity: .9; } }
@keyframes land-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(7); } }
@media (prefers-reduced-motion: reduce) { .land-src { animation: none; opacity: .9; } }
.land-cap { margin: 10px 2px 0; color: var(--dark-muted); }
.land-cap .dot { background: var(--cyan); }
.land-cap #land-where { color: var(--dark-fg); }
.land-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; margin-top: 34px; align-items: start; }
.land-manifesto .land-lede { margin: 16px 0 6px; font-family: var(--serif); font-size: 24px; line-height: 1.35; color: var(--ink); letter-spacing: -0.005em; max-width: 34em; }
@media (max-width: 720px) { .land-manifesto .land-lede { font-size: 20px; } }
.land-manifesto ol { list-style: none; counter-reset: m; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.land-manifesto li { counter-increment: m; border-top: 1px solid var(--rule); padding-top: 12px; }
.land-manifesto li::before { content: "0" counter(m); font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .04em; }
.land-manifesto h2 { margin: 6px 0; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.land-manifesto p { margin: 0; color: var(--body); font-size: 15px; line-height: 1.55; }
.land-join { border: 1px solid var(--ink); padding: 0 22px 20px; background: var(--panel); position: sticky; top: 18px; }
.land-join .khead { margin: 0 -22px; padding: 12px 22px 8px; }
.land-join h2 { margin: 16px 0 6px; font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.015em; }
.land-join p { margin: 0 0 14px; color: var(--body); }
.land-google { min-height: 44px; margin: 4px 0 12px; }
.closed { max-width: 560px; margin: 64px auto 0; text-align: center; }
.closed h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; margin: 0 0 8px; }
.closed p { color: var(--body); margin: 0; }
@media (max-width: 960px) { .land-cols { grid-template-columns: 1fr; gap: 32px; } .land-join { position: static; } }
@media (max-width: 720px) { .land-manifesto ol { grid-template-columns: 1fr; } .land-map { padding: 10px 8px; } .land-manifesto h2 { font-size: 23px; } }

/* settings */
.settings { max-width: 760px; }
.settings-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 28px; margin: 0; }
.settings-list dt, .settings-list dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.settings-list dt { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 15px; }
.settings-list dd { overflow-wrap: anywhere; }
.settings-list dd .mono { margin-left: 6px; }
.settings-signout { margin-top: 18px; }
@media (max-width: 520px) { .settings-list { grid-template-columns: 1fr; } .settings-list dt { border-bottom: 0; padding-bottom: 0; } }
