@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap");

:root {
  --bg: #faf9f5;
  --bg-alt: #f0eee6;
  --surface: #ffffff;
  --surface-hover: #fcfbf8;
  --border: #e3dfd3;
  --border-strong: #cfc9b8;
  --ink: #141413;
  --ink-soft: #3d3d3a;
  --muted: #6b6962;
  --accent: #d97757;
  --accent-hover: #c26242;
  --accent-soft: rgba(217, 119, 87, 0.14);
  --blue: #2f6b8f;
  --blue-soft: rgba(47, 107, 143, 0.15);
  --green: #216e46;
  --green-bg: #e6f4ec;
  --yellow: #9a5b13;
  --yellow-bg: #fdf2df;
  --red: #b42318;
  --red-bg: #fdebe9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.container { width: 92%; max-width: 2040px; margin: 0 auto; padding: 0 clamp(16px, 2vw, 32px); }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.green-text { color: var(--green); }
.yellow-text { color: var(--yellow); }
.red-text { color: var(--red); }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.3rem; text-decoration: none; color: var(--ink); }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.brand-badge {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.98rem; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 10px 18px; border-radius: 99px;
  background: var(--ink); color: #faf9f5 !important; font-weight: 500;
}
.nav-cta:hover { background: #2d2d2a; }

/* Hero */
.hero { padding: 88px 0 64px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: end; }
.hero-pill {
  display: inline-block; padding: 6px 14px; border-radius: 99px;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--ink-soft); font-size: 0.88rem; font-weight: 500; margin-bottom: 22px;
}
.hero h1 { font-size: 4.1rem; line-height: 1.08; margin-bottom: 22px; }
.accent-underline { color: var(--accent); font-style: italic; }
.hero-sub { font-size: 1.22rem; color: var(--muted); max-width: 720px; margin-bottom: 34px; line-height: 1.6; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 99px; font-weight: 500; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: none; transition: all .15s;
}
.btn-primary { background: var(--ink); color: #faf9f5; }
.btn-primary:hover { background: #2e2e2b; }
.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--ink); background: var(--surface); }
.btn-outline:hover { background: var(--bg-alt); }
.btn-lg { padding: 15px 32px; font-size: 1.04rem; }

.kpi-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.kpi-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px 26px;
}
.kpi-val { font-family: "Newsreader", Georgia, serif; font-size: 2.8rem; line-height: 1.05; font-weight: 500; }
.kpi-label { font-size: 0.94rem; color: var(--muted); margin-top: 6px; }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { font-size: 2.55rem; line-height: 1.15; margin-bottom: 8px; }
.section-head p { font-size: 1.08rem; }

/* Large Chart Panels */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 32px 36px; margin-bottom: 28px;
}
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.chart-head h3 { font-size: 1.75rem; margin-bottom: 4px; }
.chart-legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

.svg-fluid { width: 100%; height: auto; display: block; }

/* Toolbar & Filters */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; }
.input, .select {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink);
  padding: 11px 16px; border-radius: 12px; font-size: 0.98rem; outline: none;
  font-family: inherit;
}
.input:focus, .select:focus { border-color: var(--ink); }
.input.full { width: 100%; }

.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-soft);
  padding: 9px 18px; border-radius: 99px; cursor: pointer; font-size: 0.94rem; font-weight: 500;
  transition: all .15s;
}
.tab.active, .tab:hover { background: var(--ink); color: #faf9f5; border-color: var(--ink); }

/* Model Cards */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.model-card {
  cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s;
  display: flex; flex-direction: column; gap: 18px;
}
.model-card:hover {
  transform: translateY(-3px); border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(20, 20, 19, 0.06);
}

.mc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mc-name { font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.mc-meta { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

.status-badge {
  font-size: 0.82rem; font-weight: 600; padding: 5px 12px; border-radius: 99px; white-space: nowrap;
}
.status-GREEN { color: var(--green); background: var(--green-bg); }
.status-YELLOW { color: var(--yellow); background: var(--yellow-bg); }
.status-RED { color: var(--red); background: var(--red-bg); }

.mc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 10px; text-align: center;
}
.metric-val { font-family: "Newsreader", Georgia, serif; font-size: 1.75rem; font-weight: 500; line-height: 1.1; }
.metric-lbl { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.domain-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.dbar-row { display: flex; flex-direction: column; gap: 5px; }
.dbar-head { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--ink-soft); font-weight: 500; }
.dbar-track { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; }
.dbar-fill { height: 100%; border-radius: 99px; background: var(--accent); }

.mc-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  font-size: 0.78rem; padding: 3px 10px; border-radius: 99px;
  background: var(--bg-alt); color: var(--ink-soft); font-weight: 500;
}
.mc-advice { font-size: 0.95rem; color: var(--ink-soft); border-top: 1px solid var(--border); padding-top: 14px; line-height: 1.55; }

/* Compare */
.compare-selectors { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vs-badge {
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface);
}
.compare-panel {
  display: grid; grid-template-columns: 540px 1fr; gap: 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 42px;
}
.radar-wrap { display: flex; justify-content: center; align-items: center; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.compare-table th, .compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.compare-table th { color: var(--muted); font-weight: 600; font-size: 0.94rem; }

/* Custom Audit */
.audit-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 28px; align-items: start; }
.form-group { margin-bottom: 22px; }
.form-group > label { display: block; font-size: 0.96rem; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tier-card {
  display: block; cursor: pointer; text-align: center; padding: 16px 10px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.tier-card input { display: none; }
.tier-card.selected { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.tier-name { font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.tier-price { font-family: "Newsreader", Georgia, serif; font-size: 1.8rem; font-weight: 500; margin: 4px 0; color: var(--ink); }
.tier-eta { font-size: 0.78rem; color: var(--muted); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px;
  border-radius: 99px; border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 0.92rem; cursor: pointer; color: var(--ink-soft);
}
.inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); padding-top: 20px; margin-top: 10px;
}
.total-price { font-family: "Newsreader", Georgia, serif; font-size: 2.3rem; font-weight: 500; color: var(--ink); }
.order-feedback { margin-top: 14px; font-size: 0.95rem; }

.benefit-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 14px; font-size: 0.96rem; color: var(--muted); }
.benefit-list strong { color: var(--ink); }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.recent-orders { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.order-row {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; font-size: 0.88rem;
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: center; padding: 24px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 19, 0.45); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; z-index: 2; width: 100%; max-width: 860px; max-height: 90vh; overflow-y: auto; padding: 36px; }
.modal-close {
  position: absolute; top: 18px; right: 22px; background: none; border: none;
  color: var(--muted); font-size: 2rem; cursor: pointer;
}

.footer { border-top: 1px solid var(--border); padding: 36px 0; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 0.92rem; color: var(--muted); }
.loading-box { grid-column: 1 / -1; text-align: center; padding: 56px; color: var(--muted); }

@media (max-width: 980px) {
  .container { padding: 0 20px; }
  .hero-grid, .compare-panel, .audit-layout, .inline-2 { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .model-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.6rem; }
}
