/* ── Fonts ── */
@font-face { font-family:'Libre Baskerville'; src:url('../fonts/libre-baskerville-400.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Libre Baskerville'; src:url('../fonts/libre-baskerville-400italic.ttf') format('truetype'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:'Libre Baskerville'; src:url('../fonts/libre-baskerville-700.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'DM Mono'; src:url('../fonts/dm-mono-300.ttf') format('truetype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'DM Mono'; src:url('../fonts/dm-mono-400.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'DM Mono'; src:url('../fonts/dm-mono-500.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }

/* ── Variables ── */
:root {
  --bg: #fafaf8;
  --surface: #f4f0ea;
  --border: #e8e4de;
  --border-strong: #ccc8c0;
  --text: #18160f;
  --text-2: #4a463e;
  --text-3: #706b64;
  --muted: #706b64;
  --accent: #8a6830;
  --accent2: #b89860;
  --red: #a83030;
  --green: #3a7030;
  --blue: #2e5878;
  --purple: #5a4878;
  --orange: #905820;
  --ff-serif: 'Libre Baskerville', Georgia, serif;
  --ff-ui: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--ff-ui); font-size: 18px; line-height: 1.72; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.app { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }

/* ── Header ── */
header { border-bottom: 1px solid var(--border); padding-bottom: 1.25rem; margin-bottom: 2rem; }
header h1 { font-family: var(--ff-ui); font-size: 1.25rem; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
header p { color: var(--text-3); font-size: 16px; margin-top: 2px; letter-spacing: 0.02em; }

/* ── Generate button ── */
.gen-btn { background: var(--accent); color: #fff; border: none; border-radius: 3px; padding: 12px 32px; font-family: var(--ff-ui); font-size: 17px; cursor: pointer; transition: filter 0.16s; margin-top: 10px; width: 100%; }
.gen-btn:hover { filter: brightness(1.08); }

/* ── Section labels ── */
.section { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 1.25rem; }

/* ── Hero cards ── */
.hero-card { background: var(--surface); border-radius: 6px; padding: 1.75rem 1.75rem 1.5rem; border: 1px solid var(--border); }
.hero-kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent2); margin-bottom: 4px; }
.hero-type { font-family: var(--ff-serif); font-size: 2.75rem; font-weight: 400; color: var(--accent); line-height: 1; margin-bottom: 4px; }
.hero-name { font-family: var(--ff-serif); font-size: 1.5rem; color: var(--text); margin-bottom: 0.5rem; font-weight: 400; }
.hero-sub { font-size: 16px; color: var(--text-2); letter-spacing: 0.03em; margin-bottom: 1.25rem; }
.hero-rule { height: 1px; background: var(--border-strong); margin-bottom: 1.25rem; }
.hero-body { font-size: 17px; line-height: 1.75; color: var(--text-2); }
.hero-body strong { color: var(--text); font-weight: 600; }
.hero-desc { font-size: 17px; color: var(--text-2); line-height: 1.75; margin-bottom: 1rem; }
.hero-tell { color: var(--accent); font-size: 15px; font-style: italic; line-height: 1.65; }
.hero-list { list-style: none; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 5px; }
.hero-list li { font-size: 17px; line-height: 1.65; color: var(--text-2); padding-left: 1rem; position: relative; }
.hero-list li::before { content: '•'; position: absolute; left: 0; font-size: 1.1em; color: var(--accent); }
.hero-facts { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; }

/* ── Detail rows ── */
.detail-row { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.detail-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 4px; }
.detail-value { color: var(--text); }

/* ── Info rows ── */
.info-rows { display: flex; flex-direction: column; }
.info-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.info-row:last-child { border-bottom: none; }
.info-key { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); padding-top: 2px; }
.info-val { font-size: 17px; color: var(--text); line-height: 1.65; }
.info-val strong { font-weight: 600; }
.info-val .note { display: block; font-size: 16px; color: var(--text-2); margin-top: 4px; line-height: 1.6; padding-left: 0.9rem; position: relative; }
.info-val .note::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.info-val .tell { display: block; font-size: 15px; color: var(--accent); margin-top: 4px; }

/* ── OCEAN rows ── */
.ocean-list { display: flex; flex-direction: column; }
.ocean-row { display: grid; grid-template-columns: 11rem 1fr 7rem; align-items: center; gap: 4px 14px; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.ocean-row:last-child { border-bottom: none; }
.ocean-name { font-size: 17px; font-weight: 500; color: var(--text); }
.ocean-track { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.ocean-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.ocean-lbl { font-size: 16px; color: var(--text); font-weight: 600; }
.ocean-tip { grid-column: 2 / -1; font-size: 15px; color: var(--text-2); line-height: 1.5; padding-bottom: 4px; padding-left: 0.9rem; position: relative; }
.ocean-tip::before { content: '•'; position: absolute; left: 0; color: var(--accent); }

/* ── Spectrums ── */
.spectrums { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 3rem; }
.spectrum-group-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.4rem; }
.spectrum-row { display: flex; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--border); gap: 1rem; font-size: 17px; }
.spectrum-row:last-child { border-bottom: none; }
.spectrum-trait { color: var(--text-3); min-width: 9rem; flex-shrink: 0; }
.spectrum-value { color: var(--text); font-weight: 600; border-left: 1px solid var(--border-strong); padding-left: 1rem; }

/* ── Psychology ── */
.psych-grid { columns: 2; column-gap: 2.5rem; }
.psych-item { break-inside: avoid; margin-bottom: 1.5rem; }
.psych-lbl { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.psych-attach .psych-lbl { color: var(--blue); }
.psych-lie .psych-lbl { color: var(--red); }
.psych-defense .psych-lbl { color: var(--purple); }
.psych-bias .psych-lbl { color: var(--orange); }
.psych-val { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.psych-desc { font-size: 16px; color: var(--text-2); line-height: 1.6; padding-top: 0.4rem; margin-top: 0.4rem; padding-left: 0.9rem; position: relative; }
.psych-desc::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.psych-blind { font-size: 15px; color: var(--accent); margin-top: 6px; }

/* ── Voice grid (speech page) ── */
.voice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.voice-item { padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.voice-label { font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; }
.voice-value { font-size: 17px; font-weight: 600; color: var(--text); }

/* ── Quirk tags ── */
.quirk-tag { display: inline-block; padding: 4px 10px; border-radius: 3px; font-size: 15px; font-weight: 600; }
.quirk-tag.positive { background: rgba(58,112,48,0.12); color: var(--green); }
.quirk-tag.negative { background: rgba(168,48,48,0.12); color: var(--red); }

/* ── SEO content ── */
.seo-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.seo-section h2 { font-family: var(--ff-serif); font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; }
.seo-section p { color: var(--text-2); font-size: 16px; margin-bottom: 1rem; }

/* ── Cross-links ── */
.cross-links { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.cross-links-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 1rem; }
.cross-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cross-link { color: var(--accent); text-decoration: none; font-size: 15px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px; background: #fff; transition: border-color 0.15s; display: block; }
.cross-link:hover { border-color: var(--accent); }
.cross-link-current { font-size: 15px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 4px; background: var(--surface); color: var(--text-2); display: block; }

/* ── CTA box ── */
.cta-box { margin-top: 1.5rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.cta-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cta-desc { font-size: 15px; color: var(--text-2); margin-bottom: 12px; }
.cta-btn { display: inline-block; background: var(--accent); color: #fff; padding: 10px 24px; border-radius: 3px; text-decoration: none; font-size: 16px; }
.cta-btn:hover { filter: brightness(1.08); }

/* ── Footer ── */
/* ── Language switch ── */
.lang-switch { display: flex; justify-content: flex-end; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.lang-switch a { color: var(--text-3); text-decoration: none; padding: 2px 6px; border-radius: 3px; }
.lang-switch a:hover { color: var(--accent); }
.lang-active { color: var(--accent); background: var(--surface); padding: 2px 6px; border-radius: 3px; }

.site-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.site-footer a { color: var(--text-3); text-decoration: none; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-btn { background: transparent; color: var(--text-3); border: none; padding: 0; font-family: inherit; font-size: 16px; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.footer-btn:hover { color: var(--text); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .psych-grid { columns: 1; }
  .spectrums { grid-template-columns: 1fr; }
  .ocean-row { grid-template-columns: 1fr auto; gap: 2px 8px; }
  .ocean-name { font-size: 15px; }
  .ocean-lbl { font-size: 14px; }
  .ocean-track { grid-column: 1 / -1; }
  .ocean-tip { grid-column: 1 / -1; }
  .voice-grid { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 2px; }
  .info-key { min-width: unset; }
  .cross-links-grid { grid-template-columns: 1fr; }
  .gen-btn { padding: 10px 20px; font-size: 15px; max-width: 100%; box-sizing: border-box; }
}
