:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --green: #047857;
  --green-light: #ecfdf5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: #f8fafc;
  color: var(--ink);
  font: 17px/1.8 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
a, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #34d399;
  outline-offset: 4px;
}
[hidden] { display: none !important; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
.container { width: 100%; max-width: 980px; margin: auto; padding: 0 32px; }
.hero { padding: 32px 0 44px; text-align: center; }
h1 { max-width: 850px; margin: 0 auto 22px; font-size: clamp(36px, 5vw, 54px); line-height: 1.14; letter-spacing: -1.8px; font-weight: 750; text-wrap: balance; }
.hero-description { max-width: 700px; margin: 0 auto; font-size: 18px; color: var(--muted); line-height: 1.8; text-wrap: pretty; }
.hero-description strong { color: var(--ink); font-weight: 650; }
.section-label { font-weight: 650; }
.panel > .section-label { color: var(--ink); font-size: 20px; margin-bottom: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-title .section-label { font-size: 22px; letter-spacing: -.5px; }
.count { font-size: 13px; color: #64748b; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.answer-card { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-label { color: #64748b; font-size: 13px; font-weight: 650; letter-spacing: 1px; }
.answer-status { font-size: 13px; color: var(--green); background: var(--green-light); padding: 3px 9px; border-radius: 5px; }
.word { display: flex; gap: 8px; margin: 26px 0 20px; font: 650 28px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.word span { display: grid; place-items: center; width: 50px; height: 54px; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; }
.answer-card > p:not(.word) { color: var(--muted); font-size: 16px; flex: 1; margin-bottom: 24px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #f1f5f9; font-size: 14px; }
.card-bottom > a { font-weight: 600; text-decoration: none; }
.card-bottom > a:hover { text-decoration: underline; }
.copy-button { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); font-size: 13px; }
.copy-button:hover { background: #f8fafc; }
.copy-button svg { width: 14px; height: 14px; }
.answer-tip { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; color: #64748b; font-size: 14px; }
.answer-tip svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 5px; }
.reading-layout { margin: 38px 0 60px; }
.reading-main { min-width: 0; }
.panel { margin-bottom: 24px; padding: 32px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.panel h2 { font-size: 24px; line-height: 1.4; letter-spacing: -.5px; margin-bottom: 16px; }
.panel h3 { font-size: 18px; line-height: 1.5; margin: 24px 0 10px; }
.panel p { color: var(--muted); font-size: 16px; }
.panel p + p { margin-top: 16px; }
.table-wrap { margin-top: 22px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; line-height: 1.7; }
thead th { background: #f8fafc; color: #64748b; font-size: 13px; font-weight: 600; padding: 14px 16px; }
td { padding: 18px 16px; vertical-align: top; border-top: 1px solid var(--line); color: var(--muted); }
td:first-child { width: 45%; }
td:nth-child(2) { width: 15%; }
td strong { color: var(--ink); font-family: ui-monospace, Consolas, monospace; font-size: 15px; }
td a { font-size: 14px; }
.panel .after-table { margin-top: 22px; }
.letter-table { text-align: center; }
.letter-table th, .letter-table td { width: auto; }
.letter-table tbody th { border-top: 1px solid var(--line); font-size: 15px; padding: 16px; }
.letter-table td { font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.explanation { display: flex; align-items: flex-start; gap: 18px; padding: 24px 0; border-bottom: 1px solid #f1f5f9; }
.explanation:last-child { border-bottom: 0; padding-bottom: 0; }
.number { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 6px; background: #f1f5f9; color: #64748b; font: 600 13px ui-monospace, Consolas, monospace; }
.explanation h3 { margin: 0 0 10px; }
.explanation h3 span { margin-left: 10px; font-size: 14px; font-weight: 400; color: #64748b; }
.panel .pattern-note { color: var(--green); font-size: 15px; }
code { padding: 3px 6px; background: #f1f5f9; border-radius: 4px; color: #334155; font: 500 14px ui-monospace, Consolas, monospace; }
.faq details { border-bottom: 1px solid #f1f5f9; }
.faq details:last-child { border-bottom: 0; }
.faq summary { position: relative; list-style: none; padding: 18px 30px 18px 0; cursor: pointer; font-size: 16px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 3px; top: 13px; font-size: 24px; font-weight: 400; color: #64748b; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 24px 20px 0; }
.source-panel { padding: 8px 4px; }
.source-panel .section-label { font-size: 16px; margin-bottom: 12px; }
.source-panel p { color: #64748b; font-size: 14px; line-height: 1.8; margin-bottom: 12px; }
.skip-link { position: fixed; left: 12px; top: 8px; z-index: 10; padding: 8px 14px; background: var(--green); color: white; border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 680px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 24px 0 32px; }
  h1 { font-size: 38px; letter-spacing: -1.2px; }
  .hero-description { font-size: 17px; }
  .answer-grid { grid-template-columns: 1fr; gap: 16px; }
  .answer-card { padding: 24px; }
  .panel { padding: 24px 20px; }
  .panel h2 { font-size: 22px; }
  table:not(.letter-table) { min-width: 650px; }
  .letter-table th, .letter-table td { padding: 12px 8px; }
  .explanation { gap: 12px; }
  .explanation h3 span { display: block; margin: 4px 0 0; }
  .reading-layout { margin-top: 28px; }
}
@media (max-width: 360px) {
  .word { gap: 5px; }
  .word span { width: 42px; height: 48px; }
  h1 { font-size: 34px; }
  .section-title .section-label { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
