/* Identity Style Taste Validator */
:root {
  --bg: #1a1814;
  --bg-elevated: #232019;
  --bg-card: #2a2620;
  --bg-input: #332e26;
  --text: #e8e2d6;
  --text-muted: #a89f8f;
  --text-dim: #7a7266;
  --accent: #c8965a;
  --accent-light: #e0b882;
  --accent-warm: #d4946a;
  --border: #3d372d;
  --border-light: #4a4338;
  --success: #7a9e7a;
  --error: #c47a6a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --max-width: 820px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 24, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.brand-mark {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta-note {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* Sections */
section {
  padding: 60px 0;
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* Quiz */
.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.question-card:focus-within {
  border-color: var(--accent);
}

.question-legend {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  padding: 0 8px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 12px 0 20px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-elevated);
}

.option:hover {
  border-color: var(--border-light);
  background: var(--bg-input);
}

.option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.option input[type="radio"]:checked ~ .option-body {
  color: var(--text);
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(200, 150, 90, 0.08);
}

.option-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.option-body strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Results */
.results-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.result-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-illustration {
  color: var(--text-dim);
  margin-bottom: 16px;
  opacity: 0.5;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.result-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.result-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.result-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 6px;
}

.result-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.result-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.score-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.result-description,
.result-application {
  margin-bottom: 24px;
}

.result-description h4,
.result-application h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}

.result-application ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-application li {
  padding-left: 20px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-application li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.result-secondary {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.result-secondary strong {
  color: var(--text);
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result-saved {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--success);
}

.saved-results {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.saved-results h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.saved-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.saved-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.saved-list .saved-date {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* Vocabulary */
.vocabulary-section {
  background: var(--bg);
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.vocab-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.vocab-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.vocab-words {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  line-height: 1.6;
}

.vocab-example {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

/* Mistakes */
.mistakes-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mistakes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.mistake-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.mistake-num {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
}

.mistake-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 8px 0 10px;
}

.mistake-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ */
.faq-section {
  background: var(--bg);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Scenario */
.scenario-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.scenario-intro {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
}

.scenario-card p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.scenario-takeaway {
  font-style: italic;
  color: var(--accent-light) !important;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin-top: 20px;
  margin-bottom: 0 !important;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.footer-links h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 720px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-nav {
    gap: 14px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  section {
    padding: 40px 0;
  }

  .question-card {
    padding: 20px;
  }

  .result-card {
    padding: 24px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .result-scores {
    grid-template-columns: 1fr 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .form-actions,
  .result-actions,
  .progress-bar,
  .progress-label {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .result-card {
    border: 1px solid #ccc;
    background: white;
  }

  .result-card * {
    color: black !important;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
