/*
 * Public website styling (docs/public-site-and-seo.md).
 *
 * Same brand as the portal — the gold ramp, champagne text and near-black
 * navy shell from web-client/src/index.css — so the two read as one product.
 * Deliberately a single hand-written file: no build step, no framework, no
 * Node in production for what is a handful of content pages.
 *
 * RTL-first like the rest of the project: logical properties only
 * (.claude/rules/frontend-conventions.md), never left/right.
 */

/* Two typefaces, both self-hosted under the SIL Open Font License
 * (fonts/LICENSE-*.txt), copied from the `@fontsource-variable/*` npm
 * packages:
 *
 *   - **Estedad** (Amin Abedi) for everything read: body, navigation,
 *     figures. A calmer, more open Persian sans than Vazirmatn, with a wide
 *     variable weight range, so hierarchy comes from weight rather than size.
 *   - **Amiri** (Khaled Hosny) for display: the shop's name, page titles,
 *     section titles. A classical naskh with real stroke contrast — the role a
 *     Didone plays on a European jeweller's site, drawn for this script. Only
 *     the bold is shipped: it is the only weight a title asks for. Markazi
 *     Text, Reem Kufi, El Messiri and Noto Naskh were set beside it first;
 *     the first two read flat at this size, and Reem Kufi and El Messiri draw
 *     Arabic ک and digits in Persian words.
 *
 * The portal keeps Vazirmatn; the website is a different room of the same
 * house, and only this file and base.html's preloads name these two.
 *
 * Self-hosted rather than loaded from a font CDN for three reasons: the CSP
 * here is `font-src 'self'`, Iranian visitors often can't reach Google Fonts,
 * and a third-party font request would leak visitor IPs. Each face is split
 * by script, so a page in Persian never downloads the Latin half unless it
 * shows a Latin letter. */
@font-face {
  font-family: "Estedad";
  src: url("fonts/estedad-arabic-wght-normal.f3e0531cb081.woff2") format("woff2-variations"),
       url("fonts/estedad-arabic-wght-normal.f3e0531cb081.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  /* Show fallback text immediately, swap when the font lands — never a blank
   * page while a crawler or a slow connection waits. */
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "Estedad";
  src: url("fonts/estedad-latin-wght-normal.efdcae077863.woff2") format("woff2-variations"),
       url("fonts/estedad-latin-wght-normal.efdcae077863.woff2") 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+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Amiri";
  src: url("fonts/amiri-arabic-700-normal.bb99562a6788.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
  font-family: "Amiri";
  src: url("fonts/amiri-latin-700-normal.3c577e3e4448.woff2") format("woff2");
  font-weight: 700;
  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+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  --bg: #050b12;
  --bg-2: #0a1b2c;
  --surface: rgb(24 42 64 / 0.55);
  --raised: rgb(32 52 78 / 0.6);
  --line: rgb(228 199 101 / 0.16);
  --line-strong: rgb(228 199 101 / 0.35);

  --text: #f4e7ce;
  --text-dim: #a9b4be;
  --text-faint: #6e7278;

  /* The portal's buy/sell pair, same names and same values
     (web-client/src/index.css), because the trend chart here is a port of the
     portal's and shares its stylesheet rules verbatim.

     On the chart these name the direction of a candle's move — green up, red
     down — not a side of the book: this chart draws the ask alone (trend.js).
     The *-text pair is the readable-on-a-surface variant, used by the change
     figure; the *-solid pair is the fill. */
  --buy-solid: #0f9d63;
  --sell-solid: #d33f4d;
  --buy-text: #3ecb92;
  --sell-text: #ff7b88;

  --gold: #c9a227;
  --gold-text: #e4c765;
  --gold-metal: linear-gradient(135deg, #f2dd9a, #d9ae3e 45%, #b8871f);
  --on-gold: #1b1404;

  /* The price board's caption band and the chart's plot well. */
  --well: rgb(4 10 18 / 0.55);
  --radius: 1.1rem;

  --font: "Estedad", "Segoe UI", Tahoma, system-ui, sans-serif;
  /* Display only: titles and the shop's name. Never for figures or body. */
  --font-display: "Amiri", "Estedad", Georgia, serif;
}

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

/* The phone may not enlarge text on its own. Chrome on Android "boosts" the
   font of wide text blocks, and iOS resizes on rotation; either one grew the
   board's figures past their cells. The visitor's own zoom still works —
   this only stops the browser deciding sizes for them. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.9;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 50% -8%, rgb(201 162 39 / 0.16), transparent 62%),
    radial-gradient(900px 560px at 102% 105%, rgb(201 162 39 / 0.1), transparent 60%),
    linear-gradient(175deg, var(--bg-2), var(--bg) 60%);
  background-attachment: fixed;
}

.wrap {
  max-inline-size: 68rem;
  margin-inline: auto;
  padding-inline: 1.15rem;
}

/* Keyboard users get out of the header without tabbing the whole nav. */
.skip-link {
  position: absolute;
  inset-block-start: -3rem;
  inset-inline-start: 1rem;
  background: var(--gold-metal);
  color: var(--on-gold);
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.6rem 0.6rem;
  z-index: 20;
  transition: inset-block-start 150ms ease;
}

.skip-link:focus {
  inset-block-start: 0;
}

a {
  color: var(--gold-text);
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin-block: 0 0.6rem;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: rgb(5 11 18 / 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.8rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  margin-inline-end: auto;
}

/* The mark's lettering is pale ivory, drawn for a dark backdrop, and its own
 * background is transparent — so it carries a fixed dark backing and a gold
 * ring of its own, exactly as in the portal (web-client/src/index.css). */
.brand-mark {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 50%;
  background: var(--bg-2);
  padding: 4px;
  border: 1px solid rgb(201 162 39 / 0.45);
  box-shadow: 0 8px 18px -10px rgb(0 0 0 / 0.6);
  object-fit: contain;
  flex: 0 0 auto;
}

.hero-logo {
  display: inline-flex;
  border-radius: 50%;
  background: var(--bg-2);
  padding: 0.6rem;
  margin-block-end: 1.1rem;
  border: 1px solid rgb(201 162 39 / 0.45);
  box-shadow:
    0 18px 36px -14px rgb(0 0 0 / 0.65),
    0 0 30px -8px rgb(201 162 39 / 0.35);
}

.hero-logo img {
  inline-size: clamp(5rem, 14vw, 7.5rem);
  block-size: auto;
  object-fit: contain;
  display: block;
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: rgb(201 162 39 / 0.12);
}

.btn-portal,
.btn-primary {
  display: inline-block;
  background: var(--gold-metal);
  color: var(--on-gold);
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.3rem;
  border-radius: 2rem;
  box-shadow: 0 12px 24px -12px rgb(201 162 39 / 0.6);
}

.btn-ghost {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 1.3rem;
  border-radius: 2rem;
  border: 1px solid var(--line-strong);
}

/* A phone: the header on one row (owner, 2026-10-19). It wrapped the portal
   button onto a second line, which doubled the sticky bar's height over every
   page. Smaller nav words and a smaller button, and the shop's name gives
   way to the mark alone — there is no width for it beside three links and the
   button, and an ellipsised name is worse than none. The mark's alt text
   still names the shop, so the home link keeps its label. */
@media (max-width: 40rem) {
  .header-inner {
    flex-wrap: nowrap;
    gap: min(0.5rem, 1.6vw);
    padding-block: 0.55rem;
  }

  /* The page gutter, capped by the screen too, for the same reason as the
     header's text below: an enlarged system font must not eat a 320px
     screen's width in padding. */
  .wrap {
    padding-inline: min(1.15rem, 5vw);
  }

  /* The mark keeps its size; the name is hidden below, so the link is the
     mark alone and must never be the thing that shrinks. */
  .brand {
    flex: 0 0 auto;
    gap: 0.45rem;
    font-size: 0.92rem;
  }

  .brand-mark {
    inline-size: min(2.35rem, 10.5vw);
    block-size: min(2.35rem, 10.5vw);
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 0.1rem;
  }

  /* Sized back up once the button became «ورود» (2026-10-19): the width it
     gave up goes to the links, which are what people tap here. */
  /* Capped by the screen's width as well as set in rem: a phone whose own
     font setting enlarges text (Android's font scale) pushed this nowrap row
     10px past a 360px screen, and one overflowing row widens the whole page —
     it then opens zoomed in (2026-10-20). Paddings are in em so they shrink
     with the text. */
  .site-nav a {
    padding: 0.47em 0.63em;
    font-size: min(0.95rem, 4.2vw);
    white-space: nowrap;
  }

  .btn-portal {
    flex: 0 0 auto;
    padding: 0.49em 1.14em;
    font-size: min(0.92rem, 4.1vw);
    white-space: nowrap;
    box-shadow: 0 8px 16px -10px rgb(201 162 39 / 0.6);
  }

  .brand-name {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* The narrowest phones (320px): one step down, so the row still fits whole. */
@media (max-width: 22rem) {
  .header-inner {
    gap: min(0.35rem, 1.2vw);
  }

  .site-nav a {
    padding-inline: 0.45em;
    font-size: min(0.88rem, 4.1vw);
  }

  .btn-portal {
    padding-inline: 0.9em;
    font-size: min(0.86rem, 4vw);
  }

  .brand-mark {
    inline-size: 2.1rem;
    block-size: 2.1rem;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}

.link-more {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.feature-grid,
.card-grid {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.2rem 1.3rem;
}

.feature h3 {
  font-size: 1.05rem;
  color: var(--gold-text);
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ---------- cards ---------- */

.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
}

.card a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
  block-size: 100%;
  transition: border-color 150ms ease, transform 150ms ease;
}

.card a:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-media {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    135deg,
    rgb(201 162 39 / 0.1) 0 10px,
    rgb(255 255 255 / 0.02) 10px 20px
  );
}

.card-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* An item with no photo yet gets the shop's medallion, matching web-admin's
   empty catalog slot — literally the same image, since its /brand-mark.png is
   a byte-for-byte copy of this favicon-512.

   favicon-512 rather than logo.png: the logo's lettering is pale ivory on
   transparency and disappears without a dark backing, while this variant
   carries its own navy disc and gold ring.

   Selectors are container-qualified because `.card-media img` / `.detail-media
   img` already set cover-and-fill, and a bare `.card-mark` would lose to them
   on specificity. Contained, not cropped: the mark keeps its ring instead of
   being trimmed to the card's square.

   The templates carry width/height attributes, and they are load-bearing here
   rather than a nicety: with `inline-size: auto` an image that has not arrived
   yet has no intrinsic width, so it lays out zero pixels wide, and a
   zero-area `loading="lazy"` image never enters the viewport as far as the
   browser is concerned — it was never fetched at all. The attributes give it
   an aspect ratio up front, which also keeps the grid from shifting on load. */
/* Sized from the width, which is definite, and never from the height, which is
   not. `.card-media` derives its height from `aspect-ratio: 1`, so a
   percentage *height* here is circular: it resolved to 70% of the width before
   the image arrived, then to 70% of the loaded image's own 512px once it did —
   stretching the card from 196px tall to 512px the moment the mark appeared.
   web-admin can use a percentage height for the same mark because its
   `.img-ph` box has a fixed height; the declaration is not portable between
   the two. */
.card-media .card-mark {
  inline-size: 70%;
  block-size: auto;
  object-fit: contain;
}

.detail-media .card-mark {
  /* No aspect-ratio box here, so a percentage height would have nothing to
     resolve against — size from the width and let the height follow. */
  inline-size: min(60%, 16rem);
  block-size: auto;
  object-fit: contain;
  margin-block: 2rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 0.9rem;
}

.card-cat {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.card-name {
  font-weight: 700;
  font-size: 0.95rem;
}

/* A piece's published price on its card — only ever rendered when both
   publish flags allow it (apps.public_site.views.catalog). */
.card-price {
  margin-block-start: 0.2rem;
  color: var(--gold-text);
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.card-price small {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 0.72rem;
}

/* ---------- price range and sort ----------

   A toolbar, not a panel: one hairline-ruled band under the category chips.
   Sort is a row of words — the chosen one in gold with a small mark under it —
   because a native <select> is drawn by the phone and cannot be made to
   belong here. Price is a short sentence, «قیمت از … تا …», with underlined
   bounds. Both work with JavaScript off; catalog-filter.js only groups the
   digits as they are typed. */
.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-block: 0.7rem;
  border-block: 1px solid var(--line);
  margin-block-end: 0.5rem;
}

.tools-cap {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.tools-sort {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tools-sort::-webkit-scrollbar {
  display: none;
}

.tools-sort-opt {
  position: relative;
  flex: 0 0 auto;
  padding-block: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 150ms ease;
}

.tools-sort-opt:hover {
  color: var(--text);
}

.tools-sort-opt.on {
  color: var(--gold-text);
  font-weight: 700;
}

/* The direction of the chosen price or weight order: a small chevron, up for
   low-to-high, down for high-to-low. Drawn with borders so it inherits the
   gold text colour and needs no icon font. */
.tools-dir {
  display: inline-block;
  inline-size: 0.38em;
  block-size: 0.38em;
  margin-inline-start: 0.4em;
  /* Physical sides on purpose: this is a glyph, and "up" must not mirror in
     RTL the way a layout edge does. */
  border-left: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  vertical-align: 0.12em;
  transform: rotate(45deg);
}

.tools-dir.desc {
  vertical-align: 0.3em;
  transform: rotate(225deg);
}

/* The mark under the chosen order: a short gold rule, centred. */
.tools-sort-opt.on::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 30%;
  block-size: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.tools-price {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
}

.tools-bound {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Underlined, not boxed: two bounds in a sentence, not two form fields. */
.tools-bound input {
  inline-size: 9rem;
  padding-block: 0.3rem;
  padding-inline: 0.1rem;
  border: none;
  border-block-end: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition: border-color 150ms ease;
}

.tools-bound input:focus {
  outline: none;
  border-block-end-color: var(--gold);
}

.tools-apply {
  padding-block: 0.35rem;
  padding-inline: 1rem;
  border: 1px solid var(--gold);
  border-radius: 2rem;
  background: transparent;
  color: var(--gold-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.tools-apply:hover {
  background: rgb(201 162 39 / 0.14);
}

.tools-clear {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.tools-clear:hover {
  color: var(--text);
}

.catalog-priced-at {
  margin-block: 0 1.4rem;
  font-size: 0.74rem;
  color: var(--text-faint);
}

/* A phone: the sort words on one line (scrolling sideways if they must), the
   price sentence on the next, its two bounds sharing the width. */
@media (max-width: 40rem) {
  .catalog-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .tools-price {
    gap: 0.55rem;
  }

  .tools-bound {
    flex: 1 1 0;
    min-inline-size: 0;
  }

  .tools-bound input {
    inline-size: 100%;
    min-inline-size: 0;
  }
}

/* ---------- chips ---------- */

.chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block-end: 1.25rem;
}

.chip {
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 2rem;
  color: var(--text-dim);
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
}

.chip.on,
.chip:hover {
  color: var(--gold-text);
  background: rgb(201 162 39 / 0.14);
  border-color: var(--gold);
}

/* ---------- pager ---------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-block-start: 2rem;
}

.pager-btn {
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 2rem;
  color: var(--text-dim);
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
}

.pager-btn:hover {
  color: var(--gold-text);
  border-color: var(--gold);
}

/* Kept in the flow rather than removed, so the row does not reflow between
   the first page and the rest. */
.pager-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager-status {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- detail ---------- */

.breadcrumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-block-end: 1rem;
}

.breadcrumb a {
  text-decoration: none;
}

.detail {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-block-end: 2.5rem;
}

@media (min-width: 48rem) {
  .detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.detail-media {
  display: grid;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0.75rem;
  place-items: center;
}

.detail-media img {
  inline-size: 100%;
  border-radius: 0.8rem;
  display: block;
}

.detail-cat {
  color: var(--text-faint);
  margin-block: 0 0.75rem;
}

.spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 1rem;
  margin-block: 0 1rem;
}

.spec dt {
  color: var(--text-faint);
  font-size: 0.9rem;
}

.spec dd {
  margin: 0;
}

.detail-desc {
  color: var(--text-dim);
}

/* ---------- catalog price, and the CTA that stands in for it ----------
   Only one of these ever renders. The price appears when the shop published
   both the master switch and the piece's source product; otherwise the CTA
   does, because a listed piece with no price and no explanation reads as a
   broken page (docs/public-site-and-seo.md). Logical properties throughout —
   this site is RTL (.claude/rules/frontend-conventions.md). */

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-block: 1.25rem 0.2rem;
}

.detail-price-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.detail-price-unit {
  color: var(--text-faint);
}

.detail-price-stamp {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-block: 0 0.75rem;
}

.detail-price-note {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-block: 0 1rem;
}

.detail-cta {
  margin-block-start: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
}

.detail-cta-lead {
  margin-block: 0 0.4rem;
  font-weight: 600;
}

.detail-cta-body {
  margin-block: 0 1rem;
  color: var(--text-dim);
}

.detail-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- contact ---------- */

/* The contact page (templates/public_site/contact.html): channels, then
   branches, then membership — each block a grid that balances itself for
   however many items the shop has entered. */
.contact-page {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.contact-head .lead {
  max-inline-size: 40rem;
  margin-block-end: 0;
}

/* Plain section titles: weight and space separate the blocks, not ornament. */
.contact-section-title {
  font-size: 1.2rem;
  margin-block-end: 1rem;
}

/* ---- channels: one console — the call, and a dock of icons ----

   The number set large beside a round call button, and every other channel
   as a round icon button in a dock (owner, 2026-11-12: icons, not
   descriptions). A button's name, account and action live in its
   `.channel-tip`, shown in one caption line under the dock on hover, keyboard
   focus or a first tap (contact-dock.js). The caption is positioned against
   the dock, not the button, so it can never run off the edge of a phone. */
.channels {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: 1.8rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(228 199 101 / 0.14), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(228 199 101 / 0.35);
}

@media (min-width: 52rem) {
  .channels.split {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  /* Beside the call the tiles pair up, so four channels make a square
     rather than a row of three and an orphan. */
  .channels.split .channel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The call beside the tiles, parted by a hairline. */
  .channels.split .channel-call {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-inline-end: clamp(1.5rem, 4vw, 2.5rem);
    border-inline-end: 1px solid var(--hair);
    block-size: 100%;
  }
}

/* The round badge an icon sits in, shared by the dock and the call. */
.channel-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 3.5rem;
  block-size: 3.5rem;
  border-radius: 50%;
  color: var(--gold-text);
  background:
    radial-gradient(circle at 35% 30%, rgb(242 221 154 / 0.22), transparent 60%),
    rgb(201 162 39 / 0.08);
  border: 1px solid rgb(228 199 101 / 0.4);
  transition:
    background 300ms ease,
    color 300ms ease,
    box-shadow 300ms ease,
    transform 300ms var(--ease);
}

.channel-icon .channel-icon-svg {
  inline-size: 1.45rem;
  block-size: 1.45rem;
}

/* ---- the call ---- */
.channel-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.channel-call-text {
  display: grid;
  gap: 0.2rem;
  min-inline-size: 0;
}

.channel-call-cap {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.channel-call-number {
  margin: 0;
  display: grid;
  line-height: 1.45;
}

.channel-call-number > a {
  justify-self: start;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.channel-call-note {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* The call button: a gold coin with the handset, breathing a soft ring. */
.channel-call-btn {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  inline-size: 4.25rem;
  block-size: 4.25rem;
  border-radius: 50%;
  color: var(--on-gold);
  background: var(--gold-metal);
  box-shadow: 0 10px 28px -10px rgb(228 199 101 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.5);
  transition: transform 300ms var(--ease), box-shadow 300ms ease;
}

.channel-call-btn .channel-icon-svg {
  inline-size: 1.6rem;
  block-size: 1.6rem;
}

.channel-call-btn::after {
  content: "";
  position: absolute;
  inset: -0.45rem;
  border-radius: 50%;
  border: 1px solid rgb(228 199 101 / 0.45);
  animation: call-ring 2.8s ease-out infinite;
}

.channel-call-btn:hover,
.channel-call-btn:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 34px -10px rgb(228 199 101 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.5);
}

@keyframes call-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ---- the channel tiles ----
   Icon and name always; the account and the action slide up inside the tile
   on hover, focus or a first tap. Everything stays in the tile's own box, so
   nothing can overlap a neighbour however the grid wraps. */
.channel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr));
  gap: 0.75rem;
}

.channel-row {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.55rem;
  block-size: 100%;
  min-block-size: 11.5rem;
  /* The foot is reserved for the reveal strip at its full height (account
     + action, measured at 82px), with room to spare, so the strip never
     lands on the name above it. */
  padding: 1.1rem 0.75rem 5.75rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgb(255 255 255 / 0.04), transparent 50%),
    var(--surface);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  outline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 300ms ease, transform 300ms var(--ease), box-shadow 300ms ease;
}

.channel-name {
  display: grid;
  gap: 0.1rem;
  line-height: 1.5;
}

.channel-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.channel-subtitle {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* The reveal: a strip at the tile's foot. At rest it shows only a short gold
   rule, the hint that there is more; active, the account and the action. */
.channel-tip {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.6rem 0.75rem;
  translate: 0 calc(100% - 0.55rem);
  background:
    linear-gradient(180deg, rgb(201 162 39 / 0.1), rgb(201 162 39 / 0.18)),
    var(--surface);
  border-block-start: 2px solid rgb(228 199 101 / 0.55);
  transition: translate 350ms var(--ease);
}

.channel-value {
  max-inline-size: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.channel-action {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-text);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 999px;
  padding: 0.05rem 0.7rem;
}

.channel-list > li:hover .channel-row,
.channel-list > li:focus-within .channel-row,
.channel-list > li.show .channel-row {
  border-color: rgb(228 199 101 / 0.55);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgb(228 199 101 / 0.6);
}

.channel-list > li:hover .channel-icon,
.channel-list > li:focus-within .channel-icon,
.channel-list > li.show .channel-icon {
  color: var(--on-gold);
  background: var(--gold-metal);
  box-shadow: 0 0 22px rgb(228 199 101 / 0.4);
}

.channel-list > li:hover .channel-tip,
.channel-list > li:focus-within .channel-tip,
.channel-list > li.show .channel-tip {
  translate: 0 0;
}

@media (max-width: 40rem) {
  .channel-call {
    flex-direction: column;
    text-align: center;
  }

  .channel-call-number > a {
    justify-self: center;
  }

  .channel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  /* Half a phone is narrow: the account is shown whole, never cut with an
     ellipsis — a number smaller, a long handle on two lines — and the foot
     reserves the extra line. */
  .channel-row {
    padding-block-end: 6.75rem;
  }

  .channel-tip {
    padding-inline: 0.35rem;
  }

  .channel-value {
    font-size: 0.8rem;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    line-height: 1.6;
  }

  .channel-icon {
    inline-size: 3rem;
    block-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .channel-call-btn::after {
    animation: none;
  }
}

/* ---- branches: a card each, sharing a row's height ---- */

.branch-cards {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
}

.branch-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius, 1.1rem);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--gold) 40%, transparent);
}

.branch-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.branch-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gold-text);
}

.branch-city {
  font-size: 0.82rem;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding-inline: 0.6rem;
}

.branch-address {
  margin: 0;
  font-weight: 600;
  line-height: 1.8;
}

.branch-parking {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* A drawn «P», not the 🅿 emoji: an emoji renders in the phone's own colours
   and size, and on some fonts not at all. */
.branch-parking-mark {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  inline-size: 1.15rem;
  block-size: 1.15rem;
  border-radius: 0.3rem;
  border: 1px solid var(--line-strong);
  color: var(--gold-text);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.branch-contacts {
  display: grid;
  gap: 0.35rem;
  padding-block-start: 0.6rem;
  border-block-start: 1px solid var(--line);
}

.branch-contacts:empty {
  display: none;
}

.branch-contact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.branch-contact a {
  font-weight: 700;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.branch-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Pushed to the card's foot, so across a row of branches the map buttons sit
   on one line whatever each address above them holds. */
.branch-map {
  margin-block-start: auto;
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
}

.empty {
  color: var(--text-faint);
}

/* (Membership is styled with the contact page's redesign, further down.) */

/* ---------- published price strip ---------- */

/* One board, not a stack of cards: a single surface with hairline rows and
   the two column captions once, at the top, so the list is read *down* a
   column — every buy price against every buy price — the way the portal's
   market board reads (web-client MarketScreen). Each row is a three-column
   grid sharing the caption row's tracks, so the figures line up exactly.

   The per-cell «خرید»/«فروش» captions stay in the markup for screen readers
   (the caption row is aria-hidden) and are hidden visually. */
.price-grid {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  display: grid;
  /* `minmax(0, 1fr)`, not the implicit `auto`: an auto column sizes to its
     max-content, so the moment a row contains something that does not wrap —
     the trend's one-line metrics header — the column grows past the viewport
     and takes the whole page into a horizontal scroll. The 0 minimum is what
     lets that line scroll inside its own box instead. */
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--gold) 45%, transparent);
  overflow: hidden;
  /* Name a little wider than each price, and the figures centred in their
     tracks: right-aligned names and left-aligned prices left a gulf across
     the middle of a desktop-wide board. */
  --price-cols: minmax(0, 1.25fr) minmax(7rem, 1fr) minmax(7rem, 1fr);
}

.price-head,
.price-row {
  display: grid;
  grid-template-columns: var(--price-cols);
  column-gap: clamp(0.6rem, 3vw, 2rem);
  align-items: center;
  min-inline-size: 0;
  padding-block: 0.85rem;
  padding-inline: clamp(0.9rem, 3vw, 1.6rem);
}

.price-head {
  padding-block: 0.6rem;
  background: var(--well);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
}

.price-head span:not(:first-child) {
  text-align: center;
}

.price-row {
  border-block-start: 1px solid var(--line);
  transition: background-color 150ms ease;
}

.price-head + .price-row {
  border-block-start: none;
}

/* The product whose chart is open (owner, 2026-10-20): a faint gold wash
   over the row and its chart together, fading downward, inside a gold
   hairline — so the chart is read as belonging to the row above it, not to
   the one below. Light enough that the figures keep their own colours. */
.price-row.open {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--gold) 11%, transparent),
    color-mix(in srgb, var(--gold) 4%, transparent) 70%
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 32%, transparent);
}

.price-row.open button.price-name {
  color: var(--gold-text);
}

.price-row:not(.open):hover {
  background: color-mix(in srgb, var(--gold) 4%, transparent);
}

.price-name {
  font-weight: 700;
  color: var(--text);
  min-inline-size: 0;
  /* Every name starts at the same indent, with or without a chart: the
     triangle (when there is one) sits in this space, so a board mixing the
     two still reads as one straight column of names. */
  padding-inline-start: 1.15rem;
}

.price-unit {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* The pair takes the row's two price tracks itself. */
.price-pair {
  display: contents;
}

.price-cell {
  display: block;
  text-align: center;
  min-inline-size: 0;
}

/* Visually hidden, still read: the caption row carries them for sight. */
.price-cap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.price-value {
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  font-weight: 600;
  /* Tabular figures so a changing digit does not reflow the row on every
     poll — the numbers sit still and only their glyphs change. */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The per-gram equivalent under a مثقال price — quiet, the مثقال figure above
   it is the price (docs/catalog-and-pricing.md, "مثقال products"). */
.price-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* «خرید» — what the shop pays — in gold; «فروش» in ivory. */
.price-value.buy {
  color: var(--gold-text);
}

.price-value.sell {
  color: var(--text);
}

.price-stamp {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.price-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-block-start: 1.1rem;
}

.price-note {
  margin-block: 0.9rem 0;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* The figures as the portal's market board draws them (web-client
   index.css, `.market-side`): each price in a glass cell — its side's hue
   held at a fraction of its strength, a hairline of the same hue, one sweep
   of light across the top and a soft glow beneath.

   **Which side is green is decided by the number, not by the word.** This
   site labels from the shop's side («نرخ خرید، قیمتی که ما از شما
   می‌خریم») and the portal from the client's, so the same `sell_price` is
   «فروش» here and «خرید» there. Coloured the same in both places — green for
   the price a visitor pays, red for the price they are paid — the two boards
   read as one. The owner confirmed both choices on 2026-10-19: the website
   stays shop-perspective, and the colours follow the number. A word-for-colour
   swap was tried and reverted the same day. */
.price-head .sell,
.price-head .buy {
  font-weight: 700;
}

.price-head .sell { color: var(--buy-text); }
.price-head .buy { color: var(--sell-text); }

.price-head small {
  font-weight: 500;
  opacity: 0.8;
}

.price-cell.sell { --side: var(--buy-solid); --side-text: var(--buy-text); }
.price-cell.buy { --side: var(--sell-solid); --side-text: var(--sell-text); }

.price-cell.sell,
.price-cell.buy {
  justify-self: stretch;
  padding-block: 0.55rem;
  padding-inline: 0.5rem;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--side) 42%, transparent);
  background:
    linear-gradient(152deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0) 46%),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--side) 20%, transparent),
      color-mix(in srgb, var(--side) 12%, transparent)
    );
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    0 1px 2px rgb(0 0 0 / 0.4),
    0 10px 20px -16px color-mix(in srgb, var(--side) 30%, transparent);
}

/* A phone: the name track gives up a little width to the two cells, and the
   figure is sized to the space the viewport leaves — a ten-digit price is
   never cut or wrapped (the same rule as the portal's board). */
@media (max-width: 40rem) {
  .price-grid {
    --price-cols: minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .price-head,
  .price-row {
    column-gap: 0.4rem;
    padding-inline: 0.6rem;
  }

  .price-cell.sell,
  .price-cell.buy {
    padding-inline: 0.2rem;
  }

  /* Each figure is sized to its own cell, never to the screen: the cell is a
     size container, and a figure takes the smaller of its normal size and
     "cell width ÷ its longest length" — 13 characters for a ten-digit price
     («۱٬۱۳۵٬۰۰۰٬۰۰۰», ~7.6em), 11 for the per-gram line under a مثقال price.
     Sized to the screen (vw) instead, it ran out of the cell whenever the
     cell was narrower than the screen implied — a 360px phone, or one whose
     own font setting enlarges text — and that overflow widened the whole
     page, which is what made it open zoomed in (owner, 2026-10-20). The
     figure is shrunk, never rounded or cut: a price is read to the Rial. */
  .price-cell.sell,
  .price-cell.buy {
    container-type: inline-size;
  }

  /* 9.6, not the 8.3 this rule was written with: the divisor is the price's
     length in em, and that is a property of the typeface. Estedad's bold
     figures run «۱,۱۳۹,۰۰۰,۰۰۰» to 8.5em and an eleven-digit price to 9.25em
     (measured in the browser), against Vazirmatn's ~7.6em — under the old
     divisor the price ran out of its cell (owner, 2026-11-12). Change the
     typeface, re-measure this. */
  .price-cell .price-value {
    font-size: min(0.95rem, calc(100cqi / 9.6));
    letter-spacing: -0.01em;
  }

  /* «هر گرم» and its figure: the caption steps onto its own line when the
     two do not fit side by side, and the figure fits whatever is left. */
  .price-sub {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.25em;
    white-space: normal;
    line-height: 1.5;
    font-size: min(0.7rem, calc(100cqi / 9));
  }

  .price-sub > span {
    white-space: nowrap;
  }
}

/* A narrow phone: the name takes its own line above its two prices, so each
   price cell gets half the row instead of a third of it, and a ten-digit
   figure stays at full size rather than shrinking to fit beside the name.
   The column captions lose «محصول» and sit over the two price columns. */
@media (max-width: 30rem) {
  .price-grid {
    --price-cols: minmax(0, 1fr) minmax(0, 1fr);
  }

  .price-head span:first-child {
    display: none;
  }

  .price-row {
    row-gap: 0.55rem;
  }

  .price-name {
    grid-column: 1 / -1;
  }

  .price-name .price-unit {
    display: inline;
    margin-inline-start: 0.4rem;
  }
}

/* The change tag over a price — the portal's market-board chip: a faint pill
   in the move's own colour, green up and red down whichever cell it sits in,
   with the arrow carrying the direction for anyone who cannot tell the two
   colours apart (web-client index.css, `.market-change`). */
.price-cell.sell,
.price-cell.buy {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
}

.price-change {
  display: inline-flex;
  align-items: center;
  gap: 0.16rem;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  border-radius: 999px;
  padding-inline: 0.4rem;
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: var(--text-dim);
}

.price-change.up { color: var(--buy-text); }
.price-change.down { color: var(--sell-text); }

.price-change.flat,
.price-change.none {
  background: none;
  font-weight: 600;
  opacity: 0.6;
}

.price-change-arrow {
  font-size: 0.78em;
  line-height: 1;
}

/* The figure in its side's colour, as on the portal. These override the
   gold/ivory pair the strip used before it had cells. */
.price-cell.sell .price-value,
.price-cell.buy .price-value {
  color: var(--side-text);
  font-weight: 700;
}

/* Set by prices.js when a poll fails: the last known numbers stay on screen,
   visibly dimmed, rather than being blanked out. A slightly old price is
   still true; an empty one reads as "this shop has no prices". */
.price-strip[data-price-stale] .price-value {
  opacity: 0.55;
}

/* ---------- published price trends (docs/price-history.md) ----------
 *
 * **A port of the portal's chart styling**, class for class and value for
 * value from `web-client/src/index.css`. The public chart is the same chart
 * (trend.js) and must not be a second look: a visitor who reads a trend here
 * and then signs up should meet what they already know. Only the wrapper rules
 * differ — `button.price-name`, its caret and `.price-trend-panel` — and those
 * are themselves ported from the portal's market row, which opens its trend the
 * same way.
 *
 * The layout lesson from the portal's version comes with it: every row of
 * figures is either a grid or a scroller that is *allowed to shrink*. A nowrap
 * row inside a flex or grid parent takes a max-content minimum, refuses to
 * shrink, and drags the whole page into a horizontal scroll on a phone rather
 * than scrolling inside its own box.
 */

/* The name is the control, as on the portal's market board — a button that has
   to shed every button default and read as the label it looks like
   (web-client/src/index.css, `button.market-name`). */
button.price-name {
  font-family: inherit;
  /* A button keeps its own font size and line height; inheriting both keeps a
     row with a chart exactly as tall as one without. */
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-align: start;
  padding: 0;
  position: relative;
  /* Room for the triangle (.price-trend-caret), which leads the name. */
  padding-inline-start: 1.15rem;
  /* Hug the name, so the caret sits beside it rather than at the far end of
     the name track. */
  justify-self: start;
}

button.price-name:hover,
button.price-name.on {
  color: var(--gold-text);
}

/* The "this opens a chart" mark: a small solid triangle in brushed gold
   (owner, 2026-10-20) — a metal ramp clipped to a triangle, with a soft
   glow, rather than the «▾» text glyph that read as a dot. Down when closed,
   up when open, read off the button's own `aria-expanded` so it can never
   disagree with the state a screen reader hears. The glyph is still in the
   markup (aria-hidden) and is simply not drawn. */
/* At the name's *start*, not its end (owner, 2026-10-20): after the name
   it landed wherever each name happened to end, a ragged column down the
   board; before it, every triangle sits on one line at the column's edge.
   Centred on the name's first line — the name's 1.9rem line box, less half the mark — in
   rem, because the mark's own font-size is 0 and an `em` here resolves to
   nothing (which is what lifted it above the text). */
.price-trend-caret {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.6rem;
  inline-size: 0.7rem;
  block-size: 0.7rem;
  font-size: 0;
  line-height: 0;
}

.price-trend-caret::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: 0.62rem;
  block-size: 0.42rem;
  background: linear-gradient(160deg, #f2dd9a, #d9ae3e 50%, #b8871f);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--gold) 45%, transparent));
  transition: transform 180ms ease;
}

button.price-name[aria-expanded="true"] .price-trend-caret::before {
  transform: rotate(180deg);
}

/* The expanded panel, spanning all three tracks under the row's figures.
 *
 * Two boxes from trend.js: `.trend-side` (range, metrics, readout, help) and
 * `.trend-plot` (the chart). Stacked on a phone, in the portal's order. From
 * ~56rem they sit side by side — the figures in one column of their own, the
 * plot taking the rest — because spread across a thousand-pixel row the
 * metrics, the readout and the range buttons each landed in a different
 * corner and nothing read as belonging to anything. */
.price-trend-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  min-inline-size: 0;
  margin-block-start: 0.85rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--line);
}

.trend-side,
.trend-plot {
  min-inline-size: 0;
}

.trend-side {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 56rem) {
  .price-trend-panel {
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.75rem;
  }

  /* The plot gets a well of its own, so the chart sits on a surface rather
     than floating in the row. */
  .trend-plot {
    background: var(--well);
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    padding: 0.75rem 0.9rem 0.5rem;
  }

  /* The metrics line has a whole column here: a stacked label/figure list
     instead of a sideways scroller, and no fade at its edge. */
  .trend-side .trend-headline {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    overflow: visible;
    white-space: normal;
    mask-image: none;
  }

  .trend-side .trend-headline-item {
    display: contents;
  }

  .trend-side .trend-headline dd {
    text-align: end;
  }

  /* The selected candle's four figures, one per line — label at the start,
     figure at the end, the same shape as the metrics above them. Two to a
     line put four ten-digit numerals and four labels into a 17rem column. */
  .trend-side .trend-ohlc {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
    padding-block-start: 0.5rem;
    border-block-start: 1px solid var(--line);
    font-size: 0.75rem;
  }

  .trend-side .trend-ohlc-figure {
    justify-content: space-between;
  }

  .trend-side .trend-readout-top {
    flex-direction: column;
    align-items: stretch;
  }

  .trend-side .money {
    align-items: start;
  }

  .trend-side .money-toman {
    text-align: start;
  }
}

.price-trend-panel[hidden] {
  display: none;
}

.trend-note {
  margin: 0.5rem 0 0;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---- from here down, the portal's rules ---- */

.trend-chart {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.trend-svg {
  display: block;
  inline-size: 100%;
  /* Probing the chart is a horizontal gesture; the page still scrolls
   * vertically through it. */
  touch-action: pan-y;
}

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

.trend-tick {
  fill: var(--text-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* One candle: the wick spans high to low, the body open to close.
 *
 * A doji — a bucket in which the shop did not reprice — has a body of zero
 * height, floored to a hairline in trend.js. That flat mark is the whole point:
 * the price definitively stood there for the bucket, which is data, not a hole
 * (docs/price-history.md). */
.trend-candle .trend-wick {
  stroke-width: 1;
}

.trend-candle .trend-body {
  stroke-width: 1;
}

.trend-candle.up .trend-wick,
.trend-candle.up .trend-body { stroke: var(--buy-solid); }
.trend-candle.up .trend-body { fill: var(--buy-solid); }

.trend-candle.down .trend-wick,
.trend-candle.down .trend-body { stroke: var(--sell-solid); }
.trend-candle.down .trend-body { fill: var(--sell-solid); }

/* Unmoved: neither up nor down, so it borrows neither colour. */
.trend-candle.flat .trend-wick,
.trend-candle.flat .trend-body { stroke: var(--text-dim); }
.trend-candle.flat .trend-body { fill: var(--text-dim); }

/* Everything but the candle being read, while one is being read. */
.trend-candle.faded { opacity: 0.45; }

.trend-line {
  fill: none;
  stroke-width: 1.75;
  stroke-linejoin: miter;
  stroke-linecap: butt;
}

.trend-line.sell { stroke: var(--sell-solid); }

.trend-crosshair {
  stroke: var(--text-faint);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

/* What the chart is currently saying, in words — the full Rial-plus-Toman
 * treatment lives here rather than on the tick labels. */
.trend-readout {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-block-size: 1.6rem;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.trend-readout-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 0.7rem;
  min-inline-size: 0;
}

.trend-readout-at {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  min-inline-size: 0;
}

.trend-readout-now {
  font-weight: 700;
  color: var(--gold-text);
}

.trend-readout-side {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.trend-readout-figure {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* The two-line money treatment, as the portal renders it (MoneyFigure). */
.money {
  display: inline-flex;
  flex-direction: column;
  align-items: end;
  gap: 0.1rem;
}

.money-toman {
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dim);
  text-align: end;
  /* A spelled-out billion is a long phrase; let it wrap inside the block
     rather than widen the row it sits in. */
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

/* One candle's O/H/L/C, under the figure it closed at.
 *
 * A grid, not a sideways scroller: four ten-digit Persian numerals do not fit
 * a phone's width, and a numeral clipped at a scroll edge reads as a different
 * number rather than as "there is more". Two columns on a phone, four when
 * there is room for them. */
.trend-ohlc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.1rem 0.6rem;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  min-inline-size: 0;
  max-inline-size: 100%;
}

@media (min-width: 560px) {
  .trend-ohlc { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.trend-ohlc-figure {
  display: flex;
  gap: 0.2rem;
  align-items: baseline;
  min-inline-size: 0;
  white-space: nowrap;
}

/* Dotted underline: the affordance that says "there is an explanation behind
 * this word", and the `title` is that explanation on a pointer device. */
.trend-ohlc-label {
  color: var(--text-faint);
  border-block-end: 1px dotted var(--line-strong);
  cursor: help;
}

/* The «؟». Small, quiet, and beside the stamp rather than in the numerals. */
.trend-help {
  font-family: inherit;
  cursor: pointer;
  inline-size: 1.05rem;
  block-size: 1.05rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.62rem;
  line-height: 1;
  align-self: center;
  flex: 0 0 auto;
}

.trend-help.on {
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold-text);
}

/* Opens in flow, pushing the chart down — an overlay would need a physical
 * offset to be positioned, which is the one thing the RTL rules have no logical
 * property for (see trend.js). */
.trend-help-panel {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.6rem 0.7rem;
  background: color-mix(in srgb, var(--gold) 5%, transparent);
  font-size: 0.7rem;
  line-height: 1.7;
}

.trend-help-panel h4 {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  color: var(--gold-text);
}

.trend-help-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
}

.trend-help-panel dt {
  font-weight: 700;
  color: var(--text-dim);
}

.trend-help-panel dd {
  margin: 0;
  color: var(--text-faint);
}

.trend-help-note {
  margin: 0.45rem 0 0;
  color: var(--text-faint);
}

/* The window the server actually served — never the range that was asked for,
 * which is clamped rather than refused. */
.trend-window {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.trend-ranges {
  display: flex;
  gap: 0.35rem;
  margin-block-end: 0.6rem;
}

.trend-range {
  font-family: inherit;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-dim);
  padding-block: 0.25rem;
  padding-inline: 0.7rem;
  transition: background-color 140ms ease, color 140ms ease;
}

.trend-range.on {
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  color: var(--gold-text);
}

/* The metrics, as **one line** above the plot — the exchange convention the
 * shop pointed at, not a grid of cards beside the chart
 * (docs/price-history.md, "Where the metrics go").
 *
 * It scrolls sideways when it does not fit. On a narrow RTL screen the
 * alternative is three wrapped rows of Persian numerals, which is exactly the
 * clutter this line replaced. */
.trend-headline-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-block-end: 0.5rem;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.trend-headline {
  display: flex;
  gap: 0.9rem;
  margin: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  white-space: nowrap;
  align-items: baseline;
  min-inline-size: 0;
  max-inline-size: 100%;
  /* One line that scrolls is what the shop asked for (docs/price-history.md),
     and a figure cut off dead straight at that edge reads as a smaller number
     rather than as "swipe for more" — so the last centimetre fades out.

     `to left` is physical, and there is no logical form of a gradient
     direction. It is correct here because this site renders RTL only: the line
     starts at the inline-start edge on the right and overflows leftwards. If a
     left-to-right locale is ever added, this is one of the few rules that has
     to be mirrored by hand. */
  mask-image: linear-gradient(to left, #000 calc(100% - 1.6rem), transparent);
}

.trend-headline::-webkit-scrollbar { display: none; }

.trend-headline-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.trend-headline dt {
  font-size: 0.68rem;
  color: var(--text-faint);
  border-block-end: 1px dotted var(--line-strong);
  cursor: help;
}

.trend-headline dd {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Open-to-close over the window on screen. The arrow carries the direction,
   matching the market board's chip rather than inventing a second idiom. */
.trend-change {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.trend-change.up { color: var(--buy-text); }
.trend-change.down { color: var(--sell-text); }
.trend-change.flat { color: var(--text-dim); }

.trend-change-percent {
  font-size: 0.85em;
  opacity: 0.8;
}

/* ---------- not found ---------- */

/* The 404 keeps the site's shell and adds one composition inside it: a quiet
 * gold numeral, the sentence that actually explains the situation, and the way
 * out. Centred like the hero, and sharing its lead and action-row classes, so
 * the page reads as the same site rather than as a system page that happens to
 * be the same colour. */
.notfound {
  padding-block: clamp(3rem, 9vw, 6.5rem);
  text-align: center;
}

/* The one moment of personality on the page, and deliberately the only one.
 * Same metal as the primary button and the skip link, so it is the brand's
 * own gold rather than a second gold invented for an error page. */
.notfound-code {
  font-size: clamp(4.5rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  /* Persian numerals, like every other figure on this site
   * (docs/i18n-rtl.md) — the digits are in the markup, this only sets how
   * they look. letter-spacing opens them up at display size, where «۴۰۴»
   * otherwise reads as one glyph. */
  letter-spacing: 0.08em;
  margin-block-end: 1.75rem;
  /* The gradient is painted through the glyphs. `color` is set first and
   * stays the answer anywhere background-clip is unsupported: a solid gold
   * numeral, not an invisible one. */
  color: var(--gold-text);
  background: var(--gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
  /* Separate rule rather than `color: transparent` above, so the fallback
   * keeps its colour: a browser that ignores background-clip also ignores
   * -webkit-text-fill-color. */
  -webkit-text-fill-color: transparent;
  /* The glow the hero's logo disc has, borrowed as a soft pool of light
   * behind the numeral — enough to lift it off the background, not enough to
   * read as a graphic of its own. */
  filter: drop-shadow(0 18px 34px rgb(201 162 39 / 0.22));
}

/* A hairline under the numeral, fading out at both ends: the same gold line
 * the cards and the header use, drawn as a rule so the numeral sits on
 * something instead of floating. Symmetric, so it needs no RTL thought. */
.notfound-code::after {
  content: "";
  display: block;
  inline-size: min(14rem, 60%);
  block-size: 1px;
  margin-block: 1.5rem 0;
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.notfound h1 {
  /* Keeps the heading from breaking into a long line and a two-word orphan.
   * Ignored where unsupported, which costs nothing. */
  text-wrap: balance;
}

.notfound .hero-lead {
  max-inline-size: 34rem;
  /* Three lines and «خودشان هستند.» alone on the fourth is how this reads
   * on a phone without it. */
  text-wrap: pretty;
}

.notfound-note {
  /* --text-dim, not the --text-faint this size of text usually takes here:
   * the phone number in this line is the most useful thing on the page for
   * someone who was looking for one specific piece, and faint grey on this
   * background sits just under the 4.5:1 it needs to be read comfortably. */
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-block-start: 1.75rem;
  text-wrap: pretty;
}

.notfound-note a {
  text-decoration: none;
  border-block-end: 1px solid var(--line-strong);
  padding-block-end: 0.1rem;
}

/* ---------- «مسیریابی»: which map app to open (_map_choose.html) ----------
   A <details> rather than a script: the summary is the button, the open body
   is a small menu of نشان، بلد and گوگل مپ under it. It keeps the card-foot
   placement .branch-map gives the button on the contact page. */
.map-choose {
  position: relative;
  margin-block-start: auto;
  align-self: flex-start;
}

.map-choose > summary {
  list-style: none;
  cursor: pointer;
}

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

.map-menu {
  position: absolute;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-start: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-inline-size: 10rem;
  padding: 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  background: var(--bg);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.35);
}

.map-menu a {
  padding: 0.55rem 0.8rem;
  border-radius: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.map-menu a:hover,
.map-menu a:focus-visible {
  background: var(--raised);
  color: var(--gold-text);
}

/* «کپی نشانی» in the map menu: a button dressed as the links beside it. */
.map-menu .map-copy {
  font: inherit;
  font-size: 0.92rem;
  text-align: start;
  padding: 0.55rem 0.8rem;
  border: none;
  border-block-start: 1px solid var(--line);
  border-radius: 0 0 0.55rem 0.55rem;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
}

.map-menu .map-copy:hover,
.map-menu .map-copy:focus-visible {
  background: var(--raised);
  color: var(--gold-text);
}

/* Without the script the menu is a dropdown inside its card. A card is its
   own stacking context (glass, reveal transforms), so the next card down
   painted over the open menu. The card holding an open menu is lifted. */
.branch-card:has(.map-choose[open]),
.branch:has(.map-choose[open]) {
  position: relative;
  z-index: 20;
}

/* ---- map sheet (map-choose.js) ----
   A modal <dialog>: in the top layer, above everything on the page. A bottom
   sheet on a phone, a centred panel on a wide screen. Opaque, never glass —
   the page behind it is dimmed by the backdrop, not seen through the sheet. */
.map-sheet {
  inline-size: min(26rem, calc(100vw - 2rem));
  max-inline-size: none;
  max-block-size: min(36rem, calc(100svh - 2rem));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 1.5rem;
  background:
    radial-gradient(80% 60% at 100% 0%, rgb(228 199 101 / 0.12), transparent 60%),
    #0a1626;
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(228 199 101 / 0.35);
  overflow: auto;
}

.map-sheet::backdrop {
  background: rgb(3 7 13 / 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.map-sheet[open] {
  animation: sheet-in 320ms var(--ease);
}

.map-sheet[open]::backdrop {
  animation: sheet-fade 320ms ease;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.98);
  }
}

@keyframes sheet-fade {
  from {
    opacity: 0;
  }
}

.map-sheet-body {
  display: grid;
  gap: 1rem;
  padding: 1.1rem 1.1rem 1.25rem;
}

.map-sheet-handle {
  display: none;
}

.map-sheet-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--hair);
}

.map-sheet-mark {
  display: grid;
  place-items: center;
  inline-size: 2.9rem;
  block-size: 2.9rem;
  border-radius: 50%;
  color: var(--on-gold);
  background: var(--gold-metal);
}

.map-sheet-titles {
  min-inline-size: 0;
}

.map-sheet-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.map-sheet-address {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.map-sheet-close {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.map-sheet-close:hover,
.map-sheet-close:focus-visible {
  color: var(--gold-text);
  border-color: rgb(228 199 101 / 0.5);
}

.map-sheet-list {
  display: grid;
  gap: 0.5rem;
}

/* One option: a full-width row, large enough for a thumb. */
.map-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-block-size: 3.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.025);
  color: var(--text);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms var(--ease);
}

.map-option:hover,
.map-option:focus-visible {
  border-color: rgb(228 199 101 / 0.55);
  background: rgb(228 199 101 / 0.07);
}

.map-option:active {
  transform: scale(0.985);
}

.map-option-icon {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 0.8rem;
  color: var(--gold-text);
  background: rgb(201 162 39 / 0.1);
  border: 1px solid rgb(228 199 101 / 0.3);
}

.map-option-words {
  display: grid;
  gap: 0.05rem;
  min-inline-size: 0;
}

.map-option-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.map-option-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.map-option-go {
  color: var(--text-faint);
}

.map-option-copy {
  margin-block-start: 0.25rem;
  border-style: dashed;
}

.map-option-copy.done {
  border-style: solid;
  border-color: var(--buy-text);
}

.map-option-copy.done .map-option-icon {
  color: var(--buy-text);
}

/* A phone: a sheet from the bottom edge, with a grab handle. */
@media (max-width: 40rem) {
  .map-sheet {
    inline-size: 100vw;
    max-block-size: 85svh;
    margin: auto 0 0;
    border-radius: 1.5rem 1.5rem 0 0;
    border-block-end: 0;
  }

  .map-sheet[open] {
    animation-name: sheet-up;
  }

  .map-sheet-body {
    padding-block: 0.6rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .map-sheet-handle {
    display: block;
    justify-self: center;
    inline-size: 2.75rem;
    block-size: 0.3rem;
    border-radius: 999px;
    background: var(--line-strong);
  }

  @keyframes sheet-up {
    from {
      transform: translateY(100%);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-sheet[open],
  .map-sheet[open]::backdrop {
    animation: none;
  }
}

/* =========================================================================
   The atelier redesign (2026-11, owner's request: "luxurious")

   What changed in spirit: the site used to be a centred column of equal
   boxes. It is now set like a printed catalogue — a few very large things
   (the name, a struck coin, section titles), a lot of air, and hairlines
   instead of boxes wherever a boundary is enough. Gold is still an accent:
   it is on type and edges, never a filled area larger than a button.

   Three rules this section keeps, each learned earlier in this file:

   - No `letter-spacing` anywhere. Persian letters join; spacing them breaks
     the words apart.
   - No rule or dash in front of a heading (owner, 2026-10-19). Numerals
     above a card's title are content, set large — not an ornament beside it.
   - Everything that moves stops under `prefers-reduced-motion`, and nothing
     is hidden waiting for a script: `[data-reveal]` starts hidden only under
     `.js`, which site.js sets — with JavaScript off the page is simply still.

   The price board, the trend chart, the gallery's filter bar, the contact
   page's channels and the map chooser keep their own rules above; they were
   each tuned on real phones and this pass leaves them alone.
   ========================================================================= */

:root {
  /* Gold as struck metal, for type: light → deep → light, so a long word
     catches the light twice. */
  --foil: linear-gradient(100deg, #f7e9b8 0%, #e4c765 26%, #b8871f 50%, #f2dd9a 76%, #c9a227 100%);
  --hair: rgb(228 199 101 / 0.2);
  --panel: linear-gradient(160deg, rgb(30 48 72 / 0.6), rgb(9 18 31 / 0.78));
  --shadow-deep: 0 44px 80px -44px rgb(0 0 0 / 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* A whisper of grain over the navy, so large flat areas read as paper rather
   than as a screen. An inline SVG: `img-src 'self' data:` allows it, and it
   costs no request. */
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .86  0 0 0 0 .55  0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(1200px 700px at 50% -10%, rgb(201 162 39 / 0.17), transparent 62%),
    radial-gradient(900px 560px at 102% 105%, rgb(201 162 39 / 0.09), transparent 60%),
    linear-gradient(175deg, var(--bg-2), var(--bg) 60%);
}

/* `hidden` means hidden. Any rule that sets `display` on a class would
   otherwise quietly un-hide the element — a calculator's empty "value" row
   and the quiz's unanswered explanations both rely on the attribute. */
[hidden] {
  display: none !important;
}

::selection {
  background: rgb(228 199 101 / 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

.wrap {
  max-inline-size: 74rem;
}

/* Type set as foil. `color` stays as the fallback for anything that cannot
   clip a background to text. */
.foil {
  color: var(--gold-text);
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- buttons ---------- */

.btn-portal,
.btn-primary,
.btn-ghost {
  position: relative;
  overflow: hidden;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease),
    border-color 300ms var(--ease), background-color 300ms var(--ease);
}

.btn-portal,
.btn-primary {
  box-shadow:
    0 14px 28px -14px rgb(201 162 39 / 0.7),
    inset 0 1px 0 rgb(255 255 255 / 0.45);
}

/* A band of light crossing the metal on hover. */
.btn-portal::after,
.btn-primary::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -60%;
  inline-size: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.55), transparent);
  transform: skewX(-18deg);
  transition: inset-inline-start 700ms var(--ease);
}

.btn-portal:hover::after,
.btn-primary:hover::after {
  inset-inline-start: 120%;
}

.btn-portal:hover,
.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.02);
}

.btn-ghost:hover {
  border-color: var(--gold-text);
  background: rgb(228 199 101 / 0.08);
}

/* ---------- header ---------- */

.site-header {
  background: rgb(5 11 18 / 0.6);
  border-block-end-color: transparent;
  transition: background-color 300ms ease, border-color 300ms ease;
}

/* site.js sets this once the page has moved; with no script the bar keeps
   the translucent look above, which is legible over every section. */
.site-header.is-scrolled {
  background: rgb(5 11 18 / 0.9);
  border-block-end-color: var(--line);
}

.site-nav a {
  position: relative;
  transition: color 200ms ease, background-color 200ms ease;
}

.site-nav a[aria-current="page"] {
  color: var(--gold-text);
  background: transparent;
}

/* The home link gives way on a phone: the mark beside it is the same link,
   and the row has to hold «ویترین · مجله · تماس با ما» and the button. */
@media (max-width: 40rem) {
  .site-nav .nav-home {
    display: none;
  }
}

/* ---------- reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- section furniture ---------- */

.section {
  padding-block: clamp(2.25rem, 6vw, 4.75rem);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--gold-text);
  font-size: 0.86rem;
  font-weight: 600;
}

.display {
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.3;
  margin-block: 0 0.75rem;
}

.section-intro {
  color: var(--text-dim);
  max-inline-size: 38rem;
  margin-block: 0 1.75rem;
  font-size: 1.02rem;
}

.lead {
  font-size: 1rem;
  color: var(--text-dim);
  margin-block-end: 1.25rem;
}

.hero-note {
  color: var(--text-faint);
  font-size: 0.9rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 300ms var(--ease);
}

/* The arrow on a link that opens another page. The shop asked for it
   mirrored from the earlier left-pointing chevron, so it points right.
   Flipped with a transform rather than by picking the other glyph: «‹» and
   «›» are bidi-mirrored characters, so which way either one draws depends on
   the direction of the text around it, and a transform does not. */
.link-more::after {
  content: "‹";
  display: inline-block;
  transform: scaleX(-1);
  font-size: 1.15em;
  line-height: 1;
}

.link-more:hover {
  gap: 0.75rem;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.3rem 0.95rem;
  border: 1px solid var(--hair);
  border-radius: 2rem;
  color: var(--gold-text);
  font-size: 0.86rem;
  background: rgb(228 199 101 / 0.06);
}

.hero-title {
  font-size: clamp(2.5rem, 7.4vw, 5.4rem);
  font-weight: 900;
  line-height: 1.22;
  margin-block: 0 0.9rem;
}

.hero-lead {
  color: var(--text-dim);
  max-inline-size: 34rem;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 300;
  line-height: 2;
  margin-block: 0;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-block: 1.75rem 0;
}

.chips {
  list-style: none;
  padding-inline-start: 0;
  margin-block: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* A small struck dot, as a list marker — decoration, so generated. */
.chips li::before {
  content: "";
  inline-size: 0.4rem;
  block-size: 0.4rem;
  border-radius: 50%;
  background: var(--gold-metal);
  box-shadow: 0 0 10px rgb(228 199 101 / 0.7);
  flex: 0 0 auto;
}

/* The centred variants: the 404 page uses the hero's type without its grid. */
.notfound .hero-lead {
  margin-inline: auto;
}

.notfound .hero-actions {
  justify-content: center;
}

/* ---- the coin ----
   The shop's mark, struck. Drawn entirely in CSS — a turning rim, a reeded
   edge, a navy face carrying the logo and a band of light that crosses it —
   so it costs no image request and stays sharp at any size. site.js tilts it
   toward the pointer by setting --rx/--ry; without a script it simply turns. */
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: clamp(15rem, 34vw, 27rem);
}

.hero-art::before {
  content: "";
  position: absolute;
  inline-size: 120%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(228 199 101 / 0.2), transparent 62%);
  filter: blur(10px);
}

.coin {
  position: relative;
  inline-size: clamp(12rem, 27vw, 21rem);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: perspective(60rem) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 500ms var(--ease);
  filter: drop-shadow(0 34px 34px rgb(0 0 0 / 0.6));
}

.coin-rim,
.coin-reed,
.coin-face,
.coin-shine {
  position: absolute;
  border-radius: 50%;
}

.coin-rim {
  inset: 0;
  background: conic-gradient(
    #6f4e0f, #f7e9b8 12%, #b8871f 24%, #f2dd9a 38%, #7a5512 50%,
    #e4c765 62%, #9a7118 76%, #f7e9b8 88%, #6f4e0f
  );
  animation: coin-turn 16s linear infinite;
}

/* The milled edge: fine teeth, visible only in the ring between rim and face. */
.coin-reed {
  inset: 2.2%;
  background: repeating-conic-gradient(rgb(0 0 0 / 0.38) 0 1.2deg, transparent 1.2deg 2.4deg);
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%);
  mask: radial-gradient(circle, transparent 63%, #000 64%);
}

.coin-face {
  inset: 6.5%;
  display: grid;
  place-items: center;
  /* The header logo's disc (--bg-2), with one soft light across it — the
     same navy as the header's mark and the 3D coin's face (owner,
     2026-11-12). It used to run from a brighter blue to near-black. */
  background:
    radial-gradient(circle at 34% 28%, rgb(80 130 190 / 0.16), transparent 58%),
    var(--bg-2);
  border: 1px solid rgb(228 199 101 / 0.55);
  box-shadow:
    inset 0 0 2.5rem rgb(0 0 0 / 0.35),
    inset 0 0 0 0.5rem rgb(228 199 101 / 0.07),
    inset 0 0 0 0.56rem rgb(228 199 101 / 0.28);
}

.coin-face img {
  inline-size: 60%;
  block-size: auto;
  display: block;
}

.coin-shine {
  inset: 6.5%;
  background: linear-gradient(115deg, transparent 38%, rgb(255 246 208 / 0.26) 49%, transparent 60%);
  background-size: 260% 100%;
  animation: coin-sheen 7s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border: 1px solid var(--hair);
  border-radius: 50%;
  aspect-ratio: 1;
  animation: coin-turn 38s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  inset-block-start: -0.22rem;
  inset-inline-start: 50%;
  inline-size: 0.44rem;
  block-size: 0.44rem;
  border-radius: 50%;
  background: var(--gold-metal);
  box-shadow: 0 0 14px rgb(228 199 101 / 0.9);
}

.orbit-a {
  inline-size: clamp(15rem, 34vw, 26.5rem);
}

.orbit-b {
  inline-size: clamp(18rem, 41vw, 32rem);
  animation-duration: 62s;
  animation-direction: reverse;
  opacity: 0.6;
}

@keyframes coin-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes coin-sheen {
  0%, 20% {
    background-position: 120% 0;
  }
  70%, 100% {
    background-position: -40% 0;
  }
}

@media (max-width: 52rem) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  /* The coin leads on a phone, small: it is the brand, and the name follows. */
  .hero-art {
    order: -1;
    min-block-size: 13.5rem;
  }

  .coin {
    inline-size: 10.5rem;
  }

  .orbit-a {
    inline-size: 13rem;
  }

  .orbit-b {
    inline-size: 15.5rem;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .chips {
    justify-content: center;
  }
}

/* ---- the coin, in three dimensions ----
   For a visitor with WebGL and no objection to motion, hero-coin.js replaces
   the CSS coin above with a model: the bare mark, which gains depth, turns to
   metal, grows a coin behind itself and turns over as the pinned hero is
   scrolled (docs/public-site-and-seo.md, "The hero coin").

   Two classes on <html>, both set by that script and neither by markup:
   `.coin3d-loading` while the model is on its way, `.coin3d` once it is
   drawn. With neither, nothing below applies and the CSS coin is the hero. */
.coin-stage {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: var(--coin-stage);
  block-size: var(--coin-stage);
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}

.hero-art {
  --coin-stage: clamp(15rem, 34vw, 27rem);
}

/* The hero takes the whole screen under the header while it is pinned;
   anything shorter would leave a band of empty page below it for the length
   of the scroll. `svh`, not `vh`: a phone's address bar must not resize it
   mid-gesture. --coin-header is measured by the script. */
.coin3d-loading .hero,
.coin-pending .hero,
.coin3d .hero {
  display: grid;
  align-content: center;
  min-block-size: calc(100svh - var(--coin-header, 4.5rem));
}

.coin3d-loading .coin-stage,
.coin-pending .coin-stage,
.coin3d .coin-stage {
  display: block;
}

/* The orbits are the CSS coin's own decoration; the mark has a ring already. */
.coin3d-loading .orbit,
.coin-pending .orbit,
.coin3d .orbit {
  display: none;
}

/* The CSS coin, stripped back to the logo alone and sized to sit exactly
   where the model draws it at rest, so one hands over to the other without a
   jump. 86% is LOGO_FILL in hero-coin-scene.js — change them together. */
.coin3d-loading .coin,
.coin-pending .coin,
.coin3d .coin {
  inline-size: var(--coin-stage);
  transform: none;
  filter: none;
  transition: opacity 500ms ease;
}

.coin3d-loading .coin-rim,
.coin-pending .coin-rim,
.coin3d-loading .coin-reed,
.coin-pending .coin-reed,
.coin3d-loading .coin-shine,
.coin-pending .coin-shine,
.coin3d .coin-rim,
.coin3d .coin-reed,
.coin3d .coin-shine {
  display: none;
}

/* The model's first frame is the header's mark: the logo on the navy disc
   (hero-coin-scene.js, the plate — FIELD across, 89% of the stage). */
.coin3d-loading .coin-face,
.coin-pending .coin-face,
.coin3d .coin-face {
  inset: 5.5%;
  background: var(--bg-2);
  /* The header disc's thin gold circle (.brand-mark), as on the model's
     first frame (hero-coin-scene.js, "hair"). */
  border: 1px solid rgb(201 162 39 / 0.45);
  box-shadow: none;
}

/* 86% of the stage (LOGO_FILL), inside a face that is 89% of it. */
.coin3d-loading .coin-face img,
.coin-pending .coin-face img,
.coin3d .coin-face img {
  inline-size: 96.6%;
}

.coin3d .coin {
  opacity: 0;
}

.coin3d .coin-stage {
  opacity: 1;
}

/* `.coin-pending` (coin-boot.js, in <head>) is the loading look from
   the very first paint, before hero-coin.js or mast-coin.js has run: without
   it the old CSS coin — rim, reeding, orbits — showed for a moment and was
   then swapped for the model (owner, 2026-11-12). The scripts take it off
   once they have either taken over or given up; giving up leaves the full
   CSS coin, which is then the right thing to show. */

@media (max-width: 52rem) {
  /* Larger than the CSS coin on a phone: for the length of the pin it is the
     thing being looked at. */
  .coin3d-loading .hero-art,
  .coin-pending .hero-art,
  .coin3d .hero-art {
    --coin-stage: min(64vw, 17rem);
    min-block-size: var(--coin-stage);
  }
}

/* ---------- figures (the trust band) ----------
   Three claims in a row, parted by hairlines rather than boxed. */
.figures {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  border-block: 1px solid var(--hair);
}

.figure {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 2rem);
  border-inline-start: 1px solid var(--hair);
}

.figure:first-child {
  border-inline-start: 0;
}

.figure-head {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
}

.figure-body {
  color: var(--text-dim);
  font-size: 0.95rem;
}

@media (max-width: 47rem) {
  .figure {
    border-inline-start: 0;
    border-block-start: 1px solid var(--hair);
  }

  .figure:first-child {
    border-block-start: 0;
  }
}

/* ---------- split: a title that stays, beside what it introduces ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}

.split-head {
  position: sticky;
  inset-block-start: 6rem;
}

.split-head p:not(.eyebrow) {
  color: var(--text-dim);
  margin-block: 0 1.25rem;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: 1fr;
  }

  .split-head {
    position: static;
  }
}

/* The six reasons: a ruled list with its numerals, like a contents page. */
.reasons {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: reason;
}

.reasons li {
  counter-increment: reason;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-block: 1.05rem;
  border-block-end: 1px solid var(--hair);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 600;
  transition: padding-inline-start 400ms var(--ease), color 300ms ease;
}

.reasons li:first-child {
  border-block-start: 1px solid var(--hair);
}

.reasons li::before {
  content: counter(reason, persian);
  flex: 0 0 1.6rem;
  color: var(--gold-text);
  font-weight: 300;
  font-size: 1.35em;
  font-variant-numeric: tabular-nums;
}

.reasons li:hover {
  padding-inline-start: 0.6rem;
  color: var(--gold-text);
}

/* ---------- panels ---------- */

.guide-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(24rem, 100%), 1fr));
  counter-reset: guide;
}

.guide-card,
.branch,
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(255 255 255 / 0.05);
  transition: border-color 400ms ease, transform 400ms var(--ease);
}

.guide-card:hover,
.branch:hover,
.feature:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.guide-card {
  counter-increment: guide;
  padding: clamp(1.4rem, 3vw, 2.1rem);
}

/* The numeral is the card's first line, set large and light. */
.guide-grid .guide-card::before {
  content: counter(guide, persian);
  display: block;
  font-size: 2.6rem;
  font-weight: 200;
  line-height: 1;
  margin-block-end: 0.9rem;
  color: var(--gold-text);
  opacity: 0.85;
}

.prose h3 {
  margin-block: 0 0.8rem;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
}

.prose p {
  color: var(--text-dim);
  margin-block: 0 0.9rem;
  line-height: 2.05;
}

.prose p:last-child {
  margin-block-end: 0;
}

.prose strong {
  color: var(--gold-text);
  font-weight: 700;
}

.feature {
  padding: 1.5rem 1.6rem;
}

/* ---------- branches ---------- */

.branch-grid {
  list-style: none;
  padding-inline-start: 0;
  margin: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

.branch {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1.3rem, 3vw, 1.9rem);
}

.branch-label {
  font-weight: 800;
  font-size: 1.3rem;
  margin-block-end: 0.3rem;
}

.branch-line {
  color: var(--text-dim);
}

.branch-note {
  margin-block: 0.5rem 0.35rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

/* ---------- vitrine cards: a slower, deeper hover ---------- */

.card a {
  border-radius: 1.3rem;
  background: var(--panel);
  transition: border-color 400ms ease, transform 400ms var(--ease), box-shadow 400ms ease;
}

.card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-deep);
}

.card-media {
  overflow: hidden;
}

.card-media img {
  transition: transform 900ms var(--ease);
}

.card a:hover .card-media img {
  transform: scale(1.05);
}

/* ---------- the magazine ---------- */

.mag-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(18.5rem, 100%), 1fr));
}

.mag-card a {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transition: border-color 400ms ease, transform 500ms var(--ease);
}

.mag-card a:hover {
  border-color: var(--line-strong);
  transform: translateY(-6px);
}

.mag-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.3rem 1.4rem 1.5rem;
  flex: 1;
}

.mag-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.mag-meta .mag-topic {
  color: var(--gold-text);
  font-weight: 600;
}

.mag-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.7;
  margin: 0;
}

.mag-summary {
  color: var(--text-dim);
  font-size: 0.93rem;
  margin: 0;
  line-height: 1.95;
}

/* What you can *do* in the piece — the tool it carries. */
.mag-tool {
  margin-block-start: auto;
  padding-block-start: 0.85rem;
  border-block-start: 1px solid var(--hair);
  color: var(--gold-text);
  font-size: 0.86rem;
  font-weight: 600;
}

/* ---- covers ----
   Typographic, not photographic: one word of the subject set enormous in
   foil over a pattern drawn in gradients. No image to commission, license or
   load, and no two alike. */
.cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #08121f;
  isolation: isolate;
}

.cover::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  transition: transform 1200ms var(--ease);
}

a:hover > .cover::before {
  transform: scale(1.08) rotate(2deg);
}

.cover-word {
  font-size: clamp(3rem, 9vw, 5.2rem);
  font-weight: 200;
  line-height: 1.5;
  color: var(--gold-text);
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgb(0 0 0 / 0.6));
}

/* Rings — fineness, the circle of the assay stamp. */
.cover-purity::before {
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 1.35rem, rgb(228 199 101 / 0.16) 1.35rem 1.42rem),
    radial-gradient(circle at 50% 50%, rgb(201 162 39 / 0.3), transparent 60%);
}

/* Bubbles. */
.cover-bubble::before {
  background:
    radial-gradient(circle at 22% 68%, transparent 3.2rem, rgb(228 199 101 / 0.4) 3.25rem, transparent 3.4rem),
    radial-gradient(circle at 74% 30%, transparent 4.6rem, rgb(228 199 101 / 0.3) 4.65rem, transparent 4.8rem),
    radial-gradient(circle at 60% 82%, transparent 1.7rem, rgb(228 199 101 / 0.45) 1.75rem, transparent 1.9rem),
    radial-gradient(circle at 36% 24%, transparent 2.2rem, rgb(228 199 101 / 0.28) 2.25rem, transparent 2.4rem),
    radial-gradient(circle at 70% 60%, rgb(201 162 39 / 0.22), transparent 55%);
}

/* Poured bars. */
.cover-melted::before {
  background:
    repeating-linear-gradient(118deg, transparent 0 2.4rem, rgb(228 199 101 / 0.13) 2.4rem 2.5rem, rgb(228 199 101 / 0.05) 2.5rem 4.6rem),
    radial-gradient(circle at 30% 40%, rgb(201 162 39 / 0.28), transparent 60%);
}

/* A stack of coins seen from above. */
.cover-coins::before {
  background:
    radial-gradient(circle at 30% 55%, transparent 5.4rem, rgb(228 199 101 / 0.35) 5.45rem, transparent 5.6rem),
    radial-gradient(circle at 44% 50%, transparent 5.4rem, rgb(228 199 101 / 0.28) 5.45rem, transparent 5.6rem),
    radial-gradient(circle at 58% 45%, transparent 5.4rem, rgb(228 199 101 / 0.22) 5.45rem, transparent 5.6rem),
    radial-gradient(circle at 72% 40%, transparent 5.4rem, rgb(228 199 101 / 0.16) 5.45rem, transparent 5.6rem),
    radial-gradient(circle at 40% 50%, rgb(201 162 39 / 0.2), transparent 60%);
}

/* The lead piece on the magazine's front page: cover beside text. */
.mag-lead a {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transition: border-color 400ms ease;
}

.mag-lead a:hover {
  border-color: var(--line-strong);
}

.mag-lead .cover {
  aspect-ratio: auto;
  min-block-size: 17rem;
}

.mag-lead .cover-word {
  font-size: clamp(4rem, 11vw, 8rem);
}

.mag-lead .mag-body {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  justify-content: center;
}

.mag-lead .mag-title {
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
}

@media (max-width: 47rem) {
  .mag-lead a {
    grid-template-columns: 1fr;
  }

  .mag-lead .cover {
    min-block-size: 0;
    aspect-ratio: 16 / 9;
  }
}

.blog-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.blog-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 900;
  margin-block: 0 0.6rem;
}

/* ---------- tools ----------
   A tool is a framed instrument: what you set on one side, what it reads on
   the other. Figures are tabular so they do not jitter as they change. */
.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.tool-in,
.tool-out {
  display: grid;
  align-content: start;
  gap: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.tool-out {
  background: var(--well);
  border-inline-start: 1px solid var(--hair);
}

.tool-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.tool-hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.84rem;
}

@media (max-width: 47rem) {
  .tool {
    grid-template-columns: 1fr;
  }

  .tool-out {
    border-inline-start: 0;
    border-block-start: 1px solid var(--hair);
  }
}

.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.field input {
  inline-size: 100%;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgb(4 10 18 / 0.6);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field input:focus {
  outline: none;
  border-color: var(--gold-text);
  box-shadow: 0 0 0 3px rgb(228 199 101 / 0.18);
}

.field input::placeholder {
  color: var(--text-faint);
  font-weight: 400;
}

/* A row of choices, one pressed. Buttons, not radios: each is a preset that
   may also write into a field beside it. */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.seg legend {
  padding: 0;
  margin-block-end: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.seg button {
  font: inherit;
  display: grid;
  justify-items: center;
  gap: 0.05rem;
  min-inline-size: 4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgb(4 10 18 / 0.45);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms var(--ease);
}

.seg button small {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 0.72rem;
}

.seg button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.seg button[aria-pressed="true"] {
  background: var(--gold-metal);
  border-color: transparent;
  color: var(--on-gold);
}

.seg button[aria-pressed="true"] small {
  color: rgb(27 20 4 / 0.75);
}

.readout {
  display: grid;
  gap: 0.1rem;
}

.readout-cap {
  color: var(--text-dim);
  font-size: 0.84rem;
}

.readout-value {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.readout-value small {
  font-size: 0.42em;
  font-weight: 400;
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
}

.readout-sub {
  color: var(--text-faint);
  font-size: 0.82rem;
  min-block-size: 1.5em;
}

.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--hair);
}

.readouts .readout-value {
  font-size: 1.25rem;
  color: var(--text);
}

/* How much of the bar is gold. */
.meter {
  block-size: 0.5rem;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.07);
  overflow: hidden;
}

.meter span {
  display: block;
  block-size: 100%;
  inline-size: var(--fill, 0%);
  border-radius: inherit;
  background: var(--gold-metal);
  transition: inline-size 600ms var(--ease);
}

.meter.is-negative span {
  background: var(--sell-solid);
}

/* The coin comparer's disc: scales with the chosen coin's weight. */
.coin-stage {
  display: grid;
  place-items: center;
  min-block-size: 11rem;
}

.coin-disc {
  inline-size: calc(4.5rem + 5.5rem * var(--scale, 1));
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--on-gold);
  font-weight: 800;
  line-height: 1.5;
  background:
    radial-gradient(circle at 34% 28%, #fff3c4, transparent 42%),
    conic-gradient(#b8871f, #f2dd9a, #c9a227, #f7e9b8, #9a7118, #e4c765, #b8871f);
  box-shadow:
    inset 0 0 0 0.3rem rgb(111 78 15 / 0.55),
    inset 0 0 0 0.42rem rgb(255 243 196 / 0.5),
    0 22px 30px -14px rgb(0 0 0 / 0.75);
  transition: inline-size 700ms var(--ease);
}

.coin-disc small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
}

/* ---------- quiz ---------- */

.quiz {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  counter-reset: quiz;
}

.quiz-q {
  counter-increment: quiz;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  transition: border-color 300ms ease;
}

.quiz-q.is-right {
  border-color: rgb(62 203 146 / 0.55);
}

.quiz-q.is-wrong {
  border-color: rgb(255 123 136 / 0.5);
}

.quiz-text {
  margin: 0 0 0.9rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.quiz-text::before {
  content: counter(quiz, persian) ". ";
  color: var(--gold-text);
}

.quiz-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-opts button {
  font: inherit;
  padding: 0.5rem 1.1rem;
  border-radius: 2rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.quiz-opts button:hover:not(:disabled) {
  background: rgb(228 199 101 / 0.1);
}

.quiz-opts button:disabled {
  cursor: default;
  opacity: 0.55;
}

.quiz-opts button.is-answer {
  opacity: 1;
  background: rgb(15 157 99 / 0.22);
  border-color: var(--buy-text);
  color: var(--buy-text);
  font-weight: 700;
}

.quiz-opts button.is-miss {
  opacity: 1;
  background: rgb(211 63 77 / 0.18);
  border-color: var(--sell-text);
  color: var(--sell-text);
}

.quiz-why {
  margin: 0.85rem 0 0;
  color: var(--text-dim);
  font-size: 0.93rem;
}

.quiz-score {
  margin-block-start: 1.25rem;
  padding: 1.2rem 1.4rem;
  border-radius: 1.3rem;
  border: 1px solid var(--line-strong);
  background: var(--well);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

/* ---------- the article ---------- */

/* Reading progress: a gold hairline under the header, grown by site.js. */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  z-index: 30;
  pointer-events: none;
}

.progress span {
  display: block;
  block-size: 100%;
  inline-size: var(--read, 0%);
  background: var(--gold-metal);
  box-shadow: 0 0 12px rgb(228 199 101 / 0.8);
}

.article-hero {
  padding-block: clamp(1.5rem, 4vw, 3rem) 0;
}

.article-hero h1 {
  font-size: clamp(1.8rem, 4.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.5;
  max-inline-size: 48rem;
  margin-block: 0.6rem 1rem;
}

.article-summary {
  color: var(--text-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 300;
  max-inline-size: 44rem;
  margin: 0 0 1.25rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.toc {
  position: sticky;
  inset-block-start: 6rem;
  display: grid;
  gap: 0.15rem;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--hair);
  font-size: 0.9rem;
}

.toc-cap {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin: 0 0 0.4rem;
}

.toc a {
  color: var(--text-dim);
  text-decoration: none;
  padding-block: 0.3rem;
  transition: color 200ms ease, padding-inline-start 300ms var(--ease);
}

.toc a:hover,
.toc a.is-current {
  color: var(--gold-text);
  padding-inline-start: 0.4rem;
}

@media (max-width: 56rem) {
  /* minmax(0, …), not a bare 1fr: a bare 1fr track is never narrower than
     its widest content, so one unwrapped table pushed the whole article —
     contents strip, text, tools — past the edge of a phone. */
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-layout > * {
    min-inline-size: 0;
  }

  /* On a phone the contents list is a strip you swipe, above the text. */
  .toc {
    position: static;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0 0 0.5rem;
    border: 0;
    scrollbar-width: none;
  }

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

  .toc-cap {
    display: none;
  }

  .toc a {
    flex: 0 0 auto;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
  }

  .toc a:hover,
  .toc a.is-current {
    padding-inline-start: 0.9rem;
    border-color: var(--gold-text);
  }
}

.article-body {
  max-inline-size: 46rem;
  font-size: 1.05rem;
}

.article-body section {
  /* Clear of the sticky header when a contents link lands here. */
  scroll-margin-block-start: 6rem;
  margin-block-end: clamp(2rem, 5vw, 3.25rem);
}

.article-body h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  font-weight: 800;
  margin-block: 0 1rem;
}

.article-body p {
  color: var(--text-dim);
  line-height: 2.2;
  margin-block: 0 1.1rem;
}

.article-body strong {
  color: var(--gold-text);
}

.article-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.article-body ul li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--text-dim);
  line-height: 2;
}

.article-body ul li::before {
  content: "";
  flex: 0 0 0.4rem;
  block-size: 0.4rem;
  border-radius: 50%;
  background: var(--gold-metal);
  transform: translateY(-0.15rem);
}

.takeaways {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 1.4rem;
  padding: clamp(1.2rem, 3vw, 1.75rem);
  margin-block-end: clamp(2rem, 5vw, 3rem);
}

.takeaways h2 {
  font-size: 1rem;
  color: var(--gold-text);
  margin-block: 0 0.8rem;
}

.takeaways ul {
  margin: 0;
}

.takeaways ul li {
  color: var(--text);
}

/* A formula, set apart and centred like one on a blackboard. */
.formula {
  margin: 0 0 1.25rem;
  padding: 1.2rem 1.4rem;
  text-align: center;
  border-radius: 1.1rem;
  background: var(--well);
  border: 1px solid var(--hair);
}

.formula b {
  display: block;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 700;
  line-height: 2;
}

.formula small {
  display: block;
  margin-block-start: 0.3rem;
  color: var(--text-faint);
  font-size: 0.84rem;
}

.article-body .callout {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--hair);
  background: rgb(228 199 101 / 0.06);
  color: var(--text);
  font-size: 0.95rem;
}

/* Wide tables scroll inside themselves, never the page. */
.table-wrap {
  overflow-x: auto;
  margin-block-end: 1.25rem;
  border: 1px solid var(--hair);
  border-radius: 1.1rem;
}

.spec-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  white-space: nowrap;
}

.spec-table th,
.spec-table td {
  padding: 0.8rem 1.1rem;
  text-align: start;
  border-block-end: 1px solid var(--hair);
}

.spec-table thead th {
  color: var(--gold-text);
  font-weight: 700;
  background: var(--well);
}

/* On a phone a row may wrap: a table you read beats a table you swipe. The
   first column (the name of the thing) still holds together. */
@media (max-width: 40rem) {
  .spec-table {
    white-space: normal;
    font-size: 0.9rem;
  }

  .spec-table th,
  .spec-table td {
    padding: 0.7rem 0.8rem;
  }

  .spec-table th,
  .spec-table td:first-child {
    white-space: nowrap;
  }
}

.spec-table tbody tr:last-child td {
  border-block-end: 0;
}

.spec-table td {
  color: var(--text-dim);
}

.spec-table td:first-child {
  color: var(--text);
  font-weight: 700;
}

.article-tool {
  margin-block: 1.75rem;
}

.article-tool .tool-title {
  margin-block-end: 0.9rem;
  font-size: 1.2rem;
}

/* Questions that open. The marker is the browser's own triangle, replaced by
   a plus that turns. */
.faq {
  display: grid;
  gap: 0.6rem;
}

.faq details {
  border: 1px solid var(--hair);
  border-radius: 1.1rem;
  background: var(--panel);
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--text);
}

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

.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--gold-text);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 300ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
}

/* ---------- closing band ---------- */

.cta-band {
  position: relative;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line-strong);
  border-radius: 2rem;
  background:
    radial-gradient(60% 120% at 50% 0%, rgb(201 162 39 / 0.2), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(255 255 255 / 0.08);
  overflow: hidden;
}

.cta-band p {
  color: var(--text-dim);
  margin-block: 0 1.5rem;
  max-inline-size: 40rem;
  margin-inline: auto;
}

.cta-contacts {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ----------
   One dark panel with rounded shoulders, opened by a gold seam that glows
   at its middle. The mark and the name beside the ways to reach the shop;
   three columns under a hairline; the rights line and «بازگشت به بالا» at
   the foot. The shop's name sits behind it all, enormous and nearly
   invisible, cut off by the panel's edge like an engraving off a plate. */

.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-block-start: clamp(3rem, 8vw, 6rem);
  border-radius: clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.75rem) 0 0;
  border: 1px solid var(--line);
  border-block-end: 0;
  background:
    radial-gradient(60% 80% at 50% 0%, rgb(228 199 101 / 0.1), transparent 60%),
    radial-gradient(50% 60% at 100% 100%, rgb(26 54 85 / 0.45), transparent 70%),
    #050c16;
  color: var(--text-dim);
}

/* The name, huge and faint, as a watermark along the panel's foot. */
.site-footer::before {
  /* The shop's own name, from the page (data-mark), not typed here. */
  content: attr(data-mark);
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  inset-block-end: -0.32em;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 14vw, 12rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgb(228 199 101 / 0.09);
  pointer-events: none;
  white-space: nowrap;
}

.footer-seam {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 8%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, rgb(242 221 154 / 0.85), transparent);
  box-shadow: 0 0 18px 1px rgb(228 199 101 / 0.35);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-block: clamp(2.25rem, 6vw, 3.5rem) clamp(1.75rem, 4vw, 2.5rem);
  border-block-end: 1px solid var(--hair);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
  min-inline-size: 0;
}

.footer-mark {
  flex: 0 0 auto;
  inline-size: 4rem;
  block-size: 4rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(228 199 101 / 0.45), 0 12px 30px -10px rgb(228 199 101 / 0.45);
}

.footer-brand-words {
  display: grid;
  gap: 0.2rem;
  min-inline-size: 0;
}

.footer-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.4;
}

.footer-tag {
  max-inline-size: 26rem;
  font-size: 0.9rem;
  line-height: 1.9;
}

.footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.6rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  inline-size: 2.9rem;
  block-size: 2.9rem;
  border-radius: 50%;
  color: var(--gold-text);
  border: 1px solid rgb(228 199 101 / 0.35);
  background: rgb(201 162 39 / 0.06);
  transition: color 250ms ease, background 250ms ease, transform 250ms var(--ease), box-shadow 250ms ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--on-gold);
  background: var(--gold-metal);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -10px rgb(228 199 101 / 0.7);
}

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-block: clamp(2rem, 5vw, 3rem);
}

.footer-cap {
  margin: 0 0 1rem;
  color: var(--gold-text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-nav,
.footer-branches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.footer-nav a {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 200ms ease, padding-inline-start 300ms var(--ease);
}

/* A small gold dot slides in before the link you are on. */
.footer-nav a::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  inline-size: 0.32rem;
  block-size: 0.32rem;
  border-radius: 50%;
  background: var(--gold-metal);
  opacity: 0;
  translate: 0 -50%;
  transition: opacity 200ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--gold-text);
  padding-inline-start: 0.75rem;
}

.footer-nav a:hover::before,
.footer-nav a:focus-visible::before {
  opacity: 1;
}

.footer-branches li {
  display: grid;
  gap: 0.15rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 1px solid rgb(228 199 101 / 0.35);
  line-height: 1.85;
}

.footer-branches b {
  color: var(--text);
  font-weight: 700;
}

.footer-branches span {
  font-size: 0.88rem;
}

.footer-note {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.9;
}

.footer-base {
  border-block-start: 1px solid var(--hair);
  background: rgb(0 0 0 / 0.25);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 1.1rem;
}

.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  text-decoration: none;
  transition: color 200ms ease, border-color 200ms ease;
}

.footer-top-link:hover,
.footer-top-link:focus-visible {
  color: var(--gold-text);
  border-color: rgb(228 199 101 / 0.5);
}

@media (max-width: 52rem) {
  .footer-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-col-branches {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 40rem) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
  }

  .footer-base-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ==========================================================================
   The maison pass (2026-11).

   A layer over everything above, in four parts: the type, the inner pages'
   masthead, the vitrine and its pieces, and the contact page. Nothing here
   changes what a page says or which links it has; it changes how it sits.

   The idea, in one line: a jeweller's catalogue, not a shop. Fewer boxes,
   more air, one typeface with contrast for the things that are named and a
   quiet one for everything that is read.
   ========================================================================== */

/* ---------- type ----------
   Amiri names things — the shop, a page, a section, a piece. Estedad
   carries everything else, figures included. Only Amiri's bold is shipped,
   so every title here asks for exactly 700, and synthetic bold is refused
   outright: a browser asked for 900 from a 700 face smears the strokes, and
   the contrast is the whole reason for the face. */
h1,
h2,
.display,
.hero-title,
.page-title,
.detail-title,
.footer-title,
.brand-name,
.branch-label,
.card-name,
.branch-card-head h3,
.figure-head {
  font-family: var(--font-display);
  font-synthesis: none;
  letter-spacing: 0;
}

h1,
.hero-title,
.page-title,
.detail-title {
  font-weight: 700;
}

h2,
.display {
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.3;
}

/* A naskh sits smaller on its body than Estedad does; a title set at the old
   sizes reads a size down. */
.hero-title {
  font-size: clamp(3rem, 8.6vw, 6.4rem);
  line-height: 1.2;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-title {
  font-weight: 700;
}

.figure-head {
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  font-weight: 700;
}

/* h3 stays in Estedad: it labels, it does not name. */
h3 {
  font-family: var(--font);
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-text);
  opacity: 0.9;
}

/* ---------- the inner pages' masthead ----------
   Centred, tall, nearly empty: the shop's mark as a watermark in a pool of
   light, the title in foil, one sentence. The vitrine and the contact page
   open the same way, so the site reads as one book. */
.page-mast {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2rem, 5vw, 3.5rem);
}

.page-mast::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(46rem, 130vw);
  aspect-ratio: 1;
  translate: 50% -50%;
  border-radius: 50%;
  background:
    url("logo.d5226527af91.png") center / 62% no-repeat,
    radial-gradient(circle, rgb(228 199 101 / 0.5), transparent 64%);
  opacity: 0.11;
  pointer-events: none;
}

/* A hairline that fades out at both ends — the page's edge, not a rule. */
.page-mast::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 10%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.page-mast .eyebrow {
  margin-block-end: 0.75rem;
}

/* The vitrine and the contact page open like the home page: the title on
   the start side, the mark on its navy coin on the other. The coin replaces
   the watermark, so the watermark goes. */
.page-mast:has(.mast-grid) {
  text-align: start;
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
}

.page-mast:has(.mast-grid)::before {
  display: none;
}

.mast-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.mast-grid .page-lead {
  margin-inline: 0;
}

.mast-art {
  min-block-size: clamp(13rem, 26vw, 20rem);
}

.mast-art .coin {
  inline-size: clamp(9.5rem, 19vw, 15rem);
}

.mast-art .orbit-a {
  inline-size: clamp(12rem, 24vw, 19rem);
}

.mast-art .orbit-b {
  inline-size: clamp(14rem, 29vw, 23rem);
}

/* The 3D coin (mast-coin.js), once drawn: it takes the CSS coin's place,
   finished and at rest. `.mast3d` is set by that script only, so without it
   the CSS coin above is the masthead. A sideways swipe on the coin turns it;
   the page's own vertical scroll stays the browser's. */
.mast-art {
  --coin-stage: clamp(13rem, 25vw, 20rem);
  touch-action: pan-y;
}

/* The coin's glow (.hero-art::before) is wider than a phone. The vitrine and
   contact mastheads clip it already; the magazine's hero is a plain section,
   and without this it widened the whole page sideways. Its edge is
   transparent, so the clip does not show. */
.blog-hero.mast-grid {
  overflow-x: clip;
}

.mast3d .mast-art .coin-stage {
  display: block;
  opacity: 1;
}

.mast3d .mast-art .coin,
.mast3d .mast-art .orbit {
  opacity: 0;
  transition: opacity 500ms ease;
}

@media (max-width: 52rem) {
  .page-mast:has(.mast-grid),
  .blog-hero.mast-grid {
    text-align: center;
  }

  .blog-hero.mast-grid .section-intro {
    margin-inline: auto;
  }

  .mast-art {
    --coin-stage: 12rem;
  }

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

  .mast-grid .page-lead {
    margin-inline: auto;
  }

  /* As on the home page, the coin leads on a phone, small. */
  .mast-art {
    order: -1;
    min-block-size: 11rem;
  }

  .mast-art .coin {
    inline-size: 8rem;
  }

  .mast-art .orbit-a {
    inline-size: 10rem;
  }

  .mast-art .orbit-b {
    inline-size: 12rem;
  }
}

.page-title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 1.25;
  color: var(--gold-text);
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-title-sub {
  display: block;
  font-family: var(--font);
  font-size: 0.32em;
  font-weight: 400;
  line-height: 1.6;
  -webkit-text-fill-color: var(--text-dim);
}

.page-lead {
  max-inline-size: 38rem;
  margin: 1.1rem auto 0;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  font-weight: 300;
  line-height: 2.1;
}

/* ---------- the vitrine ---------- */

.vitrine {
  padding-block-start: clamp(1.5rem, 3vw, 2.25rem);
}

/* Categories as a line of words, the chosen one underlined in gold. A row of
   pills reads as filters on a store; this reads as a table of contents. On a
   phone it scrolls sideways rather than wrapping into a block of buttons. */
.vitrine-cats {
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin-block-end: 1.5rem;
}

.vitrine-cats .chip {
  position: relative;
  padding: 0.45rem 0.1rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: color 300ms ease;
}

.vitrine-cats .chip::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 1px;
  background: var(--gold);
  scale: 0 1;
  transition: scale 450ms var(--ease);
}

.vitrine-cats .chip:hover {
  color: var(--text);
  background: none;
}

.vitrine-cats .chip.on {
  color: var(--gold-text);
  background: none;
}

.vitrine-cats .chip.on::after,
.vitrine-cats .chip:hover::after {
  scale: 1 1;
}

@media (max-width: 40rem) {
  .vitrine-cats {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding-inline: 1rem;
    -webkit-mask: linear-gradient(90deg, transparent, #000 1.25rem, #000 calc(100% - 1.25rem), transparent);
    mask: linear-gradient(90deg, transparent, #000 1.25rem, #000 calc(100% - 1.25rem), transparent);
  }

  .vitrine-cats::-webkit-scrollbar {
    display: none;
  }
}

.vitrine .catalog-tools {
  padding-block: 0.85rem;
}

.vitrine-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block: 0.9rem clamp(1.75rem, 4vw, 2.75rem);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.vitrine-meta .catalog-priced-at {
  margin: 0;
}

/* ---- the card: a piece on velvet ----
   No box around the card any more — the photograph has the frame, and the
   name and price sit under it on the page, centred, the way a printed
   catalogue captions a plate. The photo's ground is a dark blue velvet with a
   pool of light where the piece sits, so a phone photo on a white table and
   the shop's own mark both look placed rather than pasted. */
.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
  gap: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.1rem, 2.5vw, 2rem);
}

.card a {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.card a:hover {
  transform: none;
  box-shadow: none;
}

/* Square, because the photographs are: every catalog photo the shop has
   uploaded is square, and a 4:5 case cropped the sides off each one and
   enlarged the rest (owner, 2026-11-12: "the images cannot be read"). */
.card-media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 1.35rem;
  border: 1px solid var(--line);
  background: radial-gradient(120% 75% at 50% 40%, #1d2f45 0%, #0d1827 48%, #060c14 100%);
  overflow: hidden;
  transition: border-color 500ms ease, box-shadow 600ms var(--ease), translate 600ms var(--ease);
}

/* The light: a soft reflection on the floor of the case, and a glint along
   the top edge of the glass. */
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(to top, rgb(228 199 101 / 0.08), transparent 32%),
    linear-gradient(to bottom, rgb(255 246 214 / 0.07), transparent 18%);
  pointer-events: none;
}

.card a:hover .card-media,
.card a:focus-visible .card-media {
  translate: 0 -6px;
  border-color: var(--line-strong);
  box-shadow:
    0 36px 60px -34px rgb(0 0 0 / 0.95),
    0 0 0 1px rgb(228 199 101 / 0.18),
    0 0 46px -12px rgb(228 199 101 / 0.22);
}

.card-media .card-mark {
  inline-size: 48%;
  opacity: 0.7;
}

/* The photograph whole, never cropped — a piece that is not square sits on
   the velvet rather than losing its edges. */
.card-media img:not(.card-mark) {
  object-fit: contain;
}

/* The case's light is for the empty case; over a photograph it only greys
   the piece. */
.card-media:has(img:not(.card-mark))::after {
  display: none;
}

.card-body {
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  padding: 1.15rem 0.5rem 0;
}

.card-cat {
  color: var(--gold-text);
  font-size: 0.78rem;
  opacity: 0.85;
}

.card-name {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.35;
}

.card-price {
  margin-block-start: 0.3rem;
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
}

.card-more {
  margin-block-start: 0.45rem;
  font-size: 0.8rem;
  color: var(--gold-text);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 400ms ease, translate 400ms var(--ease);
}

.card a:hover .card-more,
.card a:focus-visible .card-more {
  opacity: 1;
  translate: 0 0;
}

/* Two to a row on a phone: one full-width plate at a time made the vitrine
   a long scroll of near-identical cases, and a catalogue is browsed by
   comparing. The invitation goes; the whole card is the link. */
@media (max-width: 40rem) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 0.85rem;
  }

  .card-media {
    border-radius: 1rem;
  }

  .card-body {
    padding-block-start: 0.8rem;
  }

  .card-name {
    font-size: 1.15rem;
  }

  .card-price {
    font-size: 0.86rem;
  }

  .card-more {
    display: none;
  }
}

/* Touch has no hover, so the invitation is simply there, quieter. */
@media (hover: none) {
  .card-more {
    opacity: 0.75;
    translate: 0 0;
  }
}

.pager {
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
}

/* ---- the close: a conversation, not a checkout ---- */
.vitrine-note {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 3rem;
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  border-radius: 1.6rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 100% 0%, rgb(228 199 101 / 0.13), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(228 199 101 / 0.3);
  overflow: hidden;
}

.vitrine-note .display {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-block-end: 0.5rem;
}

.vitrine-note p:last-child {
  margin: 0;
  color: var(--text-dim);
  max-inline-size: 34rem;
  line-height: 2;
}

.vitrine-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 48rem) {
  .vitrine-note {
    grid-template-columns: 1fr;
  }
}

/* ---------- a piece ---------- */

.breadcrumb {
  margin-block-end: clamp(1.5rem, 4vw, 2.5rem);
  font-size: 0.85rem;
}

.detail {
  gap: clamp(2rem, 5vw, 4.5rem);
  margin-block-end: clamp(3rem, 7vw, 5rem);
}

@media (min-width: 48rem) {
  .detail {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  /* The photographs stay in view while the words beside them scroll. */
  .detail-media {
    position: sticky;
    inset-block-start: 6rem;
  }
}

.detail-media {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

/* A single photo, or the mark: the same velvet case as a card. */
.detail-media > img {
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 1.6rem;
  border: 1px solid var(--line);
  background: radial-gradient(120% 75% at 50% 40%, #1d2f45 0%, #0d1827 48%, #060c14 100%);
}

.detail-media > .card-mark {
  inline-size: 100%;
  margin: 0;
  padding: 26%;
  object-fit: contain;
}

/* ---- the gallery: one photo at a time, swiped ---- */
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  aspect-ratio: 1;
  border-radius: 1.6rem;
  border: 1px solid var(--line);
  background: radial-gradient(120% 75% at 50% 40%, #1d2f45 0%, #0d1827 48%, #060c14 100%);
  box-shadow: var(--shadow-deep);
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track:focus-visible {
  outline-offset: 4px;
}

.gallery-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
}

.detail-media .gallery-slide img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  border-radius: 0;
}

.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-block-start: 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumb {
  flex: 0 0 auto;
  inline-size: 4.25rem;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  background: #0d1827;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 300ms ease, border-color 300ms ease;
}

.detail-media .gallery-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  border-radius: 0;
}

.gallery-thumb:hover,
.gallery-thumb.on {
  opacity: 1;
  border-color: var(--gold);
}

/* ---- the words beside it ---- */
.detail-cat {
  margin-block: 0 0.4rem;
}

.detail-title {
  margin-block: 0 1.5rem;
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
  line-height: 1.3;
}

/* The facts as a short ledger: label and value on one line, hairline under. */
.spec {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  margin-block: 0 1.5rem;
  border-block-start: 1px solid var(--line);
}

.spec dt,
.spec dd {
  padding-block: 0.85rem;
  border-block-end: 1px solid var(--line);
}

.spec dt {
  color: var(--text-faint);
  font-size: 0.88rem;
}

.spec dd {
  text-align: end;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.detail-desc {
  margin-block: 0 1.75rem;
  line-height: 2.1;
}

/* Price or invitation, in one framed panel either way. */
.detail-buy {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 140% at 0% 0%, rgb(228 199 101 / 0.12), transparent 60%),
    var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(228 199 101 / 0.32);
}

.detail-buy .btn-primary {
  margin-block-start: 0.85rem;
}

.detail-buy .detail-cta {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.detail-price-cap {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.detail-price {
  margin: 0;
}

.detail-price-value {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold-text);
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.detail-assure {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.detail-assure li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* A small cut stone as the marker. */
.detail-assure li::before {
  content: "";
  flex: 0 0 auto;
  inline-size: 0.45rem;
  block-size: 0.45rem;
  rotate: 45deg;
  background: var(--gold-metal);
  box-shadow: 0 0 10px rgb(228 199 101 / 0.6);
}

.related-head {
  margin-block-end: clamp(1.5rem, 3vw, 2.25rem);
  padding-block-start: clamp(2rem, 5vw, 3rem);
  border-block-start: 1px solid var(--line);
}

.related-head .display {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin: 0;
}

/* ---------- the contact page ---------- */

.contact-page {
  gap: clamp(3.5rem, 8vw, 6rem);
  padding-block-start: clamp(2.5rem, 5vw, 3.5rem);
}

.contact-section-head {
  margin-block-end: clamp(1.25rem, 3vw, 2rem);
}

.contact-section-title.display {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

/* ---- branches: numbered, like plates ---- */
.branch-cards {
  counter-reset: branch;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
}

.branch-card {
  counter-increment: branch;
  position: relative;
  gap: 0.85rem;
  padding: clamp(1.5rem, 3.5vw, 2.1rem);
  border-radius: 1.6rem;
  background: var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(228 199 101 / 0.32);
  transition: border-color 400ms ease, translate 500ms var(--ease);
}

.branch-card:hover {
  border-color: var(--line-strong);
  translate: 0 -4px;
}

.branch-card-head {
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 1rem;
  padding-block-end: 0.9rem;
  border-block-end: 1px solid var(--line);
}

/* «۱», «۲» — the counter in Persian digits, so no number is typed. No
   leading zero: the Persian zero is a dot, and «۰۱» reads as a stray mark. */
.branch-index {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-text);
  opacity: 0.55;
}

.branch-index::before {
  content: counter(branch, persian);
}

.branch-card-head h3 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.branch-city {
  margin-inline-start: auto;
}

.branch-address {
  font-weight: 500;
  font-size: 1.02rem;
}

/* ---- membership: an invitation, not a checklist ----
   Two sides of one card (owner, 2026-11-12, after a centred row of ticks was
   rejected): on the start side the pitch — what the panel is, how to join in
   three steps, and the two ways forward; on the other, the three things a
   member gets, each with its own mark and one plain sentence saying what it
   means. The sentences describe what the portal does today and promise
   nothing the shop has not offered. */
.membership {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border-radius: 1.8rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 90% at 100% 0%, rgb(228 199 101 / 0.16), transparent 62%),
    radial-gradient(50% 70% at 0% 100%, rgb(26 54 85 / 0.55), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgb(228 199 101 / 0.45);
}

/* The mark, large and faint, behind the benefits. */
.membership::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-block-end: -22%;
  inset-inline-end: -10%;
  inline-size: min(26rem, 70%);
  aspect-ratio: 1;
  background: url("logo.d5226527af91.png") center / contain no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.membership > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 52rem) {
  .membership {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.membership .display {
  margin-block: 0 0.9rem;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  line-height: 1.35;
}

.join-note {
  margin: 0;
  max-inline-size: 30rem;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 2;
}

/* How to join: three numbered stops on one gold thread. */
.join-steps {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  position: relative;
}

.join-steps::before {
  content: "";
  position: absolute;
  inset-block-start: 1rem;
  inset-inline: 16%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, rgb(228 199 101 / 0.6), transparent);
}

.join-steps li {
  counter-increment: step;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.join-steps li::before {
  content: counter(step, persian);
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid rgb(228 199 101 / 0.6);
  color: var(--gold-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1.75rem;
}

/* The benefits: one panel, three rows, a hairline between. */
.benefit-grid {
  list-style: none;
  margin: 0;
  padding: 0.4rem clamp(1rem, 3vw, 1.6rem);
  display: grid;
  border-radius: 1.4rem;
  border: 1px solid var(--line);
  background: rgb(6 13 24 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.benefit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding-block: 1.15rem;
}

.benefit + .benefit {
  border-block-start: 1px solid var(--hair);
}

.benefit-icon {
  display: grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 0.95rem;
  color: var(--gold-text);
  background:
    radial-gradient(circle at 35% 30%, rgb(242 221 154 / 0.22), transparent 60%),
    rgb(201 162 39 / 0.08);
  border: 1px solid rgb(228 199 101 / 0.4);
}

.benefit-text {
  display: grid;
  gap: 0.25rem;
}

.benefit-text strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.benefit-text span {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text-dim);
}

@media (max-width: 52rem) {
  .membership-pitch {
    text-align: center;
  }

  .join-note {
    margin-inline: auto;
  }

  .membership-actions {
    justify-content: center;
  }
}

/* ---------- the hero, while the coin is being struck ----------
   Three things follow the scroll beside the model, all from the one
   `--coin-progress` hero-coin.js publishes: the pool of light behind the coin
   gathers, a shadow forms beneath it as it gains a body, and the cue to
   scroll leaves the moment the visitor has understood it. */
.coin3d .hero-art::before {
  opacity: calc(0.55 + var(--coin-progress, 0) * 0.6);
  scale: calc(0.85 + var(--coin-progress, 0) * 0.3);
}

.coin3d .hero-art::after {
  content: "";
  position: absolute;
  inset-block-end: 4%;
  inline-size: 52%;
  block-size: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.7), transparent);
  filter: blur(8px);
  opacity: clamp(0, calc(var(--coin-progress, 0) * 2.4 - 0.6), 1);
  scale: calc(0.6 + var(--coin-progress, 0) * 0.4) 1;
  pointer-events: none;
}

.scroll-cue {
  display: none;
}

.coin3d .scroll-cue {
  position: absolute;
  inset-block-end: clamp(1rem, 3vh, 2rem);
  inset-inline-start: 50%;
  translate: 50% 0;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  opacity: clamp(0, calc(1 - var(--coin-progress, 0) * 9), 1);
  pointer-events: none;
}

/* A bead of gold travelling down a hairline. */
.coin3d .scroll-cue::after {
  content: "";
  inline-size: 7px;
  block-size: 2.6rem;
  background:
    radial-gradient(circle, var(--gold-text) 0 2px, transparent 2.5px) 50% 0 / 7px 7px no-repeat,
    linear-gradient(var(--line-strong), transparent) 50% 0 / 1px 100% no-repeat;
  animation: cue-fall 2.4s var(--ease) infinite;
}

@keyframes cue-fall {
  0% {
    background-position: 50% 0, 50% 0;
  }
  80%,
  100% {
    background-position: 50% 100%, 50% 0;
  }
}

@media (max-width: 52rem) {
  .coin3d .scroll-cue {
    display: none;
  }
}

/* ---------- stillness ---------- */

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================================
   The mark in motion between pages: header logo ⇄ coin
   ========================================================================= */

/* ---- between pages: the browser's view transition ----
   Both pages opt in, and the shop's mark is one named element across them:
   the coin where a page has one, the header's logo where it does not. So
   the coin glides from one page's place to the next's, shrinks into the
   header on an article or a piece's page, and grows back out of it on the
   way back. The header itself holds still; the rest of the page fades
   through. A browser without cross-document view transitions simply
   navigates, as before. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

.site-header {
  view-transition-name: site-header;
}

.brand-mark {
  view-transition-name: shop-mark;
}

/* A page with a coin: the coin is the mark, the header's logo is not. */
:root:has(.hero-art .coin) .brand-mark {
  view-transition-name: none;
}

.hero-art .coin {
  view-transition-name: shop-mark;
}

/* Once the 3D piece has taken over, the canvas is what is on screen. */
.coin3d .hero-art .coin,
.mast3d .mast-art .coin {
  view-transition-name: none;
}

.coin3d .hero-art .coin-stage,
.mast3d .mast-art .coin-stage {
  view-transition-name: shop-mark;
}

::view-transition-group(shop-mark) {
  animation-duration: 750ms;
  animation-timing-function: cubic-bezier(0.22, 0.8, 0.2, 1);
}

::view-transition-old(shop-mark),
::view-transition-new(shop-mark) {
  block-size: 100%;
  object-fit: contain;
}

::view-transition-old(shop-mark) {
  animation: 750ms ease both mark-out;
}

::view-transition-new(shop-mark) {
  animation: 750ms ease both mark-in;
}

@keyframes mark-out {
  to {
    opacity: 0;
  }
}

@keyframes mark-in {
  from {
    opacity: 0;
    filter: drop-shadow(0 0 18px rgb(228 199 101 / 0.8));
  }
}

::view-transition-old(root) {
  animation: 320ms ease both page-out;
}

::view-transition-new(root) {
  animation: 520ms 120ms cubic-bezier(0.22, 0.8, 0.2, 1) both page-in;
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}

/* ---------- the branch map (contact page, apps.public_site.maps) ----------
   A small panel of OpenStreetMap tiles, toned down to the site's navy so it
   reads as part of the card rather than a window onto another site, with the
   branch under the shop's own marker: the round logo, on the header's navy
   disc, set in a gold pin whose tip is exactly on the branch. */
.branch-map-panel {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  block-size: clamp(10rem, 22vw, 12.5rem);
  margin-block: 0.25rem 1rem;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: #0b1a2a;
  text-decoration: none;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.branch-map-panel:hover,
.branch-map-panel:focus-visible {
  border-color: rgb(228 199 101 / 0.55);
  box-shadow: 0 16px 34px -20px rgb(228 199 101 / 0.5);
}

/* The 3×3 block, moved so the branch is the panel's centre. */
.map-tiles {
  position: absolute;
  inset-block-start: calc(50% - var(--map-y));
  /* Physical on purpose: the tiles are a picture of the world, which runs
     west to east whatever the page's direction. */
  left: calc(50% - var(--map-x));
  display: grid;
  grid-template-columns: repeat(3, 256px);
  inline-size: 768px;
  direction: ltr;
  /* Dark, desaturated, and a little warm: the street plan stays legible,
     the map's own colours do not compete with the gold. */
  filter: grayscale(1) invert(1) brightness(0.95) contrast(0.95) sepia(0.18);
  transition: transform 600ms var(--ease);
}

.map-tiles img {
  display: block;
  inline-size: 256px;
  block-size: 256px;
  max-inline-size: none;
}

/* The navy wash over the streets, and a vignette that draws the eye in. */
.branch-map-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, transparent 20%, rgb(5 11 18 / 0.55) 100%),
    rgb(10 27 44 / 0.35);
  pointer-events: none;
}

.branch-map-panel:hover .map-tiles {
  transform: scale(1.04);
}

/* The pin: its tip on the branch, the logo in its head. */
.map-pin {
  position: absolute;
  z-index: 2;
  top: 50%;
  /* Physical, like the tiles: the tip must sit on the branch. */
  left: 50%;
  inline-size: 3.4rem;
  block-size: 3.4rem;
  /* Turned 45°, the sharp corner hangs 0.707 of the pin's size below its
     centre: lift by half plus that, and the tip is on the branch. */
  translate: -50% -120.7%;
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  background: var(--gold-metal);
  box-shadow: 0 10px 22px -6px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.5);
  display: grid;
  place-items: center;
}

.map-pin img {
  inline-size: 78%;
  block-size: 78%;
  rotate: 45deg;
  border-radius: 50%;
  padding: 3px;
  box-sizing: border-box;
  background: var(--bg-2);
  border: 1px solid rgb(201 162 39 / 0.45);
}

/* Where the tip lands: a small shadow and a slow ring, the place itself. */
.branch-map-panel::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  inline-size: 0.8rem;
  block-size: 0.35rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  box-shadow: 0 0 0 0 rgb(228 199 101 / 0.55);
  animation: pin-ring 2.6s ease-out infinite;
}

@keyframes pin-ring {
  0% {
    box-shadow: 0 0 0 0 rgb(228 199 101 / 0.55);
  }
  100% {
    box-shadow: 0 0 0 1.4rem rgb(228 199 101 / 0);
  }
}

.map-open {
  position: absolute;
  z-index: 3;
  inset-block-end: 0.6rem;
  inset-inline-start: 0.6rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgb(5 12 22 / 0.8);
  border: 1px solid rgb(228 199 101 / 0.4);
  color: var(--gold-text);
  font-size: 0.78rem;
  font-weight: 600;
}

/* The tiles' required credit, small and quiet. */
.map-credit {
  position: absolute;
  z-index: 3;
  inset-block-end: 0.35rem;
  inset-inline-end: 0.6rem;
  direction: ltr;
  font-size: 0.62rem;
  color: rgb(255 255 255 / 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .branch-map-panel::before {
    animation: none;
  }
}

/* One «مسیریابی» per branch card (owner, 2026-11-12: "too many"): where the
   card has its map, the map is the way in — it carries the label and opens
   the same sheet — so the button under the card goes. The <details> stays
   in the page: map-choose.js builds the sheet from it. */
.branch-card:has(.branch-map-panel) .map-choose > summary {
  display: none;
}

/* «کجا ما را پیدا می‌کنید؟» on the home page: one branch to a line, each
   hung from a short gold rule, so the second name never falls mid-line. */
.where-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.where-list li {
  padding-inline-start: 0.85rem;
  border-inline-start: 2px solid rgb(228 199 101 / 0.5);
  color: var(--text-dim);
  line-height: 2;
}
