/* ============================================================
   Dart sub-pillar theme — "Modern Clean Cream"
   Concept: cream off-white, dart-blue accent, warm amber highlight.
   Low-contrast, warm, friendly cho đọc lâu.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:           #fbf7ed;
  --bg-card:      #ffffff;
  --bg-alt:       #f3ebd6;

  /* Text */
  --text:         #1c2330;
  --text-soft:    #4a5364;
  --text-muted:   #788090;
  --ink:          #0c1424;

  /* Accent (Dart blue family) */
  --accent:       #0568b9;
  --accent-deep:  #034e8c;
  --accent-soft:  #dae9f7;

  /* Secondary highlight */
  --gold:         #b67e2a;
  --gold-soft:    #f5e7c8;

  /* Borders */
  --border:       #e6dcc4;
  --border-soft:  #efe7d2;

  /* Fonts */
  --font-body:    "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Crimson Pro", "Crimson Text", "Iowan Old Style", "Times New Roman", Georgia, serif;
  --font-mono:    "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;

  /* Code block (dark navy) */
  --code-bg:        #131b2e;
  --code-fg:        #e8e5d9;
  --code-inline-bg: #f1e9d2;
  --code-inline-fg: #5a3c10;

  /* Syntax highlight (works on dark code-bg) */
  --syn-kw:    #6cb5ff;   /* keyword (class, var, final, return) */
  --syn-type:  #ffb874;   /* type name (int, String, Future) */
  --syn-str:   #b6e08e;   /* string literal */
  --syn-num:   #f4a3ee;   /* number literal */
  --syn-com:   #8e98a8;   /* comment */
  --syn-fn:    #ffd476;   /* function name */
  --syn-op:    #d1d6df;   /* operator */
  --syn-cls:   #ffb874;   /* class name */
}

/* Dart logo mark in header */
.site-logo .mark.mark-dart {
  background: linear-gradient(135deg, #0568b9 0%, #03406d 100%);
  color: #fdfaf2;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Dart-specific hero treatment */
.hero.dart-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(5,104,185,0.08) 0%, transparent 70%),
    linear-gradient(to bottom, var(--bg), var(--bg));
}
.hero.dart-hero h1 em {
  color: var(--accent);
  font-style: normal;
  position: relative;
}
.hero.dart-hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  height: 8px;
  background: var(--gold-soft);
  z-index: -1;
  border-radius: 4px;
}

/* Chapter accent stripe */
.chapter-header {
  border-top: 4px solid var(--accent);
  padding-top: 36px;
}

/* Chapter number badge */
.chapter-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Pillar card variations on Dart index */
.subpillar-card.subpillar-dart {
  --card-accent: var(--accent);
  background: linear-gradient(135deg, #ffffff 0%, #f7f0dc 100%);
}

/* Pretty inline code in Dart prose (cream-ish) */
.prose p code, .prose li code {
  border-color: var(--gold-soft);
}

/* Quiz number Dart-blue */
.quiz-num { background: var(--accent-soft); color: var(--accent); }
.exercise::before { background: var(--accent); }

/* DartPad — Dart blue label bg */
.dartpad-label {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.dartpad-label strong {
  color: var(--accent-deep);
  font-weight: 700;
}

/* Decorative element: Dart "arrow" used in feature blocks */
.dart-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
  position: relative;
  padding-left: 56px;
}
.dart-feature::before {
  content: "→";
  position: absolute;
  left: 18px; top: 18px;
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.dart-feature h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--ink);
}
.dart-feature p:last-child { margin-bottom: 0; }

/* Footer accent */
.site-footer { background: linear-gradient(to bottom, var(--bg), var(--bg-alt)); }
