/* Admin console layout. Same tokens as the app (base.css, copied). Flat surfaces, one border weight, one small radius.
   Ember is the only attention colour: a threshold, a flag, a refusal. Never a fill larger than a tick or a dot.
   Drawings: thin marks, 2 px gaps, measured values solid, estimates hollow. */
main { max-width: 64rem; margin: 0 auto; padding: 1rem 16px 5rem; }
.adm { font-size: .9rem; color: var(--mute); margin-left: .35rem; align-self: flex-end; padding-bottom: .15rem; }
.small { font-size: .9rem; }
.lead { font-size: 1.1rem; max-width: 60ch; }
h2 { margin: 0 0 .75rem; }
h3 { font: 700 1rem/1.4 var(--sans); margin: 1.25rem 0 .5rem; }
.sentence { font: 600 clamp(1.4rem, 4.6vw, 1.9rem)/1.35 var(--serif); max-width: 36ch; margin-bottom: .75rem; }
select { font: inherit; color: var(--ink); background: var(--night); border: 1px solid var(--mute); border-radius: 4px; min-height: 44px; padding: .5rem .75rem; max-width: 100%; }
label { display: grid; gap: .25rem; font-size: .9rem; color: var(--mute); }
label input, label select { color: var(--ink); font-size: 1rem; width: 100%; }
label.check { display: flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ink); }
label.check input { width: 1.25rem; min-height: 0; height: 1.25rem; padding: 0; accent-color: var(--leaf); }
input[type="date"] { color-scheme: inherit; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); align-items: end; max-width: 48rem; }
.grid .wide { grid-column: 1 / -1; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: .5rem 0; }
.row label { min-width: 9rem; }
.sep { margin-top: 1.25rem; }
[hidden] { display: none !important; }
button.link { border: 0; min-height: 44px; padding: .5rem .25rem; color: var(--mute); text-decoration: underline; text-underline-offset: .2em; }
button.link:hover { color: var(--leaf); }
button.go { border-color: var(--leaf); }
button.danger { border-color: var(--ember); color: var(--ember); }
button.small { min-height: 36px; padding: .25rem .75rem; font-size: .9rem; }
.quiet { margin-top: 1.5rem; }

/* Navigation: one line of text links; the current page in ink, the others in leaf; an ember dot for attention. */
.nav { max-width: 64rem; margin: 0 auto; padding: 0 16px; }
.nav ul { list-style: none; margin: 0; padding: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: 0 1.1rem; border-bottom: 1px solid var(--bark); }
.nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--leaf); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--wood); text-decoration-thickness: 2px; text-underline-offset: .45em; }
.dot { display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--ember); margin-left: .3rem; vertical-align: middle; flex: none; }

/* Page rhythm: a sentence, one drawing, then quiet blocks and folds. */
.hero { margin: 1.25rem 0 1rem; }
.block { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--bark); }
.hero + .block { border-top-color: var(--wood); }
.block:empty { display: none; }
.crumbs { margin: .75rem 0 0; font-size: .9rem; }
.banner { margin: 1rem 0 0; padding: .6rem .9rem; border-left: 3px solid var(--ember); background: var(--bark); border-radius: 0 4px 4px 0; color: var(--ink); max-width: 62ch; }
#demo { margin: .75rem 0 0; }
.msg { position: sticky; bottom: 0; min-height: 1.5rem; margin: 1.5rem -16px 0; padding: .5rem 16px; background: var(--night); color: var(--mute); }
.msg:empty { padding: 0; min-height: 0; }
.msg.bad, .fail, #err { color: var(--ember); }
#err:empty { display: none; }
#view:focus { outline: none; }

.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .35rem 1.25rem; margin: .5rem 0 1rem; max-width: 48rem; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.plain { list-style: none; margin: .5rem 0 1rem; padding: 0; max-width: 62ch; }
.plain li { padding: .25rem 0; }
.attn { list-style: none; margin: 0 0 1rem; padding: 0; }
.attn li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; padding: .3rem 0; }
.attn .dot { margin: 0 .2rem 0 0; align-self: center; }

/* Drawings. Every one has role=img, a label, and the same numbers in text beside it. */
.viz { display: block; width: 100%; height: auto; overflow: visible; }
.viz .track { fill: var(--bark); }
.viz .fill { fill: var(--leaf); }
.viz .fill.approx { fill: var(--leaf); fill-opacity: .6; }
.viz .hot { fill: var(--ember); }
.viz .tick { fill: var(--mute); }
.viz .tick.end { fill: var(--ink); }
.viz .tick.crossed { fill: var(--ember); }
.viz .proj { fill: var(--night); stroke: var(--ink); stroke-width: 2; }
.budget { max-width: 34rem; margin: 1rem 0 .5rem; }
.budgetfig { margin: 0; }
.legend-line { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .9rem; color: var(--mute); margin-bottom: .5rem; }
.legend-line > span { display: inline-flex; align-items: center; gap: .4rem; }
.key { display: inline-block; flex: none; }
.key.solid { width: .9rem; height: .55rem; background: var(--leaf); border-radius: 2px; }
.key.tickkey { width: 2px; height: .9rem; background: var(--mute); }
.key.hollow { width: .65rem; height: .65rem; border: 2px solid var(--ink); border-radius: 50%; }
.meter { max-width: 24rem; margin: .35rem 0 .2rem; }

.funnel { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(8rem, 1fr) max-content; gap: .4rem .75rem; align-items: center; max-width: 48rem; margin: .5rem 0; }
.frow { display: contents; }
.frow .fl { color: var(--ink); }
.frow .fn { font-variant-numeric: tabular-nums; text-align: right; color: var(--mute); font-size: .9rem; }
.frow .fnote { grid-column: 2 / -1; }
.fbar { max-width: 100%; }

.stackbox { max-width: 34rem; margin: .5rem 0 1rem; }
.stack { margin-bottom: .5rem; }
.stack .s0 { fill: var(--leaf); }
.stack .s1 { fill: var(--wood); }
.stack .s2 { fill: var(--mute); }
.stack .s3 { fill: var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .9rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.legend li { display: inline-flex; align-items: center; gap: .4rem; }
.legend .sw { width: .8rem; height: .8rem; border-radius: 2px; display: inline-block; }
.legend .s0 { background: var(--leaf); }
.legend .s1 { background: var(--wood); }
.legend .s2 { background: var(--mute); }
.legend .s3 { background: var(--ink); }
.strip { max-width: 34rem; margin: .5rem 0; }

.allow { list-style: none; margin: 0 0 1rem; padding: 0; max-width: 56rem; }
.allow li { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(8rem, 16rem) 1fr; gap: .25rem 1rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--bark); }
.allow li.dim .al-name, .allow li.dim .al-val { color: var(--mute); }
.allow .meter { margin: 0; }
.al-val { font-variant-numeric: tabular-nums; }
.money dd { text-align: left; }

/* Folds: tables stay collapsed unless the table is the page. */
.fold { margin-top: 1.5rem; }
summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: .6rem; font: 600 1.2rem/1.25 var(--serif); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--leaf); border-bottom: 2px solid var(--leaf); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
details > div { margin-top: .5rem; }

.scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--bark); text-align: left; white-space: nowrap; font-weight: 400; vertical-align: baseline; }
th[scope="col"] { color: var(--mute); border-bottom-color: var(--wood); }
td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 9rem; }
td.n, th.n { text-align: right; }
tr.dim td { color: var(--mute); }
tr.held td:last-child { color: var(--ember); }
.flag { color: var(--ember); }
.pager { margin-top: .75rem; }
.filters { margin: 0 0 1rem; }

.panel { margin-top: 1.25rem; padding: 1rem; background: var(--bark); border-radius: 4px; max-width: 48rem; border-top: 0; }
.panel h2, .panel h3 { margin-top: 0; }
.panel select, .panel input { background: var(--night); }
.two { margin: .5rem 0; }
.two .ask { margin: .5rem 0; max-width: 60ch; }
.two .row { margin: .25rem 0; }
.cards { list-style: none; margin: .5rem 0; padding: 0; display: grid; gap: 1rem; max-width: 48rem; }
.cards > li { padding: .75rem 0 1rem; border-bottom: 1px solid var(--bark); }
.devs { list-style: none; margin: 0; padding: 0; max-width: 56rem; }
.devs li { padding: .5rem 0; border-bottom: 1px solid var(--bark); }
.notice { border-left: 3px solid var(--wood); padding-left: .75rem; }

.made { margin-top: 1rem; padding: .75rem 1rem; background: var(--bark); border-radius: 4px; max-width: 34rem; }
.made code { font-size: 1.25rem; padding: .2em .5em; background: var(--night); }
.made p { margin-bottom: .5rem; }

/* Invite tree: an indented list, keyboard and 360 px friendly. No node-link drawing. */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: .9rem; padding-left: .9rem; border-left: 1px solid var(--wood); }
.tree li { margin: .1rem 0; }
.tree summary { font: inherit; min-height: 0; display: flex; align-items: baseline; }
.tree summary::before { display: inline-block; margin-right: .5rem; }
.nd { display: inline-flex; flex-wrap: wrap; gap: .1rem .75rem; align-items: baseline; padding: .4rem 0; }
.nd .tg { font-weight: 700; }
.tree li > .nd { padding-left: 1rem; }

.sw { list-style: none; margin: 0; padding: 0; max-width: 48rem; }
.sw li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .5rem 0; border-bottom: 1px solid var(--bark); }
.swr { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sw .st { min-width: 2.5rem; display: inline-block; color: var(--mute); }
.sw .st.on { color: var(--leaf); }
.sw .two { margin: 0; }

.cv-filters { margin-bottom: 1rem; }
.cv-filters label { min-width: 11rem; }
.cv-chart { max-width: 42rem; }
.cv-chart .grid { stroke: var(--bark); stroke-width: 1; }
.cv-chart .axis { fill: var(--mute); font: 400 11px/1 var(--sans); }
.cv-chart .seg { stroke: var(--night); stroke-width: 1; }
.cv-chart .seg.s0 { fill: var(--leaf); }
.cv-chart .seg.s1 { fill: var(--wood); }
.cv-chart .seg.s2 { fill: var(--mute); }
.cv-chart .seg.s3 { fill: var(--ink); }
.cv-body .stackbox { max-width: 42rem; }
tr.behind td { color: var(--mute); }

@media (prefers-reduced-motion: reduce) { summary::before { transition: none; } }
@media (max-width: 640px) {
  .funnel { display: block; }
  .frow { display: grid; grid-template-columns: 1fr max-content; gap: .2rem .75rem; align-items: center; margin-bottom: .5rem; }
  .frow .viz { grid-column: 1 / -1; grid-row: 2; }
  .frow .fnote { grid-column: 1 / -1; }
  .allow li { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0 1rem; }
  .facts dd { margin-bottom: .4rem; }
}
@media (max-width: 520px) { .brand { margin-right: 0; } .top { justify-content: space-between; } }

.shop-out .editor textarea { width: 100%; max-width: 44rem; font-family: ui-monospace, monospace; font-size: .85rem; color: var(--ink); background: transparent; border: 1px solid var(--mute); border-radius: 4px; padding: .5rem; }
.shop-out .editor .kind-fields { margin: .5rem 0; }
.shop-out .revoke { border: 1px solid var(--ember); border-radius: 4px; padding: .5rem 1rem; margin: .75rem 0; }
.shop-out h3 { margin: 1.25rem 0 .25rem; font-size: 1rem; }
.forest .ci { stroke: var(--ink); stroke-width: 2; }
.forest .grid { stroke-dasharray: 4 3; }
