/* ==========================================================================
   GUIDE INDEX — /guides/ and the post archives

   Replaces two things: a category archive rendered by the block theme's
   default template, which printed ten complete articles under an alphabetical
   page list and carried none of the site's chrome; and a /guides/ page whose
   markup was styled by a stylesheet that never loaded on it.

   Composition is its own again - a type-led masthead, one lead guide, a filter,
   then ninety rows set as a dense contents list rather than ninety cards.
   Cards would be the obvious answer here and the wrong one: at this length they
   become the repetition they were meant to break up.
   ========================================================================== */

.ck-guidespage {
  --ck-hair: rgba(36, 32, 29, .085);
  --ck-hair-mid: rgba(36, 32, 29, .16);
}

/* the index brings its own masthead, so the generic page header is hidden */
body.ck-has-guides .ck-pagehead { display: none; }

/* `.ck-page h1,h2,h3,h4` in ck-site.css is (0,1,1) and outranks a lone class */
.ck-guidespage .ck-gmast__title,
.ck-guidespage .ck-glead__title,
.ck-guidespage .ck-gend__title { font-weight: 500; }
.ck-guidespage ol, .ck-guidespage ul { margin: 0; padding: 0; list-style: none; }

/* ==========================================================================
   Masthead
   ========================================================================== */

.ck-gmast { padding-block: clamp(52px, 7vw, 104px) clamp(34px, 4vw, 56px); }
.ck-gmast__title {
  font-family: var(--ck-serif);
  font-size: clamp(42px, 6.2vw, 88px);
  line-height: .98; letter-spacing: -.025em;
  color: var(--ck-charcoal); margin-top: 20px;
  text-wrap: balance;
}
.ck-gmast__lede {
  margin-top: 22px; max-width: 52ch;
  font-family: var(--ck-serif);
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.55; font-style: italic;
  color: var(--ck-text-muted);
  text-wrap: pretty;
}
.ck-gmast__count {
  margin-top: 26px;
  font-family: var(--ck-sans); font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ck-text-muted);
}
.ck-gmast__count span {
  font-family: var(--ck-serif); font-size: 20px; font-weight: 600;
  letter-spacing: 0; color: var(--ck-gold-muted);
  font-variant-numeric: tabular-nums; margin-right: 4px;
}

/* ==========================================================================
   Lead guide
   ========================================================================== */

.ck-glead { padding-bottom: clamp(48px, 6vw, 84px); }
.ck-glead__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 4.5vw, 72px); align-items: center;
  padding-top: clamp(30px, 4vw, 52px);
  border-top: 1px solid var(--ck-hair-mid);
}
.ck-glead__media {
  display: block; overflow: hidden; border-radius: var(--ck-radius);
}
.ck-glead__media img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .5s var(--ck-ease);
}
.ck-glead__media:hover img { transform: scale(1.02); }

.ck-glabel {
  font-family: var(--ck-sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ck-gold-muted);
  margin-bottom: 16px;
}
.ck-glead__title {
  font-family: var(--ck-serif);
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.06;
  letter-spacing: -.022em; color: var(--ck-charcoal);
  text-wrap: balance;
}
.ck-glead__title a { color: inherit; }
.ck-glead__title a:hover { color: var(--ck-red); }
.ck-glead__text {
  margin-top: 18px; max-width: 46ch;
  font-size: 16.5px; line-height: 1.75; color: var(--ck-text-muted);
}
.ck-glink {
  display: inline-block; margin-top: 22px;
  font-family: var(--ck-sans); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; color: var(--ck-red);
  border-bottom: 1px solid rgba(181, 31, 36, .32); padding-bottom: 2px;
}
.ck-glink::after { content: "\2009\2192"; }
.ck-glead__copy:hover .ck-glink { border-color: currentColor; }

/* ==========================================================================
   Browse by topic
   ========================================================================== */

.ck-gtags {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-top: clamp(30px, 3.6vw, 48px);
  border-top: 1px solid var(--ck-hair-mid);
}
.ck-gtags .ck-glabel { margin-bottom: 0; margin-right: 6px; color: var(--ck-text-muted); }
.ck-gtags a {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 14px; min-height: 34px;
  border: 1px solid var(--ck-hair-mid); border-radius: 100px;
  font-family: var(--ck-serif); font-size: 16px; color: var(--ck-charcoal);
  transition: border-color .18s var(--ck-ease), color .18s var(--ck-ease);
}
.ck-gtags a span {
  font-family: var(--ck-sans); font-size: 10.5px; color: #9A9088;
  font-variant-numeric: tabular-nums;
}
.ck-gtags a:hover { border-color: var(--ck-red); color: var(--ck-red); }
.ck-gtags__all { font-style: italic; }

/* ==========================================================================
   Find a guide
   ========================================================================== */

.ck-guidespage__body { padding-bottom: clamp(56px, 7vw, 96px); }

.ck-gfind {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: clamp(26px, 3vw, 40px); padding-bottom: 18px;
}
.ck-gfind .ck-glabel { margin-bottom: 0; color: var(--ck-text-muted); flex: 0 0 auto; }
.ck-gfind__field {
  position: relative; display: flex; align-items: center;
  flex: 1 1 280px; max-width: 440px;
  border-bottom: 1px solid var(--ck-hair-mid);
  transition: border-color .2s var(--ck-ease);
}
.ck-gfind__field:focus-within { border-color: var(--ck-gold); }
.ck-gfind__input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--ck-serif); font-size: 19px; line-height: 1.3;
  color: var(--ck-charcoal); background: none;
  border: 0; outline: 0; padding: 6px 0;
  -webkit-appearance: none; appearance: none;
}
.ck-gfind__input::placeholder { color: #A79C90; font-style: italic; }
.ck-gfind__input::-webkit-search-cancel-button { display: none; }
.ck-gfind__clear {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-family: var(--ck-sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ck-text-muted); padding: 8px 0 8px 14px;
}
.ck-gfind__clear:hover { color: var(--ck-red); }
.ck-gfind__count {
  font-size: 12.5px; letter-spacing: .04em; color: var(--ck-text-muted);
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}

.ck-gnone {
  font-family: var(--ck-serif); font-size: 21px; font-style: italic;
  line-height: 1.6; color: var(--ck-text-muted);
  max-width: 46ch; padding-block: clamp(36px, 5vw, 64px);
}
.ck-gnone em { color: var(--ck-charcoal); }

/* ==========================================================================
   The list — a contents page, not a card grid
   ========================================================================== */

.ck-glist {
  columns: 30rem; column-gap: clamp(36px, 5vw, 76px);
  column-rule: 1px solid var(--ck-hair);
  margin-top: 8px;
}
.ck-grow { break-inside: avoid; -webkit-column-break-inside: avoid; }
.ck-grow__link {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) 76px;
  align-items: start; gap: 0 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ck-hair);
  color: var(--ck-text);
}
.ck-grow__num {
  font-family: var(--ck-sans); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; color: var(--ck-gold-muted);
  font-variant-numeric: tabular-nums; padding-top: 5px;
}
.ck-grow__title {
  display: block;
  font-family: var(--ck-serif); font-size: 19.5px; line-height: 1.28;
  font-weight: 600; color: var(--ck-charcoal);
  transition: color .18s var(--ck-ease);
}
.ck-grow__text {
  display: block; margin-top: 6px;
  font-family: var(--ck-sans); font-size: 13px; line-height: 1.6;
  color: var(--ck-text-muted);
}
.ck-grow__media {
  width: 76px; overflow: hidden; border-radius: 3px;
}
.ck-grow__media img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
}
.ck-grow__link:hover .ck-grow__title { color: var(--ck-red); }

/* filtering */
.ck-grow[hidden] { display: none !important; }

.ck-linkbtn {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  color: var(--ck-red); text-decoration: underline; text-underline-offset: 3px;
}
.ck-linkbtn:hover { color: var(--ck-red-dark); }

/* ==========================================================================
   Close
   ========================================================================== */

.ck-gend {
  text-align: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(44px, 5.5vw, 72px);
  border-top: 1px solid var(--ck-hair-mid);
}
.ck-gend .ck-eyebrow { justify-content: center; }
.ck-gend__title {
  font-family: var(--ck-serif); font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08; margin-bottom: 28px; color: var(--ck-charcoal);
}
.ck-gend__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 13px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .ck-glead__inner { grid-template-columns: minmax(0, 1fr); }
  .ck-glead__media { order: -1; }
}

@media (max-width: 680px) {
  .ck-glist { columns: auto; column-rule: 0; }
  .ck-gfind { gap: 10px 14px; }
  .ck-gfind .ck-glabel, .ck-gfind__count { flex-basis: 100%; }
  .ck-grow__link { grid-template-columns: 2rem minmax(0, 1fr) 64px; gap: 0 12px; }
  .ck-grow__media { width: 64px; }
  .ck-gend__actions .ck-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-glead__media img, .ck-grow__title, .ck-gfind__field { transition: none; }
  .ck-glead__media:hover img { transform: none; }
}
