/* Hallmark: ThinkPair year wall · every day is a cell, four dopamine fills with fixed meanings */
:root {
  --paper: #fbfaf6;
  --paper-2: #f3f1ea;
  --stone: #e8e5dc;
  --stone-2: #d9d5ca;
  --ink: #15130f;
  --ink-2: #39352e;
  --ink-3: #5c574e;

  --mint: #1ec97f;
  --mint-ink: #0a7447;
  --mint-soft: #d9f6e8;
  --coral: #ff5b3d;
  --coral-ink: #b8361b;
  --coral-soft: #ffe3dc;
  --sun: #ffc21a;
  --sun-ink: #784f00;
  --sun-soft: #fff0c2;
  --cobalt: #2d5bff;
  --cobalt-ink: #1f44cf;
  --cobalt-soft: #e1e8ff;

  --night: #15130f;
  --night-2: #221f1a;
  --night-cell: #2b2823;
  --night-dim: #4a443c;
  --night-text: #f4f1ea;
  --night-muted: #b8b2a7;
  --night-coral: #ff8a70;
  --night-mint: #3ee39a;

  --shadow: #15130f55;
  --scrim: #15130f8c;

  --display: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html,
body {
  overflow-x: clip;
}

body.tp {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--cobalt);
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
summary,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only,
.honey {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

body.tp ::selection {
  background: var(--sun);
  color: var(--ink);
}

body.tp ::-webkit-scrollbar {
  width: 12px;
}

body.tp ::-webkit-scrollbar-track {
  background: var(--paper-2);
}

body.tp ::-webkit-scrollbar-thumb {
  background: var(--stone-2);
  border: 3px solid var(--paper-2);
  border-radius: 8px;
}

body.tp a:focus-visible,
body.tp button:focus-visible,
body.tp summary:focus-visible,
body.tp input:focus-visible,
body.tp textarea:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 4px;
}

body:has(dialog[open]) {
  overflow: hidden;
}

body.tp .wrap {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
}

.tp-display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* Nav */
.tp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
}

.tp-main,
.tp-footer {
  position: relative;
  z-index: 1;
}

.tp-ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.tp-nav-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.tp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tp-brand-cell {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background:
    linear-gradient(var(--mint), var(--mint)) 0 0 / 9px 9px no-repeat,
    linear-gradient(var(--sun), var(--sun)) 11px 0 / 9px 9px no-repeat,
    linear-gradient(var(--coral), var(--coral)) 0 11px / 9px 9px no-repeat,
    linear-gradient(var(--cobalt), var(--cobalt)) 11px 11px / 9px 9px no-repeat;
}

.tp-nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper-2);
}

.tp-nav-links a {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  transition: background-color 0.2s var(--ease-out);
}

.tp-nav-links a:hover {
  background: var(--paper);
  color: var(--ink);
}

.tp-nav-cta {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 0.2s var(--ease-out);
}

.tp-nav-cta:hover {
  background: var(--cobalt);
}

/* Cells: the one material of this world */
.tp-cell {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--stone);
  flex-shrink: 0;
}

.tp-cell-md {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.tp-cell.is-mint { background: var(--mint); }
.tp-cell.is-coral { background: var(--coral); }
.tp-cell.is-sun { background: var(--sun); }
.tp-cell.is-cobalt { background: var(--cobalt); }

.tp-wall {
  position: relative;
  display: grid;
  gap: 4px;
}

.tp-wall > i {
  display: block;
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--stone);
  will-change: transform, background-color;
  transition: background-color 0.35s var(--ease-out), transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.tp-wall > i.is-mint { background: var(--mint); }
.tp-wall > i.is-coral { background: var(--coral); }
.tp-wall > i.is-sun { background: var(--sun); }
.tp-wall > i.is-cobalt { background: var(--cobalt); }
.tp-wall > i.is-spark-mint { background: var(--mint); }
.tp-wall > i.is-spark-coral { background: var(--coral); }
.tp-wall > i.is-spark-sun { background: var(--sun); }
.tp-wall > i.is-spark-cobalt { background: var(--cobalt); }

.tp-wall.is-waiting > i {
  background: var(--stone);
  transform: scale(0.6);
}

/* Hero */
.tp-hero {
  padding-top: 28px;
  padding-bottom: 48px;
}

.tp-hero-title {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.025em;
  color: var(--ink-2);
}

.tp-hero-sent {
  display: block;
}

.tp-hero-sent + .tp-hero-sent {
  margin-top: 4px;
}

.tp-hero-strong {
  color: var(--ink);
  font-weight: 900;
}

.tp-hero-strike {
  position: relative;
  display: inline-block;
  padding: 0 2px;
  color: color-mix(in srgb, var(--ink-3) 78%, var(--paper));
  font-weight: 700;
}

.tp-hero-strike::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 52%;
  height: 4px;
  border-radius: 4px;
  background: var(--coral);
  transform-origin: left center;
  transform: rotate(-2deg) scaleX(1);
  animation: tpStrikeDraw 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.tp-hero-mint {
  display: inline;
  padding: 0 4px;
  margin: 0 2px;
  border-radius: 4px;
  color: var(--ink);
  font-weight: 900;
  background: linear-gradient(transparent 56%, color-mix(in srgb, var(--mint) 38%, var(--paper)) 56% 92%, transparent 92%) no-repeat left center / 100% 100%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation: tpMarkerSweep 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

.tp-hero-sun {
  position: relative;
  display: inline-block;
  padding: 0 12px 2px;
  margin: 0 2px;
  color: var(--ink);
  font-weight: 900;
  z-index: 0;
}

.tp-hero-sun::before {
  content: "";
  position: absolute;
  inset: 2px 0 0;
  border-radius: 12px;
  background: var(--sun);
  z-index: -1;
  transform-origin: left center;
  animation: tpSunSweep 0.46s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}

@keyframes tpStrikeDraw {
  from { transform: rotate(-2deg) scaleX(0); }
  to { transform: rotate(-2deg) scaleX(1); }
}

@keyframes tpMarkerSweep {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}

@keyframes tpSunSweep {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.tp-hero-wall {
  margin: 24px 0 0;
}

.tp-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.tp-wall[data-wall="hero"] {
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  grid-template-columns: repeat(52, 1fr);
}

.tp-wall-ends {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}

.tp-wall-ends strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--mint-ink);
}

.tp-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.tp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 8px;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.tp-legend span.is-lit {
  background: var(--sun-soft);
  color: var(--ink);
}

.tp-legend em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--ink-3);
}

.tp-hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--stone);
}

.tp-manifesto {
  margin: 0;
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tp-hero-sub {
  margin: 4px 0 0;
  max-width: 42em;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}

.tp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.tp-btn:hover {
  transform: translateY(-2px);
}

.tp-btn:active {
  transform: translateY(0);
}

.tp-btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.tp-btn-ink:hover {
  background: var(--cobalt);
}

.tp-btn-line {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.tp-btn-line:hover {
  background: var(--sun);
}

.tp-btn-sun {
  background: var(--sun);
  color: var(--ink);
}

.tp-btn-sun:hover {
  background: var(--paper);
  color: var(--ink);
}

.tp-btn-block {
  width: 100%;
}

body.tp button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tp-text-link {
  white-space: nowrap;
  margin-top: 16px;
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--cobalt-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Shared headings */
.tp-h2 {
  margin: 0;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.14;
  text-wrap: balance;
}

.tp-h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tp-lead {
  margin: 0;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-3);
}

/* What it does */
.tp-what {
  padding-top: 80px;
  padding-bottom: 96px;
  border-top: 1px solid var(--stone);
}

.tp-what-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 48px;
}

.tp-what-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-what-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--stone);
}

.tp-what-row:last-child {
  border-bottom: 1px solid var(--stone);
}

.tp-what-body h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tp-what-body h3::before,
.tp-engine h4::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--mint);
  flex-shrink: 0;
}

.tp-what-row.is-coral h3::before { background: var(--coral); }
.tp-what-row.is-sun h3::before,
.tp-engine.is-sun h4::before { background: var(--sun); }
.tp-what-row.is-cobalt h3::before,
.tp-engine.is-cobalt h4::before { background: var(--cobalt); }

.tp-what-body p {
  margin: 0;
  max-width: 36em;
  font-size: 16px;
  color: var(--ink-2);
}

.tp-then-now {
  margin: 0;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--paper-2);
  display: grid;
  gap: 8px;
}

.tp-then-now > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.tp-then-now dt {
  font-weight: 800;
  color: var(--ink-3);
}

.tp-then-now dd {
  margin: 0;
  color: var(--ink-3);
}

.tp-then-now > div:last-child dt,
.tp-then-now > div:last-child dd {
  color: var(--ink);
  font-weight: 800;
}

/* Concrete System Proof Slice */
.tp-proof {
  margin-top: 64px;
}

.tp-proof-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.tp-proof-badge {
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--paper-2);
  border: 1px solid var(--stone-2);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}

.tp-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tp-proof-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--stone-2);
  background: var(--paper-2);
}

.tp-proof-card.is-chat {
  background: var(--paper);
  border-color: var(--ink);
}

.tp-proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--stone-2);
}

.tp-proof-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}

.tp-file-tag {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--stone-2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-2);
}

.is-chat .tp-file-tag {
  background: var(--paper-2);
}

.tp-record-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.tp-record-list > div {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--paper);
}

.tp-record-list > div.is-good {
  background: var(--mint-soft);
}

.tp-record-list > div.is-bad {
  background: var(--coral-soft);
}

.tp-record-list dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

.tp-record-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.tp-record-list del {
  margin-right: 8px;
  color: var(--coral-ink);
  font-weight: 800;
}

.tp-record-list dd span {
  color: var(--ink);
  font-weight: 700;
}

.tp-chat-user {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--paper-2);
  margin-bottom: 16px;
}

.tp-chat-role {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}

.tp-chat-user p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.tp-chat-ai {
  padding: 20px;
  border-radius: 16px;
  background: var(--sun-soft);
  display: grid;
  gap: 12px;
}

.tp-chat-alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--sun-ink);
}

.tp-chat-ai p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.tp-chat-draft {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--stone-2);
  background: var(--paper);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
}

/* Night spread: three years */
.tp-night {
  padding: 96px 20px;
  background: var(--night);
  color: var(--night-text);
}

.tp-night .wrap {
  width: min(1200px, calc(100% - 24px));
}

.tp-night .tp-lead {
  color: var(--night-muted);
}

.tp-night-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 56px;
}

.tp-year-tabs {
  display: none;
}

.tp-years-row {
  padding: 32px 0;
  border-top: 1px solid var(--night-2);
}

.tp-years-label {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 900;
}

.tp-years-row.is-entropy .tp-years-label {
  color: var(--night-coral);
}

.tp-years-row.is-growth .tp-years-label {
  color: var(--night-mint);
}

.tp-years-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.tp-year {
  margin: 0;
}

.tp-wall-year {
  grid-template-columns: repeat(26, 1fr);
  gap: 4px;
}

.tp-night .tp-wall > i {
  background: var(--night-cell);
}

.tp-night .tp-wall > i.is-dim { background: var(--night-dim); }
.tp-night .tp-wall > i.is-mint { background: var(--mint); }
.tp-night .tp-wall > i.is-coral { background: var(--coral); }
.tp-night .tp-wall > i.is-sun { background: var(--sun); }
.tp-night .tp-wall > i.is-cobalt { background: var(--cobalt); }
.tp-night .tp-wall.is-waiting > i { background: var(--night-cell); }

.tp-year figcaption {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--night-muted);
}

.tp-year figcaption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--night-text);
}

.tp-curve {
  margin: 48px 0 0;
  padding-top: 40px;
  border-top: 1px solid var(--night-2);
}

.tp-curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 800;
}

.tp-curve-legend span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tp-curve-legend i {
  width: 24px;
  height: 4px;
  border-radius: 4px;
}

.tp-curve-legend .is-growth { color: var(--night-mint); }
.tp-curve-legend .is-growth i { background: var(--night-mint); }
.tp-curve-legend .is-entropy { color: var(--night-coral); }
.tp-curve-legend .is-entropy i { background: var(--night-coral); }
.tp-curve-legend .is-noise { color: var(--night-muted); }
.tp-curve-legend .is-noise i {
  height: 0;
  border-top: 2px dashed var(--night-muted);
  background: transparent;
}

.tp-curve-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tp-stop-mint { stop-color: var(--night-mint); }
.tp-hatch-line { stroke: var(--night-dim); stroke-opacity: 0.42; }
.tp-curve-base { stroke: var(--night-dim); }
.tp-curve-guide { stroke: var(--night-2); }
.tp-curve-ceiling { stroke: var(--night-dim); }
.tp-curve-noise { stroke: var(--night-muted); stroke-opacity: 0.7; }
.tp-curve-entropy { stroke: var(--night-coral); }
.tp-curve-growth { stroke: var(--night-mint); }
.tp-gap-highlight { stroke: var(--sun); stroke-opacity: 0.7; }
.tp-dot-coral { fill: var(--night); stroke: var(--night-coral); stroke-width: 2.5; }
.tp-dot-mint { fill: var(--night); stroke: var(--night-mint); stroke-width: 3; }

.tp-curve-svg text {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
}

.tp-svg-muted { fill: var(--night-muted); }
.tp-svg-noise { fill: var(--night-muted); }
.tp-svg-mint { fill: var(--night-mint); }
.tp-svg-coral { fill: var(--night-coral); }

.tp-curve-axis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--night-2);
  font-size: 13px;
  color: var(--night-muted);
}

.tp-curve-axis span {
  display: flex;
  justify-content: flex-end;
}

.tp-curve-axis span:first-child {
  justify-content: space-between;
}

.tp-curve-axis em,
.tp-curve-axis b {
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.tp-curve-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.tp-curve-insights > div {
  padding-top: 16px;
  border-top: 3px solid var(--night-dim);
  display: grid;
  align-content: start;
  gap: 8px;
}

.tp-curve-insights > div.is-entropy {
  border-top-color: var(--night-coral);
}

.tp-curve-insights > div.is-growth {
  border-top-color: var(--night-mint);
}

.tp-curve-insights strong {
  font-size: 15px;
  font-weight: 900;
  color: var(--night-text);
}

.tp-curve-insights > div.is-entropy strong {
  color: var(--night-coral);
}

.tp-curve-insights > div.is-growth strong {
  color: var(--night-mint);
}

.tp-curve-insights p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--night-muted);
}

.tp-curve-growth,
.tp-curve-entropy,
.tp-curve-noise {
  stroke-dasharray: 2600;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s var(--ease-out);
}

.tp-curve-noise {
  stroke-dasharray: 6 6;
}

.tp-curve-growth-area {
  opacity: 1;
  transition: opacity 1.2s var(--ease-out);
}

.tp-curve.is-waiting .tp-curve-growth,
.tp-curve.is-waiting .tp-curve-entropy {
  stroke-dashoffset: 2600;
}

.tp-curve.is-waiting .tp-curve-growth-area {
  opacity: 0;
}

/* Try */
.tp-try {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 48px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.tp-try-copy .tp-lead {
  margin-top: 20px;
}

.tp-try-bridge {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper-2);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.tp-try-bridge strong {
  color: var(--ink);
  font-weight: 800;
}

.tp-try-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.tp-try-copy .tp-text-link {
  display: inline-block;
}

.tp-toast {
  font-size: 14px;
  font-weight: 800;
  color: var(--mint-ink);
}

.tp-prompt {
  padding: 32px;
  border-radius: 24px;
  background: var(--sun-soft);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-line;
  word-break: break-word;
}

.tp-prompt mark {
  padding: 0 8px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--coral-ink);
  font-weight: 800;
}

/* Versions & 3-Engine Shelf */
.tp-versions {
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--stone);
}

.tp-versions-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 48px;
}

.tp-engines {
  margin-bottom: 48px;
}

.tp-engines-head {
  margin-bottom: 24px;
}

.tp-engines-head p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ink-3);
}

.tp-engine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.tp-engine {
  padding: 28px;
  border-radius: 24px;
  background: var(--paper-2);
  border: 1px solid var(--stone-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tp-engine h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--ink);
}

.tp-engine dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.tp-engine dl > div {
  display: grid;
  gap: 4px;
}

.tp-engine dt {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}

.tp-engine dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.tp-engine dl > div:last-child dd {
  color: var(--ink);
  font-weight: 700;
}

.tp-version-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tp-version {
  display: flex;
  flex-direction: column;
  padding: 36px;
  border-radius: 28px;
}

.tp-version.is-open {
  background: var(--paper-2);
  border: 1px solid var(--stone-2);
}

.tp-version.is-member {
  background: var(--night);
  color: var(--night-text);
  border: 1px solid var(--night-dim);
}

.tp-version-art {
  margin: 0 0 28px;
}

.tp-wall-mini {
  grid-template-columns: repeat(30, 1fr);
  gap: 4px;
}

.tp-version-art figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}

.is-member .tp-version-art figcaption {
  color: var(--night-muted);
}

.tp-version.is-member .tp-wall-mini > i {
  background: var(--night-cell);
}

.tp-version.is-member .tp-wall-mini > i.is-mint { background: var(--mint); }
.tp-version.is-member .tp-wall-mini > i.is-sun { background: var(--sun); }
.tp-version.is-member .tp-wall-mini > i.is-coral { background: var(--coral); }
.tp-version.is-member .tp-wall-mini > i.is-cobalt { background: var(--cobalt); }

.tp-version-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tp-tag {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.is-open .tp-tag {
  background: var(--mint-soft);
  color: var(--mint-ink);
}

.is-member .tp-tag {
  background: var(--sun);
  color: var(--ink);
}

.tp-version-fit {
  margin: 14px 0 16px;
  font-size: 16px;
  line-height: 1.68;
  color: var(--ink-2);
}

.is-member .tp-version-fit {
  color: var(--night-text);
}

.tp-version-suit {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--stone);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.tp-version-suit strong {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--mint-soft);
  color: var(--mint-ink);
  font-size: 12px;
  font-weight: 900;
  vertical-align: 1px;
}

.is-member .tp-version-suit {
  background: var(--night-2);
  border-color: var(--night-dim);
  color: var(--night-muted);
}

.is-member .tp-version-suit strong {
  background: #ffc21a26;
  color: var(--sun);
}

.tp-agent-dock {
  margin: 0 0 22px;
  padding: 14px 16px 16px;
  border-radius: 16px;
  background: var(--night-2);
  border: 1px solid var(--night-dim);
}

.tp-agent-dock-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 12px;
}

.tp-agent-dock-head span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--night-text);
}

.tp-agent-dock-head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--sun);
}

.tp-agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tp-agent-tile {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -2px #00000066, inset 0 0 0 1px #ffffff1f;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.tp-agent-tile img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.tp-agent-tile::after {
  content: attr(data-agent-name);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 16px -4px #00000080;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  z-index: 4;
}

.tp-agent-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed var(--night-dim);
  font-size: 12px;
  font-weight: 800;
  color: var(--night-muted);
}

@media (hover: hover) and (pointer: fine) {
  .tp-agent-tile:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 20px -4px #00000099, inset 0 0 0 1px #ffffff40;
  }

  .tp-agent-tile:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 720px) {
  .tp-agent-list {
    gap: 8px;
  }

  .tp-agent-tile {
    width: 36px;
    height: 36px;
    border-radius: 8.5px;
  }

  .tp-agent-tile img {
    border-radius: 8.5px;
  }

  .tp-agent-more {
    height: 36px;
    padding: 0 10px;
    border-radius: 8.5px;
  }
}

.tp-check {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}

.tp-check li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.tp-check li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--mint);
  transform: translateY(1px);
}

.is-member .tp-check li::before {
  background: var(--sun);
}

.tp-version-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--stone-2);
  display: grid;
  gap: 14px;
}

.is-member .tp-version-foot {
  border-top-color: var(--night-2);
}

.tp-version-note {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
}

.is-member .tp-version-note {
  color: var(--night-muted);
}

.tp-compare-wrap {
  margin-top: 64px;
}

.tp-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.tp-compare caption {
  margin-bottom: 20px;
  text-align: left;
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.tp-compare th,
.tp-compare td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--stone);
  text-align: left;
  vertical-align: top;
}

.tp-compare thead th {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-3);
  border-bottom: 2px solid var(--ink);
}

.tp-compare tbody th {
  font-weight: 800;
  color: var(--ink);
  width: 22%;
}

.tp-compare td {
  color: var(--ink-3);
}

.tp-compare td:last-child {
  color: var(--ink);
  font-weight: 700;
}

.tp-steps-block {
  margin-top: 64px;
}

.tp-steps-block .tp-h3 {
  margin-bottom: 24px;
}

.tp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}

.tp-steps li {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 20px;
  border-top: 4px solid var(--ink);
}

.tp-steps li::before {
  content: counter(step);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 900;
  color: var(--cobalt-ink);
}

.tp-steps strong {
  font-size: 17px;
  font-weight: 900;
}

.tp-steps span {
  font-size: 14px;
  color: var(--ink-3);
}

/* FAQ */
.tp-faq {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--stone);
}

.tp-faq-list details {
  border-top: 1px solid var(--stone);
}

.tp-faq-list details:last-child {
  border-bottom: 1px solid var(--stone);
}

.tp-faq-list summary {
  position: relative;
  padding: 24px 48px 24px 0;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.tp-faq-list summary::-webkit-details-marker {
  display: none;
}

.tp-faq-list summary::before,
.tp-faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease-out);
}

.tp-faq-list summary::after {
  transform: rotate(90deg);
}

.tp-faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.tp-faq-list details p {
  margin: 0 0 24px;
  max-width: 42em;
  font-size: 16px;
  color: var(--ink-2);
}

.tp-faq-list a {
  color: var(--cobalt-ink);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Close */
.tp-close {
  padding-top: 64px;
  padding-bottom: 80px;
  border-top: 1px solid var(--stone);
}

.tp-wall-close {
  grid-template-columns: repeat(52, 1fr);
  margin-bottom: 36px;
}

.tp-close-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Footer */
.tp-footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--stone);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.footer-main p {
  margin: 0;
  max-width: 42em;
  font-size: 14px;
  color: var(--ink-3);
}

.footer-main > span {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--ink-3);
}

.footer-links button,
.footer-links a {
  min-height: 40px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dialogs & Modals */
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: 88dvh;
  overflow-y: auto;
  padding: 32px;
  border: 0;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 64px -16px var(--shadow);
}

dialog::backdrop {
  background: var(--scrim);
}

.apply-dialog {
  width: min(520px, calc(100% - 32px));
}

.apply-dialog[data-claimed="true"] #apply-title {
  display: none;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 24px;
}

#apply-title {
  margin: 0 48px 12px 0;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--ink);
}

.form-intro {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.f-field {
  margin-bottom: 16px;
}

.f-consult-fields {
  display: grid;
}

.contact-label,
.modal-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.lead-form input[type="text"],
#lead-modal textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--stone-2);
  background: var(--paper-2);
  color: var(--ink);
  font-size: 16px;
}

.lead-form input[type="text"]::placeholder,
#lead-modal textarea::placeholder {
  color: var(--ink-3);
}

.lead-form input[aria-invalid="true"] {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.contact-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

.f-consent-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 16px 0 20px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  cursor: pointer;
}

.consent input {
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--cobalt);
  flex-shrink: 0;
}

.f-privacy-btn {
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  color: var(--cobalt-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--coral-soft);
  color: var(--coral-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.apply-dialog .submit,
.modal-action {
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 800;
}

.apply-dialog[data-mode="consult"] .submit {
  background: var(--sun);
  color: var(--ink);
}

.apply-dialog .submit:hover,
.modal-action:hover {
  background: var(--cobalt);
  color: var(--paper);
}

.submit-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* Success Panel */
.success-panel {
  text-align: left;
}

.success-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.success-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--mint-soft);
  color: var(--mint-ink);
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

.success-panel h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}

.success-panel > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.receipt-number {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.receipt-number strong {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  color: var(--ink);
}

.receipt-downloads {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.receipt-downloads a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--stone-2);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.receipt-downloads a:hover {
  background: var(--mint-soft);
  border-color: var(--mint);
}

.upgrade-bridge {
  margin: 16px 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--night);
  color: var(--night-text);
}

.upgrade-bridge p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--night-muted);
}

.tp-upgrade-btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--sun);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.tp-upgrade-btn:hover {
  background: var(--paper);
}

.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--stone);
}

.receipt-actions button {
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.receipt-actions button:hover {
  color: var(--ink);
}

.receipt-feedback {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--mint-ink);
}

.receipt-feedback:empty {
  display: none;
}

.lead-success small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* Legal & Withdrawal Modal */
.modal-kicker {
  margin: 0 48px 12px 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
}

#lead-modal h2 {
  margin: 0 48px 16px 0;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--ink);
}

#lead-modal h3 {
  margin: 20px 0 8px;
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
}

#lead-modal p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}

#lead-modal p + p {
  margin-top: 12px;
}

#lead-modal a {
  color: var(--cobalt-ink);
  font-weight: 800;
  text-decoration: underline;
}

#lead-modal textarea {
  min-height: 120px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

#lead-modal .consent {
  margin-bottom: 16px;
}

.modal-receipt-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.modal-receipt-switch button {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--stone-2);
  background: var(--paper-2);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--stone);
  font-size: 13px;
  color: var(--ink-3);
}

.withdraw-result {
  margin-top: 12px;
  font-weight: 800;
  color: var(--mint-ink);
}

/* Short-height desktop laptops (e.g., 1280x720 at Windows 150% scaling) */
@media (max-height: 800px) and (min-width: 721px) {
  .tp-nav-inner {
    height: 52px;
  }

  .tp-hero {
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .tp-hero-title {
    font-size: clamp(26px, 3.1vw, 40px);
    line-height: 1.22;
  }

  .tp-hero-wall {
    margin-top: 16px;
  }

  .tp-months {
    margin-bottom: 4px;
  }

  .tp-legend {
    margin-top: 8px;
  }

  .tp-hero-foot {
    margin-top: 16px;
    padding-top: 16px;
  }

  .tp-btn {
    min-height: 48px;
  }
}

/* Tablet & narrow desktop */
@media (max-width: 1000px) {
  .tp-nav-links {
    display: none;
  }

  .tp-nav-cta {
    margin-left: auto;
  }

  .tp-what-head,
  .tp-night-head,
  .tp-versions-head,
  .tp-try,
  .tp-faq,
  .tp-proof-grid,
  .tp-engine-grid,
  .tp-version-grid,
  .tp-curve-insights {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tp-what-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tp-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tp-hero-foot {
    grid-template-columns: 1fr;
  }
}

/* Mobile (390px) */
@media (max-width: 720px) {
  body.tp .wrap {
    width: calc(100% - 40px);
  }

  .tp-nav-inner {
    height: 56px;
  }

  .tp-hero {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .tp-hero-title {
    font-size: clamp(24px, 6.4vw, 28px);
    line-height: 1.28;
  }

  .tp-hero-title .tp-clause {
    display: block;
  }

  .tp-hero-title .tp-hero-sent + .tp-hero-sent {
    margin-top: 8px;
  }

  .tp-hero-sun {
    padding: 0 8px 2px;
  }

  .tp-hero-sun::before {
    border-radius: 8px;
  }

  .tp-hero-wall {
    margin-top: 16px;
  }

  .tp-months {
    display: none;
  }

  /* Preserve left-to-right column progression across 26 even weeks x 7 days = 182 cells */
  .tp-wall[data-wall="hero"] {
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
    grid-template-columns: repeat(26, 1fr);
    gap: 4px;
  }

  .tp-wall[data-wall="hero"] > i.is-odd-week {
    display: none;
  }

  .tp-wall-ends {
    font-size: 12px;
  }

  .tp-wall-ends strong {
    font-size: 14px;
  }

  .tp-legend {
    gap: 4px 16px;
    margin-top: 8px;
    font-size: 12px;
  }

  .tp-legend em {
    margin-left: 0;
  }

  .tp-hero-foot {
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
  }

  .tp-manifesto {
    font-size: 18px;
  }

  .tp-hero-sub {
    font-size: 14px;
  }

  .tp-hero-actions {
    width: 100%;
    gap: 8px;
  }

  .tp-hero-actions .tp-btn {
    width: 100%;
    min-height: 48px;
  }

  .tp-what,
  .tp-night,
  .tp-try,
  .tp-versions,
  .tp-faq {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .tp-h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .tp-what-body h3 {
    font-size: 20px;
  }

  .tp-proof-card,
  .tp-engine,
  .tp-version,
  .tp-prompt {
    padding: 24px;
  }

  .tp-night {
    padding: 64px 20px;
  }

  .tp-night .wrap {
    width: 100%;
  }

  /* Mobile Year Tabs: compare entropy vs ThinkPair for selected year on one screen */
  .tp-night-head {
    margin-bottom: 28px;
  }

  .tp-year-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }

  .tp-year-tabs button {
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--night-dim);
    background: var(--night-2);
    color: var(--night-muted);
    font-size: 14px;
    font-weight: 800;
  }

  .tp-year-tabs button.is-active {
    background: var(--sun);
    border-color: var(--sun);
    color: var(--ink);
  }

  .tp-years-row {
    padding: 24px 0;
  }

  .tp-years-label {
    margin-bottom: 16px;
    font-size: 16px;
  }

  .tp-years-grid {
    grid-template-columns: 1fr;
  }

  .tp-night[data-mobile-year="1"] .tp-year:not([data-year-index="1"]),
  .tp-night[data-mobile-year="2"] .tp-year:not([data-year-index="2"]),
  .tp-night[data-mobile-year="3"] .tp-year:not([data-year-index="3"]) {
    display: none;
  }

  .tp-svg-desktop {
    display: none;
  }

  .tp-curve-legend {
    flex-direction: column;
    font-size: 13px;
  }

  /* Mobile comparison table: stacked 2-column comparison cards per question */
  .tp-compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .tp-compare,
  .tp-compare caption,
  .tp-compare tbody {
    display: block;
    width: 100%;
  }

  .tp-compare tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 0;
    border-bottom: 1px solid var(--stone);
  }

  .tp-compare tbody th {
    grid-column: 1 / -1;
    width: auto;
    padding: 0 0 4px;
    border: 0;
    font-size: 16px;
  }

  .tp-compare tbody td {
    display: block;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: var(--paper-2);
    font-size: 13px;
    line-height: 1.6;
  }

  .tp-compare tbody td:last-child {
    background: var(--night);
    color: var(--night-text);
  }

  .tp-compare tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 900;
    color: var(--ink-3);
  }

  .tp-compare tbody td:last-child::before {
    color: var(--sun);
  }

  .tp-version-name {
    font-size: 24px;
  }

  .tp-steps {
    grid-template-columns: 1fr;
  }

  .tp-wall-close {
    grid-template-columns: repeat(26, 1fr);
    gap: 4px;
  }

  .tp-wall-close > i:nth-child(n + 183) {
    display: none;
  }

  .footer-main > span {
    margin-left: 0;
  }

  dialog {
    padding: 24px;
  }
}

.tp-record-list code {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--paper-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.tp-night .tp-wall > i.is-spark-mint { background: var(--mint); }
.tp-night .tp-wall > i.is-spark-coral { background: var(--coral); }
.tp-night .tp-wall > i.is-spark-sun { background: var(--sun); }
.tp-night .tp-wall > i.is-spark-cobalt { background: var(--cobalt); }
.tp-version.is-member .tp-wall-mini > i.is-spark-mint { background: var(--mint); }
.tp-version.is-member .tp-wall-mini > i.is-spark-coral { background: var(--coral); }
.tp-version.is-member .tp-wall-mini > i.is-spark-sun { background: var(--sun); }
.tp-version.is-member .tp-wall-mini > i.is-spark-cobalt { background: var(--cobalt); }

/* Pointer-reactive dopamine spotlight cards (desktop fine pointer only) */
@media (hover: hover) and (pointer: fine) {
  [data-spot] {
    position: relative;
    isolation: isolate;
    --spot-color: var(--mint);
    transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  }

  [data-spot="coral"] { --spot-color: var(--coral); }
  [data-spot="sun"] { --spot-color: var(--sun); }
  [data-spot="cobalt"] { --spot-color: var(--cobalt); }

  .tp-what-row[data-spot] {
    padding-inline: 20px;
    margin-inline: -20px;
    border-radius: 20px;
  }

  [data-spot]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    background: radial-gradient(
      360px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--spot-color) 16%, transparent),
      transparent 72%
    );
    transition: opacity 0.28s var(--ease-out);
  }

  .tp-version.is-member[data-spot]::after {
    background: radial-gradient(
      420px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--sun) 20%, transparent),
      color-mix(in srgb, var(--cobalt) 10%, transparent) 42%,
      transparent 74%
    );
  }

  [data-spot]:hover::after {
    opacity: 1;
  }

  .tp-proof-card[data-spot]:hover,
  .tp-engine[data-spot]:hover,
  .tp-version[data-spot]:hover {
    border-color: color-mix(in srgb, var(--spot-color) 68%, var(--stone-2));
    transform: translateY(-2px);
  }

  .tp-version.is-member[data-spot]:hover {
    border-color: color-mix(in srgb, var(--sun) 76%, var(--night-dim));
  }
}

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

  .tp-wall > i,
  .tp-btn,
  .tp-curve-growth,
  .tp-curve-entropy,
  .tp-faq-list summary::after,
  .tp-hero-strike::after,
  .tp-hero-mint,
  .tp-hero-sun::before {
    transition: none !important;
    animation: none !important;
  }

  .tp-wall.is-waiting > i {
    transform: none;
  }

  .tp-btn:hover {
    transform: none;
  }
}

.tp-no-motion *,
.tp-no-motion *::before,
.tp-no-motion *::after {
  transition: none !important;
  animation: none !important;
}

.free-api-handoff {
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.free-api-handoff[hidden] {
  display: none;
}

.free-api-handoff-box {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stone-2);
  background: var(--paper-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.58;
  resize: vertical;
}

.tp-custom-strip {
  margin-top: 24px;
  padding: 28px 32px;
  border-radius: 24px;
  border: 1.5px solid var(--stone-2);
  background: var(--paper-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tp-custom-copy {
  flex: 1 1 520px;
  display: grid;
  gap: 8px;
}

.tp-custom-copy .tp-tag {
  justify-self: start;
}

.tp-custom-copy .tp-h3 {
  margin: 0;
}

.tp-custom-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}

.tp-custom-action {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .tp-custom-strip {
    padding: 22px 20px;
  }
  .tp-custom-action,
  .tp-custom-action .tp-btn {
    width: 100%;
  }
}
