/* ===========================================================================
   The outfit color matcher at the top of /outfits.

   Ported from docs/outfit-matcher/outfit-matcher.html with the look unchanged.
   Three things were done to it on the way in, and nothing else:

   1. EVERYTHING IS SCOPED UNDER .om. The source was a standalone page, so it
      styled `body`, `*` and `[hidden]` directly. Those rules would reach the
      outfit builder that now sits underneath this tool, which must keep
      behaving exactly as it did. Every selector here starts at .om-band or .om.

   2. THE CUSTOM PROPERTIES LIVE ON .om, NOT :root. Same reason: names like
      --line, --ink and --muted are generic enough to collide with the site's
      own tokens, and a variable defined at :root would be inherited by the
      whole document. Declared on the component, they reach the component.

   3. POSITIONS ARE LOGICAL, NOT LEFT/RIGHT. The garments and their hang tags
      are absolutely placed, so dir="rtl" has to mirror them. inset-inline-*
      does that from one set of rules — there is no second RTL stylesheet for
      this component.

   The recolouring itself is unchanged, and it is the reason the clothes look
   like cloth rather than flat shapes: each garment is three stacked layers —
   a solid colour masked by the garment's shade PNG, the same PNG again in
   multiply (which keeps the real folds and shadows), and a highlight PNG on
   top. Only the colour layer changes when a swatch is tapped.
=========================================================================== */

.om-band,
.om,
.oc {
  /* These surfaces do not flip with the theme, so the action colour on them
     must not either: var(--action) inside here is always the light value. */
  --action: #A3461F;
  --action-hover: #96401D;
  --on-action: #FFFFFF;

  --cream: #F5F1EA;
  --raised: #FBF8F3;
  --line: #E2DACC;
  --navy: #1F2A44;
  --navy2: #2A3654;
  --ink: #262626;
  --muted: #5F5A52;
  --rust: #A3461F;
  --gold: #F2C14E;
  --good: #2E7D4F;
  --close: #B7791F;
  --avoid: #B03A2E;
}

/* Full-bleed band, so the tool reads as its own surface above the darker page
   it opens. The page's <main> is capped at 64rem; the matcher wants its own
   1240px and its own gutters, which is why it sits outside it. */
.om-band {
  background: var(--cream);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.om {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 40px;
  font-family: 'DM Sans', 'Work Sans', system-ui, sans-serif;
  color: var(--ink);
}

.om *,
.om *::before,
.om *::after { box-sizing: border-box; }
.om [hidden] { display: none !important; }
.om button,
.om select { font: inherit; color: inherit; }
.om button { cursor: pointer; }

/* ---------------- hero ----------------
   The page's opening, and the owner of its only <h1>. Negative inline margins
   pull it out to the full 1240px of .om so the four cards have gutters to sit
   in; the copy is capped at 560px, which is what keeps them clear of it.

   The cards are built by js/outfitMatcher.js, not written here, because they
   are real recoloured garments — the same three-layer trick the tool uses, so
   the opening shows the thing itself rather than a picture of it. They carry
   .hp and NOT .pc: .pc is the tool's own piece, with hover, focus and click
   behaviour the hero has no use for. */
.omh { position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center; margin: 0 -24px 28px; padding: 40px 24px; overflow: hidden; }
.omh-copy { position: relative; z-index: 2; max-width: 560px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.omh-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding-block: 7px; padding-inline: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--navy); box-shadow: 0 4px 12px rgba(31, 42, 68, .06); }
.omh-dots { display: flex; }
.omh-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff; display: block; }
.omh-dots i + i { margin-inline-start: -5px; }
.omh-h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(40px, 5.4vw, 72px); line-height: 1; letter-spacing: -.025em; color: var(--navy); }
.omh-h1 em { display: block; margin-top: 10px; font-weight: 500; font-size: .56em; line-height: 1.15; color: var(--rust); }
.omh-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 32em; }
.omh-ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; }
.omh-btn { display: inline-flex; align-items: center; min-height: 52px; padding-inline: 26px; border-radius: 14px; background: var(--action); color: var(--on-action); text-decoration: none; font-weight: 700; font-size: 16px; }
.omh-btn:hover { background: var(--action-hover); }
.omh-link { color: var(--navy); font-weight: 600; text-underline-offset: 4px; }
.omh-fine { margin: 0; font-size: 13.5px; color: var(--muted); }
.omh-cards { position: absolute; inset: 0; pointer-events: none; }

.omc { position: absolute; width: 184px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 8px; box-shadow: 0 22px 44px rgba(31, 42, 68, .14); transform: rotate(var(--r)); animation: om-float var(--d) ease-in-out infinite alternate; }
.omc-stage { position: relative; height: 210px; border-radius: 16px; background: radial-gradient(100% 80% at 40% 30%, #F4F1EC 0%, #E6E1D9 75%, #DCD6CC 100%); overflow: hidden; }
.omc-stage .hp { position: absolute; }
.omc-t { inset-inline-start: 6%; top: 4%; width: 56%; height: 44%; z-index: 2; }
.omc-b { inset-inline-start: 48%; top: 22%; width: 44%; height: 74%; z-index: 1; }
.omc-a { inset-inline-start: 4%; top: 54%; width: 42%; height: 40%; z-index: 1; }
.omc-tag { position: absolute; inset-inline-start: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line);
  border-start-start-radius: 4px; border-start-end-radius: 10px; border-end-end-radius: 10px; border-end-start-radius: 4px;
  padding-block: 5px; padding-inline: 9px 11px; font-size: 12.5px; font-weight: 700; color: var(--navy); box-shadow: 0 6px 12px rgba(31, 42, 68, .1); }
.omc-tag i { width: 11px; height: 11px; border-radius: 50%; display: block; border: 1px solid rgba(0, 0, 0, .1); }
.omc-tag span { display: flex; gap: 2px; }

/* Four corners of the band, drifting out of step so they never line up. */
.omc:nth-child(1) { inset-inline-start: 4%; top: 6%; --r: -5deg; --d: 6.5s; }
.omc:nth-child(2) { inset-inline-start: 9%; top: 52%; --r: 4deg; --d: 7.4s; }
.omc:nth-child(3) { inset-inline-end: 4%; top: 4%; --r: 5deg; --d: 7s; }
.omc:nth-child(4) { inset-inline-end: 8%; top: 52%; --r: -3deg; --d: 6s; }

@keyframes om-float {
  from { transform: rotate(var(--r)) translateY(0); }
  to { transform: rotate(var(--r)) translateY(-10px); }
}

/* Below 1180px there are no gutters left to float in, so the cards stop being
   scenery and become a row you can push through with a thumb. */
@media (max-width: 1180px) {
  .omh { flex-direction: column; min-height: 0; padding: 16px 16px 8px; margin: 0 -16px 20px; }
  .omh-cards { position: relative; inset: auto; order: 2; display: flex; gap: 12px; overflow-x: auto; padding: 22px 6px 12px; width: 100%; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; pointer-events: auto; scrollbar-width: none; }
  .omh-cards::-webkit-scrollbar { display: none; }
  .omc { position: relative; inset: auto !important; flex: 0 0 160px; scroll-snap-align: start; }
  .omc-stage { height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .omc { animation: none; }
}

.om-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---------------- control panel (navy) ---------------- */
.om .cp { background: var(--navy); color: #fff; border-radius: 26px; padding: 24px; position: sticky; top: 16px; box-shadow: 0 24px 50px rgba(31, 42, 68, .22); }
.om .gtog { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.om .gtog button { border: 0; background: none; color: #C9D0DE; font-weight: 700; font-size: 14px; border-radius: 10px; padding: 9px; }
.om .gtog button[aria-pressed='true'] { background: var(--action); color: var(--on-action); }
.om .cp-sec { padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.om .cp-sec:first-child { border-top: 0; padding-top: 0; }
.om .cp-k { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.om .cp-k b { font-size: 11px; letter-spacing: .14em; color: var(--gold); }
.om .cp-k span { font-size: 13px; color: #C9D0DE; }
.om .cp-tabs { display: flex; gap: 16px; margin: -2px 0 12px; font-size: 13px; }
.om .cp-tabs button { border: 0; background: none; padding: 0 0 4px; color: #A9B2C4; font-weight: 600; border-bottom: 2px solid transparent; }
.om .cp-tabs button[aria-selected='true'] { color: #fff; border-color: var(--gold); }
.om .fan { display: flex; flex-wrap: wrap; gap: 8px; }
.om .sw { width: 38px; height: 38px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .18); padding: 0; position: relative; transition: transform .2s, border-color .2s; }
.om .sw:hover { transform: translateY(-3px); }
.om .sw[aria-pressed='true'] { border-color: #fff; transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0, 0, 0, .35); }
.om .sw[aria-pressed='true']::after { content: ''; position: absolute; inset-inline-start: 50%; bottom: -9px; width: 6px; height: 6px; border-radius: 50%; background: var(--action); transform: translateX(-50%); }
.om .sw.lock { background: repeating-linear-gradient(45deg, #3A4563 0 5px, #33405C 5px 10px) !important; cursor: pointer; }
.om .sw.lock::before { content: '🔒'; font-size: 12px; opacity: .75; }
.om .cp-note { margin: 12px 0 0; font-size: 12.5px; color: #C9D0DE; }
.om .cp-note a { color: var(--gold); font-weight: 700; }
.om .seasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.om .seasons button { border: 1px solid rgba(255, 255, 255, .22); background: none; color: #DDE2EC; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.om .seasons button[aria-pressed='true'] { background: var(--action); border-color: var(--action); color: var(--on-action); font-weight: 700; }
.om .wear { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.om .wb { border: 1.5px solid rgba(255, 255, 255, .16); background: var(--navy2); border-radius: 16px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #DDE2EC; }
.om .wb img { width: 42px; height: 42px; object-fit: contain; filter: brightness(1.02); }
.om .wb[aria-pressed='true'] { border-color: var(--gold); color: #fff; background: #33405F; }
.om .subs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.om .subs button { border: 0; background: rgba(255, 255, 255, .08); color: #C9D0DE; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.om .subs button[aria-pressed='true'] { background: var(--action); color: var(--on-action); }
.om .moods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.om .mb { border: 1.5px solid rgba(255, 255, 255, .16); background: var(--navy2); border-radius: 16px; padding: 10px; text-align: start; color: #DDE2EC; }
.om .mb strong { display: block; font-size: 14px; color: #fff; }
.om .mb small { display: block; font-size: 11.5px; color: #A9B2C4; margin-top: 1px; }
.om .mb .bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 9px; }
.om .mb .bar i { flex: 1; transition: background .45s; }
.om .mb[aria-pressed='true'] { border-color: var(--gold); background: #33405F; }
.om .check { display: flex; align-items: center; gap: 10px; }
.om .check select { flex: 1; min-width: 0; background: var(--navy2); border: 1.5px solid rgba(255, 255, 255, .16); color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.om .cp-cta { display: block; margin-top: 12px; text-align: center; background: var(--action); color: var(--on-action); text-decoration: none; font-weight: 700; border-radius: 12px; padding: 12px; }

/* ---------------- stage ---------------- */
.om .stg { background: var(--raised); border: 1px solid var(--line); border-radius: 26px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 16px; }
/* The rack and everything in it is shared with the compare cards further
   down the page, which draw four smaller copies of the same flat-lay. One set
   of rules, so a garment cannot sit in one place in the matcher and another
   three sections below it. */
:is(.om, .oc) .rack { position: relative; aspect-ratio: 1 / 0.95; border-radius: 18px; overflow: hidden;
  background: radial-gradient(100% 80% at 40% 30%, #F4F1EC 0%, #E6E1D9 70%, #DCD6CC 100%); }
:is(.om, .oc) .rack::before { content: ''; position: absolute; inset: 12px; border: 1px dashed rgba(163, 70, 31, .18); border-radius: 12px; pointer-events: none; }
:is(.om, .oc) .pc { position: absolute; transition: transform .35s ease; }
:is(.om, .oc) .pc button { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; }
:is(.om, .oc) .pc button:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; border-radius: 12px; }
:is(.om, .oc) .pc:hover { transform: translateY(-3px) rotate(-.5deg); }
:is(.om, .oc) .pc.pop { animation: om-pop .45s ease; }
@keyframes om-pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
:is(.om, .oc) .gw { position: relative; width: 100%; height: 100%; isolation: isolate; filter: drop-shadow(0 14px 16px rgba(31, 42, 68, .16)) drop-shadow(0 2px 3px rgba(31, 42, 68, .12)); }
:is(.om, .oc) .gw > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
:is(.om, .oc) .gc { background: var(--c); transition: background-color .5s ease; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
:is(.om, .oc) .gs { mix-blend-mode: multiply; }
:is(.om, .oc) .p-layer { inset-inline-start: 3%; top: 7%; width: 44%; height: 46%; z-index: 1; }
:is(.om, .oc) .p-top { inset-inline-start: 47%; top: 5%; width: 46%; height: 37%; z-index: 2; }
:is(.om, .oc) .p-bottom { inset-inline-start: 54%; top: 33%; width: 32%; height: 63%; z-index: 1; }
:is(.om, .oc) .p-bag { inset-inline-start: 5%; top: 57%; width: 28%; height: 32%; z-index: 1; }
:is(.om, .oc) .p-shoes { inset-inline-start: 33%; top: 62%; width: 18%; height: 29%; z-index: 1; }
/* hang tags */
:is(.om, .oc) .tag { position: absolute; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-start-start-radius: 4px; border-start-end-radius: 10px; border-end-end-radius: 10px; border-end-start-radius: 4px;
  padding-block: 5px; padding-inline: 16px 10px; font-size: 12px; box-shadow: 0 6px 12px rgba(31, 42, 68, .1); transform: rotate(var(--r, -3deg)); white-space: nowrap; }
:is(.om, .oc) .tag::before { content: ''; position: absolute; inset-inline-start: 5px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--cream); border: 1px solid var(--line); }
:is(.om, .oc) .tag b { font-weight: 700; }
:is(.om, .oc) .tag .n { font-family: Fraunces, Georgia, serif; font-weight: 600; color: var(--rust); }
:is(.om, .oc) .tag.you { background: var(--navy); color: #fff; border-color: var(--navy); }
:is(.om, .oc) .tag.you .n { color: var(--gold); }
:is(.om, .oc) .t-layer { inset-inline-start: 5%; top: 4%; --r: -4deg; }
:is(.om, .oc) .t-top { inset-inline-end: 4%; top: 4%; --r: 3deg; }
:is(.om, .oc) .t-bottom { inset-inline-end: 3%; top: 66%; --r: -2deg; }
:is(.om, .oc) .t-accent { inset-inline-start: 5%; top: 53%; --r: 3deg; }
/* paint chip strip */
.om .chips { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 24px rgba(31, 42, 68, .08); }
.om .chip { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.om .chip .c { flex: 1; min-height: 58px; transition: background .5s ease; position: relative; }
.om .chip .c .v { position: absolute; inset-inline-end: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.om .chip .t { padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.3; }
.om .chip .t small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.om .chip .t b { font-size: 13.5px; }
.om .chips-foot { padding: 8px 10px; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-align: center; border-top: 1px solid var(--line); background: var(--cream); }
.om .chips-foot b { font-family: Fraunces, Georgia, serif; letter-spacing: 0; font-size: 13px; color: var(--navy); }
/* verdict line under stage */
.om .rd { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 4px 6px 2px; }
.om .rd-title { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 30px; line-height: 1.1; color: var(--navy); }
.om .rd-title em { font-weight: 500; color: var(--rust); font-style: italic; }
.om .rd-why { grid-column: 1; margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.om .rd-act { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.om .verdicts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.om .vb { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.om .vb.good { background: #E3F0E7; color: var(--good); }
.om .vb.close { background: #F6EBD3; color: #7A4E0C; }
.om .vb.avoid { background: #F6E0DA; color: var(--avoid); }
.om .rd-act a { color: var(--navy); font-weight: 700; font-size: 14px; text-underline-offset: 3px; white-space: nowrap; }
.om .swap { font-size: 12px; color: var(--muted); }
.om .rd-our { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.om .our { display: flex; align-items: center; gap: 10px; text-align: start; text-decoration: none; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font: inherit; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.om .our:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(31, 42, 68, .08); }
.om .our .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.om .our b { display: block; font-size: 14px; }
.om .our small { display: block; font-size: 12px; color: var(--muted); }

/* ---------------- the hand-off to the builder underneath ---------------- */
.om-more { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 14px 24px 20px; font-size: 14px; color: var(--muted); text-align: center; }
.om-more a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }
.om-more a:hover { text-decoration: none; }

@media (max-width: 1023px) {
  .om { padding: 20px 16px 28px; }
  .om-grid { grid-template-columns: 1fr; }
  .om .cp { position: static; padding: 18px; }
  .om .stg { grid-template-columns: 1fr; padding: 12px; }
  .om .chips { flex-direction: row; }
  .om .chip .c { min-height: 48px; }
  .om .chips-foot { display: none; }
  .om .chip .t { padding: 6px 7px; }
  .om .chip .t b { font-size: 12px; }
  .om .rd { grid-template-columns: 1fr; }
  .om .rd-act { grid-column: 1; grid-row: auto; align-items: flex-start; }
  .om .verdicts { justify-content: flex-start; }
  .om .rd-title { font-size: 25px; }
  .om .rd-our { grid-template-columns: 1fr; }
  .om .tag { font-size: 11px; padding-block: 4px; padding-inline: 14px 8px; }
}
@media (max-width: 420px) {
  .om .tag .nm { display: none; }
  .om .mb small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .om *, .om *::before, .om *::after { transition: none !important; animation: none !important; }
}

/* ===========================================================================
   The worked combinations in the page's own written half.

   These sit inside <main>, not inside .om — they are page content in the
   site's own dark surface, written by tools/build-outfit-combos.mjs — so they
   take the site's tokens rather than the matcher's cream ones.
=========================================================================== */
.combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 1.5rem 0 0;
}
.combo-card {
  background: rgb(var(--c-bone) / 0.04);
  border: 1px solid rgb(var(--c-ink3));
  border-radius: 14px;
  padding: 14px 16px 12px;
}
.combo-card__name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 1rem;
  color: rgb(var(--c-bone));
}
.combo-dot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgb(var(--c-bone) / 0.25);
  flex: none;
}
.combo-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(var(--c-muted));
}
.combo-card__list b { color: rgb(var(--c-bone)); font-weight: 600; }
/* The names the engine gives a generated shade are approximate — the swatches
   are the precise answer, which is why every line carries them. */
.combo-swatches { display: flex; gap: 4px; margin-top: 5px; }
.combo-swatches i {
  width: 22px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgb(var(--c-bone) / 0.18);
}

/* ===========================================================================
   Compare outfits side by side — js/outfitCompare.js.

   Four of the matcher's own flat-lays, smaller, one per mood. The rack rules
   above are shared, so only the card around it is new. The cards are a light
   surface in both themes for the same reason the matcher is: four colour
   verdicts cannot be read against a background that moves.
   ======================================================================== */
.oc { color: var(--ink); font-family: 'DM Sans', 'Work Sans', system-ui, sans-serif; }
.oc *, .oc *::before, .oc *::after { box-sizing: border-box; }
.oc [hidden] { display: none !important; }
.oc button, .oc select { font: inherit; color: inherit; }
.oc button { cursor: pointer; }

.oc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 18px; }
.oc-gtog { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.oc-gtog button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; border-radius: 9px; padding: 7px 14px; }
.oc-gtog button[aria-pressed='true'] { background: var(--action); color: var(--on-action); }
.oc-tabs { display: flex; gap: 14px; font-size: 13px; }
.oc-tabs button { border: 0; background: none; padding: 2px 0 4px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.oc-tabs button[aria-selected='true'] { color: var(--navy); border-color: var(--rust); }
.oc-cols { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 220px; min-width: 0; }
.oc .sw { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); padding: 0; position: relative; transition: transform .2s, border-color .2s; }
.oc .sw span { display: block; width: 100%; height: 100%; border-radius: 6px; }
.oc .sw:hover { transform: translateY(-2px); }
.oc .sw[aria-pressed='true'] { border-color: var(--navy); transform: translateY(-3px); box-shadow: 0 6px 12px rgba(31, 42, 68, .2); }
.oc .sw.lock { background: repeating-linear-gradient(45deg, #D8D2C6 0 5px, #CFC8BA 5px 10px); }
.oc .sw.lock::before { content: '🔒'; font-size: 11px; opacity: .7; }
.oc-field { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.oc-field select { background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--navy); max-width: 11rem; }
.oc .oc-shuffle { display: inline-flex; align-items: center; gap: 7px; background: var(--action); color: var(--on-action); border: 0; border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 700; margin-inline-start: auto; }
.oc .oc-shuffle:hover { background: var(--action-hover); }
.oc-lock { margin: -8px 0 16px; font-size: 13px; color: var(--muted); }
.oc-lock a { color: var(--rust); font-weight: 700; }

/* 4 across, 2x2 on a tablet, a swipe row on a phone. */
.oc-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.oc-card { background: var(--raised); border: 1px solid var(--line); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.oc-card.in { animation: oc-in .15s ease both; animation-delay: var(--d, 0ms); }
@keyframes oc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.oc-pill { display: flex; align-items: center; gap: 8px; }
.oc-pill b { font-size: 13px; font-weight: 700; color: var(--navy); }
.oc-dots { display: flex; margin-inline-start: auto; }
.oc-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--raised); display: block; }
.oc-dots i + i { margin-inline-start: -4px; }
.oc-stage { border-radius: 14px; overflow: hidden; }
.oc-chips { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.oc-score { margin: 0; font-size: 12.5px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.oc-score .v-good { color: var(--good); }
.oc-score .v-close { color: var(--close); }
.oc-score .v-avoid { color: var(--avoid); }
.oc-why { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.oc-act { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.oc .oc-open { flex: 1; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.oc .oc-open:hover { border-color: var(--navy); }
.oc .oc-pin { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.oc .oc-pin[aria-pressed='true'] { background: var(--action); border-color: var(--action); color: var(--on-action); }

/* The hang tags are the first thing to overflow a small card. */
.oc .tag { font-size: 10px; padding-block: 3px; padding-inline: 13px 7px; }
.oc .tag .nm { display: none; }
.oc .pc:hover { transform: none; }

/* Pin two and a bar appears. */
/* Which of the four you are on, under the swipe row. Phones only — at any
   width where all four are on screen at once there is nothing to track. */
.oc-dotrow { display: none; justify-content: center; gap: 7px; margin-top: 10px; }
.oc-dotrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: block; transition: background-color .2s, transform .2s; }
.oc-dotrow i.on { background: var(--navy); transform: scale(1.25); }

.oc-bar { position: sticky; bottom: 0; z-index: 46; display: flex; justify-content: center; padding: 10px 0 14px; pointer-events: none; }
.oc-bar button { pointer-events: auto; background: var(--action); color: var(--on-action); border: 0; border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 28px rgba(31, 42, 68, .3); }
.oc-cmp-h { margin: 22px 0 10px; font-family: Fraunces, Georgia, serif; font-size: 20px; font-weight: 600; color: var(--navy); }
.oc-cmp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; }
.oc-card--big { background: #fff; }
.oc-card--big.is-best { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.oc-star { color: var(--gold); margin-inline-start: auto; font-size: 16px; }

@media (max-width: 1023px) {
  .oc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  /* About 1.2 cards wide, so the next one is visibly there to swipe to. */
  .oc-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
  .oc-row::-webkit-scrollbar { display: none; }
  /* About 1.2 cards wide: the next one is visibly there to swipe to. */
  .oc-card { flex: 0 0 min(75vw, 300px); scroll-snap-align: start; }
  .oc-dotrow { display: flex; }
  .oc-controls { padding: 10px; }
  .oc .oc-shuffle { margin-inline-start: 0; }
  .oc-cmp-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .oc-card.in { animation: none; }
}
