/* Tools section: index and tool pages. Loaded on top of styles.css. */
.tools-container { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.tools-index, .tool-hero { padding: 7rem 0 2rem; }
.tools-title, .tool-title { font-family: 'Epilogue', sans-serif; font-size: clamp(2rem, 5vw, 2.75rem); color: #2D5F5D; margin: 0.5rem 0 0.25rem; }
.tools-subtitle, .tool-tagline { font-size: 1.15rem; color: #4a5a58; margin: 0 0 1rem; }
.tool-intro { color: #374140; line-height: 1.6; }
.tools-grid { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.tool-card { display: block; padding: 1.5rem; border-radius: 16px; background: #f3f8f7; color: inherit; text-decoration: none; border: 1px solid #d9e7e4; }
.tool-card:hover, .tool-card:focus-visible { border-color: #2D5F5D; }
.tool-card-name { margin: 0 0 0.25rem; color: #2D5F5D; font-family: 'Epilogue', sans-serif; font-size: 1.35rem; }
.tool-card-tagline { margin: 0 0 0.75rem; color: #4a5a58; }
.tool-card-cta { color: #2D5F5D; font-weight: 600; }
.tool-widget { padding: 1rem 0 2rem; }
.tool-content, .tool-faq, .tool-related, .tool-cta { padding: 2rem 0; }
.tools-prose h2, .tool-faq h2, .tool-related h2, .tool-cta h2 { font-family: 'Epilogue', sans-serif; color: #2D5F5D; font-size: 1.5rem; margin: 1.5rem 0 0.75rem; }
.tools-prose p { line-height: 1.7; color: #374140; }
.tool-disclaimer { font-size: 0.9rem; color: #6b7775; }
.tools-prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; } /* same as .static-section a on other content pages */
.tool-faq details { border-bottom: 1px solid #d9e7e4; padding: 0.75rem 0; }
.tool-faq summary { font-weight: 600; cursor: pointer; color: #2D5F5D; }
.tool-related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.tool-related-list a { display: block; padding: 1rem; border-radius: 12px; background: #f3f8f7; text-decoration: none; color: inherit; }
.tool-related-list strong { display: block; color: #2D5F5D; margin-bottom: 0.25rem; }
.tool-cta { text-align: center; background: #f3f8f7; }
.tool-download { list-style: none; padding: 0; margin: 1rem 0; display: flex; gap: 0.75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.tool-download img { height: 40px; width: auto; }
.tool-cta-app-link a { color: #2D5F5D; font-weight: 600; }
/* Contraction timer widget */
.ct { display: grid; gap: 1.5rem; }
.ct-main { text-align: center; }
.ct-toggle { width: min(100%, 320px); min-height: 120px; margin: 0 auto; border: 0; border-radius: 24px; background: #2D5F5D; color: #fff; font-family: 'Epilogue', sans-serif; font-size: 1.35rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; box-shadow: 0 10px 30px rgba(45, 95, 93, 0.25); transition: transform 0.15s, background 0.2s; }
.ct-toggle:active { transform: scale(0.98); }
.ct-toggle--running { background: #b8536b; box-shadow: 0 10px 30px rgba(184, 83, 107, 0.3); }
.ct-toggle-time { font-size: 2.25rem; font-variant-numeric: tabular-nums; }
.ct-breathe { margin: 1.5rem auto 0; }
.ct-breathe-circle { width: 140px; height: 140px; margin: 0 auto 0.75rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8FB9A8, #2D5F5D); animation: ct-breathe 10s ease-in-out infinite; }
@keyframes ct-breathe { 0% { transform: scale(0.7); } 40% { transform: scale(1.15); } 100% { transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .ct-breathe-circle { animation: none; transform: scale(0.95); } }
.ct-breathe-title { margin: 0; font-weight: 600; color: #2D5F5D; }
.ct-breathe-cue { margin: 0.25rem 0 0; font-size: 1.5rem; font-family: 'Epilogue', sans-serif; color: #2D5F5D; }
.ct-bridge { margin: 0 auto; padding: 0.75rem 1rem; border-top: 1px solid rgba(45, 95, 93, 0.12); border-bottom: 1px solid rgba(45, 95, 93, 0.12); text-align: center; }
.ct-bridge-text { margin: 0 0 0.5rem; font-size: 0.9rem; color: #5a6664; }
.ct-download { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.ct-download img { height: 32px; width: auto; }
.ct-summary-title, .ct-history-title { font-family: 'Epilogue', sans-serif; font-size: 1.1rem; color: #2D5F5D; margin: 0 0 0.75rem; }
.ct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 0; }
.ct-stats div { background: #f3f8f7; border-radius: 12px; padding: 0.75rem; text-align: center; }
.ct-stats dt { font-size: 0.8rem; color: #6b7775; }
.ct-stats dd { margin: 0.25rem 0 0; font-size: 1.35rem; font-weight: 700; color: #2D5F5D; font-variant-numeric: tabular-nums; }
.ct-status { margin: 1rem 0 0; padding: 0.75rem 1rem; border-radius: 12px; font-weight: 600; }
.ct-status--observing { background: #eef2f1; color: #374140; }
.ct-status--close { background: #fff4e0; color: #7a4e00; }
.ct-status--met { background: #fde8ec; color: #8a2a44; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.ct-actions-manage { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; } /* keeps Delete last away from Copy summary */
.ct-btn { border: 1px solid #2D5F5D; background: #2D5F5D; color: #fff; border-radius: 999px; padding: 0.6rem 1.1rem; font-weight: 600; cursor: pointer; }
.ct-btn--quiet { background: transparent; color: #2D5F5D; }
.ct-btn:disabled { opacity: 0.45; cursor: default; }
.ct-btn--danger { background: #8a2a44; border-color: #8a2a44; }
.ct-link-btn { border: 0; background: none; padding: 0; color: #2D5F5D; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ct-undo:not(:empty) { margin: 0.75rem 0 0; padding: 0.6rem 1rem; border-radius: 12px; background: #eef2f1; color: #374140; }
.ct-confirm { margin-top: 0.75rem; padding: 0.75rem 1rem; border-radius: 12px; background: #fde8ec; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ct-confirm[hidden] { display: none; }
.ct-confirm p { flex-basis: 100%; margin: 0; font-weight: 600; color: #8a2a44; }
.ct-share-fallback { margin-top: 0.75rem; }
.ct-share-fallback label { display: block; margin-bottom: 0.25rem; color: #374140; }
.ct-share-fallback textarea { width: 100%; box-sizing: border-box; padding: 0.5rem; border: 1px solid #b7cbc7; border-radius: 8px; font: inherit; font-size: 16px; }
.ct-empty { color: #6b7775; }
.ct-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ct-table th, .ct-table td { text-align: left; padding: 0.5rem 0.5rem; border-bottom: 1px solid #d9e7e4; }
.ct-edit { border: 0; background: none; color: #2D5F5D; text-decoration: underline; cursor: pointer; padding: 0; }
.ct-edit-row td { background: #f3f8f7; }
.ct-edit-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ct-edit-form legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; color: #2D5F5D; }
.ct-edit-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.ct-edit-field input { width: 3em; padding: 0.4rem; border: 1px solid #b7cbc7; border-radius: 8px; font: inherit; font-size: 16px; text-align: center; } /* 16px stops iOS zooming in on focus */
.ct-edit-field input[aria-invalid="true"] { border-color: #b8536b; }
.ct-edit-error { margin: 0.5rem 0 0; color: #8a2a44; font-size: 0.9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) { .ct-stats { grid-template-columns: 1fr 1fr; } .ct-stats div:first-child { grid-column: 1 / -1; } }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* The footer's decorative particle layers are absolutely positioned but styles.css never positions the footer,
   so site-wide they anchor to the viewport and a particle floats over the timer button. Contain them here. */
footer { position: relative; overflow: hidden; } /* tools.css loads only on the tools index and tool pages */
/* Forbidden Words widget: TinyParty's "party" theme with the game's purple accent */
.fw, .fw-game { --fw-bg: #150F35; --fw-surface: #1F1850; --fw-border: #352E70; --fw-border-light: #453D85; --fw-text: #F1F0FF; --fw-text-2: #A5A3C0; --fw-accent: #C084FC; --fw-accent-strong: #A961F2; --fw-error: #FF4D6A; }
.fw-noscript { color: #8a2a44; font-weight: 600; }
.fw-setup { background: var(--fw-bg); color: var(--fw-text); border-radius: 24px; padding: 1.5rem 1.25rem; text-align: center; box-shadow: 0 12px 32px rgba(21, 15, 53, 0.25); }
.fw-times { border: 0; margin: 0 0 1.25rem; padding: 0; min-width: 0; }
.fw-label { float: none; width: 100%; padding: 0; margin: 0 0 0.6rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fw-text-2); text-align: center; }
.fw-chips { display: flex; gap: 0.5rem; justify-content: center; }
.fw-chip { position: relative; cursor: pointer; }
.fw-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fw-chip span { display: inline-block; min-width: 4.5rem; padding: 0.55rem 0.9rem; border: 1px solid var(--fw-border-light); border-radius: 999px; color: var(--fw-text-2); font-weight: 600; }
.fw-chip input:checked + span { background: var(--fw-accent); border-color: var(--fw-accent); color: var(--fw-bg); }
.fw-chip input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.fw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid transparent; border-radius: 16px; padding: 0.85rem 1.25rem; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fw-btn svg, .fw-icon-btn svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fw-btn--main { width: 100%; background: var(--fw-accent-strong); color: #fff; font-size: 1.2rem; } /* 19px+ bold counts as large text: white on #A961F2 is 3.7:1 */
.fw-btn--xl { font-size: 1.3rem; padding: 1rem 1.25rem; border-radius: 18px; }
.fw-btn--ghost { background: transparent; color: var(--fw-text-2); }
.fw-btn--caught { background: rgba(255, 77, 106, 0.09); border-color: rgba(255, 77, 106, 0.33); color: var(--fw-error); }
.fw-btn--quiet { background: transparent; border-color: var(--fw-border-light); color: var(--fw-text); }
.fw-btn--danger { background: var(--fw-error); color: #1a0b14; }
.fw-btn:disabled { opacity: 0.4; cursor: default; }
.fw-btn:active:not(:disabled) { transform: scale(0.98); }
.fw-btn:focus-visible, .fw-icon-btn:focus-visible, .fw-text-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fw-setup .fw-btn--main { max-width: 320px; }
.fw-howto { margin: 1rem auto 0; max-width: 32rem; color: var(--fw-text-2); font-size: 0.95rem; line-height: 1.5; }
.fw-deck { margin: 0.5rem 0 0; color: var(--fw-text-2); font-size: 0.8rem; }
/* The round fills the screen; tool-forbidden-words.js moves .fw-game into <body> */
html.fw-locked, html.fw-locked body { overflow: hidden; }
.fw-game { position: fixed; inset: 0; z-index: 1600; background: var(--fw-bg); color: var(--fw-text); overflow-y: auto; overscroll-behavior: contain; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.fw-game[hidden], .fw-game [hidden] { display: none !important; }
.fw-game-inner { box-sizing: border-box; max-width: 480px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(1rem, env(safe-area-inset-bottom)); }
.fw-round, .fw-end { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.fw-hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.25rem 0.25rem 0.75rem; }
.fw-score { display: flex; flex-direction: column; line-height: 1.2; }
.fw-score-label { font-size: 0.85rem; color: var(--fw-text-2); }
.fw-score-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fw-ring { position: relative; width: 72px; height: 72px; }
.fw-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.fw-ring circle { fill: none; stroke-width: 7; }
.fw-ring-track { stroke: var(--fw-border); }
.fw-ring-bar { stroke: var(--fw-accent); stroke-linecap: round; transition: stroke-dashoffset 0.2s linear, stroke 0.3s; }
.fw-ring--warn .fw-ring-bar { stroke: var(--fw-error); }
.fw-ring--paused { opacity: 0.6; }
.fw-ring-time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fw-hdr-end { justify-self: end; }
.fw-icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--fw-text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; }
.fw-icon-btn svg { width: 24px; height: 24px; }
.fw-card { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--fw-surface); border: 1px solid var(--fw-border-light); border-radius: 24px; padding: 1rem 1rem 1.25rem; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
.fw-card--in { animation: fw-card-in 0.18s ease-out; }
@keyframes fw-card-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.fw-word-wrap { flex: 1; display: flex; align-items: center; min-height: 5.5rem; }
.fw-word { width: 100%; margin: 0; font-size: clamp(2.1rem, 10vw, 3rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; text-align: center; overflow-wrap: normal; hyphens: none; }
.fw-divider { height: 1px; background: var(--fw-border-light); margin: 0.5rem 0.5rem 0.9rem; }
.fw-forbidden-title { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0 0 0.5rem; color: var(--fw-error); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.fw-forbidden-icon { display: inline-flex; padding: 5px; border-radius: 50%; background: rgba(255, 77, 106, 0.08); }
.fw-forbidden-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.fw-forbidden { list-style: none; margin: 0; padding: 0; text-align: center; }
.fw-forbidden li { font-size: clamp(1.2rem, 5.5vw, 1.5rem); font-weight: 600; line-height: 1.5; }
.fw-controls { display: grid; gap: 0.5rem; padding-top: 1rem; }
.fw-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.fw-secondary .fw-btn { font-size: 1rem; padding: 0.8rem 0.5rem; }
.fw-confirm { margin-top: 1rem; padding: 1rem; border-radius: 18px; background: rgba(255, 77, 106, 0.1); border: 1px solid rgba(255, 77, 106, 0.33); text-align: center; }
.fw-confirm p { margin: 0 0 0.75rem; font-weight: 600; }
.fw-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.fw-end { align-items: center; text-align: center; padding-top: 2rem; }
.fw-trophy { width: 96px; height: 96px; border-radius: 50%; background: rgba(192, 132, 252, 0.12); display: flex; align-items: center; justify-content: center; color: var(--fw-accent); flex: none; }
.fw-trophy svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fw-end-title { margin: 1.25rem 0 0; font-family: inherit; font-size: 2rem; font-weight: 800; color: var(--fw-text); }
.fw-end-title:focus { outline: none; }
.fw-end-score { margin: 1rem 0 0; font-size: 4rem; line-height: 1; font-weight: 800; color: var(--fw-accent); font-variant-numeric: tabular-nums; }
.fw-end-text { margin: 0.25rem 0 0; font-size: 1.1rem; }
.fw-end-tally { margin: 0.5rem 0 0; color: var(--fw-text-2); font-size: 0.9rem; }
.fw-end-pass { margin: 1.25rem 0 auto; padding-bottom: 1.25rem; color: var(--fw-text-2); }
.fw-bridge { width: 100%; padding: 0.9rem 0.5rem; border-top: 1px solid var(--fw-border); border-bottom: 1px solid var(--fw-border); }
.fw-bridge-text { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--fw-text-2); }
.fw-download { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.fw-download img { display: block; height: 36px; width: auto; }
.fw-end-actions { width: 100%; display: grid; gap: 0.25rem; padding-top: 1rem; }
.fw-text-btn { border: 0; background: none; padding: 0.75rem; color: var(--fw-text-2); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-height: 640px) {
  .fw-ring { width: 60px; height: 60px; }
  .fw-word-wrap { min-height: 4rem; }
  .fw-forbidden { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.5rem; }
  .fw-forbidden li { font-size: 1.1rem; line-height: 1.45; }
  .fw-controls { padding-top: 0.75rem; }
  .fw-btn--xl { padding: 0.8rem 1rem; }
  .fw-end { padding-top: 1rem; }
  .fw-trophy { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) { .fw-card--in { animation: none; } .fw-ring-bar { transition: none; } .fw-btn:active:not(:disabled) { transform: none; } }
/* Numbered rules and example cards in the tool prose */
.tools-prose .tool-steps { margin: 0 0 1rem; padding-left: 1.5rem; color: #374140; line-height: 1.7; }
.tools-prose .tool-steps li { margin: 0.4rem 0; padding-left: 0.25rem; }
.tool-example-cards { list-style: none; margin: 1.25rem 0 0.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.tool-example-card { padding: 1rem 0.75rem; border-radius: 16px; background: #1F1850; border: 1px solid #453D85; color: #F1F0FF; text-align: center; }
.tools-prose .tool-example-word { margin: 0 0 0.5rem; color: #F1F0FF; font-size: 1.15rem; font-weight: 800; line-height: 1.25; }
.tools-prose .tool-example-label { margin: 0 0 0.35rem; color: #FF4D6A; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4; }
.tool-example-card ul { list-style: none; margin: 0; padding: 0; line-height: 1.55; }
/* General Knowledge Quiz widget, in ShowDown's colours. Coral fills use #D93D48 so white bold text keeps 4.4:1. */
.gk, .gk-game { --gk-bg: #1A1A2E; --gk-surface: #16213E; --gk-border: #2A3556; --gk-text: #FFFFFF; --gk-text-2: #B0B0C0; --gk-accent: #FF6B6B; --gk-accent-strong: #D93D48; --gk-success: #2ED573; --gk-error: #FF4757; --gk-error-text: #FF7A85; --gk-display: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.gk-noscript { color: #8a2a44; font-weight: 600; }
.gk-setup { background: radial-gradient(120% 90% at 0% 0%, rgba(140, 46, 98, 0.55), transparent 60%), linear-gradient(160deg, #24193F 0%, var(--gk-bg) 55%, #12142A 100%); color: var(--gk-text); border-radius: 24px; padding: 1.5rem 1.25rem; text-align: center; box-shadow: 0 12px 32px rgba(17, 27, 61, 0.28); }
.gk-facts { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.gk-facts li { padding: 0.35rem 0.8rem; border-radius: 999px; background: rgba(255, 107, 107, 0.14); color: var(--gk-accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.gk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1px solid transparent; border-radius: 16px; padding: 0.85rem 1.25rem; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gk-btn svg, .gk-icon-btn svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gk-btn--main { width: 100%; background: var(--gk-accent-strong); color: #fff; font-size: 1.2rem; box-shadow: 0 6px 18px rgba(217, 61, 72, 0.35); }
.gk-btn--xl { font-size: 1.3rem; padding: 1rem 1.25rem; border-radius: 18px; }
.gk-btn--lifeline { min-width: 6.5rem; background: transparent; border: 2px solid var(--gk-accent); color: var(--gk-accent); font-size: 1.05rem; }
.gk-btn--lifeline.gk-fifty--used { border-color: var(--gk-border); color: var(--gk-text-2); text-decoration: line-through; }
.gk-btn--quiet { background: transparent; border-color: var(--gk-border); color: var(--gk-text); }
.gk-btn--danger { background: var(--gk-error); color: #1a0b14; }
.gk-btn:disabled { opacity: 0.45; cursor: default; }
.gk-btn:active:not(:disabled) { transform: scale(0.98); }
.gk-btn:focus-visible, .gk-icon-btn:focus-visible, .gk-text-btn:focus-visible, .gk-opt:focus-visible, .gk-review-wrap summary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gk-setup .gk-btn--main { max-width: 320px; }
.gk-howto { margin: 1rem auto 0; max-width: 32rem; color: var(--gk-text-2); font-size: 0.95rem; line-height: 1.5; }
/* The quiz fills the screen; tool-general-knowledge-quiz.js moves .gk-game into <body> */
html.gk-locked, html.gk-locked body { overflow: hidden; }
.gk-game { position: fixed; inset: 0; z-index: 1600; background: radial-gradient(90% 45% at 0% 0%, rgba(140, 46, 98, 0.45), transparent 70%), radial-gradient(80% 40% at 100% 70%, rgba(110, 40, 50, 0.3), transparent 70%), linear-gradient(180deg, #24193F 0%, var(--gk-bg) 45%, #120F22 100%); background-attachment: fixed; color: var(--gk-text); overflow-y: auto; overscroll-behavior: contain; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.gk-game[hidden], .gk-game [hidden] { display: none !important; }
.gk-game-inner { box-sizing: border-box; max-width: 520px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; padding: max(1rem, env(safe-area-inset-top)) 1.25rem max(1rem, env(safe-area-inset-bottom)); }
.gk-play, .gk-end { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gk-hdr { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.25rem 0 0.75rem; }
.gk-counter { margin: 0; padding: 0.35rem 0.85rem; border-radius: 999px; background: rgba(255, 107, 107, 0.14); color: var(--gk-accent); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.gk-icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--gk-text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; }
.gk-icon-btn svg { width: 24px; height: 24px; }
.gk-progress { height: 8px; border-radius: 999px; background: var(--gk-border); overflow: hidden; margin-bottom: 1rem; }
.gk-progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--gk-accent); transition: width 0.35s ease; }
.gk-card { position: relative; display: flex; align-items: center; justify-content: center; min-height: 8.5rem; padding: 1.75rem 1.25rem 1.5rem; border-radius: 24px; background: var(--gk-surface); border: 1px solid rgba(255, 107, 107, 0.35); box-shadow: 0 8px 24px rgba(255, 107, 107, 0.12); }
.gk-card--in { animation: gk-card-in 0.2s ease-out; }
@keyframes gk-card-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.gk-card-accent { position: absolute; top: 0.85rem; left: 50%; width: 2.5rem; height: 4px; margin-left: -1.25rem; border-radius: 999px; background: var(--gk-accent); }
.gk-question { margin: 0; font-family: var(--gk-display); font-size: clamp(1.25rem, 5.5vw, 1.6rem); font-weight: 800; line-height: 1.3; text-align: center; overflow-wrap: break-word; }
.gk-question:focus { outline: none; }
.gk-options { display: grid; gap: 0.6rem; margin-top: 1rem; }
.gk-opt { display: flex; align-items: center; gap: 0.85rem; width: 100%; min-height: 3.5rem; padding: 0.55rem 0.9rem 0.55rem 0.55rem; border: 1px solid var(--gk-border); border-radius: 18px; background: var(--gk-surface); color: var(--gk-text); font: inherit; font-size: 1.05rem; font-weight: 600; line-height: 1.3; text-align: left; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: border-color 0.2s, background-color 0.2s, opacity 0.2s; }
.gk-opt:hover:not(:disabled) { border-color: rgba(255, 107, 107, 0.6); }
.gk-opt:disabled { cursor: default; }
.gk-opt-letter { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--gk-accent-strong); color: #fff; font-family: var(--gk-display); font-size: 1.25rem; font-weight: 800; }
.gk-opt--correct { border-color: var(--gk-success); background: #173A35; }
.gk-opt--correct .gk-opt-letter { background: var(--gk-success); color: var(--gk-bg); }
.gk-opt--wrong { border-color: var(--gk-error); background: #3A1E2E; }
.gk-opt--wrong .gk-opt-letter { background: var(--gk-error); color: var(--gk-bg); }
.gk-play .gk-opt:disabled:not(.gk-opt--correct):not(.gk-opt--wrong) { opacity: 0.55; }
.gk-opt.gk-opt--removed { visibility: hidden; }
.gk-controls { margin-top: auto; padding-top: 1rem; }
.gk-feedback { min-height: 1.5em; margin: 0 0 0.6rem; font-weight: 700; text-align: center; }
.gk-feedback--right { color: var(--gk-success); }
.gk-feedback--wrong { color: var(--gk-error-text); }
.gk-actions { display: flex; gap: 0.6rem; }
.gk-actions .gk-btn--main { flex: 1; width: auto; min-width: 0; padding: 0.85rem 1rem; font-size: 1.15rem; white-space: nowrap; }
.gk-actions .gk-btn--lifeline { flex: none; min-width: 0; padding: 0.85rem 0.9rem; }
.gk-confirm { margin-top: auto; padding: 1rem; border-radius: 18px; background: rgba(255, 71, 87, 0.1); border: 1px solid rgba(255, 71, 87, 0.33); text-align: center; }
.gk-confirm p { margin: 0 0 0.75rem; font-weight: 600; }
.gk-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.gk-end { align-items: center; text-align: center; padding-top: 1.5rem; }
.gk-trophy { width: 88px; height: 88px; border-radius: 50%; background: rgba(255, 107, 107, 0.14); display: flex; align-items: center; justify-content: center; color: var(--gk-accent); flex: none; }
.gk-trophy svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gk-end-title { margin: 1rem 0 0; font-family: var(--gk-display); font-size: 1.6rem; font-weight: 800; }
.gk-end-title:focus { outline: none; }
.gk-end-score { margin: 0.5rem 0 0; font-family: var(--gk-display); font-size: 4rem; line-height: 1; font-weight: 800; color: var(--gk-accent); font-variant-numeric: tabular-nums; }
.gk-end-text { margin: 0.35rem 0 0; color: var(--gk-text-2); }
.gk-end-verdict { margin: 0.75rem 0 0; font-size: 1.1rem; font-weight: 600; }
.gk-review-wrap { width: 100%; margin: 1.25rem 0; text-align: left; }
.gk-review-wrap summary { padding: 0.85rem 1rem; border: 1px solid var(--gk-border); border-radius: 14px; background: var(--gk-surface); color: var(--gk-text); font-weight: 700; text-align: center; cursor: pointer; }
.gk-review-wrap[open] summary { border-radius: 14px 14px 0 0; }
.gk-review { list-style: none; margin: 0; padding: 0.25rem 1rem; border: 1px solid var(--gk-border); border-top: 0; border-radius: 0 0 14px 14px; background: rgba(22, 33, 62, 0.6); }
.gk-review-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--gk-border); }
.gk-review-item:last-child { border-bottom: 0; }
.gk-review-mark { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800; color: var(--gk-bg); }
.gk-review-item--right .gk-review-mark { background: var(--gk-success); }
.gk-review-item--wrong .gk-review-mark { background: var(--gk-error); }
.gk-review-q { margin: 0; line-height: 1.4; }
.gk-review-a { margin: 0.25rem 0 0; color: var(--gk-success); font-weight: 700; }
.gk-review-yours { margin: 0.15rem 0 0; color: var(--gk-error-text); font-size: 0.9rem; }
.gk-bridge { width: 100%; padding: 0.9rem 0.5rem; border-top: 1px solid var(--gk-border); border-bottom: 1px solid var(--gk-border); }
.gk-bridge-text { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--gk-text-2); }
.gk-download { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.gk-download img { display: block; height: 36px; width: auto; }
.gk-end-actions { width: 100%; display: grid; gap: 0.25rem; margin-top: auto; padding-top: 1rem; }
.gk-text-btn { border: 0; background: none; padding: 0.75rem; color: var(--gk-text-2); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-height: 640px) {
  .gk-card { min-height: 6.5rem; padding: 1.5rem 1rem 1.1rem; }
  .gk-opt { min-height: 3rem; }
  .gk-opt-letter { width: 2.2rem; height: 2.2rem; font-size: 1.1rem; }
  .gk-end { padding-top: 0.75rem; }
  .gk-trophy { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .gk-card--in { animation: none; } .gk-progress-bar, .gk-opt { transition: none; } .gk-btn:active:not(:disabled) { transform: none; } }
/* Sample quiz questions with answers in the tool prose */
.tool-sample-questions { list-style: none; margin: 1.25rem 0 0.5rem; padding: 0; display: grid; gap: 0.75rem; counter-reset: sample; }
.tool-sample-question { padding: 1rem 1rem 0.9rem; border-radius: 16px; background: #16213E; border: 1px solid #2A3556; color: #FFFFFF; counter-increment: sample; }
.tools-prose .tool-sample-q { margin: 0 0 0.6rem; color: #FFFFFF; font-weight: 700; line-height: 1.4; }
.tools-prose .tool-sample-q::before { content: counter(sample) '. '; color: #FF6B6B; }
.tool-sample-options { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0.35rem 1rem; line-height: 1.4; }
.tool-sample-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin-right: 0.35rem; border-radius: 7px; background: #2A3556; color: #FFFFFF; font-size: 0.8rem; font-weight: 800; }
.tool-sample-correct { color: #2ED573; font-weight: 700; }
.tool-sample-correct .tool-sample-letter { background: #2ED573; color: #1A1A2E; }
.tools-prose .tool-sample-answer { margin: 0.6rem 0 0; color: #B0B0C0; font-size: 0.95rem; line-height: 1.5; }
.tools-prose .tool-sample-answer strong { color: #FFFFFF; }
