:root {
  --paper: #F4F6FC;
  --grid: rgba(47, 75, 224, 0.075);
  --sheet: #FFFFFF;
  --ink: #14213D;
  --ink-soft: #4A5570;
  --ink-faint: #7A849C;
  --pen: #2F4BE0;
  --pen-edge: #1C2FA3;
  --pen-tint: #E8ECFD;
  --on-pen: #FFFFFF;
  --hero: #2F4BE0;
  --hero-grid: rgba(255, 255, 255, 0.09);
  --hero-ink: #FFFFFF;
  --hero-soft: #DCE2FF;
  --check: #16A34A;
  --check-bright: #5BE796;
  --check-tint: #E3F7EA;
  --check-ink: #0F7A37;
  --highlight: #FFF1A1;
  --highlight-edge: #E9C82C;
  --sticky: #FFDCE6;
  --line: rgba(20, 33, 61, 0.12);
  --line-strong: rgba(20, 33, 61, 0.24);
  --error: #B93A28;
  --error-bg: #FDECE8;
  --caution: #A35A00;
  --caution-bg: #FFF2DC;
  --redpen: #D7263D;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.05), 0 12px 32px rgba(20, 33, 61, 0.09);
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1526;
    --grid: rgba(143, 160, 255, 0.06);
    --sheet: #172038;
    --ink: #EDF1FF;
    --ink-soft: #AAB5D3;
    --ink-faint: #7F8AA8;
    --pen: #7C90FF;
    --pen-edge: #4A5CCB;
    --pen-tint: #222D55;
    --on-pen: #0B1024;
    --hero: #1B2A86;
    --hero-grid: rgba(255, 255, 255, 0.06);
    --hero-ink: #FFFFFF;
    --hero-soft: #C4CDFF;
    --check: #2FC76A;
    --check-bright: #5BE796;
    --check-tint: #133524;
    --check-ink: #6CEBA3;
    --highlight: #3A330C;
    --highlight-edge: #BFA126;
    --sticky: #3F1F2C;
    --line: rgba(237, 241, 255, 0.12);
    --line-strong: rgba(237, 241, 255, 0.24);
    --error: #F08B78;
    --error-bg: #3A1D18;
    --caution: #F3B66B;
    --caution-bg: #3A2A12;
    --redpen: #FF7A85;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0E1526;
  --grid: rgba(143, 160, 255, 0.06);
  --sheet: #172038;
  --ink: #EDF1FF;
  --ink-soft: #AAB5D3;
  --ink-faint: #7F8AA8;
  --pen: #7C90FF;
  --pen-edge: #4A5CCB;
  --pen-tint: #222D55;
  --on-pen: #0B1024;
  --hero: #1B2A86;
  --hero-grid: rgba(255, 255, 255, 0.06);
  --hero-ink: #FFFFFF;
  --hero-soft: #C4CDFF;
  --check: #2FC76A;
  --check-bright: #5BE796;
  --check-tint: #133524;
  --check-ink: #6CEBA3;
  --highlight: #3A330C;
  --highlight-edge: #BFA126;
  --sticky: #3F1F2C;
  --line: rgba(237, 241, 255, 0.12);
  --line-strong: rgba(237, 241, 255, 0.24);
  --error: #F08B78;
  --error-bg: #3A1D18;
  --caution: #F3B66B;
  --caution-bg: #3A2A12;
  --redpen: #FF7A85;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(to bottom, var(--hero) 0%, var(--hero) 50%, var(--paper) 50%, var(--paper) 100%);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
button:focus-visible, .check-item input:focus-visible + .tick {
  outline: 3px solid var(--pen);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--hero);
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--hero-ink);
  padding: 26px 20px 118px;
}
.hero-inner { max-width: 720px; margin: 0 auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 44px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #FFFFFF;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 20px; height: 20px; }

.hero h1 {
  font-size: clamp(42px, 8.4vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 20px;
}
.nowrap { white-space: nowrap; }
.hero-check {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.12em;
  vertical-align: -0.06em;
}
.hero-check path {
  fill: none;
  stroke: var(--check-bright);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw 0.55s 0.3s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-sub {
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 500;
  color: var(--hero-soft);
  max-width: 32em;
  margin: 0 0 24px;
  line-height: 1.45;
}

.trust {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  max-width: 100%;
}
.trust strong { font-weight: 700; color: var(--hero-ink); }
.trust svg { flex-shrink: 0; width: 19px; height: 19px; margin-top: 1px; color: var(--check-bright); }

/* ---------- Main + input card ---------- */
.main {
  position: relative;
  max-width: 720px;
  margin: -80px auto 0;
  padding: 0 20px 72px;
}

.card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px;
  transition: opacity 0.2s ease;
}
.card.busy { opacity: 0.6; pointer-events: none; }

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--pen-tint);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 26px;
}
.note p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.note-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--check);
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.note-mark svg { width: 16px; height: 16px; }
.note .note-lead { font-weight: 650; }
.note-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}
.note-list li { position: relative; padding-left: 22px; font-size: 15px; font-weight: 550; }
.note-list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.42em;
  width: 10px;
  height: 5px;
  border-left: 2.5px solid var(--check);
  border-bottom: 2.5px solid var(--check);
  transform: rotate(-45deg);
}
@media (max-width: 480px) { .note-list { grid-template-columns: 1fr; } }

.field { margin-bottom: 24px; }
.label {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.opt { font-weight: 500; color: var(--ink-faint); }

textarea {
  display: block;
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  line-height: 1.55;
  padding: 14px 16px;
}
textarea.short { min-height: 120px; }
textarea::placeholder { color: var(--ink-faint); }
textarea:focus {
  outline: none;
  border-color: var(--pen);
  box-shadow: 0 0 0 3px var(--pen-tint);
}

.add-rubric {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.add-rubric:hover { border-color: var(--pen); background: var(--pen-tint); }
.add-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pen-tint);
  color: var(--pen);
  display: grid;
  place-items: center;
}
.add-icon svg { width: 16px; height: 16px; }
.add-title { display: block; font-weight: 700; font-size: 15.5px; }
.add-sub { display: block; font-size: 14px; color: var(--ink-soft); }

.go-row { display: flex; justify-content: center; margin-top: 30px; }
.go {
  width: 100%;
  max-width: 380px;
  background: var(--pen);
  color: var(--on-pen);
  border: 0;
  border-radius: 16px;
  padding: 18px 28px;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--pen-edge), 0 14px 26px rgba(47, 75, 224, 0.28);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.go:hover { filter: brightness(1.07); }
.go:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--pen-edge), 0 5px 12px rgba(47, 75, 224, 0.25);
}
.go:disabled { cursor: progress; }

.msg {
  display: none;
  margin-top: 18px;
  background: var(--error-bg);
  border: 1px solid var(--error);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.5;
}
.msg.show { display: block; }
.msg strong { display: block; color: var(--error); margin-bottom: 2px; }
.msg .msg-reset { display: block; margin-top: 8px; padding: 4px 0; font-size: 15px; text-align: left; }
.sheet-warn {
  margin: 4px 0 0;
  background: var(--caution-bg);
  border-left: 4px solid var(--caution);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15.5px;
  line-height: 1.45;
}
.sheet-warn strong { color: var(--caution); }
.sheet-note {
  margin: 4px 0 0;
  background: var(--pen-tint);
  border-left: 4px solid var(--pen);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15.5px;
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- Loading ---------- */
.loading {
  text-align: center;
  padding: 38px 0 6px;
  color: var(--ink-soft);
  font-weight: 500;
}
.loading p { margin: 0; }
.loading .loading-sub { margin-top: 6px; font-size: 14px; color: var(--ink-faint); }
.dots { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.dots span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  animation: tickOn 1.8s ease-in-out infinite;
}
.dots svg { width: 15px; height: 15px; opacity: 0; animation: tickSvg 1.8s ease-in-out infinite; }
.dots span:nth-child(2), .dots span:nth-child(2) svg { animation-delay: 0.3s; }
.dots span:nth-child(3), .dots span:nth-child(3) svg { animation-delay: 0.6s; }
@keyframes tickOn {
  0%, 15% { background: transparent; border-color: var(--line-strong); }
  30%, 60% { background: var(--check); border-color: var(--check); }
  80%, 100% { background: transparent; border-color: var(--line-strong); }
}
@keyframes tickSvg {
  0%, 15% { opacity: 0; }
  30%, 60% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

/* ---------- Output ---------- */
.out-head { margin: 44px 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pen);
  background: var(--pen-tint);
  border-radius: 999px;
  padding: 4px 12px;
}
.out-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 10px;
}
.step {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 24px 26px 26px;
  margin-top: 18px;
}
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pen);
  color: var(--on-pen);
  font-size: 15px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.step h3 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.2; }
.step-body { padding-left: 44px; }
.step-body p { margin: 0 0 12px; }
.step-body > :last-child { margin-bottom: 0; }
.step h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 20px 0 8px;
}
.summary { font-size: 17.5px; line-height: 1.5; }
.question {
  background: var(--pen-tint);
  border-left: 4px solid var(--pen);
  border-radius: 12px;
  padding: 12px 16px 13px;
  margin-bottom: 16px;
}
.question p { margin: 0 !important; }
.q-label { font-size: 13.5px; font-weight: 700; color: var(--pen); }
.q-text { font-size: 18px; font-weight: 700; line-height: 1.4; margin-top: 2px !important; }
.q-help { font-size: 15px; color: var(--ink-soft); margin-top: 8px !important; }

ul.bul { list-style: none; margin: 0; padding: 0; }
ul.bul li { position: relative; padding-left: 20px; margin-bottom: 8px; }
ul.bul li:last-child { margin-bottom: 0; }
ul.bul li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pen);
}

.sticky {
  margin-top: 20px;
  max-width: 520px;
  background: var(--sticky);
  border-radius: 4px 4px 16px 4px;
  padding: 14px 18px 16px;
  transform: rotate(-0.8deg);
  box-shadow: 0 6px 16px rgba(20, 33, 61, 0.12);
}
.sticky-title {
  font-family: var(--hand);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 10px !important;
}
.sticky ul.bul li::before { background: var(--ink); }

.step.first { background: var(--highlight); border: 2px solid var(--highlight-edge); }
.fm-kicker { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px !important; }
.fm-text { font-size: 20px; font-weight: 700; line-height: 1.38; letter-spacing: -0.01em; }

.src-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 7px;
  vertical-align: 1px;
  margin-left: 2px;
}
.fmt-inline { color: var(--ink-faint); }
.step-body > .sticky { margin-top: 18px; }
.step strong { font-weight: 750; }

/* ---------- Red pen progress mark ---------- */
.pen {
  position: fixed;
  top: 50%;
  left: max(8px, calc(50% - 360px - 118px));
  transform: translateY(-50%) rotate(-7deg);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--redpen);
  font-family: var(--hand);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.pen-num { position: relative; font-variant-numeric: tabular-nums; }
.pen-tick { width: 36px; height: 32px; margin-top: -6px; transition: opacity 0.2s ease; }
.pen:not(.started) .pen-tick { opacity: 0.25; } /* the tick darkens once the first step is done */
.pen-tick path, .pen-circle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pen-tick path { stroke-dasharray: 60; stroke-dashoffset: 0; }
.pen-tick.draw path { stroke-dashoffset: 60; animation: draw 0.45s ease-out forwards; }
.pen-circle {
  position: absolute;
  left: -16px;
  top: -18px;
  width: calc(100% + 30px);
  height: calc(100% + 34px);
  overflow: visible;
}
.pen-circle path { stroke-width: 2.6; stroke-dasharray: 340; stroke-dashoffset: 340; }
.pen.complete .pen-circle path { animation: circleIn 0.7s ease-out forwards; }
@keyframes circleIn { to { stroke-dashoffset: 0; } }
@media (max-width: 1100px) {
  .pen {
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: auto;
    right: 12px;
    transform: rotate(-4deg);
    font-size: 30px;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 6px 12px 3px 8px;
  }
  .pen-tick { width: 24px; height: 22px; margin-top: -4px; }
  .pen-circle { left: -8px; top: -8px; width: calc(100% + 16px); height: calc(100% + 16px); }
  .main { padding-bottom: 96px; }
  .toast-wrap { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .pen-tick.draw path, .pen.complete .pen-circle path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Your steps: fold when done, reopen any time ---------- */
.check-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  margin: 2px 0 4px;
}
.progress { order: -1; font-size: 14.5px; font-weight: 700; color: var(--check); white-space: nowrap; }
.plan-intro { margin: 0 !important; font-size: 15.5px; font-weight: 600; color: var(--ink); flex: 1 1 100%; }
.psteps { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pstep {
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pstep-process { background: var(--paper); }
.pstep.complete { border-color: var(--check); background: var(--check-tint); }
.pstep-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.pnum {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pen);
  color: var(--on-pen);
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.pnum svg { width: 16px; height: 16px; display: none; }
.pstep.complete .pnum { background: var(--check); }
.pstep.complete .pnum-n { display: none; }
.pstep.complete .pnum svg { display: block; }
.ptitle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 17.5px;
  font-weight: 750;
  line-height: 1.25;
}
.pstep-label { font-size: 12.5px; font-weight: 700; color: var(--ink-faint); white-space: nowrap; }
.pstep.complete .pstep-label { color: var(--check-ink); }
.sugg {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-faint);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 6px;
  margin-left: 4px;
  vertical-align: 2px;
  white-space: nowrap;
}
.who {
  font-size: 12px;
  font-weight: 700;
  color: var(--pen);
  background: var(--pen-tint);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 8px;
  white-space: nowrap;
}
.who-solo { color: var(--caution); background: var(--caution-bg); }
.who-opt { color: var(--ink-soft); background: var(--paper); border: 1px dashed var(--line-strong); }
.opt-pick { margin: 4px 0 14px; padding: 14px 16px; border: 1.5px dashed var(--pen); border-radius: 14px; background: var(--pen-tint); }
.opt-q { margin: 0 0 10px !important; font-size: 15px; font-weight: 700; color: var(--ink); }
.opt-btns { display: flex; flex-direction: column; gap: 8px; }
.opt-btn { font: inherit; font-size: 14.5px; font-weight: 650; padding: 10px 14px; min-height: 44px; border-radius: 12px; width: 100%; border: 1.5px solid var(--pen); background: var(--sheet); color: var(--ink); cursor: pointer; text-align: left; }
.opt-btn:hover { background: var(--pen-tint); }
.opt-btn[aria-pressed="true"] { background: var(--pen); color: var(--on-pen); }
.opt-btn:focus-visible { outline: 3px solid var(--highlight-edge); outline-offset: 2px; }
@media print { .opt-pick { display: none; } }
.pcount {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.pstep.complete .pcount { color: var(--check-ink); }
.chev {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
  transition: transform 0.18s ease;
}
.pstep-head[aria-expanded="true"] > .chev { transform: rotate(90deg); }
.pstep-body { padding: 0 16px 10px 58px; }
.plead { margin: -4px 0 2px !important; font-size: 15px; font-weight: 650; color: var(--ink-soft); }
.phint { margin: 2px 0 4px !important; font-size: 14.5px; font-style: italic; color: var(--ink-soft); }
.pstuck { margin: 2px 0 6px !important; font-size: 14.5px; color: var(--ink-soft); }
.pstuck strong { color: var(--pen); }
@media (max-width: 560px) {
  .pstep-body { padding-left: 16px; }
  .ptitle { font-size: 16.5px; }
}

.checklist { list-style: none; margin: 0; padding: 0; }
.check-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.checklist li:last-child .check-item { border-bottom: 0; }
.check-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  margin-top: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.tick svg { width: 15px; height: 15px; opacity: 0; transform: scale(0.4); transition: opacity 0.15s ease, transform 0.18s ease; }
.check-item:hover .tick { border-color: var(--check); }
.check-item input:checked + .tick { background: var(--check); border-color: var(--check); transform: scale(1.06); }
.check-item input:checked + .tick svg { opacity: 1; transform: scale(1); }
.ctext { transition: color 0.15s ease; }
.check-item input:checked ~ .ctext {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--check);
  text-decoration-thickness: 2px;
}

.done-msg {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  background: var(--check-tint);
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 650;
}
.done-msg.show { display: flex; }
.done-msg .note-mark { width: 26px; height: 26px; margin: 0; }

.after { display: none; }
.after.show { display: block; }
.try-btn {
  margin-top: 12px;
  background: var(--sheet);
  border: 1.5px solid var(--pen);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease;
}
.try-btn span { color: var(--pen); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.try-btn:hover { background: var(--pen-tint); }
.privacy { margin: 8px 2px 0; font-size: 13.5px; color: var(--ink-faint); }
.tag-ex { background: var(--highlight); color: var(--ink); }
.go.nudge { animation: nudge 0.9s ease 0.35s 2; }
@keyframes nudge {
  0%, 100% { transform: none; }
  30% { transform: translateY(-3px) scale(1.03); }
  60% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .go.nudge { animation: none; } }

.actions {
  display: grid;
  grid-template-columns: minmax(0, 320px);
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.act {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--sheet);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.act:hover { border-color: var(--pen); color: var(--pen); }
.act svg { width: 19px; height: 19px; flex-shrink: 0; }
.final-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 30em;
  margin: 24px auto 0;
}
.reset-row { text-align: center; margin-top: 8px; }
.link {
  background: none;
  border: 0;
  padding: 8px;
  font: inherit;
  font-weight: 650;
  color: var(--pen);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.foot {
  text-align: center;
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 56px;
  line-height: 1.6;
}

/* ---------- Motion ---------- */
.rise { opacity: 0; transform: translateY(14px); animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

.burst-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fly {
  position: absolute;
  width: var(--size);
  height: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) / -2);
  border-radius: 50%;
  background: var(--check);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35);
  opacity: 0;
  animation: fly 0.95s cubic-bezier(0.15, 0.75, 0.35, 1) forwards;
  animation-delay: var(--delay);
}
.fly svg { width: 62%; height: 62%; }
@keyframes fly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0deg); }
  14% { opacity: 1; transform: translate(calc(var(--dx) * 0.25), calc(var(--dy) * 0.25)) scale(1.12) rotate(calc(var(--r) * 0.25)); }
  60% { opacity: 1; transform: translate(calc(var(--dx) * 0.85), var(--dy)) scale(1) rotate(calc(var(--r) * 0.8)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 34px)) scale(0.8) rotate(var(--r)); }
}

.toast-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 60;
}
.toast {
  max-width: 440px;
  background: var(--ink);
  color: var(--sheet);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-check path { animation: none; stroke-dashoffset: 0; }
  .rise { transform: none; animation: fadeOnly 0.25s ease forwards; }
  .dots span, .dots svg { animation-duration: 3.6s; }
  .go, .tick, .tick svg { transition: none; }
}
@keyframes fadeOnly { to { opacity: 1; } }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .card { padding: 20px 18px; border-radius: 18px; }
  .step { padding: 20px 18px 22px; border-radius: 18px; }
  .step-body { padding-left: 0; }
  .step h3 { font-size: 20px; }
  .brand { margin-bottom: 32px; }
}
/* ---------- Print ---------- */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --paper: #FFFFFF;
    --sheet: #FFFFFF;
    --ink: #111111;
    --ink-soft: #333333;
    --ink-faint: #666666;
    --pen: #1F33A8;
    --pen-tint: #EEF0FC;
    --on-pen: #FFFFFF;
    --check: #16A34A;
    --highlight: #FFF6C2;
    --highlight-edge: #D8B92A;
    --sticky: #FFE6EE;
    --check-tint: #E3F7EA;
    --check-ink: #0F7A37;
    --caution: #A35A00;
    --caution-bg: #FFF2DC;
    --line: rgba(0, 0, 0, 0.15);
    --line-strong: rgba(0, 0, 0, 0.35);
    --shadow: none;
    padding: 0;
  }
  html, body { background: #FFFFFF !important; }
  body { background-image: none !important; }
  .hero, #inputCard, .loading, .actions, .reset-row, .foot, .toast-wrap, .burst-layer, #rail, .chev { display: none !important; }
  .main { margin: 0 auto; padding: 0; max-width: none; }
  .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
  .out-head { margin-top: 0; }
  .step { box-shadow: none; margin-top: 12px; }
  .first, .pstep { break-inside: avoid; }
  .pstep-body { display: block !important; }
  .sticky { transform: none; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
