:root {
  --bg: #fbf6ee;
  --paper: #fffaf2;
  --ink: #1d1a16;
  --muted: #625b52;
  --line: #e4d8c8;
  --accent: #a84c24;
  --accent-dark: #783314;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
a { color: inherit; }
.seo-header, .seo-footer { max-width: 1120px; margin: 0 auto; padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.seo-header { border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.seo-header nav, .seo-footer nav { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; font-size: 0.92rem; color: var(--muted); }
.seo-header a, .seo-footer a { text-decoration: none; }
.seo-header a:hover, .seo-footer a:hover { color: var(--accent); }
.seo-hero { max-width: 960px; margin: 0 auto; padding: 76px 20px 42px; }
.eyebrow, .mini-label { color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
h1 { font-family: Georgia, serif; font-size: clamp(2.4rem, 7vw, 4.8rem); line-height: 0.98; letter-spacing: 0; margin: 10px 0 18px; max-width: 900px; }
h2 { font-family: Georgia, serif; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: 0; margin: 0 0 12px; }
.answer { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 750; cursor: pointer; font: inherit; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: transparent; color: var(--ink); }
.date-line { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }
.content-wrap, .tool-panel { max-width: 960px; margin: 0 auto; padding: 0 20px 54px; }
.content-section, .related-links, .faq-section, .tool-panel { border-top: 1px solid var(--line); padding-top: 30px; margin-top: 30px; }
.content-section p, .content-section li, .faq-section p { color: var(--muted); font-size: 1.02rem; }
ul { padding-left: 1.2rem; }
li + li { margin-top: 6px; }
.seo-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.seo-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.seo-table th, .seo-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.seo-table th { font-size: 0.83rem; color: var(--accent-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.seo-table tr:last-child td { border-bottom: 0; }
.related-links div { display: flex; flex-wrap: wrap; gap: 10px; }
.related-links a { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; text-decoration: none; background: var(--paper); }
details { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--paper); }
details + details { margin-top: 10px; }
summary { font-weight: 750; cursor: pointer; }
.tool-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.tool-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.level-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.level-pills span { width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); font-weight: 800; color: var(--accent-dark); }
.tool-workbench, .tool-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 18px; }
.tool-input span, .select-row span { display: block; font-weight: 750; margin-bottom: 6px; }
textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; color: var(--ink); font: inherit; }
.tool-result { display: grid; gap: 12px; align-content: start; }
.level-card, .tool-output, .anki-card, .reading-sample { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: #fff; }
.level-card strong { display: block; font-size: 3rem; line-height: 1; margin: 8px 0; font-family: Georgia, serif; }
.tool-output { min-height: 120px; color: var(--muted); white-space: pre-wrap; }
.tool-error { color: #8a1f11; margin: 0; }
.reading-sample { font-family: Georgia, serif; font-size: 1.3rem; }
mark { background: #f2d1b9; border-radius: 4px; padding: 0 3px; }
.anki-card span { color: var(--accent); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; }
.anki-card strong { display: block; font-family: Georgia, serif; font-size: 1.5rem; margin: 4px 0; }
.anki-card small { color: var(--muted); }
.seo-footer { align-items: flex-start; border-top: 1px solid var(--line); margin-top: 30px; }
.seo-footer p { color: var(--muted); max-width: 460px; margin: 6px 0 0; }
@media (max-width: 760px) {
  .seo-header, .seo-footer { align-items: flex-start; flex-direction: column; }
  .tool-workbench, .tool-grid { grid-template-columns: 1fr; }
  .tool-head { align-items: flex-start; flex-direction: column; }
}
