/* ==================================================================
   GREEN LIGHT GOALS · the Hub's look: ink #15202B, ground #F3F1EA,
   hi-vis #F6C700, Manrope. Desk-tight, works at 390px wide.
   ================================================================== */
:root {
  --ink: #15202B; --ink-2: #2C3A4A; --ground: #F3F1EA; --card: #FFFFFF; --line: #E2DED3; --line-2: #ECE8DE;
  --muted: #5B6470; --muted-light: #B9C1CC; --yellow: #F6C700; --yellow-soft: #FFF4C2; --accent-dot: #F6C700;
  --good: #1E7A4C; --good-ink: #1E6A43; --good-soft: #E3F2E9; --bad: #B42318; --bad-ink: #9E2119; --bad-soft: #FBE7E5;
  --amber: #E8A317; --amber-ink: #8A5A00; --amber-soft: #FDF0D5; --blue-ink: #1D4ED8; --blue-soft: #E7EEFB;
  --r: 14px; --r-sm: 9px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--ground); }
a { color: var(--ink); }
h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 .45em; letter-spacing: -.2px; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .big { font-size: 22px; font-weight: 800; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.devbar { background: #5B21B6; color: #fff; font-size: 13px; text-align: center; padding: 4px; }

/* ---------- Header and menu ---------- */
.top { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 17px; }
.brand b { color: var(--yellow); }
.top .period-pick { width: auto; height: 32px; background: var(--ink-2); color: #fff; border: 1px solid #44546A; border-radius: 8px; padding: 5px 8px; font-weight: 700; }
.who { margin-left: auto; font-size: 13px; color: var(--muted-light); }
.who a { color: var(--muted-light); }
.menu { background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 2px; padding: 0 10px; overflow-x: auto; position: sticky; top: 0; z-index: 5; }
.menu a { padding: 11px 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; border-bottom: 3px solid transparent; }
.menu a.on { color: var(--ink); border-bottom-color: var(--yellow); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.wrap.narrow { max-width: 760px; }

/* ---------- Building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { margin: 0; }
.sub { color: var(--muted); font-size: 14px; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }

label.f { display: block; font-weight: 700; font-size: 13px; margin: 0 0 4px; }
label.f .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=number], input[type=date], input.num, select, textarea {
  width: 100%; height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
textarea { height: auto; min-height: 64px; resize: vertical; line-height: 1.4; }
input.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
input:disabled, select:disabled, textarea:disabled { background: #FAF9F5; color: var(--ink); }
.field { margin-bottom: 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.q { font-weight: 800; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }

.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink); white-space: nowrap; }
.rag-green, .st-on { background: var(--good-soft); color: var(--good-ink); }
.rag-amber, .st-behind { background: var(--amber-soft); color: var(--amber-ink); }
.rag-red, .st-missed { background: var(--bad-soft); color: var(--bad-ink); }
.st-done { background: var(--good); color: #fff; }
.st-future, .st-empty { background: var(--line-2); color: var(--muted); }
.chip.must { background: var(--ink); color: var(--yellow); }
.chip.slot { background: var(--yellow-soft); }

.bar { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--good); border-radius: 99px; transition: width .4s; }
.bar.amber i { background: var(--amber); } .bar.red i { background: var(--bad); } .bar.ink i { background: var(--ink); } .bar.yellow i { background: var(--yellow); }
.bar.thick { height: 14px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 800; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.area td { background: var(--ground); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
table.t tr.derived td { color: var(--muted); }
table.t tr.derived td:first-child { padding-left: 20px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.flash { background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 14px; font-weight: 700; }
.warn { background: var(--amber-soft); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 12px; color: var(--amber-ink); }
.good { background: var(--good-soft); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 12px; color: var(--good-ink); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: 14px; z-index: 50; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.bad { background: var(--bad); }

/* ---------- Tiles ---------- */
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.tile .lbl { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.tile .v { font-size: 26px; font-weight: 800; margin: 2px 0; font-variant-numeric: tabular-nums; }
.tile .of { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.streaks { display: flex; gap: 10px; flex-wrap: wrap; }
.streak { background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.streak b { font-size: 24px; color: var(--yellow); }
.streak span { font-size: 13px; line-height: 1.2; }
.streak.cold { background: var(--line-2); color: var(--muted); } .streak.cold b { color: var(--muted); }

/* ---------- The map ---------- */
.map { display: block; margin: 0 auto; }
.map .seg { cursor: pointer; transition: opacity .15s; }
.map a:hover .seg { opacity: .7; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 13px; margin: 6px 0 4px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid #C9C3B5; vertical-align: -2px; margin-right: 5px; }
.cells td.cell { min-width: 110px; font-size: 13px; }
.cells td.cell a { display: block; text-decoration: none; padding: 5px 7px; border-radius: 7px; border: 1px solid var(--line); min-height: 34px; }
.cells td.cell a:hover { border-color: var(--ink); }
.cells .q-head td { font-weight: 800; color: #fff; }

/* ---------- 90 day plan ---------- */
.goal { border-left: 5px solid var(--line); }
.goal.must { border-left-color: var(--ink); }
.goal h2 input { font-size: 18px; font-weight: 800; height: 40px; }
details.qs summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; margin: 6px 0; }
.actions { width: 100%; border-collapse: collapse; }
.actions td { padding: 4px 4px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.actions td.chk { width: 30px; }
.actions td.own { width: 130px; } .actions td.wk { width: 120px; }
.actions tr.done input[type=text] { text-decoration: line-through; color: var(--muted); }
.actions tr.late td.wk select { border-color: var(--bad); color: var(--bad-ink); font-weight: 700; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--good); }
.weeks { display: grid; grid-template-columns: 140px repeat(var(--w), minmax(22px, 1fr)); gap: 2px; font-size: 11px; align-items: center; min-width: 560px; }
.weeks .wh { text-align: center; color: var(--muted); font-weight: 700; }
.weeks .wh.now { background: var(--yellow); color: var(--ink); border-radius: 4px; }
.weeks .wn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.weeks .d { height: 16px; border-radius: 4px; background: var(--line-2); }
.weeks .d.x { background: var(--ink-2); } .weeks .d.ok { background: var(--good); } .weeks .d.late { background: var(--bad); } .weeks .d.due { background: var(--yellow); }

/* ---------- Month entry ---------- */
.entry td.n input.num { width: 130px; }
.entry .prev { color: var(--muted); font-size: 13px; }
.entry .help { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) {
  .entry th:nth-child(4), .entry td:nth-child(4) { display: none; }
  .entry td.n input.num { width: 96px; }
  .entry .help { display: none; }
  .entry table.t td, .entry table.t th { padding: 6px 3px; }
  .entry .chip { font-size: 11px; padding: 2px 5px; }
  .card { padding: 12px; }
}
.head select { width: auto; max-width: 100%; }

/* ---------- Sign in ---------- */
.signin { max-width: 380px; margin: 9vh auto; padding: 0 16px; }
.signin .card { padding: 24px; }
.code-input { font-size: 28px !important; letter-spacing: 8px; text-align: center; height: 52px !important; font-weight: 800; }

/* ---------- Print: the report and the focus sheet on A4 ---------- */
.print-only, .ptext { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .top, .menu, .noprint, .toast, .devbar, .flash { display: none !important; }
  .print-only { display: block; }
  textarea, form select { display: none !important; }
  .ptext { display: block; white-space: pre-wrap; min-height: 1.1em; margin-bottom: 4px; }
  .grid.g2 { grid-template-columns: 1fr 1fr; }
  .focus-sheet .card { padding: 8px 10px; margin-bottom: 6px; }
  .focus-sheet .q { margin: 6px 0 2px; }
  .focus-sheet table.t td { padding: 3px 6px; }
  .focus-sheet .head { margin-bottom: 6px; }
  .wrap { padding: 0; max-width: none; }
  .card { border: 1px solid #ccc; break-inside: avoid; padding: 10px; margin-bottom: 8px; }
  h1 { font-size: 20px; } h2 { font-size: 15px; }
  textarea, input, select { border: 0 !important; padding: 0 !important; resize: none; background: none !important; height: auto; }
  .chip { border: 1px solid #ccc; }
  .bar { border: 1px solid #ccc; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Two-part layouts that stack on a phone. */
.g-map { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.g-home { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); margin-bottom: 14px; }
@media (max-width: 860px) { .g-map, .g-home { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .grid.tiles2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .tiles2 .tile { padding: 10px; } .tiles2 .tile .v { font-size: 20px; } }
