/* WattSaid boards: shared tokens, type, header and the pieces both boards use.
   Follows the site's design system (starfind-fe/DESIGN.md, "The Card Aisle"):
   gray rack ground, paper cards, ink text, and the logo's blue for whatever is selected.
   Loaded before each board's own stylesheet. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/fonts/archivo-latin-standard.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/atkinson-next-latin-variable.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --rack: #E6E4E1;       /* page ground and header */
  --card: #FFFDFB;       /* card inside */
  --blush: #F3F1EE;      /* hover on a card, tiles inside a card */
  --blush-2: #EAE7E3;    /* hover on blush */
  --line: #CFCBC6;       /* 1px rules */
  --line-ctl: #8A857F;   /* edges of inputs, and quiet chart marks: 3:1 on card and blush */
  --ink: #15203B;
  --mist: #4A4744;       /* all secondary text */
  --cobalt: #1D3FA6;     /* links, focus, the selected control */
  --cobalt-tint: rgb(29 63 166 / 0.08);
  --tomato: #D23C24;
  --marigold: #F2B230;
  /* Status text, dark enough for 12px text on a tint of its own colour. */
  --ok-text: #17634A;
  --warn-text: #8A5206;
  --bad-text: #A62C17;
  --shadow-rack: 0 1px 0 rgb(21 32 59 / 0.06), 0 14px 28px -16px rgb(21 32 59 / 0.45);
  --shadow-lift: 0 1px 0 rgb(21 32 59 / 0.06), 0 22px 40px -18px rgb(21 32 59 / 0.5);
  --shadow-tag: 0 1px 0 rgb(21 32 59 / 0.08), 0 6px 12px -8px rgb(21 32 59 / 0.5);
  --body: 'Atkinson Hyperlegible Next', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --display: 'Archivo', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
html, body { margin: 0; }
body {
  background: var(--rack);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgb(74 71 68 / 0.45) var(--rack);
}
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--cobalt); text-decoration: none; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 3px; }
::selection { background: var(--marigold); color: var(--ink); }

/* A small set label: names a column or a group of rows. */
.label { font-family: var(--display); font-size: 12px; font-weight: 700; font-stretch: 118%; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mist); }

/* ---------- Header: gray, standing on a 3px ink rail, boards as divider tabs ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0 18px;
  padding: 8px 20px 3px;
  background: var(--rack); box-shadow: inset 0 -3px 0 var(--ink);
}
@media (min-width: 1100px) { .app-header { padding: 10px 40px 3px; } }
.brand { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { height: 26px; width: auto; display: block; }
.app-nav { display: flex; align-items: flex-end; gap: 2px; }
.app-nav a { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 8px 8px 0 0; color: var(--ink); font-family: var(--display); font-size: 16px; font-weight: 600; font-stretch: 108%; white-space: nowrap; transition: background-color 160ms ease; }
.app-nav a:hover { background: rgb(255 253 251 / 0.6); text-decoration: none; }
.app-nav a.on { background: var(--card); box-shadow: 0 -1px 0 rgb(21 32 59 / 0.06); }
.app-nav a.on::after { content: ''; position: absolute; left: 16px; right: 16px; top: 7px; height: 3px; border-radius: 2px; background: var(--cobalt); }
.header-spacer { flex: 1; }
.status { align-self: center; white-space: nowrap; }
@media (max-width: 640px) {
  .app-header { align-items: center; }
  .app-nav { order: 5; flex: 1 0 100%; margin: 0 -20px; padding: 0 14px; }
}

/* ---------- Page ---------- */
/* Built for a desktop screen first: the page takes the width it is given, up to a wide monitor. */
.page { max-width: 110rem; margin: 0 auto; padding: 32px 20px 56px; }
@media (min-width: 640px) { .page { padding: 44px 32px 80px; } }
@media (min-width: 1100px) { .page { padding: 52px 48px 96px; } }
.page-head h1 { font-size: clamp(2rem, 3.4vw, 3.5rem); line-height: 1.08; font-weight: 800; font-stretch: 114%; letter-spacing: -0.03em; }
.lede { max-width: 68ch; margin-top: 14px; font-size: 18px; line-height: 1.7; color: var(--mist); }
.card { background: var(--card); border-radius: 8px; box-shadow: var(--shadow-rack); }
.card h2 { font-size: 22px; line-height: 1.3; font-weight: 700; font-stretch: 108%; }
.hint { font-size: 15px; color: var(--mist); }
.source-note { max-width: 80ch; margin-top: 32px; font-size: 15px; line-height: 1.6; color: var(--mist); }

/* ---------- Controls ---------- */
/* A choice between a few options: plain buttons in a row, the chosen one in cobalt. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--blush); color: var(--ink); font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; }
.seg button:hover { background: var(--blush-2); }
.seg button.on { background: var(--cobalt); color: #fff; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 6px; background: var(--card); color: var(--ink); font-family: var(--display); font-size: 14px; font-weight: 700; font-stretch: 110%; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:hover { background: var(--blush); }
.btn:active { transform: translateY(1px); }

/* A small status word on a tint of its own colour. */
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.tag.bad { color: var(--bad-text); background: rgb(210 60 36 / 0.1); }
.tag.warn { color: var(--warn-text); background: rgb(161 98 7 / 0.12); }
.tag.ok { color: var(--ok-text); background: rgb(31 122 87 / 0.12); }
.tag.quiet { color: var(--mist); background: rgb(74 71 68 / 0.1); }

/* Loading, empty and error messages inside a card. */
.state { padding: 36px 24px; text-align: center; color: var(--mist); }
.state .btn { margin-top: 14px; }

@media (pointer: coarse) {
  .seg button { min-height: 44px; padding: 0 14px; }
}
