/* =====================================================================
   THE SMILEZ LOOK (the user's pick, 11/11: direction A, "Smilez Loud").
   Loaded last, so it only restyles: navy bar, yellow / purple / pink / blue, Anton
   headings, Nunito text, chunky "sticker" cards and buttons like the slides.  Nothing
   here changes what a page does; the slides and campaigns draw exactly as before.
   Also here: the five steps under the top bar (weekstrip.js) and Home's "Do this
   next" box (week.js).
   ===================================================================== */
:root {
  --navy: #0f1320;
  --canvas: #f4f1fa; --surface-2: #faf7ff; --surface-hover: #f1e8ff;
  --line: #d9d3e6; --line-strong: #b3a9c9;
  --ink: #0f1320; --ink-2: #333a4d; --muted: #4f566b;
  --accent-ink: #6a12b8; --accent-soft: #f1e3ff;
  --font-ui: 'Smilez Body Default', "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Smilez Heading Default', Impact, "Arial Narrow", sans-serif;
  --r-md: 10px; --r-lg: 14px;
  --pop: 4px 4px 0 var(--navy); --pop-sm: 2px 2px 0 var(--navy); --pop-hover: 6px 6px 0 var(--accent);
}
:focus-visible { outline: 3px solid #1F5FFF; outline-offset: 2px; }

/* ---- Headings: Anton, like the slides' titles ---- */
h1, .page-head h1 { font: 400 34px/1.05 var(--font-head); text-transform: uppercase; letter-spacing: .01em; }
.section-title h2, .week-page .dash-head h2, .modal-head h2, .empty.hero .empty-title, .next-box h2 {
  font-family: var(--font-head); font-weight: 400; text-transform: uppercase; letter-spacing: .02em;
}
.section-title h2 { font-size: 22px; line-height: 1.15; }
.week-page .dash-head h2 { font-size: 19px; line-height: 1.15; }
.modal-head h2 { font-size: 22px; line-height: 1.15; }
.empty.hero .empty-title { font-size: 26px; line-height: 1.1; }
.page-head .hint { font-weight: 700; }

/* ---- Top bar: the four brand colours under it, yellow for where you are ---- */
#topbar { padding-bottom: 4px; }
#topbar::after { height: 4px; background: linear-gradient(90deg, var(--brand-pink), var(--accent), var(--brand-blue), var(--brand-yellow)); }
#nav a, #topbar-right .topbar-link { font-weight: 800; color: #e6e8f0; }
#nav a.active, #nav a[aria-current="page"],
#topbar-right .topbar-link.active, #topbar-right .topbar-link[aria-current="page"] { background: var(--brand-yellow); color: var(--navy); }
#nav a.active .nav-count, #nav a[aria-current="page"] .nav-count { background: var(--navy); color: var(--brand-yellow); }
/* A narrow window: the menu scrolls sideways instead of sliding under the buttons on the right. */
#nav { flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
#nav a { flex: 0 0 auto; }
@media (max-width: 900px) {
  #topbar { gap: 8px; padding-inline: 10px; }
  #nav a { padding: 0 8px; }
  #nav a .ico { display: none; }
}
/* A phone: two rows — the logo and the buttons, then the menu. */
@media (max-width: 700px) {
  :root { --topbar-h: 88px; }
  #topbar { flex-wrap: wrap; align-content: center; row-gap: 0; }
  #nav { order: 3; flex: 1 0 100%; height: 36px; }
  .brand-logo { height: 30px; }
}

/* ---- Buttons: a dark edge and a small hard shadow; they press down ---- */
.btn { border: 2px solid var(--navy); border-radius: var(--r-md); font-weight: 800; box-shadow: var(--pop-sm); }
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translate(2px, 2px); box-shadow: none; }
.btn.primary, .btn.primary:hover, .btn.approve, .btn.success, .btn.approve:hover, .btn.success:hover,
.btn.danger.solid, .btn.danger.solid:hover { border-color: var(--navy); }
.btn.danger { border-color: var(--bad-solid); box-shadow: 2px 2px 0 var(--bad-solid); }
.btn.danger.solid { box-shadow: var(--pop-sm); }
.btn.small { border-radius: 8px; }
.btn.ghost, .btn.ghost:hover { border-color: transparent; box-shadow: none; }
.btn.ghost:active:not(:disabled) { transform: none; }
.btn:disabled, .btn[aria-disabled="true"] { box-shadow: none; }
.btn.yellow { background: var(--brand-yellow); color: var(--navy); }
.btn.yellow:hover { background: #fff; }
.btn.navy { background: var(--navy); color: #fff; box-shadow: 3px 3px 0 var(--accent); }
.btn.navy:hover { background: #232a40; }
#topbar-right .btn.ghost { box-shadow: none; }
.icon-btn { border-radius: 8px; }

/* ---- Fields, pills, chips ---- */
.input, select, textarea { border-color: var(--line-strong); border-radius: 8px; }
.badge { font-weight: 700; }
.chip { font-weight: 700; }
.seg { border: 2px solid var(--navy); border-radius: var(--r-md); background: var(--surface); }
.seg-btn { font-weight: 700; }
.seg-btn[aria-checked="true"] { box-shadow: none; }

/* ---- Sticker cards: Home's panels, tiles, cards and windows ---- */
.card, .week-page .dash-panel, .tile, .signin {
  border: 2px solid var(--navy); border-radius: var(--r-lg); box-shadow: var(--pop);
}
.week-page .dash-panel { overflow: hidden; }
.week-page .dash-head { border-bottom: 2px solid var(--navy); background: var(--surface-2); }
.tile { transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.tile:hover { border-color: var(--navy); box-shadow: var(--pop-hover); transform: translate(-2px, -2px); }
.tile:focus-within { border-color: var(--navy); }
.tile.add, .tile.add:hover { border-style: dashed; border-color: var(--line-strong); box-shadow: none; transform: none; }
.tile.selected { border-color: var(--accent); box-shadow: 4px 4px 0 var(--accent); }
.empty { border: 2px dashed var(--line-strong); }
.empty.hero { border: 2px dashed var(--navy); background: var(--surface); }
.modal { border: 2px solid var(--navy); border-radius: 16px; box-shadow: 8px 8px 0 var(--navy); }
.modal-head { border-bottom: 2px solid var(--navy); }
.modal.full { border-radius: 12px; }
.menu { border: 2px solid var(--navy); border-radius: var(--r-md); box-shadow: var(--pop); }
.panel-section { border: 2px solid var(--line); }
.subtabs a { font-weight: 800; }
.subtabs a.active, .subtabs a[aria-current="page"] { border-bottom-width: 3px; }
/* A narrow window: the tabs scroll sideways instead of pushing the page wider. */
@media (max-width: 1000px) { .subtabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-inline: 12px; } .subtabs > * { flex: 0 0 auto; } }

/* ---- The week strip's chips: navy for the one that is open ---- */
#weekstrip { border-bottom: 2px solid var(--line); }
.ws-chip { font-weight: 700; }
.ws-label { font-weight: 800; }
.ws-chip[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ws-label[aria-current="page"] { background: var(--navy); color: #fff; }

/* =====================================================================
   The five steps (weekstrip.js): the week in order, under the top bar on every page.
   Green tick = done, yellow = the step to do now, a dark bar under the step you are in.
   ===================================================================== */
#steps {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
  padding: 10px var(--gutter) 8px; background: var(--canvas);
}
#steps[hidden], body:not(.app-ready) #steps { display: none; }
.step {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center;
  padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0;
  transition: border-color var(--dur) var(--ease), transform .12s var(--ease), box-shadow .12s var(--ease);
}
.step:hover { border-color: var(--navy); }
.step-num {
  grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font: 400 17px/1 var(--font-head); background: #e9e4f3; color: var(--navy);
}
.step-title { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-text { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.is-done .step-num { background: var(--ok-solid); color: #fff; }
.step.is-alert .step-num { background: var(--bad-solid); color: #fff; }
.step.is-alert .step-text { color: var(--bad-ink); }
.step.is-now { border-color: var(--navy); background: var(--brand-yellow); box-shadow: var(--pop); }
.step.is-now .step-num { background: var(--navy); color: var(--brand-yellow); }
.step.is-now.is-alert .step-num { background: var(--bad-solid); color: #fff; }
.step.is-now .step-text { color: var(--navy); }
.step[aria-current="step"] { border-color: var(--navy); }
.step[aria-current="step"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 4px; border-radius: 4px 4px 0 0; background: var(--navy); }
/* In an editor the page needs its height: one short line per step, no second line. */
body:has(#view.is-editor) #steps { padding: 5px var(--gutter) 5px; gap: 6px; }
body:has(#view.is-editor) .step { padding: 2px 10px; border-radius: 999px; column-gap: 8px; }
body:has(#view.is-editor) .step-num { width: 22px; height: 22px; font-size: 13px; grid-row: auto; }
body:has(#view.is-editor) .step-text { display: none; }
body:has(#view.is-editor) .step.is-now { box-shadow: var(--pop-sm); }
body:has(#view.is-editor) .step[aria-current="step"]::after { display: none; }
body:has(#view.is-editor) .step[aria-current="step"] { background: var(--navy); color: #fff; }
body:has(#view.is-editor) .step[aria-current="step"] .step-num { background: #fff; color: var(--navy); }
/* A narrow window: one row that scrolls sideways (the step to do now is kept in view),
   so no title is cut short. */
@media (max-width: 1000px) {
  #steps { grid-template-columns: repeat(5, max-content); overflow-x: auto; scrollbar-width: none; padding-inline: 12px; gap: 8px; padding-bottom: 10px; }
  .step { padding: 6px 12px 6px 8px; column-gap: 8px; }
  .step-num { width: 26px; height: 26px; font-size: 14px; }
}
/* A phone: titles only. */
@media (max-width: 700px) {
  .step-text { display: none; }
  .step-num { grid-row: auto; }
}

/* =====================================================================
   Home: "Do this next" — the one thing the week is waiting for.
   ===================================================================== */
.next-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px;
  background: var(--brand-yellow); border: 2px solid var(--navy); border-radius: var(--r-lg); box-shadow: var(--pop);
}
.next-box.is-done { background: var(--ok-soft); }
.next-main { flex: 1 1 320px; min-width: 0; }
.next-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); opacity: .8; }
.next-box h2 { font-size: 24px; line-height: 1.12; margin: 2px 0 4px; }
.next-box p { margin: 0; font-weight: 700; color: var(--ink-2); }
.next-box .btn.large { height: 46px; padding: 0 22px; font-size: 16px; }
@media (max-width: 700px) {
  .page { padding-inline: 12px; }
  .page-head .page-actions { width: 100%; flex-wrap: wrap; min-width: 0; }
  .week-page .week-switch { max-width: 100%; min-width: 0; }
  .week-page .week-switch select { min-width: 0; flex: 1 1 auto; }
  h1, .page-head h1 { font-size: 28px; }
  .next-box { padding: 12px 14px; }
  .next-box h2 { font-size: 20px; }
  .next-box .btn.large { width: 100%; }
}
