/* ═══════════════════════════════════════════
   NeedToPass – Shared Stylesheet
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink:    #1c1007;
  --paper:  #f7ede0;
  --cream:  #efe2cf;
  --orange: #f97316;
  --orange2:#fb923c;
  --green:  #16a34a;
  --red:    #dc2626;
  --muted:  #8a7260;
  --border: #e5d5c0;
  --card:   #ffffff;
  --shadow: 0 2px 20px 0 rgba(100,50,10,.10);
  --r: 14px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── HEADER ─────────────────────────────── */
header {
  background: var(--orange);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -.5px;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── NAV ─────────────────────────────────── */
nav { display: flex; align-items: center; gap: 4px; }
nav a, .dropdown-toggle {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
nav a:hover, .dropdown-toggle:hover,
nav a.active, .dropdown-toggle.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  min-width: 240px;
  z-index: 200;
  overflow: hidden;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  color: var(--ink);
  padding: 10px 16px;
  font-size: .88rem;
  font-weight: 500;
  border-radius: 0;
  background: none;
}
.dropdown-menu a:hover { background: var(--paper); color: var(--orange); }
.dropdown-menu .dm-section {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 10px 16px 4px;
  border-top: 1px solid var(--border);
}
.dropdown-menu .dm-section:first-child { border-top: none; }
.caret { font-size: .7rem; opacity: .7; }
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}
@media(max-width: 720px) {
  .hamburger { display: block; }
  nav { display: none; flex-direction: column; align-items: stretch; }
  nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--orange);
    padding: 12px 16px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    margin-top: 4px;
  }
  .dropdown-menu a { color: #fff; }
  .dropdown-menu .dm-section { color: rgba(255,255,255,.6); border-top-color: rgba(255,255,255,.2); }
  .dropdown-menu a:hover { background: rgba(255,255,255,.15); color: #fff; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
}

/* ── AD BANNER ───────────────────────────── */
.ad-banner {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  min-height: 112px;
}

/* ── HERO ────────────────────────────────── */
.hero {
  background: #fff;
  border-bottom: 2px solid var(--border);
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, #f9731612 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  max-width: 680px;
  margin: 0 auto 14px;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.badge-pill {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}

/* ── PAGE LAYOUT ─────────────────────────── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
.page.full-width { grid-template-columns: 1fr; }
@media(max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── CARDS ───────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.card-title em { color: var(--orange); font-style: normal; }
.card-sub {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 22px;
  line-height: 1.55;
}

/* ── CALCULATOR GRID ─────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.calc-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  text-align: left;
}
.calc-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(249,115,22,.15);
  transform: translateY(-2px);
}
.calc-card.active {
  border-color: var(--orange);
  background: #fff7f0;
}
.calc-card-icon { font-size: 1.6rem; margin-bottom: 8px; }
.calc-card-title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.calc-card-desc { font-size: .78rem; color: var(--muted); line-height: 1.4; }

/* ── CALCULATOR PANEL ────────────────────── */
.calc-panel { display: none; }
.calc-panel.active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FORM ELEMENTS ───────────────────────── */
label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
input[type=number], input[type=text], input[type=email], textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.btn:hover { background: #ea6c0a; }
.btn:active { transform: scale(.97); }
.btn-ghost {
  background: none;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-ghost:hover { background: rgba(249,115,22,.08); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }

/* ── MODULE ROWS ─────────────────────────── */
.module-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.module-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.module-row input { background: var(--paper); font-size: .88rem; padding: 8px 10px; }
.remove-btn {
  background: none; border: none; color: #bfaf97;
  cursor: pointer; font-size: 1.1rem; padding: 4px;
  border-radius: 4px; transition: color .2s;
}
.remove-btn:hover { color: var(--red); }
.module-headers {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px; padding: 0 12px 4px;
}
.col-head {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}

/* ── RESULT BOX ──────────────────────────── */
.result-box {
  border-radius: 10px; padding: 20px 24px;
  margin-top: 20px; display: none; animation: fadeUp .3s ease;
}
.result-box.pass { background: #f0fdf4; border: 1.5px solid #86efac; display: block; }
.result-box.fail { background: #fef2f2; border: 1.5px solid #fca5a5; display: block; }
.result-box.info { background: #fffbeb; border: 1.5px solid #fcd34d; display: block; }
.result-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem; font-weight: 900; line-height: 1;
}
.result-box.pass .result-number { color: var(--green); }
.result-box.fail .result-number { color: var(--red); }
.result-box.info .result-number { color: #92400e; }
.result-label { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 4px; }
.result-msg { font-size: .95rem; margin-top: 10px; line-height: 1.55; }

/* ── BREAKDOWN TABLE ─────────────────────── */
.breakdown { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .88rem; }
.breakdown th {
  text-align: left; padding: 7px 12px;
  background: var(--cream); color: var(--muted);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.breakdown td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.breakdown tr:last-child td { border-bottom: none; }
.badge {
  display: inline-block; padding: 2px 10px;
  border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.badge-pass { background: #dcfce7; color: #166534; }
.badge-fail { background: #fee2e2; color: #991b1b; }
.badge-need { background: #fef9c3; color: #854d0e; }

/* ── PROGRESS BAR ────────────────────────── */
.progress-wrap { background: var(--cream); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 8px; }
.progress-bar  { height: 100%; border-radius: 999px; background: var(--orange); transition: width .6s ease; }
.progress-bar.green { background: var(--green); }
.progress-bar.red   { background: var(--red); }

/* ── SIDEBAR ─────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.sidebar-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700; margin-bottom: 12px;
}
.tip-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item { display: flex; gap: 10px; font-size: .875rem; line-height: 1.5; }
.tip-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ── BLOG GRID ───────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(100,50,10,.14); }
.blog-card-top {
  background: var(--orange);
  padding: 24px;
  font-size: 2rem;
  min-height: 80px;
  display: flex;
  align-items: center;
}
.blog-card-body { padding: 20px; flex: 1; }
.blog-card-tag {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--orange); margin-bottom: 6px;
}
.blog-card-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.blog-card-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.55; }
.blog-card-footer { padding: 12px 20px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }

/* ── ARTICLE ─────────────────────────────── */
.article-header { background: #fff; border-bottom: 2px solid var(--border); padding: 48px 24px 36px; }
.article-header .tag {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--orange); margin-bottom: 10px;
}
.article-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900; line-height: 1.2;
  max-width: 700px; margin-bottom: 14px;
}
.article-header .meta { font-size: .82rem; color: var(--muted); }
.article-body { max-width: 720px; }
.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  margin: 36px 0 12px; color: var(--ink);
}
.article-body h2 em { color: var(--orange); font-style: normal; }
.article-body h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; }
.article-body p { font-size: .97rem; line-height: 1.8; color: #3d2b18; margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 20px; }
.article-body li { font-size: .97rem; line-height: 1.75; color: #3d2b18; margin-bottom: 6px; }
.article-body strong { color: var(--ink); }
.article-body a { color: var(--orange); font-weight: 600; }
.article-body blockquote {
  background: var(--cream); border-left: 4px solid var(--orange);
  padding: 16px 20px; border-radius: 0 8px 8px 0;
  font-size: .95rem; line-height: 1.7; margin: 20px 0; color: #4a3520;
}
.callout {
  background: #fff7f0; border: 1.5px solid #fed7aa;
  border-radius: var(--r); padding: 18px 20px; margin: 20px 0;
}
.callout-title { font-weight: 700; color: var(--orange); margin-bottom: 6px; font-size: .9rem; }
.callout p { margin: 0; font-size: .9rem; }
.info-table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: .9rem; }
.info-table th {
  background: var(--orange); color: #fff;
  text-align: left; padding: 10px 14px; font-size: .82rem;
}
.info-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.info-table tr:last-child td { border-bottom: none; }
.info-table tr:nth-child(even) td { background: var(--paper); }

/* ── CTA BOX ─────────────────────────────── */
.cta-box {
  background: var(--orange); color: #fff;
  border-radius: var(--r); padding: 28px 32px;
  text-align: center; margin: 28px 0;
}
.cta-box h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 8px; }
.cta-box p  { opacity: .85; font-size: .9rem; margin-bottom: 18px; }
.cta-box .btn { background: #fff; color: var(--orange); }
.cta-box .btn:hover { background: #fff3e0; }

/* ── FAQ ─────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-q { font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.faq-a { font-size: .9rem; color: var(--muted); line-height: 1.65; }

/* ── BREADCRUMB ──────────────────────────── */
.breadcrumb {
  max-width: 1100px; margin: 0 auto;
  padding: 12px 20px 0;
  font-size: .8rem; color: var(--muted);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.breadcrumb a { color: var(--orange); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: .5; }

/* ── FOOTER ──────────────────────────────── */
footer {
  background: var(--orange);
  color: rgba(255,255,255,.85);
  padding: 36px 24px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 28px;
}
@media(max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media(max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .logo { color: #fff; font-size: 1.3rem; display: block; margin-bottom: 10px; }
.footer-brand p { font-size: .82rem; opacity: .8; line-height: 1.6; max-width: 220px; }
.footer-col h4 { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; color: rgba(255,255,255,.6); }
.footer-col a { display: block; color: rgba(255,255,255,.85); text-decoration: none; font-size: .87rem; margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: .78rem; opacity: .75;
}

/* ── MISC ────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
