/* The Jigsaw Plan: Australia
   Palette sampled from the Visual Companion figures. Sector colours are applied
   per row from the database (see /api/board). */
:root {
  --navy: #1c3a5c;
  --teal: #2e7d80;
  --teal-dark: #1f5e63;
  --teal-light: #c3dbdb;
  --teal-wash: #e6f0f1;
  --ink: #1c2b3a;
  --muted: #5d6b78;
  --line: #d5dde3;
  --open-bg: #ffffff;
  --open-line: #a9b4bd;
  --bg: #f7f9fa;
  --myregion-orange: #f05a1a;
  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header / footer */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand img { display: block; height: 44px; width: auto; }
.footer-inner img { height: 26px; width: auto; }
.series { color: var(--muted); font-size: 0.85rem; font-style: italic; }
.site-footer { margin-top: 48px; background: #fff; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; font-size: 0.85rem; color: var(--muted); }
.footer-inner p { margin: 0; }

/* Text */
h1 { color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 32px 0 8px; letter-spacing: 0.01em; }
h2 { color: var(--navy); font-size: 1.35rem; margin: 32px 0 4px; }
.lede { font-size: 1.1rem; max-width: 60ch; margin: 0 0 8px; }
.subhead { color: var(--teal); font-style: italic; margin: 0 0 16px; }
.source { color: var(--muted); font-size: 0.8rem; margin-top: 10px; }
.status-msg { padding: 12px 16px; background: #fff4e5; border: 1px solid #f0c27a; border-radius: 6px; }

/* Legend */
.legend { display: flex; gap: 20px; font-size: 0.85rem; margin-bottom: 12px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 22px; height: 14px; border-radius: 3px; }
.key.placed { background: #3b70b6; }
.key.started { background: #c4d5e9; border: 1px solid #3b70b6; }
.key.open { background: #fff; border: 1.5px dashed var(--open-line); }

/* Board */
.board {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) repeat(5, minmax(84px, 1fr)) minmax(130px, 1.4fr);
  gap: 3px;
  background: var(--navy);
  padding: 3px;
  border-radius: 8px;
  overflow-x: auto;
}
.board .cell {
  min-height: 62px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  border-radius: 4px;
}
.board .head { background: var(--navy); color: #fff; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; min-height: 44px; }
.board .row-head { background: var(--navy); color: #fff; font-weight: 700; justify-content: flex-start; text-align: left; }
.board .placed { color: #fff; font-weight: 700; }
.board .started { color: var(--ink); font-weight: 600; border: 2px solid currentColor; }
.board .open { background: var(--open-bg); color: var(--muted); border: 2px dashed var(--open-line); }
.board .next { background: #fff; justify-content: flex-start; text-align: left; gap: 8px; }
.board .next .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.board .frame { background: var(--teal-light); color: var(--ink); font-weight: 600; }
.board .frame.placed { background: var(--teal); color: #fff; }
.board .frame.open { background: #fff; border: 2px dashed var(--teal); }

@media (max-width: 760px) {
  .board { grid-template-columns: 110px repeat(5, 90px) 150px; }
}

.coming ul { padding-left: 20px; color: var(--muted); }
