/* The Silence Map
   Idea: unanswered problems are echoes on a map. Bigger echo = more people asking.
   Palette: cool survey-map paper, indigo ink, ultramarine signal. */
:root {
  --paper: #eef0f5;
  --surface: #ffffff;
  --ink: #18203a;
  --muted: #545c75;
  --line: #d3d8e4;
  --signal: #3446c8;
  --signal-ink: #26349a;
  --echo: #7f8cf0;
  --tint-a: #e6e9f3;
  --tint-b: #eceef6;
  --solved: #17785f;
  --solved-soft: #dcf0e8;
  --louder: #a8460b;
  --louder-soft: #fbe8da;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12162a; --surface: #1a1f38; --ink: #e8eaf4; --muted: #a3aac4; --line: #2c3354;
    --signal: #8e9bff; --signal-ink: #b5beff; --echo: #6c79e8; --tint-a: #171c33; --tint-b: #151a2f;
    --solved: #4cc9a0; --solved-soft: #173a31; --louder: #f0a06a; --louder-soft: #3a2618;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--body); }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--signal-ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; max-width: 32ch; }
h2 { font-size: 18px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; margin: 24px 0 8px; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 700; margin: 0; }
p { margin: 0 0 12px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok { color: var(--solved); }
.lead { font-size: 16px; color: var(--muted); max-width: 70ch; }
ul.plain { list-style: none; margin: 0; padding: 0; }

/* masthead */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 18px/1 var(--display); letter-spacing: -0.02em; }
.brand-mark circle { fill: var(--signal); stroke: var(--signal); stroke-width: 1.6; }
.brand-mark circle + circle { opacity: .55; }
.brand-mark circle + circle + circle { opacity: .25; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; font-size: 14px; }
.nav a, .nav-button { color: var(--ink); text-decoration: none; padding: 10px 0; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav-button:hover { color: var(--signal); }
.nav .btn { padding: 0 16px; color: #fff; background: var(--signal); }
.nav .btn:hover { background: var(--signal-ink); color: #fff; }
.inline { display: inline; margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
       background: var(--signal); color: #fff; font: 700 14px var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--signal-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .btn:hover, .nav .btn { color: #12162a; } }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-quiet, .btn-ghost { background: transparent; color: var(--signal); box-shadow: inset 0 0 0 1.5px var(--signal); }
.btn-quiet:hover, .btn-ghost:hover { background: var(--tint-a); color: var(--signal-ink); }
.pill { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 13px var(--body); cursor: pointer; }
.pill:hover { border-color: var(--signal); }
.pill.is-on { border-color: var(--signal); color: var(--signal); font-weight: 700; }
.pill-strong { border-color: var(--solved); color: var(--solved); font-weight: 700; }
.pill-strong:hover { background: var(--solved-soft); border-color: var(--solved); }

/* home intro + search */
main { padding: 20px 0 48px; }
.intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding: 4px 0; }
.intro h1 { margin: 0; }
.intro .search { flex: 1 1 420px; max-width: 560px; margin: 0; }
.search { display: flex; gap: 10px; max-width: 760px; margin: 8px 0 0; }
.search input { flex: 1; min-width: 0; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 15px var(--body); }
.search input:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 20%, transparent); }
.search .btn { min-height: 44px; }

/* the map: the one memorable thing */
.map { margin: 18px 0 4px; }
.map-svg { display: block; width: 100%; height: auto; border-radius: 16px; overflow: hidden; background: var(--tint-b); }
.region rect { fill: var(--tint-b); }
.region-alt rect { fill: var(--tint-a); }
.region text { fill: var(--muted); font: 700 13px var(--display); }
.region a:hover text { fill: var(--signal); }
.blip { cursor: pointer; }
.blip-echo { fill: var(--echo); opacity: .08; }
.blip-ring { fill: var(--echo); fill-opacity: .16; stroke: var(--signal); stroke-opacity: .5; stroke-width: 1.2; }
.blip-core { fill: var(--signal); }
.blip:hover .blip-ring, .blip:focus .blip-ring { fill-opacity: .4; stroke-opacity: 1; stroke-width: 2; }
.blip:hover .blip-echo { opacity: .18; }
.map-key { font-size: 13px; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .blip { animation: surface .9s ease-out both; }
  .blip:nth-of-type(3n) { animation-delay: .15s; }
  .blip:nth-of-type(3n+1) { animation-delay: .3s; }
  @keyframes surface { from { opacity: 0; } to { opacity: 1; } }
}

/* layout */
.layout { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-start; }
.layout-main { flex: 999 1 560px; min-width: 0; }
.layout-side { flex: 1 1 270px; min-width: 0; padding-top: 6px; }
.side-block { margin-bottom: 18px; }
.side-block h2 { font-size: 15px; margin: 22px 0 4px; }
.side-list li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.side-list a { color: var(--ink); text-decoration: none; }
.side-list a:hover { color: var(--signal); text-decoration: underline; }
.region-list li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.region-list span { color: var(--muted); font-variant-numeric: tabular-nums; }
.more { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 13px; }

/* signal rows: one problem each */
.signals { border-top: 1px solid var(--line); }
.signal { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.signal-title { font-size: 16px; letter-spacing: -0.005em; }
.signal-title a { color: var(--ink); text-decoration: none; }
.signal-title a:hover { color: var(--signal); text-decoration: underline; }
.signal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.signal-meta strong { color: var(--ink); }
.region-link { color: var(--muted); }
.signal.is-solved .echo .ring, .signal.is-solved .echo .core { fill: var(--solved); }
.echo .ring { fill: var(--echo); }
.echo .core { fill: var(--signal); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin: 0; }
.tag-up { background: var(--louder-soft); color: var(--louder); }
.tag-solved { background: var(--solved-soft); color: var(--solved); }
.empty-note { padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); color: var(--muted); }

/* problem page */
.crumbs { font-size: 13px; display: flex; gap: 8px; color: var(--muted); margin-bottom: 10px; }
.problem { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 20px; align-items: center; padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.problem h1 { font-size: clamp(22px, 2.8vw, 32px); max-width: 40ch; }
.problem-facts { font-size: 15px; max-width: 80ch; }
.problem-facts .tag { margin-left: 6px; vertical-align: 2px; }
.problem-summary { color: var(--muted); max-width: 80ch; }
.problem-echo { display: flex; justify-content: center; }
.problem.is-solved .echo .ring, .problem.is-solved .echo .core { fill: var(--solved); }
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.bestfix { margin-top: 20px; padding: 2px 18px 10px; border-radius: 14px; border: 1.5px dashed var(--echo); background: var(--surface); }
.bestfix h2 { margin-top: 12px; margin-bottom: 2px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { padding: 10px 0 10px 16px; border-left: 3px solid var(--line); margin-bottom: 12px; }
.reply.is-confirmed { border-left-color: var(--solved); }
.confirmed { color: var(--solved); font-weight: 700; margin-bottom: 6px; }
.reply-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.reply-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reply-actions form { margin: 0; }
.compose { margin-top: 20px; padding: 2px 18px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.compose form, .form-card { display: flex; flex-direction: column; gap: 10px; }
.compose .btn, .form-card .btn { align-self: flex-start; margin-top: 4px; }
label { font-size: 14px; }
input, textarea { font: inherit; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); width: 100%; }
input:focus, textarea:focus { border-color: var(--signal); outline: none; }
textarea { resize: vertical; }
.sources li { padding: 5px 0; font-size: 14px; display: flex; flex-direction: column; }

/* account, admin and simple pages */
.page-head { margin-bottom: 14px; }
.flashes { padding-top: 18px; }
.flash { background: var(--surface); border-left: 4px solid var(--signal); padding: 12px 16px; border-radius: 8px; margin: 0 0 8px; }
.warn { background: var(--louder-soft); color: var(--louder); padding: 10px 14px; border-radius: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--signal); }
.card.removed { border-style: dashed; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 15px; }
.quote { border-left: 3px solid var(--line); padding-left: 12px; margin: 8px 0; }
.progress { height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; max-width: 440px; margin: 8px 0; }
.progress span { display: block; height: 100%; background: var(--solved); }
.auth { max-width: 480px; margin: 12px auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border-radius: 12px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
section:has(> .table) { overflow-x: auto; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prose li { margin-bottom: 8px; }
pre.card { font-size: 15px; overflow-x: auto; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 22px 0 32px; font-size: 13px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.foot-grid > div { flex: 2 1 420px; max-width: 640px; }
.foot-grid > nav { flex: 1 1 200px; }
.foot-brand { font: 800 15px var(--display); margin-bottom: 6px; }
.foot-head { font-weight: 700; margin-bottom: 6px; }
.foot li { padding: 3px 0; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .search { flex-direction: column; }
  .search .btn { width: 100%; }
  .problem { grid-template-columns: 1fr; padding: 24px 20px; }
  .problem-echo { display: none; }
  .signal { grid-template-columns: 30px 1fr; gap: 10px; }
  .region text { display: none; }
}

/* a forum question shown on our site */
.asked { margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid var(--echo); background: var(--surface); border-radius: 0 12px 12px 0; font-size: 15px; }
.asked p { margin: 0; }
.belongs h2 { margin: 2px 0 6px; font-size: 18px; }
.belongs h2 a { color: var(--ink); text-decoration: none; }
.belongs h2 a:hover { color: var(--signal); text-decoration: underline; }
.credit { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); }
