/* philosophy.mackgrenfell.com — house style inherited from travel.mackgrenfell.com */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #192132;
  --ink-2: #5f6878;
  --ink-3: #858c98;
  --line: #e5e9ef;
  --line-strong: #d7dde6;
  --surface-soft: #f7f9fc;
  --blue: #5274e8;
  --blue-deep: #3f5fca;
  --blue-soft: #f0f4ff;
  --blue-hover: #fafbfc;
  --amber: #9a5a19;
  --amber-soft: #fff8ee;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --panel-shadow: 0 18px 60px rgba(25, 33, 50, 0.14);
  --sidebar: 236px;
  --measure: 62ch;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 620; line-height: 1.3; text-wrap: balance; }
p { margin: 0; }
svg.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.ico.s14 { width: 14px; height: 14px; }
svg.ico.s16 { width: 16px; height: 16px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--paper);
  padding: 16px 16px 24px;
}
.sidebar-head { display: flex; height: 44px; align-items: center; justify-content: space-between; padding: 0 4px; }
.brand { font-size: 14px; font-weight: 620; padding: 6px 0; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); transition: background-color 0.14s ease, color 0.14s ease; }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }
.project { display: block; border-radius: 8px; padding: 12px 8px; margin: 22px 0 20px; text-align: left; }
.project strong { display: block; font-weight: 600; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; }
.project small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-2); }
.nav { display: grid; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; min-height: 42px; border-radius: 8px; padding: 10px 12px;
  color: var(--ink-2); font-size: 14px; transition: background-color 0.14s ease, color 0.14s ease;
}
.nav a:hover { background: var(--surface-soft); color: var(--ink); }
.nav a.active { background: var(--blue-soft); color: var(--blue-deep); font-weight: 620; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 12px; padding: 32px 8px 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; width: max-content; }
.seg button { font-size: 12px; padding: 5px 10px; border-radius: 6px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-deep); font-weight: 620; }
.seg-label { font-size: 11px; color: var(--ink-3); }
.sidebar-note { font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.workspace { flex: 1; min-width: 0; min-height: 100dvh; margin-left: var(--sidebar); }
.content { width: min(calc(100% - 88px), 1000px); margin: 54px auto 110px; animation: content-in 0.2s ease-out both; }
.content.narrow { max-width: 760px; }
@keyframes content-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.mobile-header, .mobile-nav { display: none; }

/* ---------------------------------------------------------------- headings */
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-title h1 { font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 650; }
.page-title .meta { font-size: 13px; color: var(--ink-2); text-align: right; max-width: 42%; }
.intro { font-family: var(--font-serif); font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: var(--measure); margin: -14px 0 32px; }
.view-head { margin-bottom: 30px; }
.view-head .ctx { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--ink-3); }
.view-head .ctx a:hover { color: var(--blue-deep); }
.view-head h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 650; margin: 8px 0 12px; max-width: 26ch; }
.view-head .thesis { font-family: var(--font-serif); font-size: 18px; line-height: 1.55; color: var(--ink); max-width: var(--measure); }
.view-head .subtitle { font-size: 14px; color: var(--ink-2); margin-top: 6px; max-width: var(--measure); }
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--blue-deep); font-size: 13px; font-weight: 550; margin-bottom: 24px; }
.back:hover { text-decoration: underline; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 12px; }
.section-head h2 { font-size: 18px; }
.section-head p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.section-head a, .text-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--blue-deep); font-weight: 550; white-space: nowrap; }
.section-head a:hover, .text-action:hover { text-decoration: underline; }
section.block { margin: 0 0 40px; }
section.block h2 { font-size: 18px; margin-bottom: 10px; }
section.block h3 { font-size: 15px; margin: 18px 0 6px; }

/* ---------------------------------------------------------------- hero (overview) */
.hero { margin-bottom: 44px; }
.hero .kicker { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.hero h1 { font-size: 38px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 650; max-width: 20ch; }
.hero .lede { font-family: var(--font-serif); font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; margin: 18px 0 16px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.hero .meta strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- funnel */
.funnel { display: flex; height: 8px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); margin: 12px 0 10px; }
.funnel a { display: block; height: 100%; transition: opacity 0.14s ease; }
.funnel a:hover { opacity: 0.8; }
.funnel-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.funnel-key a { display: inline-flex; align-items: center; gap: 7px; }
.funnel-key a:hover { color: var(--ink); }
.funnel-key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.funnel-key b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- framed groups and rows */
.card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 20px 22px 8px; }
.card .section-head { margin-bottom: 8px; }
.card + .card { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin: 0 0 40px; }
.rows { display: block; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background-color 0.14s ease;
}
.row.ranked { grid-template-columns: 30px minmax(0, 1fr) auto 14px; }
.row:last-child { border-bottom: 0; }
.rows.framed .row:last-child { border-bottom: 1px solid var(--line); }
.row:hover { background: var(--blue-hover); }
.row .rank { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.row small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; line-height: 1.45; }
.row .st { font-size: 12px; color: var(--ink-2); text-align: right; white-space: nowrap; line-height: 1.4; }
.row .st.amber { color: var(--amber); }
.row svg.arrow { color: var(--ink-3); transition: transform 0.14s ease, color 0.14s ease; }
.row:hover svg.arrow { color: var(--blue-deep); transform: translateX(2px); }
.row.dim strong, .row.dim small, .row.dim .st { color: var(--ink-3); }
.row.dim:hover strong { color: var(--ink); }
.row.dim:hover small, .row.dim:hover .st { color: var(--ink-2); }
.row.event { grid-template-columns: 74px minmax(0, 1fr) 14px; align-items: start; }
.row.event time { font-size: 12px; color: var(--ink-3); padding-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.event.future strong, .row.event.future small, .row.event.future time { color: var(--ink-3); }
.row.static { cursor: default; }
.row.static:hover { background: transparent; }
.row .who { font-size: 12px; color: var(--ink-2); white-space: nowrap; padding-top: 3px; }
.row .who.human { color: var(--amber); }
.group-title { font-size: 15px; font-weight: 620; margin: 24px 0 2px; }
.group-title:first-child { margin-top: 0; }
.group-title small { font-weight: 400; color: var(--ink-3); margin-left: 8px; font-size: 13px; }
.quiet { display: flex; align-items: center; gap: 12px; padding: 22px 4px; color: var(--ink-2); font-size: 14px; }

/* ---------------------------------------------------------------- tabs and filters */
.tabs { display: flex; gap: 3px; margin-bottom: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; min-height: 46px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  color: var(--ink-2); font-size: 13px; white-space: nowrap; transition: color 0.14s ease;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-selected="true"]::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; border-radius: 2px; background: var(--blue); content: ""; }
.tabs a small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 18px; }
.filters a, .filters button { font-size: 13px; padding: 5px 10px; border-radius: 7px; color: var(--ink-2); transition: background-color 0.14s ease, color 0.14s ease; }
.filters a:hover, .filters button:hover { background: var(--surface-soft); color: var(--ink); }
.filters a[aria-pressed="true"], .filters button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue-deep); font-weight: 600; }
.filters .spacer { flex: 1; }
.filter-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; min-height: 34px; min-width: 200px; color: var(--ink-2); }
.filter-input input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 13px; color: var(--ink); }
.filter-input input::placeholder { color: var(--ink-3); }
.count-note { font-size: 13px; color: var(--ink-3); margin: -8px 0 14px; }

/* ---------------------------------------------------------------- idea page */
.facts { border: 1px solid var(--line); border-radius: 12px; padding: 4px 22px; margin: 0 0 32px; }
.facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-last-child(-n + 2) { border-bottom: 0; }
.facts div:only-child, .facts div:last-child { border-bottom: 0; }
.facts dt { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.facts dd { margin: 0; font-size: 13px; text-align: right; min-width: 0; }
.facts dd a { color: var(--blue-deep); }
.facts dd a:hover { text-decoration: underline; }
.prose { font-family: var(--font-serif); font-size: 17px; line-height: 1.7; color: var(--ink); max-width: var(--measure); }
.prose p { margin: 0 0 14px; }
.prose.muted { color: var(--ink-2); }
.notes { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.notes li { position: relative; padding: 5px 0 5px 18px; color: var(--ink-2); line-height: 1.6; font-size: 15px; }
.notes li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
details.disclosure { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 32px; }
details.disclosure > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary small { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--ink-3); }
details.disclosure > summary svg { color: var(--ink-3); transition: transform 0.14s ease; }
details.disclosure[open] > summary svg { transform: rotate(90deg); }
details.disclosure > .body { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.tech { font-size: 14px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.tech h2, .tech h3, .tech h4, .tech h5 { color: var(--ink); margin: 18px 0 6px; font-size: 14px; }
.tech h2 { font-size: 16px; }
.tech p { margin: 0 0 10px; }
.tech ul, .tech ol { margin: 0 0 10px; padding-left: 20px; }
.tech li { margin: 3px 0; }
.tech code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-soft); padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.tech pre { font-family: var(--mono); font-size: 12.5px; background: var(--surface-soft); padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.tech .lbl { font-weight: 600; color: var(--ink); }
.tech .path { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.tech blockquote { margin: 0 0 10px; padding-left: 14px; border-left: 2px solid var(--line-strong); color: var(--ink-2); }
.tech .tablewrap { overflow-x: auto; margin: 0 0 12px; }
.tech table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.tech th { text-align: left; font-weight: 600; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: bottom; }
.tech td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
a.ref { color: var(--blue-deep); }
a.ref:hover { text-decoration: underline; }
a.ref-src { font-family: var(--mono); font-size: 0.92em; }
.kv-line { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.kv-line b { color: var(--ink); font-weight: 600; }
.foot-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.foot-actions button, .foot-actions a { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-deep); font-weight: 550; }
.foot-actions button:hover, .foot-actions a:hover { text-decoration: underline; }
.foot-actions .path { font-family: var(--mono); font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.status-word { font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- modes (why ideas die) */
.mode { padding: 22px 0; border-bottom: 1px solid var(--line); }
.mode:last-child { border-bottom: 0; }
.mode-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mode-head h3 { font-size: 17px; }
.mode-head .n { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mode p { color: var(--ink-2); max-width: var(--measure); margin: 6px 0 0; line-height: 1.6; }
.mode .test { font-size: 13px; color: var(--ink-2); margin-top: 8px; max-width: var(--measure); }
.mode .test b { color: var(--ink); font-weight: 600; }
.mode details { margin-top: 10px; }
.mode summary { font-size: 13px; color: var(--blue-deep); font-weight: 550; cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.mode summary::-webkit-details-marker { display: none; }
.mode details[open] summary svg { transform: rotate(90deg); }
.mode summary svg { color: var(--ink-3); transition: transform 0.14s ease; }
.mode .rows { margin-top: 6px; }

/* ---------------------------------------------------------------- reading / people rows */
.row .kind { font-size: 11px; color: var(--ink-3); }
.pill { display: inline-flex; min-height: 20px; align-items: center; border-radius: 999px; background: var(--blue-soft); padding: 2px 8px; color: var(--blue-deep); font-size: 10px; font-weight: 620; line-height: 1; }

/* ---------------------------------------------------------------- modal */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(25, 33, 50, 0.32); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in 0.16s ease-out both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(calc(100vw - 40px), 660px); max-height: min(88dvh, 880px); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper); border-radius: 14px; box-shadow: var(--panel-shadow); overflow: hidden; animation: pop-in 0.18s ease-out both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-head { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 12px; padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.modal-head .sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.modal-head .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.modal-body { overflow-y: auto; padding: 6px 22px 22px; }
.modal-body h3 { font-size: 14px; margin: 20px 0 6px; }
.modal-body .row { padding: 11px 0; }
.modal-body .prose { font-size: 15px; line-height: 1.65; }
.modal-body .prose p { margin-bottom: 10px; }
.details { margin: 12px 0 0; }
.details div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.details div:last-child { border-bottom: 0; }
.details dt { color: var(--ink-2); }
.details dd { margin: 0; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.details dd a { color: var(--blue-deep); }
.details dd a:hover { text-decoration: underline; }
.copy { font-size: 12px; color: var(--blue-deep); font-weight: 550; white-space: nowrap; }
.copy:hover { text-decoration: underline; }
.modal .tech { font-size: 13.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions a, .actions button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13px; font-weight: 550; color: var(--ink); transition: background-color 0.14s ease, border-color 0.14s ease; }
.actions a:hover, .actions button:hover { background: var(--surface-soft); }
.actions a.primary { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.actions a.primary:hover { background: var(--blue); border-color: var(--blue); }

/* ---------------------------------------------------------------- search palette */
.palette-backdrop { align-items: flex-start; padding-top: 14vh; }
.palette { width: min(calc(100vw - 32px), 600px); max-height: 70dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--paper); border-radius: 12px; box-shadow: var(--panel-shadow); overflow: hidden; animation: pop-in 0.18s ease-out both; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 54px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.palette-input kbd { font-family: var(--font-ui); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.palette-list { overflow-y: auto; padding: 8px; }
.palette-group { font-size: 11px; color: var(--ink-3); padding: 10px 10px 4px; }
.palette-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--blue-soft); }
.palette-item strong { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
.palette-item small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.palette-item svg { color: var(--ink-3); }
.palette-empty { padding: 26px 16px; color: var(--ink-2); font-size: 14px; }
.palette-hint { padding: 8px 16px 12px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- misc */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; font-size: 13px; padding: 9px 14px; border-radius: 9px; box-shadow: var(--panel-shadow); animation: fade-in 0.14s ease-out both; }
.foot { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a:hover { color: var(--blue-deep); }
.empty-state { display: flex; min-height: 50vh; flex-direction: column; justify-content: center; gap: 10px; }
.empty-state h1 { font-size: 26px; }
.empty-state p { color: var(--ink-2); }
.empty-state a { color: var(--blue-deep); font-weight: 550; display: inline-flex; gap: 7px; align-items: center; }
body:not([data-register="technical"]) .tech-only { display: none !important; }
body[data-register="technical"] .plain-only { display: none !important; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.debate { padding: 12px 4px; border-bottom: 1px solid var(--line); }
.debate:last-child { border-bottom: 0; }
.debate strong { display: block; font-weight: 600; }
.debate p { font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }
.debate .links { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.debate .links a { color: var(--blue-deep); }
.debate .links a:hover { text-decoration: underline; }
.debate .links span { color: var(--ink-3); }
.steps { counter-reset: step; }
.steps .row { grid-template-columns: 30px minmax(0, 1fr); }
.steps .row .rank::before { counter-increment: step; content: counter(step); }
.vocab { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.vocab span { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--ink); }
.judges-inline { font-size: 13px; color: var(--ink-2); }
.judges-inline a { color: var(--blue-deep); }
.judges-inline a:hover { text-decoration: underline; }
.commit { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) { .content { width: min(calc(100% - 64px), 1000px); } }
@media (max-width: 850px) {
  .grid-2, .two-col { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: 1fr; }
  .facts div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .facts div:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .mobile-header { display: flex; position: sticky; top: 0; z-index: 18; align-items: center; justify-content: space-between; gap: 8px; height: 54px; padding: 0 10px 0 8px; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .mobile-header .name { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 18; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid rgba(229, 233, 239, 0.9); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(16px); padding: 6px max(10px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .mobile-nav a { display: grid; justify-items: center; gap: 4px; font-size: 11px; min-height: 47px; color: var(--ink-2); padding-top: 6px; border-radius: 8px; }
  .mobile-nav a.active { color: var(--blue-deep); font-weight: 620; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .content { width: min(calc(100% - 40px), 1000px); margin: 26px auto 120px; }
  .page-title { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; }
  .page-title h1, .hero h1 { font-size: 28px; }
  .page-title .meta { text-align: left; white-space: normal; }
  .view-head h1 { font-size: 26px; }
  .hero .lede { font-size: 17px; }
  .intro { font-size: 16px; }
  .prose { font-size: 16px; }
  .row .st { display: none; }
  .row.event .st { display: none; }
  .filters .filter-input { width: 100%; }
  .modal { width: 100%; max-height: 90dvh; }
  .backdrop { padding: 12px; align-items: flex-end; }
  .palette-backdrop { align-items: flex-start; padding-top: 8vh; }
  .sidebar-register-mobile { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .sidebar, .mobile-header, .mobile-nav, .backdrop { display: none !important; }
  .workspace { margin: 0; }
  .content { width: auto; margin: 0; }
}
