/* Smirktag base: reset, page, layout, focus, utilities and the shared primitives every page uses.
   Load order on every page: fonts.css (or fonts-ext.css), tokens.css, base.css, then your own file.
   No hex/rgb/hsl in this file or any page file: colours come only from tokens.css (var(--tt-*)).
   Read-only for page builders. Shared primitives are prefixed .tt-; utilities .u-. */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; hanging-punctuation: first last; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
:where(ul, ol)[role="list"] { list-style: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
svg { overflow: visible; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
h1, h2, h3 { text-wrap: balance; font-weight: inherit; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }

/* ---------- Page ---------- */
body {
  min-height: 100svh;
  background: var(--tt-bg);
  color: var(--tt-ink);
  font-family: var(--f-ui);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: clip;
}
::selection { background: var(--tt-brand); color: var(--tt-brand-ink); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* Extension documents (popup) are px-sized and never scale with the host. */
:root[data-surface="ext"] body { font-size: var(--x-13); line-height: var(--x-lh); background: var(--tt-surface); }

/* ---------- Layout ---------- */
.u-container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.u-section { position: relative; padding-block: var(--section-y); }
.u-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
@media (max-width: 760px) { .u-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--s-4); } }
.u-stack > * + * { margin-top: var(--stack, var(--s-4)); }
.u-row { display: flex; align-items: center; gap: var(--gap, var(--s-3)); flex-wrap: wrap; }
.u-measure { max-width: var(--measure); }

/* ---------- Focus ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--tt-brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.u-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.u-skip { position: absolute; left: var(--s-4); top: -60px; z-index: 100; padding: var(--s-2) var(--s-4); background: var(--tt-brand); color: var(--tt-brand-ink); border-radius: var(--r-1); text-decoration: none; }
.u-skip:focus-visible { top: var(--s-4); }
.u-ink-2 { color: var(--tt-ink-2); }
.u-ink-3 { color: var(--tt-ink-3); }
.u-brand { color: var(--tt-brand); }
.u-fake { color: var(--tt-fake-ink); }
.u-real { color: var(--tt-real-ink); }
.u-nowrap { white-space: nowrap; }
.u-phone-only { display: none; }
@media (max-width: 760px) { .u-phone-only { display: revert; } .u-desk-only { display: none !important; } }

/* ---------- Typography primitives ---------- */
.tt-display { font-family: var(--f-display); font-weight: 760; letter-spacing: -.04em; line-height: .98; font-variation-settings: normal; }
.tt-display em { font-style: normal; font-weight: inherit; color: var(--tt-brand); }
.tt-h2 { font-family: var(--f-display); font-weight: 720; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -.03em; font-variation-settings: normal; }
.tt-h2 em { font-style: normal; font-weight: inherit; color: var(--tt-brand); }
.tt-h3 { font-size: var(--t-h3); font-weight: var(--w-semi); letter-spacing: -.015em; line-height: 1.25; }
.tt-lede { font-size: var(--t-lede); line-height: 1.6; color: var(--tt-ink-2); max-width: 31rem; }
.tt-small { font-size: var(--t-small); color: var(--tt-ink-3); }
/* Every price in a row, table, chart, popup or pill. Indian grouping comes from JS (en-IN). */
.tt-num { font-family: var(--f-ui); font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }
.tt-label { font-family: var(--f-mono); font-size: var(--t-label); font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--tt-ink-3); }
:root[data-surface="ext"] .tt-label { font-family: var(--f-ui); font-size: 11px; font-weight: 600; letter-spacing: .08em; }

/* ---------- Buttons ---------- */
.tt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 1rem; font-weight: var(--w-semi); letter-spacing: -.005em; line-height: 1.15;
  text-decoration: none; cursor: pointer; text-align: center; text-wrap: balance;
  transition: background-color var(--d-fast) ease, border-color var(--d-fast) ease, color var(--d-fast) ease;
}
.tt-btn svg { width: 18px; height: 18px; flex: none; }
.tt-btn--brand { background: var(--tt-brand); color: var(--tt-brand-ink); box-shadow: inset 0 1px 0 var(--tt-highlight); }
.tt-btn--brand:hover { background: var(--tt-brand-hi); }
.tt-btn--brand:active { background: var(--tt-brand-hi); }
.tt-btn--ghost { border-color: var(--tt-line-2); color: var(--tt-ink); background: transparent; }
.tt-btn--ghost:hover { border-color: var(--tt-brand); color: var(--tt-brand-hi); }
.tt-btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.tt-btn[aria-disabled="true"] { background: var(--tt-surface-2); color: var(--tt-ink-3); border-color: var(--tt-line); cursor: not-allowed; box-shadow: none; }
:root[data-surface="ext"] .tt-btn { min-height: 40px; padding: 0 16px; font-size: var(--x-13); }

/* ---------- Eyelet: the brand's recurring mark (logo, pill, divider, list bullets) ----------
   A brand-colour ring with NO fill (a filled dot reads as a radio button). Decorative: aria-hidden="true". */
.tt-eyelet { --e: 10px; display: inline-block; flex: none; width: var(--e); height: var(--e); border-radius: 50%; border: 1.5px solid var(--tt-brand); background: transparent; }
.tt-eyelet--lg { --e: 14px; border-width: 2px; }

/* ---------- Stamp: verdict word, always icon + word ----------
   <span class="tt-stamp tt-stamp--fake"><svg aria-hidden="true">…</svg>Inflated M.R.P.</span> */
.tt-stamp {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border: 1px solid currentColor; border-radius: var(--r-1);
  font: 600 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.tt-stamp svg { width: 12px; height: 12px; flex: none; }
.tt-stamp--fake { color: var(--tt-fake-ink); background: var(--tt-fake-soft); }
.tt-stamp--flag { color: var(--tt-flag-chip-ink); background: var(--tt-flag-chip); border-color: transparent; } /* fake verdict ON the orchid tag or pill */

.tt-stamp--real { color: var(--tt-real-ink); background: var(--tt-real-soft); }
.tt-stamp--brand { color: var(--tt-brand); background: var(--tt-brand-soft); }
.tt-stamp--thin { color: var(--tt-thin-ink); background: var(--tt-thin-soft); border-style: dashed; }
.tt-stamp--neutral { color: var(--tt-ink-2); border-style: dashed; }  /* NO CHANGE, REJECTED */

/* ---------- Sample marker: required on every piece of example data ---------- */
.tt-sample { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 7px; border: 1px dashed var(--tt-line-2); border-radius: var(--r-1); font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tt-ink-3); }

/* ---------- Evidence row with dotted leader (popup, panel, demo) ----------
   <div class="tt-leader"><span>Lowest in 30 days</span><i></i><b class="tt-num">False</b></div> */
.tt-leader { display: flex; align-items: baseline; gap: 8px; min-height: 32px; }
.tt-leader > span { color: var(--tt-ink-2); }
.tt-leader > i { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--tt-line-2); transform: translateY(-4px); }
.tt-leader > b { font-weight: var(--w-semi); color: var(--tt-ink); }

/* ---------- Thread divider between sections (brand hairline + eyelet) ---------- */
.tt-thread { display: flex; align-items: center; gap: 12px; color: var(--tt-brand); }
.tt-thread::before, .tt-thread::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--tt-brand-line)); }
.tt-thread::after { background: linear-gradient(90deg, var(--tt-brand-line), transparent); }

/* ---------- Reveal (site). JS adds .is-in via IntersectionObserver; no JS = visible. ---------- */
html.js .tt-reveal { opacity: 0; transform: translateY(44px) scale(.98); }
html.js .tt-reveal.is-in { opacity: 1; transform: none; transition: opacity 620ms var(--ease-out), transform 950ms var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
@media (prefers-reduced-motion: reduce) { html.js .tt-reveal { opacity: 1; transform: none; } }

/* ---------- Truth mark: the accent highlighter swipe (the truth moment) ----------
   <mark class="tt-mark">far above any price seen</mark>. JS adds .is-in to sweep it in (scaleX, origin left).
   Accent is a fill: text on it stays --tt-accent-ink. */
.tt-mark { position: relative; z-index: 0; background: none; color: inherit; padding: 0 .12em; white-space: nowrap; }
.tt-mark::before { content: ""; position: absolute; z-index: -1; inset: .08em -.04em .02em; background: var(--tt-accent); border-radius: 3px; transform-origin: left center; }
html.js .tt-mark::before { transform: scaleX(0); }
html.js .tt-mark.is-in::before { transform: none; transition: transform var(--d-mid) var(--ease-out); }
html:not(.js) .tt-mark, .tt-mark.is-in { color: var(--tt-accent-ink); transition: color var(--d-fast) linear; }
@media (prefers-reduced-motion: reduce) { html.js .tt-mark::before { transform: none; } }

/* ---------- Progress: real history / open loop ("History 9 of 30 days") ----------
   <div class="tt-progress" style="--p:.3" role="progressbar" aria-valuenow="9" aria-valuemin="0" aria-valuemax="30"
        aria-label="History 9 of 30 days"><i></i></div> */
.tt-progress { height: 6px; border-radius: var(--r-pill); background: var(--tt-surface-2); overflow: hidden; }
.tt-progress > i { display: block; height: 100%; width: 100%; background: var(--tt-brand); border-radius: inherit; transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform var(--d-slow) var(--ease-out); }
.tt-progress--thin > i { background: var(--tt-thin); }

/* ---------- Card surface ---------- */
.tt-card { background: var(--tt-surface); border-radius: var(--r-2); box-shadow: var(--shadow-2); }
.tt-stage { background: var(--tt-stage); border-radius: var(--r-3); }

/* Verdict stamps ON the orchid tag (constant in both themes): opaque white chip. Declared last so it beats the -soft backgrounds. */
.tt-stamp--on-tag.tt-stamp--real { color: var(--tt-tag-chip-real); background: var(--tt-tag-chip); }
.tt-stamp--on-tag.tt-stamp--thin, .tt-stamp--on-tag.tt-stamp--neutral { color: var(--tt-tag-chip-thin); background: var(--tt-tag-chip); }

/* ---------- Promoted from builders' PROPOSED SHARED (design lead, 2026-11-25) ---------- */
/* Reduced-motion class mirror: html.calm (SPEC §2) behaves like prefers-reduced-motion. */
html.calm {
  --d-instant: 0ms; --d-fast: 0ms; --d-mid: 0ms; --d-flip: 0ms; --d-slow: 0ms; --d-loader: 0ms;
  --d-celebrate: 0ms; --stagger: 0ms; --swing-max-deg: 0;
  scroll-behavior: auto;
}
html.calm *, html.calm *::before, html.calm *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important;
  transition-duration: .01ms !important; scroll-behavior: auto !important;
}
html.calm.js .tt-reveal { opacity: 1; transform: none; }
html.calm.js .tt-mark::before { transform: none; }
html.calm.js .tt-mark { color: var(--tt-accent-ink); }

/* Focus ring on orchid surfaces (tag, pill): the brand ring is 1.00:1 there. */
.tt-on-tag :focus-visible, .tt-on-tag:focus-visible { outline-color: var(--tt-tag-ink); }

/* SPEC §10.7: buttons press down 1 px. */
.tt-btn { transition: background-color var(--d-fast) ease, border-color var(--d-fast) ease, color var(--d-fast) ease, transform var(--d-instant) ease; }
.tt-btn:active:not([aria-disabled="true"]) { transform: translateY(1px); }

/* Sample markers that read on the orchid tag and on the shop's bone paper (tt-sample uses ink-3, which fails on orchid). */
.tt-sample--on-tag { color: var(--tt-tag-back-ink-2); border-color: color-mix(in oklab, var(--tt-tag-back-ink) 45%, transparent); }
.tt-sample--on-paper { color: var(--tt-paper-ink-2); border-color: color-mix(in oklab, var(--tt-paper-ink) 30%, transparent); }
