/* ---------------------------------------------------------------------------
   The guide pages.

   Two families share this file:

     .gd-*   the blog components — swatch charts, chip rows, "avoid" pairs, the
             rust band, the navy call card, related cards, the season chips and
             the FAQ accordion. Used by /seasons/* and /colors-for/*, and by
             /colors/* for the parts they have in common.

     .cg-*   the /colors/<color> layout only: the hero flat-lay, the quick
             answer card, the "does it suit you" checker, the outfit grid with
             its Women/Men toggle, the living room and the three versions.

   WHAT FOLLOWS THE THEME AND WHAT DOES NOT
   Page chrome follows it: surfaces, borders, body copy. Colour does not. A
   swatch is the colour it says it is, the flat-lay board keeps its warm card
   stock and the navy call card stays navy, exactly as the outfit matcher's
   board and the sofa room do. A guide about colour that changed its colours
   in dark mode would be lying about its own subject.
--------------------------------------------------------------------------- */

.gd, .cg {
  --card: var(--st-surface);
  --line: var(--st-border);
  --ink: var(--st-ink);
  --dim: var(--st-ink-dim);
  --soft: color-mix(in srgb, var(--action) 9%, var(--st-surface));
  /* Card stock. Fixed in both themes: it is the backdrop the clothes are
     photographed on, not a surface. */
  --board: #F1EDE6;
  --navy: #1F2A44;
  --ok: #2E7D4F;
  --mid: #B7791F;
  --no: #B3402F;
}

[data-theme='dark'] .gd,
[data-theme='dark'] .cg {
  --soft: color-mix(in srgb, var(--action) 20%, var(--st-surface));
  --ok: #4CAF7D;
  --mid: #D9A441;
  --no: #E0705E;
}

/* =========================================================================
   SHARED BLOG COMPONENTS  (.gd-*)
   ========================================================================= */

/* --- section heading with a category line over it ------------------------ */
.gd-h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3.2vw, 32px);
  line-height: 1.15;
  color: var(--ink);
  margin: 52px 0 12px;
}
.gd-h2 small {
  display: block;
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--action);
  margin-bottom: 8px;
}
.gd-h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  margin: 28px 0 6px;
}

/* --- a swatch chart: big circles with names under them ------------------- */
.gd-sw {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 18px 12px;
  list-style: none;
  margin: 22px 0;
  padding: 0;
}
.gd-sw li { text-align: center; font-size: 13px; line-height: 1.35; color: var(--dim); }
.gd-sw i {
  display: block;
  width: 100%;
  max-width: 76px;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / .1);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / .85);
}
.gd-sw b { display: block; font-weight: 600; color: var(--ink); }
.gd-sw span { display: block; font-size: 12px; opacity: .75; }

/* The square variant, for hair and makeup shades, where a round chip reads
   as a dot of lipstick rather than as a colour sample. */
.gd-sw.is-tile i { border-radius: 16px; max-width: 100%; aspect-ratio: 4 / 3; }

/* --- "pair it with" chips ------------------------------------------------ */
.gd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.gd-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.gd-chip i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); flex: none; }
a.gd-chip:hover { border-color: var(--action); }

/* --- avoid: the shade, a cross, and what to wear instead ----------------- */
.gd-avoid { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 12px; }
.gd-avoid li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
}
.gd-avoid .gd-x { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); flex: none; }
.gd-avoid .gd-x::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 1px 3px rgb(0 0 0 / .55);
}
.gd-avoid .gd-arrow { color: var(--action); font-weight: 700; }
.gd-avoid .gd-swap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gd-avoid .gd-swap i { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); flex: none; }
.gd-avoid b { display: block; font-size: 15px; color: var(--ink); }
.gd-avoid span { display: block; font-size: 13px; color: var(--dim); }
@media (max-width: 560px) {
  .gd-avoid li { grid-template-columns: auto 1fr; }
  .gd-avoid .gd-arrow { display: none; }
}

/* The shade on its own, with the reason beside it — used where a page says
   what to skip but has no one-for-one replacement to offer. */
.gd-avoid.is-plain { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.gd-avoid.is-plain li { grid-template-columns: auto 1fr; align-items: flex-start; }
.gd-avoid.is-plain .gd-x { margin-top: 2px; }

/* --- the rust band, mid page --------------------------------------------- */
.gd-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--soft);
  border: 1px solid color-mix(in srgb, var(--action) 24%, transparent);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 34px 0;
}
.gd-band p { margin: 0; font-size: 16px; color: var(--ink); max-width: 46ch; }
.gd-band p b { font-weight: 600; }

/* --- the navy call card -------------------------------------------------- */
.gd-cta {
  background: var(--navy);
  color: #fff;
  border-radius: 24px;
  padding: 38px 26px;
  text-align: center;
  margin: 56px 0;
}
.gd-cta h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 34px);
  color: #fff;
  margin: 0 0 10px;
}
.gd-cta p { color: #D9DEEA; max-width: 48ch; margin: 0 auto 20px; font-size: 16px; }
.gd-cta .gd-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; }
.gd-cta .gd-row i { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .18); }

/* --- related cards with colour tops -------------------------------------- */
.gd-rel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.gd-rc {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
}
.gd-rc:hover { border-color: var(--action); }
.gd-rc .gd-top { height: 84px; display: flex; }
.gd-rc .gd-top i { flex: 1; }
.gd-rc .gd-t { display: block; padding: 13px 15px 15px; }
.gd-rc .gd-ct { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.gd-rc .gd-cs { margin: 3px 0 0; font-size: 13px; color: var(--dim); line-height: 1.4; }

/* --- the 12 season chips -------------------------------------------------- */
.gd-seasons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin: 20px 0 10px;
  padding: 0;
  list-style: none;
}
.gd-sea {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.gd-sea:hover { border-color: var(--action); }
.gd-sea i {
  font-style: normal;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #fff;
  flex: none;
}
.gd-sea.is-ok i { background: var(--ok); }
.gd-sea.is-mid i { background: var(--mid); }
.gd-sea.is-no i { background: var(--no); }
.gd-legend { font-size: 13px; color: var(--dim); margin: 0 0 8px; }

/* --- the FAQ accordion ---------------------------------------------------- */
.gd-faq { margin: 20px 0; }
.gd-faq details { border-bottom: 1px solid var(--line); padding: 15px 0; }
.gd-faq summary {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: '+'; color: var(--action); font-family: 'Work Sans', sans-serif; font-weight: 400; }
.gd-faq details[open] summary::after { content: '–'; }
.gd-faq details p { margin: 10px 0 0; color: var(--dim); font-size: 16px; line-height: 1.65; }

/* --- the standfirst under a guide's heading ------------------------------- */
.gd-dek {
  text-align: center;
  color: var(--dim);
  font-size: 19px;
  line-height: 1.55;
  max-width: 40rem;
  margin: 14px auto 0;
}
.gd-dek em { font-style: italic; color: var(--ink); }
.cg-read { text-align: initial; }
.cg-read > .art-kicker,
.cg-read > .art-h1 { text-align: center; }

/* THE HEADING OWNS THE GAP, THE BYLINE STARTS AT ZERO.
   The byline is spliced in straight after </h1> and arrives with a negative
   top margin — fine under the narrow article header it was tuned for, and
   wrong here, where the H1 is two lines of Fraunces at up to 58px and its
   descenders ran straight through the byline. So the margin lives on the
   heading, the byline is reset to zero, and the two cannot touch at any
   width however the heading wraps. `.art-h1 + p` rather than a class: the
   byline markup is shared with every other page and carries none of ours. */
.cg-read > .art-h1 {
  line-height: 1.1;
  max-width: 48rem;
  margin: 0 auto 16px;
}
.cg-read > .art-h1 + p {
  display: block;
  margin-top: 0;
  text-align: center;
}
.cg-read .art-h1 em { color: var(--action); font-style: italic; font-weight: 500; }

/* --- body copy ------------------------------------------------------------ */
.gd-p { color: var(--dim); font-size: 17px; line-height: 1.7; margin: 0 0 16px; }
.gd-p b, .gd-p strong { color: var(--ink); font-weight: 600; }
.gd-p a { color: var(--action); text-decoration: underline; text-underline-offset: 3px; }
.gd-p a:hover { text-decoration: none; }

/* --- the flat-lay board, shared by both families -------------------------- */
.gd-board {
  display: block;
  position: relative;
  background: var(--board);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / .94;
  container-type: inline-size;
}
.gd-pc { display: block; position: absolute; filter: drop-shadow(1cqw 2cqw 1.6cqw rgb(70 55 40 / .22)); }
.gd-pc > * { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.gd-pc .gd-c { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.gd-pc img.gd-s { mix-blend-mode: multiply; }
.gd-tag {
  position: absolute;
  background: #fff;
  border: 1px solid #DED8CE;
  border-radius: 1.4cqw;
  padding: .8cqw 1.6cqw;
  font: 400 2.6cqw/1.2 'Work Sans', system-ui, sans-serif;
  white-space: nowrap;
  color: #3C3832;
}
.gd-tag b { color: var(--action); margin-inline-end: .8cqw; }
.gd-tag strong { margin-inline-start: .8cqw; font-weight: 600; }

/* Small static flat-lays on the season and feature pages. */
.gd-fits { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 22px 0; padding: 0; list-style: none; }
.gd-fit { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.gd-fit .gd-board { border-radius: 0; }
.gd-fit .gd-m { display: block; padding: 13px 15px 15px; }
.gd-fit .gd-ft { margin: 0; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 17px; line-height: 1.25; color: var(--ink); }
.gd-fit .gd-fs { margin: 3px 0 0; font-size: 13px; color: var(--dim); line-height: 1.45; }
.gd-fit .gd-dots { display: flex; gap: 5px; margin-top: 9px; }
.gd-fit .gd-dots i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); }

/* =========================================================================
   THE COLOUR PAGES  (.cg-*)
   ========================================================================= */

/* The reading passages inside the wide layout keep the blog's column. */
.cg-read { max-width: 44rem; margin-inline: auto; }

/* --- hero: the big flat-lay beside the quick answer ---------------------- */
.cg-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: stretch; margin-top: 8px; }
@media (max-width: 880px) { .cg-hero { grid-template-columns: 1fr; } }
.cg-hero .gd-board { aspect-ratio: 1 / 1; }

.cg-quick {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.cg-quick .cg-lbl { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--action); }
.cg-quick h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 24px; color: var(--ink); margin: 6px 0 14px; }
.cg-quick .cg-sub { font-size: 15px; color: var(--dim); margin: 2px 0 10px; }
.cg-quick .cg-rule { margin-top: auto; background: var(--soft); border-radius: 14px; padding: 14px; font-size: 15px; color: var(--ink); }
.cg-quick .cg-rule b { font-weight: 600; }

/* The quick answer's chips are bigger than the shared ones: they are the
   answer to the page's question, not a footnote to a paragraph. */
.cg-cl { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.cg-cl li { width: 72px; font-size: 13px; line-height: 1.2; text-align: center; color: var(--dim); }
.cg-cl i {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 6px;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / .08);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / .9);
}

/* --- the checker --------------------------------------------------------- */
.cg-hook {
  margin: 40px 0 0;
  background: var(--navy);
  color: #fff;
  border-radius: 24px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
}
@media (max-width: 880px) { .cg-hook { grid-template-columns: 1fr; } }
.cg-hook h2 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(24px, 3vw, 30px); color: #fff; margin: 0 0 8px; }
.cg-hook h2 em { color: #F2C14E; font-style: italic; }
.cg-hook > div > p { color: #D9DEEA; margin: 0; font-size: 16px; }
.cg-chk { background: #fff; color: #1D1D1F; border-radius: 18px; padding: 16px; }
.cg-chk select {
  width: 100%;
  font: 500 16px 'Work Sans', system-ui, sans-serif;
  padding: 12px;
  border: 1.5px solid #E6E1D8;
  border-radius: 12px;
  background: #fff;
  color: #1D1D1F;
}
.cg-verdict { display: flex; align-items: center; gap: 14px; margin-top: 14px; min-height: 64px; }
.cg-verdict .cg-v { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 32px; }
.cg-verdict .cg-dot { width: 54px; height: 54px; border-radius: 50%; flex: none; border: 1px solid rgb(0 0 0 / .08); }
.cg-chk .cg-note { font-size: 14px; color: #6B665E; margin: 6px 0 0; }

/* --- outfits -------------------------------------------------------------- */
.cg-toggle { display: inline-flex; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 12px; padding: 4px; margin: 2px 0 18px; }
.cg-toggle button {
  border: 0;
  background: none;
  padding: 8px 18px;
  border-radius: 9px;
  font: 500 15px 'Work Sans', system-ui, sans-serif;
  cursor: pointer;
  color: var(--dim);
}
.cg-toggle button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

.cg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cg-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cg-card .gd-board { border-radius: 0; }
.cg-card .cg-meta { padding: 14px 16px 16px; }
.cg-card p { font-size: 14px; color: var(--dim); margin: 0 0 10px; line-height: 1.5; }
.cg-card .cg-num { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--action); margin: 0; }
.cg-card h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 19px; color: var(--ink); margin: 2px 0 6px; }
.cg-card .cg-dots { display: flex; gap: 6px; margin: 0; }
.cg-card .cg-dots i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .1); }

/* --- the living room ------------------------------------------------------ */
.cg-room { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; margin-top: 18px; }
@media (max-width: 880px) { .cg-room { grid-template-columns: 1fr; } }
.cg-stage { position: relative; background: var(--board); border-radius: 22px; overflow: hidden; aspect-ratio: 1200 / 1190; container-type: inline-size; }
.cg-stage { display: block; }
.cg-stage .cg-p { display: block; position: absolute; filter: drop-shadow(.5cqw 1cqw 1cqw rgb(70 55 40 / .16)); }
.cg-stage .cg-p.is-flat { filter: none; }
.cg-stage .cg-p > * { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.cg-stage .cg-p .gd-c { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.cg-stage .cg-p img.gd-s { mix-blend-mode: multiply; }

/* --- the three versions --------------------------------------------------- */
.cg-vers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; padding: 0; list-style: none; }
@media (max-width: 720px) { .cg-vers { grid-template-columns: 1fr; } }
.cg-ver { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cg-ver .cg-band2 { height: 108px; }
.cg-ver .cg-t { padding: 14px 16px; }
.cg-ver b { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 19px; color: var(--ink); }
.cg-ver span { display: block; font-size: 14px; color: var(--dim); margin-top: 3px; line-height: 1.45; }

/* --- phones ---------------------------------------------------------------- */
@media (max-width: 480px) {
  .cg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .gd-sw { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 10px; }
  .gd-rel { grid-template-columns: 1fr 1fr; }
  .gd-cta { padding: 30px 18px; border-radius: 20px; }
}
