/* =========================================================================
   Riffly — storefront styles
   Plain CSS, no build step. Organized: tokens, base, layout, components.
   ========================================================================= */

:root {
  /* Palette — warm paper, rust accent, pine for "available/ok" */
  --paper:      #faf6ee;
  --surface:    #ffffff;
  --surface-2:  #f2ebdd;
  --ink:        #211d17;
  --ink-2:      #5f574a;
  --ink-3:      #8a8072;
  --line:       #e5dccb;
  --line-2:     #d8cdb7;
  --brand:      #bd4b22;
  --brand-2:    #9a3a17;
  --pine:       #2f5d4f;
  --pine-soft:  #e4ede8;
  --amber:      #9c6f1c;
  --amber-soft: #f4e9cf;
  --sold:       #8a8072;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(33,29,23,.06), 0 3px 10px rgba(33,29,23,.05);
  --shadow-2: 0 10px 34px rgba(33,29,23,.14);

  --wrap: 1120px;
  --step: clamp(1rem, 0.85rem + 0.6vw, 1.25rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--sans);
  font-size: var(--step);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }

h1, h2, h3 { font-family: var(--serif); font-weight: 550; line-height: 1.15; letter-spacing: -0.01em; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

.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;
}

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--ink);
  --_fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.15em;
  background: var(--_bg); color: var(--_fg);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { --_bg: var(--brand); --_fg: #fff; }
.btn--primary:hover { --_bg: var(--brand-2); color: #fff; }
.btn--ghost {
  --_bg: transparent; --_fg: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { --_bg: var(--surface-2); color: var(--ink); }
.btn--sm { padding: .5em .8em; font-size: .85rem; border-radius: 7px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; pointer-events: none; transform: none;
}
.btn.is-added { --_bg: var(--pine); --_fg: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px; padding-block: .6rem;
}
.brand {
  display: inline-flex; align-items: baseline; gap: .1rem;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.brand__dot { color: var(--brand); }
.site-nav { display: flex; gap: 1.25rem; margin-left: 1rem; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .85rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  cursor: pointer; font-weight: 600; font-size: .9rem;
}
.cart-btn:hover { border-color: var(--ink-3); }
.cart-btn__count {
  display: grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding-inline: .35rem;
  background: var(--brand); color: #fff; border-radius: var(--radius-pill);
  font-size: .78rem; font-weight: 700;
}
.cart-btn__count:empty, .cart-btn__count[data-count="0"] { display: none; }
.site-nav + .cart-btn { margin-left: 0; }
.site-header__inner > .cart-btn { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-2);
}
.hero__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand); }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.5vw, 3.6rem); margin-block: .5rem .6rem; max-width: 16ch; }
.hero p { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* ---------- Trust strip ---------- */
.trust {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}
.trust__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
}
.trust__item {
  background: var(--surface-2); padding: 1rem clamp(.75rem, 2vw, 1.25rem);
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .88rem; color: var(--ink-2);
}
.trust__item svg { flex: none; width: 20px; height: 20px; color: var(--pine); margin-top: .1rem; }
.trust__item strong { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ---------- Section header ---------- */
.section { padding-block: clamp(2rem, 5vw, 3.25rem); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: .75rem; margin-bottom: 1.25rem;
}
.section__head h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
.section__head p { color: var(--ink-3); font-size: .92rem; }

/* ---------- Filters ---------- */
.filters {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-block: 1rem; margin-bottom: 1.5rem;
  border-block: 1px solid var(--line);
}
.pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill {
  padding: .4rem .85rem; border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-2); font-size: .85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .12s ease;
}
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters__sort { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink-3); }
.select {
  padding: .45rem 2rem .45rem .7rem; border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235f574a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .6rem center;
  font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer;
  appearance: none; -webkit-appearance: none;
}

/* ---------- Product grid ---------- */
.grid {
  display: grid; gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__link { position: absolute; inset: 0; z-index: 1; }
.card__body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.card__eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.card__title { font-family: var(--serif); font-size: 1.08rem; font-weight: 550; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__spacer { flex: 1; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.card__price { font-weight: 700; font-size: 1.05rem; }
.card__ship { font-size: .78rem; color: var(--ink-3); }
.card__cta { position: relative; z-index: 2; margin-top: .85rem; }

/* Condition badge */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .6rem; border-radius: var(--radius-pill);
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--excellent { background: var(--pine-soft); color: var(--pine); border-color: transparent; }
.badge--very-good { background: var(--pine-soft); color: var(--pine); border-color: transparent; }
.badge--good      { background: var(--surface-2); color: var(--ink-2); }
.badge--fair,
.badge--varies    { background: var(--amber-soft); color: var(--amber); border-color: transparent; }

/* Sold ribbon */
.card.is-sold { opacity: .92; }
.card.is-sold .card__media img { filter: grayscale(.55) contrast(.95); }
.ribbon {
  position: absolute; top: 14px; right: -34px; z-index: 2;
  transform: rotate(45deg);
  background: var(--ink); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  padding: .3rem 3rem; text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ---------- Item detail ---------- */
.crumbs { display: flex; gap: .5rem; align-items: center; font-size: .82rem; color: var(--ink-3); padding-block: 1.25rem .25rem; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-hidden] { color: var(--line-2); }

.item {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  padding-block: 1.5rem clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}
.gallery { position: sticky; top: 92px; display: flex; flex-direction: column; gap: .75rem; }
.gallery__main {
  aspect-ratio: 1 / 1; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: .6rem; }
.gallery__thumb {
  width: 74px; aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: 9px;
  overflow: hidden; cursor: pointer; background: var(--surface-2); padding: 0;
}
.gallery__thumb[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }

.item__info { display: flex; flex-direction: column; gap: 1rem; }
.item__eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.item__title { font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.5rem); }
.item__price-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.item__price { font-size: 1.6rem; font-weight: 700; }
.item__desc { color: var(--ink-2); }
.item__cond {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .9rem 1rem; background: var(--surface-2); border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2);
}
.item__cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }
.item__cta-row .btn { flex: 1 1 auto; min-width: 180px; }

.item__lot {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--ink-3); font-family: var(--sans);
}
.item__lot svg { width: 15px; height: 15px; }

.spec-list { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: .5rem; border-top: 1px solid var(--line); }
.spec-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.spec-list dt { color: var(--ink-3); }
.spec-list dd { color: var(--ink); font-weight: 550; text-align: right; }

.fineprint { font-size: .82rem; color: var(--ink-3); line-height: 1.6; }

/* ---------- Notice pages (success / cancel / 404) ---------- */
.notice-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.notice-page__inner { max-width: 34rem; }
.notice-page__icon {
  width: 60px; height: 60px; margin: 0 auto 1.25rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--pine-soft); color: var(--pine);
}
.notice-page__icon svg { width: 30px; height: 30px; }
.notice-page h1 { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem); margin-bottom: .6rem; }
.notice-page p { color: var(--ink-2); margin-bottom: 1.5rem; }
.notice-page .btn + .btn { margin-left: .5rem; }

/* ---------- Cart drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(20,16,10,.42);
  opacity: 0; transition: opacity .25s ease;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(430px, 100vw); background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-2);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line);
}
.drawer__head h2 { font-size: 1.2rem; }
.drawer__close {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer;
}
.drawer__close:hover { background: var(--surface-2); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer__empty { text-align: center; color: var(--ink-3); padding: 3rem 1rem; }
.drawer__empty svg { width: 40px; height: 40px; margin: 0 auto 1rem; color: var(--line-2); }

.line-item { display: grid; grid-template-columns: 60px 1fr auto; gap: .85rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.line-item__media { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.line-item__media img { width: 100%; height: 100%; object-fit: cover; }
.line-item__name { font-family: var(--serif); font-size: .95rem; line-height: 1.3; }
.line-item__name a { color: var(--ink); text-decoration: none; }
.line-item__meta { font-size: .78rem; color: var(--ink-3); margin-top: .15rem; }
.line-item__price { font-weight: 700; font-size: .9rem; }
.line-item__remove {
  align-self: start; background: none; border: 0; color: var(--ink-3);
  font-size: .78rem; cursor: pointer; text-decoration: underline; padding: 0; margin-top: .2rem;
}
.line-item__remove:hover { color: var(--brand); }

.drawer__foot { border-top: 1px solid var(--line); padding: 1.15rem 1.25rem calc(1.15rem + env(safe-area-inset-bottom)); background: var(--surface-2); }
.drawer__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.drawer__row--total { font-size: 1.15rem; font-weight: 700; margin-bottom: .1rem; }
.drawer__note { font-size: .78rem; color: var(--ink-3); margin-bottom: 1rem; }
.drawer__msg {
  font-size: .82rem; padding: .7rem .8rem; border-radius: 8px; margin-bottom: .8rem;
  background: var(--amber-soft); color: var(--amber); display: none;
}
.drawer__msg.is-shown { display: block; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); margin-top: 4rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-block: 3rem 2rem; }
.site-footer h3 { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; }
.site-footer a { display: block; color: var(--ink-2); text-decoration: none; font-size: .9rem; padding: .2rem 0; }
.site-footer a:hover { color: var(--brand); }
.site-footer__brand .brand { font-size: 1.3rem; }
.site-footer__brand p { font-size: .85rem; color: var(--ink-3); margin-top: .5rem; max-width: 32ch; }
.site-footer__bar { border-top: 1px solid var(--line); padding-block: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: var(--ink-3); }

/* ---------- Header legal links ---------- */
.legal-links { display: flex; align-items: center; gap: .9rem; font-size: .78rem; }
.legal-links a { color: var(--ink-3); text-decoration: none; }
.legal-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .legal-links { display: none; } }

/* ---------- Header account + actions ---------- */
.site-header__actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.site-nav + .site-header__actions { margin-left: auto; }
.acct-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .7rem; border-radius: var(--radius-pill);
  color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600;
  max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-link:hover { color: var(--ink); background: var(--surface-2); }
.plan-badge {
  display: inline-flex; align-items: center;
  padding: .3rem .65rem; border-radius: var(--radius-pill);
  background: var(--pine-soft); color: var(--pine);
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
}

.acct-link.is-authed::before {
  content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--pine); color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath d='M5.5 20a6.5 6.5 0 0 1 13 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ---------- Buy-now / card CTA row ---------- */
.card__cta--row { display: flex; gap: .5rem; }
.card__cta--row .btn { flex: 1; }
.card__cta--row .btn--ghost.is-added { color: var(--pine); border-color: var(--pine); }

.secure-note {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--pine); font-weight: 600;
}
.secure-note svg { flex: none; }

/* ---------- Auth pages ---------- */
.auth-wrap { display: flex; justify-content: center; padding-block: clamp(2rem, 6vw, 4rem); }
.auth-card {
  width: 100%; max-width: 25rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-1);
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-sub { font-size: .9rem; color: var(--ink-2); margin-bottom: 1.25rem; }

.auth-tabs { display: flex; gap: .25rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: .25rem; margin-bottom: 1.25rem; }
.auth-tab {
  flex: 1; padding: .55rem; border: 0; border-radius: 7px; background: transparent;
  font-weight: 600; font-size: .9rem; color: var(--ink-3); cursor: pointer;
}
.auth-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.field input {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--paper); font-size: .95rem;
}
.field input:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field input.is-ok { border-color: var(--pine); }
.field input.is-bad { border-color: var(--brand); }
.field__hint { display: block; font-size: .78rem; color: var(--ink-3); margin-top: .3rem; min-height: 1em; }
.field__hint--ok { color: var(--pine); }
.field__hint--bad { color: var(--brand-2); }

.recaptcha-field { overflow-x: auto; }
.recaptcha-field > div { transform-origin: left top; }

.form-note { font-size: .85rem; padding: .6rem .75rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.form-note--error { background: #fbeae4; color: var(--brand-2); }
.form-note--info { background: var(--amber-soft); color: var(--amber); }

.account-plan { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0; margin: 1rem 0; }
.account-plan__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.account-plan__meta { font-size: .82rem; color: var(--ink-3); }

.btn--google {
  --_bg: var(--surface); --_fg: var(--ink);
  border-color: var(--line-2); font-weight: 600;
}
.btn--google:hover { --_bg: var(--surface-2); color: var(--ink); }
.auth-or { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--ink-3); font-size: .8rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-switch { text-align: center; font-size: .88rem; color: var(--ink-2); margin-top: 1.25rem; }
.auth-switch a { color: var(--brand-2); font-weight: 600; }

/* ---------- Checkout page ---------- */
.checkout { padding-block: clamp(1.5rem, 4vw, 2.5rem) 4rem; }
.checkout__title { font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.2rem); }
.checkout__who { font-size: .88rem; color: var(--ink-3); margin: .4rem 0 1.75rem; }
.checkout__who a { color: var(--brand-2); }
.checkout__grid { display: grid; grid-template-columns: 1fr 20rem; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.co-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.co-item__media { width: 68px; height: 68px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.co-item__media img { width: 100%; height: 100%; object-fit: cover; }
.co-item__name { font-family: var(--serif); color: var(--ink); text-decoration: none; font-size: 1rem; }
.co-item__name:hover { color: var(--brand); }
.co-item__meta { font-size: .8rem; color: var(--ink-3); margin-top: .2rem; }
.co-item__price { font-weight: 700; }

.checkout__summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 90px; }
.sum-row { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .55rem; color: var(--ink-2); }
.sum-row--muted { color: var(--ink-3); }
.sum-row--total { font-size: 1.1rem; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .2rem; }
.sum-tax { font-size: .76rem; color: var(--ink-3); margin: .3rem 0 1rem; }
.sum-fine { font-size: .76rem; color: var(--ink-3); margin-top: .7rem; text-align: center; }
.checkout__back { display: block; text-align: center; margin-top: 1rem; font-size: .85rem; color: var(--ink-2); text-decoration: none; }
.checkout__back:hover { color: var(--brand); }
.checkout__empty { text-align: center; padding: 4rem 1rem; }
.checkout__empty h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.checkout__empty p { color: var(--ink-2); margin-bottom: 1.5rem; }

@media (max-width: 760px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .checkout__summary { position: static; }
}

/* ---------- Pricing ---------- */
.pricing-toggle {
  display: flex; justify-content: center; gap: .25rem; margin: 0 auto 2.5rem;
  width: fit-content; background: var(--surface-2); border-radius: var(--radius-pill); padding: .3rem;
}
.toggle-btn {
  padding: .55rem 1.1rem; border: 0; border-radius: var(--radius-pill); background: transparent;
  font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; gap: .45rem;
}
.toggle-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.toggle-save {
  font-size: .72rem; font-weight: 700; color: var(--pine); background: var(--pine-soft);
  padding: .15rem .45rem; border-radius: var(--radius-pill);
}

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.plan-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem;
}
.plan-card.is-current { border-color: var(--pine); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pine) 20%, transparent); }
.plan-card__badge {
  position: absolute; top: -.7rem; left: 1.5rem; background: var(--pine); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .3rem .65rem; border-radius: var(--radius-pill);
}
.plan-card h3 { font-size: 1.35rem; margin-bottom: .35rem; }
.plan-card__blurb { color: var(--ink-3); font-size: .88rem; margin-bottom: 1.25rem; min-height: 2.6em; }
.plan-card__price { font-size: 2.1rem; font-weight: 700; margin-bottom: 1.5rem; }
.plan-card__price span { font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.plan-card__features { list-style: none; display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.75rem; flex: 1; }
.plan-card__features li { font-size: .88rem; color: var(--ink-2); padding-left: 1.5rem; position: relative; }
.plan-card__features li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--pine-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5d4f' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}
.pricing-msg { max-width: 40rem; margin: 0 auto 1.5rem; }
.pricing-note { text-align: center; color: var(--ink-3); font-size: .85rem; margin-top: 2rem; }

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- Content pages ---------- */
.page-hero { padding-block: clamp(2.25rem, 6vw, 3.75rem) .5rem; }
.page-hero h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem); max-width: 20ch; }
.page-hero p { color: var(--ink-2); font-size: 1.08rem; max-width: 54ch; margin-top: .75rem; }
.prose { max-width: 66ch; padding-bottom: 2rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.5rem; margin-bottom: .5rem; }
.prose p { margin-bottom: 1rem; color: var(--ink-2); }
.prose ul { margin: 0 0 1rem 1.15rem; color: var(--ink-2); }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--ink); }
.grade-scale { display: grid; gap: .55rem; margin: 1rem 0 1.5rem; }
.grade-scale div {
  display: flex; gap: .85rem; align-items: baseline; flex-wrap: wrap;
  padding: .7rem .95rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; font-size: .9rem; color: var(--ink-2);
}
.grade-scale b { min-width: 6rem; color: var(--ink); font-weight: 700; }

/* ---------- Misc ---------- */
:where(section, [id]) { scroll-margin-top: 88px; }
.grid-empty {
  grid-column: 1 / -1; text-align: center; color: var(--ink-3);
  padding: 3rem 1rem; font-size: .95rem; line-height: 1.7;
}
.grid-empty a { color: var(--brand-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .item { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .gallery__main { aspect-ratio: 4 / 3; }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .site-nav { display: none; }
  .hero { padding-top: 2rem; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .filters__sort { margin-left: 0; width: 100%; }
}

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