﻿:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #0f766e;
  --accent-light: #ccfbf1;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --radius: 8px;
  --radius-lg: 12px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-900); background: var(--gray-50); line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.nav { background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: .4rem; }
.nav-logo:hover { text-decoration: none; color: var(--primary); }
.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a { display: block; padding: .4rem .8rem; border-radius: var(--radius); font-size: .9rem; font-weight: 500; color: var(--gray-700); transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }
.hero { padding: 4rem 0 3rem; text-align: center; background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%); }
.hero-compact { padding: 2.5rem 0; }
.hero h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.25; margin-bottom: .5rem; color: var(--gray-900); }
.hero p { font-size: 1.05rem; color: var(--gray-700); max-width: 600px; margin: 0 auto 1.5rem; }

/* Hero inline analysis */
.hero-input-area { max-width: 640px; margin: 0 auto; }
.hero-textarea { width: 100%; min-height: 110px; padding: .9rem 1rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg); font-size: .95rem; font-family: inherit; line-height: 1.6; resize: vertical; transition: border-color .15s; background: var(--white); }
.hero-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.hero-chars { text-align: right; font-size: .8rem; color: var(--gray-400); margin: .25rem 0 .75rem; }
.hero-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hero-results { max-width: 640px; margin: 0 auto; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.hero-results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.hr-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: .75rem; text-align: center; }
.hr-card .hr-val { display: block; font-size: 1.4rem; font-weight: 800; color: var(--primary); line-height: 1.3; }
.hr-card .hr-lbl { display: block; font-size: .78rem; color: var(--gray-500); margin-top: .15rem; }
.hr-readability { border-left: 4px solid var(--primary); }
.hr-freq { margin-top: .75rem; font-size: .85rem; color: var(--gray-500); text-align: left; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: .75rem 1rem; }
.hr-freq strong { color: var(--gray-700); }

/* Example buttons */
.hero-examples { max-width: 640px; margin: 0 auto 1rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.example-btn { font-size: .78rem; color: var(--gray-500); background: var(--white); border: 1px solid var(--gray-200); border-radius: 100px; padding: .25rem .65rem; cursor: pointer; transition: all .15s; }
.example-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

/* Tool category tabs */
.tool-tabs { display: flex; gap: .5rem; justify-content: center; padding-top: 2rem; flex-wrap: wrap; }
.tab-btn { padding: .5rem 1.25rem; border: 1px solid var(--gray-200); background: var(--white); border-radius: 100px; font-size: .9rem; font-weight: 500; color: var(--gray-600); cursor: pointer; transition: all .2s; }
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; padding: 1.5rem 0; }
.tool-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.75rem; transition: box-shadow .2s, transform .2s; }
.tool-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.5rem; }
.tool-card h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.tool-card p { font-size: .9rem; color: var(--gray-500); margin-bottom: 1rem; line-height: 1.5; }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.2rem; font-size: .9rem; font-weight: 600; border: none; border-radius: var(--radius); cursor: pointer; transition: background .15s, box-shadow .15s; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.tool-page { padding: 2.5rem 0 4rem; }
.tool-page-header { margin-bottom: 2rem; text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.tool-page-header h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .5rem; }
.tool-page-header p { color: var(--gray-500); font-size: .95rem; max-width: 620px; margin-left: auto; margin-right: auto; }
.tool-area { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2.5rem; }
.tool-page-footer { padding: 0 2rem; margin-bottom: 3rem; color: var(--gray-700); line-height: 1.8; }
.tool-page-footer h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .75rem; }
.tool-page-footer p { color: var(--gray-500); font-size: .95rem; }
.tool-page-footer ul, .tool-page-footer ol { line-height: 1.8; color: var(--gray-700); margin: 1rem 0 1rem 1.5rem; }
.tool-page-footer .related-links { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--gray-200); }
.tool-page-footer .related-links h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--gray-900); }
.tool-page-footer .related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .85rem; }
.tool-page-footer .related-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: .75rem 1rem; transition: box-shadow .2s; position: relative; }
.tool-page-footer .related-card:hover { box-shadow: var(--shadow-md); }
.tool-page-footer .related-card a { color: var(--gray-900); text-decoration: none; font-size: .88rem; font-weight: 600; display: block; }
.tool-page-footer .related-card a::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.tool-page-footer .related-card a:hover { color: var(--primary); }
.tool-page-footer .related-card .rc-meta { font-size: .75rem; color: var(--gray-400); margin-top: .2rem; font-weight: 400; }
.tool-textarea { width: 100%; min-height: 260px; padding: 1rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: .95rem; font-family: inherit; line-height: 1.7; resize: vertical; transition: border-color .15s; }
.tool-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.tool-actions { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.stat-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-card .stat-label { font-size: .8rem; color: var(--gray-500); margin-top: .25rem; }
.readability-result { margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--radius); background: var(--gray-50); border: 1px solid var(--gray-200); display: none; }
.readability-result.show { display: block; }
.readability-score { font-size: 3rem; font-weight: 800; text-align: center; line-height: 1.2; }
.readability-label { text-align: center; font-size: 1.1rem; font-weight: 600; margin-top: .25rem; }
.readability-desc { text-align: center; color: var(--gray-500); font-size: .9rem; margin-top: .5rem; }
.readability-details { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.blog-section { padding: 3rem 0; }
.blog-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; transition: box-shadow .2s; cursor: pointer; position: relative; }
.blog-card:hover { box-shadow: var(--shadow-md); }
.blog-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.blog-card h3 a { color: var(--gray-900); text-decoration: none; }
.blog-card h3 a::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.blog-card .meta { font-size: .8rem; color: var(--gray-500); margin-bottom: .75rem; }
.blog-card p { font-size: .9rem; color: var(--gray-500); line-height: 1.5; }
.footer { background: var(--white); border-top: 1px solid var(--gray-200); padding: 2rem 0; text-align: center; font-size: .85rem; color: var(--gray-500); }

/* ── Blog Article Content Styles ── */

/* Base styles — applies to about, privacy, and other content pages */
.blog-article { max-width: 780px; margin: 2rem auto; padding: 0 1rem; }
.blog-article h1 { font-size: 2rem; font-weight: 700; margin-bottom: .5rem; color: #0f172a; letter-spacing: -.02em; }
.blog-article h2 { font-size: 1.35rem; font-weight: 650; margin: 2.5rem 0 .65rem; padding-left: .85rem; border-left: 4px solid #2563eb; color: #0f172a; line-height: 1.3; }
.blog-article h3 { font-size: 1.1rem; font-weight: 600; margin: 1.75rem 0 .5rem; color: #1e293b; }
.blog-article p { font-size: 1rem; line-height: 1.8; margin-bottom: 1rem; color: #334155; }
.blog-article a { color: #2563eb; font-weight: 500; }
.blog-article ul, .blog-article ol { line-height: 1.8; color: #334155; margin: 1rem 0 1rem 1.5rem; font-size: .95rem; }
.blog-article li { margin-bottom: .4rem; }

/* Enhanced styles — applies to blog posts in blog-content wrapper */
.blog-content .blog-article { max-width: 100%; margin: 0; color: var(--gray-800); }

.blog-content .blog-article h1 { font-size: 2.4rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; margin-bottom: .35rem; color: #0f172a; }

.blog-content .blog-article .meta { color: var(--gray-400); font-size: .85rem; margin-bottom: 2rem; letter-spacing: .01em; font-style: italic; }

.blog-content .blog-article h2 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; margin: 3.5rem 0 .85rem; padding: 0 0 .35rem 1rem; border-left: 4px solid var(--primary); color: #0f172a; line-height: 1.3; position: relative; }
.blog-content .blog-article h2::before { content: ''; position: absolute; left: 0; top: .35rem; bottom: .35rem; width: 4px; background: var(--primary); border-radius: 2px; }

.blog-content .blog-article h3 { font-size: 1.15rem; font-weight: 600; margin: 2.25rem 0 .5rem; color: #1e293b; letter-spacing: -.005em; }

.blog-content .blog-article p { font-size: 1.06rem; line-height: 1.85; margin-bottom: 1.1rem; color: #334155; max-width: 680px; }

.blog-content .blog-article a { color: var(--primary); text-decoration: none; font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .15s, color .15s; }
.blog-content .blog-article a:hover { border-bottom-color: var(--primary); color: #1d4ed8; }
.blog-content .blog-article a.btn { border-bottom: none; }
.blog-content .blog-article a.btn-primary,
.blog-content .blog-article a.btn-primary:hover { color: #fff; }

/* Force white text on all primary buttons — must come after .blog-article a */
.blog-article a.btn-primary,
.blog-article a.btn-primary:hover,
a.btn-primary { color: #fff; }
a.btn-primary:hover { color: #fff; }

.blog-content .blog-article ul, 
.blog-content .blog-article ol { line-height: 1.85; color: #334155; margin: 1rem 0 1rem 1.5rem; font-size: 1.03rem; }
.blog-content .blog-article li { margin-bottom: .45rem; }
.blog-content .blog-article li::marker { color: var(--primary); }

.blog-content .blog-article strong { color: #0f172a; font-weight: 600; }

.blog-content .blog-article blockquote { margin: 1.75rem 0; padding: 1.1rem 1.5rem; border-left: 4px solid var(--primary); background: #f8fafc; border-radius: 0 var(--radius) var(--radius) 0; color: #475569; font-style: italic; font-size: 1.05rem; line-height: 1.7; }

.blog-content .blog-article .cta-box { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe; border-radius: 16px; padding: 2rem 2.25rem; margin: 2.5rem 0; text-align: center; }
.blog-content .blog-article .cta-box h3 { font-size: 1.2rem; margin: 0 0 .5rem; color: #0f172a; }
.blog-content .blog-article .cta-box p { font-size: .95rem; margin: 0 0 1.25rem; color: #475569; max-width: 100%; }

.blog-content .blog-article .example-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: .85rem 1.15rem; margin: 1rem 0; font-size: .95rem; line-height: 1.7; color: #334155; }
.blog-content .blog-article .example-box strong { color: #15803d; }

.blog-content .blog-article .highlight-box { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border-radius: 14px; padding: 1.35rem 1.5rem; margin: 1.75rem 0; border: none; box-shadow: 0 1px 3px rgba(0,0,0,.04), inset 0 0 0 1px #86efac; }
.blog-content .blog-article .highlight-box h3 { margin: 0 0 .5rem; font-size: 1rem; color: #15803d; }
.blog-content .blog-article .highlight-box ul { margin-bottom: 0; }
.blog-content .blog-article .highlight-box li { margin-bottom: .3rem; }

.blog-content .blog-article .section-divider { height: 1px; background: linear-gradient(to right, transparent, var(--gray-200), transparent); margin: 2.5rem 0; border: none; }

.blog-content .blog-article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.5rem 0; font-size: .92rem; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.blog-content .blog-article th, 
.blog-content .blog-article td { border: 1px solid #e2e8f0; padding: .75rem .95rem; text-align: left; }
.blog-content .blog-article th { background: #2563eb; color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .03em; text-transform: uppercase; }
.blog-content .blog-article tr:nth-child(even) td { background: #f8fafc; }
.blog-content .blog-article td { color: #334155; }
.blog-content .blog-article tr:hover td { background: #eff6ff; }

.blog-content .blog-article .freq-bar { display: inline-block; height: 14px; border-radius: 4px; vertical-align: middle; min-width: 4px; }

@media (max-width: 640px) {
  .blog-content .blog-article h1 { font-size: 1.65rem; }
  .blog-content .blog-article h2 { font-size: 1.2rem; margin: 2.5rem 0 .65rem; padding-left: .75rem; }
  .blog-content .blog-article p { font-size: .97rem; }
  .blog-content .blog-article table { font-size: .8rem; }
  .blog-content .blog-article th, .blog-article td { padding: .5rem .6rem; }
  .blog-content .blog-article .cta-box { padding: 1.25rem 1.25rem; }
}

/* Sticky TOC layout for long-form blog posts */
.blog-layout { display: flex; gap: 2.5rem; max-width: 1120px; margin: 2rem auto; padding: 0 1rem; }
.toc-sidebar { width: 210px; flex-shrink: 0; position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow-y: auto; }
.toc-sidebar-inner { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem 1rem; }
.toc-sidebar .toc-label { font-size: .75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .85rem; padding-left: .5rem; }
.toc-sidebar a { display: block; font-size: .82rem; color: var(--gray-500); padding: .4rem .5rem .4rem .5rem; text-decoration: none; border-radius: var(--radius); transition: all .15s; line-height: 1.4; font-weight: 400; }
.toc-sidebar a:hover { background: var(--white); color: var(--gray-900); }
.toc-sidebar a.active { background: var(--white); color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.blog-content { flex: 1; min-width: 0; }
.blog-content .blog-article { max-width: 100%; margin: 0; }
@media (max-width: 900px) {
  .toc-sidebar { display: none; position: static; width: 100%; max-height: none; margin-bottom: 1.5rem; }
  .blog-layout { display: block; }
  .blog-content .blog-article { max-width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero-compact { padding: 1.5rem 0; }
  .hero h1 { font-size: 1.35rem; }
  .hero p { font-size: .9rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-area { padding: 1rem; }
  .tool-page { padding: 1.5rem 0 2rem; }
  .tool-page-header h1 { font-size: 1.35rem; }
  .tool-page-header p { font-size: .88rem; }
  .container { padding: 0 1rem; }
  .footer { padding: 1.25rem 0; font-size: .8rem; }
  .blog-section { padding: 2rem 0; }
  .blog-card { padding: 1.25rem; }
  .blog-card p { font-size: .85rem; }
  .tab-btn { font-size: .82rem; padding: .4rem .85rem; }
  .btn-sm { font-size: .82rem; padding: .4rem .85rem; }
  .hero-results-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { gap: .4rem; }
  .hero-actions .btn { font-size: .82rem; padding: .45rem .85rem; }
  .hero-textarea { min-height: 90px; font-size: .9rem; }
}

/* Dropdown nav */
.nav-dropdown { position: relative; }
.dropdown-trigger { display: flex; align-items: center; gap: 2px; cursor: pointer; }
.dropdown-arrow { transition: transform .2s; }
.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-md);
  min-width: 200px; padding: .5rem; z-index: 200; list-style: none;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: .5rem .75rem; border-radius: 6px; font-size: .85rem; white-space: nowrap; }
.dropdown-menu a:hover { background: var(--gray-100); }
.dropdown-menu a.active { background: var(--primary-light); color: var(--primary); }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 4px;
  flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--gray-700); border-radius: 2px; transition: all .2s; }

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-200); padding: .5rem 1rem; box-shadow: var(--shadow); }
  .nav-links.show { display: flex; }
  .nav-links a { padding: .6rem .8rem; }
  .nav-toggle { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; min-width: auto; }
  .nav-dropdown.open .dropdown-menu { display: block; }
}


.wq-key-enter { background:#e8e8e8; font-weight:800; letter-spacing:.5px; }
.wq-key-del { background:#e8e8e8; }

/* ============================================
   Word Quest - Game Styles
   ============================================ */
.wq-page { max-width: 560px; margin: 0 auto; }
.wq-header { text-align:center; margin-bottom:1rem; }
.wq-header h1 { font-size:1.6rem; font-weight:800; letter-spacing:-.5px; color:var(--gray-900); margin-bottom:.25rem; }
.wq-header p { font-size:.85rem; color:var(--gray-500); margin-bottom:0; }

.wq-stats {
  display:flex; gap:.5rem; margin-bottom:1.25rem; justify-content:center;
}
.wq-stat {
  flex:1; background:#fff; border:1px solid var(--gray-200); border-radius:10px;
  padding:.4rem .25rem; text-align:center; box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:transform .15s;
}
.wq-stat:hover { transform:translateY(-1px); }
.wq-stat-icon { font-size:1rem; line-height:1; margin-bottom:.15rem; }
.wq-stat-val { font-size:1.15rem; font-weight:800; line-height:1.2; }
.wq-stat-label { font-size:.65rem; color:var(--gray-500); text-transform:uppercase; letter-spacing:.5px; }
.wq-stat-silver .wq-stat-val { color:var(--gray-700); }
.wq-stat-green .wq-stat-val { color:#059669; }
.wq-stat-blue .wq-stat-val { color:#2563eb; }
.wq-stat-amber .wq-stat-val { color:#d97706; }
.wq-stat-purple .wq-stat-val { color:#7c3aed; }

.wq-game { display:flex; flex-direction:column; align-items:center; }
.wq-board { display:flex; flex-direction:column; gap:5px; margin-bottom:1.25rem; align-items:center; }
.wq-row { display:flex; gap:5px; }
.wq-cell {
  width:58px; height:58px; border:2px solid #d3d6da; display:flex;
  align-items:center; justify-content:center; font-size:1.5rem; font-weight:700;
  text-transform:uppercase; border-radius:6px; background:#fff;
  transition:transform .1s, background .3s, border .3s;
}
.wq-cell-correct { background:#6aaa64; border-color:#6aaa64; color:#fff; }
.wq-cell-present { background:#c9b458; border-color:#c9b458; color:#fff; }
.wq-cell-absent { background:#787c7e; border-color:#787c7e; color:#fff; }
@keyframes wqFlip {
  0% { transform:rotateX(0); }
  50% { transform:rotateX(-90deg); }
  100% { transform:rotateX(0); }
}

.wq-message {
  text-align:center; font-size:.95rem; font-weight:600; min-height:1.5rem;
  margin-bottom:.75rem; color:var(--gray-700);
}
.wq-word-num { text-align:center; font-size:.75rem; color:var(--gray-400); margin-bottom:.35rem; }

.wq-kb { width:100%; max-width:480px; }
.wq-kb-row { display:flex; gap:4px; justify-content:center; margin-bottom:4px; }
.wq-key {
  height:50px; min-width:30px; padding:0 5px; border:none; border-radius:5px;
  background:#d3d6da; font-size:.75rem; font-weight:700; cursor:pointer;
  display:flex; align-items:center; justify-content:center; text-transform:uppercase;
  transition:background .15s, transform .1s; flex:1; max-width:40px;
}
.wq-key:hover { background:#bbb; transform:scale(1.04); }
.wq-key:active { transform:scale(.95); }
.wq-key-wide { flex:1.5; max-width:58px; font-size:.65rem; }
.wq-key-correct { background:#6aaa64; color:#fff; }
.wq-key-correct:hover { background:#5a9a58; }
.wq-key-present { background:#c9b458; color:#fff; }
.wq-key-present:hover { background:#b9a448; }
.wq-key-absent { background:#787c7e; color:#fff; }
.wq-key-absent:hover { background:#686c6e; }

.wq-actions { display:flex; gap:.5rem; justify-content:center; margin-bottom:1rem; }
.wq-next-btn { display:none; }

.wq-legend { display:flex; gap:.75rem; flex-wrap:wrap; margin:1rem 0; }
.wq-legend-item { display:flex; align-items:center; gap:.35rem; }
.wq-legend-swatch { width:28px; height:28px; border-radius:5px; flex-shrink:0; }
.wq-legend-text { font-size:.85rem; color:var(--gray-600); }

.wq-rules { margin-top:1rem; }
.wq-rules h2 { font-size:1.1rem; font-weight:700; margin-bottom:.75rem; }
.wq-rules p { font-size:.85rem; color:var(--gray-600); line-height:1.6; margin-bottom:.5rem; }
.wq-rules strong { color:var(--gray-800); }

@media (max-width:480px) {
  .wq-cell { width:50px; height:50px; font-size:1.3rem; }
  .wq-key { height:44px; min-width:26px; font-size:.7rem; max-width:34px; }
  .wq-key-wide { max-width:48px; font-size:.6rem; }
  .wq-stat { padding:.3rem .15rem; }
  .wq-stat-val { font-size:1rem; }
}
@media (max-width:360px) {
  .wq-cell { width:44px; height:44px; font-size:1.1rem; }
  .wq-key { height:40px; min-width:22px; font-size:.65rem; max-width:30px; }
  .wq-key-wide { max-width:42px; }
}

/* ---- Newsletter Subscription ---- */
.subscribe-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
  margin: 2rem 0;
}
.subscribe-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .5rem;
  color: #fff;
}
.subscribe-section p {
  font-size: .95rem;
  color: rgba(255,255,255,.75);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.subscribe-form {
  display: flex;
  gap: .5rem;
  max-width: 420px;
  margin: 0 auto;
  justify-content: center;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: .7rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
}
.subscribe-form button {
  padding: .7rem 1.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.subscribe-form button:hover { background: var(--primary-dark, #2563eb); }
.subscribe-form button:active { transform: scale(.97); }
.subscribe-small {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-top: .75rem;
}
.subscribe-small a { color: rgba(255,255,255,.7); text-decoration: underline; }
@media (max-width:480px) {
  .subscribe-form { flex-direction: column; align-items: stretch; }
}
.ml-success {
  text-align: center;
  padding: .5rem 1rem;
  font-size: .95rem;
}
