/* Toracker — one stylesheet, no build step */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --text: #1f2328;
  --muted: #6e7781;
  --hairline: #ebedf0;
  --ctl: #d0d7de;

  --l0: #ebedf0;
  --l1: #9be9a8;
  --l2: #40c463;
  --l3: #30a14e;
  --l4: #216e39;

  --check: #40c463;
  --focus: #30a14e; /* >=3:1 on white; --check (#40c463) is only 2.26:1 */
  --btn-bg: #216e39;
  --btn-text: #ffffff;
  --btn-hover: #1b5e30;
  --ring: rgba(48, 161, 78, 0.25);
  --today-ring: rgba(31, 35, 40, 0.35);
  --tip-bg: #24292f;
  --tip-text: #ffffff;
  --sel: rgba(155, 233, 168, 0.5);
  --err: #cf222e;

  --cell: 11px;
  --cell-gap: 3px;

  /* one control size for every bordered thing: task rows, add row,
     Sign out, Export, Import. Change here, everything follows. */
  --ctl-h: 44px;
  --ctl-w: 108px; /* fits "Sign out" / "Invalid file" at 14px */
  --ctl-r: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --text: #e6edf3;
    --muted: #7d8590;
    --hairline: #21262d;
    --ctl: #30363d;

    --l0: #161b22;
    --l1: #0e4429;
    --l2: #006d32;
    --l3: #26a641;
    --l4: #39d353;

    --check: #26a641;
    --focus: #26a641;
    --btn-bg: #39d353;
    --btn-text: #0d1117;
    --btn-hover: #26a641;
    --ring: rgba(57, 211, 83, 0.3);
    --today-ring: rgba(230, 237, 243, 0.4);
    --tip-bg: #e6edf3;
    --tip-text: #0d1117;
    --sel: rgba(14, 68, 41, 0.8);
    --err: #f85149;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sel); }

button, input { font: inherit; color: inherit; }

/* author display rules would otherwise beat the UA's [hidden] { display: none } */
[hidden] { display: none !important; }

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

/* anything with data-level gets ramp paint */
[data-level="0"] { background: var(--l0); }
[data-level="1"] { background: var(--l1); }
[data-level="2"] { background: var(--l2); }
[data-level="3"] { background: var(--l3); }
[data-level="4"] { background: var(--l4); }

/* ---------- header ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  max-width: 1008px;
  margin: 0 auto;
  padding: 0 24px;
}
.app .nav { max-width: 812px; }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* in the app the nav is two matching pills; the landing keeps its bare wordmark */
.app .brand {
  justify-content: center;
  width: var(--ctl-w);
  height: var(--ctl-h);
  gap: 6px;
  border: 1px solid var(--ctl);
  border-radius: var(--ctl-r);
  font-size: 15px;
  transition: border-color 120ms ease;
}
.app .brand:hover { border-color: var(--text); }
.mark { width: 16px; height: 16px; }
.mark rect:nth-child(1) { fill: var(--l1); }
.mark rect:nth-child(2) { fill: var(--l2); }
.mark rect:nth-child(3) { fill: var(--l3); }
.mark rect:nth-child(4) { fill: var(--l4); }

/* same pill as Export / Import / task rows — see --ctl-* tokens */
.quiet-link {
  display: grid;
  place-items: center;
  width: var(--ctl-w);
  height: var(--ctl-h);
  border: 1px solid var(--ctl);
  border-radius: var(--ctl-r);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 120ms ease, border-color 120ms ease;
}
.quiet-link:hover { color: var(--text); border-color: var(--text); }

/* ---------- landing (one viewport, no scroll) ---------- */
body.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.landing main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1008px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3.5vh, 36px);
  text-align: center;
}

.hero-copy { display: flex; flex-direction: column; gap: 10px; }
.landing h1 {
  margin: 0;
  font-size: clamp(30px, 5.5vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.sq {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.09em;
  border-radius: 0.035em;
  background: var(--l4);
}

.tagline {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

#demo {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  gap: 4px;
  width: 100%;
}
#demo i {
  aspect-ratio: 1;
  border-radius: 3px;
  animation: pop 320ms cubic-bezier(0.2, 0.7, 0.3, 1.2) calc(var(--col) * 18ms) both;
}
#demo i.beat {
  animation: pop 320ms cubic-bezier(0.2, 0.7, 0.3, 1.2) calc(var(--col) * 18ms) both,
             breathe 2.8s ease-in-out 2s infinite;
}

.signup {
  margin: 0;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.signup input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--ctl);
  border-radius: 10px;
  background: var(--bg);
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.signup input::placeholder { color: var(--muted); }
.signup input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px var(--ring);
  outline: none;
}
.cf-turnstile { min-height: 65px; }
.cf-turnstile:empty { border: 1px solid var(--hairline); border-radius: 10px; }
/* Log in is first in DOM (Enter's default submit); Register still renders left */
.cta { display: flex; flex-direction: row-reverse; gap: 10px; }
.cta button {
  flex: 1;
  height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.cta button:active { transform: translateY(1px); }
.primary-cta { border: 0; background: var(--btn-bg); color: var(--btn-text); }
.primary-cta:hover { background: var(--btn-hover); }
.alt-cta { background: none; border: 1px solid var(--ctl); color: var(--text); }
.alt-cta:hover { background: var(--hairline); }
.cta button:disabled { opacity: 0.55; cursor: default; }
.auth-msg { margin: 0; font-size: 13px; color: var(--err); }
.signup-done { margin: 0; }

.landing footer {
  flex: none;
  padding: 10px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.ramp { display: flex; gap: 3px; }
.ramp i { width: 8px; height: 8px; border-radius: 2px; }

/* ---------- app: boot ----------
   The app can't paint real data until Supabase answers, and an empty
   checklist popping full is worse than a beat of nothing. Opaque cover,
   painted from the very first frame via body.is-loading, faded out by app.js. */
#boot {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 260ms ease;
}
body:not(.is-loading) #boot {
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}
.boot-mark {
  display: grid;
  grid-template-columns: repeat(2, 14px);
  gap: 4px;
}
.boot-mark i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  animation: bootpulse 1.15s ease-in-out infinite;
}
/* the brand mark, lighting up clockwise: TL → TR → BR → BL */
.boot-mark i:nth-child(1) { background: var(--l1); }
.boot-mark i:nth-child(2) { background: var(--l2); animation-delay: 120ms; }
.boot-mark i:nth-child(3) { background: var(--l3); animation-delay: 360ms; }
.boot-mark i:nth-child(4) { background: var(--l4); animation-delay: 240ms; }

/* ---------- app: today ---------- */
/* 812 = 24 padding + 28 day gutter + 8 gap + 728 grid + 24 padding */
.app main {
  max-width: 812px;
  margin: 0 auto;
  /* bottom clears the fixed Export/Import bar (12 + 44 + 12 = 68) */
  padding: 0 24px calc(104px + env(safe-area-inset-bottom, 0px));
}

.today { margin-top: 48px; }
.today-head { display: flex; align-items: baseline; gap: 10px; }
.today-head h1 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
#date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
#count {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease;
}
#count.full { color: var(--l4); font-weight: 600; }

.tasks {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--ctl-h);
  padding: 0 10px 0 12px;
  border: 1px solid var(--ctl);
  border-radius: var(--ctl-r);
  transition: border-color 150ms ease;
}
.task-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  align-self: stretch; /* full-height hit area inside the pill */
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
/* the box is a mini heatmap cell: its background tracks the task's level today */
.box {
  flex: none;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ctl);
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: background 150ms ease, border-color 150ms ease;
}
.box:not([data-level="0"]) { border-color: transparent; }
.box svg { width: 15px; height: 15px; }
.box path, .box circle {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.box path { stroke-dasharray: 14; stroke-dashoffset: 14; }
.done .box { animation: boxpop 220ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.done .box path { stroke-dashoffset: 0; transition: stroke-dashoffset 200ms ease 60ms; }
.task.running .box { animation: breathe 2.8s ease-in-out infinite; }
.name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: line-through transparent;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}
.task[data-type="check"].done .name { color: var(--muted); text-decoration-color: var(--muted); }

.meter {
  flex: none;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-right: 4px;
  transition: color 200ms ease;
}
.task.done .meter { color: var(--l4); font-weight: 600; }

/* Icon buttons must reset the UA's 6px inline padding: with box-sizing:border-box
   it leaves a content box narrower than the icon, and grid clamps the overflow
   to the start edge — the icon then sits ~1px right of centre. */
.step, .del, .arch, .edit, .type { padding: 0; }

/* action buttons match the boxes; an invisible halo keeps the tap target big */
.step {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ctl);
  background: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}
.step::after { content: ""; position: absolute; inset: -9px -3px; }
.step:hover { background: var(--hairline); }
.step:active { transform: scale(0.92); }
.step.primary {
  border-color: transparent;
  background: var(--l1);
  color: var(--l4);
}
.step.primary:hover { border-color: var(--check); }
.step svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step svg.solid { fill: currentColor; stroke: none; }

/* archive/delete live behind the header pencil: rows stay clean until editing */
.del, .arch {
  display: none;
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  background: none;
  border: 1.5px solid var(--ctl);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  place-items: center;
  transition: color 120ms ease, border-color 120ms ease;
}
.del::after, .arch::after { content: ""; position: absolute; inset: -9px -3px; }
.del:hover, .arch:hover { color: var(--text); border-color: var(--text); }
/* icons, not glyphs — a text "×" never optically centers in the box */
.del svg, .arch svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tasks.editing .del, .tasks.editing .arch { display: grid; }
.tasks.editing .step { display: none; }
/* restore is the archived section's only way back — always offered */
.archived .arch { display: grid; }

.edit {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  margin-left: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 120ms ease, background 120ms ease;
}
.edit::after { content: ""; position: absolute; inset: -9px; }
.edit:hover { color: var(--text); }
.edit.on { color: var(--l4); background: var(--l1); }
.edit svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.add {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  min-height: var(--ctl-h);
  padding: 0 10px 0 12px;
  border: 1px solid var(--ctl);
  border-radius: var(--ctl-r);
  transition: border-color 150ms ease;
}
.add::before {
  content: "+";
  width: 26px;
  flex: none;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
}
.add:focus-within { border-color: var(--focus); }
#add-input {
  flex: 1;
  min-width: 0;
  height: calc(var(--ctl-h) - 2px);
  padding: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
}
#add-input::placeholder { color: var(--muted); }

#add-target {
  flex: none;
  width: 56px;
  height: calc(var(--ctl-h) - 2px);
  padding: 0;
  background: none;
  border: 0;
  outline: none;
  font-size: 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#add-target::placeholder { color: var(--muted); }

.types { flex: none; display: flex; gap: 8px; }
.type {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1.5px solid transparent;
  background: none;
  color: var(--muted);
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.type::after { content: ""; position: absolute; inset: -7px -3px; }
.type:hover { color: var(--text); border-color: var(--ctl); }
.type.on { color: var(--l4); background: var(--l1); border-color: transparent; }
.type svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- app: archive ----------
   Retired tasks: kept, not deleted. They stop counting toward today and the
   graph's "All tasks", but their history stays and they can come back. */
.archive { margin-top: 40px; }
/* native <details> so "closed by default" is markup, not state to keep in sync */
.archive summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 0;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 120ms ease;
}
.archive summary::-webkit-details-marker { display: none; }
.archive summary:hover { color: var(--text); }
.archive summary .n { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.archive summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease;
}
.archive[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.tasks.archived { margin-top: 8px; }
.tasks.archived .task { border-color: var(--hairline); }
.tasks.archived .task-main { cursor: default; }
.tasks.archived .name,
.tasks.archived .meter { color: var(--muted); }
.tasks.archived .box { border-color: var(--hairline); }

/* ---------- app: garden ---------- */
.history { margin-top: 72px; }
.garden-head { display: flex; justify-content: space-between; align-items: flex-end; }
.streak { display: flex; flex-direction: column; }
#streak {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.streak small {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.garden-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.select { position: relative; }
.select select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  max-width: 200px;
  padding: 6px 16px 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 120ms ease;
}
.select select:hover { color: var(--text); }
.select::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.legend span { margin: 0 2px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* pinned to the viewport: Export/Import are always reachable */
.data-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6; /* above a hovered heatmap cell (z-index 5) */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
/* content fades out under the bar instead of meeting a hard line */
.data-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 24px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.data-row button {
  width: var(--ctl-w);
  height: var(--ctl-h);
  background: var(--bg);
  border: 1px solid var(--ctl);
  border-radius: var(--ctl-r);
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}
.data-row button:hover { color: var(--text); border-color: var(--text); }

/* ---------- heatmap ---------- */
.hm { display: flex; gap: 8px; margin-top: 20px; }

.hm-days {
  flex: none;
  width: 28px; /* fixed so the grid always fits the 812px column */
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  row-gap: var(--cell-gap);
  justify-items: end;
  margin-top: 19px; /* month label row (13px) + 6px gap */
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
}
.hm-days span { align-self: center; }
.hm-days span:nth-child(1) { grid-row: 2; }
.hm-days span:nth-child(2) { grid-row: 4; }
.hm-days span:nth-child(3) { grid-row: 6; }

.hm-scroll { min-width: 0; scrollbar-width: none; }
.hm-scroll::-webkit-scrollbar { display: none; }
/* below 812 the grid no longer fits the column — scroll it, anchored on today.
   The inner padding gives the today-ring and its bump room; the scroller
   would otherwise clip them at its right/bottom edge. */
@media (max-width: 811px) {
  .hm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 4px 4px 0; }
}

.hm-months {
  display: grid;
  height: 13px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
}
.hm-months span { grid-row: 1; justify-self: start; white-space: nowrap; }

.hm-grid { display: flex; gap: var(--cell-gap); width: max-content; }
.hm-col { display: flex; flex-direction: column; gap: var(--cell-gap); }

.hm-cell {
  width: var(--cell);
  height: var(--cell);
  border-radius: 3px;
  position: relative;
  transition: background-color 400ms ease;
}
.hm-cell.is-today { box-shadow: 0 0 0 1.5px var(--today-ring); }
.hm-cell.bump { animation: bump 350ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.hm-pop { animation: pop 320ms cubic-bezier(0.2, 0.7, 0.3, 1.2) both; }

@media (hover: hover) and (min-width: 812px) {
  /* the scale() traps the tooltip in this cell's stacking context, so the
     cell itself must rise above its later-painted siblings */
  .hm-cell[data-level]:hover { transform: scale(1.15); z-index: 5; }
  .hm-cell[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--tip-bg);
    color: var(--tip-text);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
  }
  /* recent columns: anchor the tooltip's right edge so it can't leave the page */
  .hm-col-end .hm-cell[data-tip]:hover::after {
    left: auto;
    right: 0;
    transform: none;
  }
}

/* ---------- motion ---------- */
@keyframes pop { from { opacity: 0; transform: scale(0.3); } }
@keyframes bump { 40% { transform: scale(1.3); } }
@keyframes boxpop { 40% { transform: scale(1.15); } }
@keyframes breathe { 50% { transform: scale(1.12); box-shadow: 0 0 0 4px var(--ring); } }
/* floor stays high: dark mode's --l1 (#0e4429) disappears entirely below ~0.5 */
@keyframes bootpulse { 0%, 100% { opacity: 0.55; transform: scale(0.88); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .nav, .landing main, .app main { padding-left: 16px; padding-right: 16px; }
  #demo { gap: 2px; }
  #demo i { border-radius: 1.5px; }
  .box { width: 28px; height: 28px; border-radius: 9px; }
  .step, .del, .arch { width: 28px; height: 28px; border-radius: 9px; }
  .step::after, .del::after, .arch::after { inset: -8px -3px; }
  .add::before { width: 28px; }
  #streak { font-size: 32px; }
}

/* Turnstile's flexible widget never renders below 300px wide */
@media (max-width: 331px) {
  .landing .nav, .landing main { padding-left: 10px; padding-right: 10px; }
}

/* short viewports: compress so everything still fits on one screen */
@media (max-height: 760px) {
  .landing main { gap: 12px; }
  .landing h1 { font-size: clamp(24px, 4.5vh, 34px); }
  #demo { max-width: min(100%, 640px); }
  .landing footer { padding: 6px 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
