/* Almanac — Harvesters palette: warm dark ground, layered gold, a sparing frost accent. */
:root {
  --ground: #120f0b;
  --ground-2: #0b0907;
  --panel: #19150f;
  --panel-2: #211b14;
  --line: #3a3430;
  --line-soft: #2a241e;
  --gold: #d9a441;
  --gold-hi: #f3cf7a;
  --gold-lo: #8c6420;
  --frost: #9fc3d6;
  --ink: #e9e1d2;
  --muted: #a09588;
  --faint: #6f665c;
  --bad: #e06a4e;
  --warn: #e3a43c;
  --good: #86bd7f;
  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  background-image: radial-gradient(ellipse at 70% -10%, rgba(217, 164, 65, 0.07), transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; margin: 0; }
h1 { font-size: 34px; text-transform: uppercase; color: var(--gold-hi); line-height: 1.05; }
h2 { font-size: 19px; text-transform: uppercase; color: var(--ink); }
h3 { font-size: 15px; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Layout -------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: linear-gradient(180deg, var(--ground-2), #0d0b08);
  border-right: 1px solid var(--line-soft);
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; }
.brand .word { font-family: var(--display); font-size: 26px; letter-spacing: 0.16em; color: var(--gold); line-height: 1; }
.brand .sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 10px; border-radius: var(--radius); color: var(--ink); border-left: 2px solid transparent;
}
.nav a:hover { background: var(--panel); text-decoration: none; }
.nav a.on { background: var(--panel-2); border-left-color: var(--gold); }
.nav a .t { font-family: var(--display); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav a .s { font-family: var(--mono); font-size: 10px; color: var(--faint); text-transform: uppercase; }
.nav a.on .t { color: var(--gold-hi); }
.side-foot { margin-top: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); display: flex; flex-direction: column; gap: 6px; }
.side-foot .asof { color: var(--muted); }
.side-foot .asof b { color: var(--frost); font-weight: 500; }
.side .menu-btn { display: none; }

main { padding: 22px 28px 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .lede { color: var(--muted); margin-top: 4px; max-width: 760px; }
.page-head .tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Panels & tiles ------------------------------------------------------------------------ */
.panel {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 16px; min-width: 0;
}
.panel > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel > header .meta { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 11px 13px 12px; position: relative; overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tile.gold::before { background: var(--gold); }
.tile.bad::before { background: var(--bad); }
.tile.warn::before { background: var(--warn); }
.tile.good::before { background: var(--good); }
.tile.frost::before { background: var(--frost); }
.tile .k { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tile .v { font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--ink); letter-spacing: 0.02em; }
.tile .sub { font-size: 12px; color: var(--muted); }
.tile .prog { height: 3px; background: var(--line-soft); margin-top: 8px; border-radius: 2px; overflow: hidden; }
.tile .prog i { display: block; height: 100%; background: var(--gold); }

/* Chips --------------------------------------------------------------------------------- */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.critical { background: rgba(224, 106, 78, 0.22); border-color: var(--bad); color: #ffb7a6; }
.chip.high, .chip.bad, .chip.off_track, .chip.inactive, .chip.missing, .chip.review, .chip.error { border-color: var(--bad); color: #f39a85; }
.chip.medium, .chip.warn, .chip.at_risk, .chip.declining, .chip.partial { border-color: var(--warn); color: var(--warn); }
.chip.low, .chip.frost, .chip.gatherer, .chip.watch, .chip.settling { border-color: var(--frost); color: var(--frost); }
.chip.info, .chip.muted, .chip.below_floor { color: var(--faint); }
.chip.good, .chip.met, .chip.active, .chip.confirm, .chip.ok, .chip.worked { border-color: var(--good); color: var(--good); }
.chip.on_track { border-color: #b7c27a; color: #c9d48a; }
.chip.gold, .chip.recruit { border-color: var(--gold); color: var(--gold-hi); }
.chip.exempt, .chip.probation { border-color: var(--frost); color: var(--frost); }
.chip.failed { border-color: var(--bad); color: #f39a85; }
.chip.mixed { border-color: var(--warn); color: var(--warn); }

/* Recommendations ----------------------------------------------------------------------- */
.recs { display: flex; flex-direction: column; gap: 8px; }
.rec { border: 1px solid var(--line-soft); border-left: 3px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--panel-2); }
.rec.critical { border-left-color: var(--bad); background: linear-gradient(90deg, rgba(224, 106, 78, 0.10), var(--panel-2) 40%); }
.rec.high { border-left-color: var(--bad); }
.rec.medium { border-left-color: var(--warn); }
.rec.low { border-left-color: var(--frost); }
.rec .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rec .title { font-weight: 600; color: var(--ink); }
.rec .why { color: var(--muted); margin: 4px 0 2px; }
.rec .do { color: var(--ink); }
.rec .do::before { content: "→ "; color: var(--gold); }
.rec .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.sevbar { display: flex; gap: 6px; flex-wrap: wrap; }
.rec.more { background: transparent; border-style: dashed; border-left-style: solid; }
.rec.more .why a { color: var(--ink); }

/* Tables -------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.data th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); background: var(--ground-2); position: sticky; top: 0; z-index: 1;
}
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]:hover { color: var(--gold-hi); }
table.data th.asc::after { content: " ▲"; color: var(--gold); }
table.data th.desc::after { content: " ▼"; color: var(--gold); }
table.data td.n, table.data th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.data tbody tr:hover td { background: rgba(217, 164, 65, 0.04); }
table.data tr.ours td { background: rgba(217, 164, 65, 0.08); }
table.data td.wrap { white-space: normal; min-width: 220px; }
table.data .name { color: var(--ink); font-weight: 500; }
.pctbar { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; }
.pctbar .track { position: relative; flex: 1; height: 6px; background: var(--line-soft); border-radius: 3px; overflow: visible; min-width: 70px; }
.pctbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--gold); }
.pctbar .fill.bad { background: var(--bad); }
.pctbar .fill.warn { background: var(--warn); }
.pctbar .fill.good { background: var(--good); }
.pctbar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--frost); }
.pctbar .lbl { font-family: var(--mono); font-size: 12px; width: 48px; text-align: right; }

/* Forms --------------------------------------------------------------------------------- */
input, select, textarea, button { font: inherit; color: var(--ink); }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], input:not([type]), select, textarea {
  background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold-lo); }
textarea { width: 100%; min-height: 70px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label .help { font-size: 11.5px; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; font-size: 13px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--gold-lo); text-decoration: none; }
.btn.primary { background: linear-gradient(180deg, var(--gold), #b9852f); color: #1a1208; border-color: var(--gold); font-weight: 600; }
.btn.primary:hover { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.danger { border-color: rgba(224, 106, 78, 0.5); color: #f39a85; }
.btn.ghost { background: transparent; }
form.inline { display: inline; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 5px 11px; color: var(--muted); font-size: 12.5px; border-right: 1px solid var(--line); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--panel-2); color: var(--gold-hi); }
.seg a:hover { text-decoration: none; color: var(--ink); }

/* Misc ---------------------------------------------------------------------------------- */
.banner { padding: 9px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; border: 1px solid; }
.banner.demo { border-color: var(--frost); color: var(--frost); background: rgba(159, 195, 214, 0.06); }
.banner.ok { border-color: rgba(134, 189, 127, 0.5); color: var(--good); background: rgba(134, 189, 127, 0.06); }
.banner.error { border-color: rgba(224, 106, 78, 0.6); color: #f6a993; background: rgba(224, 106, 78, 0.07); }
.banner.note { border-color: var(--line); color: var(--muted); background: var(--panel); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.chart-box { position: relative; height: 230px; }
.chart-box.tall { height: 300px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); }
.list-plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.insights li { padding-left: 14px; position: relative; }
.insights li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.check { display: flex; gap: 8px; align-items: baseline; }
.check .ic { font-family: var(--mono); width: 16px; }
.check .ic.y { color: var(--good); }
.check .ic.n { color: var(--bad); }
.check .ic.u { color: var(--faint); }
details summary { cursor: pointer; color: var(--gold-hi); }
hr.rule { border: 0; border-top: 1px solid var(--line-soft); margin: 14px 0; }
.login { max-width: 360px; margin: 14vh auto; }
.hidden { display: none !important; }

@media (max-width: 1100px) {
  .grid.two, .grid.halves, .grid.thirds { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 10px; }
  .side .nav, .side .side-foot { display: none; width: 100%; }
  .side.open .nav, .side.open .side-foot { display: flex; }
  .side .menu-btn { display: inline-flex; margin-left: auto; }
  main { padding: 16px; }
  h1 { font-size: 28px; }
  .tile .v { font-size: 25px; }
}

/* Role-based visibility. The server enforces the same rules; this only hides controls that would be refused. */
body.ro form[method=post]:not(.always), body.ro .edit-only { display: none !important; }
body.nonadmin .admin-only { display: none !important; }
.side-foot .who { color: var(--muted); }
.side-foot .who a { color: var(--gold-hi); }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), #b9852f); color: #1a1208; font-weight: 600; cursor: grab;
  border: 1px solid var(--gold); text-decoration: none;
}
.bookmarklet:hover { text-decoration: none; }
.bookmarklet.alt { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
ol.steps { padding-left: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }

/* ---- Streamlined UI ------------------------------------------------------------------ */
.nav-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 12px 10px 4px; }
.nav a .t { font-size: 17px; }
.nav a.help-link { margin-top: 12px; border-top: 1px solid var(--line-soft); border-radius: 0; padding-top: 10px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.lede.big { font-size: 16px; color: var(--ink); margin-top: 6px; }
.lede.big b { color: var(--gold-hi); font-weight: 600; }
.today-head h1 { text-transform: none; letter-spacing: 0.02em; }

/* Tiles that filter or link */
button.tile { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
a.tile { display: block; color: inherit; }
a.tile:hover { text-decoration: none; }
.tile.clickable { transition: border-color 0.12s, background 0.12s; }
.tile.clickable:hover { border-color: var(--gold-lo); background: var(--panel-2); }
.tile.clickable.active { border-color: var(--gold); background: var(--panel-2); box-shadow: 0 0 0 1px var(--gold) inset; }
.tiles.tight { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; align-content: start; }
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.glance .tile .v { font-size: 22px; }

/* How-to strip */
details.howto { background: rgba(159, 195, 214, 0.05); border: 1px solid rgba(159, 195, 214, 0.25); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 14px; }
details.howto summary { color: var(--frost); font-size: 13px; }
details.howto ol { margin: 8px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); font-size: 13.5px; }
details.howto:not([open]) { padding: 6px 14px; }

/* Tables: fewer columns until asked */
table.data .more { display: none; }
table.data.show-more .more { display: table-cell; }
table.data th.tip { text-decoration: underline dotted var(--faint); text-underline-offset: 3px; cursor: help; }
table.data tr.hidden-s { display: none; }
.table-tools { gap: 8px; }
.table-tools input[type=search] { min-width: 180px; }
.ro-only { display: none; }
body.ro .ro-only { display: inline; }

/* Recommendation cards */
.rec .top .mod { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.rec .do::before { content: none; }
.rec .do b { color: var(--gold); font-weight: 600; }
details.later { position: relative; display: inline-block; }
details.later summary { list-style: none; }
details.later summary::-webkit-details-marker { display: none; }
details.later .menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; min-width: 190px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
details.later .menu form { margin: 0; }
details.later .menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; }
details.later .menu button:hover { background: var(--panel); color: var(--gold-hi); }
details.later-list { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
details.later-list > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
details.later-list > summary h3 { display: inline; color: var(--ink); }

/* Setup checklist and welcome */
.panel.setup { border-color: var(--gold-lo); margin-bottom: 16px; background: linear-gradient(180deg, rgba(217, 164, 65, 0.07), var(--panel) 60%); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line-soft); background: var(--ground-2); }
.checklist li.next { border-color: var(--gold-lo); }
.checklist li.done { opacity: 0.55; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.checklist li.done .tick { background: var(--good); color: #10200f; border-color: var(--good); }
.checklist li.next .tick { border-color: var(--gold); color: var(--gold-hi); }
.panel.welcome { margin-bottom: 16px; border-color: rgba(159, 195, 214, 0.35); }
.dismissed { display: none !important; }

/* Decision form */
.suggested { border-left: 3px solid var(--gold); background: var(--panel-2); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; }
.suggested .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); margin-bottom: 4px; }
.suggested .body { color: var(--ink); font-size: 13.5px; }
details.more-fields { margin-top: 12px; }
details.explain > summary { cursor: pointer; }
details.explain > summary h2 { display: inline; }
.seg.wrap { flex-wrap: wrap; }

/* Help page */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.help-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; }
.help-card h3 { color: var(--gold-hi); margin-bottom: 4px; }
.help-card .q { color: var(--ink); margin-bottom: 4px; }
/* Panels fill their column; only the text keeps a readable line length. */
.prose > p, .prose > ol, .prose > ul, .prose > h3 { max-width: 75ch; }
.prose p, .prose li { color: var(--ink); }
.prose ol, .prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 820px) { .glance, .tiles.tight { grid-template-columns: 1fr 1fr; } }

/* Join links and the public join page */
.join-links li { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--ground-2); }
.join-links li.fresh { border-color: var(--gold); }
.link-row { margin-top: 8px; flex-wrap: nowrap; }
.link-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.pending-panel { border-color: var(--warn); }
.warband-bar { margin-bottom: 12px; }
.wb { font-family: var(--mono); font-size: 10.5px; color: var(--frost); border: 1px solid rgba(159, 195, 214, 0.35); border-radius: 999px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.join-body { display: flex; justify-content: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); }
.join { width: 100%; max-width: 440px; margin-top: 6vh; padding: 20px; }
.join-h { font-size: 26px; text-transform: none; letter-spacing: 0.02em; margin-bottom: 6px; }
.join label { font-size: 13px; }
.join input, .join select, .join textarea { font-size: 16px; min-height: 46px; }
.btn.big { min-height: 48px; justify-content: center; font-size: 15px; width: 100%; }
.who-card { border: 1px solid var(--gold-lo); background: var(--panel-2); border-radius: 10px; padding: 14px; margin: 10px 0 4px; }
.who-card .nm { font-family: var(--display); font-size: 26px; color: var(--gold-hi); letter-spacing: 0.02em; }

/* Language switcher */
/* Language picker: one button, list opens on tap (partials/lang_menu.html). */
.lang-row { display: flex; }
.lang-menu { position: relative; }
.lang-menu > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  font-family: var(--sans); font-size: 12px; color: var(--muted);
  padding: 4px 8px 4px 9px; min-height: 28px; border: 1px solid var(--line-soft); border-radius: 999px;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--ink); border-color: var(--gold-lo); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-menu svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lang-menu .caret { width: 12px; height: 12px; transition: transform .15s; }
.lang-menu[open] .caret { transform: rotate(180deg); }
.lang-menu ul {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: max(100%, 160px);
  max-height: min(50vh, 320px); overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
}
.lang-menu.up ul { top: auto; bottom: calc(100% + 6px); }
.lang-menu.end ul { left: auto; right: 0; }
.lang-menu li a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; white-space: nowrap;
  padding: 8px 10px; border-radius: 6px; font-family: var(--sans); font-size: 13px; color: var(--muted);
}
.lang-menu li a:hover { background: var(--line-soft); color: var(--ink); text-decoration: none; }
.lang-menu li a[aria-current="true"] { color: var(--gold-hi); }
.lang-row:has(.end) { justify-content: flex-end; }
.login .lang-row, .setup .lang-row { justify-content: center; margin-top: 14px; }
.join .lang-row { margin: -6px 0 10px; }
.nav-phone .lang-row { padding: 4px 10px 8px; }
@media (max-width: 820px) { .lang-menu li a { padding: 11px 12px; font-size: 14px; } }

/* ---- Phones -------------------------------------------------------------------------- */
.tabbar, .menu-scrim, .mobile-asof, .nav-phone { display: none; }

@media (max-width: 820px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); background-attachment: scroll; }
  .shell { display: block; }

  /* Compact sticky header: logo on the left, data date on the right. */
  .side {
    position: sticky; top: 0; z-index: 20; height: auto; overflow: visible;
    flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
    border-right: 0; border-bottom: 1px solid var(--line-soft);
    /* Solid, not blurred: a backdrop-filter here would trap the fixed-position menu drawer inside the header. */
    background: rgba(11, 9, 7, 0.98);
  }
  .brand img { width: 32px; height: 32px; }
  .brand .word { font-size: 20px; }
  .brand .sub { font-size: 9.5px; }
  .mobile-asof { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--faint); text-align: right; line-height: 1.3; }
  .mobile-asof b { color: var(--frost); font-weight: 500; }

  /* The full menu becomes a drawer above the tab bar. */
  .side .nav, .side .side-foot { display: none; }
  body.menu-open .side .nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom));
    max-height: 72vh; overflow-y: auto; z-index: 40; gap: 2px;
    background: var(--ground-2); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
    padding: 14px 12px 10px; box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55);
  }
  body.menu-open .side .nav a { padding: 11px 12px; }
  /* The header is the drawer's stacking context; lift it above the scrim (30) while the menu is open,
     or the scrim covers the drawer and swallows every tap. The tab bar (50) stays on top. */
  body.menu-open .side { z-index: 45; }
  body.menu-open .menu-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 30; }
  body.menu-open { overflow: hidden; }
  .nav-phone { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
  .nav-phone form { margin: 0 10px 4px; }
  .nav-phone .btn { width: 100%; justify-content: center; }

  /* Bottom tab bar. */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(11, 9, 7, 0.97); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 62px;
    color: var(--muted); background: none; border: 0; font: 500 11px var(--sans); cursor: pointer;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on { color: var(--gold-hi); }
  .tabbar .on svg { stroke: var(--gold); }
  body.menu-open .tabbar .tab-more { color: var(--gold-hi); }

  /* Page content. */
  main { padding: 14px 14px 24px; }
  .eyebrow { display: none; }
  .page-head { margin-bottom: 12px; gap: 10px; }
  .page-head .tools { width: 100%; }
  .today-head h1 { font-size: 26px; }
  .lede.big { font-size: 15px; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { white-space: nowrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .tile { padding: 9px 11px 10px; }
  .tile .v { font-size: 24px; }
  .glance .tile .v { font-size: 19px; }
  .panel { padding: 12px; }
  .grid { gap: 12px; }
  .table-tools { width: 100%; }
  .table-tools input[type=search] { flex: 1; min-width: 0; }
  .checklist li { grid-template-columns: 26px 1fr; }
  .checklist li .btn { grid-column: 2; justify-self: start; }
  .rec { padding: 11px 12px; }
  .rec .top .mod { display: none; }
  .chart-box { height: 200px; }
  .chart-box.tall { height: 240px; }
  details.later .menu { left: auto; right: 0; }
  .banner { font-size: 12.5px; }
}

/* Tables turn into one card per row on narrow screens. */
@media (max-width: 640px) {
  .table-wrap { border: 0; overflow: visible; max-height: none !important; }
  table.data, table.data tbody { display: block; }
  table.data thead { display: none; }
  table.data tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
    background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px;
    padding: 10px 12px; margin-bottom: 8px;
  }
  table.data tr.hidden, table.data tr.hidden-s { display: none; }
  table.data tbody tr:hover td { background: none; }
  table.data tr.ours { border-color: var(--gold-lo); background: rgba(217, 164, 65, 0.08); }
  table.data td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%;
    padding: 4px 0; border: 0; white-space: normal; text-align: right; min-width: 0;
  }
  table.data td::before {
    content: attr(data-label); color: var(--muted); font-family: var(--mono); font-size: 10.5px;
    text-transform: uppercase; letter-spacing: 0.04em; text-align: left; flex-shrink: 0;
  }
  table.data td:not([data-label])::before { content: none; }
  table.data td:not([data-label]) { justify-content: flex-end; }
  table.data td.ch { width: auto; padding: 0 0 6px; font-size: 15px; justify-content: flex-start; }
  table.data td.ch::before { content: none; }
  table.data td:empty { display: none; }
  table.data td.more { display: none; }
  table.data.show-more td.more { display: flex; }
  table.data td.wrap { min-width: 0; text-align: left; }
  table.data td input[type=text], table.data td input[type=date], table.data td select { max-width: 62%; }
  table.data td .row { justify-content: flex-end; }
  .pctbar { min-width: 0; flex: 0 1 200px; }
}

/* Touch screens: bigger targets, and 16px inputs so phones don't zoom in on focus. */
@media (pointer: coarse) {
  .btn { min-height: 40px; padding: 8px 14px; }
  .btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .seg a { padding: 9px 13px; }
  input[type=text], input[type=number], input[type=date], input[type=password], input[type=search], input:not([type]), select, textarea {
    font-size: 16px; min-height: 42px;
  }
  details.later .menu button { padding: 12px; font-size: 15px; }
  details.howto summary { padding: 4px 0; }
  .chip { font-size: 11px; padding: 3px 8px; }
}

/* ---- Campaigns and strength profiles ------------------------------------------------------- */
.join.wide { max-width: 560px; }
.camp-head { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; margin-bottom: 8px; }
.who-mini { font-size: 13px; color: var(--muted); }
.who-mini b { color: var(--gold-hi); font-weight: 600; }

/* Tap-to-choose options (radio buttons styled as chips). */
.opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.opts label { display: block; position: relative; }
.opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opts span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--ground-2); color: var(--muted);
  font-size: 14px; cursor: pointer; user-select: none; transition: background .12s, border-color .12s, color .12s;
}
.opts.tight { gap: 5px; }
.opts.tight span { min-width: 36px; padding: 0 6px; }
.opts input:checked + span { background: rgba(217, 164, 65, 0.16); border-color: var(--gold); color: var(--gold-hi); font-weight: 600; }
.opts input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.opts.big { display: grid; grid-template-columns: repeat(3, 1fr); }
.opts.big span { width: 100%; min-height: 52px; font-size: 16px; }
.opts.big label:nth-child(1) input:checked + span { background: rgba(134, 189, 127, 0.16); border-color: var(--good); color: var(--good); }
.opts.big label:nth-child(3) input:checked + span { background: rgba(160, 149, 136, 0.12); border-color: var(--muted); color: var(--ink); }
.pf-q { font-size: 13px; color: var(--muted); }
.pf-q.big { font-size: 15px; color: var(--ink); }

/* Profile form */
.pf-form { display: flex; flex-direction: column; gap: 10px; }
.pf-sec { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel-2); }
.pf-sec h3, .pf-h { font-size: 18px; text-transform: none; color: var(--gold-hi); }
.pf-h { margin-top: 8px; }
.march { border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel-2); }
.march > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; min-height: 48px; }
.march > summary::-webkit-details-marker { display: none; }
.march > summary::after { content: "›"; margin-left: auto; color: var(--faint); font-size: 20px; transition: transform .15s; }
.march[open] > summary::after { transform: rotate(90deg); }
.march .mn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.march.done .mn { border-color: var(--good); color: var(--good); }
.march .ml { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.march-body { display: flex; flex-direction: column; gap: 14px; padding: 0 12px 14px; }
.pf-hero, .pf-part { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pf-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-family: var(--mono); }
.pf-line { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.pf-sub { font-size: 12px; color: var(--muted); }
.pf-form input[type=text], .pf-form input[type=number] { font-size: 16px; min-height: 44px; width: 100%; }
label.mini { flex: 1 1 80px; max-width: 120px; }
label.maxed { flex-direction: row; align-items: center; gap: 0; position: relative; }
label.maxed input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.maxed span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; cursor: pointer; background: var(--ground-2); }
label.maxed span::before { content: ""; width: 14px; height: 14px; margin-right: 8px; border: 1px solid var(--line); border-radius: 4px; }
label.maxed input:checked + span { border-color: var(--gold); color: var(--gold-hi); background: rgba(217, 164, 65, 0.14); }
label.maxed input:checked + span::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--panel-2); }
label.maxed input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.pf-hero:has(.maxed input:checked) .lvl, .pf-hero:has(.maxed input:checked) .skl { display: none; }
.pf-extra > summary, .pf-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; }
.pf-more { margin-top: 4px; }
.pf-more > summary { padding: 10px 0; }
.pf-more[open] { display: flex; flex-direction: column; gap: 10px; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--panel) 30%); }
.join .savebar .btn { width: 100%; }

/* Score and result */
.score-card { border: 1px solid var(--gold-lo); background: var(--panel-2); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.sc-main { display: flex; align-items: baseline; gap: 10px; }
.sc-v { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--gold-hi); }
.sc-k { color: var(--muted); font-size: 13px; }
.sc-parts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.sc-parts b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.sc-prog { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.sc-prog i { display: block; height: 100%; background: var(--gold); }
.advice { border-left: 2px solid var(--frost); padding: 4px 0 4px 12px; margin: 8px 0 12px; }
.advice ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.advice li { margin: 3px 0; }
.pf-status { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.pf-status.empty { border: 1px solid var(--gold-lo); border-radius: 10px; padding: 14px; background: rgba(217, 164, 65, 0.05); }
.pf-status h3 { font-size: 20px; text-transform: none; color: var(--gold-hi); }
.result-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 10px 0 14px; background: var(--panel-2); }
.result-card.main { border-color: var(--good); background: rgba(134, 189, 127, 0.07); }
.result-card.sub { border-color: var(--gold-lo); }
.result-card .rc-k { font-size: 13px; color: var(--muted); }
.result-card .rc-v { font-family: var(--display); font-size: 40px; line-height: 1.1; color: var(--gold-hi); }
.camp-table .wrap-note { white-space: normal; max-width: 260px; }
.camp-table select { min-width: 150px; }

/* ---- Security page ------------------------------------------------------------------------ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--gold-hi); border-bottom-color: var(--gold); }
.audit-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.audit-filters label { min-width: 130px; }
.audit-filters label.grow { flex: 1 1 200px; }
.audit-table td.wrap { min-width: 180px; max-width: 360px; }
.chg { font-size: 12px; line-height: 1.5; }
.chg .old { color: #f39a85; text-decoration: line-through; text-decoration-color: rgba(243, 154, 133, .5); }
.chg .new { color: var(--good); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.checks { list-style: none; margin: 0; padding: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.check:last-child { border-bottom: 0; }
.check > div { flex: 1; }
.check .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--faint); }
.check.good .dot { background: var(--good); }
.check.warn .dot { background: var(--warn); }
.check.bad .dot { background: var(--bad); }
.check .fix { color: var(--gold-hi); margin-top: 2px; }

/* Pickers: choose values instead of typing them. */
.pf-form select { font-size: 16px; min-height: 44px; width: 100%; }
.name-pick { display: flex; flex-direction: column; gap: 6px; }
.name-pick input { display: none; }
.name-pick:has(option[value="__other"]:checked) input { display: block; }
.mini.skl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 2 1 180px; }
.skill-digits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pf-form .skill-digits select { padding: 0 4px; text-align: center; min-width: 0; }
.stepper { display: flex; align-items: stretch; gap: 6px; max-width: 220px; }
.stepper input { text-align: center; }
.stepper button { flex: 0 0 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground-2); font-size: 20px; cursor: pointer; }
.stepper button:active { border-color: var(--gold); color: var(--gold-hi); }
.unit-in { display: flex; align-items: center; gap: 6px; }
.unit-in input { flex: 1; min-width: 0; }
.unit-in span { color: var(--muted); font-family: var(--mono); }
.hour-pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hour-pair select { width: auto; }
.range { display: flex; align-items: center; gap: 10px; }
.range input[type=range] { flex: 1; accent-color: var(--gold); min-height: 32px; }
.range output { min-width: 48px; text-align: right; font-family: var(--mono); color: var(--gold-hi); font-size: 14px; }
form[data-when] .close-custom { display: none; }
form[data-when]:has(select[name=close] option[value=custom]:checked) .close-custom { display: flex; }
.when-local { margin: 0; min-height: 1em; }
.bad-text { color: var(--bad); }
.tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground-2); cursor: text; }
.tagbox:focus-within { border-color: var(--gold-lo); outline: 1px solid var(--gold); }
.tag-list { display: contents; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ink); font-size: 13px; }
.tag button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 999px; }
.tag button:hover { color: var(--bad); }
.tagbox input.tag-add { flex: 1 1 140px; min-width: 120px; border: 0; background: transparent; padding: 4px; min-height: 28px; outline: none; }
.builds { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.build-row { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr 2fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--ground-2); }
.build-head { display: flex; gap: 6px; }
.build-head select { flex: 1; min-width: 0; }
.build-part { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.build-part .mini-k { flex-basis: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-family: var(--mono); }
.build-part select.tag-pick { width: auto; min-height: 30px; padding: 2px 6px; font-size: 13px; }
@media (max-width: 640px) {
  .build-row { grid-template-columns: 1fr; }
}
.build-row.one { grid-template-columns: minmax(150px, 1fr) 4fr; }
@media (max-width: 640px) { .build-row.one { grid-template-columns: 1fr; } }

/* Immigrants: tracker and the public apply page. */
tr.faded td { opacity: .6; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); font-size: 12px; padding-top: 2px; }
.facts dd { margin: 0; }
.quote { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--gold-lo); background: var(--ground-2); white-space: pre-wrap; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 12px; border-left: 2px solid var(--line); margin-left: 4px; font-size: 14px; }
.timeline li.stage { border-left-color: var(--gold); }
.timeline li.applied { border-left-color: var(--frost); }
.timeline li.system { border-left-color: var(--good); }
.timeline li > div:last-child { white-space: pre-wrap; }
.apply-intro { margin: 0 0 12px; color: var(--ink); white-space: normal; }
.apply-req { border-left: 2px solid var(--gold-lo); padding: 4px 0 4px 12px; margin: 0 0 12px; }
.apply-req ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.apply-card { margin: 12px 0; }
.apply-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.apply-form input[type=text], .apply-form input[type=number], .apply-form select, .apply-form textarea { font-size: 16px; min-height: 44px; }
.apply-form .hour-pair select { min-width: 92px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Members: bulk "tick our members" picker. */
.bulk-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.bulk-tools input[type=search] { flex: 1 1 220px; min-height: 40px; }
.bulk-tools .opts { margin-top: 0; }
.bulk-list { list-style: none; margin: 0 0 8px; padding: 0; columns: 2 340px; column-gap: 16px; }
.bulk-list li { break-inside: avoid; border-bottom: 1px solid var(--line-soft); }
.bulk-list label { display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: "box name power" "box id chip";
  align-items: center; column-gap: 8px; padding: 8px 4px; cursor: pointer; font-size: 14px; color: var(--ink); }
.bulk-list input[type=checkbox] { grid-area: box; width: 20px; height: 20px; accent-color: var(--gold); }
.bulk-list .bl-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-list .bl-meta { grid-area: power; color: var(--muted); font-size: 13px; text-align: right; }
.bulk-list .bl-id { grid-area: id; font-size: 11px; }
.bulk-list .bl-chip { grid-area: chip; justify-self: end; }
.bulk-list li.is-on .bl-name { color: var(--gold-hi); }
.bulk-list li.changed { background: rgba(217, 164, 65, 0.08); }
.bulk-list li.changed:not(.is-on) .bl-name { text-decoration: line-through; color: var(--muted); }
.bulk-bar { background: var(--panel); padding: 10px 0; border-top: 1px solid var(--line-soft); }
@media (max-width: 820px) { .bulk-bar { bottom: calc(64px + env(safe-area-inset-bottom)); } }

/* Members: one "Add members" panel. */
.add-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.add-way { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ground-2); color: var(--ink); text-decoration: none; }
.add-way:hover { border-color: var(--gold-lo); }
.add-way.primary { border-color: var(--gold-lo); background: rgba(217, 164, 65, 0.08); }
.add-way b { color: var(--gold-hi); font-size: 15px; }
.add-way span { color: var(--muted); font-size: 13px; }
.add-more { border-top: 1px solid var(--line-soft); padding: 10px 0 2px; }
.add-more > summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.where-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.where-table td { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.where-table td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.help-layout { align-items: start; }
