/* ==========================================================================
   sahra-system.css: the shared design system (24 Oct 2026)
   ==========================================================================
   From the aesthetic-coherence panel (project doc AESTHETIC-COHERENCE-panel-
   24-Oct-2026.md; Faheem: build all four groups). One small token set, one
   button family, one badge, one footer, and the site font on every control.
   Loaded last in <head> on every page (build.js applySystem), so its rules
   are prefixed with `html body` to win over the older page styles without
   rewriting them one by one.
   ========================================================================== */
:root{
  --sb-ink:#2A2016;       /* primary text, dark buttons */
  --sb-ink-2:#4A4136;     /* body copy */
  --sb-ink-3:#6B6256;     /* captions, meta */
  --sb-cream:#FAF6EF;     /* page and card ground */
  --sb-paper:#FFFFFF;
  --sb-copper:#7E4114;    /* links and kickers on cream */
  --sb-copper-deep:#7E4114;
  --sb-gold:#F3DDB8;      /* kickers and buttons on dark */
  --sb-sand:#F3DDB8;      /* Sahel and Sahra Trail buttons on dark */
  --sb-night:#2A2016;
  --sb-sahel:#2A2016;
  --sb-trail:#2A2016;
  --sb-on-dark:#FAF6EF;
  --sb-line:rgba(42,32,22,.14);
  --sb-radius:999px;
}

/* 1. Controls use the site font (about 39 buttons and inputs fell back to Arial) */
html body button,html body input,html body select,html body textarea{font-family:inherit}
html body button.size,html body button.pdp-size,html body button.size-tab,html body button.btn,html body button.pack-btn,
html body button.pcard-zoom,html body .nav-arrow,html body .slide-pause,html body .hring-arrow,html body .sring-arrow,
html body .ambient-btn,html body .gal-pause,html body #sbCartBtn,html body .sbn-caret{font-family:'Jost',system-ui,sans-serif}

/* 2. One button family: pill, Jost 15/600, sentence case.
      Primary = ink fill on light grounds; on dark grounds the existing gold / sand fills stay. */
html body .btn,html body a.btn,html body button.btn,html body .minitee-go,html body .lb-a,html body .tr-btn,html body .sh-btn,
html body .ab-cta,html body .qa-open,html body .spb-a,html body .hx-cta{
  border-radius:var(--sb-radius)!important;font-family:'Jost',system-ui,sans-serif!important;font-weight:600!important;
  text-transform:none!important;letter-spacing:.02em!important}
html body a.btn,html body button.btn{font-size:15px!important;min-height:48px;padding-left:26px;padding-right:26px}
/* copper fills become ink: one primary colour on cream */
html body a.btn.news-shop,html body a.btn.shoplink:not(.ghost),html body button.btn.tt-add,html body #toteAdd{background:var(--sb-ink)!important;color:var(--sb-cream)!important;border-color:var(--sb-ink)!important}
html body a.btn.news-shop:hover,html body a.btn.shoplink:not(.ghost):hover,html body #toteAdd:hover{background:var(--sb-copper-deep)!important}
/* secondary = ink outline */
html body a.btn.ghost,html body a.btn.alt,html body button.btn.alt{background:transparent!important;color:var(--sb-ink)!important;border:1px solid var(--sb-ink)!important}
/* labels and chips that wore Space Mono capitals read as Jost */
html body .hring-all,html body .rv-chip,html body .rv-showall,html body .filt,html body .ig-follow,html body .sring-qa-b{
  font-family:'Jost',system-ui,sans-serif!important;text-transform:none!important;letter-spacing:.01em!important;font-weight:500!important;font-size:14px!important}
/* size chips: one shape */
html body button.size,html body button.pdp-size,html body button.sring-qa-b{border-radius:var(--sb-radius)!important}
html body button.pthumb{border-radius:8px!important;overflow:hidden}

/* 3. One badge: Mock-up, Unisex / Men's cut / One size, Soon, Founding Edition */
html body .po-mock,html body .sh-mock,html body .mock-tag,html body .ig-mock,html body .spb-f>i,html body .hc-f>i,
html body .mp-fig>i,html body .nb-f>i,html body .lb-c>span>i,html body .cut-b{
  font:400 10px/1 'Space Mono',ui-monospace,monospace!important;letter-spacing:.12em!important;text-transform:uppercase!important;
  font-style:normal!important;padding:5px 8px!important;border-radius:4px!important;
  background:rgba(250,246,239,.94)!important;color:var(--sb-ink)!important;box-shadow:none!important}
html body .sbn-soon{font:400 9.5px/1 'Space Mono',ui-monospace,monospace!important;letter-spacing:.1em!important;padding:4px 6px!important;border-radius:4px!important}
html body .sbn-badge{font:400 10px/1 'Space Mono',ui-monospace,monospace!important;letter-spacing:.12em!important;padding:5px 8px!important;border-radius:4px!important;background:transparent!important;border:1px solid currentColor!important}

/* 4. One footer: the cream footer of the generated pages, everywhere */
html body > footer:not(#sbx),html body footer.ftr:not(#sbx){background:var(--sb-cream)!important;color:var(--sb-ink-2)!important;
  border-top:1px solid var(--sb-line)!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  font-family:'Jost',system-ui,sans-serif;position:relative;z-index:3}
/* full bleed on every page: the generated-page footer was an 820px card, which showed the page ground
   (navy on /sahel/, charcoal on /trail/) either side of it */
html body > footer.ftr:not(#sbx){max-width:none!important;margin:0!important;border-radius:0!important;
  padding-left:max(24px,calc((100% - 820px) / 2))!important;padding-right:max(24px,calc((100% - 820px) / 2))!important}
html body > footer:not(#sbx) :where(div,span,p,small,b,strong,li),html body footer.ftr:not(#sbx) :where(div,span,p,small,b,strong,li){color:inherit!important}
html body > footer:not(#sbx) a,html body footer.ftr:not(#sbx) a{color:var(--sb-ink)!important}
html body > footer:not(#sbx) a:hover,html body footer.ftr:not(#sbx) a:hover{color:var(--sb-copper)!important}
html body > footer:not(#sbx) .foot-brand{color:var(--sb-ink)!important}
/* the guide and shop link lists: two tidy columns instead of one centred wall */
html body footer:not(#sbx) .foot-guides{display:grid!important;grid-template-columns:1fr 1fr;gap:10px 40px;text-align:start!important;max-width:980px;font-size:13px!important;line-height:1.85!important}
html body footer:not(#sbx) .foot-guides>div{margin:0!important}
html body footer:not(#sbx) .foot-guides b{display:block;font:400 10.5px/1.4 'Space Mono',ui-monospace,monospace;letter-spacing:.14em;text-transform:uppercase;color:var(--sb-ink-3)!important;margin:0 0 6px}
@media(max-width:700px){html body footer:not(#sbx) .foot-guides{grid-template-columns:1fr;gap:16px;text-align:center!important}}
html body > footer:not(#sbx) .foot-links a,html body > footer:not(#sbx) .foot-soc a,html body > footer:not(#sbx) .foot-copy,
html body > footer:not(#sbx) .links a{font-family:'Jost',system-ui,sans-serif!important;text-transform:none!important;letter-spacing:.02em!important;font-size:13.5px!important}

/* 5. Space Mono back to its job (eyebrows and badges). Prices, specs, sizes, folds, trust lines,
      reviews meta and filters on /shop/ and the product pages read in Jost. */
html body :is(.prod-spec-strip li,.spec-strip li,.fbar-l,.fbar-v,.buy-trust span,.prod-fold summary,.fabric-line,.fabric-line b,
  .sb-price,.sring-price,.sidx-m,.sw-row span,.opt-lab,.size-guide-link,.prod-occasion,.occasion,.pdp-link,.fitchip,.pm-gps,.pm-sky,
  .read-place,.pcard-rv-n,.filt-lab,.rv-meta,.rv-more,.rv-about,.sz-cm,.pdp-ans-hint,.rel-place,.gal-hint,.gal-fit,.gal-model,.rl-f,
  .pdp-sizes-label,.cw-txt,.cw-txt strong,.cw-txt em,.pmeta a,.pmeta span,.sky-card small,.sring-go,.sring-qa-l,.sring-cue,.filt-meta span,
  .sidx-lab,.crumb a,.crumb span,.place-meta a,.place-meta span,.sb-curhint,.prod-line .fitchip,.ig-kind,.ig-ago){
  font-family:'Jost',system-ui,sans-serif!important;letter-spacing:.01em!important;text-transform:none!important}
html body :is(.sb-price,.sring-price){font-weight:600!important}
html body :is(.prod-spec-strip li,.spec-strip li,.buy-trust span,.fbar-l,.fbar-v,.sw-row span,.cw-txt,.pmeta a,.pmeta span,.place-meta a,.place-meta span,.rv-meta,.rv-more,.rl-f,.pcard-rv-n,.gal-model,.sz-cm){font-size:14px!important}
html body :is(.prod-fold summary){font-size:15px!important;font-weight:500!important}
html body .fitchip{font-size:13px!important}

/* 6. Declutter the buy box (Phase 3). Secondary prices inside the buy box read at the line's own size
      (the tote's AED 50 was set at the 24px headline price size); WhatsApp steps aside while the sticky
      buy bar is up, so the screen carries one floating action at a time. */
html body .buy :is(.pdp-tote,.pdp-why,.pdp-pair,.pdp-add,.pdp-reassure) .sb-price{font-size:inherit!important;font-weight:inherit!important;letter-spacing:inherit!important}
html body:has(#buybar.on) .sb-wa{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
/* form buttons (newsletter, waitlists, the Trail and Sahel lists): the shared pill in sentence case */
html body :is(.news-form,.wl-form,.tr-join form,.sh-form-el) button{text-transform:none!important;letter-spacing:.02em!important;border-radius:999px!important;font-family:'Jost',system-ui,sans-serif!important;font-weight:600!important}
html body .pdp-wallets-line .sb-ship-uae{font-size:inherit!important}
/* footer link rows on phones: wrap as centred rows, not one link per line */
@media(max-width:820px){html body > footer:not(#sbx) :is(.foot-links,.links){display:flex!important;flex-wrap:wrap;justify-content:center;gap:4px 14px}
  html body > footer:not(#sbx) :is(.foot-links,.links) a{width:auto!important}}

/* 7. The shared newsletter block (25 Oct 2026): success and saving states from the sahra-welcome.js takeover */
html body .news[data-waitlist-wrap].done .news-form{display:none!important}
html body .news[data-waitlist-wrap].done .news-ok{display:block!important}
html body .news[data-waitlist-wrap].loading .news-form button{opacity:.6}
html body .news [data-err]{color:#F3DDB8!important}
html body .news[data-waitlist-wrap].err [data-err]{display:block!important}

/* 14 Nov 2026 (r139 scorecard, Faheem: "Move it under the name"): the Unisex / Men's cut / One size tag is a quiet line
   under the card's name (build.js copies it into data-cut on the name link); the tag on the photo is hidden, so the photo
   carries only the fit pills */
html body .pcard .pcard-img .cut-b{display:none!important}
html body .pcard .pcard-t[data-cut]::after{content:attr(data-cut);display:block;margin:3px 0 0;font:400 10px/1.3 'Space Mono',ui-monospace,monospace;letter-spacing:.1em;text-transform:uppercase;color:#6B6256;font-style:normal;font-size-adjust:none}
html[dir="rtl"] body .pcard .pcard-t[data-cut]::after{font-family:var(--sans);letter-spacing:0;text-transform:none;font-size:12px}

/* 14 Nov 2026 (Faheem, on the three Sahel fits: "Fit tabs under the name"): the card's fit switch is a row of text tabs
   under the product name (build.js moves .sfp switches there; the homepage Founding grid's script does the same for
   .fitpair), wrapping to a second line when it needs to; the chosen fit is underlined */
html body .pcard .sfp-sw.sfp-tabs,html body .card .fitpair-sw.fitpair-tabs{position:static!important;inset:auto!important;display:flex!important;flex-wrap:wrap;align-items:center;gap:0 14px!important;margin:6px 0 2px!important;padding:0!important;max-width:none!important;background:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border-radius:0!important;box-shadow:none!important}
html body .pcard .sfp-sw.sfp-tabs button,html body .card .fitpair-sw.fitpair-tabs button{position:relative;min-height:30px;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important;color:#6B6256!important;font:500 12.5px/1.2 Jost,system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;white-space:nowrap;cursor:pointer;text-decoration:none}
html body .card .fitpair-sw.fitpair-tabs{order:1}   /* after the name in the homepage card's ordered body */
html body .pcard .sfp-sw.sfp-tabs button.on,html body .card .fitpair-sw.fitpair-tabs button.on{color:#2A2016!important;font-weight:600!important;text-decoration:underline;text-decoration-color:#7E4114;text-decoration-thickness:1.5px;text-underline-offset:5px}
html body .pcard .sfp-sw.sfp-tabs button::after,html body .card .fitpair-sw.fitpair-tabs button::after{content:none!important}
html body .pcard .sfp-sw.sfp-tabs button:focus-visible,html body .card .fitpair-sw.fitpair-tabs button:focus-visible{outline:2px solid #7E4114;outline-offset:2px}
html body .fitpair.fp-tabbed>.fitpair-sw{display:none!important}
html[dir="rtl"] body .pcard .sfp-sw.sfp-tabs button,html[dir="rtl"] body .card .fitpair-sw.fitpair-tabs button{font-family:var(--sans)!important}
