/*
 * Minesweeper Arcade — Visual Polish, 2026-10-30
 * Presentation-only layer. Does NOT style mine cells, board logic, API UI states,
 * full-screen mechanics, classic Windows controls or submission/verification.
 * Keep this stylesheet after the other page stylesheets.
 */
:root {
  --polish-edge: color-mix(in srgb, var(--blue) 15%, var(--line-soft));
  --polish-edge-hover: color-mix(in srgb, var(--blue) 45%, var(--line-soft));
  --polish-glow: 0 18px 50px rgba(0, 6, 19, .16);
  --polish-radius: 18px;
}

/* One precise, shared content grid: header, content and footer. */
body { -webkit-font-smoothing: antialiased; }
.site-main,
.header-inner { width: 100%; max-width: 1200px; }
.site-main { padding-right: 28px; padding-left: 28px; padding-bottom: 72px; }
.site-header {
  height: 74px;
  border-bottom-color: color-mix(in srgb, var(--blue) 14%, var(--line-soft));
  box-shadow: 0 1px 0 rgba(255,255,255,.025);
}
.theme-light .site-header { border-bottom-color: rgba(30,72,122,.10); }
.header-inner { gap: 22px; }
.brand { min-width: 0; }
.brand-copy strong { letter-spacing: .07em; }
.brand-copy small { letter-spacing: .27em; }
.primary-nav { gap: 2px; border-radius: 13px; }
.primary-nav > a,
.primary-nav > .nav-dropdown > summary {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  letter-spacing: -.005em;
}
.primary-nav > a:hover,
.primary-nav > a.is-active,
.primary-nav > .nav-dropdown > summary:hover,
.primary-nav > .nav-dropdown.is-active > summary {
  border-color: color-mix(in srgb, var(--blue) 22%, transparent);
  background: color-mix(in srgb, var(--blue) 10%, var(--panel));
  color: var(--text);
}
.nav-dropdown-menu,
.language-menu { border-color: var(--polish-edge); box-shadow: 0 20px 48px rgba(0,0,0,.24); }
.nav-dropdown-menu a,
.language-menu a { border-radius: 9px; }
.nav-dropdown-menu a:hover,
.language-menu a:hover { background: var(--panel-3); }

/* Hero hierarchy: confident titles, calmer introductory copy, less wasted space. */
.page-hero { padding-top: 43px; padding-bottom: 26px; }
.page-hero.compact-hero { padding-top: 39px; padding-bottom: 25px; }
.home-page-hero { padding-top: 27px; padding-bottom: 18px; }
.page-hero h1 {
  max-width: 970px;
  margin-top: 11px;
  margin-bottom: 12px;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.page-hero p {
  max-width: 800px;
  margin-top: 0;
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}
.eyebrow,
.eyebrow-small { letter-spacing: .105em; }

/* The game itself stays classic; its surrounding surface is more deliberate. */
.game-card {
  border-color: var(--polish-edge);
  border-radius: 20px;
  box-shadow: 0 25px 58px rgba(0, 6, 18, .26), 0 0 0 1px rgba(255,255,255,.018);
}
.theme-light .game-card {
  box-shadow: 0 17px 47px rgba(40,70,110,.14), 0 0 0 1px rgba(255,255,255,.5);
}

/* Small, consistent spacing scale across the editorial sections. */
.content-section { margin-top: 46px; margin-bottom: 46px; }
.section-heading { gap: 18px; margin-bottom: 19px; }
.section-heading h2 {
  max-width: 850px;
  font-size: clamp(23px, 2.35vw, 30px);
  line-height: 1.21;
  letter-spacing: -.033em;
  text-wrap: balance;
}
.section-heading p:not(.eyebrow-small) { max-width: 770px; font-size: 14px; line-height: 1.7; }
.section-heading > .button { white-space: nowrap; }
.copy-section h2 { letter-spacing: -.025em; }
.copy-section p,
.copy-section li { line-height: 1.8; }
.text-content a:not(.button):not(.guide-card) { text-underline-offset: 3px; }

/* Buttons, hover and keyboard focus form a single interaction language. */
.button:not(.game-console-top .button),
.page-share-button {
  border-radius: 11px;
  font-weight: 750;
  letter-spacing: .005em;
}
.button-primary {
  box-shadow: 0 6px 17px rgba(35,116,213,.22), inset 0 1px rgba(255,255,255,.17);
}
.button:hover:not(:disabled),
.page-share-button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled),
.page-share-button:active:not(:disabled) { transform: translateY(0); }
:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Player statistics: a polished but compact section below the board. */
.feature-grid { gap: 16px; }
.feature-card {
  border-color: var(--polish-edge);
  border-radius: var(--polish-radius);
  box-shadow: var(--polish-glow);
}
.feature-grid-single .player-card { width: 100%; }
.best-times { justify-content: space-between; gap: 18px; }
.best-times > div { min-width: 0; }
.best-times strong { font-variant-numeric: tabular-nums; }

/* Leaderboards: crisp rows, hierarchy and comfortable hit targets. */
.leaderboard-panel {
  border: 1px solid var(--polish-edge);
  border-radius: var(--polish-radius);
  box-shadow: var(--polish-glow);
}
.leaderboard-filters { gap: 12px; }
.leaderboard-row { transition: background-color .14s ease; }
.leaderboard-row:hover { background: color-mix(in srgb, var(--blue) 7%, transparent); }
.leaderboard-table-head { letter-spacing: .08em; }
.leaderboard-time,
.leaderboard-moves { font-variant-numeric: tabular-nums; }
.leaderboard-rules-card {
  border-color: var(--polish-edge);
  border-radius: var(--polish-radius);
  box-shadow: var(--polish-glow);
}

/* Guide index and article cards share the same premium surface. */
.guide-grid { gap: 16px; }
.guide-card,
.guide-library-card {
  border-color: var(--polish-edge);
  border-radius: var(--polish-radius);
  box-shadow: 0 8px 24px rgba(0,6,17,.11);
}
.guide-card:hover,
.guide-library-card:hover {
  border-color: var(--polish-edge-hover);
  box-shadow: 0 17px 33px rgba(0,6,17,.17);
  transform: translateY(-2px);
}
.guide-card h2,
.guide-card h3 { line-height: 1.34; text-wrap: balance; }
.guide-card p { line-height: 1.7; }
.guide-read { text-underline-offset: 3px; }

/* FAQ: clear separators and a more tactile disclosure indicator. */
.faq-list { border-color: var(--polish-edge); border-radius: var(--polish-radius); }
.faq-item { border-color: var(--polish-edge); border-radius: 13px; }
.faq-item summary { min-height: 55px; line-height: 1.45; }
.faq-item summary:hover { color: var(--blue); }
.faq-item[open] { border-color: var(--polish-edge-hover); }
.faq-item p { line-height: 1.75; }

/* Long-form guides keep readable typography instead of expanding line length. */
.article-header { max-width: 880px; }
.article-header h1 { font-size: clamp(34px, 3.8vw, 47px); line-height: 1.16; text-wrap: balance; }
.article-intro { max-width: 820px; line-height: 1.7; }
.article-copy { border-color: var(--polish-edge); border-radius: var(--polish-radius); }
.article-copy .copy-section h2 { text-wrap: balance; }
.article-copy .copy-section p,
.article-copy .copy-section li { line-height: 1.83; }
.sidebar-card { border-color: var(--polish-edge); border-radius: 14px; }
.article-cta,
.embed-promo { border-color: var(--polish-edge); border-radius: var(--polish-radius); }

/* Sharing remains secondary to playing; no oversized social widgets. */
.page-share {
  gap: 17px;
  margin-top: 25px;
  margin-bottom: 38px;
  padding: 16px 18px;
  border-color: var(--polish-edge);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,6,19,.10);
}
.page-share-actions { gap: 7px; }
.page-share-button { min-height: 39px; }
.page-share-button:hover { border-color: var(--polish-edge-hover); }

/* Footer links, not a row of loud cards. All content aligns with the header. */
.site-footer {
  padding: 29px max(28px, calc((100vw - 1144px) / 2)) 23px;
  border-top-color: var(--polish-edge);
}
.footer-nav { gap: 30px; padding-bottom: 23px; }
.footer-nav-group {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.footer-nav-group h2 {
  margin-bottom: 11px;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
}
.footer-nav-group ul { gap: 6px 18px; }
.footer-nav-group a { display: inline-block; padding: 3px 0; line-height: 1.5; }
.footer-nav-group a:hover { color: var(--blue); }
.footer-bottom { gap: 14px; padding-top: 18px; font-size: 11px; }

/* Compact navigation sooner than its desktop labels start to feel cramped. */
@media (max-width: 1080px) {
  .header-inner { gap: 12px; }
  .primary-nav { gap: 1px; }
  .primary-nav > a,
  .primary-nav > .nav-dropdown > summary { min-height: 38px; }
}
@media (max-width: 900px) {
  .header-inner, .site-main { padding-left: 21px; padding-right: 21px; }
  .content-section { margin-top: 38px; margin-bottom: 38px; }
  .section-heading { align-items: flex-start; }
  .article-header { max-width: 100%; }
  .site-footer { padding-right: 21px; padding-left: 21px; }
}
@media (max-width: 680px) {
  /* Keep the existing mobile game dimensions, toolbar and hamburger behaviour. */
  .site-header { height: 64px; }
  .header-inner, .site-main { padding-left: 14px; padding-right: 14px; }
  .header-inner { gap: 6px; }
  .primary-nav {
    left: 12px;
    right: 12px;
    border-color: var(--polish-edge);
    border-radius: 15px;
    box-shadow: 0 22px 45px rgba(0,5,16,.32);
  }
  .primary-nav > a,
  .primary-nav > .nav-dropdown > summary { justify-content: flex-start; min-height: 43px; }
  .page-hero,
  .page-hero.compact-hero { padding-top: 25px; padding-bottom: 17px; }
  .home-page-hero { padding-top: 16px; padding-bottom: 8px; }
  .page-hero h1 { font-size: clamp(30px, 8.2vw, 38px); line-height: 1.13; letter-spacing: -.04em; margin-bottom: 9px; }
  .page-hero p { font-size: 13px; line-height: 1.6; }
  .game-card { border-radius: 15px; }
  .content-section { margin-top: 32px; margin-bottom: 32px; }
  .section-heading { gap: 11px; margin-bottom: 14px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading p:not(.eyebrow-small) { font-size: 13px; }
  .guide-grid { gap: 11px; }
  .guide-card { padding: 16px; }
  .leaderboard-panel { border-radius: 14px; }
  .leaderboard-table-head { letter-spacing: .045em; }
  .faq-list { gap: 9px; padding: 8px; }
  .faq-item summary { min-height: 51px; }
  .article-header h1 { font-size: clamp(30px, 8vw, 36px); }
  .article-copy .copy-section p,
  .article-copy .copy-section li { line-height: 1.76; }
  .page-share { padding: 14px; gap: 12px; border-radius: 14px; }
  .page-share-actions { justify-content: flex-start; }
  .page-share-button { min-height: 40px; }
  .footer-nav { gap: 23px; }
  .site-footer { padding: 25px 15px 21px; }
}
@media (max-width: 400px) {
  .header-inner { padding-left: 10px; padding-right: 10px; }
  .site-main { padding-left: 11px; padding-right: 11px; }
  .page-hero h1 { font-size: 30px; }
  .section-heading h2 { font-size: 21px; }
  .footer-nav { gap: 18px; }
  .footer-nav-group ul { gap: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .leaderboard-row, .guide-card, .guide-library-card,
  .button, .page-share-button { transition: none !important; }
  .guide-card:hover, .guide-library-card:hover,
  .button:hover, .page-share-button:hover { transform: none !important; }
}

/* 2026-10-30: compact, responsive editorial discovery cards beneath page content. */
.seo-editorial-links{margin-top:36px;margin-bottom:38px}
.seo-editorial-links .section-heading{margin-bottom:14px}
.seo-editorial-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.seo-editorial-card{display:flex;flex-direction:column;justify-content:flex-start;gap:7px;min-width:0;padding:18px 19px;border:1px solid var(--line-soft);border-radius:16px;background:var(--panel);transition:transform .16s,border-color .16s,background-color .16s}
.seo-editorial-card:hover{border-color:var(--blue);background:var(--panel-2);transform:translateY(-2px)}
.seo-editorial-card:focus-visible{outline:3px solid var(--cyan);outline-offset:3px}
.seo-editorial-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;color:var(--text);font-size:15px;font-weight:800;line-height:1.35}
.seo-editorial-title span{flex:none;color:var(--blue)}
.seo-editorial-description{color:var(--muted);font-size:12px;line-height:1.7}
@media(max-width:760px){.seo-editorial-grid{grid-template-columns:1fr;gap:9px}.seo-editorial-card{padding:15px 16px}.seo-editorial-title{font-size:14px}}
@media(prefers-reduced-motion:reduce){.seo-editorial-card{transition:none}.seo-editorial-card:hover{transform:none}}

/* Score dialog: hidden controls must stay hidden even when button/label display rules apply. */
.score-dialog [hidden] { display:none !important; }
