/* Gist: a dictionary page. Cream paper, black ink, an oxblood rule (light); a lamp-lit study (dark). */
:root {
  --bg: #F4EEE2; --paper: #FBF8F1; --ink: #1D1A16; --mute: #776C5E; --line: #DED3C1; --ox: #8C2F39; --ox-l: #F1DADA;
  --t5: #2F7D4F; --t4: #C0392B; --t3: #D9822B; --t2: #C9A227; --t1: #7C9BB8; --t0: #B5AC9E;
  --serif: "Crimson Pro", Georgia, serif; --ui: "IBM Plex Sans", system-ui, sans-serif;
  --h-bg: var(--bg); --h-panel: var(--paper); --h-panel2: var(--bg); --h-line: var(--line); --h-text: var(--ink); --h-muted: var(--mute);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #17140F; --paper: #221E17; --ink: #F1EADC; --mute: #A89C88; --line: #3A3326; --ox: #D96C74; --ox-l: #3A2224;
  --t5: #5FBF85; --t4: #F0705F; --t3: #F0A050; --t2: #E5C451; --t1: #8FB0CF; --t0: #6E6656;
  --h-bg: var(--bg); --h-panel: var(--paper); --h-panel2: var(--bg); --h-line: var(--line); --h-text: var(--ink); --h-muted: var(--mute); --h-on: #17140F;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui); line-height: 1.45; min-height: 100vh; min-height: 100dvh; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ox); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }

.hbar { border-bottom: 2px solid var(--ox); padding-bottom: 10px; }
.hbrand .logo { font-family: var(--serif); font-weight: 650; font-size: 34px; letter-spacing: -.01em; gap: 0; }
.hbrand .logo .dot { color: var(--ox); font-style: normal; }
.hbrand .logo i.lit { color: var(--ox); }
.dayline { color: var(--mute); font-size: .95rem; margin: 10px 0 12px; }

/* the board: best closeness so far, and a heat bar */
.board { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 12px; }
.kicker { margin: 0 0 8px; color: var(--mute); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.clue { font: 650 clamp(2.3rem, 11vw, 3.3rem)/1.05 var(--serif); text-align: center; margin: 2px 0 0; overflow-wrap: anywhere; letter-spacing: -.01em; }
.clue.long { font-size: clamp(1.7rem, 8vw, 3.3rem); }
.pos { margin: 2px 0 0; text-align: center; font-family: var(--serif); font-style: italic; color: var(--ox); font-size: 1.05rem; }
.hsum .sumdef { margin: 4px 0 10px; max-width: 34em; font-family: var(--serif); color: var(--mute); font-size: 1rem; }
.hsum .sumdef b { color: var(--ink); font-weight: 650; }
.hsum .sumdef i { color: var(--ox); }
.dlg p.src { font-size: .8rem; border-top: 1px solid var(--line); padding-top: 10px; }
.syn { font-size: .78rem; font-weight: 700; color: var(--t5); }
.syn.sm { display: block; font-size: .7rem; margin-top: 2px; }
.best { margin-top: 12px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; align-items: end; text-align: center; }
.best b { display: block; font: 600 2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.bestnum b { font-size: 2.7rem; color: var(--ox); }
.best span { font-size: .72rem; color: var(--mute); text-transform: uppercase; letter-spacing: .1em; }
.heat { height: 8px; border-radius: 99px; background: var(--bg); margin-top: 12px; overflow: hidden; border: 1px solid var(--line); }
.heat i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--t0); transition: width .6s var(--h-ease), background .4s; }
.heat i.t1 { background: var(--t1); } .heat i.t2 { background: var(--t2); } .heat i.t3 { background: var(--t3); } .heat i.t4 { background: var(--t4); } .heat i.t5 { background: var(--t5); }

/* guessing */
.guess { display: flex; gap: 8px; margin: 14px 0 0; }
.guess input { flex: 1; min-width: 0; height: 52px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); padding: 0 14px; font-size: 1.15rem; font-family: var(--serif); }
.guess input:focus { outline: none; border-color: var(--ox); }
.guess button { height: 52px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 800; cursor: pointer; transition: transform .2s var(--h-spring); }
.guess button:active { transform: scale(.95); }
.guess.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.msg { min-height: 1.3em; margin: 6px 2px 0; color: var(--ox); font-size: .9rem; }
.last { margin: 4px 0 6px; }
.tools { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 8px 0 12px; }
.tool { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 8px 6px; font-weight: 700; font-size: .85rem; cursor: pointer; }
.tool small { display: block; font-weight: 500; color: var(--mute); font-size: .72rem; }
.tool.ghost { background: transparent; color: var(--mute); }
.tool:disabled { opacity: .45; cursor: default; }

/* the guess list */
.list { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-variant-numeric: tabular-nums; }
.list th { text-align: left; font-size: .7rem; color: var(--mute); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: 0 8px 2px; }
.list td { background: var(--paper); padding: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.list td:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; color: var(--mute); font-size: .8rem; width: 2.6em; }
.list td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; width: 42%; }
.list td.w { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.list td.c { font-weight: 800; width: 4.2em; }
.list tr.hint td.n { color: var(--ox); font-weight: 700; }
.list tr.fresh td { border-color: var(--ink); }
.list tr.fresh { animation: hUp .35s var(--h-ease) both; }
.list.one { border-spacing: 0; }
.m { white-space: nowrap; }
.bar { display: inline-block; width: calc(100% - 3.6em); height: 8px; border-radius: 99px; background: var(--bg); vertical-align: middle; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--t1); }
.rk { display: inline-block; width: 3.4em; text-align: right; font-size: .8rem; font-weight: 700; color: var(--mute); }
.far { font-size: .78rem; color: var(--mute); }
.found { font-weight: 800; color: var(--t5); }
tr.t2 .bar i { background: var(--t2); } tr.t3 .bar i { background: var(--t3); } tr.t4 .bar i { background: var(--t4); }
tr.t3 td.c { color: var(--t3); } tr.t4 td.c { color: var(--t4); } tr.t5 td.c, tr.t5 td.w { color: var(--t5); }
tr.t0 td.c { color: var(--mute); }
@media (max-width: 420px) { .list td.w { font-size: .95rem; } .list td:last-child { width: 34%; } .list td { padding: 7px 6px; } .rk { width: 3em; } .bar { width: calc(100% - 3.2em); } }

/* end card */
.hsum { margin: 14px 0 0; }
.hsum .secret { font: 650 clamp(2.6rem, 12vw, 3.6rem)/1.05 var(--serif); margin: 8px 0 2px; color: var(--ox); overflow-wrap: anywhere; }
.hsum .secret.long { font-size: clamp(1.7rem, 8vw, 3.6rem); }
.near { margin: 10px 0 0; color: var(--mute); font-size: .9rem; }
.near .lbl { font-weight: 700; color: var(--ink); }
.toplist { columns: 2; column-gap: 2.4em; padding-left: 1.6em; margin: 0; font-size: .92rem; }
@media (max-width: 420px) { .toplist { columns: 1; } }
.toplist li { break-inside: avoid; padding: 1px 0; }
.toplist li b { color: var(--mute); font-weight: 600; margin-left: 6px; font-size: .8rem; }
.toplist li.got span { color: var(--t5); font-weight: 700; }

/* ads + footer + dialogs */
.ad-inline { margin-top: 26px; }
.ad-slot { display: block; margin: 0 auto; overflow: hidden; }
.ad-banner { width: 100%; max-width: 728px; min-height: 100px; }
.ad-slot.placeholder { border: 1.5px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--mute); font-size: .85rem; }
.ad-slot.placeholder::before { content: "Ad space " attr(data-size); }
.ad-slot.collapsed { min-height: 0; }
.ad-slot ins[data-ad-status="unfilled"] { display: none !important; }
.ad-label { font-size: 11px; color: var(--mute); text-align: center; margin: 0 0 4px; }
.foot { display: flex; justify-content: center; gap: 22px; padding: 26px 0 40px; color: var(--mute); font-size: .9rem; }
.dlg { border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(440px, calc(100vw - 32px)); max-height: 85vh; background: var(--paper); color: var(--ink); }
.dlg::backdrop { background: rgba(20, 15, 10, .5); }
.dlg h2 { font-family: var(--serif); font-weight: 650; margin: 0 0 10px; font-size: 1.6rem; }
.dlg p { color: var(--mute); }
.dlg p b { color: var(--ink); }
.dlg .x { position: absolute; right: 8px; top: 6px; border: 0; background: transparent; font-size: 26px; cursor: pointer; color: var(--mute); width: 44px; height: 44px; touch-action: manipulation; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; background: var(--bg); border-radius: 12px; padding: 10px; }
.stats dt { color: var(--mute); font-size: .82rem; }
.stats dd { margin: 0; font: 600 1.5rem/1.2 var(--serif); }
@media (prefers-reduced-motion: reduce) { .guess.shake, .list tr.fresh { animation: none; } .heat i, .guess button { transition: none; } }
/* "not in the nearest 1,000" may wrap on phones so the guess list never scrolls sideways */
@media (max-width: 420px) { .m .far, .m .found, .m .syn { white-space: normal; } .list td.w { white-space: normal; overflow-wrap: anywhere; } }
/* long guesses (whispering, incoherent) stay whole on phones: smaller type and a narrower header */
@media (max-width: 420px) { .list th { letter-spacing: .03em; font-size: .62rem; padding: 0 4px 2px; } .list td.w.long { font-size: .84rem; } .list td.w.xlong { font-size: .74rem; } }

/* mobile pass: a long dialog scrolls, and its × rides along at the top instead of scrolling away (the form that holds
   it sticks and takes no room); the × is 44px. Same pattern as kit.css. */
.dlg > form:first-child { position: sticky; top: 16px; z-index: 2; height: 0; margin: 0; }
.dlg > form:first-child .x { top: -16px; right: -16px; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); }
.dlg { overscroll-behavior: contain; }
/* mobile pass: no double-tap zoom on buttons; the header icons shrink to 30-34px on phones, so widen what a finger
   hits without moving anything; no hover colour stuck on an icon after a tap */
button { touch-action: manipulation; }
.hicons .hicon { position: relative; }
.hicons .hicon::after { content: ""; position: absolute; inset: -6px -2px; }
@media (hover: none) { .hicon:hover { background: var(--h-panel); } }
.lede{font-style:italic;opacity:.82;line-height:1.55}

/* EB Garamond for the word games (user's choice, 2026-11-22): SIL OFL, fonts/OFL-eb-garamond.txt */
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-style: normal; font-display: swap; src: url(../fonts/eb-garamond-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-style: italic; font-display: swap; src: url(../fonts/eb-garamond-latin-wght-italic.woff2) format("woff2"); }
:root { --serif: "EB Garamond", Garamond, Georgia, serif; --ui: "EB Garamond", Garamond, Georgia, serif; }
