/* ════════════════════════════════════════════════════════════════════
   PAGES — shared chrome + content for the static info/blog pages.
   Header + footer are pixel-matches of the typing tool home page
   (public/typing.html). Color tokens come from themes.css.
   ════════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text-bright);
  font-family: var(--mono);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange); }
.hidden { display: none !important; }

/* ── TOP BAR (exact typing-tool home header) ── */
#top-bar {
  height: auto;
  min-height: 64px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content minmax(0,1fr);
  align-items: center;
  gap: 8px;
  background: var(--panel-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 10px 16px;
  overflow: visible;
  z-index: 30;
}
html.theme-light #top-bar { border-color: rgba(0,0,0,0.1); }
.tb-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#top-bar .brand {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-bright);
  flex: 0 1 auto;
  white-space: nowrap;
}
#top-bar .brand-cursor {
  display: inline-block;
  width: 2.5px;
  height: 1em;
  margin-left: 3px;
  background: var(--orange);
  vertical-align: -0.12em;
  animation: caret-blink 1.1s infinite steps(1);
}
@keyframes caret-blink { 50% { opacity: 0; } }
#top-bar .brand em { font-style: normal; color: var(--orange); }

#lb-btn,
#theme-btn,
#lessons-btn,
#kw-btn,
#games-btn,
#name-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-mid);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  padding: 7px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
#kw-btn, #games-btn { white-space: nowrap; }
.nav-mid { justify-self: center; display: flex; align-items: center; gap: 8px; }
#mobile-menu-btn { justify-self: end; }
#lb-btn:hover,
#theme-btn:hover,
#lessons-btn:hover,
#kw-btn:hover,
#games-btn:hover,
#name-btn:hover {
  color: var(--text-bright);
  border-color: var(--orange);
  background: rgba(255,106,0,0.12);
}
html.theme-light #lb-btn,
html.theme-light #theme-btn,
html.theme-light #lessons-btn,
html.theme-light #kw-btn,
html.theme-light #games-btn,
html.theme-light #name-btn {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.14);
}

/* ── MAIN CONTENT ── */
main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.page {
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 34px 38px;
}
html.theme-light .page { border-color: rgba(0,0,0,0.12); }

.page h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 18px;
  color: var(--text-bright);
}
.page h1 .accent { color: var(--orange); }
.page h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 26px 0 10px; color: var(--text-bright); }
.page h3 { font-family: var(--display); font-weight: 700; font-size: 16px; margin: 20px 0 8px; color: var(--text-bright); }
.page h4, .page h5, .page h6 { font-family: var(--display); font-weight: 700; font-size: 14px; margin: 18px 0 6px; color: var(--text-bright); }
.page h6 { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.page .accent { color: var(--orange); }
.page p { margin: 10px 0; line-height: 1.7; color: var(--text-mid); }
.page ul, .page ol { margin: 10px 0 10px 22px; line-height: 1.7; color: var(--text-mid); }
.page blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--orange); color: var(--text-mid); background: rgba(255,255,255,0.03); border-radius: 0 8px 8px 0; }
.page code { background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.page pre { margin: 14px 0; padding: 14px 16px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; overflow-x: auto; line-height: 1.6; }
.page pre code { background: none; padding: 0; }
.page table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.page th, .page td { border: 1px solid rgba(255,255,255,0.12); padding: 8px 10px; text-align: left; }
.page th { color: var(--text-bright); }
.page img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
html.theme-light .page th, html.theme-light .page td { border-color: rgba(0,0,0,0.14); }
.page hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 22px 0; }

.muted { color: var(--text-dim); }
.back-link { display: inline-block; margin-bottom: 18px; font-size: 13px; }

/* ── FOOTER (exact typing-tool home footer) ── */
.app-footer {
  flex: 0 0 auto;
  z-index: 20;
  background: var(--panel-bg);
  border-top: 1px solid rgba(255,255,255,0.06);
}
html.theme-light .app-footer { border-color: rgba(0,0,0,0.1); }
.app-footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap;
  max-width: 1280px; margin: 0 auto; padding: 10px 16px;
}
.app-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.app-footer-links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  color: var(--text-mid); text-decoration: none; white-space: nowrap;
  transition: color 0.15s;
}
.app-footer-links a:hover { color: var(--orange); }
.app-footer-copy {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  color: var(--text-dim); white-space: nowrap;
}

/* ── BLOG INDEX (/blog): breadcrumb, topic pills, featured card, grid ── */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 0; font-size: 12px; color: var(--text-dim); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--text-dim); }
.crumbs a { color: var(--text-mid); }
.crumbs a:hover { color: var(--orange); }
.crumbs [aria-current] { color: var(--text-dim); }
.sr, .bc-votes .sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.blog-hero { margin-bottom: 18px; }
.blog-hero h1 { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 4vw, 38px); letter-spacing: 1px; color: var(--text-bright); }
.blog-hero h1 .accent { color: var(--orange); }
.blog-intro { margin-top: 8px; max-width: 680px; color: var(--text-mid); line-height: 1.7; }
.blog-search { margin: 0 0 14px; max-width: 420px; }
.blog-search input { width: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: var(--panel-bg); color: var(--text-bright); font: inherit; font-size: 14px; }
.blog-search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.blog-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.blog-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: .5px; color: var(--text-mid); background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.12); }
.blog-pill .n { font-size: 11px; color: var(--text-dim); }
.blog-pill:hover { color: var(--text-bright); border-color: var(--orange); }
.blog-pill[aria-pressed="true"], .blog-pill[aria-current] { color: #000; background: var(--orange); border-color: var(--orange); }
.blog-pill[aria-pressed="true"] .n, .blog-pill[aria-current] .n { color: rgba(0,0,0,0.65); }
a.blog-pill { text-decoration: none; }
.blog-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 13px; color: var(--text-dim); }
.blog-topic-label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.blog-pill:focus-visible, .vote-btn:focus-visible, .blog-card a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.blog-count { font-size: 12px; color: var(--text-dim); margin: 0 0 14px; }
.blog-featured { margin-bottom: 18px; }
.blog-featured[hidden] { display: none; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.blog-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; transition: border-color .15s, transform .15s; }
.blog-card[hidden] { display: none; }
.blog-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.blog-card .bc-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(255,255,255,0.04); }
.blog-card .bc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card .bc-cover-empty { display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 42px; color: var(--orange);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 10px, transparent 10px 20px); }
.blog-card .bc-cover-empty span { opacity: .6; }
.blog-card .bc-body { display: flex; flex-direction: column; gap: 9px; padding: 16px 18px 18px; flex: 1; }
.bc-meta, .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--text-dim); }
.bc-cat { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--orange); border: 1px solid rgba(255,106,0,0.4); }
.bc-read, .bc-votes span { display: inline-flex; align-items: center; gap: 5px; }
.ic { flex-shrink: 0; }
.blog-card .bc-title { font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.35; }
.blog-card .bc-title a { color: var(--text-bright); }
.blog-card .bc-title a:hover { color: var(--orange); }
.blog-card .bc-excerpt { font-size: 13px; color: var(--text-mid); line-height: 1.6; }
.blog-card .bc-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.blog-card .bc-more { font-size: 13px; font-weight: 600; }
.bc-votes { display: inline-flex; gap: 12px; font-size: 12px; color: var(--text-dim); }
.blog-card.is-featured { flex-direction: row; }
.blog-card.is-featured .bc-cover { flex: 0 0 48%; aspect-ratio: auto; min-height: 260px; }
.blog-card.is-featured .bc-body { padding: 26px 30px; justify-content: center; }
.blog-card.is-featured .bc-title { font-size: clamp(20px, 2.4vw, 28px); }
.blog-card.is-featured .bc-excerpt { font-size: 14px; }
.blog-empty { background: var(--panel-bg); border: 1px dashed rgba(255,255,255,0.16); border-radius: 8px; padding: 40px 20px; text-align: center; color: var(--text-dim); }
.blog-empty[hidden] { display: none; }
html.theme-light .blog-card, html.theme-light .blog-pill, html.theme-light .blog-search input { border-color: rgba(0,0,0,0.14); }
html.theme-light .blog-empty { border-color: rgba(0,0,0,0.2); }
@media (max-width: 980px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: minmax(0, 1fr); }
  .blog-card.is-featured { flex-direction: column; }
  .blog-card.is-featured .bc-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .blog-card.is-featured .bc-body { padding: 16px 18px 18px; }
}

/* ── BLOG POST (title top + TOC + body) ── */
.post-head { margin-bottom: 8px; }
.post-head .back-link { margin-bottom: 14px; }
.post-head .post-meta { margin-bottom: 12px; font-size: 13px; }
.post-title { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 4.5vw, 40px); letter-spacing: .5px; line-height: 1.2; color: var(--text-bright); }
.post-sub { margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--text-mid); max-width: 760px; }

.post-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 30px; align-items: start; }
/* Set by pages.js when a post has no h2/h3, so buildToc() hides #toc. Hiding a
   grid item drops it from the flow and auto-placement would pull .post-body
   into the 220px TOC column, squeezing the article to 220px wide. Collapse to
   one track so the post gets the full row instead. */
.post-layout.no-toc { grid-template-columns: minmax(0,1fr); }
.toc {
  position: sticky;
  top: 96px;
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
}
html.theme-light .toc { border-color: rgba(0,0,0,0.14); }
.toc-title { color: var(--text-dim); letter-spacing: 1px; margin-bottom: 8px; font-size: 11px; }
.toc-list { list-style: none; max-height: 60vh; overflow-y: auto; }
.toc-list li { margin: 2px 0; }
.toc-list a { display: block; color: var(--text-mid); padding: 4px 8px; border-radius: 6px; line-height: 1.4; }
.toc-list a:hover { color: var(--orange); background: var(--orange-glow); }
.toc-list a.level-3 { padding-left: 20px; }
.toc-n { letter-spacing: 0; }
.toc-list a.toc-active { color: var(--orange); background: var(--orange-glow); }

.post-body { min-width: 0; }
.post-body .page { padding: 30px 34px; }
.post-body .page h2 { scroll-margin-top: 90px; }

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--orange);
  z-index: 60;
}

/* ── BLOG POST: tags, cover, answer-first summary, FAQs, further reading ── */
.post-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.post-tags li { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--orange); border: 1px solid rgba(255,106,0,0.35); }
.post-cover { margin: 18px 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.post-cover img { display: block; width: 100%; height: auto; }
.post-summary { margin: 18px 0; padding: 18px 22px; border-radius: 14px; background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.08); border-left: 3px solid var(--orange); }
.post-summary .ps-tldr { margin: 0; line-height: 1.7; color: var(--text-bright); }
.post-summary .ps-tldr strong { font-family: var(--display); font-size: 12px; letter-spacing: 1.5px; color: var(--orange); margin-right: 6px; }
.post-summary .ps-takeaways { margin-top: 12px; }
.page .page-summary { margin: 4px 0 18px; }
.page .page-summary .ps-tldr { margin: 0; color: var(--text-bright); }
.post-summary .ps-tldr + .ps-takeaways { padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.post-summary .ps-tldr strong { font-family: inherit; font-size: inherit; letter-spacing: 0; color: var(--text-bright); }
.post-summary .ps-h { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--text-bright); margin: 0 0 6px; }
.post-summary .ps-h .ic { color: var(--orange); }
.post-summary ul { margin: 0; padding-left: 20px; color: var(--text-mid); line-height: 1.7; }
.post-faqs, .post-further { margin-top: 18px; padding: 24px 30px; border-radius: 16px; background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.08); }
.post-faqs h2, .post-further h2 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 0 0 12px; color: var(--text-bright); }
.post-faqs details { border-top: 1px solid rgba(255,255,255,0.08); padding: 12px 0; }
.post-faqs details:last-child { padding-bottom: 0; }
.post-faqs summary { cursor: pointer; color: var(--text-bright); font-weight: 600; line-height: 1.5; }
.post-faqs summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.post-faqs .faq-a p { margin: 8px 0 0; color: var(--text-mid); line-height: 1.7; }
.post-further ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-further ul { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.post-further li { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); }
.post-further li a { font-weight: 600; line-height: 1.45; }
.post-further li .fr-ex { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.fr-cat { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.post-vote { margin-top: 18px; padding: 22px 30px; border-radius: 16px; background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.08); }
.post-vote h2 { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--text-bright); }
.post-vote p { margin: 6px 0 14px; font-size: 13px; color: var(--text-dim); }
.vote-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.vote-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--text-bright); background: transparent; border: 1px solid rgba(255,255,255,0.16); }
.vote-btn:hover { border-color: var(--orange); }
.vote-btn[aria-pressed="true"] { color: #000; background: var(--orange); border-color: var(--orange); }
.vote-n { min-width: 18px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,0.08); }
.vote-btn[aria-pressed="true"] .vote-n { background: rgba(0,0,0,0.15); }
.post-preview-flag { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 6px; font-size: 11px; letter-spacing: 1.5px; color: #000; background: var(--orange); }
html.theme-light .post-cover, html.theme-light .post-summary, html.theme-light .post-faqs, html.theme-light .post-further,
html.theme-light .post-vote, html.theme-light .post-further li, html.theme-light .vote-btn { border-color: rgba(0,0,0,0.12); }
html.theme-light .post-faqs details, html.theme-light .post-summary .ps-tldr + .ps-takeaways { border-color: rgba(0,0,0,0.1); }

/* ── CMS PAGE SECTIONS + last updated ── */
.page .crumbs ol { margin-bottom: 10px; }
.page-sec { margin-top: 22px; }
.page .page-cta { display: inline-block; margin-top: 4px; padding: 9px 18px; border-radius: 8px; background: var(--orange); color: #000; font-weight: 700; text-decoration: none; }
.page .page-cta:hover, .page .page-cta:focus-visible { filter: brightness(1.08); color: #000; outline: 2px solid var(--text-bright); outline-offset: 2px; }
.page-updated { margin-top: 26px !important; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: var(--text-dim) !important; }
html.theme-light .page-updated { border-color: rgba(0,0,0,0.1); }

/* ── /tools grid ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: var(--bg); color: var(--text-mid); text-decoration: none; transition: border-color .15s, transform .15s; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--orange); transform: translateY(-2px); outline: none; }
.tool-card b { color: var(--text-bright); font-size: 16px; }
.tool-card span { font-size: 13px; line-height: 1.55; }
.tool-icon { font-size: 26px !important; }
.tool-live { position: absolute; top: 14px; right: 14px; font-size: 10px !important; letter-spacing: 1px; text-transform: uppercase; color: #3ddc84; border: 1px solid rgba(61,220,132,0.4); border-radius: 999px; padding: 1px 8px; }
.tool-go { margin-top: auto; color: var(--orange); font-weight: 600; }
html.theme-light .tool-card { border-color: rgba(0,0,0,0.14); }

/* ── /search ── */
.site-search { display: flex; gap: 8px; margin: 10px 0 16px; max-width: 560px; }
.site-search input { flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: var(--bg); color: var(--text-bright); font: inherit; font-size: 14px; }
.site-search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.site-search button { padding: 10px 18px; border: 0; border-radius: 8px; background: var(--orange); color: #000; font: inherit; font-weight: 700; cursor: pointer; }
.search-count { font-size: 13px; color: var(--text-dim) !important; }
.search-results { list-style: none; margin: 10px 0 0 !important; padding: 0; display: grid; gap: 14px; }
.search-results li { padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.search-results a { font-weight: 600; }
.search-results p { margin: 4px 0 0 !important; font-size: 13px; }
.sr-kind { display: inline-block; margin-right: 8px; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
html.theme-light .site-search input { border-color: rgba(0,0,0,0.14); }

/* ── CONTACT FORM (/contact) ── */
.contact-form-wrap { margin-top: 18px; padding: 28px 34px; border-radius: 16px; background: var(--panel-bg); border: 1px solid rgba(255,255,255,0.08); }
.contact-form-wrap h2 { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--text-bright); margin-bottom: 14px; }
.contact-form { display: grid; gap: 12px; max-width: 680px; }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-mid); }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.14); background: var(--bg); color: var(--text-bright); font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; }
.contact-form textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.contact-form [aria-invalid="true"] { border-color: #ff5566; }
.contact-form button { justify-self: start; padding: 11px 22px; border: 0; border-radius: 8px; background: var(--orange); color: #000; font: inherit; font-weight: 700; cursor: pointer; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.contact-form button:focus-visible { outline: 2px solid var(--text-bright); outline-offset: 2px; }
.cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-status { min-height: 1.4em; font-size: 13px; color: var(--text-mid); }
.cf-status.ok { color: #3ddc84; }
.cf-status.err { color: #ff7a88; }
.cf-note { font-size: 12px; color: var(--text-dim); }
html.theme-light .contact-form-wrap, html.theme-light .contact-form input, html.theme-light .contact-form textarea { border-color: rgba(0,0,0,0.14); }
@media (max-width: 700px) { .contact-form-wrap { padding: 22px 18px; } .contact-form .cf-row { grid-template-columns: 1fr; } }

/* ── RESPONSIVE (mirrors typing-home header at ≤820) ── */
@media (max-width: 820px) {
  #top-bar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; min-height: 50px; }
  #kw-btn, #games-btn, #theme-btn, #lessons-btn, #name-btn, .acct-wrap, .nav-mid { display: none; }
  .mobile-only { display: block; }
  #top-bar .brand { font-size: 16px; min-width: 0; }
  main { padding: 20px 14px 44px; }
  .page { padding: 22px 18px; }
  .page h1 { font-size: 23px; }
  .post-layout { grid-template-columns: 1fr; }
  .post-faqs, .post-further, .post-vote { padding: 20px 18px; }
  .toc { position: static; }
  .toc-list { max-height: none; }
  .app-footer-inner { padding: 10px 12px; justify-content: center; }
}