:root {
  --ink: #1b1b1a;
  --ink-2: #101110;
  --paper: #f5f4ea;
  --paper-2: #ecebe1;
  --white: #fff;
  --gold: #ffbd00;
  --gold-dark: #6f5000;
  --line: #d7d5ca;
  --muted: #5b5e57;
  --shadow: 0 24px 64px rgba(27, 27, 26, .1);
  --max: 1440px;
}

body.guide-expanded {
  padding: clamp(12px, 2vw, 28px);
  background: #171716;
  font-family: Manrope, Arial, sans-serif;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 150;
  width: min(1370px, calc(100% - 22px));
  height: auto;
  min-height: 76px;
  margin: 10px auto 0;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(245, 244, 234, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
}

.header-shell {
  width: min(100% - 24px, 1330px);
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand { min-width: 185px; }
.brand img { width: 218px; height: auto; max-width: 100%; }
.brand-fallback { color: var(--ink); }

.header-nav {
  margin-left: auto;
  gap: .78rem;
}

.header-nav a {
  position: relative;
  color: #31332f;
  font-size: .7rem;
  font-weight: 750;
  white-space: nowrap;
  text-decoration: none;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--gold);
  transition: right .18s ease;
}

.header-nav a:hover { color: var(--ink); }
.header-nav a:hover::after { right: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.sign-in-link,
.header-cta {
  min-height: 42px;
  padding: .62rem .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-size: .7rem;
  font-weight: 750;
  text-decoration: none;
}

.header-cta {
  border-color: var(--gold);
  background: var(--gold);
}

.header-cta:hover,
.sign-in-link:hover {
  transform: none;
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: none;
}

.app-shell {
  width: min(var(--max), 100%);
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  overflow: clip;
  background: var(--paper);
}

.guide-sidebar {
  top: 101px;
  height: calc(100vh - 111px);
  border-right: 0;
  background: var(--ink-2);
}

.stage-nav-item {
  border-left-width: 4px;
  border-radius: 0 8px 8px 0;
}

.stage-nav-item:hover,
.stage-nav-item.active {
  background: #2b2d2b;
  border-left-color: var(--gold);
}

.main-panel { background: var(--paper); }

h1,
h2 {
  font-family: Manrope, Arial, sans-serif;
  letter-spacing: -.052em;
}

h1 { font-weight: 750; }
h2 { font-weight: 720; }

.overview-hero,
.article-header {
  background: radial-gradient(circle at 92% 8%, rgba(255, 189, 0, .14), transparent 25%), var(--paper);
  border-bottom: 1px solid var(--line);
}

.overview-hero::before,
.article-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: clamp(7px, 1vw, 13px);
  background: var(--gold);
}

.overview-hero::after { display: none; }
.article-header { position: relative; }

.paper-card,
.journey-card,
.stage-time,
.fact,
.two-col > div,
.competency-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.paper-card { box-shadow: var(--shadow); }
.paper-card::after { display: none; }

.journey-grid { gap: 1rem; }
.journey-card { min-height: 238px; }
.journey-card:hover {
  transform: translateY(-4px);
  border-color: rgba(27, 27, 26, .42);
  box-shadow: 0 20px 48px rgba(27, 27, 26, .09);
}

.phase-list { border-top-color: var(--line); }
.phase-row { border-bottom-color: var(--line); }

.primary-btn,
.secondary-btn {
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: none;
}

.primary-btn { background: var(--ink); color: #fff; }
.primary-btn:hover { background: var(--gold); color: var(--ink); transform: none; box-shadow: none; }
.secondary-btn:hover { background: var(--ink); color: #fff; }

.official-banner,
.callout {
  border: 1px solid #cfbd7d;
  border-left: 6px solid var(--gold);
  border-radius: 10px;
  background: #fff8dc;
}

.callout.warning { border-left-color: var(--red); }

.verified-link { color: #634900; }

.source-list > a {
  border-bottom-color: var(--line);
  border-radius: 8px;
}

.source-list > a:hover { background: rgba(255, 255, 255, .7); }

.before-next,
.truth-panel {
  border-radius: 14px;
  background: var(--ink);
}

.truth-panel .eyebrow { color: var(--gold); }

.site-footer {
  width: min(var(--max), 100%);
  margin: 0 auto;
  border-radius: 0 0 24px 24px;
  background: #0b0d0c;
}

.guide-footer-brand img {
  display: block;
  width: min(340px, 100%);
  height: auto;
  margin-bottom: 1.5rem;
}

.guide-footer-brand h2 { max-width: 560px; }

.guide-language-note {
  display: grid;
  gap: .3rem;
  margin: 1rem 0;
  padding: .85rem;
  border: 1px solid #4c4f4c;
  border-radius: 8px;
  background: #1d1f1d;
}

.guide-language-note b { color: #fff; }
.guide-language-note span { color: #bbb; line-height: 1.45; }

.mobile-guide-btn {
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

@media (max-width: 1180px) {
  .header-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .15);
  }

  .header-nav.open { display: flex; }
  .header-nav a { min-height: 42px; padding: .7rem; }
  .header-nav a::after { display: none; }
  .menu-btn {
    display: inline-flex;
    min-height: 42px;
    padding: .65rem .75rem;
    align-items: center;
    border: 1px solid var(--ink);
    border-radius: 5px;
    color: var(--ink);
    background: transparent;
  }
}

@media (max-width: 860px) {
  body.guide-expanded { padding: 0; }
  .site-header { top: 7px; width: calc(100% - 14px); margin-top: 7px; }
  .header-shell { width: calc(100% - 14px); min-height: 68px; }
  .brand { min-width: 0; }
  .brand img { width: 180px; }
  .header-actions .sign-in-link,
  .header-actions .header-cta { display: none; }
  .app-shell { width: 100%; border-radius: 0; }
  .guide-sidebar { top: 0; height: 100vh; }
  .overview-hero::before,
  .article-header::before { width: 7px; }
  .site-footer { width: 100%; border-radius: 0; }
}

@media (max-width: 590px) {
  .brand img { width: 160px; }
  .overview-hero,
  .article-header { padding-left: 28px; }
  .paper-card,
  .truth-panel,
  .before-next { border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
