/*
  Tap Tap: components
  Built only from tokens.css. Load tokens.css first.
*/

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--tt-snow);
  color: var(--tt-ink);
  font-family: var(--tt-font-body);
  font-size: var(--tt-size-body);
  font-weight: 700;
  line-height: var(--tt-leading-body);
  overflow-x: clip;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--tt-sky); text-decoration: none; }
a:hover { color: var(--tt-sky-deep); }

h1, h2, h3, h4 {
  font-family: var(--tt-font-display);
  font-weight: 800;
  line-height: var(--tt-leading-tight);
  color: var(--tt-ink);
  margin: 0 0 var(--tt-space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--tt-size-h1); }
h2 { font-size: var(--tt-size-h2); }
h3 { font-size: var(--tt-size-h3); }
p { margin: 0 0 var(--tt-space-4); }
.tt-split h2 { font-size: var(--tt-size-h1); color: var(--tt-leaf); }

/* ---------- Layout ---------- */
.tt-wrap { width: 100%; max-width: var(--tt-max); margin: 0 auto; padding: 0 var(--tt-space-5); }
.tt-read { max-width: var(--tt-max-read); margin: 0 auto; padding: 0 var(--tt-space-5); }
.tt-section { padding: var(--tt-space-8) 0; }
.tt-section--cloud { background: var(--tt-cloud); }
.tt-center { text-align: center; }
.tt-rule { border: 0; border-top: var(--tt-border) solid var(--tt-line); margin: 0; }

/* ---------- Labels and text ---------- */
.tt-label {
  display: inline-block;
  font-family: var(--tt-font-body);
  font-size: var(--tt-size-label);
  font-weight: 900;
  letter-spacing: var(--tt-track-label);
  text-transform: uppercase;
  color: var(--tt-mute);
}
.tt-label--leaf { color: var(--tt-leaf-deep); }
.tt-label--sky { color: var(--tt-sky); }
.tt-lead { font-size: var(--tt-size-lead); color: var(--tt-mute); font-weight: 700; }
.tt-mute { color: var(--tt-mute); }
.tt-hl { color: var(--tt-leaf); }

/* ---------- Buttons: the signature pressed edge ---------- */
.tt-btn {
  --tt-btn-bg: var(--tt-leaf);
  --tt-btn-edge: var(--tt-leaf-deep);
  --tt-btn-text: var(--tt-snow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tt-space-2);
  min-height: 50px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--tt-radius);
  background: var(--tt-btn-bg);
  color: var(--tt-btn-text);
  box-shadow: 0 var(--tt-edge) 0 var(--tt-btn-edge);
  font-family: var(--tt-font-body);
  font-size: var(--tt-size-small);
  font-weight: 900;
  letter-spacing: var(--tt-track-label);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--tt-press), box-shadow var(--tt-press), filter var(--tt-press);
  margin-bottom: var(--tt-edge);
}
.tt-btn:hover { color: var(--tt-btn-text); filter: brightness(1.06); }
.tt-btn:active { transform: translateY(var(--tt-edge)); box-shadow: 0 0 0 var(--tt-btn-edge); }
.tt-btn:focus-visible { outline: 3px solid var(--tt-sky); outline-offset: 3px; }
.tt-btn--sky { --tt-btn-bg: var(--tt-sky); --tt-btn-edge: var(--tt-sky-deep); }
.tt-btn--sun { --tt-btn-bg: var(--tt-sun); --tt-btn-edge: var(--tt-sun-deep); --tt-btn-text: var(--tt-ink); }
.tt-btn--coral { --tt-btn-bg: var(--tt-coral); --tt-btn-edge: var(--tt-coral-deep); }
.tt-btn--ghost {
  --tt-btn-bg: var(--tt-snow);
  --tt-btn-edge: var(--tt-line);
  --tt-btn-text: var(--tt-sky);
  border: var(--tt-border) solid var(--tt-line);
}
.tt-btn--ghost:hover { --tt-btn-bg: var(--tt-cloud); }
.tt-btn--block { display: flex; width: 100%; }
.tt-btn--sm { min-height: 40px; padding: 8px 18px; font-size: var(--tt-size-label); border-radius: var(--tt-radius-sm); }

/* ---------- Nav ---------- */
.tt-nav { border-bottom: var(--tt-border) solid var(--tt-line); background: var(--tt-snow); }
.tt-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--tt-space-4); min-height: 76px; }
.tt-logo {
  display: inline-flex; align-items: center; gap: var(--tt-space-2);
  font-family: var(--tt-font-display); font-weight: 800; font-size: 1.7rem;
  color: var(--tt-leaf); letter-spacing: -0.02em; line-height: 1;
}
.tt-logo:hover { color: var(--tt-leaf-deep); }
.tt-logo svg { width: 34px; height: 34px; }
.tt-nav__links { display: flex; align-items: center; gap: var(--tt-space-5); }
.tt-nav__link {
  font-size: var(--tt-size-label); font-weight: 900; letter-spacing: var(--tt-track-label);
  text-transform: uppercase; color: var(--tt-mute);
}
.tt-nav__link:hover, .tt-nav__link.is-active { color: var(--tt-leaf-deep); }
@media (max-width: 760px) { .tt-nav__links .tt-nav__link { display: none; } }

/* ---------- Hero ---------- */
.tt-hero { padding: var(--tt-space-8) 0; }
.tt-hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tt-space-7); align-items: center; }
.tt-hero__title { font-size: var(--tt-size-hero); margin-bottom: var(--tt-space-5); }
.tt-hero__actions { display: flex; flex-direction: column; gap: var(--tt-space-3); max-width: 340px; }
@media (max-width: 860px) {
  .tt-hero__grid { grid-template-columns: 1fr; text-align: center; }
  .tt-hero__actions { margin: 0 auto; width: 100%; }
}

/* ---------- Tilted phone drawn in CSS ---------- */
.tt-phone {
  position: relative;
  width: min(250px, 70vw);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  transform: rotate(-9deg);
  border-radius: 34px;
  background: var(--tt-snow);
  border: 6px solid var(--tt-leaf-soft);
  box-shadow: -14px 14px 0 var(--tt-leaf), -14px 14px 0 2px var(--tt-leaf-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--tt-space-4);
  padding: var(--tt-space-5);
}
.tt-phone__bar { width: 100%; }

/* ---------- Cards: thick bottom border ---------- */
.tt-card {
  background: var(--tt-snow);
  border: var(--tt-border) solid var(--tt-line);
  border-bottom-width: var(--tt-edge-card);
  border-radius: var(--tt-radius-lg);
  padding: var(--tt-space-5);
}
.tt-card--leaf { background: var(--tt-leaf-soft); border-color: var(--tt-leaf); }
.tt-card--sky { background: var(--tt-sky-soft); border-color: var(--tt-sky); }
.tt-card__icon {
  width: 56px; height: 56px; border-radius: var(--tt-radius);
  display: grid; place-items: center; margin-bottom: var(--tt-space-4);
  background: var(--tt-leaf); box-shadow: 0 var(--tt-edge) 0 var(--tt-leaf-deep);
}
.tt-card__icon--sky { background: var(--tt-sky); box-shadow: 0 var(--tt-edge) 0 var(--tt-sky-deep); }
.tt-card__icon--sun { background: var(--tt-sun); box-shadow: 0 var(--tt-edge) 0 var(--tt-sun-deep); }
.tt-card__icon--grape { background: var(--tt-grape); box-shadow: 0 var(--tt-edge) 0 var(--tt-grape-deep); }
.tt-card__icon svg { width: 28px; height: 28px; }
.tt-grid { display: grid; gap: var(--tt-space-5); }
.tt-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tt-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .tt-grid--3, .tt-grid--2 { grid-template-columns: 1fr; } }

/* ---------- Split feature rows ---------- */
.tt-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tt-space-7); align-items: center; }
.tt-split + .tt-split { margin-top: var(--tt-space-8); }
.tt-split--flip > :first-child { order: 2; }
@media (max-width: 860px) {
  .tt-split { grid-template-columns: 1fr; text-align: center; }
  .tt-split--flip > :first-child { order: 0; }
}

/* ---------- Badges, chips, streaks ---------- */
.tt-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--tt-radius-pill);
  font-size: var(--tt-size-label); font-weight: 900; letter-spacing: var(--tt-track-label); text-transform: uppercase;
  background: var(--tt-leaf-soft); color: var(--tt-leaf-deep);
  white-space: nowrap;
}
.tt-badge--sky { background: var(--tt-sky-soft); color: var(--tt-sky-deep); }
.tt-badge--sun { background: var(--tt-sun); color: var(--tt-ink); }
.tt-streak {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--tt-font-display); font-weight: 800; font-size: 1.2rem; color: var(--tt-sun-deep);
}
.tt-streak svg { width: 22px; height: 22px; }

/* ---------- Progress bar ---------- */
.tt-progress {
  height: 18px; border-radius: var(--tt-radius-pill);
  background: var(--tt-line); overflow: hidden; position: relative;
}
.tt-progress__fill {
  height: 100%; border-radius: var(--tt-radius-pill); background: var(--tt-leaf);
  position: relative;
}
.tt-progress__fill::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 4px; height: 5px;
  border-radius: var(--tt-radius-pill); background: var(--tt-snow); opacity: 0.35;
}
.tt-progress--sun .tt-progress__fill { background: var(--tt-sun); }

/* ---------- Path of round step buttons ---------- */
.tt-path { display: flex; flex-direction: column; align-items: center; gap: var(--tt-space-4); }
.tt-step {
  width: 68px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tt-leaf); box-shadow: 0 6px 0 var(--tt-leaf-deep);
}
.tt-step svg { width: 30px; height: 30px; }
.tt-step--locked { background: var(--tt-line); box-shadow: 0 6px 0 var(--tt-line-deep); }
.tt-step--sun { background: var(--tt-sun); box-shadow: 0 6px 0 var(--tt-sun-deep); }
.tt-step:nth-child(2) { transform: translateX(-40px); }
.tt-step:nth-child(3) { transform: translateX(-56px); }
.tt-step:nth-child(4) { transform: translateX(-24px); }
.tt-step:nth-child(5) { transform: translateX(28px); }

/* ---------- Stats ---------- */
.tt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tt-space-5); text-align: center; }
.tt-stat__num { font-family: var(--tt-font-display); font-weight: 800; font-size: var(--tt-size-h1); line-height: 1; color: var(--tt-leaf); }
.tt-stat__label { color: var(--tt-mute); font-size: var(--tt-size-small); }
@media (max-width: 600px) { .tt-stats { grid-template-columns: 1fr; } }

/* ---------- Speech bubble ---------- */
.tt-bubble {
  position: relative; z-index: 2; display: inline-block;
  background: var(--tt-snow); border: var(--tt-border) solid var(--tt-line); border-radius: var(--tt-radius);
  padding: var(--tt-space-3) var(--tt-space-4); font-weight: 800;
}
.tt-bubble::after {
  content: ""; position: absolute; left: 24px; bottom: -9px; width: 14px; height: 14px;
  background: var(--tt-snow); border-right: var(--tt-border) solid var(--tt-line); border-bottom: var(--tt-border) solid var(--tt-line);
  transform: rotate(45deg);
}

/* ---------- Forms ---------- */
.tt-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--tt-space-4); text-align: left; }
.tt-field label { font-size: var(--tt-size-small); font-weight: 800; color: var(--tt-ink); }
.tt-input, .tt-select {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font-family: var(--tt-font-body); font-size: var(--tt-size-body); font-weight: 700; color: var(--tt-ink);
  background: var(--tt-cloud); border: var(--tt-border) solid var(--tt-line); border-radius: var(--tt-radius);
  outline: none; transition: border-color var(--tt-press), background var(--tt-press);
}
.tt-input::placeholder { color: var(--tt-faint); }
.tt-input:focus, .tt-select:focus { border-color: var(--tt-sky); background: var(--tt-snow); }
.tt-hint { font-size: var(--tt-size-label); color: var(--tt-mute); font-weight: 700; }
.tt-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tt-space-3); }
.tt-choice { position: relative; }
.tt-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tt-choice span {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: var(--tt-space-3); border-radius: var(--tt-radius);
  border: var(--tt-border) solid var(--tt-line); border-bottom-width: var(--tt-edge-card);
  font-size: var(--tt-size-small); font-weight: 800; background: var(--tt-snow);
}
.tt-choice span svg { width: 34px; height: 34px; }
.tt-choice input:checked + span { border-color: var(--tt-sky); background: var(--tt-sky-soft); color: var(--tt-sky-deep); }
.tt-choice input:focus-visible + span { outline: 3px solid var(--tt-sky); outline-offset: 2px; }
@media (max-width: 420px) { .tt-choices { grid-template-columns: 1fr; } .tt-choice span { flex-direction: row; } }
.tt-divider { display: flex; align-items: center; gap: var(--tt-space-3); color: var(--tt-faint); font-size: var(--tt-size-label); font-weight: 900; text-transform: uppercase; letter-spacing: var(--tt-track-label); margin: var(--tt-space-5) 0; }
.tt-divider::before, .tt-divider::after { content: ""; flex: 1; border-top: var(--tt-border) solid var(--tt-line); }

/* ---------- Pricing ---------- */
.tt-toggle { display: inline-flex; padding: 4px; background: var(--tt-cloud); border: var(--tt-border) solid var(--tt-line); border-radius: var(--tt-radius); gap: 4px; }
.tt-toggle button {
  border: 0; background: none; padding: 8px 16px; border-radius: var(--tt-radius-sm); cursor: pointer;
  font-family: var(--tt-font-body); font-weight: 900; font-size: var(--tt-size-label); letter-spacing: var(--tt-track-label); text-transform: uppercase; color: var(--tt-mute);
  white-space: nowrap;
}
.tt-toggle button.is-on { background: var(--tt-snow); color: var(--tt-sky); box-shadow: 0 2px 0 var(--tt-line-deep); }
.tt-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tt-space-5); align-items: start; }
@media (max-width: 900px) { .tt-plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }
.tt-plan { display: flex; flex-direction: column; gap: var(--tt-space-4); position: relative; }
.tt-plan--featured { border-color: var(--tt-leaf); box-shadow: 0 0 0 2px var(--tt-leaf-soft); }
.tt-plan__flag { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); }
.tt-plan__name { font-family: var(--tt-font-display); font-weight: 800; font-size: var(--tt-size-h3); margin: 0; }
.tt-plan__price { font-family: var(--tt-font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--tt-ink); }
.tt-plan__price small { font-family: var(--tt-font-body); font-size: var(--tt-size-small); color: var(--tt-mute); font-weight: 800; }
.tt-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--tt-space-3); }
.tt-checks li { display: flex; gap: var(--tt-space-3); align-items: flex-start; font-size: var(--tt-size-small); }
.tt-checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  background: var(--tt-leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.tt-checks li.is-off { color: var(--tt-faint); }
.tt-checks li.is-off::before { background: var(--tt-line); }

/* ---------- FAQ ---------- */
.tt-faq { display: flex; flex-direction: column; gap: var(--tt-space-3); }
.tt-faq details { border: var(--tt-border) solid var(--tt-line); border-bottom-width: var(--tt-edge-card); border-radius: var(--tt-radius); padding: var(--tt-space-4) var(--tt-space-5); background: var(--tt-snow); }
.tt-faq summary { cursor: pointer; font-weight: 900; list-style: none; display: flex; justify-content: space-between; gap: var(--tt-space-3); }
.tt-faq summary::-webkit-details-marker { display: none; }
.tt-faq summary::after { content: "+"; color: var(--tt-sky); font-size: 1.3rem; line-height: 1; }
.tt-faq details[open] summary::after { content: "\2212"; }
.tt-faq details p { margin: var(--tt-space-3) 0 0; color: var(--tt-mute); }

/* ---------- Article ---------- */
.tt-article__head { padding: var(--tt-space-8) 0 var(--tt-space-6); text-align: center; }
.tt-article__title { font-size: var(--tt-size-h1); }
.tt-byline { display: inline-flex; align-items: center; gap: var(--tt-space-3); color: var(--tt-mute); font-size: var(--tt-size-small); }
.tt-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--tt-font-display); font-weight: 800; color: var(--tt-snow); background: var(--tt-grape); box-shadow: 0 3px 0 var(--tt-grape-deep); }
.tt-prose { font-weight: 600; font-size: 1.1rem; line-height: 1.75; }
.tt-prose h2 { font-size: var(--tt-size-h2); margin-top: var(--tt-space-7); }
.tt-prose h3 { font-size: var(--tt-size-h3); margin-top: var(--tt-space-6); }
.tt-prose strong { font-weight: 900; }
.tt-prose ul, .tt-prose ol { padding-left: 1.3em; margin: 0 0 var(--tt-space-4); }
.tt-prose li { margin-bottom: var(--tt-space-2); }
.tt-prose li::marker { color: var(--tt-leaf); font-weight: 900; }
.tt-tip {
  display: flex; gap: var(--tt-space-4); align-items: flex-start;
  margin: var(--tt-space-6) 0; padding: var(--tt-space-5);
  background: var(--tt-sky-soft); border: var(--tt-border) solid var(--tt-sky); border-bottom-width: var(--tt-edge-card); border-radius: var(--tt-radius-lg);
}
.tt-tip svg { flex: none; width: 48px; height: 48px; }
.tt-tip p:last-child { margin: 0; }
.tt-figure {
  margin: var(--tt-space-6) 0; padding: var(--tt-space-6); border-radius: var(--tt-radius-lg);
  background: var(--tt-cloud); border: var(--tt-border) solid var(--tt-line); border-bottom-width: var(--tt-edge-card);
}
.tt-figure figcaption { margin-top: var(--tt-space-4); font-size: var(--tt-size-small); color: var(--tt-mute); text-align: center; }

/* ---------- CTA band ---------- */
.tt-cta {
  background: var(--tt-leaf); color: var(--tt-snow); border-radius: var(--tt-radius-lg);
  box-shadow: 0 8px 0 var(--tt-leaf-deep);
  padding: var(--tt-space-7) var(--tt-space-5); text-align: center;
}
.tt-cta h2 { color: var(--tt-snow); font-size: var(--tt-size-h2); }
.tt-cta p { color: var(--tt-snow); opacity: 0.9; }
.tt-cta .tt-btn { --tt-btn-bg: var(--tt-snow); --tt-btn-edge: var(--tt-leaf-deep); --tt-btn-text: var(--tt-leaf-deep); }

/* ---------- Footer ---------- */
.tt-footer { background: var(--tt-leaf); color: var(--tt-snow); padding: var(--tt-space-8) 0 var(--tt-space-6); margin-top: var(--tt-space-8); }
.tt-footer__grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--tt-space-6); }
.tt-footer h4 { color: var(--tt-snow); font-family: var(--tt-font-body); font-weight: 900; font-size: var(--tt-size-small); letter-spacing: var(--tt-track-label); text-transform: uppercase; margin-bottom: var(--tt-space-3); }
.tt-footer a { display: block; color: var(--tt-snow); opacity: 0.85; padding: 3px 0; font-size: var(--tt-size-small); }
.tt-footer a:hover { opacity: 1; color: var(--tt-snow); }
.tt-footer a.tt-logo { color: var(--tt-snow); font-size: 1.7rem; opacity: 1; display: inline-flex; margin-bottom: var(--tt-space-3); }
.tt-footer__base { margin-top: var(--tt-space-7); padding-top: var(--tt-space-4); border-top: var(--tt-border) solid var(--tt-leaf-deep); font-size: var(--tt-size-label); opacity: 0.85; }
@media (max-width: 760px) { .tt-footer__grid { grid-template-columns: 1fr 1fr; } .tt-footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Fills for inline SVG drawings ---------- */
.tt-mascot { width: 100%; height: auto; }
.tt-f-leaf { fill: var(--tt-leaf); }
.tt-f-leafdeep { fill: var(--tt-leaf-deep); }
.tt-f-leafsoft { fill: var(--tt-leaf-soft); }
.tt-f-sky { fill: var(--tt-sky); }
.tt-f-sun { fill: var(--tt-sun); }
.tt-f-sundeep { fill: var(--tt-sun-deep); }
.tt-f-coral { fill: var(--tt-coral); }
.tt-f-grape { fill: var(--tt-grape); }
.tt-f-snow { fill: var(--tt-snow); }
.tt-f-ink { fill: var(--tt-ink); }
.tt-f-line { fill: var(--tt-line); }
.tt-s-ink { fill: none; stroke: var(--tt-ink); stroke-width: 4; stroke-linecap: round; }
.tt-s-snow { fill: none; stroke: var(--tt-snow); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
