/* grade-key.css (website idea 6, 17 Nov 2026): one mark for each grade word of the book.
   .gk-  the marks and the meaning that opens in place, on the pages of the book online (assets/grade-key.js)
   .gkx- the page how-sure.html (scripts/build-grade-key.py)
   The marks are drawn in the colour of the text around them, so they follow the light and the dark theme by themselves:
   proven a filled dot, very probable a filled dot at a lighter tone, probable a ring, possible a hollow diamond,
   conflicting a half-filled dot, his recollection only a dotted ring. Shape and fill carry the grade, not colour alone. */

.gk-i { display: inline-block; position: relative; flex: none; width: 0.72em; height: 0.72em; margin-right: 0.38em; vertical-align: 0.02em; box-sizing: border-box; border-radius: 50%; color: inherit; font-style: normal; }
.gk-p { background: currentColor; }
.gk-v { background: currentColor; opacity: 0.6; }
.gk-b { border: 0.14em solid currentColor; }
.gk-s { border: 0.14em solid currentColor; border-radius: 0; width: 0.62em; height: 0.62em; transform: rotate(45deg); margin-left: 0.06em; margin-right: 0.46em; }
.gk-c { border: 0.14em solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.gk-r { border: 0.14em dotted currentColor; }
.gk-n { width: 0.6em; height: 0.14em; border-radius: 0; background: currentColor; opacity: 0.6; vertical-align: 0.3em; }

/* a grade word with its mark, on a page of the book */
button.gk-mark { all: unset; display: inline; cursor: pointer; color: inherit; font: inherit; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 0.18em; border-radius: 3px; }
button.gk-mark:hover { text-decoration-style: solid; }
button.gk-mark[aria-expanded="true"] { text-decoration-style: solid; text-decoration-thickness: 2px; }
/* The site-wide rule "body.cine-typography *:focus-visible" sets a pale gilt ring with !important; on light pages it is
   under 3:1. This ring takes the colour of the text around the word, so it is readable wherever the word is. */
body button.gk-mark:focus-visible, html body button.gk-close:focus-visible, html body .gk-pop a:focus-visible { outline: 2px solid currentColor !important; outline-offset: 2px !important; box-shadow: none !important; }

.gk-pop { display: block; margin: 0.5rem 0 0.6rem; padding: 0.7rem 0.9rem 0.75rem; border: 1px solid currentColor; border-left-width: 4px; border-radius: 6px; font-size: 0.95rem; line-height: 1.5; font-style: normal; font-weight: 400; text-align: left; max-width: 40rem; }
.gk-pop:focus { outline: none; }
.gk-pop .gk-def { display: block; margin: 0; }
.gk-pop .gk-from { display: block; margin: 0.45rem 0 0; font-size: 0.86rem; opacity: 0.85; }
.gk-pop .gk-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; margin: 0.55rem 0 0; }
.gk-pop a { color: inherit; font-weight: 600; text-decoration: underline; }
button.gk-close { all: unset; cursor: pointer; font: inherit; font-size: 0.88rem; padding: 0.25rem 0.8rem; border: 1px solid currentColor; border-radius: 999px; }
tr.gk-poprow > td { padding-top: 0; }
/* in a table that scrolls sideways the meaning stays in view at the left edge */
tr.gk-poprow .gk-pop { position: sticky; left: 0.4rem; box-sizing: border-box; width: min(40rem, calc(100vw - 3rem)); max-width: none; }
@media print { .gk-pop, tr.gk-poprow { display: none !important; } button.gk-mark { text-decoration: none; } }

/* ---------- how-sure.html ---------- */
.gkx-main { --gkx-line: #d9c9a3; --gkx-surface: #fffdf7; --gkx-soft: #5a4f3c; --gkx-gold: #8a6420; }
html.theme-dark .gkx-main { --gkx-line: #46556e; --gkx-surface: #1f2e45; --gkx-soft: #c9d2e0; --gkx-gold: #d8b366; }
.gkx-lead { max-width: 46rem; font-size: 1.05rem; }
.gkx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; max-width: 62rem; margin: 1.1rem 0 1rem; }
.gkx-card { display: flex; gap: 0.2rem; align-items: baseline; padding: 0.95rem 1.1rem 1rem; border: 1px solid var(--gkx-line); border-radius: 8px; background: var(--gkx-surface); }
.gkx-card > .gk-i { font-size: 1.25rem; margin-right: 0.55rem; }
.gkx-card p { margin: 0; line-height: 1.55; }
.gkx-card b { font-size: 1.08rem; }
.gkx-card:target { outline: 2px solid var(--gkx-gold); outline-offset: 2px; }
.gkx-rest { max-width: 54rem; }
.gkx-restlead { font-family: var(--font-sans, system-ui, sans-serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gkx-gold); margin-right: 0.3rem; }
.gkx-extras, .gkx-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; margin: 0.4rem 0 0.8rem; font-size: 0.95rem; }
.gkx-extras span, .gkx-legend span { white-space: nowrap; }
.gkx-src { max-width: 54rem; font-size: 0.92rem; color: var(--gkx-soft); }
.gkx-qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; max-width: 62rem; margin: 1.1rem 0 1rem; }
.gkx-q { padding: 0.95rem 1.1rem 1rem; border: 1px solid var(--gkx-line); border-radius: 8px; background: var(--gkx-surface); }
.gkx-q h3 { margin: 0.25rem 0 0.4rem; font-size: 1.12rem; }
.gkx-q p { margin: 0 0 0.5rem; line-height: 1.55; }
.gkx-chip { font-family: var(--font-sans, system-ui, sans-serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gkx-gold); }
.gkx-go { margin: 0.5rem 0 0; }
.gkx-go a { font-weight: 600; }
.gkx-block { max-width: 62rem; margin: 1.2rem 0 0; padding: 1rem 1.1rem 1.05rem; border: 1px solid var(--gkx-line); border-radius: 8px; background: var(--gkx-surface); }
.gkx-block h3 { margin: 0 0 0.45rem; font-size: 1.12rem; }
.gkx-block p { margin: 0 0 0.6rem; }
.gkx-strip { display: flex; flex-wrap: wrap; gap: 0.5rem 0.3rem; align-items: center; font-size: 1.05rem; line-height: 1; }
.gkx-u { display: inline-flex; align-items: center; gap: 0.12rem; padding: 0.2rem 0.3rem; border-radius: 4px; }
.gkx-u + .gkx-u { border-left: 1px solid var(--gkx-line); border-radius: 0; }
.gkx-strip .gk-i { margin-right: 0.16em; }
.gkx-strip .gk-s { margin-right: 0.26em; }
.gkx-hint { font-size: 0.9rem; color: var(--gkx-soft); margin: 0.35rem 0 0.6rem; }
.gkx-h4 { margin: 1rem 0 0.4rem; font-family: var(--font-sans, system-ui, sans-serif); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gkx-gold); }
.gkx-chapters { list-style: none; margin: 0; padding: 0; }
.gkx-chapters li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: center; padding: 0.55rem 0; border-top: 1px solid var(--gkx-line); }
.gkx-chapters .gkx-ch { font-weight: 600; }
.gkx-chapters .gkx-n { grid-column: 2; font-size: 0.9rem; color: var(--gkx-soft); }
.gkx-chapters a { grid-column: 3; grid-row: 1 / span 2; font-size: 0.92rem; white-space: nowrap; }
.gkx-pages { max-width: 46rem; padding-left: 1.2rem; }
.gkx-pages li { margin: 0.2rem 0; }
@media (max-width: 720px) {
  .gkx-cards, .gkx-qs { grid-template-columns: minmax(0, 1fr); }
  .gkx-chapters li { grid-template-columns: minmax(0, 1fr); }
  .gkx-chapters .gkx-n, .gkx-chapters a { grid-column: 1; grid-row: auto; }
  .gkx-chapters a { white-space: normal; }
}
