/*
 * pricehistoryapp.in design system: the Price History app's and extension's "tape", on the web.
 * Their palette (pricehistory.app's colours: navy #021542, one blue, emerald for the low), Montserrat for words,
 * JetBrains Mono for every figure and small-caps label, a 4 pt grid, tight corners (4 / 6 / 10) and almost no
 * shadow. A solid fill is an action or a verdict, a tint is data. Rows are tape rows: a 3 px verdict rule down the
 * left edge, a thumbnail well, mono figures.
 * The home hero, footer and dark panels are navy brand surfaces in both themes, like the app's launch screen
 * (.hero, .footer, .tile-ink, .apps, .auth-aside, .on-navy redefine the tokens). The mark is the coral tile (logo.php).
 * Light and dark themes come from <html data-theme> (js/theme.js sets it before the first paint). The page CSP
 * allows no inline styles: everything lives here, and values that JS computes are custom properties set through
 * the CSSOM.
 */

/* ============================================================== fonts */

/* the app's and the extension's subsets; ₹ is in Montserrat latin-ext, so mono figures fall back to it for ₹ */
@font-face {
  font-family: "PH Sans";
  src: url("../fonts/montserrat-latin.woff2?v=2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "PH Sans";
  src: url("../fonts/montserrat-latin-ext.woff2?v=2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113;
}

@font-face {
  font-family: "PH Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2?v=2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================== tokens */

/* light: the app's light palette (pricehistory.app as sampled) */
:root {
  --font-sans: "PH Sans", "Montserrat", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "PH Mono", "JetBrains Mono", "PH Sans", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-num: var(--font-mono);

  /* brand, fixed in both themes */
  --navy: #021542;
  --navy-2: #0b2a6b;
  --navy-deep: #00091b;
  --brand-chart: #3c73fd;
  --brand-low: #06af7f;

  --bg: #f8f9fa;
  --bg-alt: #f1f4f8;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #3b4658;
  --ink-3: #637289;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --grid: rgb(15 23 42 / 0.05);

  /* actions: navy fill, white ink */
  --primary: #021542;
  --primary-2: #0b2a6b;
  --on-primary: #ffffff;
  /* emphasis, links, focus, the active tab: the app's one blue */
  --brand: #0241e2;
  --brand-2: #3c73fd;
  --brand-ink: #ffffff;
  --brand-soft: rgb(2 65 226 / 0.1);
  --blue: #0241e2;
  --blue-ink: #ffffff;
  --blue-soft: rgb(2 65 226 / 0.1);
  --sky: #dbe6ff;
  --link: #0241e2;

  --drop: #04815a;
  --drop-bright: #059669;
  --drop-soft: rgb(4 129 90 / 0.1);
  --drop-ink: #03674b;
  --rise: #dc2626;
  --rise-soft: rgb(220 38 38 / 0.1);
  --rise-ink: #b91c1c;
  --warn: #b45309;
  --warn-bright: #f59e0b;
  --warn-soft: rgb(180 83 9 / 0.1);
  --info: #0241e2;
  --info-soft: rgb(2 65 226 / 0.1);
  --marker: #dbe6ff;
  --on-ink: #ffffff;
  --panel: #021542;
  --on-panel: #ffffff;
  --panel-line: #0b2a6b;
  --toast: #021542;
  /* the logo tag's hole shows the ground it sits on */
  --hole: var(--surface);
  --tag-shadow: #021542;

  /* tactile parts are hairlines now, like the app's */
  --edge: #cbd5e1;
  --hard-c: transparent;

  --shadow-rgb: 15 23 42;
  --shadow-sm: 0 3px 12px rgb(0 0 0 / 0.05);
  --shadow: 0 12px 32px rgb(0 0 0 / 0.1), 0 2px 8px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 24px 56px -16px rgb(2 21 66 / 0.24), 0 2px 8px rgb(0 0 0 / 0.05);
  --hard: 0 0 0 0 transparent;
  --hard-lg: var(--shadow);

  /* the logo's node price line as a mask (kickers, step links, the footer edge): colour it with background-color */
  --nodes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 12'%3E%3Cpath d='M3 8 10 3.5 17 8.5 27 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='3' cy='8' r='2.4'/%3E%3Ccircle cx='10' cy='3.5' r='2.4'/%3E%3Ccircle cx='17' cy='8.5' r='2.4'/%3E%3Ccircle cx='27' cy='3' r='2.4'/%3E%3C/svg%3E");

  /* the app's corners: chips 4, buttons and fields 6, surfaces 10 */
  --r-xs: 4px;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 10px;
  --r-xl: 14px;

  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4.5vw, 32px);
  --topbar-h: 62px;

  color-scheme: light;
  interpolate-size: allow-keywords;
}

/* dark: the app's dark palette, anchored on pricehistory.app's #00091B */
:root[data-theme="dark"] {
  --bg: #00091b;
  --bg-alt: #030d22;
  --surface: #070f1f;
  --surface-2: #0c1934;
  --surface-3: #0f1f3f;
  --ink: #e6ecf7;
  --ink-2: #b9c4d8;
  --ink-3: #8fa0bc;
  --line: #112348;
  --line-2: #1a3770;
  --grid: rgb(230 236 247 / 0.04);

  --primary: #3c73fd;
  --primary-2: #2f63ec;
  --on-primary: #ffffff;
  --brand: #3c73fd;
  --brand-2: #6f97ff;
  --brand-ink: #ffffff;
  --brand-soft: rgb(60 115 253 / 0.16);
  --blue: #3c73fd;
  --blue-ink: #ffffff;
  --blue-soft: rgb(60 115 253 / 0.16);
  --sky: #14306e;
  --link: #6f97ff;

  --drop: #06af7f;
  --drop-bright: #06af7f;
  --drop-soft: rgb(6 175 127 / 0.16);
  --drop-ink: #3fd2a3;
  --rise: #ff534b;
  --rise-soft: rgb(255 83 75 / 0.16);
  --rise-ink: #ff8a84;
  --warn: #f59e0b;
  --warn-bright: #f59e0b;
  --warn-soft: rgb(201 93 10 / 0.18);
  --info: #6f97ff;
  --info-soft: rgb(60 115 253 / 0.16);
  --marker: #14306e;
  --on-ink: #00091b;
  --panel: #021542;
  --on-panel: #ffffff;
  --panel-line: #1a3770;
  --toast: #0c1934;
  --tag-shadow: #00091b;

  --edge: #1a3770;

  --shadow-rgb: 0 0 0;
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.4);
  --shadow: 0 12px 28px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 28px 64px -18px rgb(0 0 0 / 0.75), 0 2px 6px rgb(0 0 0 / 0.35);

  color-scheme: dark;
}

/* navy brand surfaces: the same in both themes, like the app's launch screen */
.hero,
.footer,
.tile-ink,
.apps,
.auth-aside,
.on-navy {
  --bg: #021542;
  --bg-alt: #03184c;
  --surface: #0a1f5a;
  --surface-2: #0d2566;
  --surface-3: #122d74;
  --ink: #ffffff;
  --ink-2: rgb(255 255 255 / 0.8);
  --ink-3: #8fa0bc;
  --line: rgb(255 255 255 / 0.12);
  --line-2: rgb(255 255 255 / 0.22);
  --grid: rgb(255 255 255 / 0.06);
  --link: #8fb0ff;
  --primary: #3c73fd;
  --primary-2: #5585ff;
  --on-primary: #ffffff;
  --brand: #3c73fd;
  --brand-2: #8fb0ff;
  --brand-ink: #ffffff;
  --brand-soft: rgb(60 115 253 / 0.2);
  --on-ink: #021542;
  --drop: #06af7f;
  --drop-bright: #06af7f;
  --drop-soft: rgb(6 175 127 / 0.16);
  --drop-ink: #4fd8a8;
  --rise: #ff534b;
  --rise-soft: rgb(255 83 75 / 0.16);
  --rise-ink: #ff8a84;
  --info: #8fb0ff;
  --info-soft: rgb(143 176 255 / 0.14);
  --edge: rgb(255 255 255 / 0.16);
  --hole: #021542;
  --tag-shadow: #00091b;
  --shadow-rgb: 0 4 18;
  color-scheme: dark;
  color: var(--ink);
}

/* ============================================================== base */

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

[hidden] {
  display: none !important;
}

/* Signed in / out before app.js runs: theme.js adds .has-session when this browser holds a session */
html:not(.has-session) [data-signed-in-only],
html.has-session [data-signed-out-only] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.has-session body {
  padding-bottom: 0;
}

main {
  flex: 1 0 auto;
}

img,
svg,
video {
  max-width: 100%;
}

img {
  height: auto;
}

svg {
  flex-shrink: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

::selection {
  background: var(--brand);
  color: var(--brand-ink);
}

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

dl,
dd {
  margin: 0;
}

/* Accent words inside headlines: the app's one blue ("Okay to buy. Lowest in 2 years."), same face and weight */
.accent,
h1 em,
h2 em,
.hero-title em,
.display em,
.footer-big em,
.auth-quote em {
  font-style: normal;
  font-weight: inherit;
  color: var(--brand);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
  color: var(--on-ink);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.22em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ============================================================== layout */

.container {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(800px + 2 * var(--gutter));
}

.container-prose {
  max-width: calc(720px + 2 * var(--gutter));
}

.page {
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-lead {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* the logo's node price line as the bullet */
.kicker::before {
  content: "";
  width: 26px;
  height: 11px;
  background: var(--brand);
  -webkit-mask: var(--nodes) center / contain no-repeat;
  mask: var(--nodes) center / contain no-repeat;
}

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

.small {
  font-size: 0.875rem;
}

.center {
  text-align: center;
}

/* ============================================================== page heads (signed-in pages) */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.page-title {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-sub {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================== topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}

.topbar.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
}

/* the lockup: the mark (views/logo.php) + "PriceHistory" + "App" on a coral price tag */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-sm);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  overflow: visible;
  filter: drop-shadow(0 2px 4px rgb(2 21 66 / 0.2));
  transition: transform 0.45s var(--spring);
}

.brand:hover .brand-mark {
  transform: rotate(-7deg) scale(1.06);
}

.brand-mark .mark-handle {
  fill: none;
  stroke: #021542;
  stroke-width: 7.6;
  stroke-linecap: round;
}

.brand-mark .mark-collar {
  fill: none;
  stroke: #0c2878;
  stroke-width: 8.4;
}

.brand-mark .mark-rim {
  fill: #021542;
}

.brand-mark .mark-edge {
  fill: none;
  stroke: #fff;
  stroke-opacity: 0.14;
  stroke-width: 1;
}

.brand-mark .mark-glint {
  fill: none;
  stroke: #fff;
  stroke-opacity: 0.5;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.brand-mark .mark-chart path {
  fill: none;
  stroke: #fff;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 42;
  stroke-dashoffset: 0;
}

.brand-mark .mark-chart circle {
  fill: #fff;
}

.brand-mark .mark-low {
  fill: #ff4d41;
  stroke: #fff;
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: center;
}

/* hover: the lens re-reads the price line and finds the low again */
.brand:hover .mark-chart path {
  animation: mark-draw 0.7s var(--ease);
}

.brand:hover .mark-low {
  animation: mark-pop 0.5s 0.5s var(--spring) both;
}

.brand-word {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.brand-word b {
  position: relative;
  display: inline-block;
  padding: 0.07em 0.24em 0.13em 0.42em;
  border-radius: 0.14em 0.24em 0.24em 0.14em;
  background: #ff4d41;
  color: #021542;
  font-size: 0.8em;
  font-weight: inherit;
  letter-spacing: -0.03em;
  transform: rotate(-4deg);
  box-shadow: 0.075em 0.075em 0 var(--tag-shadow);
  transition: transform 0.4s var(--spring);
}

/* the price tag's hole */
.brand-word b::before {
  content: "";
  position: absolute;
  left: 0.13em;
  top: 50%;
  width: 0.14em;
  height: 0.14em;
  margin-top: -0.07em;
  border-radius: 50%;
  background: var(--hole);
}

.brand:hover .brand-word b {
  transform: rotate(3deg) translateY(-1px);
}

.mainnav {
  display: none;
  align-items: stretch;
  align-self: stretch;
  gap: 2px;
}

.mainnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.mainnav a:hover {
  color: var(--ink);
}

.mainnav a[aria-current="page"] {
  color: var(--ink);
}
/* the extension's tab bar: the current page carries an accent bar on the hairline */
.mainnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
  animation: tab-in 0.45s var(--ease) both;
}

/* hover underline on the other tabs */
.mainnav a:not([aria-current="page"])::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--line-2);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

.mainnav a:not([aria-current="page"]):hover::after {
  transform: scaleX(1);
}


.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  list-style: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.count-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--r-xs);
  border: 2px solid var(--surface);
  background: var(--rise);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  animation: badge-pop 0.5s var(--spring) both;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease);
}

.avatar:hover {
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* navy disappears on the dark ground: a lighter navy with a hairline */
[data-theme="dark"] .avatar {
  background: #0b2a6b;
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.avatar-lg {
  width: 68px;
  height: 68px;
  font-size: 1.4rem;
  box-shadow: none;
  cursor: default;
}

.avatar-lg:hover {
  box-shadow: none;
}

/* ============================================================== menus (<details data-menu>) */

.menu {
  position: relative;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

.menu-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  min-width: 232px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform-origin: top right;
}

.menu[open] > .menu-pop {
  animation: menu-in 0.22s var(--ease) both;
}

.menu-head {
  display: grid;
  gap: 2px;
  padding: 10px 12px 12px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line-2);
}

.menu-head strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-head span {
  color: var(--ink-3);
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.15s var(--ease);
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--surface-3);
  color: var(--ink);
}

.menu-item .icon {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}

.menu-item.is-danger,
.menu-item.is-danger .icon {
  color: var(--rise);
}

.menu-item.is-danger:hover {
  background: var(--rise-soft);
}

.menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.menu-label {
  padding: 8px 12px 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* the theme picker: the icon shows the theme in use, the menu marks the choice */
.theme-icon {
  display: none;
}

[data-theme="light"] .theme-icon-light,
[data-theme="dark"] .theme-icon-dark {
  display: block;
}

[data-theme-pref="system"] [data-theme-set="system"],
[data-theme-pref="light"] [data-theme-set="light"],
[data-theme-pref="dark"] [data-theme-set="dark"] {
  background: var(--surface-3);
  font-weight: 700;
}

.menu-item .check {
  margin-left: auto;
  opacity: 0;
  color: var(--brand);
}

[data-theme-pref="system"] [data-theme-set="system"] .check,
[data-theme-pref="light"] [data-theme-set="light"] .check,
[data-theme-pref="dark"] [data-theme-set="dark"] .check {
  opacity: 1;
}

/* ============================================================== bottom tab bar (signed in, phones) */

.tabbar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 62px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: var(--shadow-lg);
}

.tabbar a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  border-radius: var(--r);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.tabbar a .icon {
  width: 22px;
  height: 22px;
  transition: transform 0.3s var(--spring);
}

.tabbar a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
}

.tabbar a[aria-current="page"] .icon {
  transform: translateY(-1px) scale(1.06);
}

.tabbar a:active .icon {
  transform: scale(0.88);
}

html.has-session body {
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

/* ============================================================== footer */

.footer {
  position: relative;
  overflow: hidden;
  margin-top: auto;
  padding-top: clamp(56px, 8vw, 96px);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgb(36 87 240 / 0.28), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--navy-deep));
}

/* a faint price line with its nodes along the top edge */
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 30px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  -webkit-mask: var(--nodes) 0 0 / 76px 30px repeat-x;
  mask: var(--nodes) 0 0 / 76px 30px repeat-x;
  pointer-events: none;
}

.footer > .container {
  position: relative;
}

.footer-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1.5px dashed var(--line-2);
}

.footer-big {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.footer-big em {
  color: var(--brand);
}

.footer-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-block: clamp(36px, 5vw, 56px);
}

.footer-about p {
  max-width: 36ch;
  margin-top: 14px;
  color: var(--ink-2);
}

.footer-col h2 {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer-col ul {
  display: grid;
  gap: 10px;
  list-style: none;
}

.footer-col a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease);
}

.footer-col a:hover {
  background-size: 100% 2px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 22px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
}

.footer-bottom p {
  max-width: 70ch;
}

/* the three-way theme switch in the footer */
.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.segmented button .icon {
  width: 16px;
  height: 16px;
}

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

[data-theme-pref="system"] .segmented [data-theme-set="system"],
[data-theme-pref="light"] .segmented [data-theme-set="light"],
[data-theme-pref="dark"] .segmented [data-theme-set="dark"] {
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
}

/* ============================================================== buttons */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn .icon {
  width: 1.15em;
  height: 1.15em;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 1px 2px rgb(2 21 66 / 0.2);
}

.btn-primary:hover {
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--on-primary);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: none;
}

.btn-ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.btn-ink:hover {
  color: var(--on-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--ink);
  background: var(--surface);
}

.btn-secondary:active,
.btn-ghost:active,
.btn-danger:active,
.btn-ink:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.btn-danger {
  background: var(--rise);
  border-color: var(--rise);
  color: #fff;
}

[data-theme="dark"] .btn-danger {
  color: #021542;
}

.btn-danger:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-danger:hover {
  color: #021542;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--rise);
}

.btn-danger-ghost:hover {
  background: var(--rise-soft);
  color: var(--rise);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 0.84rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  border-radius: var(--r-sm);
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn-primary:disabled {
  box-shadow: none;
  opacity: 0.55;
}

.btn.is-busy::before {
  content: "";
  width: 1em;
  height: 1em;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-busy {
  opacity: 0.85;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.link-btn:hover {
  color: var(--ink);
}

.link-btn:disabled {
  color: var(--ink-3);
  text-decoration: none;
}

/* ============================================================== forms */

.stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > label,
.label {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--ink);
}

.optional {
  color: var(--ink-3);
  font-weight: 500;
}

.help {
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.5;
}

.input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder {
  color: var(--ink-3);
  opacity: 0.85;
}

input:hover,
select:hover {
  border-color: color-mix(in srgb, var(--ink) 45%, var(--line-2));
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

input[readonly] {
  background: var(--surface-2);
  color: var(--ink-2);
}

input[readonly]:focus {
  box-shadow: none;
  border-color: var(--line-2);
}

input[aria-invalid="true"] {
  border-color: var(--rise);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rise) 18%, transparent);
  animation: shake 0.42s var(--ease);
}

select {
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-icon {
  position: relative;
}

.input-icon > .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon > input {
  padding-left: 46px;
}

.form-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--rise-soft);
  color: var(--rise-ink);
  font-size: 0.92rem;
  font-weight: 550;
  animation: rise-in 0.3s var(--ease) both;
}

[data-theme="dark"] .form-error {
  color: var(--rise-ink);
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* money input: ₹ + number */
.money {
  position: relative;
  display: flex;
  align-items: center;
}

.money-sym {
  position: absolute;
  left: 18px;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink-3);
  pointer-events: none;
}

.money input {
  min-height: 64px;
  padding-left: 46px;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.money-sm .money-sym {
  left: 12px;
  font-size: 1rem;
}

.money-sm input {
  min-height: 44px;
  padding-left: 32px;
  font-size: 1.05rem;
}

/* 6-digit code: one real input over six boxes (app.js fills the boxes) */
.otp {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.otp-input {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  font-size: 16px !important;
  caret-color: transparent;
  z-index: 2;
  cursor: text;
}

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(6px, 2vw, 10px);
}

.otp-boxes span {
  display: grid;
  place-items: center;
  height: clamp(54px, 14vw, 62px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 1rem + 2vw, 1.9rem);
  font-weight: 650;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.otp-boxes span.is-filled {
  border-color: var(--ink-3);
  animation: digit-pop 0.28s var(--spring);
}

.otp.is-focused .otp-boxes span.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.otp.is-focused .otp-boxes span.is-active:empty::after {
  content: "";
  width: 2px;
  height: 1.1em;
  background: var(--brand);
  animation: caret 1s steps(1) infinite;
}

.otp.is-invalid .otp-boxes span {
  border-color: var(--rise);
  animation: shake 0.42s var(--ease);
}

/* captcha */
.captcha {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-image {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 300px;
  height: auto;
  aspect-ratio: 4 / 1;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  object-fit: cover;
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}

.captcha-image.is-loading {
  opacity: 0.35;
  filter: blur(2px);
  background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}

.captcha-refresh.is-busy .icon {
  animation: spin 0.8s linear infinite;
}

.captcha-refresh.is-busy::before {
  display: none;
}

/* switches */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 0.25s var(--ease);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.25);
  transition: transform 0.35s var(--spring), width 0.2s var(--ease);
}

.switch:active .switch-track::after {
  width: 28px;
}

.switch input:checked + .switch-track {
  background: var(--drop-bright);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch:active input:checked + .switch-track::after {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
}

.switch input:disabled + .switch-track {
  opacity: 0.5;
}

.switch.is-busy .switch-track::after {
  background: radial-gradient(circle, #fff 35%, transparent 36%), conic-gradient(var(--drop) 25%, #fff 0);
  animation: spin 0.8s linear infinite;
}

.switch-label {
  font-weight: 600;
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--spring);
}

.chip:hover {
  border-color: var(--brand);
}

.chip:active {
  transform: scale(0.96);
}

/* price-tag chips (target suggestions) */
.tag-chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 48px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.tag-chip::before {
  content: none;
}

.tag-chip:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.tag-chip.is-picked {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.tag-chip small {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.tag-chip b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* selectable category chips */
.chips-select .chip-toggle {
  position: relative;
  cursor: pointer;
  padding: 0 14px 0 8px;
  min-height: 44px;
  user-select: none;
}

.chip-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip-toggle img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.chip-toggle .chip-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.3s var(--spring);
}

.chip-toggle .chip-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.chip-toggle.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.chip-toggle.is-selected .chip-check {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.chip-toggle:has(input:focus-visible) {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
}

/* ============================================================== surfaces */

.card,
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: clamp(20px, 3.5vw, 32px);
}

.panel + .panel {
  margin-top: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  letter-spacing: -0.03em;
}

.panel-head p {
  margin-top: 6px;
  color: var(--ink-2);
}

.panel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  background: var(--brand-soft);
  color: var(--brand);
}

.panel-icon .icon {
  width: 24px;
  height: 24px;
}

.panel-icon.is-mint {
  background: var(--drop-soft);
  color: var(--drop);
}

.panel-icon.is-info {
  background: var(--info-soft);
  color: var(--info);
}

.panel-icon.is-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.panel-danger {
  border-color: color-mix(in srgb, var(--rise) 35%, var(--line));
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--rise) 4%, transparent) 14px 28px),
    var(--surface);
}

.panel-danger .panel-icon {
  background: var(--rise-soft);
  color: var(--rise);
}

/* pills, badges, store chips */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill.is-on {
  background: var(--drop-soft);
  color: var(--drop-ink);
}

.pill.is-on::before {
  background: var(--drop-bright);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--drop-bright) 60%, transparent);
  animation: live 2.2s var(--ease) infinite;
}

.pill.is-off {
  color: var(--ink-3);
}

.pill.is-expired {
  background: var(--warn-soft);
  color: var(--warn);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badges:empty {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success {
  background: var(--drop-soft);
  color: var(--drop-ink);
}

.badge-accent {
  background: var(--brand-soft);
  color: var(--rise-ink);
}

[data-theme="dark"] .badge-accent {
  color: var(--brand-2);
}

.badge-warning {
  background: var(--warn-soft);
  color: var(--warn);
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.store-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}

.store-chip[data-store="amazon.in"]::before,
.store-chip[data-store="amazon.com"]::before {
  background: #ff9900;
}

.store-chip[data-store="flipkart.com"]::before {
  background: #2874f0;
}

.store-chip[data-store="croma.com"]::before {
  background: #12b5a4;
}

.store-chip:empty {
  display: none;
}

/* notices */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.notice::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--ink-3);
}

.notice-success {
  background: var(--drop-soft);
  color: var(--drop-ink);
}

.notice-success::before {
  background: var(--drop-bright);
}

.notice-warning {
  background: var(--warn-soft);
  color: var(--warn);
}

.notice-warning::before {
  background: var(--warn-bright);
}

.notice-error {
  background: var(--rise-soft);
  color: var(--rise-ink);
}

.notice-error::before {
  background: var(--rise);
}

.notice a {
  color: inherit;
  font-weight: 700;
}

.load-error {
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.load-error p {
  flex: 1 1 220px;
}

.hint-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 22px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.hint-line .icon {
  margin-top: 2px;
  color: var(--ink-3);
}

/* ============================================================== skeletons */

.sk {
  display: block;
  border-radius: 8px;
  background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

.sk-media {
  width: 88px;
  height: 88px;
  border-radius: var(--r);
}

.sk-lines {
  display: grid;
  flex: 1;
  gap: 10px;
  align-content: center;
}

.sk-line {
  height: 14px;
}

.sk-line.sk-short {
  width: 45%;
}

.sk-big {
  height: 30px;
  width: 60%;
}

.sk-chip {
  display: inline-block;
  width: 120px;
  height: 44px;
  border-radius: 999px;
}

.skeleton {
  display: flex;
  gap: 18px;
  padding: 22px;
  pointer-events: none;
}

/* ============================================================== toasts and dialog */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}

html.has-session .toast-region {
  bottom: calc(92px + env(safe-area-inset-bottom));
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px 14px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--r);
  background: var(--toast);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.4s var(--spring) both;
}

.toast.is-leaving {
  animation: toast-out 0.25s var(--ease) both;
}

.toast p {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 550;
  line-height: 1.4;
}

.toast-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--brand-chart);
  color: #ffffff;
}

.toast-icon .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
}

.toast--success .toast-icon {
  background: var(--drop-bright);
  color: #0d2017;
}

.toast--error .toast-icon {
  background: #ff6b55;
  color: #2a0d07;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  font-size: 1.3rem;
  line-height: 1;
}

.toast-close:hover {
  opacity: 1;
  background: rgb(255 255 255 / 0.12);
}

[data-theme="dark"] .toast-close:hover {
  background: rgb(0 0 0 / 0.1);
}

.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--brand-chart);
  transform-origin: left;
  animation: toast-bar 4.5s linear both;
}

.toast--success .toast-bar {
  background: var(--drop-bright);
}

.toast--error .toast-bar {
  background: #ff6b55;
  animation-duration: 8s;
}

.toast:hover .toast-bar {
  animation-play-state: paused;
}

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.dialog[open] {
  animation: dialog-in 0.35s var(--spring) both;
}

.dialog::backdrop {
  background: rgb(2 21 66 / 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.25s var(--ease) both;
}

.dialog-body {
  padding: 28px 26px 24px;
}

.dialog-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: var(--r);
  background: var(--rise-soft);
  color: var(--rise);
}

.dialog-icon .icon {
  width: 26px;
  height: 26px;
}

.dialog h2 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.dialog p {
  margin-top: 10px;
  color: var(--ink-2);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

/* ============================================================== paste box (home, track) */

.paste {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.paste:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-sm);
}

.paste-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin-left: 2px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-2);
}

.paste input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 50px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 1.05rem;
  box-shadow: none !important;
}

.paste input:focus {
  outline: none;
}

.paste-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 700;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.paste-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.paste .btn {
  flex: 0 0 auto;
  min-height: 46px;
  border-radius: var(--r-sm);
  box-shadow: none;
}

.paste .btn-primary:hover,
.paste .btn-primary:active {
  box-shadow: none;
}

.paste-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 0.88rem;
}

/* inline text, so a line with links wraps like a sentence */
.paste-meta span {
  display: inline-block;
}

.paste-meta .icon {
  margin-right: 6px;
  vertical-align: -0.2em;
  width: 16px;
  height: 16px;
  color: var(--drop);
  stroke-width: 2.6;
}

/* ============================================================== home: hero */

/* a navy brand surface, like the app's launch screen: chart grid and the brand chart blue as light */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(40px, 6vw, 76px) clamp(64px, 9vw, 108px);
  background:
    radial-gradient(ellipse 55% 75% at 88% 4%, rgb(60 115 253 / 0.42), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, #031a52 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 70% 40%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 75% at 70% 40%, #000 25%, transparent 78%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -160px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(60 115 253 / 0.26), transparent 65%);
  filter: blur(12px);
  animation: float-slow 14s var(--ease-in-out) infinite alternate;
}

/* the long price line drawn faintly across the stage */
.hero-trace {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 14px;
  width: 100%;
  height: 120px;
  overflow: visible;
  pointer-events: none;
}

.hero-trace path {
  fill: none;
  stroke: rgb(255 255 255 / 0.1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 1700;
  stroke-dashoffset: 1700;
  animation: draw 3.2s 0.3s var(--ease-in-out) forwards;
}

.hero-trace circle {
  fill: var(--navy);
  stroke: rgb(255 255 255 / 0.18);
  stroke-width: 2;
}

.hero-grid {
  display: grid;
  gap: clamp(44px, 6vw, 64px);
  align-items: center;
}

/* mono small caps, like the app's labels */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 0.05);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  animation: rise-in 0.6s var(--ease) both;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--drop-bright);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--drop-bright);
  animation: ping 1.8s var(--ease) infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 1.2rem + 5vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-title .line {
  display: block;
  animation: rise-in 0.7s var(--ease) both;
}

.hero-title .line + .line {
  animation-delay: 0.08s;
}

.hero-title em {
  position: relative;
  display: inline-block;
  padding-right: 0.04em;
  white-space: nowrap;
}

/* under "Start saving.": the logo's node price line, falling to the low (the app's at-the-low green) */
.scribble {
  position: absolute;
  left: 0;
  bottom: -0.44em;
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 26;
  overflow: visible;
  color: var(--brand);
}

.scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.1s 0.5s var(--ease) forwards;
}

.scribble circle {
  fill: var(--bg);
  stroke: currentColor;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: dot-in 0.4s var(--spring) both;
}

.scribble circle:nth-of-type(1) { animation-delay: 0.55s; }
.scribble circle:nth-of-type(2) { animation-delay: 0.75s; }
.scribble circle:nth-of-type(3) { animation-delay: 0.95s; }
.scribble circle:nth-of-type(4) { animation-delay: 1.15s; }

.scribble circle.is-low {
  fill: var(--brand-low);
  stroke: #ffffff;
  animation-delay: 1.4s;
}

.hero-lead {
  max-width: 35rem;
  margin-top: 40px;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 0.96rem + 0.35vw, 1.16rem);
  line-height: 1.6;
  animation: rise-in 0.7s 0.14s var(--ease) both;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 700;
}

/* the paste box is a white app panel on the navy */
.hero .paste {
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #3b4658;
  --ink-3: #637289;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --primary: #021542;
  --primary-2: #0b2a6b;
  --brand: #0241e2;
  max-width: 600px;
  margin-top: 32px;
  border-color: transparent;
  color: var(--ink);
  box-shadow: 0 22px 44px -20px rgb(0 0 0 / 0.65);
  animation: rise-in 0.7s 0.22s var(--ease) both;
}

.hero .paste:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgb(60 115 253 / 0.45), 0 22px 44px -20px rgb(0 0 0 / 0.65);
}

.hero .paste-meta {
  animation: rise-in 0.7s 0.3s var(--ease) both;
}

.hero-signed-in {
  margin-top: 16px;
  color: var(--ink-2);
}

/* hero art: the extension's price sheet, as it looks on a product page */
.hero-art {
  position: relative;
  width: min(100%, 470px);
  margin-inline: auto;
  padding: 18px 6px 62px;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.6s var(--ease);
}

.art-card {
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #3b4658;
  --ink-3: #637289;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --brand: #0241e2;
  --primary: #021542;
  --drop: #04815a;
  --drop-ink: #03674b;
  --drop-soft: rgb(4 129 90 / 0.1);
  --rise: #b91c1c;
  --warn: #b45309;
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  color-scheme: light;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.7);
  animation: card-in 0.8s 0.15s var(--spring) both;
}

[data-theme="dark"] .art-card {
  --surface: #070f1f;
  --surface-2: #0c1934;
  --surface-3: #0f1f3f;
  --ink: #e6ecf7;
  --ink-2: #b9c4d8;
  --ink-3: #8fa0bc;
  --line: #112348;
  --line-2: #1a3770;
  --brand: #3c73fd;
  --primary: #3c73fd;
  --drop: #06af7f;
  --drop-ink: #3fd2a3;
  --drop-soft: rgb(6 175 127 / 0.16);
  --rise: #ff6b61;
  --warn: #f59e0b;
  color-scheme: dark;
}

.art-top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.art-thumb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-3));
  color: var(--ink-3);
}

.art-thumb .icon {
  width: 20px;
  height: 20px;
}

.art-name {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.art-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
}

.art-meta .store-chip {
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.art-quote {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.art-prices {
  display: grid;
  gap: 2px;
}

.art-now {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.art-now.is-hit {
  color: var(--drop);
  animation: pulse-text 0.6s var(--spring);
}

.art-was {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-3);
}

.art-verdict {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.art-verdict em {
  font-style: normal;
  color: var(--brand);
}

.art-verdict span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
}

.art-graph {
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

/* the range tabs and legend, the extension's segmented control */
.art-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-3);
}

.art-tabs span {
  padding: 3px 7px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
}

.art-tabs span.is-on {
  background: var(--primary);
  color: #ffffff;
}

.art-tabs i {
  margin-left: auto;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.art-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
  overflow: visible;
}

.art-chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.art-chart .target-line {
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
  animation: dash-march 1.2s linear infinite;
}

.art-chart .target-tag rect {
  fill: var(--primary);
}

.art-chart .target-tag text {
  fill: #ffffff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.art-chart .area {
  fill: url(#art-fade);
  opacity: 0;
  animation: fade-in 0.8s 1.9s var(--ease) forwards;
}

.art-chart .price-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 2.1s 0.7s var(--ease-in-out) forwards;
}

.art-chart .end-dot {
  fill: var(--drop);
  stroke: var(--surface);
  stroke-width: 3;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: dot-in 0.5s 2.75s var(--spring) forwards;
}

.art-chart .end-ring {
  fill: none;
  stroke: var(--drop);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 1.8s 3s var(--ease) infinite;
}

#art-fade .stop-a {
  stop-color: var(--brand);
  stop-opacity: 0.18;
}

#art-fade .stop-b {
  stop-color: var(--brand);
  stop-opacity: 0;
}

.art-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-3);
}

/* lowest / average / highest, each label in its own verdict colour */
.art-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.art-stats > div {
  padding: 7px 10px 8px;
  border-top: 2px solid var(--tone, var(--line));
}

.art-stats > div + div {
  border-left: 1px solid var(--line);
}

.art-stats .is-low {
  --tone: var(--drop);
}

.art-stats .is-avg {
  --tone: var(--warn);
}

.art-stats .is-high {
  --tone: var(--rise);
}

.art-stats dt {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tone);
}

.art-stats dd {
  margin-top: 2px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
  font-weight: 800;
}

.art-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.art-cta .icon {
  width: 16px;
  height: 16px;
}

/* the alert that arrives, the app's notification */
.art-alert {
  position: absolute;
  left: -10px;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(320px, 86%);
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--r);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 26px 46px -18px rgb(0 0 0 / 0.6);
  opacity: 0;
  animation: alert-in 0.6s 3s var(--spring) forwards;
}

.art-alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
}

.art-alert .art-alert-icon {
  background: #021542;
  color: #ffffff;
}

.art-alert-icon .icon {
  width: 18px;
  height: 18px;
  animation: ring-bell 1.2s 3.4s var(--ease) 2;
  transform-origin: 50% 10%;
}

.art-alert strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.3;
}

.art-alert span {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #637289;
}

/* verdict chips: a solid fill is a verdict */
.sticker {
  position: absolute;
  z-index: 3;
  padding: 5px 9px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgb(0 0 0 / 0.55);
}

.sticker-1 {
  top: 2px;
  right: 2px;
  background: var(--brand-low);
  color: #ffffff;
  animation: sticker-in 0.5s 1.2s var(--spring) both;
}

.sticker-2 {
  right: 14px;
  bottom: 54px;
  background: #ffffff;
  color: #03674b;
  animation: sticker-in 0.5s 3.3s var(--spring) both;
}

/* ============================================================== home: ticker */

/* the tape: the stores and channels scrolling past like a price ticker */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding-block: 13px;
  border-block: 1px solid #0b2a6b;
  background: var(--navy-deep);
  color: #ffffff;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 44s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-item em {
  font-style: normal;
  color: var(--brand-chart);
}

.marquee-star {
  width: 30px;
  height: 14px;
  fill: currentColor;
  stroke: none;
  color: var(--brand-chart);
}

/* ============================================================== home: steps */

.steps {
  display: grid;
  gap: 20px;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.step:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background-color 0.25s var(--ease);
}

.step:hover .step-num {
  background: var(--brand);
}

@media (min-width: 760px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 46px;
    right: -25px;
    width: 30px;
    height: 13px;
    background: var(--brand);
    -webkit-mask: var(--nodes) center / contain no-repeat;
    mask: var(--nodes) center / contain no-repeat;
  }
}

.step h3 {
  margin-top: 18px;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.step p {
  margin-top: 8px;
  color: var(--ink-2);
}

.step-art {
  display: grid;
  place-items: center;
  height: 150px;
  margin-top: 22px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  overflow: hidden;
}

.mini-paste {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 86%;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

.mini-paste span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.mini-paste span::after {
  content: "|";
  color: var(--brand);
  animation: caret 1s steps(1) infinite;
}

.mini-paste b {
  padding: 5px 9px;
  border-radius: var(--r-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.68rem;
}

.mini-range {
  position: relative;
  width: 82%;
}

.mini-range .bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--drop-bright), var(--warn-bright), var(--rise));
}

.mini-range .knob {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 24px;
  height: 24px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--surface);
  transform: translate(-50%, -50%);
  box-shadow: var(--hard);
  animation: knob 4s var(--ease-in-out) infinite alternate;
}

.mini-range .label {
  position: absolute;
  top: -44px;
  left: 30%;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  transform: translateX(-50%);
  white-space: nowrap;
  animation: knob 4s var(--ease-in-out) infinite alternate;
}

.mini-note {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 88%;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--toast);
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  animation: bob 4s var(--ease-in-out) infinite;
}

.mini-note .art-alert-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--brand-chart);
  color: #ffffff;
}

.mini-note .icon {
  width: 16px;
  height: 16px;
}

/* ============================================================== home: bento */

.bento {
  display: grid;
  gap: 16px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.tile h3 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.tile p {
  margin-top: 8px;
  max-width: 42ch;
  color: var(--ink-2);
}

.tile-visual {
  margin-top: auto;
  padding-top: 24px;
}

.tile-ink {
  background: var(--panel);
  border-color: var(--panel-line);
  color: var(--on-panel);
}

.tile-ink h3 {
  color: var(--on-panel);
}

.tile-ink p {
  color: color-mix(in srgb, var(--on-panel) 75%, transparent);
}

/* pricehistory.app's royal blue: the tile that sends you there */
.tile-brand {
  background: linear-gradient(150deg, #3468ff 0%, #1d47dc 55%, #1234ad 100%);
  border-color: transparent;
  color: #ffffff;
}

.tile-brand h3 {
  color: #ffffff;
}

.tile-brand p {
  color: rgb(255 255 255 / 0.84);
}

.channel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-panel) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-panel) 18%, transparent);
  color: var(--on-panel);
  font-weight: 600;
  font-size: 0.9rem;
}

.channel-chip .icon {
  width: 18px;
  height: 18px;
  color: var(--brand-2);
}

.stack-notes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.stack-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--on-panel) 8%, transparent);
  font-size: 0.95rem;
  color: var(--on-panel);
}

.stack-note b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--drop-bright);
}

.stack-note:nth-child(2) {
  margin-left: 18px;
  opacity: 0.8;
}

.stack-note:nth-child(3) {
  margin-left: 36px;
  opacity: 0.6;
}

.stack-note:nth-child(4) {
  margin-left: 54px;
  opacity: 0.42;
}

.range-demo {
  display: grid;
  gap: 10px;
}

.range-demo .bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--drop-soft), var(--surface-3) 50%, var(--rise-soft));
  border: 1px solid var(--line);
}

.range-demo .now {
  position: absolute;
  top: 50%;
  left: 22%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--drop-bright);
  box-shadow: 0 0 0 2px var(--drop-bright);
  transform: translate(-50%, -50%);
}

.range-demo .legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
}

.range-demo .legend b {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.spark {
  width: 100%;
  height: 90px;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark .spark-fill {
  fill: rgb(255 255 255 / 0.14);
  stroke: none;
}

.spark circle {
  fill: #1d47dc;
  stroke: #ffffff;
  stroke-width: 2.5;
}

.spark circle.is-low {
  fill: #ff4d41;
}

.device-row {
  display: flex;
  gap: 10px;
}

.device {
  display: grid;
  place-items: center;
  gap: 6px;
  flex: 1;
  padding: 14px 6px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-2);
  text-align: center;
}

.device .icon {
  width: 26px;
  height: 26px;
  color: var(--ink);
}

.toggle-demo {
  display: grid;
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
}

.fake-switch {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--drop-bright);
}

.fake-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

.fake-switch.is-off {
  background: var(--line-2);
}

.fake-switch.is-off::after {
  right: auto;
  left: 3px;
}

.code-demo {
  display: flex;
  gap: 6px;
}

.code-demo span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 46px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
}

.code-demo span:nth-child(-n + 4) {
  border-color: var(--ink);
  background: var(--surface);
}

/* ============================================================== home: apps, faq, cta */

.apps {
  position: relative;
  display: grid;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--on-panel);
}

.apps::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -190px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 46px solid color-mix(in srgb, var(--brand) 85%, transparent);
  opacity: 0.9;
  animation: float-slow 12s var(--ease-in-out) infinite alternate;
}

.apps h2 {
  color: var(--on-panel);
}

.apps h2 em {
  color: var(--brand-2);
}

.apps .section-lead {
  color: color-mix(in srgb, var(--on-panel) 75%, transparent);
}

.apps .kicker {
  color: color-mix(in srgb, var(--on-panel) 60%, transparent);
}

.store-buttons {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--on-panel) 18%, transparent);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--on-panel);
  text-decoration: none;
  transition: transform 0.25s var(--spring), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.store-btn:hover {
  transform: translateX(6px);
  border-color: var(--brand);
  background: var(--surface-2);
  color: var(--on-panel);
}

.store-btn .icon {
  width: 30px;
  height: 30px;
}

.store-btn small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
}

.store-btn strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.store-btn .go {
  margin-left: auto;
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.store-btn:hover .go {
  transform: translate(2px, -2px);
  opacity: 1;
}

.faq-grid {
  display: grid;
  gap: 32px;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
    var(--surface-3);
  transition: transform 0.35s var(--spring), background-color 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(135deg);
  background-color: var(--brand);
}

.faq details::details-content {
  height: 0;
  overflow: clip;
  transition: height 0.35s var(--ease), content-visibility 0.35s allow-discrete;
}

.faq details[open]::details-content {
  height: auto;
}

.faq details p {
  padding: 0 20px 20px;
  color: var(--ink-2);
}

.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 96px);
  background: linear-gradient(150deg, #2f63ff 0%, #0241e2 60%, #0234c0 100%);
  color: #ffffff;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / 0.16) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}

.cta-inner {
  position: relative;
  display: grid;
  gap: 30px;
  align-items: center;
}

.cta-band h2 {
  color: #ffffff;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.cta-band h2 em {
  color: #bcd0ff;
}

.cta-band .paste {
  --surface: #ffffff;
  --surface-3: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #3b4658;
  --ink-3: #637289;
  --line-2: #cbd5e1;
  --brand: #0241e2;
  background: #ffffff;
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 22px 44px -20px rgb(1 20 80 / 0.6);
}

.cta-band .paste:focus-within {
  box-shadow: 0 0 0 4px rgb(255 255 255 / 0.45), 0 22px 44px -20px rgb(1 20 80 / 0.6);
}

.cta-band .paste .btn-primary {
  background: #021542;
  color: #ffffff;
  border-color: #021542;
}

/* ============================================================== login */

.auth {
  display: grid;
  gap: 28px;
  align-items: start;
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(48px, 8vw, 96px);
}

.auth-card {
  padding: clamp(24px, 4.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: card-in 0.6s var(--spring) both;
}

.auth-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.auth-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-steps span b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  font-size: 0.7rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.auth-steps i {
  flex: 0 0 40px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}

.auth-steps i::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.5s var(--ease);
}

[data-step="email"] .auth-steps [data-step-dot="email"],
[data-step="code"] .auth-steps [data-step-dot="code"] {
  color: var(--ink);
}

[data-step="email"] .auth-steps [data-step-dot="email"] b,
[data-step="code"] .auth-steps [data-step-dot="code"] b {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

[data-step="code"] .auth-steps [data-step-dot="email"] b {
  background: var(--drop-bright);
  border-color: var(--drop-bright);
  color: #0d2017;
}

[data-step="code"] .auth-steps i::after {
  width: 100%;
}

.auth-title {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.auth-sub {
  margin-top: 12px;
  margin-bottom: 26px;
  color: var(--ink-2);
}

.auth-form {
  animation: step-in 0.45s var(--ease) both;
}

.code-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
}

.code-head p {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.code-head strong {
  color: var(--ink);
  word-break: break-all;
}

.code-envelope {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary);
  color: var(--on-primary);
  animation: envelope 1.6s var(--spring) both;
}

.code-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
}

.resend-btn {
  font-variant-numeric: tabular-nums;
}

.google-box {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

/* Transparent, not visibility: hidden: Chrome never renders Google's button iframe inside a hidden box, so it never gets a size and app.js gives up */
.google-box.is-pending {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.google-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* Google's button page is light only: in the dark theme a mismatched color-scheme paints a white box behind the pill */
.google-button iframe {
  color-scheme: light;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}

.legal {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-aside {
  position: relative;
  display: none;
  overflow: hidden;
  padding: clamp(32px, 4vw, 48px);
  border-radius: var(--r-xl);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--on-panel);
  min-height: 560px;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--on-panel) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--on-panel) 7%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 55%);
  mask-image: linear-gradient(180deg, transparent, #000 55%);
}

.auth-quote {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--on-panel);
}

.auth-quote em {
  color: var(--brand-2);
}

.auth-points {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 34px;
  list-style: none;
}

.auth-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: color-mix(in srgb, var(--on-panel) 80%, transparent);
}

.auth-points .icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--brand-2);
}

.auth-points strong {
  display: block;
  color: var(--on-panel);
}

.auth-aside .art-alert {
  position: relative;
  left: auto;
  bottom: auto;
  margin: 40px 0 0 auto;
  width: min(320px, 80%);
  background: #ffffff;
  color: #0a1636;
  border: 2px solid var(--brand);
  animation-delay: 0.6s;
}


/* ============================================================== track */

.track-form {
  max-width: 860px;
}

.lookup-result {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.product {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise-in 0.55s var(--ease) both;
}

.product-media {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}

.product:hover .product-media img {
  transform: scale(1.04);
}

.no-media .product-media {
  display: none;
}

.product.no-media {
  grid-template-columns: minmax(0, 1fr);
}

.lookup-result > .skeleton {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.product-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.product-name {
  margin-top: 10px;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 16px;
}

.price-big {
  color: var(--ink);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}

.price-mrp {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-size: 1.05rem;
}

.price-off {
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--drop-soft);
  color: var(--drop-ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.price-offer {
  margin-top: 8px;
  color: var(--drop);
  font-weight: 650;
  font-size: 0.95rem;
}

/* lowest .. highest with "now" and "target" markers (app.js sets --now and --target, 0..100) */
.range {
  margin-top: 22px;
  padding: 16px 16px 12px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.range-title {
  margin-bottom: 30px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.range-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--drop-bright), var(--warn-bright) 55%, var(--brand));
}

[data-theme="dark"] .range-bar {
  background: linear-gradient(90deg, #1f9e5c, #b8861a 55%, #d8473d);
}

.range-now,
.range-target {
  position: absolute;
  top: 50%;
  left: calc(var(--pos, 50) * 1%);
  transform: translate(-50%, -50%);
  transition: left 0.6s var(--spring);
}

.range-now {
  width: 20px;
  height: 20px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
  animation: dot-in 0.5s 0.3s var(--spring) both;
}

.range-now::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 3px 7px;
  border-radius: var(--r-xs);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(calc(var(--pos, 50) * -1%));
}

.range-target {
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: var(--drop);
}

.range-target::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--drop-soft);
  color: var(--drop-ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(calc(var(--pos, 50) * -1%));
}

.range-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.range-legend b {
  display: block;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  color: var(--ink);
}

.range-legend > :last-child {
  text-align: right;
}

.product-note {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

.product-note:empty {
  display: none;
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* the ticket notch between the product and its tracker */
.track-panel {
  position: relative;
  padding: clamp(20px, 3.5vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise-in 0.5s 0.08s var(--ease) both;
}

.track-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 28px;
  right: 28px;
  border-top: 2px dashed var(--line-2);
}

.track-panel .label {
  display: block;
  margin-bottom: 10px;
}

.track-panel .money {
  max-width: 340px;
}

.track-panel .chips {
  margin-top: 16px;
}

.track-panel .form-actions {
  margin-top: 22px;
}

.track-panel .notice {
  margin-top: 18px;
}

.stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 2px solid var(--drop);
  border-radius: var(--r-sm);
  color: var(--drop);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-9deg);
  pointer-events: none;
  mix-blend-mode: multiply;
}

[data-theme="dark"] .stamp {
  mix-blend-mode: normal;
}

.stamp.is-stamped {
  animation: stamp 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.stamp .icon {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.tips {
  display: grid;
  gap: 14px;
  margin-top: 40px;
}

.tip {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}

.tip .panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.tip .panel-icon .icon {
  width: 20px;
  height: 20px;
}

.tip h2 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.tip p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ============================================================== trackers + wishlist */

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat {
  position: relative;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  animation: rise-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.stat-num {
  display: block;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2.5px solid var(--line-2);
}

.stat.is-mint::after {
  border-color: var(--drop-bright);
}

.stat.is-brand::after {
  border-color: var(--brand);
}

.stat.is-warn::after {
  border-color: var(--warn-bright);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

@media (min-width: 760px) {
  .toolbar {
    position: sticky;
    top: calc(var(--topbar-h) + 1px);
    z-index: 6;
    margin-inline: -10px;
    padding: 10px;
    border-radius: 0 0 var(--r) var(--r);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

.filters {
  display: flex;
  gap: 2px;
  padding: 3px;
  max-width: 100%;
  overflow-x: auto;
  border: 0;
  border-radius: var(--r);
  background: var(--surface-3);
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-3);
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.filter:hover {
  color: var(--ink);
}

.filter[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgb(var(--shadow-rgb) / 0.14);
}

.filter .n {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--ink-3) 14%, transparent);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.filter[aria-pressed="true"] .n {
  background: var(--primary);
  color: var(--on-primary);
}

.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 280px;
  justify-content: flex-end;
}

.toolbar-right .input-icon {
  flex: 1 1 200px;
  max-width: 300px;
}

.toolbar-right input,
.toolbar-right select {
  min-height: 40px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
}

.toolbar-right select {
  flex: 0 1 210px;
  width: auto;
}

.cards {
  display: grid;
  gap: 16px;
  list-style: none;
}

.cards > .skeleton {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.tcard,
.wcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 16px 19px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease);
  animation: rise-in 0.5s var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
}
/* the verdict rule down the left edge: green below target, amber when ended */
.tcard::before,
.wcard::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: var(--rule, var(--line-2));
}


.tcard:hover,
.wcard:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.tcard:has(.menu[open]),
.wcard:has(.menu[open]) {
  z-index: 5;
}

.tcard.is-hit {
  --rule: var(--drop);
  border-color: color-mix(in srgb, var(--drop) 35%, var(--line));
  background: color-mix(in srgb, var(--drop) 5%, var(--surface));
}

/* a saved product: green when it got cheaper since you saved it, red when dearer */
.wcard:has(.change.is-down) {
  --rule: var(--drop);
}

.wcard:has(.change.is-up) {
  --rule: var(--rise);
}

.tcard.is-expired {
  --rule: var(--warn);
  background:
  repeating-linear-gradient(-45deg, transparent 0 12px, color-mix(in srgb, var(--warn-bright) 5%, transparent) 12px 24px),
  var(--surface);
}

.tcard.is-leaving,
.wcard.is-leaving {
  opacity: 0;
  transform: scale(0.96) translateY(6px);
}

.card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.card-media {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f4f6f9);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}

.tcard:hover .card-media img,
.wcard:hover .card-media img {
  transform: scale(1.06) rotate(-1deg);
}

.no-media .card-media {
  background:
    linear-gradient(135deg, var(--surface-3), var(--surface-2));
}

.card-head {
  flex: 1 1 auto;
  min-width: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.card-name {
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-menu {
  flex: 0 0 auto;
  margin: -4px -4px 0 0;
}

.card-menu > summary.icon-btn {
  width: 38px;
  height: 38px;
  border-color: transparent;
  background: transparent;
}

.card-menu > summary.icon-btn:hover,
.card-menu[open] > summary.icon-btn {
  background: var(--surface-3);
  border-color: var(--line);
}

.prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0 0;
  border-top: 1.5px dashed var(--line);
}

.price-cell dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.price-cell dd {
  margin-top: 3px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-cell.is-main dd {
  color: var(--ink);
  font-size: 1.42rem;
  font-weight: 800;
}

.price-cell.is-target dd {
  color: var(--drop);
}

.card-offer {
  margin-top: -8px;
  color: var(--drop);
  font-size: 0.85rem;
  font-weight: 650;
}

/* how far the price is from the target (app.js sets --fill 0..100) */
.meter {
  display: grid;
  gap: 8px;
}

.meter-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--fill, 0) * 1%);
  border-radius: inherit;
  background: var(--brand);
  animation: grow 1s 0.15s var(--ease) both;
  transform-origin: left;
}

.meter.is-hit .meter-bar span {
  background: linear-gradient(90deg, var(--drop-bright), var(--drop));
}

.meter-text {
  font-size: 0.85rem;
  color: var(--ink-2);
}

.meter-text b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.meter.is-hit .meter-text {
  color: var(--drop);
  font-weight: 650;
}

.meter.is-hit .meter-text b {
  color: var(--drop);
}

.inline-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  animation: rise-in 0.3s var(--ease) both;
}

.inline-edit label {
  display: grid;
  gap: 6px;
  flex: 1 1 160px;
  font-size: 0.82rem;
  font-weight: 650;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-foot .switch-label {
  font-size: 0.9rem;
}

.expiry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.expiry .icon {
  width: 15px;
  height: 15px;
}

.expiry.is-soon {
  color: var(--warn);
  font-weight: 650;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.card-note {
  color: var(--ink-3);
  font-size: 0.85rem;
}

.card-note:empty {
  display: none;
}

.change {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 600;
}

.change:empty {
  display: none;
}

.change.is-down {
  background: var(--drop-soft);
  color: var(--drop-ink);
}

.change.is-up {
  background: var(--rise-soft);
  color: var(--rise-ink);
}

.change b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.no-match {
  padding: 28px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-lg);
  color: var(--ink-3);
  text-align: center;
}

/* empty states */
.empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(36px, 6vw, 64px) 24px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-xl);
  text-align: center;
  animation: rise-in 0.5s var(--ease) both;
}

.empty h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  letter-spacing: -0.035em;
}

.empty p {
  max-width: 46ch;
  color: var(--ink-2);
}

.empty .btn {
  margin-top: 8px;
}

.empty-art {
  width: 150px;
  height: 120px;
  margin-bottom: 4px;
  overflow: visible;
}

.empty-art .tag-shape {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.empty-art .tag-hole {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 2.5;
}

.empty-art .tag-line {
  stroke: var(--line-2);
  stroke-width: 6;
  stroke-linecap: round;
}

.empty-art .tag-accent {
  fill: var(--brand);
}

.empty-art .spark-star {
  fill: var(--marker);
  stroke: var(--ink);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle 2.4s var(--ease-in-out) infinite;
}

.empty-art .spark-star:nth-of-type(2) {
  animation-delay: 0.8s;
}

.empty-art g.swing {
  transform-box: fill-box;
  transform-origin: 20% 20%;
  animation: swing 3.2s var(--ease-in-out) infinite;
}

/* ============================================================== notifications */

.timeline {
  display: grid;
  gap: 12px;
  list-style: none;
}

.timeline-day {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.timeline-day:first-child {
  margin-top: 0;
}

.timeline-day::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.note {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
  animation: rise-in 0.5s var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
}

.note.is-unread {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.note.is-unread::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: var(--brand);
}

.note-media {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.note-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.note.no-media .note-media {
  background: var(--drop-soft);
  border-color: transparent;
  color: var(--drop);
}

.note-media .icon {
  display: none;
  width: 26px;
  height: 26px;
}

.note.no-media .note-media .icon {
  display: block;
}

.note-body {
  flex: 1;
  min-width: 0;
}

.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.note-meta .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

.note-title {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.note-text {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.note .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ============================================================== alert settings */

.channels {
  display: grid;
  gap: 16px;
}

.channel {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3.5vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  animation: rise-in 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.channel-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.channel-head h2 {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.channel-head p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.channel-head .switch {
  margin-left: auto;
}

.channel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--r);
}

.channel-icon .icon {
  width: 24px;
  height: 24px;
}

.channel-icon.is-mail {
  background: var(--blue-soft);
  color: var(--blue);
}

.channel-icon.is-telegram {
  background: rgb(42 171 238 / 0.14);
  color: #1c9ad6;
}

.channel-icon.is-app {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.plain-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.telegram-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.telegram-info {
  display: grid;
  flex: 1 1 160px;
  min-width: 0;
}

.telegram-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connect-steps {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  counter-reset: connect;
  list-style: none;
}

.connect-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.connect-steps li::before {
  counter-increment: connect;
  content: counter(connect);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================== account */

.profile-id {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1.5px dashed var(--line);
}

.profile-id .avatar {
  flex: 0 0 auto;
}

.profile-id strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.profile-id div span {
  display: block;
  color: var(--ink-3);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.field-grid {
  display: grid;
  gap: 18px;
}

.category-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 22px;
}

.delete-steps {
  display: grid;
  gap: 18px;
  margin-top: 6px;
}

/* signed-in devices: tape rows, the current one carries the accent rule */
.devices {
  display: grid;
  gap: 8px;
  list-style: none;
}

.devices > .skeleton {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.sk-device {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
}

.device-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 17px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  animation: rise-in 0.4s var(--ease) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
}

.device-row::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  border-radius: var(--r) 0 0 var(--r);
  background: var(--line-2);
}

.device-row.is-current {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.device-row.is-current::before {
  background: var(--brand);
}

.device-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-2);
}

.device-row.is-current .device-icon {
  background: var(--brand-soft);
  color: var(--brand);
}

.device-icon .icon {
  width: 20px;
  height: 20px;
}

.device-info {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
}

.device-info strong {
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-meta {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.devices-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 16px;
}

@media (max-width: 599px) {
  /* icon and text stay side by side; the badge or button goes under the text */
  .device-row {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 8px;
  }

  .device-info {
    flex: 1 1 calc(100% - 52px);
  }

  .device-row [data-action="end"],
  .device-row [data-slot="current"] {
    margin-left: 52px;
  }
}

/* ============================================================== 404 + static pages */

.lost {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding-block: clamp(40px, 8vw, 96px);
  text-align: center;
}

.lost-art {
  width: min(420px, 90%);
  height: auto;
  overflow: visible;
}

.lost-art .axis {
  stroke: var(--line-2);
  stroke-width: 2;
}

.lost-art .fall {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: draw 1.8s 0.2s var(--ease-in-out) forwards;
}

.lost-art .node {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 3.5;
}

.lost-art .lens {
  transform-box: fill-box;
  transform-origin: center;
  animation: lens-search 3.6s 1.4s var(--ease-in-out) infinite;
}

.lost-art .lens-handle {
  fill: none;
  stroke: var(--ink);
  stroke-width: 10;
  stroke-linecap: round;
}

.lost-art .lens-glass {
  fill: var(--brand);
  stroke: var(--ink);
  stroke-width: 7;
}

.lost-art .lens-q {
  fill: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
}

.lost-art .code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 92px;
  letter-spacing: -6px;
  fill: var(--ink);
}

.lost h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  letter-spacing: -0.035em;
}

.lost p {
  max-width: 46ch;
  color: var(--ink-2);
}

.lost .row-actions {
  justify-content: center;
  margin-top: 10px;
}

.doc-head {
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1.5px dashed var(--line-2);
}

.doc-head h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.prose {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.2rem;
  color: var(--ink);
}

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

.prose ul,
.prose ol {
  display: grid;
  gap: 0.6em;
  padding-left: 0;
  list-style: none;
}

.prose ul li {
  position: relative;
  padding-left: 26px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2.5px solid var(--brand);
}

.prose ol {
  counter-reset: prose;
}

.prose ol li {
  position: relative;
  padding-left: 34px;
}

.prose ol li::before {
  counter-increment: prose;
  content: counter(prose);
  position: absolute;
  left: 0;
  top: 0.18em;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.prose a {
  font-weight: 600;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 700;
}

.mail-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mail-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ============================================================== small UX pieces */

/* the live check under the home link boxes */
.paste-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 600px;
  margin-top: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  animation: rise-in 0.3s var(--ease) both;
}

.paste-hint .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  stroke-width: 2.6;
}

.paste-hint.is-ok {
  color: var(--drop);
}

.paste-hint.is-bad {
  color: var(--warn-bright);
}

.cta-band .paste-hint {
  color: #ffffff;
}

.cta-form {
  display: grid;
}

/* "/" focuses the link box: shown on computers only, until the box is used */
.kbd {
  display: none;
  flex: 0 0 auto;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  transition: opacity 0.2s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .kbd {
    display: inline-grid;
  }
}

.paste input:not(:placeholder-shown) ~ .kbd,
.paste:focus-within .kbd {
  opacity: 0;
}

/* the cards' "Price history" button opens pricehistory.app */
.history-btn .icon-ext {
  width: 0.95em;
  height: 0.95em;
  margin-left: -2px;
  opacity: 0.55;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.history-btn:hover .icon-ext {
  opacity: 1;
  transform: translate(1px, -1px);
}

.history-btn .icon:first-child {
  color: var(--brand);
}

/* every button gives under the finger, like the app's press state */
.btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* ============================================================== scroll reveal */

.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

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

[data-d="1"] {
  --d: 1;
}

[data-d="2"] {
  --d: 2;
}

[data-d="3"] {
  --d: 3;
}

/* the sign-in page needs no "Sign in" button */
[data-page="login"] [data-signin-link] {
  display: none !important;
}

.stack-note .icon {
  width: 18px;
  height: 18px;
  color: var(--drop-bright);
}

.mini-note > span:last-child {
  font-size: 0.8rem;
}

.mini-note strong {
  font-size: 0.86rem;
}

.mail-card span {
  display: block;
}

/* ============================================================== responsive */

@media (min-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid .field-wide {
    grid-column: 1 / -1;
  }

  .tips {
    grid-template-columns: repeat(3, 1fr);
  }

  .tip {
    flex-direction: column;
  }

  .product {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .store-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento {
    grid-template-columns: repeat(6, 1fr);
  }

  .tile-a {
    grid-column: span 3;
    grid-row: span 2;
  }

  .tile-b,
  .tile-c {
    grid-column: span 3;
  }

  .tile-d,
  .tile-e,
  .tile-f {
    grid-column: span 2;
  }

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

  .faq-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 56px;
  }

  .cta-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }

  .channels .channel-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .mainnav {
    display: flex;
  }

  .tabbar {
    display: none;
  }

  html.has-session body {
    padding-bottom: 0;
  }

  html.has-session .toast-region {
    bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .toast-region {
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .hero-art {
    margin-right: 0;
  }

  .apps {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }

  .store-buttons {
    grid-template-columns: 1fr;
  }

  .auth {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 40px;
  }

  .auth-aside {
    display: block;
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
  }

  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .paste {
    flex-wrap: wrap;
    padding: 8px;
  }

  .paste-icon {
    display: none;
  }

  .paste input {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 10px;
  }

  .paste-btn {
    padding: 0 10px;
  }

  .paste .btn {
    flex: 1 1 100%;
  }

  .stats-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .stat {
    padding: 12px 10px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .stat::after {
    top: 12px;
    right: 10px;
    width: 8px;
    height: 8px;
  }

  .toolbar-right {
    flex-wrap: nowrap;
  }

  .product-media {
    max-width: 180px;
    margin-inline: auto;
  }

  .live-chip {
    font-size: 0.7rem;
    letter-spacing: 0;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-actions .btn {
    width: 100%;
  }

  .page-actions {
    width: 100%;
  }

  .card-foot {
    align-items: stretch;
  }

  .card-actions {
    margin-left: 0;
  }

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

  .price-cell.is-main dd {
    font-size: 1.2rem;
  }

  .price-cell dd {
    font-size: 1rem;
  }

  .stamp {
    top: 12px;
    right: 12px;
    font-size: 0.8rem;
  }

  .topbar-actions .btn {
    padding: 0 14px;
  }

  .brand-word {
    font-size: 1.15rem;
  }

  .toolbar-right .input-icon,
  .toolbar-right select {
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
  }

  .toolbar-right .input-icon {
    flex-grow: 1.5;
  }

  .toolbar-right select {
    padding-right: 34px;
    padding-left: 14px;
    background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
  }

  .hero-art {
    padding-inline: 0;
  }

  .sticker-1 {
    right: 4px;
  }
}

/* ============================================================== motion */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

  to {
    opacity: 1;
  }
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(2deg) scale(0.96);
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.95);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@keyframes toast-bar {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@keyframes badge-pop {
  from {
    transform: scale(0);
  }
}

@keyframes digit-pop {
  0% {
    transform: scale(0.85);
  }

  60% {
    transform: scale(1.06);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dash-march {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes dot-in {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ring {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes ping {
  0% {
    opacity: 0.8;
    transform: scale(0.6);
  }

  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes live {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--drop-bright) 60%, transparent);
  }

  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9) rotate(-3deg);
  }

  to {
    opacity: 1;
    transform: rotate(1.5deg);
  }
}

@keyframes ring-bell {
  0%,
  100% {
    transform: rotate(0);
  }

  15% {
    transform: rotate(16deg);
  }

  30% {
    transform: rotate(-14deg);
  }

  45% {
    transform: rotate(10deg);
  }

  60% {
    transform: rotate(-6deg);
  }
}

@keyframes sticker-in {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

@keyframes float-slow {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-40px, 30px) scale(1.08);
  }
}

@keyframes pulse-text {
  50% {
    transform: scale(1.06);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes knob {
  from {
    left: 22%;
  }

  to {
    left: 66%;
  }
}

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

@keyframes envelope {
  0% {
    transform: translateY(14px) rotate(-12deg) scale(0.6);
    opacity: 0;
  }

  60% {
    transform: translateY(-4px) rotate(4deg) scale(1.05);
    opacity: 1;
  }
}

@keyframes stamp {
  0% {
    opacity: 0;
    transform: rotate(-9deg) scale(2.4);
  }

  60% {
    opacity: 1;
    transform: rotate(-9deg) scale(0.92);
  }

  100% {
    opacity: 1;
    transform: rotate(-9deg) scale(1);
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
  }

  50% {
    transform: scale(0.7) rotate(20deg);
  }
}

@keyframes swing {
  0%,
  100% {
    transform: rotate(-4deg);
  }

  50% {
    transform: rotate(4deg);
  }
}

@keyframes tab-in {
  from {
    opacity: 0;
    transform: scaleX(0.3);
  }
}

@keyframes mark-draw {
  from {
    stroke-dashoffset: 42;
  }
}

@keyframes mark-pop {
  from {
    transform: scale(0);
  }
}

@keyframes lens-in {
  from {
    opacity: 0;
    transform: translate(-26px, -30px) scale(0.6) rotate(-20deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lens-search {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }

  35% {
    transform: translate(-46px, 10px) rotate(-8deg);
  }

  70% {
    transform: translate(10px, -8px) rotate(6deg);
  }
}

@keyframes fall-off {
  0% {
    transform: translate(0, 0);
  }

  30% {
    transform: translate(18px, -16px);
  }

  100% {
    transform: translate(64px, 150px);
    opacity: 0;
  }
}

/* the theme switch: the new theme grows as a circle from the button (theme.js sets --vt-x / --vt-y) */
html.theme-vt::view-transition-old(root) {
  animation: none;
}

html.theme-vt::view-transition-new(root) {
  animation: theme-reveal 0.6s var(--ease-in-out) both;
}

@keyframes theme-reveal {
  from {
    clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%));
  }

  to {
    clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0%));
  }
}

html.theme-fade *,
html.theme-fade *::before,
html.theme-fade *::after {
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), fill 0.35s var(--ease),
    stroke 0.35s var(--ease) !important;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .reveal-on [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }

}
