/* The Council portal. Tokens copied from Flow's 01-foundation.css so the two read as
   one family; nothing here is shared at run time. Works down to 320px. */
:root {
  --brand-700: #245e7b;
  --brand-100: #e8f0f5;
  --env-yellow: #f4a900;
  --ink: #182127;
  --ink-soft: #5b6873;
  --ground: #f3f5f7;
  --panel: #ffffff;
  --line: #dfe4e7;
  --line-strong: #ccd3d8;
  --amber: #8a5b00;
  --amber-bg: #fff4d8;
  --amber-line: #f0dca8;
  --red: #a83d32;
  --red-bg: #fbe9e6;
  --ok: #2d7049;
  --ok-bg: #e7f3eb;
  --info: #285a78;
  --info-bg: #e8f1f7;
  --radius-sm: 7px;
  --radius: 10px;
  --mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--brand-700); }
a:hover { color: var(--ink); }
h1, h2 { line-height: 1.2; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--env-yellow); outline-offset: 2px; }

.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.strong { font-weight: 600; }
.plain { font-weight: 400; }
.nowrap { white-space: nowrap; }
.push { margin-left: auto; }
.pre { white-space: pre-wrap; margin: 0; }
.t-ok { color: var(--ok); }
.t-warn { color: var(--amber); }
.t-bad { color: var(--red); }

/* ---- header ---- */
.top { background: var(--panel); border-bottom: 3px solid var(--env-yellow); }
.top-in {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.brand img { display: block; height: 36px; width: auto; }
.brand-tag { font-weight: 600; color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: 16px; }
.menu { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 12px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: 24px; }
.nav a, .nav-next { padding: 10px 14px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-100); font-weight: 600; }
.nav-next { color: var(--ink-soft); }
.who { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.who form { margin: 0; }
.linkish {
  border: 0; background: none; padding: 0; font: inherit; color: var(--brand-700);
  font-weight: 600; text-decoration: underline; cursor: pointer;
}
.linkish:hover { color: var(--ink); }
.menu-btn {
  display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink);
}

.banner { background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid var(--amber-line); }
.banner-in { max-width: 1200px; margin: 0 auto; padding: 8px 24px; font-size: 14px; font-weight: 600; }

/* ---- layout ---- */
.main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; display: flex; flex-direction: column; gap: 24px; }
.main-narrow { max-width: 760px; gap: 20px; }
.main-mid { max-width: 1000px; gap: 20px; }
.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.head-text { flex: 1 1 400px; }
.head-text p, .head-text h1 { margin: 0; }
.h-plant { margin-top: 4px !important; font-size: 30px; }
.h-page { margin: 8px 0 4px; font-size: 28px; }
h1 { font-size: 28px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 20px 24px; }
.card.pad h2 { margin: 0 0 12px; font-size: 18px; }
.card-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 18px; }
.empty { padding: 16px 20px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0 20px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand-700); border-color: var(--brand-700); color: #ffffff; }
.btn-primary:hover { background: #1d4c64; color: #ffffff; }
.btn-wide { width: 100%; margin-top: 16px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-lg { padding: 3px 12px; font-size: 14px; white-space: normal; }
.pill-crit, .pill-bad { background: var(--red-bg); color: var(--red); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-warn { background: var(--amber-bg); color: var(--amber); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-muted { background: var(--ground); color: var(--ink-soft); }

.note { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); font-weight: 600; }
.note-bad { background: var(--red-bg); color: var(--red); }

/* ---- home ---- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 18px 20px; }
.tile-h { margin: 0; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.tile-n { margin: 6px 0 0; font-size: 34px; font-weight: 700; line-height: 1; }
.tile p.small { margin: 8px 0 0; }
.tile-off { background: var(--ground); border: 1px dashed var(--line-strong); }
.dots { display: flex; gap: 8px; margin-top: 10px; }
.dots span { width: 22px; height: 22px; border-radius: 50%; background: var(--line-strong); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 14px; border-bottom: 1px solid var(--line-strong); text-align: left; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.phone-only, .cards.phone-only { display: none; }

.cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.req-card {
  display: block; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--info);
  border-radius: var(--radius); padding: 12px 14px; color: var(--ink); text-decoration: none;
}
.req-card.req-crit { border-left-color: var(--red); }
.req-card > span { display: block; }
.req-card-top { display: flex !important; justify-content: space-between; gap: 8px; font-size: 13px; }
.req-card-what { margin-top: 2px; }
.req-card-status, .req-card-clocks { margin-top: 6px; font-size: 13px; }

/* ---- raise a request ---- */
.form { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { margin: -4px 0 6px; }
input[type="email"], input:not([type]), textarea {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); font: inherit;
}
textarea { padding: 10px 12px; resize: vertical; }
input.short { max-width: 320px; }
.urgency { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.urgency legend { font-weight: 700; margin-bottom: 10px; font-size: 16px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.choice input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.choice > span > span { display: block; }
.choice-title { font-weight: 700; }
.choice-line { font-size: 14px; }
.choice-eg { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.choice-crit .choice-title { color: var(--red); }
.choice-crit:has(input:checked) { border: 2px solid var(--red); background: var(--red-bg); }
.choice:not(.choice-crit):has(input:checked) { border: 2px solid var(--info); background: var(--info-bg); }
.form-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---- request page ---- */
.ref-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.ref-row .h-page { margin: 0; }
.clock { padding: 20px; border-top: 4px solid var(--env-yellow); }
.clock-ok { border-top-color: var(--ok); }
.clock-bad { border-top-color: var(--red); }
.clock h2 { font-size: 15px; }
.clock-n { margin: 6px 0 0; font-size: 32px; font-weight: 700; line-height: 1.1; }
.clock p.small { margin: 6px 0 12px; }
.bar { display: block; width: 100%; height: 10px; border: 0; border-radius: 5px; overflow: hidden; -webkit-appearance: none; appearance: none; background: var(--amber-bg); }
.bar::-webkit-progress-bar { background: var(--amber-bg); border-radius: 5px; }
.bar::-webkit-progress-value { background: var(--env-yellow); }
.bar::-moz-progress-bar { background: var(--env-yellow); }
.bar-ok, .bar-ok::-webkit-progress-bar { background: var(--ok-bg); }
.bar-ok::-webkit-progress-value { background: var(--ok); }
.bar-ok::-moz-progress-bar { background: var(--ok); }
.bar-bad, .bar-bad::-webkit-progress-bar { background: var(--red-bg); }
.bar-bad::-webkit-progress-value { background: var(--red); }
.bar-bad::-moz-progress-bar { background: var(--red); }

.timeline { list-style: none; margin: 0 0 12px; padding: 0; }
.timeline li { display: flex; gap: 14px; padding-bottom: 14px; }
.timeline .dot { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; background: var(--brand-700); flex: none; }
.timeline .dot-ok .dot { background: var(--ok); }
.timeline .dot-muted .dot { background: var(--ink-soft); }
.timeline .waiting { color: var(--ink-soft); }
.timeline .waiting .dot { background: none; border: 2px solid var(--line-strong); }

/* ---- sign in ---- */
.signin { max-width: 1000px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 24px; }
.signin-brand { display: flex; align-items: center; justify-content: center; gap: 16px; }
.signin-brand img { height: 40px; width: auto; }
.signin-steps { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.step { flex: 1 1 380px; max-width: 460px; border-top: 4px solid var(--env-yellow); padding: 28px; }
.step h1 { margin: 4px 0 8px; font-size: 24px; }
.step p.muted { margin: 0 0 20px; }
.step .label { font-weight: 600; }
.step-done { opacity: 0.85; }
.step-no { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.code { min-height: 52px !important; font: 600 26px/1 var(--mono) !important; letter-spacing: 0.3em; text-align: center; }
.step-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.step-links form { margin: 0; }
.step-links .linkish:not(.strong) { font-weight: 400; }
.signin-foot { margin: 0; text-align: center; font-size: 14px; }

/* ---- phone ---- */
@media (max-width: 760px) {
  .top-in { padding: 10px 16px; gap: 10px; }
  .brand img { height: 28px; }
  .top .brand-tag { display: none; }
  .menu-btn { display: inline-flex; }
  .js .menu { display: none; }
  .js .menu.open { display: flex; }
  .menu { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  .nav { margin-left: 0; flex-direction: column; }
  .who { margin-left: 0; padding: 8px 14px 4px; border-top: 1px solid var(--line); }
  .banner-in { padding: 6px 16px; font-size: 13px; }
  .main { padding: 18px 16px; gap: 14px; }
  .h-plant { font-size: 22px; }
  .h-page, h1 { font-size: 22px; }
  .head-text { flex-basis: 100%; }
  .btn-raise { width: 100%; min-height: 48px; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tile { padding: 12px 14px; }
  .tile-n { font-size: 26px; }
  .wide-only { display: none; }
  .phone-only, .cards.phone-only { display: flex; }
  .card.flush .cards { padding: 10px; }
  .form { padding: 16px; }
  .card.pad { padding: 16px; }
  .clock-n { font-size: 26px; }
  .signin { padding: 24px 16px; }
  .step { padding: 20px; }
}
