/* ============================================================
   Guide kit: one visual grammar for the guides and the blog
   (WEBSITE_GUIDES_PLAN.md section 5). Load it as the LAST
   stylesheet on a page:
     <link rel="stylesheet" href="/css/guide-kit.css">
   (blog posts: ../css/guide-kit.css)

   Every selector is gk- prefixed, so the generic phone blocks near
   the end of styles.css cannot reach in, and nothing here touches a
   page that does not use the classes. Colours come only from the
   tokens in styles.css (:root), so [data-theme="dark"] needs no
   extra rules. html is 18px (17px under 769px): 0.85rem is the
   smallest label (14.45px on a phone), body copy is 0.95rem and up,
   and paragraphs stop near 68 characters (33em of Lora).
   Snippets, icons and the page skeleton live in KIT.md.
   ============================================================ */

/* Glyphs, drawn as masks so they take any token colour with no
   markup. Small ones carry a heavier stroke so they stay crisp. */
:root {
  --gk-i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --gk-i-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --gk-i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --gk-i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h14M12 6l6 6-6 6'/%3E%3C/svg%3E");
  --gk-i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 11.2v4.8M12 8h.01'/%3E%3C/svg%3E");
  --gk-i-bulb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.7.5 1.1 1.3 1.1 2.2h5c0-.9.4-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
  --gk-i-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.3 2.9 17.5A2 2 0 0 0 4.6 20.5h14.8a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9.5v4.5M12 17.2v.1'/%3E%3C/svg%3E");
  --gk-i-disc-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='k'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='m7.3 12.3 3.1 3.1 6.4-6.7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/mask%3E%3Ccircle cx='12' cy='12' r='12' mask='url(%23k)'/%3E%3C/svg%3E");
  --gk-i-disc-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='k'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='m8.4 8.4 7.2 7.2M15.6 8.4l-7.2 7.2' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/mask%3E%3Ccircle cx='12' cy='12' r='12' mask='url(%23k)'/%3E%3C/svg%3E");
  /* Text-weight green and red: the plain tokens fall under 4.5:1 on
     their own light tints, so small text mixes in a little ink. */
  --gk-green-ink: color-mix(in srgb, var(--green) 70%, var(--text-primary));
  --gk-red-ink: color-mix(in srgb, var(--red) 82%, var(--text-primary));
}

/* One rule paints every glyph: the element sets --gk-glyph and the
   pseudo-element takes the colour of its text. */
.gk-answer__list > li::before, .gk-chip--right::before, .gk-chip--wrong::before, .gk-pair__label::before, .gk-pair--compact .gk-pair__dont::before, .gk-pair--compact .gk-pair__do::before, .gk-note::before, .gk-more > summary::after, .gk-file__arrow, .gk-example__turn::before {
  content: ""; flex: none; display: inline-block; width: 1em; height: 1em; background-color: currentColor;
  -webkit-mask: var(--gk-glyph) center / contain no-repeat; mask: var(--gk-glyph) center / contain no-repeat;
}

/* Rhythm: a kit block placed in a .container after anything else
   gets air above it, so pages need no spacing rules of their own. */
.container > * + :is(.gk-answer, .gk-jump, .gk-example, .gk-pair, .gk-pairs, .gk-points,
  .gk-steps, .gk-table, .gk-photo, .gk-note, .gk-more, .gk-text) { margin-top: 2.25rem; }

/* Loose paragraphs: a centred column about 68 characters wide. */
.gk-text { max-width: 33em; margin-left: auto; margin-right: auto; }

/* ---------- Section head: kicker, h2, one-line lead ---------- */
.gk-head { max-width: 680px; margin: 0 auto 2.4rem; text-align: center; }
.gk-head h2 { margin: 0; text-wrap: balance; }
.gk-head .ornament { margin: 0.9rem 0 0; }

.gk-head__kicker {
  margin: 0 0 0.55rem; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}

.gk-head__lead {
  max-width: 33em; margin: 0.85rem auto 0; font-size: 1.02rem; line-height: 1.7; color: var(--text-secondary);
  text-wrap: balance;
}

/* ---------- Quick answer: the self-contained passage at the top ---------- */
.gk-answer {
  max-width: 700px; margin: 0 auto; padding: 1.6rem 1.8rem 1.7rem; border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--card-bg);
  box-shadow: var(--shadow-md); text-align: left;
}

.gk-answer__title { margin: 0 0 0.55rem; font-size: 1.3rem; }
.gk-answer > p { margin: 0; font-size: 1.05rem; line-height: 1.75; color: var(--text-primary); }

.gk-answer__list {
  display: grid; gap: 0.45rem; margin: 1.05rem 0 0; padding: 1rem 0 0; border-top: 1px dashed var(--border);
  list-style: none;
}

.gk-answer__list > li {
  display: flex; align-items: baseline; gap: 0.6rem; font-size: 1rem; line-height: 1.55; color: var(--text-secondary);
  --gk-glyph: var(--gk-i-disc-tick);
}

.gk-answer__list > li::before { width: 1.05rem; height: 1.05rem; color: var(--green); transform: translateY(0.17rem); }

/* ---------- Jump links: pills to the page's sections (5 or more) ---------- */
.gk-jump { max-width: 860px; margin: 1.8rem auto 0; text-align: center; }

.gk-jump__label {
  margin: 0 0 0.6rem; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
}

.gk-jump__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }

.gk-jump__list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.45rem 1.05rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card-bg); box-shadow: var(--shadow-sm);
  font-family: var(--font-ui); font-size: 0.92rem; font-weight: 600; line-height: 1.25; color: var(--accent);
}

.gk-jump__list a:hover { border-color: var(--accent); }
.gk-jump__list a:focus-visible, .gk-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Icon bullets: icon, bold lead-in, one short line ---------- */
.gk-points {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.5rem 2.2rem;
  max-width: 1020px; margin: 0 auto; padding: 0; list-style: none; text-align: left;
}

.gk-points > li { display: flex; align-items: flex-start; gap: 1rem; }

/* The owner's standard tile: a 58px outlined circle, accent glyph.
   .gk-icon is the same tile for use anywhere (a stage, a card). */
.gk-icon, .gk-points__icon, .gk-steps__icon {
  position: relative; flex: none; display: grid; place-items: center; width: 58px; height: 58px;
  border: 1px solid var(--border); border-radius: 50%; background: var(--card-bg); box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.gk-icon svg, .gk-points__icon svg, .gk-steps__icon svg { width: 30px; height: 30px; }

.gk-points__lead {
  display: block; margin: 0.3rem 0 0.2rem; font-family: var(--font-display); font-size: 1.08rem; font-weight: 600;
  line-height: 1.35; color: var(--text-primary);
}

.gk-points__lead a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 0.2em; }
.gk-points__text { max-width: 33em; margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary); }

/* Dense lists: a 40px tile. */
.gk-points--compact { gap: 1rem 2rem; }
.gk-points--compact .gk-points__icon { width: 40px; height: 40px; }
.gk-points--compact .gk-points__icon svg { width: 22px; height: 22px; }
.gk-points--compact .gk-points__lead { margin-top: 0.05rem; font-size: 1rem; }

/* ---------- Steps: numbered, one or two lines each, a rail between ---------- */
.gk-steps { max-width: 680px; margin: 0 auto; padding: 0; list-style: none; counter-reset: gk-step; text-align: left; }

.gk-steps > li {
  position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 1.25rem;
  padding-bottom: 1.8rem; counter-increment: gk-step;
}

.gk-steps > li:last-child { padding-bottom: 0; }

.gk-steps > li:not(:last-child)::before {
  content: ""; position: absolute; top: 64px; bottom: 6px; left: 28px; width: 2px; border-radius: 1px;
  background: var(--border);
}

/* The step number rides on the icon; an empty icon shows it alone. */
.gk-steps__icon::after {
  content: counter(gk-step); position: absolute; top: -5px; right: -7px; display: grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 0.3rem; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 3px var(--card-bg); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700;
  line-height: 1; color: var(--card-bg);
}

.gk-steps__icon:empty::after { position: static; background: none; box-shadow: none; font-size: 1.3rem; color: var(--accent); }

.gk-steps__title {
  margin: 0.5rem 0 0.25rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.35;
  text-wrap: balance; color: var(--text-primary);
}

.gk-steps__body > p { margin: 0 0 0.3rem; font-size: 1rem; line-height: 1.65; color: var(--text-secondary); }
.gk-steps__body > .gk-more { margin-top: 0.75rem; }

.gk-steps__pic {
  display: block; max-width: 100%; height: auto; margin-top: 0.75rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}

/* ---------- Do / do not ----------
   Default: two cards side by side (stacking on a phone), with an
   optional title above and footnote under. --compact: one card per
   item in a .gk-pairs list; the mistake is the red row (or its
   number), the fix the green row, an example sits on the right. */
.gk-pair {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; max-width: 860px;
  margin: 0 auto; text-align: left;
}

.gk-pair__title, .gk-pair__foot { grid-column: 1 / -1; margin: 0; text-align: center; }
.gk-pair__title { font-size: 1.25rem; text-wrap: balance; }
.gk-pair__foot { font-family: var(--font-ui); font-size: 0.92rem; font-weight: 600; }

.gk-pair__dont, .gk-pair__do {
  margin: 0; padding: 1.1rem 1.3rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--card-bg); box-shadow: var(--shadow-sm); font-size: 1rem; line-height: 1.6;
  color: var(--text-secondary);
}

.gk-pair__dont { border-color: color-mix(in srgb, var(--red) 34%, var(--border)); }
.gk-pair__do { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.gk-pair__dont p, .gk-pair__do p { margin: 0; }

.gk-pair__label {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; font-family: var(--font-ui);
  font-size: 0.85rem; font-weight: 700; line-height: 1.3;
}

.gk-pair__label::before { width: 1.25rem; height: 1.25rem; }
.gk-pair__dont .gk-pair__label { color: var(--gk-red-ink); --gk-glyph: var(--gk-i-disc-cross); }
.gk-pair__do .gk-pair__label { color: var(--gk-green-ink); --gk-glyph: var(--gk-i-disc-tick); }

.gk-pairs { display: grid; gap: 1.1rem; width: 100%; max-width: 900px; margin: 0 auto; padding: 0; list-style: none; container-type: inline-size; }

.gk-pair--compact {
  grid-template-columns: minmax(0, 1fr); gap: 1rem 2rem; max-width: none; padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.gk-pair--compact .gk-pair__dont, .gk-pair--compact .gk-pair__do, .gk-pair__why {
  position: relative; margin: 0; padding: 0 0 0 2.4rem; border: 0; border-radius: 0; background: none;
  box-shadow: none;
}

.gk-pair--compact .gk-pair__dont {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.35; text-wrap: balance;
  color: var(--text-primary); --gk-glyph: var(--gk-i-disc-cross);
}

.gk-pair--compact .gk-pair__do { margin-top: 0.6rem; color: var(--text-primary); --gk-glyph: var(--gk-i-disc-tick); }
.gk-pair--compact .gk-pair__do b { color: var(--gk-green-ink); }
.gk-pair--compact .gk-pair__dont::before, .gk-pair--compact .gk-pair__do::before { position: absolute; left: 0.2rem; width: 1.3rem; height: 1.3rem; }
.gk-pair--compact .gk-pair__dont::before { top: 0.22em; color: var(--red); }
.gk-pair--compact .gk-pair__do::before { top: 0.2rem; color: var(--green); }

/* A numbered mistake shows its number in the red disc instead. */
.gk-pair__num {
  position: absolute; left: 0; top: 0.05em; display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--red-light); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700;
  line-height: 1; color: var(--gk-red-ink);
}

.gk-pair__dont:has(> .gk-pair__num)::before { display: none; }
.gk-pair__why { margin-top: 0.45rem; font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary); }

.gk-pair__art {
  display: grid; place-items: center; align-content: center; gap: 0.7rem; min-width: 0; padding: 1rem 0.75rem;
  border-radius: var(--radius-sm); background: var(--bg-warm);
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.gk-pair--compact > .gk-more { grid-column: 1 / -1; margin: 0; }

@container (min-width: 620px) {
  .gk-pair--compact:has(> .gk-pair__art) { grid-template-columns: minmax(0, 1fr) 16.5rem; }
}

/* On a phone the stage sits under the text: drop its decorative icon. */
@container (max-width: 619px) {
  .gk-pair__art > .gk-icon { display: none; }
}

/* Inside a stage, rows of chips and file names centre themselves. */
:is(.gk-pair__art, .gk-example__stage) :is(.gk-chips, .gk-file) { justify-content: center; }

/* ---------- Example: a framed worked example with a caption ---------- */
.gk-example {
  width: 100%; max-width: 860px; margin: 0 auto; padding: 0.85rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); background: var(--card-bg); box-shadow: var(--shadow-sm);
  container-type: inline-size;
}

.gk-example__stage {
  display: grid; place-items: center; gap: 1rem; padding: 1.4rem 1rem; border-radius: var(--radius-sm);
  background: var(--bg-warm); box-shadow: inset 0 0 14px color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.gk-example__caption { max-width: 33em; margin: 0.8rem auto 0.15rem; font-size: 0.95rem; line-height: 1.6; text-align: center; color: var(--text-secondary); }

/* Before and after: stacked, side by side once there is room. */
.gk-example__ba { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; width: 100%; }
.gk-example__side { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: 100%; min-width: 0; }

.gk-example__flag {
  margin: 0; padding: 0.22rem 0.75rem; border-radius: 999px; font-family: var(--font-ui); font-size: 0.85rem;
  font-weight: 700; line-height: 1.35;
}

.gk-example__flag--before { background: var(--red-light); color: var(--gk-red-ink); }
.gk-example__flag--after { background: var(--green-light); color: var(--gk-green-ink); }

.gk-example__turn {
  flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent); box-shadow: var(--shadow-md); color: var(--card-bg); --gk-glyph: var(--gk-i-arrow);
}

.gk-example__turn::before { transform: rotate(90deg); }

@container (min-width: 640px) {
  .gk-example__ba { flex-direction: row; align-items: stretch; }
  .gk-example__turn { align-self: center; }
  .gk-example__turn::before { transform: none; }
}

/* Prints in a row, each over its chip; --pile jumbles them. */
.gk-prints { display: flex; justify-content: center; gap: 0.6rem; width: 100%; margin: 0; padding: 0; list-style: none; }
.gk-prints > li { display: flex; flex: 0 1 6.2rem; flex-direction: column; align-items: center; gap: 0.5rem; min-width: 0; }

.gk-prints img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--card-bg);
  border-bottom-width: 7px; border-radius: 3px; background: var(--bg-accent); box-shadow: var(--shadow-md);
}

/* In a row of prints the chips drop their glyph to fit four across. */
.gk-prints .gk-chip { padding: 0.2rem 0.55rem; }
.gk-prints .gk-chip::before { display: none; }

/* Landscape prints (a 6x4 and its back): wider, 3:2. */
.gk-prints--wide > li { flex-basis: 9rem; }
.gk-prints--wide img { aspect-ratio: 3 / 2; border-width: 3px; border-bottom-width: 5px; }

.gk-prints--pile { gap: 0; padding: 0.5rem 0.75rem 0.25rem; }
.gk-prints--pile > li + li { margin-left: -1.1rem; }
.gk-prints--pile > li:nth-child(4n + 1) { transform: rotate(-6deg) translateY(5px); }
.gk-prints--pile > li:nth-child(4n + 2) { transform: rotate(4deg) translateY(-3px); z-index: 1; }
.gk-prints--pile > li:nth-child(4n + 3) { transform: rotate(-3deg) translateY(7px); }
.gk-prints--pile > li:nth-child(4n + 4) { transform: rotate(6deg); z-index: 1; }

/* One photo framed like a print, with optional callout tags: --x and
   --y (percent of the frame) name the spot, the tag sits just above it
   and points down at it. */
.gk-photo { max-width: 26rem; margin: 0 auto; }

.gk-photo__frame {
  position: relative; padding: 4%; border-radius: 3px; background: var(--card-bg); box-shadow: var(--shadow-md);
  transform: rotate(-0.8deg);
}

.gk-photo__frame img { display: block; width: 100%; height: auto; }

.gk-photo__tag {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, calc(-100% - 0.5rem)) rotate(0.8deg);
  padding: 0.22rem 0.65rem; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--card-bg);
  box-shadow: var(--shadow-md); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; line-height: 1.3;
  white-space: nowrap; color: var(--text-primary);
}

.gk-photo__tag::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 0.55rem; height: 0.55rem; background: var(--card-bg);
  border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: translate(-50%, -60%) rotate(45deg);
}

.gk-photo__caption { margin: 0.85rem 0 0; font-size: 0.95rem; line-height: 1.55; text-align: center; color: var(--text-secondary); }

/* A file name before and after. */
.gk-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.6rem; margin: 0; }

.gk-file__name {
  max-width: 100%; padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card-bg); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem;
  line-height: 1.4; overflow-wrap: anywhere; color: var(--text-primary);
}

.gk-file__name--wrong { border-color: transparent; background: var(--red-light); color: var(--gk-red-ink); }
.gk-file__name--right { border-color: transparent; background: var(--green-light); color: var(--gk-green-ink); }
.gk-file__arrow { width: 1.1rem; height: 1.1rem; color: var(--accent); --gk-glyph: var(--gk-i-arrow); }
.gk-file__arrow--down { transform: rotate(90deg); }

/* ---------- Fact chips (and the wrong / right date chip) ---------- */
.gk-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }

/* inline-block, not flex: a struck-through chip must not strike its
   label, and only atomic inline children escape the line. */
.gk-chip {
  display: inline-block; max-width: 100%; margin: 0; padding: 0.3rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 999px;
  background: var(--accent-light); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700;
  line-height: 1.35; color: var(--accent);
}

.gk-chip--right { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-light); color: var(--gk-green-ink); --gk-glyph: var(--gk-i-tick); }

.gk-chip--wrong {
  border-color: color-mix(in srgb, var(--red) 30%, transparent); background: var(--red-light);
  color: var(--gk-red-ink); text-decoration: line-through; text-decoration-thickness: 1.5px;
  --gk-glyph: var(--gk-i-cross);
}

.gk-chip--right::before, .gk-chip--wrong::before { width: 0.85em; height: 0.85em; margin-right: 0.35em; vertical-align: -0.08em; }

/* A label inside a chip ("File says") is never struck through. End the
   label with a space INSIDE its span and write nothing between the span
   and the value: a screen reader hears "File says 2026", the inline-block
   drops the trailing space on screen, and the margin is the visible gap. */
.gk-chip__label { display: inline-block; margin-right: 0.3em; font-weight: 500; }

/* ---------- Callout: one sentence that must not be missed ---------- */
.gk-note {
  position: relative; max-width: 680px; margin: 1.6rem auto 0; padding: 1rem 1.25rem 1rem 3.35rem;
  border: 1px solid var(--border-light); border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--card-bg); box-shadow: var(--shadow-sm); font-size: 1rem; line-height: 1.65; text-align: left;
  color: var(--text-secondary); --gk-glyph: var(--gk-i-info);
}

.gk-note::before { position: absolute; left: 1rem; top: 1.05rem; width: 1.5rem; height: 1.5rem; color: var(--accent); }
.gk-note p { margin: 0; }
.gk-note strong, .gk-note b { color: var(--text-primary); }
.gk-note--tip { border-left-color: var(--green); --gk-glyph: var(--gk-i-bulb); }
.gk-note--tip::before { color: var(--gk-green-ink); }
.gk-note--warn { border-left-color: var(--red); --gk-glyph: var(--gk-i-warn); }
.gk-note--warn::before { color: var(--red); }

/* ---------- Details: folded depth, closed by default ---------- */
.gk-more { max-width: 680px; margin: 1.2rem auto 0; text-align: left; }

.gk-more > summary {
  display: inline-flex; align-items: center; gap: 0.55rem; max-width: 100%; min-height: 44px;
  padding: 0.5rem 1rem 0.5rem 1.1rem; border: 1px solid var(--border); border-radius: 1.4rem;
  background: var(--card-bg); font-family: var(--font-ui); font-size: 0.92rem; font-weight: 600; line-height: 1.35;
  color: var(--accent); cursor: pointer; list-style: none; --gk-glyph: var(--gk-i-chev);
}

.gk-more > summary::-webkit-details-marker { display: none; }
.gk-more > summary:hover { border-color: var(--accent); }
.gk-more > summary::after { width: 1.05rem; height: 1.05rem; }
.gk-more[open] > summary::after { transform: rotate(180deg); }
.gk-more__body { margin-top: 0.8rem; padding: 0.15rem 0 0.15rem 1.1rem; border-left: 2px solid var(--border); }
.gk-more__body p, .gk-more__body li { max-width: 33em; font-size: 0.98rem; line-height: 1.7; color: var(--text-secondary); }
.gk-more__body p { margin: 0 0 0.7rem; }
.gk-more__body :is(ul, ol) { margin: 0 0 0.7rem; padding-left: 1.2rem; }
.gk-more__body ul { list-style: disc; }
.gk-more__body li { margin-bottom: 0.35rem; }
.gk-more__body li::marker { color: var(--accent); }
.gk-more__body > :last-child { margin-bottom: 0; }
/* Under a centred row of cards the pill sits in the middle; the folded
   text still reads from the left. */
.gk-more--center { text-align: center; }
.gk-more--center > .gk-more__body { text-align: left; }
/* Steps and a callout folded inside a disclosure keep their own shape
   instead of the disclosure's list indent. */
.gk-more__body > .gk-steps { padding-left: 0; margin: 0.4rem 0 1.2rem; list-style: none; }
.gk-more__body > .gk-steps > li { max-width: none; margin-bottom: 0; }
.gk-more__body > .gk-note { max-width: none; margin: 0 0 0.3rem; }

@media (prefers-reduced-motion: no-preference) {
  .gk-more > summary::after { transition: transform 0.2s ease; }
}

/* ---------- Compact table: stacked label / value cards under 640px ---------- */
.gk-table {
  width: 100%; max-width: 860px; margin: 0 auto; border: 1px solid var(--border); border-collapse: separate;
  border-spacing: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--card-bg);
  box-shadow: var(--shadow-sm); font-size: 0.98rem; text-align: left;
}

.gk-table caption { padding: 0 0 0.6rem; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; text-align: left; color: var(--text-muted); }
.gk-table th, .gk-table td { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border-light); vertical-align: top; line-height: 1.5; color: var(--text-secondary); }
.gk-table tbody tr:last-child > * { border-bottom: 0; }
.gk-table thead th { background: var(--bg-accent); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.gk-table tbody th { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }

@media (max-width: 640px) {
  .gk-table, .gk-table tbody, .gk-table tr, .gk-table th, .gk-table td { display: block; }
  .gk-table { border: 0; border-radius: 0; overflow: visible; background: none; box-shadow: none; }
  .gk-table caption { display: block; }
  .gk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gk-table tbody tr { margin-bottom: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--card-bg); box-shadow: var(--shadow-sm); }
  .gk-table tbody th { background: var(--bg-accent); }
  .gk-table td { display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: 0.75rem; }
  .gk-table td::before { content: attr(data-label); font-family: var(--font-ui); font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
  /* Stacked: the last card keeps its inner dividers like the others. */
  .gk-table tbody tr:last-child > * { border-bottom: 1px solid var(--border-light); }
  .gk-table tbody tr > :last-child { border-bottom: 0; }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .gk-answer { padding: 1.3rem 1.2rem 1.35rem; }
  .gk-answer__title { font-size: 1.2rem; }
  .gk-head { margin-bottom: 1.8rem; }
  .gk-steps > li { column-gap: 1rem; }
  .gk-pair--compact { padding: 1.15rem 1.1rem 1.2rem; }
  .gk-pair--compact .gk-pair__dont { font-size: 1.12rem; }
  .gk-note { padding-left: 3.1rem; }
  .gk-note::before { left: 0.9rem; }
}
