/* CarHunch Engineering — base styles, tokens, shared components */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette */
  --ch-primary:       #003399;
  --ch-primary-light: #0044b3;
  --ch-bg:            #f8fafc;
  --ch-card:          #ffffff;
  --ch-text:          #0f172a;
  --ch-muted:         #64748b;
  --ch-border:        #e2e8f0;

  /* Dark (hero, code blocks) */
  --ch-dark:          #0f172a;
  --ch-bg-dark:       #0B1E3A;
  --ch-bg-dark-2:     #102A4C;

  /* Radii + shadow */
  --ch-radius:        14px;
  --ch-shadow:        0 4px 24px rgba(15, 23, 42, 0.07);
  --ch-shadow-hover:  0 8px 32px rgba(15, 23, 42, 0.12);

  /* Layout */
  --ch-max-w:         1200px;
  --article-max-w:    760px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ch-text);
  background: var(--ch-bg);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ch-primary);
  text-decoration: none;
}

a:hover {
  color: var(--ch-primary-light);
  text-decoration: underline;
}

/* ----- Header ----- */
.ch-header {
  position: relative;
  z-index: 10;
  background: var(--ch-bg-dark);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.ch-header__brand {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.ch-header__brand a {
  color: #fff;
  text-decoration: none;
}

.ch-header__brand a:hover {
  color: #fff;
  text-decoration: underline;
}

.ch-header__brand .ch-header__suffix {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.ch-header__back {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.ch-header__back:hover {
  color: #fff;
}

/* ----- Footer ----- */
.ch-footer {
  background: var(--ch-bg-dark);
  color: var(--ch-muted);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.875rem;
}

.ch-footer p {
  margin: 0;
}

.ch-footer__line2 {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ----- Card base ----- */
.ch-card {
  background: var(--ch-card);
  border-radius: var(--ch-radius);
  box-shadow: var(--ch-shadow);
  padding: 1.5rem;
  border-left: 4px solid var(--ch-primary);
}

.ch-card:hover {
  box-shadow: var(--ch-shadow-hover);
}

.ch-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ch-card a:hover {
  text-decoration: none;
}
