/* The Geeks Club — FLASHCARDS (look.blog = 'flashcards'). Its stories are how-tos, so each one is an index card: a subject tab on top
   (the WordPress section), the question it answers set large in Atkinson Hyperlegible, and how long the lesson takes; the newest is the card
   on top of the deck. One stylesheet for the app's /blog/ and home block (src/lib/ui/sites/thegeeksclub/Flashcards*.svelte) and WordPress's
   own listings and articles (ops/wp/theme/parts/flashcards/). Colours come from the site's tokens (ink, pink, highlighter yellow). */

.fc .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the masthead ---------- */
.fc-mast { display: grid; gap: 10px; margin: 14px 0 22px; }
.fc-mast > .google-auto-placed { width: 100%; }
.fc-kick { justify-self: start; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .82rem; font-weight: 700; }
.fc-mast h1 { margin: 0; font: 700 clamp(2.2rem, 1.6rem + 3vw, 3.6rem)/1.04 var(--font-display); letter-spacing: -.02em; }
.fc-mast--sm h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem); }
.fc-stand { max-width: 62ch; color: var(--muted); font-size: 1.06rem; line-height: 1.55; }
.fc-subjects { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.fc-subjects button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px 10px 4px 4px; background: var(--surface); color: var(--ink); font: 700 .9rem/1 var(--font-text); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); }
.fc-subjects button i { font-style: normal; color: var(--muted); }
.fc-subjects button.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.fc-subjects button.on i { color: var(--accent); }

/* ---------- a card ---------- */
.fc-tab { justify-self: start; padding: 3px 12px 4px; border-radius: 8px 8px 0 0; background: var(--brand); color: var(--brand-ink); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.fc-face { display: grid; gap: 4px; }
.fc-face > small, .fc-a small { font: 700 .9rem/1 var(--font-display); color: var(--brand); }
.fc-q { font: 700 1.12rem/1.32 var(--font-display); color: var(--ink); overflow-wrap: anywhere; text-wrap: pretty; }
.fc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); }
.fc-meta span { font-weight: 700; color: var(--ink); }

/* the card on top of the deck */
.fc-lead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'tab tab' 'pic face'; margin-bottom: 26px; color: var(--ink); }
.fc-lead .fc-tab { grid-area: tab; margin-left: 18px; }
.fc-lead .fc-pic { grid-area: pic; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-lg) 0 0 var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.fc-lead .fc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fc-lead .fc-face { grid-area: face; align-content: center; gap: 10px; padding: 22px 24px; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; background: var(--surface) repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, #3b82f6 18%, transparent) 31px 32px); box-shadow: 0 8px 0 -4px var(--surface-2), 0 16px 0 -8px var(--line); }
.fc-lead:not(:has(.fc-pic)) { grid-template-areas: 'tab tab' 'face face'; }
.fc-lead:not(:has(.fc-pic)) .fc-face { border-radius: var(--radius-lg); }
.fc-lead .fc-q { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.2; }
.fc-a { color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fc-lead:hover .fc-q, .fc-card:hover .fc-q { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 6px; text-underline-offset: -1px; text-decoration-skip-ink: none; }

/* the deck */
.fc-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px 18px; margin: 0; padding: 0; list-style: none; }
.fc-deck--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fc-card { display: grid; grid-template-rows: auto auto 1fr auto; height: 100%; color: var(--ink); }
.fc-card .fc-tab { margin-left: 14px; }
.fc-card .fc-thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-2); }
.fc-card .fc-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fc-card .fc-face { padding: 14px 14px 10px; background: var(--surface); }
.fc-card:not(:has(.fc-thumb)) .fc-face { border-radius: var(--radius) var(--radius) 0 0; }
.fc-card .fc-meta { padding: 0 14px 14px; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.fc-card .fc-face, .fc-card .fc-meta, .fc-card .fc-thumb { box-shadow: 1.5px 0 0 var(--line), -1.5px 0 0 var(--line); }
.fc-card .fc-meta { box-shadow: 1.5px 0 0 var(--line), -1.5px 0 0 var(--line), 0 1.5px 0 var(--line), 0 5px 0 var(--surface-2); }
.fc-card .fc-thumb { box-shadow: 1.5px 0 0 var(--line), -1.5px 0 0 var(--line), 0 -1.5px 0 var(--line); }
.fc-none, .fc-empty { margin: 14px 0 0; padding: 18px; border-radius: var(--radius-lg); background: var(--surface-2); color: var(--muted); text-align: center; }
.fc-none button { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.fc-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin-top: 30px; font-weight: 700; color: var(--muted); }
.fc-pager a, .fc-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border-radius: 10px; color: var(--ink); }
.fc-pager a { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.fc-pager a:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.fc-pager .page-numbers.current { background: var(--brand); color: var(--brand-ink); }
.fc-pager .dots { min-width: 0; padding: 0 2px; }

/* ---------- the home block ---------- */
.fc-home { margin: 34px 0 10px; }
.fc-home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; }
.fc-home-head h2 { margin: 0; font: 700 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.1 var(--font-display); }
.fc-home-head a { font-weight: 700; color: var(--ink); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 2px; }

/* ---------- WordPress: listings and articles ---------- */
.fc-list .fc-wrapbody, .fc-art .fc-wrapbody { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: clamp(26px, 4vw, 46px); align-items: start; margin-top: 8px; }
.fc .fc-wrapbody--full { grid-template-columns: minmax(0, 1fr); }
.fc-list .fc-deck { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fc-art .fc-head { display: grid; gap: 12px; margin: 14px 0 0; }
.fc-art .fc-head > .google-auto-placed { width: 100%; }
.fc-art .fc-head .fc-card-face { display: grid; gap: 10px; padding: 22px 24px; border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg); background: var(--surface) repeating-linear-gradient(180deg, transparent 0 35px, color-mix(in srgb, #3b82f6 16%, transparent) 35px 36px); box-shadow: inset 0 0 0 1.5px var(--line), 0 8px 0 -4px var(--surface-2); }
.fc-art .fc-head .fc-tab { margin: 0; }
.fc-art .fc-head h1 { margin: 0; font: 700 clamp(1.8rem, 1.3rem + 2vw, 2.7rem)/1.14 var(--font-display); text-wrap: balance; }
.fc-art .fc-stand { color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.fc-art .fc-hero { margin: 18px 0 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); }
.fc-art .fc-hero img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.fc-art .fc-hero figcaption { padding: 8px 14px; font-size: .84rem; color: var(--muted); background: var(--surface); }
.fc-art .pdt-paper { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; overflow: clip; overflow-clip-margin: 8px; }
.fc-art .entry-content { font-size: 1.1rem; line-height: 1.75; max-width: 68ch; }
/* a lesson's steps read like study notes: highlighter under each section, numbered steps in pink */
.fc-art .entry-content h2 { margin: 1.9em 0 .6em; font: 700 clamp(1.35rem, 1.15rem + .8vw, 1.8rem)/1.25 var(--font-display); }
.fc-art .entry-content h2 { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent); text-decoration-thickness: .38em; text-underline-offset: -.2em; text-decoration-skip-ink: none; }
.fc-art .entry-content h3 { margin: 1.6em 0 .45em; font: 700 1.2rem/1.3 var(--font-display); }
.fc-art .entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.fc-art .entry-content a:hover { color: var(--brand); }
.fc-art .entry-content ol li::marker { color: var(--brand); font-weight: 700; }
.fc-art .entry-content ul li::marker { color: var(--brand); }
.fc-art .entry-content blockquote { margin: 1.7em 0; padding: 14px 18px; border: 0; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--ink); }
.fc-art .entry-content blockquote p:last-child { margin-bottom: 0; }
.fc-art .entry-content table { font-size: .96rem; }
.fc-art .entry-content th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.fc-art .entry-content img, .fc-art .entry-content figure img { border-radius: var(--radius); }
.fc-art .entry-content code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); font-family: ui-monospace, Menlo, monospace; font-size: .88em; }
.fc-art .entry-content pre { padding: 14px 16px; border-radius: var(--radius); background: var(--ink); color: var(--bg); overflow-x: auto; font-family: ui-monospace, Menlo, monospace; }
.fc-art .entry-content pre code { padding: 0; background: none; color: inherit; }
.fc-art .pdt-comments { margin-top: 34px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.fc-art .pdt-comments h2, .fc-art .pdt-comments .comment-reply-title { margin: 0 0 10px; font: 700 1.3rem/1.25 var(--font-display); background: none; }
.fc-hop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.fc-hop a { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.fc-hop a:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--brand); }
.fc-hop a.nx { grid-column: 2; text-align: right; }
.fc-hop small { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fc-reads { margin-top: 36px; }
.fc-reads h2 { margin: 0 0 14px; font: 700 clamp(1.35rem, 1.1rem + .8vw, 1.8rem)/1.2 var(--font-display); }

/* ---------- the site's sidebar ---------- */
.pdt-side.jr-side .widget { padding: 6px 16px 10px; border: 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.pdt-side.jr-side .widget-title, .pdt-side.jr-side .wp-block-heading, .pdt-side.jr-side .widget > h2 { margin: 10px 0 6px; padding: 0; background: none; color: var(--ink); font: 700 1.05rem/1.3 var(--font-display); }
.pdt-side.jr-side .pdt-latest-list li { padding: 9px 0; border-bottom-color: var(--line); }
.pdt-side.jr-side .pdt-latest-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.pdt-side.jr-side .pdt-latest-list a:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.pdt-side.jr-side .pdt-latest-list img { grid-row: span 2; width: 64px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; display: block; border-radius: 8px; }
.pdt-side.jr-side .pdt-latest-t { font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--ink); }
.pdt-side.jr-side .pdt-latest-d { font-size: .78rem; color: var(--muted); }
.pdt-side.jr-side .ym-latest-posts-widget { --ym-latest-accent: var(--brand); }
.pdt-side.jr-side .ym-sidebar-latest-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; min-block-size: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pdt-side.jr-side .ym-sidebar-latest-card:last-child { border-bottom: 0; }
.pdt-side.jr-side .ym-sidebar-latest-media { aspect-ratio: 16 / 9; border-radius: 8px; }
.pdt-side.jr-side .ym-sidebar-latest-rank { background: var(--brand); color: var(--brand-ink); box-shadow: none; border-radius: 6px; }
.pdt-side.jr-side .ym-sidebar-latest-title { font-weight: 700; font-size: .95rem; color: var(--ink); }
.pdt-side.jr-side .wp-block-latest-posts { margin: 0; padding: 0; list-style: none; }
.pdt-side.jr-side .wp-block-latest-posts li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.pdt-side.jr-side .wp-block-latest-posts a { font-weight: 700; color: var(--ink); }
.pdt-side.jr-side .wp-block-latest-posts__post-date { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); }

/* ---------- narrower screens ---------- */
@media (max-width: 1080px) {
  .fc-list .fc-wrapbody, .fc-art .fc-wrapbody { grid-template-columns: minmax(0, 1fr); }
  .fc .fc-wrapbody > .pdt-side { max-width: 640px; }
  .fc-deck--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .fc-lead { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'tab' 'pic' 'face'; }
  .fc-lead .fc-pic { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .fc-lead .fc-face { border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 18px; }
}
@media (max-width: 560px) {
  .fc-subjects { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .fc-subjects button { flex: none; }
  .fc-deck, .fc-deck--row, .fc-list .fc-deck { grid-template-columns: minmax(0, 1fr); }
  .fc-art .fc-head .fc-card-face { padding: 18px; }
  .fc-art .entry-content { font-size: 1.05rem; }
  .fc-hop { grid-template-columns: minmax(0, 1fr); }
  .fc-hop a.nx { grid-column: 1; }
}
