/* The Profitable Business Tracker Dashboard
   Inter, rounded white cards with soft shadows, circle step badges, a pill tab switcher,
   pill status chips and a ring score.
   Colours: page grey #E9E9E7, button teal #15BA9B, black #050505. */
:root {
  --bg: #E9E9E7;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --text: #3F4144;
  --muted: #6B6E72;
  --line: #E1E3E0;
  --field: #D3D7D4;
  --teal: #15BA9B;
  --teal-hover: #12A88C;
  --teal-text: #0B7A65;
  --teal-soft: #E2F5F0;
  --teal-softer: #F2FAF8;
  --brand-teal: #42CAB5;
  --black: #050505;
  --amber: #A66F00;
  --amber-mark: #E0A100;
  --amber-soft: #FBF1D9;
  --red: #B42C2C;
  --red-mark: #D64545;
  --red-soft: #FBE7E7;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.05), 0 6px 24px rgba(16, 24, 20, 0.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.55; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
a { color: var(--teal-text); }
b, strong { font-weight: 700; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---------- header: title left, logo right ---------- */
.hero { background: linear-gradient(180deg, #FFFFFF 0%, #F4F5F3 100%); border-bottom: 1px solid #D9DBD8; padding: 22px 0; --title-size: clamp(2rem, 5vw, 2.7rem); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; }
.hero h1 { font-size: var(--title-size); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 span { display: block; color: var(--teal); }
.hero .logo { display: block; flex: none; width: 200px; height: auto; margin-top: calc(var(--title-size) * 0.2 - 2px); mix-blend-mode: multiply; }
/* The one-line intro sits under the header, right above the tabs, at the size of the gears quote. */
.lede { font-size: 1.05rem; color: var(--text); max-width: 760px; margin: 0 0 14px; }

.samplebar { background: var(--black); color: #fff; text-align: center; font-size: 0.9rem; padding: 10px 16px; }
.samplebar button { margin-left: 12px; background: var(--teal); color: var(--ink); border: 0; border-radius: 8px; font: inherit; font-weight: 700; font-size: 0.85rem; padding: 6px 12px; cursor: pointer; }
.samplebar button:hover { background: var(--teal-hover); }

main.wrap { padding-top: 20px; padding-bottom: 40px; }

/* ---------- tab switcher (pill control with numbered circles) ---------- */
.tabs { display: flex; gap: 6px; background: #DCDEDB; padding: 5px; border-radius: 14px; margin-bottom: 22px; }
.tabs a { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 10px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.tab-num { width: 22px; height: 22px; border-radius: 50%; background: #C9CCC8; color: var(--ink); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tab-num svg { width: 11px; height: 11px; fill: currentColor; display: block; }
.tabs a.on .tab-num { background: var(--teal); color: var(--ink); }

/* ---------- type ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--teal-text); margin: 0 0 6px; }
.section-title { font-size: clamp(1.7rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.section-title .saved { font-size: 0.85rem; font-weight: 600; letter-spacing: 0; color: var(--teal-text); }
.section-head { font-size: 1.15rem; font-weight: 700; margin: 30px 0 12px; }
.lead { font-size: 1.02rem; margin: 10px 0 0; max-width: 640px; }
.help { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; font-weight: 400; }
.small { font-size: 0.875rem; color: var(--muted); }
.bigquote { font-size: 1.05rem; font-style: italic; color: var(--text); margin: -4px 0 14px; max-width: 760px; }

/* ---------- cards and step badges ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-head h2 { font-size: 1.3rem; font-weight: 700; }
.step-head h3 { font-size: 1.1rem; font-weight: 700; }
.step-head .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex: none; }
.step-num.dark { background: var(--black); color: #fff; }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--teal-text); background: var(--teal-soft); border-radius: 999px; padding: 2px 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid2 > .card, .grid3 > .card, .grid4 > .card, .two > * { margin-bottom: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 22px; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-teal { background: var(--teal); color: var(--ink); }
.btn-teal:hover { background: var(--teal-hover); }
.btn-black { background: var(--black); color: #fff; }
.btn-black:hover { background: #2a2a2a; }
.btn-line { background: #fff; color: var(--teal-text); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn-line:hover { background: var(--teal-softer); }
.btn-small { padding: 7px 14px; font-size: 0.85rem; }
.btn-xs { padding: 5px 11px; font-size: 0.78rem; border-radius: 8px; gap: 6px; }
.btn-xs svg { width: 14px; height: 14px; }
.linkbtn { font: inherit; font-size: 0.875rem; border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--red); }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }

/* ---------- Start Here ---------- */
.start-head { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 8px; }
.start-head:first-child { margin-top: 4px; }

/* Four gears that mesh and turn together (alternate gears turn the other way). */
.gear-row { display: flex; justify-content: center; align-items: flex-start; margin: 8px 0 0; }
.gear-tile { width: 180px; margin: 0 -9px; flex: none; }
.gear-graphic { position: relative; width: 180px; height: 180px; }
.gear-ring { position: absolute; inset: 0; width: 100%; height: 100%; display: block; animation: gear-cw 40s linear infinite; }
.gear-tile:nth-child(even) .gear-ring { animation-name: gear-ccw; }
.g-teal .gear-ring path { fill: var(--teal); }
.g-black .gear-ring path { fill: var(--black); }
.gear-face { position: absolute; inset: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 12px; }
.gear-face .gnum { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-text); font-size: 0.72rem; font-weight: 700; display: grid; place-items: center; margin-bottom: 5px; }
.gear-face b { font-size: 0.9rem; font-weight: 800; color: var(--ink); line-height: 1.15; }
.gear-face small { font-size: 0.7rem; font-weight: 600; color: var(--teal-text); line-height: 1.25; margin-top: 4px; }
.gear-face b, .gear-face small { max-width: 86%; }
.gear-what { margin: 10px 0 0; padding: 0 16px; font-size: 0.82rem; line-height: 1.45; color: var(--muted); text-align: center; }
@keyframes gear-cw { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes gear-ccw { from { transform: rotate(15deg); } to { transform: rotate(-345deg); } }
@media (prefers-reduced-motion: reduce) {
  .gear-ring { animation: none; }
  .gear-tile:nth-child(even) .gear-ring { transform: rotate(15deg); }
}

/* Three steps with arrows between them */
.steps-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr) 46px minmax(0, 1fr); align-items: stretch; }
.steps-row > .card { margin: 0; }
.step-arrow { display: flex; align-items: center; justify-content: center; color: var(--teal-text); }
.step-arrow svg { width: 30px; height: 30px; }
/* The three steps join into the dashboard card: a line from each card runs down into it. */
.steps-join { height: 70px; }
.steps-join svg { display: block; width: 100%; height: 100%; overflow: visible; }
.steps-join path { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.step-arrow.down-only { display: none; }
.dash-dest { max-width: 540px; margin: 0 auto; background: var(--black); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.dash-dest .step-head { margin-bottom: 8px; }
.dash-dest .step-head h3 { color: #fff; font-size: 1.15rem; }
.dash-dest .pill { background: rgba(66, 202, 181, 0.2); color: var(--brand-teal); }
.dash-dest p { margin: 0; color: #E4E4E4; font-size: 0.95rem; }
.step-num svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.btn-long { display: flex; width: 100%; justify-content: center; padding: 17px 24px; font-size: 1.1rem; margin-top: 24px; box-shadow: var(--shadow); }
.btn-long svg { width: 20px; height: 20px; }

.mini { padding: 18px 18px 16px; }
.mini .step-head { margin-bottom: 8px; }
.mini .goal { font-size: 0.85rem; font-weight: 600; color: var(--teal-text); margin: 0 0 6px; }
.mini p { margin: 0; font-size: 0.92rem; }
.mini .time { margin: 0 0 8px; }
.note-line { margin: 16px 0 0; }
.save-box { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.save-box p { margin: 6px 0 0; flex: 1 1 300px; font-size: 0.9rem; color: var(--muted); }
.save-box .btnrow { margin-top: 0; }

/* ---------- forms ---------- */
.screen-head { margin-bottom: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-top: 14px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field label, .field .label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input[type=text], .field input[type=date], .field select, .field textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--field); border-radius: 10px; padding: 11px 12px;
}
.field input[type=text], .field input[type=date], .field select { height: 46px; }
.field textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--teal-soft); border-color: var(--teal); }
.field.wide { grid-column: 1 / -1; }
/* My Goals step C: a shorter box for your pay, so the right-hand label fits on one line and both boxes line up. */
.fields.worth { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); }
/* The team number's name has type-ahead examples, but no dropdown arrow (it looked clickable and wasn't). */
input[list]::-webkit-calendar-picker-indicator { display: none !important; }
/* Friday check-in: the "Pick a week" button opens the calendar of the hidden date box behind it. */
.calpick { position: relative; margin-left: 6px; }
.calpick input[type=date] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; }
.data-note { margin-top: 36px; padding-top: 20px; border-top: 1px solid #D3D6D2; }
.data-note h3 { font-size: 0.95rem; font-weight: 700; }
.data-note p { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); max-width: 720px; }
.data-note .btnrow { margin-top: 10px; gap: 8px; }
.readout { margin-top: 16px; background: var(--teal-softer); border-left: 3px solid var(--teal); border-radius: 8px; padding: 10px 14px; font-size: 0.92rem; color: var(--ink); }
.readout:empty { display: none; }
.warn { margin-top: 10px; color: var(--red); background: var(--red-soft); border-radius: 8px; padding: 8px 12px; font-size: 0.875rem; font-weight: 600; }
.warn:empty { display: none; }
.note { background: var(--amber-soft); color: #6E4A00; border-radius: 10px; padding: 12px 14px; font-size: 0.92rem; margin: 0 0 18px; }

.choices { display: grid; gap: 8px; margin-top: 4px; }
.choices.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--field); background: #fff; border-radius: 10px; padding: 11px 14px; cursor: pointer; font-size: 0.95rem; color: var(--ink); }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); flex: none; cursor: pointer; }
.choice:hover { border-color: var(--teal); }
.choice:has(input:checked) { background: var(--teal-softer); border-color: var(--teal); font-weight: 600; }
.choice:has(input:focus-visible) { outline: 3px solid var(--teal-soft); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }

/* Each team number sits in its own box with its number on the box's left edge. */
.qrow { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px 26px; background: var(--teal-softer); margin: 14px 0 0 13px; }
.qnum { position: absolute; left: -13px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: var(--ink); font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff; }
.qrow .remove { position: absolute; right: 16px; top: 13px; }
.kpi-fields { display: grid; grid-template-columns: 2fr 1.3fr 1fr; gap: 12px 14px; }
.helper { background: var(--teal-softer); border: 1px solid var(--teal-soft); border-radius: 12px; padding: 16px 18px; margin-top: 20px; }
.helper h3 { font-size: 1rem; font-weight: 700; }

.weeknav { display: flex; align-items: center; gap: 10px; }
.weeknav .when { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.navbtn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--teal); background: #fff; color: var(--teal-text); font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.navbtn:hover:not(:disabled) { background: var(--teal-softer); }
.navbtn:disabled { opacity: 0.35; cursor: default; border-color: var(--field); color: var(--muted); }
.navbtn.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 0.9rem; border-width: 1.5px; }
.step-head .title-nav { display: flex; gap: 5px; margin-left: 4px; }
.checkin-nav { margin: 0 0 6px; }

/* ---------- Dashboard ---------- */
.dash-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.dash-top .eyebrow { margin: 0; }
/* Week / Month / Year switch, next to the arrows */
.dash-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.viewtabs { display: inline-flex; gap: 2px; background: #DCDEDB; padding: 3px; border-radius: 10px; }
.viewtabs button { border: 0; background: none; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--muted); padding: 6px 13px; border-radius: 8px; cursor: pointer; }
.viewtabs button:hover { color: var(--ink); }
.viewtabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.viewtabs button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.section-head .avg-note { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 8px; }
/* Score over time: a wide drawing on computers, a narrower one on phones, so the text stays readable */
.score-chart { margin-bottom: 20px; }
.score-chart svg.narrow { display: none; }
.score-card { display: flex; gap: 26px; align-items: center; }
.score-ring { --pct: 0; flex: none; width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--pct) * 1%), #E3E6E2 0); display: grid; place-items: center; }
.score-ring > span { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring b { font-size: 2.6rem; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.score-ring small { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.score-q { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 10px; }
.band { display: inline-block; background: var(--black); color: #fff; border-radius: 999px; font-size: 0.85rem; font-weight: 700; padding: 6px 14px; }
.score-card .meta { font-size: 0.9rem; color: var(--muted); margin: 10px 0 0; }
.delta-up { color: var(--teal-text); font-weight: 700; }
.delta-down { color: var(--red); font-weight: 700; }
.score-card .line { margin: 8px 0 0; font-size: 0.98rem; color: var(--ink); font-weight: 600; }
.score-card .bandline { font-style: italic; font-weight: 400; color: var(--text); }

.gear-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.gear { background: #fff; border: 1px solid var(--line); border-left: 5px solid #C9CCC8; border-radius: 14px; padding: 14px 14px 13px; box-shadow: var(--shadow); }
.gear.green { border-left-color: var(--teal); }
.gear.amber { border-left-color: var(--amber-mark); }
.gear.red { border-left-color: var(--red-mark); }
.gear .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gear .name { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.gear .pts { font-size: 1.4rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.gear .pts small { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.gear .goal { font-size: 0.8rem; color: var(--muted); margin: 2px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.chip.green { background: var(--teal-soft); color: var(--teal-text); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.none { background: #EFF0EE; color: var(--muted); }
.chip.first { background: var(--black); color: #fff; }

.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.score-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.score-box.main { background: var(--teal-softer); border-color: var(--teal-soft); }
.score-label { margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.score-value { margin: 6px 0 4px; font-size: 2rem; font-weight: 800; color: var(--teal-text); line-height: 1.1; white-space: nowrap; }
.score-help { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; margin-bottom: 20px; }
.fix { background: var(--black); color: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.fix .step-head { margin-bottom: 12px; }
.fix .which { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-teal); }
.fix h3 { color: #fff; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.fix p { margin: 10px 0 0; font-size: 0.97rem; color: #E4E4E4; }
.fix p b { color: #fff; }
.fix .src { font-size: 0.78rem; color: #A9A9A9; margin-top: 14px; }
.rule { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.rule div { background: #191919; border: 1px solid #2B2B2B; border-left: 5px solid; border-radius: 12px; padding: 10px 12px; font-size: 0.86rem; line-height: 1.4; color: #EDEDED; }
.rule .g { border-left-color: var(--teal); }
.rule .y { border-left-color: var(--amber-mark); }
.rule .r { border-left-color: var(--red-mark); }
.rule b { display: block; font-size: 0.8rem; margin-bottom: 2px; color: #fff; }

.slip h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.slip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.slip li { display: flex; gap: 10px; align-items: flex-start; background: #FAFAF9; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.92rem; line-height: 1.45; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.dot.red { background: var(--red-mark); }
.dot.amber { background: var(--amber-mark); }
.slip em { color: var(--text); }

.chart h2 { font-size: 1.15rem; font-weight: 700; }
.chart .sub { font-size: 0.85rem; color: var(--muted); margin: 2px 0 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .gl { stroke: #ECEDEB; stroke-width: 1; }
.chart .gl0 { stroke: #D3D6D2; stroke-width: 1; }
.chart .ax { font: 11.5px 'Inter', sans-serif; fill: var(--muted); }
.chart .lbl, .chart .lbl-t { font: 600 11.5px 'Inter', sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.chart .lbl { fill: var(--muted); }
.chart .lbl-t { fill: var(--teal-text); }
.chart .start { stroke: #B5B8B4; stroke-width: 2; stroke-dasharray: 6 5; }
.chart .target { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .hl { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot-c { fill: #fff; stroke: var(--teal); stroke-width: 3; }
.chart .dot-now { fill: var(--black); stroke: #fff; stroke-width: 2.5; }
.chart .bar { fill: #BFE9DF; }
.chart .bar-now { fill: var(--teal); }
.chart .bar-neg { fill: #F0B7B7; }
.chart .val { font: 700 12px 'Inter', sans-serif; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.empty-chart { color: var(--muted); font-size: 0.92rem; padding: 26px 0 8px; margin: 0; }

.table-wrap { overflow-x: auto; }
table.team { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin-top: 6px; }
table.team th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.team td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
table.team td.n { font-weight: 700; }
/* Trend column: a small graph of the recent weeks; clicking it opens the bigger chart. */
.trend-cell { padding-top: 6px !important; padding-bottom: 6px !important; }
.spark { display: inline-flex; align-items: center; background: none; border: 1px solid transparent; border-radius: 8px; padding: 2px 4px; cursor: pointer; }
.spark:hover, .spark:focus-visible { background: var(--teal-softer); border-color: var(--teal-soft); outline: none; }
.spark svg { width: 110px; height: 32px; display: block; }
.spark .sp-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .sp-target { stroke: #C3C7C3; stroke-width: 1; stroke-dasharray: 3 3; }
.sp-dot.green { fill: var(--teal-text); }
.sp-dot.amber { fill: var(--amber-mark); }
.sp-dot.red { fill: var(--red-mark); }

/* The bigger chart, in a card over the page */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 5, 5, 0.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28); width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-close { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #EFF0EE; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.modal-close:hover, .modal-close:focus-visible { background: var(--teal-soft); outline: none; }
.modal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 10px; }
.mstat { background: var(--teal-softer); border: 1px solid var(--teal-soft); border-radius: 12px; padding: 10px 12px; }
.mstat > span:first-child { display: block; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.mstat b { display: block; font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-top: 2px; }
.mstat .chip { margin-top: 4px; font-size: 0.68rem; padding: 2px 8px; }
.chart .redline { stroke: var(--red-mark); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .lbl-r { font: 600 11.5px 'Inter', sans-serif; fill: var(--red); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.chart .kdot { stroke: #fff; stroke-width: 2; }
.chart .kdot.green { fill: var(--teal); }
.chart .kdot.amber { fill: var(--amber-mark); }
.chart .kdot.red { fill: var(--red-mark); }
.chart .kval { font: 700 11px 'Inter', sans-serif; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.lg-dot.green { background: var(--teal); }
.lg-dot.amber { background: var(--amber-mark); }
.lg-dot.red { background: var(--red-mark); }

.trend { font-weight: 700; }
.trend.better { color: var(--teal-text); }
.trend.worse { color: var(--red); }
.trend.same { color: var(--muted); }

.wins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.win { background: var(--teal-softer); border: 1px solid var(--teal-soft); border-radius: 14px; padding: 14px; font-size: 0.92rem; color: var(--ink); }
.win b { display: block; font-size: 0.8rem; color: var(--teal-text); margin-bottom: 4px; }

.nextstep { background: var(--teal); color: var(--ink); border-radius: 14px; padding: 16px 20px; font-size: 1rem; font-weight: 500; box-shadow: var(--shadow); }
.nextstep b { font-weight: 800; margin-right: 4px; }
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.empty p { margin: 10px auto 0; max-width: 520px; }
.empty .btnrow { justify-content: center; }

.foot { border-top: 1px solid #D6D8D5; padding: 20px 16px 36px; font-size: 0.82rem; color: var(--muted); text-align: center; }
.foot a { color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 14px; background: var(--black); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 0.9rem; font-weight: 600; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
.toast button { font: inherit; font-weight: 700; color: var(--brand-teal); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; flex: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
  .gear-row { flex-wrap: wrap; gap: 14px 10px; }
  .gear-tile { margin: 0; width: calc(50% - 10px); max-width: 220px; display: flex; flex-direction: column; align-items: center; }
  .steps-row { grid-template-columns: 1fr; }
  .step-arrow { height: 40px; }
  .step-arrow svg { transform: rotate(90deg); }
  .steps-join { display: none; }
  .step-arrow.down-only { display: flex; }
  .dash-dest { max-width: none; }
  .gear-list { grid-template-columns: 1fr 1fr; }
  .two, .grid2 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .wins { grid-template-columns: 1fr 1fr; }
  .tabs { flex-wrap: wrap; }
  .tabs a { flex: 1 1 30%; }
}
@media (max-width: 640px) {
  .hero-top { flex-direction: column-reverse; align-items: flex-start; }
  .hero .logo { width: 160px; margin-top: 0; }
  .card { padding: 18px; }
  .fields, .fields.three, .fields.worth, .grid3 { grid-template-columns: 1fr; }
  .gear-graphic { width: 150px; height: 150px; }
  .gear-face { inset: 17px; padding: 8px; }
  .gear-face b { font-size: 0.8rem; }
  .gear-face small { font-size: 0.64rem; }
  .gear-face .gnum { width: 18px; height: 18px; font-size: 0.65rem; margin-bottom: 3px; }
  .gear-what { padding: 0 4px; font-size: 0.78rem; }
  .weeknav { flex-wrap: wrap; }
  .kpi-fields { grid-template-columns: 1fr 1fr; }
  .score-card { flex-direction: column; align-items: flex-start; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .score-value { font-size: 1.6rem; }
  .gear-list, .grid4, .wins { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 1fr; }
  .tabs a { flex: 1 1 45%; font-size: 0.88rem; }
  table.team th:nth-child(2), table.team td:nth-child(2), table.team th:nth-child(3), table.team td:nth-child(3) { display: none; }
  /* The team table's four columns fit a 360px phone, so Status shows without swiping. */
  table.team { font-size: 0.85rem; }
  table.team th, table.team td { padding-left: 5px; padding-right: 5px; }
  table.team th { white-space: normal; }
  .spark { padding: 2px; }
  .spark svg { width: 60px; height: 18px; }
  table.team .chip { font-size: 0.7rem; padding: 3px 7px; }
  .score-chart svg.wide { display: none; }
  .score-chart svg.narrow { display: block; }
  .modal-stats { grid-template-columns: 1fr 1fr; }
  .modal-card { padding: 18px; }
}

/* ---------- printing the dashboard ---------- */
@media print {
  body { background: #fff; }
  .tabs, .samplebar, .foot, .toast, .noprint, #woo-editbar { display: none !important; }
  .card, .gear, .score-box, .win, .slip li { box-shadow: none; break-inside: avoid; }
  .fix, .nextstep, .score-ring, .band, .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
