/* The portal's look (D21): mineral green, a serif heading, square-cornered
   fields, and the hexagon framework from the logo on a side panel, with the
   tagline at its middle, that folds to a band on a narrow screen. Fonts are the device's own, so no page asks
   another server for anything. */
:root {
  color-scheme: light dark;
  --page: light-dark(#f4f6f3, #0e1413);
  --ink: light-dark(#14201f, #e4ece9);
  --muted: light-dark(#4d5f5c, #9db0ab);
  --line: light-dark(#8d9c98, #50625e);
  --accent: light-dark(#0c5a55, #6fd0c4);
  --accent-ink: light-dark(#ffffff, #0e1413);
  --field: light-dark(#ffffff, #151d1c);
  --brand: light-dark(#10302e, #0a2422);
  --brand-ink: #eef5f2;
  --ok: light-dark(#14602f, #7fd79b);
  --ok-ground: light-dark(#e7f4ea, #12281a);
  --bad: light-dark(#9f1239, #ff9db3);
  --bad-ground: light-dark(#fdecef, #2e131a);
  --warn: light-dark(#7a4a05, #f0c26b);
  --warn-ground: light-dark(#fbf1dc, #2a2110);
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--ui); }

.screen { min-height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

.brand { display: flex; flex-direction: column; gap: 24px; padding: 36px;
  color: var(--brand-ink); background: var(--brand) url("lattice.svg"); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.mark { flex: none; width: 34px; height: 43px; background: currentColor;
  -webkit-mask: url("mark.png") center / contain no-repeat; mask: url("mark.png") center / contain no-repeat; }
.brand-name { font-weight: 650; line-height: 1.2; }
.brand-name small { display: block; font-weight: 400; font-size: .86rem; opacity: .85; }
/* In the middle of the panel, on one line wherever the panel is wide enough to hold it. */
.tagline { margin: auto 0; font: 400 clamp(1.05rem, 1.75vw, 1.6rem)/1.25 var(--serif); letter-spacing: -.005em; text-wrap: balance; }

.panel { align-self: center; justify-self: center; width: 100%; max-width: 380px; padding: 36px 24px; }
.panel h1 { font: 500 1.9rem/1.2 var(--serif); margin: 0 0 18px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.lead { margin: 0 0 14px; }
.who { overflow-wrap: anywhere; font-weight: 600; }

form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .9rem; font-weight: 600; }
.field input { font: inherit; width: 100%; padding: 11px 12px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 3px; }
.pw { position: relative; }
.pw input { padding-right: 4.4rem; }
.pw button { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 10px; font: inherit; font-size: .84rem; background: transparent; color: var(--accent); border: 0; border-radius: 3px; cursor: pointer; }
.stay { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.stay input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.stay small { display: block; color: var(--muted); }
.go { align-self: flex-start; font: inherit; font-weight: 650; padding: 12px 28px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 3px; cursor: pointer; }
.go[disabled] { opacity: .45; cursor: not-allowed; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.msg { margin: 0 0 18px; padding: 11px 13px; border-radius: 3px; font-size: .94rem; }
.msg-bad { background: var(--bad-ground); color: var(--bad); }
.msg-ok { background: var(--ok-ground); color: var(--ok); }
.msg-warn { background: var(--warn-ground); color: var(--warn); }
.foot { margin: 22px 0 0; font-size: .84rem; color: var(--muted); max-width: 44ch; }

@media (max-width: 680px) {
  .screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .brand { padding: 18px 20px; gap: 12px; }
  .tagline { margin: 0; font-size: 1rem; }
  .panel { align-self: start; padding-top: 28px; }
}

/* ---- signed-in pages: the lattice bar across the top, the sections, the page ---- */
body.signed-in { display: flex; flex-direction: column; min-height: 100%; }
.bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 22px; color: var(--brand-ink); background: var(--brand) url("lattice.svg"); }
.bar .mark { width: 28px; height: 36px; }
.bar-who { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.bar-who form { display: block; }
.bar-button { font: inherit; font-size: .86rem; padding: 6px 13px; background: transparent; color: var(--brand-ink); border: 1px solid currentColor; border-radius: 3px; cursor: pointer; }
.bar :focus-visible { outline-color: var(--brand-ink); }
.role { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 3px; background: var(--warn-ground); color: var(--warn); font-weight: 650; }
.viewing { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 22px; background: var(--warn-ground); color: var(--warn); font-size: .92rem; border-bottom: 1px solid var(--line); }
.viewing .act.quiet { color: var(--warn); border-color: currentColor; }
.sections { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--field); }
.sections a { padding: 11px 10px; color: var(--muted); text-decoration: none; font-size: .92rem; border-bottom: 2px solid transparent; overflow-wrap: anywhere; }
.sections a.here { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.main { width: 100%; max-width: 1080px; padding: 26px 22px 44px; display: flex; flex-direction: column; gap: 20px; }
.main h1 { font: 500 1.8rem/1.2 var(--serif); margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
.main .msg { margin: 0; align-self: flex-start; }
.sub { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; align-items: start; }
.card { background: var(--field); border: 1px solid var(--line); border-radius: 3px; padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 1rem; margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows li { display: flex; gap: 8px 14px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.rows small { color: var(--muted); }
.person { min-width: 0; overflow-wrap: anywhere; }
.person small { display: block; }
.pill { font-size: .74rem; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: var(--ok-ground); color: var(--ok); }
.pill-off { background: var(--warn-ground); color: var(--warn); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acts form { display: block; }
.act { display: inline-block; font: inherit; font-size: .88rem; font-weight: 600; padding: 7px 14px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 3px; cursor: pointer; text-decoration: none; }
.act.quiet { background: transparent; color: var(--accent); }
.reveal > summary { list-style: none; width: fit-content; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal[open] > summary { margin-bottom: 12px; }
/* An opened form takes a row of its own, and never more than the space it is in. */
.reveal { min-width: 0; max-width: 100%; }
.acts > .reveal[open] { flex-basis: 100%; }
form.inline { gap: 12px; width: 100%; max-width: min(360px, 100%); }
form.inline .act { align-self: flex-start; }
.tablewrap { overflow-x: auto; background: var(--field); border: 1px solid var(--line); border-radius: 3px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .94rem; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { border-top: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
td a { font-weight: 600; }
.about { display: block; }
.hint { margin: 0; font-size: .84rem; color: var(--muted); }
.field input[type="file"] { padding: 8px; }
.big { font: 500 1.6rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); gap: 12px; }
.figure { background: var(--field); border: 1px solid var(--line); border-radius: 3px; padding: 12px 14px; }
.figure b { display: block; font: 500 1.5rem/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.figure small { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wraps { white-space: normal; min-width: 14ch; }
.withdrawn > span:first-child { opacity: .6; }
.pill-plain { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; gap: 10px; align-items: baseline; }
.steps .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); transform: translateY(1px); }
.steps .done .dot { background: var(--accent); }
.steps .done > span:last-child { color: var(--muted); }
/* Said in words too, so a finished step is not told by the filled dot alone. */
.steps .said { font-size: .82rem; }
.figures.inner { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.figures.inner .figure b { font-size: 1.3rem; }
.field select, .field textarea { font: inherit; width: 100%; padding: 10px 12px; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 3px; }
.card.wide { max-width: 560px; }
form.service-form { max-width: min(520px, 100%); }
.thread { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.said-by { border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; background: var(--field); max-width: min(62ch, 100%); min-width: 0; }
.said-by.from-zeolite { align-self: flex-end; background: var(--ok-ground); }
.said-by small { display: block; color: var(--muted); margin-bottom: 3px; }
/* Shown exactly as written: its own line breaks, and long words broken to fit, never cut. */
.words { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
form.words-form { max-width: min(640px, 100%); }
form.code-form { max-width: min(360px, 100%); }
.links { margin: 18px 0 0; font-size: .92rem; }
