/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #fff8f2;
  --ink: #2a1f14;
  --body: #5a5045;
  --accent: #c06830;
  --accent-deep: #8a4a1e;
  --blue: #3b6b8a;
  --blue-deep: #2d5070;
  --panel-bg: #fff;
  --panel-border: rgba(0,0,0,0.04);
  --bubble-bg: #fff8f2;
  --bubble-border: #f0d8c0;
  --muted: #998a7a;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body { background: var(--bg); color: var(--ink); font-family: 'Outfit', sans-serif; font-weight: 300; font-size: 1.1rem; line-height: 1.85; letter-spacing: 0.01em; }

/* ===== HEADER ===== */
.g-header {
  position: relative;
  z-index: 10;
  padding: 22px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 780px;
}
.g-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.g-nav a {
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-left: 16px;
  transition: color 0.2s;
}

/* Header on gradient (guide pages) */
.g-brand--light { color: rgba(255,255,255,0.9); }
.g-nav--light a { color: rgba(255,220,180,0.7); }
.g-nav--light a:hover { color: #fff; }

/* Header on white (home + index pages) */
.g-brand--dark { color: var(--ink); }
.g-nav--dark a { color: var(--blue); }
.g-nav--dark a:hover { color: var(--accent); }

/* Icon nav variant */
.g-nav--icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: 8px;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}
.g-nav--icons a:hover {
  transform: translateY(-1px);
}
.g-nav--dark.g-nav--icons a:hover {
  background: rgba(59,107,138,0.08);
}
.g-nav--light.g-nav--icons a {
  color: rgba(255,255,255,0.75);
}
.g-nav--light.g-nav--icons a:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

/* Text + icons nav */
.g-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.g-nav-text a {
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 20px;
  transition: color 0.2s;
}
.g-nav-text--light a { color: rgba(255,220,180,0.8); }
.g-nav-text--light a:hover { color: #fff; }
.g-nav-text--dark a { color: var(--body); }
.g-nav-text--dark a:hover { color: var(--accent); }

/* ===== HERO WITH WAVE (guide pages) ===== */
.g-hero-bg {
  background: linear-gradient(145deg, #b86835 0%, #c47840 20%, #a06538 45%, #6a8698 70%, #4a7a98 100%);
  padding: 52px 36px 90px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.g-hero-inner {
  max-width: 680px;
  width: 100%;
}
.g-hero-bg::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 70' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,45 C200,10 400,60 600,35 C800,10 1000,55 1200,25 L1200,70 L0,70 Z' fill='%23fff8f2'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom;
}

/* Short hero (guide index) */
.g-hero-short {
  background: linear-gradient(145deg, #b86835 0%, #c47840 20%, #a06538 45%, #6a8698 70%, #4a7a98 100%);
  padding: 60px 36px 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 200px;
  justify-content: center;
}
.g-hero-short::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 70' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,45 C200,10 400,60 600,35 C800,10 1000,55 1200,25 L1200,70 L0,70 Z' fill='%23fff8f2'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: bottom;
}
.g-hero-short h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
}
.g-hero-short p {
  font-family: 'Outfit', sans-serif;
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.75;
}

/* ===== TAGS ===== */
.g-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.g-tag {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 6px 14px;
}
.g-tag.highlight {
  background: rgba(255,220,170,0.2);
  border-color: rgba(255,220,170,0.4);
  color: #ffe8c8;
}
/* Tags on white background (cards) */
.g-tag--solid {
  background: rgba(192,104,48,0.08);
  color: var(--accent-deep);
  border: 1px solid rgba(192,104,48,0.15);
  backdrop-filter: none;
}
.g-tag--solid.highlight {
  background: rgba(59,107,138,0.08);
  color: var(--blue-deep);
  border-color: rgba(59,107,138,0.15);
}

/* ===== HERO TYPOGRAPHY ===== */
.g-hero-bg h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3rem);
  line-height: 1.06;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.1);
}
.g-hero-bg h1 em {
  font-style: italic;
  color: #ffe4c4;
}
.g-dek {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  max-width: 58ch;
}

/* ===== STATS (floating over wave) ===== */
.g-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 36px;
  margin: -36px auto 16px;
  max-width: 680px;
  position: relative;
  z-index: 5;
}
.g-stat {
  background: #fff;
  border-radius: 16px;
  padding: 22px 12px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.g-stat b {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 3px;
}
.g-stat span {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.g-stats-cap {
  text-align: center;
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0 36px;
}
.g-stats-cap a { color: var(--blue); text-decoration: none; }
.g-stats-cap a:hover { text-decoration: underline; }

/* ===== MAIN CONTENT ===== */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== INTRO SECTION ===== */
.g-intro {
  padding: 36px 0 28px;
}
.g-intro .g-eyebrow { margin-bottom: 8px; }
.g-intro h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.2;
}
.g-intro p {
  font-size: 1.02rem;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 14px;
}
.g-intro strong { color: var(--ink); }

.g-cite {
  display: block;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink);
  margin: 18px 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.g-cite:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(59,107,138,0.08);
}
.g-cite .src { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.g-cite .ttl { font-weight: 600; font-size: 0.9rem; }
.g-cite .go { color: var(--blue); font-size: 0.8rem; font-weight: 600; margin-top: 4px; }

/* ===== PANELS ===== */
.g-panel {
  background: var(--panel-bg);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  border: 1px solid var(--panel-border);
}
.g-panel.warn {
  border: 2px solid var(--accent);
  box-shadow: 0 4px 20px rgba(192,104,48,0.06);
}
.g-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.g-panel.warn .g-eyebrow { color: var(--accent-deep); }
.g-panel.routine {
  background: linear-gradient(135deg, #e8f0f5, #f0f4f7);
  border: 1.5px solid rgba(59,107,138,0.15);
  box-shadow: 0 4px 20px rgba(59,107,138,0.06);
}
.g-panel.routine .g-eyebrow { color: var(--blue-deep); }
.g-panel.routine h2 { color: var(--blue-deep); }
.g-panel h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
}
.g-panel p {
  font-size: 1rem;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 14px;
}
.g-panel p:last-child { margin-bottom: 0; }
.g-panel strong { color: var(--ink); font-weight: 600; }
.g-panel a { color: var(--blue); font-weight: 600; text-decoration: none; }
.g-panel a:hover { text-decoration: underline; }
.g-panel em { font-style: italic; }

/* ===== COPY BUBBLES ===== */
.dm { margin: 16px 0; }
.dm-lbl {
  font-size: 0.73rem;
  color: var(--accent-deep);
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}
.dm-bubble {
  background: var(--bubble-bg);
  border: 1.5px solid var(--bubble-border);
  color: var(--accent-deep);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  border-radius: 14px 14px 14px 4px;
  padding: 16px 18px;
  white-space: pre-wrap;
}
.copy-btn {
  background: none;
  border: 1.5px solid var(--bubble-border);
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-deep);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== LISTS ===== */
.g-panel ul { list-style: none; margin-bottom: 14px; }
.g-panel ul li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--body);
  line-height: 1.65;
}
.g-panel ul li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.lead-in { font-weight: 600; color: var(--ink); }

/* ===== GUIDE CARDS ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 40px 0;
}
.guide-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  border: 1px solid var(--panel-border);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.guide-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.guide-card .g-tags { margin-bottom: 14px; }
.guide-card h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.2;
}
.guide-card p {
  font-size: 1rem;
  color: var(--body);
  line-height: 1.65;
  margin-bottom: 16px;
}
.guide-card .card-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue);
}

/* ===== FOOTER WITH WAVE ===== */
footer {
  background: linear-gradient(135deg, #c06830, #4a7a98);
  padding: 48px 36px 44px;
  position: relative;
  margin-top: 20px;
}
footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 50' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,25 C300,45 600,5 900,35 C1050,48 1150,15 1200,20 L1200,0 L0,0 Z' fill='%23fff8f2'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: top;
}
.cta-h {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 10px;
}
footer p {
  font-family: 'Outfit', sans-serif;
  color: rgba(255,255,255,0.75);
  font-size: 1.02rem;
  line-height: 1.6;
}
.cta-links { margin-top: 20px; display: flex; gap: 12px; }
.cta-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  transition: all 0.2s;
}
.cta-links a:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-2px);
}
.fine {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.4);
  margin-top: 28px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .g-hero-bg { padding: 40px 24px 80px; }
  .g-hero-short { padding: 40px 24px 60px; }
  .g-header { padding: 18px 24px; }
  .g-stats { padding: 0 24px; gap: 8px; }
  .g-stat b { font-size: 1.2rem; }
  .wrap { padding: 0 20px; }
  .g-panel { padding: 22px; }
  .guide-grid { grid-template-columns: 1fr; gap: 16px; }
  footer { padding: 44px 24px 36px; }
  .g-nav--icons { display: none; }
  .g-nav-text a { margin-left: 14px; font-size: 0.6rem; }
}
