/* Northbeam Coffee Roasters — demo storefront (fictional brand)
   Expressive "dopamine" editorial commerce. Plain CSS, mobile-first.
   No external fonts, images or libraries. Sections map to Shopify Horizon-style
   theme blocks: announcement-bar, header, hero, product-grid, story, subscription,
   testimonials, newsletter, main-product, product-story, related-products, footer. */

/* ================= tokens ================= */
:root {
  color-scheme: light;

  /* hex first; oklch versions below for browsers that support them */
  --ink: #17110D;
  --ink-hover: #3B2F28;
  --paper: #FFFFFF;
  --paper-2: #F6F2EC;
  --line: #E4DDD4;
  --muted: #5A4D44;

  /* one saturated colour per origin / coffee */
  --eth: #FFC61A;   /* Ethiopia — sunflower */
  --ken: #EE4B2B;   /* Kenya — tomato */
  --col: #22B35E;   /* Colombia — vivid green */
  --sum: #5B1E5E;   /* Sumatra — deep plum */
  --house: #2747D9; /* House Blend — cobalt */
  --gua: #FF8A1F;   /* Guatemala — tangerine */
  --mid: #1D1A3A;   /* Midnight Espresso — midnight */
  --dec: #FF6FAE;   /* Decaf — pink */
  --green-deep: #11773B;

  --focus-ring: var(--ink);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 68px;

  /* SVG feTurbulence film grain (tiny, inline, no request) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.6 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Custom properties don't fall back on their own, so the oklch set is gated. */
@supports (color: oklch(50% 0.1 100)) {
  :root {
    --ink: oklch(18.4% 0.013 55.5);
    --paper-2: oklch(96.2% 0.009 75);
    --muted: oklch(43.1% 0.023 56.7);
    --eth: oklch(85.4% 0.171 86.9);
    --ken: oklch(63.9% 0.205 33);
    --col: oklch(67.5% 0.17 151.5);
    --sum: oklch(35.7% 0.123 325.9);
    --house: oklch(48% 0.224 266.9);
    --gua: oklch(74.8% 0.176 55.4);
    --mid: oklch(24% 0.06 285.2);
    --dec: oklch(73.4% 0.186 355.3);
  }
}
/* hover shades derived with relative colour syntax */
@supports (color: oklch(from red l c h)) {
  :root { --ink-hover: oklch(from var(--ink) calc(l + .16) c h); }
}

/* ================= reset ================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;
}
html:has(dialog:modal) { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:where(ul[class], ol[class], nav ul, nav ol) { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-underline-offset: .18em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
code, kbd { font-family: var(--mono); font-size: .92em; }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: inline; } }

.noscript { padding: 24px; background: var(--paper-2); border-radius: var(--radius); }

/* film grain: sits above a section's background, below its content */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain);
  background-size: 220px 220px;
  mix-blend-mode: multiply;
  opacity: .14;
  pointer-events: none;
}

/* ================= type ================= */
.eyebrow {
  font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.section__title {
  font-weight: 900; font-size: clamp(2.1rem, 5.6vw, 4rem);
  line-height: .98; letter-spacing: -0.035em;
}
.section__note { color: var(--muted); font-size: .95rem; margin-top: 10px; }

/* ================= buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 800; font-size: 1rem; line-height: 1.15; letter-spacing: -.005em;
  text-decoration: none; text-align: center;
  background: transparent; color: inherit;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn--primary, .btn--ink { background: var(--ink); color: #fff; }
.btn--primary:hover, .btn--ink:hover { background: var(--ink-hover); }
.btn--outline { border-color: currentColor; }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--eth); }
.btn--yellow { background: var(--eth); color: var(--ink); }
.btn--yellow:hover { background: #fff; }
.btn--link { background: none; border: 0; text-decoration: underline; font-weight: 700; padding: 0 8px; min-height: 44px; }
.btn--grow { flex: 1 1 auto; white-space: nowrap; }
.btn__sep { width: 1px; height: 18px; background: currentColor; opacity: .4; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 24px; height: 24px; }

/* ================= announcement-bar + header ================= */
.announce { background: var(--ink); color: #fff; font-size: .85rem; font-weight: 700; }
.announce__inner { padding-block: 9px; text-align: center; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-height: 44px; }
.logo__mark { width: 34px; height: 34px; }
.logo__text { font-weight: 900; font-size: 1.3rem; letter-spacing: -0.04em; line-height: 1; text-transform: uppercase; }
.logo__text small { display: block; font-size: .58rem; font-weight: 700; letter-spacing: .2em; margin-top: 3px; }

.site-nav { display: none; }
.site-nav ul { display: flex; flex-direction: column; }
.site-nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 14px;
  font-weight: 800; text-decoration: none; border-radius: 999px;
}
.site-nav a:hover { background: var(--eth); }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 2px solid var(--ink); padding: 8px 12px 16px;
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; border: 0; padding: 0; background: none; }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { min-height: 44px; }
  .logo { margin-right: 24px; }
  .site-nav { margin-right: auto; }
}

.cart-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper);
}
.cart-btn:hover { background: var(--eth); }
.cart-btn svg { width: 24px; height: 24px; }
.cart-btn__count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--ken); color: var(--ink); font-size: .75rem; font-weight: 900;
  border: 2px solid var(--ink);
}
.cart-btn__count.is-empty { display: none; }

/* ================= hero ================= */
.hero {
  background: var(--eth);
  overflow: clip;
  padding-block: 28px 64px;
}
.hero__inner { container-type: inline-size; position: relative; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ken); border: 2px solid var(--ink); }
.hero__title { margin-top: 14px; }
.hero__word {
  display: block;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: clamp(3.5rem, 15.6vw, 13rem);
  font-size: clamp(3.5rem, 16.2cqi, 14rem);
  line-height: .8;
  letter-spacing: -0.045em;
  margin-inline-start: -0.05em;
  transform-origin: 30% 100%;
}
.hero__line {
  display: block; margin-top: 18px; max-width: 20ch;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.45rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em;
}
.hero__grid { display: grid; gap: 8px; margin-top: 8px; }
.hero__lead { font-size: 1.08rem; max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; font-size: .9rem; }
.hero__trust li { border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; background: rgb(255 255 255 / .55); }
.hero__trust strong { font-weight: 900; }

.hero__stage { position: relative; order: -1; margin: 0; display: grid; justify-items: center; }
.hero__bag { width: min(64%, 420px); aspect-ratio: 240 / 300; rotate: 8deg; }
.hero__bag svg { width: 100%; height: 100%; filter: drop-shadow(10px 14px 0 rgb(23 17 13 / .9)); }
.hero__caption { margin-top: 6px; font-size: .9rem; }
.hero__caption a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }
.hero__caption a span:first-of-type { font-family: var(--serif); font-style: italic; font-weight: 700; }

@media (min-width: 768px) {
  .hero { padding-block: 40px 88px; }
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; gap: 32px; }
  .hero__stage { order: 0; margin-top: -20cqi; }
  .hero__bag { width: min(88%, 440px); }
}

/* ================= sections ================= */
.section { padding-block: 72px; }
@media (min-width: 900px) { .section { padding-block: 104px; } }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin-bottom: 36px; }
.section__head--stack { display: block; }

/* ---------- product-grid ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper);
  font-weight: 800; font-size: .95rem;
}
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); display: none; }
.chip--light::before { display: block; background: var(--eth); }
.chip--medium::before { display: block; background: var(--col); }
.chip--dark::before { display: block; background: var(--sum); }
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[aria-pressed="true"]::before { border-color: #fff; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 24px; } }
@media (min-width: 1140px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { position: relative; display: flex; flex-direction: column; container-type: inline-size; }
.card__media {
  display: grid; place-items: center;
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background: var(--tint, var(--paper-2));
  overflow: hidden;
}
@supports (color: oklch(from red l c h)) {
  .card__media { background: oklch(from var(--c) .93 calc(c * .5) h); }
  .card__media.grain::before { opacity: .1; }
}
.card__bag { display: block; width: 74%; aspect-ratio: 240 / 300; }
.card__bag svg { width: 100%; height: 100%; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--ink); color: #fff;
  font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.badge--lg { top: 18px; left: 18px; font-size: .78rem; padding: 6px 12px; }
.card__body { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; flex: 1; }
.card__origin { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card__origin::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid var(--ink); flex: none; }
.card__title { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.28rem; line-height: 1.15; letter-spacing: -0.01em; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__notes { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.card__roast { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; margin-top: 2px; }
.card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.card__price { font-weight: 900; font-size: 1.1rem; }
.card__unit { font-weight: 600; font-size: .82rem; color: var(--muted); }
@container (max-width: 230px) {
  .card__add-long { display: none; }
  .card__foot .btn { flex: 1; }
  .card__title { font-size: 1.12rem; }
}

.meter { display: inline-flex; gap: 3px; }
.meter__dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.meter__dot.is-on { background: var(--ink); }

/* ---------- story (origin stories) ---------- */
.story__intro { padding-block: 72px 48px; }
.story__lead { max-width: 46ch; font-size: 1.1rem; margin-top: 16px; }
.origin { background: var(--c); color: var(--on); overflow: clip; }
.origin[data-origin="eth"] { --c: var(--eth); --on: var(--ink); }
.origin[data-origin="ken"] { --c: var(--ken); --on: var(--ink); }
.origin[data-origin="col"] { --c: var(--col); --on: var(--ink); }
.origin[data-origin="sum"] { --c: var(--sum); --on: #fff; --focus-ring: #fff; }
.origin__inner {
  display: grid; gap: 28px;
  grid-template-areas: "head" "text" "art";
  padding-block: 64px 72px;
}
.origin__head { grid-area: head; }
.origin__text { grid-area: text; max-width: 36rem; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.origin__art { grid-area: art; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: 16px; }
.origin__num { font-family: var(--mono); font-weight: 700; font-size: .9rem; }
.origin__num span { font-weight: 400; }
.origin__name {
  font-weight: 900; text-transform: uppercase;
  font-size: clamp(3.2rem, 15vw, 12rem); line-height: .82; letter-spacing: -0.05em;
  margin-inline-start: -0.04em;
}
.origin__lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.1; }
.origin__facts { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 12px; border-block: 2px solid currentColor; width: 100%; }
.origin__facts dt { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.origin__facts dd { font-weight: 700; }
.origin__bag { width: 100%; aspect-ratio: 240 / 300; }
.origin__bag svg { width: 100%; height: 100%; filter: drop-shadow(8px 10px 0 rgb(23 17 13 / .85)); }
.origin__map { display: grid; gap: 6px; }
.origin__map .belt { width: 100%; height: auto; }
.origin__coords { font-family: var(--mono); font-size: .8rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.origin__coords span { font-family: var(--sans); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; }
@media (min-width: 900px) {
  .origin__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "head head" "text art";
    column-gap: 56px; align-items: center;
    min-height: min(86vh, 860px); align-content: center;
    padding-block: 88px;
  }
  .origin:nth-of-type(even) .origin__inner { grid-template-areas: "head head" "art text"; }
  .origin:nth-of-type(even) .origin__head { text-align: end; }
  .origin__art { grid-template-columns: 1fr; justify-items: center; }
  .origin__bag { width: min(100%, 330px); rotate: -4deg; }
  .origin:nth-of-type(even) .origin__bag { rotate: 5deg; }
  .origin__map { width: min(100%, 420px); }
}

/* ---------- subscription ---------- */
.subscription { background: var(--house); color: #fff; --focus-ring: #fff; }
.subscription__inner { display: grid; gap: 40px; }
.eyebrow--on-dark { color: #fff; }
.subscription__title { font-weight: 900; font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: .95; letter-spacing: -0.04em; max-width: 12ch; }
.subscription__lead { font-size: 1.1rem; max-width: 44ch; margin-top: 18px; }
.checks { display: grid; gap: 10px; margin: 24px 0 32px; font-weight: 600; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--eth) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2317110D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.steps { display: grid; gap: 14px; align-content: center; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: #fff; color: var(--ink); border-radius: var(--radius); padding: 22px;
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.step__n {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--eth); border: 2px solid var(--ink); font-weight: 900; font-size: 1.3rem;
}
.step h3 { font-size: 1.15rem; font-weight: 900; letter-spacing: -0.01em; }
.step p { color: var(--muted); }
@media (min-width: 900px) {
  .subscription__inner { grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }
  .step:nth-child(2) { margin-left: 32px; }
  .step:nth-child(3) { margin-left: 64px; }
}

/* ---------- testimonials ---------- */
.reviews__list { display: grid; gap: 18px; }
@media (min-width: 900px) { .reviews__list { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.review { border-radius: var(--radius); padding: 28px; border: 2px solid var(--ink); background: var(--paper-2); }
@supports (color: oklch(from red l c h)) {
  .review { background: oklch(from var(--c) .94 calc(c * .35) h); }
}
.review figure { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.stars { font-size: 1.15rem; letter-spacing: 2px; }
.stars__off { font-weight: 400; }
.review blockquote { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.4; }
.review figcaption { margin-top: auto; display: flex; flex-direction: column; font-size: .9rem; }
.review figcaption span { color: var(--muted); }

/* ---------- newsletter ---------- */
.newsletter { background: var(--dec); }
.newsletter__inner { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .newsletter__inner { grid-template-columns: 1fr 1fr; gap: 64px; } }
.newsletter__title { font-weight: 900; font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: .95; letter-spacing: -0.04em; margin-bottom: 14px; }
.newsletter__label { display: block; font-weight: 800; margin-bottom: 8px; }
.newsletter__row { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter__row input {
  flex: 1 1 220px; min-height: 52px; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
}
.newsletter__row input:focus-visible { outline-offset: 2px; }
.newsletter__row input[aria-invalid="true"] { border-color: #8E1B07; box-shadow: 0 0 0 2px #8E1B07; }
.newsletter__row .btn { min-height: 52px; }
.field-error { margin-top: 8px; font-weight: 800; color: var(--ink); background: #fff; display: inline-block; padding: 4px 10px; border-radius: 8px; }
.newsletter__hint { margin-top: 8px; font-size: .88rem; }
.newsletter__thanks { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; }
.newsletter__thanks-title { font-weight: 900; font-size: 1.2rem; }

/* ================= footer ================= */
.site-footer { background: var(--ink); color: #fff; padding-top: 64px; overflow: clip; --focus-ring: var(--eth); }
.footer__grid { display: grid; gap: 36px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr); } }
.footer__word {
  font-weight: 900; text-transform: uppercase; color: var(--eth);
  font-size: clamp(2.6rem, 7vw, 6.6rem);
  font-size: min(16cqi, 8rem); line-height: .82; letter-spacing: -0.05em; margin-bottom: 18px; white-space: nowrap;
}
.footer__brand { container-type: inline-size; }
.footer__brand p { margin-bottom: 6px; }
.footer__title { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--eth); margin-bottom: 8px; }
.footer__col a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.footer__col a:hover { text-decoration: underline; }
.footer__bottom { margin-top: 48px; padding-block: 24px 32px; border-top: 1px solid rgb(255 255 255 / .25); display: grid; gap: 8px; font-size: .88rem; }
.footer__demo strong { color: var(--eth); }

/* ================= product page ================= */
.crumbs { padding-block: 18px 14px; font-size: .88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { display: flex; align-items: center; gap: 4px; }
.crumbs li + li::before { content: "/"; opacity: .5; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }
.crumbs [aria-current] { font-weight: 800; }

.pdp { display: grid; gap: 28px; padding-bottom: 64px; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; padding-bottom: 96px; }
  .pdp__gallery { position: sticky; top: calc(var(--header-h) + 20px); }
}
.gallery__main {
  position: relative; container-type: inline-size;
  aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--tint, var(--paper-2));
}
@supports (color: oklch(from red l c h)) {
  .gallery__main { background: oklch(from var(--c) .93 calc(c * .5) h); }
  .thumb { background: oklch(from var(--c) .95 calc(c * .4) h); }
}
.gallery__code {
  position: absolute; left: 0; right: 0; bottom: -0.14em;
  text-align: center; white-space: nowrap;
  font-weight: 900; font-size: 46cqi; line-height: 1; letter-spacing: -0.06em;
  color: var(--c);
}
.gallery__bag { position: relative; z-index: 1; width: 56%; aspect-ratio: 240 / 300; rotate: -5deg; }
.gallery__bag svg { width: 100%; height: 100%; filter: drop-shadow(10px 12px 0 rgb(23 17 13 / .85)); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumb {
  aspect-ratio: 1; padding: 8px; border-radius: 14px; border: 2px solid transparent;
  background: var(--tint, var(--paper-2)); display: grid; place-items: center;
}
.thumb svg { width: 74%; height: 100%; }
.thumb:hover { border-color: var(--line); }
.thumb[aria-pressed="true"] { border-color: var(--ink); }

.pdp__info .eyebrow { margin-bottom: 8px; }
.pdp__title {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -0.02em;
}
.pdp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 14px; font-size: 1.7rem; font-weight: 900; }
.pdp__compare { font-size: 1.05rem; font-weight: 600; color: var(--muted); }
.pdp__unit { font-size: .95rem; font-weight: 600; color: var(--muted); }
.pill { font-size: .78rem; font-weight: 900; padding: 4px 10px; border-radius: 999px; background: var(--col); color: var(--ink); align-self: center; }
.pdp__blurb { margin-top: 14px; font-size: 1.08rem; max-width: 46ch; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.notes li { font-family: var(--serif); font-style: italic; font-size: 1.02rem; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--c); color: var(--on); }
.pdp__roast { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 700; font-size: .92rem; }

.buy { margin-top: 26px; display: grid; gap: 22px; }
.opt__label { display: block; font-weight: 900; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }

/* size cards: selection styled with :has(), no JS */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg__item { position: relative; cursor: pointer; }
.seg__item input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__body {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 76px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 14px; text-align: center;
}
.seg__body strong { font-size: 1.05rem; font-weight: 900; }
.seg__body small { font-size: .85rem; font-weight: 700; }
.seg__body .seg__cups { font-weight: 500; color: var(--muted); font-size: .76rem; }
.seg__item:hover .seg__body { border-color: var(--ink); }
.seg__item:has(input:checked) .seg__body { border-color: var(--ink); background: var(--c); color: var(--on); box-shadow: 4px 4px 0 var(--ink); }
.seg__item:has(input:checked) .seg__cups { color: inherit; }
.seg__item:has(input:focus-visible) .seg__body { outline: 3px solid var(--ink); outline-offset: 3px; }

/* purchase option cards */
.plans { display: grid; gap: 10px; }
.plan {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px;
}
.plan input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.plan__body { flex: 1; display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }
.plan__name small { display: block; font-weight: 500; color: var(--muted); font-size: .86rem; }
.plan:hover { border-color: var(--ink); }
.plan:has(input:checked) { border-color: var(--ink); background: var(--paper-2); box-shadow: 4px 4px 0 var(--ink); }
@supports (color: oklch(from red l c h)) {
  .plan:has(input:checked) { background: oklch(from var(--c) .95 calc(c * .3) h); }
}
/* frequency only matters for subscriptions (shown everywhere if :has() is missing) */
@supports selector(:has(*)) {
  .opt--freq { display: none; }
  .buy:has(input[name="plan"][value="sub"]:checked) .opt--freq { display: block; }
}

/* selects: native first ... */
.grind, .native-select {
  width: 100%; min-height: 52px; padding: 0 48px 0 16px;
  border: 2px solid var(--ink); border-radius: 14px; background: #fff;
  font-weight: 700; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2317110D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
/* ... then the customizable <select> where supported (icons in each option) */
@supports (appearance: base-select) {
  .grind, .grind::picker(select) { appearance: base-select; }
  .grind { display: flex; align-items: center; padding: 6px 14px 6px 8px; background-image: none; }
  .grind::picker-icon { content: ""; width: 20px; height: 20px; background: currentColor; transition: rotate .2s;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .grind:open::picker-icon { rotate: 180deg; }
  .grind__button { display: flex; align-items: center; flex: 1; border: 0; background: none; padding: 0; }
  .grind selectedcontent { display: flex; align-items: center; gap: 12px; }
  .grind::picker(select) {
    border: 2px solid var(--ink); border-radius: 16px; padding: 6px; margin-block: 6px;
    background: #fff; box-shadow: 6px 6px 0 var(--ink);
  }
  .grind option { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-weight: 700; min-height: 48px; }
  .grind option:hover, .grind option:focus-visible { background: var(--paper-2); }
  .grind option:checked { background: var(--c); color: var(--on); }
  .grind option::checkmark { order: 2; margin-inline-start: auto; }
  .grind__icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--c); color: var(--on); border: 2px solid var(--ink); flex: none; }
  .grind option:checked .grind__icon { background: #fff; color: var(--ink); }
  .grind__icon svg { width: 18px; height: 18px; }
}

.buy__row { display: flex; flex-wrap: wrap; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.qty__btn { display: grid; place-items: center; width: 48px; height: 52px; border: 0; background: none; border-radius: 999px; }
.qty__btn svg { width: 18px; height: 18px; }
.qty__btn:disabled { opacity: .35; cursor: not-allowed; }
.qty__input { width: 40px; border: 0; text-align: center; font-weight: 900; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm .qty__btn { width: 44px; height: 44px; }
.qty__val { min-width: 24px; text-align: center; font-weight: 900; }

/* delivery estimate + anchored popover */
.delivery { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--paper-2); display: grid; gap: 4px; }
.eta { display: flex; gap: 10px; align-items: flex-start; }
.eta svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.eta__dates { color: var(--muted); font-weight: 500; }
.delivery__ship { padding-left: 32px; font-size: .92rem; }
.why {
  anchor-name: --why;
  justify-self: start; margin-left: 32px; min-height: 44px; padding: 0;
  background: none; border: 0; font-weight: 800; text-decoration: underline; text-underline-offset: .2em;
}
.why-pop {
  width: min(340px, calc(100vw - 32px));
  border: 2px solid var(--ink); border-radius: 18px; padding: 18px;
  background: #fff; color: var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.why-pop p + p { margin-top: 6px; }
.why-pop .btn { margin-top: 14px; }
.why-pop__title { font-weight: 900; }
/* anchored next to its button where supported (and where there is room);
   otherwise the browser's default centred popover is the fallback */
@supports (position-area: bottom) {
  @media (min-width: 600px) {
  .why-pop {
    position-anchor: --why;
    inset: auto; margin: 8px 0 0;
    position-area: bottom span-right;
    position-try-fallbacks: flip-block, --left;
  }
  }
}
@position-try --left { position-area: bottom span-left; }

/* express checkout placeholders */
.express { margin-top: 18px; }
.express__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 900; font-size: .9rem; }
.tag { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 2px dashed var(--ink); }
.express__btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.express__btn {
  min-height: 48px; border-radius: 12px; border: 2px dashed #B9AEA4; background: #F1EEE9; color: #6B625B;
  font-weight: 800; font-size: .88rem; cursor: not-allowed;
}
.express__note { margin-top: 8px; font-size: .84rem; color: var(--muted); }

.perks { display: grid; gap: 12px; margin-top: 22px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; }
.perks svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }

.accordion { margin-top: 26px; border-top: 2px solid var(--ink); }
.accordion details { border-bottom: 2px solid var(--ink); }
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; min-height: 56px;
  font-weight: 900; cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.5rem; font-weight: 500; }
.accordion details[open] summary::after { content: "–"; }
.accordion__body { padding-bottom: 18px; display: grid; gap: 10px; }

/* product-story band — full-bleed origin colour */
.pdp-band { background: var(--c); color: var(--on); padding-block: 72px; overflow: clip; }
.pdp-band__inner { display: grid; gap: 40px; }
@media (min-width: 900px) { .pdp-band { padding-block: 112px; } .pdp-band__inner { grid-template-columns: 1.3fr .7fr; gap: 72px; align-items: end; } }
.pdp-band__kicker { font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pdp-band__notes {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: .98; letter-spacing: -0.03em; margin-top: 14px;
}
.pdp-band__notes span { display: inline; }
.pdp-band__notes span + span::before { content: "· "; font-style: normal; }
.pdp-band__text { margin-top: 22px; font-size: 1.1rem; max-width: 44ch; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.specs div { padding-block: 12px; border-top: 2px solid currentColor; }
.specs dt { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.specs dd { font-weight: 700; }

.related { background: var(--paper); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 800; }
@media (min-width: 900px) { .grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.notfound { padding-block: 48px 72px; display: grid; gap: 16px; justify-items: start; }
.notfound__title { font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.03em; line-height: 1; }

/* sticky mobile add-to-cart bar */
.sticky-atc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 2px solid var(--ink);
  translate: 0 110%; visibility: hidden;
}
.sticky-atc.is-visible { translate: 0 0; visibility: visible; }
.sticky-atc__info { flex: 1; min-width: 0; }
.sticky-atc__name { font-family: var(--serif); font-style: italic; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-atc__meta { font-size: .85rem; font-weight: 700; }
@media (max-width: 480px) {
  .qty__btn { width: 40px; }
  .qty__input { width: 30px; }
  .buy .btn--grow { padding-inline: 18px; gap: 8px; }
}
@media (max-width: 899.98px) {
  html.has-sticky-atc { scroll-padding-bottom: 96px; }
  html.has-sticky-atc body { padding-bottom: 76px; }
}
@media (min-width: 900px) { .sticky-atc { display: none; } }

/* ================= accessibility statement page ================= */
.prose { max-width: 760px; padding-bottom: 96px; }
.prose__title { font-weight: 900; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: .95; letter-spacing: -0.04em; margin-top: 12px; }
.prose__lead { font-size: 1.15rem; margin-top: 18px; }
.prose h2 { font-weight: 900; font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 40px; margin-bottom: 10px; }
.prose ul { padding-left: 1.2em; display: grid; gap: 8px; }
.prose__meta { margin-top: 32px; color: var(--muted); }

/* ================= cart drawer (<dialog>) ================= */
dialog { color: var(--ink); }
.drawer {
  inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
  width: min(440px, 100vw); max-width: 100vw; height: 100%; max-height: 100%;
  background: var(--paper); border-left: 2px solid var(--ink);
}
.drawer::backdrop { background: rgb(23 17 13 / .55); }
.drawer__panel { height: 100%; display: flex; flex-direction: column; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 22px; }
.drawer__title { font-weight: 900; font-size: 1.5rem; letter-spacing: -0.03em; }
.drawer__count { font-weight: 600; color: var(--muted); font-size: 1.1rem; }
.ship { margin: 0 22px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); border: 2px solid var(--ink); }
.ship.is-complete { background: #D6F5E1; }
.ship__msg { display: flex; gap: 10px; align-items: center; font-size: .94rem; }
.ship__msg svg { width: 22px; height: 22px; flex: none; }
.ship__bar {
  display: block; width: 100%; height: 12px; margin-top: 10px;
  -webkit-appearance: none; appearance: none; border: 2px solid var(--ink); border-radius: 999px;
  background: #fff; overflow: hidden; color: var(--ken);
}
.ship__bar::-webkit-progress-bar { background: #fff; border-radius: 999px; }
.ship__bar::-webkit-progress-value { background: var(--ken); border-radius: 999px; }
.ship__bar::-moz-progress-bar { background: var(--ken); border-radius: 999px; }
.ship__bar.is-complete::-webkit-progress-value { background: var(--green-deep); }
.ship__bar.is-complete::-moz-progress-bar { background: var(--green-deep); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 22px; overscroll-behavior: contain; }
.cart-list { display: grid; }
.cart-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.cart-item__img { display: grid; place-items: center; width: 76px; height: 92px; border-radius: 12px; background: var(--tint); }
.cart-item__img svg { width: 78%; height: auto; }
.cart-item__info { min-width: 0; display: grid; gap: 2px; align-content: start; }
.cart-item__name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.08rem; line-height: 1.2; text-decoration: none; }
.cart-item__name:hover { text-decoration: underline; }
.cart-item__meta { font-size: .85rem; color: var(--muted); }
.cart-item__save { font-size: .8rem; font-weight: 800; color: var(--green-deep); }
.cart-item__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.cart-item__remove { min-height: 44px; padding: 0 4px; background: none; border: 0; text-decoration: underline; font-size: .88rem; font-weight: 600; }
.cart-item__price { font-weight: 900; }
.cart-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 12px; text-align: center; }
.cart-empty svg { width: 120px; }
.cart-empty__title { font-weight: 900; font-size: 1.2rem; }
.cart-empty__text { color: var(--muted); margin-bottom: 8px; }
.drawer__foot { padding: 14px 22px 18px; border-top: 2px solid var(--ink); display: grid; gap: 10px; }
.drawer__foot .eta { font-size: .9rem; }
.totals { display: grid; gap: 2px; }
.totals div { display: flex; justify-content: space-between; }
.totals dd { font-weight: 700; }
.totals__total { font-weight: 900; font-size: 1.12rem; padding-top: 4px; }
.totals__total dd { font-weight: 900; }
.drawer__note { font-size: .82rem; color: var(--muted); }
.drawer__guest { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .86rem; font-weight: 700; }
.drawer__guest svg { width: 18px; height: 18px; }
.drawer__foot form { display: flex; justify-content: center; }

.modal {
  width: min(440px, calc(100vw - 32px)); padding: 28px; border: 2px solid var(--ink); border-radius: 24px;
  background: var(--paper); box-shadow: 10px 10px 0 var(--ink); text-align: center;
}
.modal::backdrop { background: rgb(23 17 13 / .55); }
.modal__x { position: absolute; top: 10px; right: 10px; }
.modal__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%; background: var(--eth); border: 2px solid var(--ink); }
.modal__icon svg { width: 28px; height: 28px; }
.modal__title { font-weight: 900; font-size: 1.4rem; letter-spacing: -0.02em; }
.modal__text { margin-top: 10px; }
.modal__text--small { font-size: .9rem; color: var(--muted); }
.modal__actions { margin-top: 20px; display: flex; justify-content: center; }

/* ================= motion (max 2–3 moments per page) ================= */
@keyframes card-in { from { opacity: 0; translate: 0 28px; } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes hero-open { to { letter-spacing: .06em; scale: 1.14; } }
@keyframes hero-bag { to { rotate: 20deg; translate: 0 -10%; } }
@keyframes bump { 50% { scale: 1.35; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* 1 — cross-document view transition: the bag flies from card to product page */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-group(nb-bag) { animation-duration: .55s; animation-timing-function: var(--ease); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

  /* 2 — same-document view transition for the roast filter + staggered cards */
  html.vt-filtering .grid { view-transition-name: product-grid; }
  ::view-transition-old(product-grid) { animation: vt-fade-out .18s ease-out both; }
  ::view-transition-new(product-grid) { animation: none; }
  ::view-transition-group(product-grid) { animation-duration: .35s; }
  .grid.is-filtered > .card {
    animation: card-in .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 70ms);            /* inline --i fallback */
  }
  @supports (order: sibling-index()) {
    .grid.is-filtered > .card { animation-delay: calc((sibling-index() - 1) * 70ms); }
  }

  /* 3 — hero word "opens" as you scroll (scroll-driven, no JS) */
  @supports (animation-timeline: view()) {
    .hero { view-timeline: --hero block; }
    .hero__word { animation: hero-open linear both; animation-timeline: --hero; animation-range: exit 0% exit 80%; }
    .hero__bag { animation: hero-bag linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
  }

  /* small UI feedback (not "moments") */
  .card__bag { transition: translate .35s var(--ease), rotate .35s var(--ease); }
  @media (hover: hover) {
    .card:hover .card__bag { translate: 0 -6px; rotate: -3deg; }
  }
  .cart-btn__count.is-bumped { animation: bump .35s var(--ease); }
  .sticky-atc { transition: translate .3s var(--ease), visibility .3s; }

  /* drawer + dialog enter/exit with @starting-style */
  .drawer { transition: translate .35s var(--ease), overlay .35s allow-discrete, display .35s allow-discrete; translate: 100% 0; }
  .drawer[open] { translate: 0 0; }
  @starting-style { .drawer[open] { translate: 100% 0; } }
  .modal { transition: opacity .25s, scale .25s var(--ease), overlay .25s allow-discrete, display .25s allow-discrete; opacity: 0; scale: .96; }
  .modal[open] { opacity: 1; scale: 1; }
  @starting-style { .modal[open] { opacity: 0; scale: .96; } }
  .drawer::backdrop, .modal::backdrop { transition: opacity .3s, overlay .3s allow-discrete, display .3s allow-discrete; opacity: 0; }
  .drawer[open]::backdrop, .modal[open]::backdrop { opacity: 1; }
  @starting-style { .drawer[open]::backdrop, .modal[open]::backdrop { opacity: 0; } }
}

@media (forced-colors: active) {
  .chip[aria-pressed="true"], .seg__item:has(input:checked) .seg__body, .plan:has(input:checked) { outline: 3px solid Highlight; }
  .grain::before { display: none; }
}
