/* startups.as: quiet, readable, fast. One accent; slate for Do.Industries; system type. */
:root {
  --bg: #fbfaf7; --fg: #1d1f24; --muted: #6b6f78; --line: #d9d6cf; --soft: #f1efe9;
  --accent: #b4532a; --accent-soft: #f6e6dc; --slate: #3c4655; --slate-fg: #eef1f5;
  --stated: #1f6f4a; --stated-bg: #e3f1e8; --inferred: #7a5b12; --inferred-bg: #f6efd9; --observed: #2e5a8a; --observed-bg: #e3ecf6;
  --gone: #9a9a9a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171b; --fg: #e7e5e0; --muted: #9a9ea8; --line: #33363d; --soft: #1e2126;
    --accent: #e08a5c; --accent-soft: #3a2a20; --slate: #56637a; --slate-fg: #f2f4f8;
    --stated: #7fd1a5; --stated-bg: #1d3328; --inferred: #e3c378; --inferred-bg: #362e1a; --observed: #8db9e8; --observed-bg: #1c2a3a;
    --gone: #6d6f74;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 2px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
main { max-width: 1180px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { font-size: 30px; line-height: 1.15; margin: 4px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 36px 0 10px; }
h3 { font-size: 14px; margin: 14px 0 6px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.lede { color: var(--muted); max-width: 70ch; margin-top: 0; }
.kicker { margin: 18px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: lowercase; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 16px; border-bottom: 1px solid var(--line); max-width: 1180px; margin: 0 auto; }
.mark { font-weight: 700; font-size: 17px; text-decoration: none; letter-spacing: -0.01em; }
.mark span { color: var(--accent); }
nav.lenses, nav.tools { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
nav.tools { margin-left: auto; color: var(--muted); }
nav a { text-decoration: none; }
nav a.on { color: var(--accent); }
.who { color: var(--fg); }
.banner { max-width: 1180px; margin: 0 auto; padding: 6px 16px; font-size: 13px; color: var(--muted); }
.banner.fixture b { color: var(--inferred); }
footer { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.chip { display: inline-block; padding: 1px 8px; margin: 0 4px 2px 0; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); background: var(--bg); }
.chip.status.on-stage { color: var(--accent); border-color: var(--accent); }
.chip.status.expired, .chip.gone { color: var(--gone); text-decoration: line-through; }
.chip.truth.runs-today { color: var(--stated); border-color: var(--stated); }
.prov { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.prov.stated, .prov.ratified { background: var(--stated-bg); color: var(--stated); }
.prov.inferred { background: var(--inferred-bg); color: var(--inferred); }
.prov.observed { background: var(--observed-bg); color: var(--observed); }
.prov .src { opacity: .85; }
.why { font-size: 12.5px; color: var(--muted); margin-top: 3px; max-width: 70ch; }

h1 .dom { font-size: 15px; font-weight: 400; color: var(--muted); margin-left: 6px; font-family: var(--mono); }
.card { border-left: 3px solid var(--line); padding: 2px 14px; margin: 12px 0; max-width: 80ch; }
.card .pitch { color: var(--muted); }
.tension { background: var(--soft); padding: 4px 16px 8px; border-radius: 6px; }
.tension h2 { margin-top: 10px; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); }
table.fields th { width: 170px; font-weight: 600; font-size: 13.5px; }
table.fields td.val { width: 26%; }
td.act { width: 1%; white-space: nowrap; }
table.rels td.verb { font-family: var(--mono); font-size: 12.5px; color: var(--accent); white-space: nowrap; }
tr.retracted td { opacity: .5; }
.log-table td.prev { color: var(--muted); text-decoration: line-through; }
.log-table td { font-size: 13px; }

details.edit summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
details.edit summary::-webkit-details-marker { display: none; }
details.edit[open] { min-width: 300px; }
form.op { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
form.op.inline { display: inline-flex; margin: 0; }
form.op output { flex-basis: 100%; font-size: 12.5px; }
form.op output.ok b { color: var(--stated); }
form.op output.err b { color: var(--accent); }
form.op output pre { white-space: pre-wrap; max-height: 260px; overflow: auto; background: var(--soft); padding: 8px; border-radius: 4px; }
input, select, button { font: inherit; font-size: 13.5px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; }
button { cursor: pointer; background: var(--soft); }
button:hover { border-color: var(--accent); }
button[data-commit] { border-color: var(--accent); color: var(--accent); }
.add-rel { padding: 10px; background: var(--soft); border-radius: 6px; }
.add-rel input[name=why] { flex: 1; min-width: 140px; }

/* stacks */
.stack-wrap { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); margin: 10px 0 18px; }
.stack-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.stack-bar .spacer { flex: 1; }
.trail { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.trail li + li::before { content: "›"; color: var(--muted); margin-right: 4px; }
.trail a.open { margin-left: 8px; color: var(--accent); }
.picks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.picks button, .mode { font-size: 12px; padding: 2px 8px; }
.picks button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stack-canvas { overflow-x: auto; padding: 14px 8px 6px; }
svg.stack { display: block; margin: 0 auto; max-width: 100%; height: auto; font-family: var(--sans); }
@media (max-width: 760px) { svg.stack { max-width: none; } }
.stack-text { margin: 0; padding: 14px; overflow-x: auto; font-size: 12px; line-height: 1.35; }
.stack-wrap .notes, .stack-wrap .hint { margin: 0; padding: 0 12px 8px; font-size: 12.5px; color: var(--muted); }
svg.stack .edge { stroke: var(--fg); stroke-opacity: .45; stroke-width: 1.3; }
svg.stack .edge.stated { stroke-opacity: .8; stroke-width: 1.6; }
svg.stack .edge.positional { stroke-dasharray: 2 4; stroke-opacity: .35; }
svg.stack .edge.door { stroke-dasharray: 5 4; stroke-opacity: .4; }
svg.stack .node rect { fill: var(--bg); stroke: var(--fg); stroke-opacity: .3; }
svg.stack .node text { fill: var(--fg); text-anchor: middle; dominant-baseline: central; }
svg.stack .node.lv0 rect { fill: var(--accent-soft); stroke: var(--accent); stroke-opacity: .7; }
svg.stack .node.lv0 text { font-weight: 650; }
svg.stack .node.lv3 rect, svg.stack .node.lv4 rect, svg.stack .node.lv5 rect { stroke-opacity: .55; }
svg.stack .node.door rect { stroke-dasharray: 4 3; fill: var(--soft); stroke-opacity: .4; }
svg.stack .node.door text { fill: var(--muted); }
svg.stack .node.on-plate rect { fill: var(--slate); stroke: var(--slate); }
svg.stack .node.on-plate text { fill: var(--slate-fg); }
svg.stack .plate { fill: var(--slate); fill-opacity: .16; }
svg.stack .node.centre rect { stroke: var(--accent); stroke-width: 2.4; stroke-opacity: 1; }
svg.stack .node.gone text { fill: var(--gone); text-decoration: line-through; }
svg.stack .node:hover rect { stroke: var(--accent); stroke-opacity: 1; }
svg.stack .tier-label { fill: var(--muted); font-size: 12.5px; dominant-baseline: central; }
svg.stack .more { fill: var(--accent); font-size: 11.5px; }

/* home */
.intro p { color: var(--muted); }
.tri-wrap { max-width: 820px; margin: 0 auto; }
svg.triangle { width: 100%; height: auto; font-family: var(--sans); }
svg.triangle .tlines line { stroke: var(--fg); stroke-opacity: .35; stroke-width: 1.4; }
svg.triangle .tnode rect { fill: var(--bg); stroke: var(--fg); stroke-opacity: .4; }
svg.triangle .tnode text { fill: var(--fg); text-anchor: middle; dominant-baseline: central; font-size: 16px; }
svg.triangle .tnode.vertex rect { fill: var(--accent-soft); stroke: var(--accent); stroke-opacity: .8; }
svg.triangle .tnode.vertex text { font-weight: 650; font-size: 17px; }
svg.triangle .tnode.unnamed rect { stroke-dasharray: 4 4; fill: var(--soft); }
svg.triangle .tnode.unnamed text { fill: var(--muted); font-style: italic; }
svg.triangle .tnode:hover rect { stroke: var(--accent); stroke-opacity: 1; }
svg.triangle .tcap { fill: var(--muted); font-size: 12px; letter-spacing: .06em; }
.unnamed-note { max-width: 70ch; color: var(--muted); }
.unnamed-note:not(:target) h2 { font-size: 15px; }
.unnamed-note:target { background: var(--accent-soft); padding: 2px 14px 6px; border-radius: 6px; color: var(--fg); }
.lens-cards ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.lens-cards li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.lens-cards li > span { color: var(--muted); font-size: 13px; }
.lens-cards .facets a, nav.facets a { font-size: 12.5px; margin-right: 8px; }
.sub { color: var(--muted); margin-top: -4px; }
.find form, form.find { display: flex; gap: 6px; max-width: 460px; margin: 10px 0; }
.find input, form.find input { flex: 1; }

/* lists of names */
p.names { display: flex; flex-wrap: wrap; gap: 3px 14px; line-height: 1.7; }
a.name.gone { color: var(--gone); text-decoration: line-through; }
a.name.unheld { font-style: italic; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 28px; }
ul.logos { padding-left: 18px; margin: 0; }
.journey p { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.journey .arrow { color: var(--muted); }
nav.facets { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 10px 0; }
nav.facets a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
nav.facets a.on { border-color: var(--accent); color: var(--accent); }
.filter code { font-size: 11.5px; word-break: break-all; }
h3.grp { color: var(--fg); text-transform: none; }
.slice-editor td input { width: 100%; min-width: 90px; }
.slice-editor td.mv { white-space: nowrap; width: 1%; }
.slice-editor td.mv button, .slice-editor td button { padding: 1px 6px; }
ul.proposals { padding-left: 18px; }
@media (max-width: 640px) {
  h1 { font-size: 24px; }
  table.fields th { width: auto; }
  table.fields, table.fields tbody, table.fields tr, table.fields td, table.fields th { display: block; }
  table.fields tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.fields td, table.fields th { border: 0; padding: 2px 0; }
  table.rels { display: block; overflow-x: auto; }
  nav.tools { margin-left: 0; }
}
/* keep long provenance sources inside their cell */
table.fields { table-layout: fixed; }
table.fields td.val { width: 28%; overflow-wrap: anywhere; }
table.fields td.act { width: 88px; }
.prov { white-space: normal; overflow-wrap: anywhere; }
details.contested { display: inline-block; margin: 0 0 6px; font-size: 13px; }
details.contested summary { cursor: pointer; color: var(--muted); list-style: none; display: inline-block; padding: 1px 8px; border: 1px dashed var(--line); border-radius: 999px; font-size: 12px; }
details.contested summary::-webkit-details-marker { display: none; }
details.contested[open] { display: block; background: var(--soft); padding: 8px 14px; border-radius: 6px; max-width: 80ch; }
td.verb .pred { font-size: 11.5px; }
