/* site.css — WoS Community.
 *
 * One stylesheet, no framework, no build step. The reader this is drawn for is an
 * alliance leader on a phone at eleven at night, so the defaults that matter are
 * contrast, line length and tap targets — not motion.
 *
 * Palette: a frozen camp at blue hour. Ink is near-black blue; the ground is a cold
 * off-white by day and a deep slate at night; the one warm colour is the furnace
 * amber, and it is used for exactly one thing (a link you can act on) so that it
 * keeps meaning something.
 */

:root {
  --ground: #f4f6f8;
  --panel: #ffffff;
  --edge: #d3dae1;
  --ink: #10161d;
  --ink-soft: #495663;
  --ink-faint: #6b7885;
  --accent: #a8601b;         /* furnace amber, darkened until it passes AA on --panel */
  --accent-soft: #f3e6d7;
  --cold: #2f5d78;           /* the blue-hour blue, for rules and quiet marks */
  --focus: #1d6fb8;
  --radius: 10px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d1319;
    --panel: #151d25;
    --edge: #2a3742;
    --ink: #e8edf2;
    --ink-soft: #b3c0cc;
    --ink-faint: #8b98a5;
    --accent: #e0a85c;
    --accent-soft: #2c2318;
    --cold: #7fb3d0;
    --focus: #7cc0f5;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-synthesis-weight: none;
}

/* ─────────────────────────────────────────────── skip link and focus */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 14px;
  border: 2px solid var(--focus);
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────── topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--edge);
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark .mark { color: var(--cold); display: block; }
.wordmark .mark svg { display: block; }

.topnav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.2;
}
.topnav a:hover { background: var(--ground); color: var(--ink); }
.topnav a[aria-current="page"] {
  color: var(--ink);
  background: var(--ground);
  box-shadow: inset 0 -2px 0 var(--cold);
}

/* ─────────────────────────────────────────────── page frame */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 18px 8px;
}
.prose { max-width: var(--measure); }

h1 {
  font-size: clamp(28px, 5.2vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 650;
}
h2 {
  font-size: clamp(21px, 3.2vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 38px 0 12px;
  font-weight: 620;
}
h3 {
  font-size: 18px;
  margin: 26px 0 8px;
  font-weight: 620;
}
p, li { color: var(--ink-soft); }
p { margin: 0 0 15px; }
li { margin: 0 0 8px; }
ul, ol { padding-left: 22px; }

.lede {
  font-size: clamp(18px, 2.4vw, 20px);
  line-height: 1.55;
  color: var(--ink);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--ink); }

strong { color: var(--ink); font-weight: 620; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--ground);
  border: 1px solid var(--edge);
  border-radius: 5px;
  padding: 1px 5px;
}

hr {
  border: 0;
  border-top: 1px solid var(--edge);
  margin: 34px 0;
}

/* ─────────────────────────────────────────────── cards */

.cards {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 17px 18px;
  margin: 0;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: 15px; color: var(--ink-faint); }
.card .icon { color: var(--cold); display: block; margin-bottom: 10px; }
.card .icon svg { display: block; }

/* ─────────────────────────────────────────────── notes and panels */

.note {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--cold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 17px;
  margin: 22px 0;
}
.note p:last-child { margin-bottom: 0; }
.note-title {
  font-weight: 620;
  color: var(--ink);
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.pending {
  border-left-color: var(--edge);
  color: var(--ink-faint);
}

.calloutlist { list-style: none; padding: 0; margin: 18px 0; }
.calloutlist li {
  border-top: 1px solid var(--edge);
  padding: 13px 0 0;
  margin: 0 0 13px;
}
.calloutlist li:last-child { margin-bottom: 0; }
.calloutlist .k {
  display: block;
  color: var(--ink);
  font-weight: 620;
  font-size: 15px;
  margin-bottom: 3px;
}

/* ─────────────────────────────────────────────── contact */

.contact-primary {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin: 22px 0;
}
.btn {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-weight: 620;
  padding: 11px 18px;
  border-radius: var(--radius);
  margin-top: 6px;
}
.btn:hover { background: var(--accent); color: #10161d; }

/* ─────────────────────────────────────────────── sibling link */

.sibling {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 30px 0 0;
  font-size: 15px;
  color: var(--ink-faint);
}
.sibling p { margin: 0; font-size: 15px; }

/* ─────────────────────────────────────────────── footer and disclaimer */

footer {
  max-width: 1000px;
  margin: 44px auto 0;
  padding: 22px 18px 40px;
  border-top: 1px solid var(--edge);
  color: var(--ink-faint);
  font-size: 14.5px;
}
footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
footer a { color: var(--ink-soft); }
.disclaimer { margin: 0; font-size: 14.5px; color: var(--ink-faint); }

/* ─────────────────────────────────────────────── hero */

.hero {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 26px;
}
.hero img { display: block; width: 100%; height: auto; }
.hero-typographic {
  padding: 34px 26px;
  border-bottom: 1px solid var(--edge);
  background: linear-gradient(178deg, var(--panel) 0%, var(--ground) 100%);
}
.hero-typographic .line {
  display: block;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cold);
  font-size: clamp(13px, 2.1vw, 15px);
}
.hero-typographic .line + .line { margin-top: 9px; color: var(--ink-faint); letter-spacing: 0.1em; }

@media (max-width: 560px) {
  main { padding-top: 22px; }
  .topnav { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ─────────────────────────────────────────────── tables
 * Added for the disambiguation page's counterpart map. Wide content scrolls inside
 * its own container so the page body never scrolls sideways on a phone. */

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15.5px;
  margin: 4px 0 6px;
}
th, td {
  text-align: left;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--edge);
  vertical-align: top;
}
th {
  color: var(--ink);
  font-weight: 620;
  border-bottom: 2px solid var(--cold);
  white-space: nowrap;
}
td { color: var(--ink-soft); }
tbody tr:last-child td { border-bottom: 0; }

/* ─────────────────────────────────────────────── leader tools
 * The generators and the template library. No framework, no build step; every one of
 * these works with the page's own <form> semantics and localStorage, so nothing here
 * needs an account and nothing leaves the device. */

.tool {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 20px;
  margin: 22px 0;
}
.tool h2:first-child, .tool h3:first-child { margin-top: 0; }

.field { margin: 0 0 14px; }
.field label {
  display: block;
  font-size: 14.5px;
  font-weight: 620;
  color: var(--ink);
  margin-bottom: 5px;
}
.field .hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 13.5px; margin-top: 2px; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;              /* 16px stops iOS zooming the page on focus */
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 10px 12px;
}
textarea { min-height: 190px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: none; }

.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.choices label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  font-size: 14.5px;
  color: var(--ink-soft);
  background: var(--ground);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  margin: 0;
}
.choices label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.choices input { margin: 0; accent-color: var(--accent); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
button {
  font: inherit;
  font-weight: 620;
  font-size: 15px;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 17px;
  cursor: pointer;
}
button:hover { background: var(--accent); color: #10161d; }
button.ghost { background: transparent; border-color: var(--edge); color: var(--ink-soft); font-weight: 400; }
button.ghost:hover { background: var(--ground); color: var(--ink); }
.said { font-size: 14.5px; color: var(--cold); }

.out {
  white-space: pre-wrap;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 14px 15px;
  margin-top: 4px;
  overflow-x: auto;
}

/* the personalisation bar, shared by every leader page */
.mine {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px 17px;
  margin: 20px 0 26px;
}
.mine .row { margin-top: 10px; }
.mine p { margin: 0; font-size: 14.5px; }

.tpl { border-top: 1px solid var(--edge); padding: 16px 0 0; margin: 0 0 18px; }
.tpl:last-child { margin-bottom: 0; }
.tpl h3 { margin: 0 0 3px; font-size: 16.5px; }
.tpl .when { color: var(--ink-faint); font-size: 14px; margin: 0 0 9px; }
.tpl[hidden] { display: none; }
.count { color: var(--ink-faint); font-size: 14.5px; margin: 0 0 4px; }
