/* =========================================================================
   TagTier landing — production styles
   Sections: tokens · reset · base · primitives · layout
             nav · hero · appmock · sections · features · steps
             demo · pricing · faq · support · footer · dialog · responsive
   ========================================================================= */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  --bg:           #FBF9F4;
  --bg-alt:       #F2EFE8;
  --card:         #FFFFFF;

  --ink:          #1F1D1A;
  --ink-70:       rgba(31,29,26,0.72);
  --ink-50:       rgba(31,29,26,0.50);
  --ink-30:       rgba(31,29,26,0.28);
  --rule:         rgba(31,29,26,0.10);

  --sage:         oklch(0.66 0.07 155);
  --sage-deep:    oklch(0.42 0.08 155);
  --sage-soft:    oklch(0.94 0.04 150);
  --apricot:      oklch(0.78 0.10 60);

  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display:      var(--sans);

  --container:    1200px;
  --container-narrow: 920px;
  --nav-h:        64px;

  --r-sm:  10px;
  --r:     14px;
  --r-md:  16px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-pill: 999px;

  --sh-sm:  0 1px 2px rgba(31,29,26,.04), 0 1px 3px rgba(31,29,26,.05);
  --sh:     0 4px 14px rgba(31,29,26,.06), 0 2px 4px rgba(31,29,26,.04);
  --sh-lg:  0 30px 80px -30px rgba(31,29,26,0.20), 0 0 0 1px var(--rule);

  --d:      200ms;
  --d-fast: 140ms;
  --ease:   cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 6px; }

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

/* ---------- Base type --------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); letter-spacing: -0.04em; line-height: 1.1; }
h1 { font-weight: 600; letter-spacing: -0.046em; }
h2 { font-weight: 600; letter-spacing: -0.032em; }
h3 { font-weight: 600; letter-spacing: -0.012em; }
p  { color: var(--ink-70); }

.text-accent { color: var(--sage-deep); }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 1000;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-sm);
  transition: top var(--d) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ------------------------------------------------------ */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: clamp(64px, 5vw + 36px, 96px);
}
.section--alt { background: var(--bg-alt); }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 3vw + 24px, 56px);
}
.section__title { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 2.75rem); }
.section__intro {
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-70);
  max-width: 560px;
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem; font-weight: 500;
  color: var(--sage-deep); letter-spacing: 0.012em;
  margin-bottom: 14px;
}

/* ---------- Primitives -------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78125rem; font-weight: 500;
  color: var(--ink); background: var(--card);
  padding: 6px 12px 6px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.badge--soft { color: var(--sage-deep); background: var(--sage-soft); border: 0; }
.badge__dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--sage); flex: 0 0 auto;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; line-height: 1;
  font-size: 0.9375rem; padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer; user-select: none; letter-spacing: -0.006em;
  transition: transform var(--d-fast) var(--ease),
              box-shadow var(--d) var(--ease),
              background-color var(--d) var(--ease),
              border-color var(--d) var(--ease),
              color var(--d) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm   { font-size: 0.84375rem; padding: 9px 16px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary:hover  { background: #2C2924; border-color: #2C2924; box-shadow: var(--sh); }
.btn--primary:focus-visible { outline-offset: 2px; }

.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink-30); box-shadow: var(--sh-sm); }

.btn--invert { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn--invert:hover { background: #fff; }

.link { color: var(--ink); transition: color var(--d) var(--ease); }
.link--muted { color: var(--ink-70); }
.link--muted:hover { color: var(--ink); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand__name { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.022em; }
.brand__mark { flex: 0 0 auto; }

.input {
  font-family: var(--sans);
  font-size: 0.875rem;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--d) var(--ease), box-shadow var(--d) var(--ease);
  width: 100%;
}
.input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.input::placeholder { color: var(--ink-50); }
textarea.input { resize: vertical; min-height: 120px; }

/* =========================================================================
   Navbar
   ========================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,244,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav__row {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  display: flex; align-items: center; gap: 28px;
  height: var(--nav-h);
}
.nav__links {
  display: flex; gap: 24px; margin-left: 16px;
  font-size: 0.875rem;
  color: var(--ink-70);
}
.nav__links a { transition: color var(--d) var(--ease); }
.nav__links a:hover { color: var(--ink); }

.nav__cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav__cta .link { font-size: 0.875rem; }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.75px; border-radius: 2px;
  background: var(--ink);
  transition: transform var(--d) var(--ease), opacity var(--d) var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column; gap: 4px;
  padding: 12px 24px 22px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
.nav__mobile a {
  padding: 12px 4px;
  font-size: 0.9375rem;
  color: var(--ink-70);
  border-bottom: 1px solid var(--rule);
}
.nav__mobile a:last-of-type { border-bottom: 0; }
.nav__mobile .btn { margin-top: 8px; justify-content: center; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}
.hero__halo {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; max-width: 110vw;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--sage-soft) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero__copy { max-width: 920px; margin: 0 auto; text-align: center; }

.hero__title {
  font-size: clamp(2.5rem, 1.4rem + 4.8vw, 4.5rem);
  line-height: 1.04;
  margin-top: 24px;
}
.hero__sub {
  font-family: var(--sans);
  font-size: 1rem; font-weight: 500;
  color: var(--sage-deep);
  margin-top: 16px;
  letter-spacing: -0.004em;
}
.hero__lead {
  font-size: 1.1875rem; line-height: 1.55;
  margin: 16px auto 0;
  max-width: 620px;
  color: var(--ink-70);
}
.hero__ctas {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px;
}
.hero__note {
  font-size: 0.8125rem;
  color: var(--ink-50);
  margin-top: 14px;
}

/* =========================================================================
   App mock
   ========================================================================= */
.appmock {
  max-width: 1100px;
  margin: 64px auto 0;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  margin-bottom: 96px;
}
.appmock__chrome {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-alt);
}
.appmock__dot { width: 11px; height: 11px; border-radius: 999px; }
.appmock__dot--r { background: #E8C8C2; }
.appmock__dot--y { background: #EFD9A8; }
.appmock__dot--g { background: #C8DDC4; }
.appmock__url {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 0.71875rem;
  color: var(--ink-50);
}

.appmock__body {
  display: grid;
  grid-template-columns: 220px 1fr;
}
.appmock__sidebar {
  padding: 20px;
  border-right: 1px solid var(--rule);
  background: var(--bg);
}
.appmock__brand {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-family: var(--sans); font-size: 0.875rem; font-weight: 600;
}
.appmock__nav { display: flex; flex-direction: column; gap: 2px; }
.appmock__nav li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84375rem;
  color: var(--ink-70);
}
.appmock__nav .is-active {
  background: var(--card);
  color: var(--ink); font-weight: 500;
}
.appmock__badge {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-50);
}

.appmock__main { padding: 28px; }
.appmock__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.appmock__head h3 {
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.018em;
}
.appmock__sub {
  font-size: 0.84375rem; color: var(--ink-50); margin-bottom: 20px;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 0.78125rem; font-weight: 500;
}
.pill--soft { background: var(--sage-soft); color: var(--sage-deep); }
.pill--soft .pill__dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--sage);
}
.pill--live {
  font-size: 0.71875rem; font-weight: 500;
  color: var(--sage-deep); background: var(--sage-soft);
  padding: 4px 10px;
}

.appmock__rules { display: flex; flex-direction: column; gap: 8px; }
.appmock__rules li {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 80px;
  gap: 16px; align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.rule__tag {
  display: block;
  font-family: var(--mono); font-size: 0.75rem;
  color: var(--sage-deep); margin-bottom: 2px;
}
.rule__label {
  display: block;
  font-size: 0.875rem; font-weight: 500; color: var(--ink);
}
.rule__tiers { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-70); }
.appmock__rules .pill--live { justify-self: end; }

.appmock__add {
  margin-top: 12px; width: 100%;
  padding: 12px 16px; border-radius: 12px;
  border: 1px dashed var(--ink-30);
  background: transparent;
  font-size: 0.84375rem; color: var(--ink-70);
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease), color var(--d) var(--ease);
}
.appmock__add:hover { background: var(--card); border-color: var(--ink-50); color: var(--ink); }

/* =========================================================================
   Cards / grids
   ========================================================================= */
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 28px;
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease), border-color var(--d) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.card h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.0125em; margin-bottom: 6px; }
.card p  { font-size: 0.875rem; line-height: 1.55; color: var(--ink-70); }

/* In-card link footer (use-case cards) */
.card__link {
  margin-top: 12px;
  font-size: 0.84375rem;
  font-weight: 500;
}
.card__link a {
  color: var(--sage-deep);
  transition: color var(--d) var(--ease);
}
.card__link a:hover { color: var(--ink); }

/* Features icon glyph */
.features .card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--sage-soft); color: var(--sage-deep);
  border-radius: 12px;
  font-size: 1.25rem;
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

/* =========================================================================
   Problem section (Without TagTier vs With TagTier comparison)
   Self-contained, .tt- prefixed to avoid collisions.
   ========================================================================= */
.tt-problem {
  background: var(--bg-alt);
  color: var(--ink);
  padding: clamp(64px, 5vw + 36px, 96px) 0;
}
.tt-problem * { box-sizing: border-box; }
.tt-problem-inner {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.tt-problem .tt-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 3vw + 24px, 56px);
}
.tt-eyebrow {
  display: inline-block;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--sage-deep);
  margin-bottom: 14px;
  letter-spacing: 0.012em;
}
.tt-title {
  font-size: clamp(1.875rem, 1.2rem + 2.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.tt-intro {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-70);
  margin: 14px auto 0;
  max-width: 580px;
}

.tt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tt-card {
  border-radius: var(--r-lg);
  padding: 32px;
}
.tt-card--without {
  background: var(--card);
  border: 1px solid var(--rule);
}
.tt-card--with {
  background: var(--ink);
  color: var(--bg);
}

.tt-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.75rem; font-weight: 500;
  margin-bottom: 18px;
}
.tt-pill--without { background: rgba(31,29,26,0.06); color: var(--ink-70); }
.tt-pill--without .tt-dot { background: var(--ink-50); }
.tt-pill--with    { background: var(--sage-soft); color: var(--sage-deep); }
.tt-pill--with .tt-dot { background: var(--sage); }
.tt-dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; flex: 0 0 auto; }

.tt-h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 18px;
}
.tt-card--without .tt-h3 { color: var(--ink); }
.tt-card--with    .tt-h3 { color: var(--bg); }

.tt-diagram {
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 18px;
}
.tt-diagram--without {
  background: var(--bg);
  border: 1px solid var(--rule);
}
.tt-diagram--with {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}
/* Use aspect-ratio so the SVG never distorts; viewBox preserves text scale */
.tt-diagram svg {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 360 / 200;
}

.tt-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.tt-list li {
  display: flex; gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.tt-card--without .tt-list li { color: var(--ink-70); }
.tt-card--with    .tt-list li { color: rgba(251,249,244,0.85); }
.tt-mark { margin-top: 1px; flex: 0 0 auto; font-weight: 500; }
.tt-card--without .tt-mark { color: var(--ink-30); }
.tt-card--with    .tt-mark { color: var(--sage); }

/* ── Responsive ─────────────────────────────────────────── */
/* Tablet: collapse the comparison to a single column at the same
   breakpoint the site nav switches to mobile. */
@media (max-width: 920px) {
  .tt-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* Phone */
@media (max-width: 600px) {
  .tt-card { padding: 24px; border-radius: var(--r-md); }
  .tt-h3 { font-size: 1.1875rem; margin-bottom: 14px; }
  .tt-pill { margin-bottom: 14px; }
  .tt-diagram { padding: 14px; margin-bottom: 14px; }
  .tt-list li { font-size: 0.875rem; }
}

/* Small phone — diagrams shrink past readability for SVG text labels.
   Hide the visual; the bullet list carries the message. The dark/light
   visual contrast between the two cards still tells the story. */
@media (max-width: 480px) {
  .tt-card { padding: 22px; }
  .tt-diagram { display: none; }
}

/* Very narrow */
@media (max-width: 380px) {
  .tt-card { padding: 18px; }
  .tt-h3 { font-size: 1.125rem; }
}

/* =========================================================================
   Steps
   ========================================================================= */
.steps .card { padding: 24px; }
.step__num {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg);
  font-size: 0.875rem; font-weight: 600;
  margin-bottom: 16px;
}
.steps h3 { font-size: 1rem; }
.steps p  { font-size: 0.84375rem; }

/* =========================================================================
   Demo
   ========================================================================= */
.demo {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.demo__pane { padding: 36px; }
.demo__pane--store {
  border-right: 1px solid var(--rule);
  background: var(--bg);
}

.demo__label {
  font-size: 0.75rem;
  color: var(--ink-50);
  margin-bottom: 16px;
}
.demo__label--mt { margin-top: 22px; }

.demo__photo {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.6875rem;
  color: var(--ink-50);
  border: 1px solid var(--rule);
  background:
    repeating-linear-gradient(135deg, var(--bg-alt) 0 14px, var(--bg) 14px 28px);
}

.demo__product {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.022em;
  margin-top: 22px;
}
.demo__pricing {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-top: 8px;
}
.demo__price {
  font-size: 2.25rem; font-weight: 600; letter-spacing: -0.024em;
  color: var(--ink); line-height: 1;
}
.demo__list { font-size: 0.9375rem; color: var(--ink-50); text-decoration: line-through; }

.demo__qty {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.demo__qty button {
  font-size: 0.875rem; padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  background: var(--card); color: var(--ink);
  transition: all var(--d) var(--ease);
}
.demo__qty button:hover { border-color: var(--ink-30); }
.demo__qty button[aria-checked="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  font-weight: 500;
}

.demo__cart { margin-top: 22px; padding: 14px; }

/* Tag picker */
.demo__tags { display: grid; gap: 8px; }
.demo__tags button {
  text-align: left; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--card); color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--sans);
  transition: all var(--d) var(--ease);
}
.demo__tags button:hover { border-color: var(--ink-30); }
.demo__tags button[aria-checked="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.tag__name { display: block; font-size: 0.9375rem; font-weight: 500; }
.tag__sub  { display: block; font-family: var(--mono); font-size: 0.71875rem; opacity: 0.7; margin-top: 2px; }
.tag__arrow { font-size: 1.125rem; opacity: 0.3; }
.demo__tags button[aria-checked="true"] .tag__arrow { opacity: 1; }

.demo__active {
  background: var(--sage-soft);
  border-radius: 14px;
  padding: 16px;
  font-size: 0.875rem;
  color: var(--sage-deep);
  line-height: 1.5;
}
.demo__matched {
  display: block; font-family: var(--mono); font-size: 0.75rem;
  margin-bottom: 6px; opacity: 0.8;
}
.demo__active-line { color: var(--ink); margin: 0; }
.demo__active-line + .demo__active-line { margin-top: 4px; color: var(--sage-deep); }

/* =========================================================================
   Pricing
   ========================================================================= */
.plans { align-items: stretch; }
.plan {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 32px;
  position: relative;
  display: flex; flex-direction: column;
}
.plan__name { font-size: 0.875rem; font-weight: 500; opacity: 0.7; }
.plan__price {
  display: flex; align-items: baseline; gap: 6px; margin-top: 12px;
}
.plan__amount {
  font-family: var(--display);
  font-size: 3.5rem; font-weight: 600; letter-spacing: -0.036em;
  line-height: 1;
}
.plan__period { font-size: 0.875rem; opacity: 0.6; }
.plan__blurb { font-size: 0.875rem; line-height: 1.55; opacity: 0.7; margin: 8px 0 24px; }
.plan__feats {
  border-top: 1px solid var(--rule); padding-top: 20px;
  display: flex; flex-direction: column;
  flex: 1;
}
.plan__feats li {
  position: relative;
  padding: 7px 0 7px 22px;
  font-size: 0.875rem;
  opacity: 0.9;
}
.plan__feats li::before {
  content: "✓";
  position: absolute; left: 0; top: 6px;
  color: var(--sage);
}
.plan .btn { margin-top: 24px; }

.plan--featured {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
/* The global `p { color: var(--ink-70); }` rule wins over inherited
   colour from .plan--featured, so we have to restate the text colour
   explicitly for every <p> inside the featured card. Without this,
   the plan name / price / blurb render dark-on-dark (invisible). */
.plan--featured .plan__name,
.plan--featured .plan__price,
.plan--featured .plan__amount,
.plan--featured .plan__period,
.plan--featured .plan__blurb,
.plan--featured p {
  color: var(--bg);
}
.plan--featured .plan__feats { border-top-color: rgba(255,255,255,0.15); }
.plan--featured .plan__feats li { color: var(--bg); }
.plan--featured .plan__feats li::before { color: var(--sage); }
.plan__badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.6875rem; font-weight: 500;
  color: var(--sage);
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.08);
}

/* "Coming soon" tier — visually distinct so merchants don't try to subscribe */
.plan--soon {
  background: var(--bg);
  border-style: dashed;
  border-color: var(--ink-30);
  opacity: 0.85;
}
.plan--soon .plan__amount,
.plan--soon .plan__period,
.plan--soon .plan__name,
.plan--soon .plan__blurb { color: var(--ink-70); }
.plan--soon .plan__feats li::before { color: var(--ink-30); }
.plan__badge--soon {
  color: var(--ink-70);
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--rule);
}

/* =========================================================================
   FAQ
   ========================================================================= */
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 800px; margin-inline: auto; }
.faq__item {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--d) var(--ease);
}
.faq__item[open] { border-color: var(--ink-30); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-size: 1rem; font-weight: 500;
  color: var(--ink);
  position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-size: 1.25rem; font-weight: 400; color: var(--ink-50);
  transition: transform var(--d) var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__body { padding: 0 24px 22px; }
.faq__body p { font-size: 0.90625rem; line-height: 1.65; color: var(--ink-70); }

/* =========================================================================
   Support
   ========================================================================= */
.support {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.support__cards { display: grid; gap: 12px; align-content: start; }
.support__card {
  display: block;
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--rule);
  transition: transform var(--d-fast) var(--ease), box-shadow var(--d) var(--ease), border-color var(--d) var(--ease);
}
.support__card:hover { transform: translateY(-1px); border-color: var(--ink-30); box-shadow: var(--sh); }
.support__kicker {
  display: block;
  font-size: 0.78125rem; font-weight: 500;
  color: var(--sage-deep);
  margin-bottom: 6px;
}
.support__value {
  display: block;
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.018em;
  color: var(--ink);
}
.support__meta {
  display: block;
  font-size: 0.8125rem; color: var(--ink-50); margin-top: 4px;
}

.support__form {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: 28px;
  display: grid; gap: 10px;
}
.support__form .support__kicker { margin-bottom: 8px; }
.support__submit { justify-self: start; margin-top: 4px; }
.support__submit[data-sent="true"] { background: var(--sage-deep); border-color: var(--sage-deep); }
.support__submit:disabled { opacity: 0.7; cursor: progress; }
.support__error {
  margin: 0;
  font-size: 14px;
  color: #B25541;
  background: rgba(178, 85, 65, 0.08);
  border: 1px solid rgba(178, 85, 65, 0.25);
  border-radius: var(--r-md, 10px);
  padding: 8px 12px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  background: var(--bg-alt);
  color: var(--ink);
  padding: 64px 0 36px;
  border-top: 1px solid var(--rule);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__tag {
  font-size: 0.875rem; line-height: 1.55;
  color: var(--ink-70); margin-top: 14px;
  max-width: 320px;
}
.footer__heading { font-size: 0.8125rem; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.footer__col { display: flex; flex-direction: column; }
.footer__col a {
  display: block;
  font-size: 0.84375rem; color: var(--ink-70);
  padding: 4px 0;
  transition: color var(--d) var(--ease);
}
.footer__col a:hover { color: var(--ink); }

.footer__base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between;
  font-size: 0.78125rem;
  color: var(--ink-50);
  flex-wrap: wrap; gap: 8px;
}
.footer__legal {
  display: inline-flex;
  flex-wrap: wrap; gap: 8px; align-items: center;
  color: var(--ink-50);
}
.footer__legal a {
  color: var(--ink-50);
  transition: color var(--d) var(--ease);
}
.footer__legal a:hover { color: var(--ink); }

/* =========================================================================
   Install dialog
   ========================================================================= */
.dialog {
  margin: auto;
  width: min(420px, calc(100% - 32px));
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 0;
  background: var(--card);
  box-shadow: var(--sh-lg);
  color: var(--ink);
}
.dialog::backdrop { background: rgba(31, 29, 26, 0.45); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialogIn 220ms var(--ease-out); }
@keyframes dialogIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.dialog__form { padding: 26px 26px 22px; display: grid; gap: 8px; }
.dialog__kicker { font-size: 0.78125rem; font-weight: 500; color: var(--sage-deep); }
.dialog__title  { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.018em; margin-top: 4px; }
.dialog__lead   { font-size: 0.875rem; color: var(--ink-70); margin-bottom: 8px; }
.dialog__label  { font-size: 0.75rem; color: var(--ink-50); margin-top: 6px; }
.dialog__error  { font-size: 0.8125rem; color: #B25541; margin-top: 6px; }
.dialog__actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 14px;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
}

@media (max-width: 920px) {
  .nav__links { display: none; }
  .nav__cta .link { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__mobile.is-open { display: flex; }

  .hero { padding-top: 56px; }
  .hero__title { font-size: clamp(2.25rem, 1.4rem + 4vw, 3.25rem); }
  .hero__lead  { font-size: 1.0625rem; }

  .appmock { margin-bottom: 64px; }
  .appmock__body { grid-template-columns: 1fr; }
  .appmock__sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 16px 20px;
  }
  .appmock__nav {
    flex-direction: row; flex-wrap: wrap; gap: 4px;
  }
  .appmock__nav li { padding: 6px 10px; }
  .appmock__main { padding: 22px 20px; }
  .appmock__rules li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .appmock__rules .pill--live { justify-self: start; }

  .demo { grid-template-columns: 1fr; }
  .demo__pane--store {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .demo__pane { padding: 28px; }

  .plans { grid-template-columns: minmax(0, 460px); justify-content: center; }
  .plan--featured { order: -1; }

  .support { grid-template-columns: 1fr; gap: 24px; }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

@media (max-width: 600px) {
  :root { --nav-h: 60px; }
  .container { width: min(100% - 1.75rem, var(--container)); }
  .section { padding-block: 56px; }

  .hero { padding-top: 40px; }
  .hero__title { font-size: clamp(2rem, 1.2rem + 5vw, 2.75rem); }
  .hero__lead  { font-size: 1rem; }
  .hero__ctas .btn { width: 100%; }
  .hero__ctas { flex-direction: column; gap: 10px; }

  .appmock { border-radius: var(--r-md); }
  .appmock__main { padding: 18px 16px; }
  .appmock__chrome { padding: 10px 14px; }
  .appmock__url { font-size: 0.625rem; margin-left: 6px; }

  .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .demo__pane { padding: 22px; }
  .demo__price { font-size: 1.875rem; }

  .plan { padding: 28px; }
  .plan__amount { font-size: 3rem; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer__base { flex-direction: column; align-items: flex-start; }

  .support__form { padding: 22px; }

  .faq__item summary { padding: 18px 48px 18px 18px; font-size: 0.9375rem; }
  .faq__item summary::after { right: 18px; }
  .faq__body { padding: 0 18px 18px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.875rem; }
  .nav__row { gap: 12px; }
  .brand__name { font-size: 1rem; }
  .demo__pricing { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =========================================================================
   Subpages (legal, help, about, status, etc.)
   Reuses tokens, navbar, and footer from above.
   ========================================================================= */
.subpage-hero {
  padding: 80px 0 48px;
  position: relative;
  overflow: hidden;
}
.subpage-hero .container { position: relative; max-width: var(--container-narrow); }
.subpage-hero__eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem; font-weight: 500;
  color: var(--sage-deep); letter-spacing: 0.012em;
  margin-bottom: 14px;
}
.subpage-hero__title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.036em;
  margin: 0;
}
.subpage-hero__lead {
  margin-top: 20px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-70);
  max-width: 680px;
}
.subpage-hero__meta {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--ink-50);
  font-family: var(--mono);
}

.subpage {
  padding-block: 16px 96px;
}
.subpage .container { max-width: var(--container-narrow); }

/* Long-form prose used by legal pages, help articles, etc. */
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}
.prose > * + * { margin-top: 1rem; }
.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 2rem; }
.prose h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.014em;
  margin-top: 2rem;
}
.prose h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-top: 1.5rem;
}
.prose p { color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
/* Prose links — but not buttons inside prose. */
.prose a:not(.btn) {
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--d) var(--ease);
}
.prose a:not(.btn):hover { color: var(--ink); }
/* When a .btn appears inside .prose, keep its own colors and remove
   the underline / decoration that the prose link rule would add. */
.prose a.btn {
  text-decoration: none;
  text-underline-offset: initial;
}
.prose a.btn--primary { color: var(--bg); }
.prose a.btn--invert  { color: var(--ink); }
.prose a.btn--ghost   { color: var(--ink); }
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}
.prose ul { list-style: disc outside; }
.prose ol { list-style: decimal outside; }
.prose li {
  margin: 0.4rem 0;
  padding-left: 0.25rem;
  color: var(--ink);
}
.prose li::marker { color: var(--ink-50); }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 16px 20px;
  border-left: 3px solid var(--sage);
  background: var(--sage-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink);
  font-style: italic;
}
.prose blockquote p { color: var(--ink); }
.prose code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}
.prose pre {
  font-family: var(--mono);
  font-size: 0.875rem;
  background: var(--bg-alt);
  padding: 16px;
  border-radius: var(--r-sm);
  overflow-x: auto;
  border: 1px solid var(--rule);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-alt);
  font-size: 0.875rem;
  letter-spacing: -0.004em;
}
.prose td { color: var(--ink); }
.prose td p { margin: 0; }

/* Inline note / callout used in legal pages */
.note {
  margin-top: 2rem;
  padding: 18px 20px;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  border-left: 3px solid var(--apricot);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}
.note strong { color: var(--ink); }

/* Section index (Help center, About) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}
.tile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 920px) {
  .tile-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Blog post tile — taller, with a type pill and meta row */
.tile--post {
  display: flex; flex-direction: column;
  padding: 24px;
  min-height: 200px;
}
/* Coming-soon variant: not a link, muted, no hover lift */
.tile--soon {
  cursor: default;
  opacity: 0.78;
}
.tile--soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--rule);
}
.tile--soon .tile__arrow { display: none; }
.tile__type {
  display: inline-flex; align-items: center;
  font-family: var(--mono);
  font-size: 0.71875rem; font-weight: 500;
  color: var(--ink-70);
  background: var(--bg-alt);
  padding: 3px 10px; border-radius: var(--r-pill);
  margin-bottom: 14px;
  align-self: flex-start;
  letter-spacing: 0;
}
.tile__type--guide      { background: var(--sage-soft); color: var(--sage-deep); }
.tile__type--comparison { background: #EFE3D7; color: #8A5A2C; }
.tile__type--case       { background: #E8E0F0; color: #5A4382; }
.tile__type--coming     { background: var(--bg-alt); color: var(--ink-50); }

.tile__meta {
  margin-top: auto;
  padding-top: 16px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; color: var(--ink-50);
}
.tile__arrow {
  margin-left: auto;
  color: var(--ink-30);
  font-size: 1rem;
  transition: color var(--d) var(--ease), transform var(--d) var(--ease);
}
.tile--post:hover .tile__arrow { color: var(--ink); transform: translateX(2px); }
.tile {
  display: block;
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--rule);
  transition: transform var(--d-fast) var(--ease),
              box-shadow var(--d) var(--ease),
              border-color var(--d) var(--ease);
}
.tile:hover { transform: translateY(-1px); border-color: var(--ink-30); box-shadow: var(--sh); }
.tile__kicker {
  display: block;
  font-size: 0.75rem; font-weight: 500;
  color: var(--sage-deep);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tile__title {
  display: block;
  font-size: 1rem; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
}
.tile__sub {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-70);
  line-height: 1.5;
}

/* Changelog list */
.log {
  display: flex; flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}
.log__entry {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.log__entry:last-child { border-bottom: 0; }
.log__head {
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.log__version {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sage-deep);
}
.log__date {
  font-size: 0.8125rem;
  color: var(--ink-50);
}
.log__entry ul { padding-left: 1.25rem; list-style: disc outside; margin-top: 4px; }
.log__entry li { padding-left: 0.25rem; margin: 6px 0; }
.log__entry li::marker { color: var(--ink-50); }

/* Status pill row */
.status-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
}
.status-row__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.status-row__name { font-size: 0.9375rem; color: var(--ink); font-weight: 500; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8125rem; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--sage-soft); color: var(--sage-deep);
}
.status-pill__dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--sage);
}

/* =========================================================================
   Cookie consent banner
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  max-width: 720px; margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.cookie-banner.is-in { opacity: 1; transform: translateY(0); }
.cookie-banner.is-leaving { opacity: 0; transform: translateY(8px); }
.cookie-banner__inner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.cookie-banner__text {
  font-size: 0.84375rem;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
  flex: 1 1 280px;
  min-width: 0;
}
.cookie-banner__text a {
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner__actions {
  display: inline-flex; gap: 8px;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; border-radius: var(--r-md); }
  .cookie-banner__inner { padding: 12px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; }
}

/* Mobile prose tweaks */
@media (max-width: 600px) {
  .subpage-hero { padding: 56px 0 32px; }
  .subpage-hero__title { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.25rem); }
  .subpage { padding-block: 8px 64px; }
  .prose h2 { font-size: 1.3125rem; margin-top: 2.5rem; padding-top: 1.25rem; }
  .prose h3 { font-size: 1.0625rem; margin-top: 1.5rem; }
  .prose table {
    display: block;
    overflow-x: auto;
    font-size: 0.875rem;
  }
  .tile-grid { grid-template-columns: 1fr; }
}
