/* Deckle launch site. Tokens come from the app (docs/DESIGN.md); components use only these. */
:root {
  color-scheme: light dark;

  --paper: #f6f1e7;
  --paper-raised: #fffcf6;
  --paper-sunken: #efe7d9;
  --ink: #2b2620;
  --ink-muted: #6e6457;
  --rule: #e0d6c4;
  --rule-strong: #c9bba3;
  --accent: #b5542d;
  --accent-strong: #933f1d;
  --accent-soft: #f3dfd2;
  --on-accent: #fffcf6;
  --success: #3f7a4f;
  --warning: #a8701a;

  --heat-0: #efe7d9;
  --heat-1: #ecc9b4;
  --heat-2: #d0825c;
  --heat-3: #933f1d;

  --status-idea: #8a8172;
  --status-drafting: #c08a1e;
  --status-drafted: #3f6fa8;
  --status-revised: #3f7a4f;

  --shadow-card: 0 1px 2px rgb(60 45 25 / 0.08), 0 10px 28px rgb(60 45 25 / 0.1);
  --shadow-lift: 0 2px 4px rgb(60 45 25 / 0.08), 0 24px 56px rgb(60 45 25 / 0.16);

  --grain-opacity: 0.03;
  --font-display: "Fraunces", "Iowan Old Style", Charter, "Palatino Linotype", Georgia, serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --section-pad: clamp(4.5rem, 3rem + 6vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17151a;
    --paper-raised: #211e24;
    --paper-sunken: #121014;
    --ink: #ece5d8;
    --ink-muted: #a69c8d;
    --rule: #36313a;
    --rule-strong: #4d4652;
    --accent: #e48a5f;
    --accent-strong: #f0a47f;
    --accent-soft: #3b2a24;
    --on-accent: #17151a;
    --success: #7cbf8b;
    --warning: #e0b05a;

    --heat-0: #121014;
    --heat-1: #4a3128;
    --heat-2: #b0623f;
    --heat-3: #f0a47f;

    --status-idea: #a39a8c;
    --status-drafting: #e0b05a;
    --status-drafted: #7fa8dc;
    --status-revised: #7cbf8b;

    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 28px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.4), 0 24px 56px rgb(0 0 0 / 0.5);

    --grain-opacity: 0;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
.wordmark,
.finish-date,
.pace-date,
.step-num,
.scene-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50;
  overflow-wrap: normal;
  hyphens: none;
}

h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  max-width: 62ch;
}

.num {
  font-variant-numeric: tabular-nums lining-nums;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.875rem;
}

.label {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 48rem) {
  .wrap {
    max-width: calc(72rem + 4rem);
    padding-inline: 2rem;
  }
}

section {
  padding-block: var(--section-pad);
}

/* ---------- Links and buttons ---------- */

a {
  color: var(--accent-strong);
}

a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1rem/1 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(60 45 25 / 0.12);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible {
  border-radius: 10px;
}

.button-small {
  min-height: 44px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition:
    text-decoration-color 160ms ease,
    transform 160ms ease;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.text-link:active {
  transform: translateY(1px);
}

.arrow-link span {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}

.arrow-link:hover span {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.top-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: border-color 200ms ease;
}

.js .site-header:not(.is-scrolled) {
  border-bottom-color: transparent;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:active {
  transform: translateY(1px);
}

.wordmark {
  font-size: 1.375rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1;
}

.mark .sheet {
  fill: var(--paper-raised);
}

.mark .ribbon,
.panel-ribbon .ribbon {
  fill: var(--accent);
}

.primary-nav {
  display: none;
  margin-left: auto;
  gap: 0.25rem;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.primary-nav a:hover {
  background: var(--accent-soft);
}

.primary-nav a:active {
  transform: translateY(1px);
}

.header-inner .button {
  margin-left: auto;
}

@media (min-width: 48rem) {
  .primary-nav {
    display: flex;
  }

  .header-inner .button {
    margin-left: 0.5rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  --mx: 0;
  --my: 0;
  --hero-p: 0;
  position: relative;
  overflow-x: clip;
  padding-block: clamp(2.5rem, 1rem + 5vw, 5rem) var(--section-pad);
  background: radial-gradient(
    ellipse 60% 70% at 88% 8%,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 0%, transparent) 70%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.hero-sub {
  font-size: 1.1875rem;
  color: var(--ink-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.reassure {
  margin-top: -0.75rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

@media (min-width: 64rem) {
  .hero-grid {
    grid-template-columns: repeat(12, 1fr);
    min-height: min(92svh, 56rem);
    gap: 2rem;
  }

  .hero-copy {
    grid-column: 1 / span 5;
  }

  .desk {
    grid-column: 6 / span 7;
    justify-self: end;
  }
}

/* The desk: papers in em units, so the whole composition scales with one font-size. */
.desk {
  position: relative;
  width: 38em;
  height: 33.5em;
  font-size: 0.82rem;
}

@media (min-width: 30rem) {
  .desk {
    font-size: 0.92rem;
  }
}

@media (min-width: 64rem) {
  .desk {
    font-size: clamp(0.85rem, 0.2rem + 1vw, 1.05rem);
  }
}

.card-wrap {
  position: absolute;
  will-change: transform;
}

.wrap-back {
  left: 5em;
  top: 1em;
  width: 27em;
  transform: translate(calc(var(--mx) * 4px), calc(var(--my) * 4px + var(--hero-p) * -14px))
    rotate(calc(var(--mx) * 0.4deg));
}

.wrap-left {
  left: 0;
  top: 16.25em;
  width: 17em;
  z-index: 2;
  transform: translate(calc(var(--mx) * 10px), calc(var(--my) * 10px + var(--hero-p) * -40px))
    rotate(calc(var(--mx) * -0.8deg));
}

.wrap-right {
  left: 20.5em;
  top: 14.5em;
  width: 17em;
  z-index: 3;
  transform: translate(calc(var(--mx) * 10px), calc(var(--my) * 10px + var(--hero-p) * -36px))
    rotate(calc(var(--mx) * 0.8deg));
}

.card {
  --rot: 0deg;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 1.5em;
  transform: rotate(var(--rot));
}

.card .label {
  font-size: 0.75em;
}

.finish-card {
  --rot: -2deg;
  padding: 1.75em 2em 2em;
  min-height: 15em;
}

.finish-date {
  margin: 0.35em 0 0.2em;
  font-size: 3em;
  font-weight: 450;
  line-height: 1.05;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.finish-card .muted {
  font-size: 0.95em;
}

.progress {
  margin-top: 1.6em;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

.track {
  height: 10px;
  border-radius: 99px;
  background: var(--paper-sunken);
  overflow: hidden;
}

.fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transform-origin: left;
  transform: scaleX(var(--to));
}

.heat-card {
  --rot: 1.5deg;
  padding: 1.25em 1.4em;
}

.heatmap {
  display: flex;
  gap: 3px;
  margin: 0.75em 0;
}

.wk {
  display: grid;
  gap: 3px;
}

.heatmap i {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--heat-0);
}

.heatmap i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.heatmap i[data-level="1"]::after {
  background: var(--heat-1);
}
.heatmap i[data-level="2"]::after {
  background: var(--heat-2);
}
.heatmap i[data-level="3"]::after {
  background: var(--heat-3);
}

.heatmap i.future {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
}

.heat-card .heatmap i {
  width: 0.78em;
  height: 0.78em;
}

.streaks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 1em;
  font-size: 0.85em;
  color: var(--ink-muted);
}

.streaks strong {
  color: var(--ink);
  font-weight: 600;
}

.scene-card {
  --rot: 3deg;
  position: relative;
  padding: 1.2em 1.3em 1.3em 1.6em;
  overflow: hidden;
}

.scene-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--spine);
}

.scene-title {
  font-size: 1.2em;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.25em;
}

.scene-card .muted {
  font-size: 0.85em;
}

.scene-summary {
  margin: 0.6em 0 0.9em;
  font-size: 0.9em;
  line-height: 1.45;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.25em 0.75em;
  border-radius: 99px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: 0.8em;
  font-weight: 600;
}

.chip::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--dot);
}

/* ---------- Pace dial ---------- */

.pace {
  background: var(--paper-sunken);
  text-align: center;
}

.pace-inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.pace .lead {
  color: var(--ink-muted);
  font-size: 1.1875rem;
  max-width: 34rem;
}

.pace-date {
  display: grid;
  margin-top: 1.5rem;
  font-size: clamp(2.4rem, 1.5rem + 4vw, 4.5rem);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  padding-block: 0.08em;
}

.date-face {
  grid-area: 1 / 1;
}

.date-face.leaving {
  animation: date-out 150ms ease-in forwards;
}

.date-face.entering {
  animation: date-in 150ms var(--ease-out);
}

@keyframes date-out {
  to {
    opacity: 0;
    transform: translateY(-0.4em);
  }
}

@keyframes date-in {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
}

.pace-days {
  margin-top: -0.5rem;
  font-size: 1.0625rem;
}

.js .no-js-only,
html:not(.js) .js-only {
  display: none;
}

.dial {
  width: min(100%, 40rem);
  margin-top: 1.5rem;
}

.dial-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-weight: 600;
}

.dial-value {
  color: var(--accent-strong);
}

.dial input[type="range"] {
  --track-h: 10px;
  display: block;
  width: 100%;
  height: 44px;
  margin: 0.5rem 0 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.dial input[type="range"]::-webkit-slider-runnable-track {
  height: var(--track-h);
  border-radius: 99px;
  border: 1px solid var(--rule-strong);
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--fill),
    var(--paper-raised) var(--fill) 100%
  );
}

.dial input[type="range"]::-moz-range-track {
  height: var(--track-h);
  border-radius: 99px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
}

.dial input[type="range"]::-moz-range-progress {
  height: var(--track-h);
  border-radius: 99px;
  background: var(--accent);
}

.dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper-raised);
  box-shadow: var(--shadow-card);
  transition: transform 160ms ease;
}

.dial input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper-raised);
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
}

.dial input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.08);
}

.dial input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(0.96);
}

.dial input[type="range"]:focus-visible {
  outline-offset: 3px;
  border-radius: 99px;
}

.ticks {
  position: relative;
  height: 2.75rem;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.ticks span {
  position: absolute;
  left: calc(var(--t) * (100% - 28px) + 14px);
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  padding-top: 0.6rem;
}

.ticks span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.4rem;
  background: var(--rule-strong);
}

.ticks span:first-child {
  transform: translateX(-14px);
}

.ticks span:first-child::before {
  left: 14px;
}

/* On phones the first two ticks sit close together, so the middle label drops to a second row. */
@media (max-width: 30rem) {
  .ticks {
    height: 3.75rem;
  }

  .ticks span:nth-child(2) {
    padding-top: 1.9rem;
  }

  .ticks span:nth-child(2)::before {
    height: 1.7rem;
  }
}

.footnote {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  max-width: 34rem;
}

/* ---------- How it works ---------- */

.steps {
  --rule-progress: 1;
  position: relative;
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2.5rem;
}

.steps::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--rule-strong);
  transform-origin: top;
  transform: scaleY(var(--rule-progress));
}

.step {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-left: 3.25rem;
}

.step-num {
  position: absolute;
  left: 0;
  top: -0.35rem;
  width: 1.8rem;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 450;
  line-height: 1;
  color: var(--accent-strong);
  background: var(--paper);
  padding-block: 0.3rem;
}

.step p {
  color: var(--ink-muted);
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
  }

  .steps::before {
    left: 0;
    right: 0;
    top: 2rem;
    bottom: auto;
    width: auto;
    height: 1px;
    transform-origin: left;
    transform: scaleX(var(--rule-progress));
  }

  .step {
    padding-left: 0;
    padding-top: 0;
    gap: 0.6rem;
  }

  .step-num {
    position: static;
    width: auto;
    justify-self: start;
    padding: 0 0.75rem 0.75rem 0;
    font-size: 3.5rem;
  }
}

/* ---------- Features ---------- */

.features h2 {
  max-width: 22ch;
}

@media (min-width: 48rem) {
  .features h2 {
    margin-left: auto;
    text-align: right;
  }
}

.bento {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 56rem) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
    margin-top: 4rem;
  }

  .span-7 {
    grid-column: span 7;
  }
  .span-6 {
    grid-column: span 6;
  }
  .span-5 {
    grid-column: span 5;
  }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.75rem;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 18px;
  min-width: 0;
  transition:
    transform 260ms var(--ease-out),
    box-shadow 260ms var(--ease-out);
}

.tile p {
  color: var(--ink-muted);
}

@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
}

.illo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  min-height: 9rem;
  margin-bottom: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.label-plain {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.label-plain strong {
  color: var(--ink);
}

.pills {
  display: flex;
  gap: 0.4rem;
}

.pill {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 2.6rem;
  border-radius: 99px;
  border: 1px solid var(--rule-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.pill.on {
  border-color: transparent;
  color: var(--on-accent);
  isolation: isolate;
}

.pill.on::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent);
}

.pill.today {
  border: 1.5px solid var(--accent);
  color: var(--ink);
}

.pill small {
  position: absolute;
  top: calc(100% + 0.2rem);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.streak-illo .label-plain {
  margin-top: 1rem;
}

.finish-illo {
  align-items: flex-start;
}

.status-pill {
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--success) 14%, var(--paper-raised));
  color: var(--success);
  font-weight: 600;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: light) {
  .status-pill {
    color: color-mix(in srgb, var(--success) 82%, var(--ink));
  }
}

.finish-illo .muted {
  font-size: 0.9375rem;
}

.heat-illo .heatmap {
  margin: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--heat-0);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.legend i[data-level="1"] {
  background: var(--heat-1);
}
.legend i[data-level="2"] {
  background: var(--heat-2);
}
.legend i[data-level="3"] {
  background: var(--heat-3);
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.mini-col {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--paper-sunken);
  min-width: 0;
}

.mini-head {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.mini-card {
  position: relative;
  padding: 0.3rem 0.5rem 0.3rem 0.65rem;
  border-radius: 5px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  font-weight: 500;
  overflow: hidden;
}

.mini-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--spine);
}

.status-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  margin-top: 0.4rem;
}

.status-bar span {
  flex: var(--n);
  border-radius: 2px;
  background: var(--c);
  transform-origin: left;
}

.status-counts {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  max-width: none;
}

.filter-illo {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  font-size: 0.875rem;
  font-weight: 600;
}

.filter-chip.select {
  border-radius: 8px;
}

.filter-chip.on {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.filter-chip.on::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--dot);
}

.filter-chip.off {
  color: var(--ink-muted);
  border-style: dashed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.file-illo {
  align-items: flex-start;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.file-chip svg {
  flex: none;
  color: var(--accent-strong);
}

/* ---------- The real app ---------- */

.try {
  text-align: center;
}

.try h2,
.try .lead {
  margin-inline: auto;
}

.try .lead {
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 1.1875rem;
  max-width: 38rem;
}

.browser {
  margin-top: 3rem;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  text-align: left;
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule-strong);
}

.address {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 1rem;
  border-radius: 99px;
  background: var(--paper-sunken);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.browser iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--paper);
}

@media (max-width: 47.99rem) {
  .browser-bar {
    height: 32px;
    padding: 0 0.75rem;
  }

  .dots i {
    width: 7px;
    height: 7px;
  }

  .address {
    font-size: 0.75rem;
    padding: 0.1rem 0.75rem;
  }

  .browser iframe {
    height: 680px;
  }
}

.view-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.view-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.view-links a:hover {
  background: var(--accent-soft);
}

.view-links a:active {
  transform: translateY(1px);
}

.view-links a[aria-current="true"] {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.try-cta {
  margin: 1.5rem auto 0;
}

/* ---------- Closing ---------- */

.closing {
  padding-top: calc(var(--section-pad) * 0.5);
}

.panel {
  position: relative;
  filter: drop-shadow(0 1px 1px rgb(60 45 25 / 0.08)) drop-shadow(0 16px 32px rgb(60 45 25 / 0.1));
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-raised);
  border-radius: 18px 0 0 18px;
  /* The logo's deckled right edge, as irregular points down the side. */
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    calc(100% - 3px) 7%,
    calc(100% - 9px) 15%,
    calc(100% - 2px) 24%,
    calc(100% - 8px) 33%,
    calc(100% - 1px) 43%,
    calc(100% - 9px) 52%,
    calc(100% - 3px) 61%,
    calc(100% - 10px) 70%,
    calc(100% - 2px) 79%,
    calc(100% - 8px) 88%,
    calc(100% - 3px) 95%,
    calc(100% - 11px) 100%,
    0 100%
  );
}

.panel-copy {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  padding: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  padding-right: 7rem;
}

.panel-copy > p:not(.muted) {
  font-size: 1.1875rem;
}

.panel-ribbon {
  position: absolute;
  z-index: 1;
  top: 0;
  right: clamp(1.75rem, 1rem + 5vw, 6rem);
  width: 30px;
  height: 120px;
}

@media (max-width: 47.99rem) {
  .panel-copy {
    padding-right: 4rem;
  }

  .panel-ribbon {
    width: 18px;
    height: 72px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  font-size: 0.875rem;
  max-width: none;
}

@media (max-width: 47.99rem) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .card {
    animation: settle 700ms var(--spring) both;
  }
  .js .wrap-left .card {
    animation-delay: 120ms;
  }
  .js .wrap-right .card {
    animation-delay: 240ms;
  }

  .js .heat-card .heatmap i::after {
    animation: fade-in 260ms ease both;
    animation-delay: calc(900ms + var(--c) * 60ms);
  }

  .js .finish-card .fill {
    animation: grow 900ms var(--ease-out) 800ms both;
  }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 600ms var(--ease-out),
      transform 600ms var(--ease-out);
  }

  .js .browser[data-reveal] {
    transform: translateY(24px);
  }

  .js .steps[data-reveal],
  .js .panel[data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .bento .tile:nth-child(2) {
    transition-delay: 80ms;
  }
  .js .bento .tile:nth-child(3) {
    transition-delay: 160ms;
  }
  .js .bento .tile:nth-child(4) {
    transition-delay: 240ms;
  }
  .js .bento .tile:nth-child(5) {
    transition-delay: 320ms;
  }
  .js .bento .tile:nth-child(6) {
    transition-delay: 400ms;
  }

  .js .bento .tile.is-in:hover {
    transition-delay: 0ms;
  }

  .js .steps::before {
    transform: scaleY(0);
    transition: transform 900ms var(--ease-out);
  }

  .js .steps.is-in::before {
    transform: scaleY(1);
  }

  .js .pill.on::before {
    opacity: 0;
    transform: scale(0.6);
    transition:
      opacity 240ms ease,
      transform 360ms var(--spring);
    transition-delay: calc(300ms + var(--i) * 110ms);
  }

  .js .pill.on {
    color: var(--ink-muted);
    transition: color 240ms ease calc(300ms + var(--i) * 110ms);
  }

  .js .is-in .pill.on {
    color: var(--on-accent);
  }

  .js .is-in .pill.on::before {
    opacity: 1;
    transform: none;
  }

  .js .status-bar span {
    transform: scaleX(0);
    transition: transform 700ms var(--ease-out);
    transition-delay: calc(300ms + var(--i) * 120ms);
  }

  .js .is-in .status-bar span {
    transform: none;
  }

  .js .panel-ribbon {
    transform: translateY(-24px);
    opacity: 0;
    transition:
      transform 700ms var(--spring) 200ms,
      opacity 200ms ease 200ms;
  }

  .js .panel.is-in .panel-ribbon {
    transform: none;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 48rem) {
  .js .steps::before {
    transform: scaleX(0);
  }

  .js .steps.is-in::before {
    transform: scaleX(1);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(calc(var(--rot) + 1.5deg));
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card-wrap {
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
  }
}
