:root {
  --ink: #102a2e;
  --ink-2: #18383c;
  --paper: #f4f1e9;
  --paper-2: #ebe6da;
  --white: #fffdf7;
  --orange: #f05a31;
  --green: #a9d8a5;
  --line: rgba(16, 42, 46, .18);
  --muted: #667779;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.top-line { height: 5px; background: var(--orange); }

.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 233, .95);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; font: 700 15px "DM Mono"; letter-spacing: .08em; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--paper); background: var(--ink);
  font: 700 13px "DM Mono";
}
nav { display: flex; height: 100%; gap: 36px; }
nav a { display: grid; place-items: center; font-size: 14px; font-weight: 600; position: relative; }
nav a.active::after, nav a:hover::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--orange); }
.github-link { font-size: 13px; font-weight: 600; }
.github-link span { color: var(--orange); }

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
  padding: 72px max(7vw, 40px);
  background-image: linear-gradient(rgba(16,42,46,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(16,42,46,.045) 1px, transparent 1px);
  background-size: 42px 42px;
}
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 12px "DM Mono"; letter-spacing: .08em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(240,90,49,.13); }
h1 { margin: 25px 0 22px; font-size: clamp(50px, 6vw, 84px); line-height: 1.08; letter-spacing: -.055em; }
h1 em { color: var(--orange); font-style: normal; }
.hero-copy > p { max-width: 640px; color: #4f6264; font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.btn { padding: 15px 22px; font-size: 14px; font-weight: 700; border: 1px solid var(--ink); }
.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary span { margin-left: 24px; color: var(--green); }
.btn.secondary:hover { background: var(--white); }
.update-note { margin-top: 26px; color: var(--muted); font: 400 11px "DM Mono"; }

.hero-panel { padding: 30px; background: var(--ink); color: var(--white); box-shadow: 14px 14px 0 var(--green); }
.panel-head { display: flex; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.18); font: 500 11px "DM Mono"; letter-spacing: .12em; }
.step { color: var(--green); }
.hero-panel h2 { margin: 28px 0 22px; font-size: 23px; }
.match-options { display: grid; gap: 10px; }
.match-option {
  width: 100%; padding: 16px; display: grid; grid-template-columns: 38px 1fr 18px; gap: 12px; align-items: center;
  border: 1px solid rgba(255,255,255,.15); color: var(--white); background: transparent; text-align: left; cursor: pointer;
}
.match-option:hover, .match-option.selected { border-color: var(--green); background: rgba(169,216,165,.1); }
.option-icon { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(255,255,255,.09); color: var(--green); font: 500 17px "DM Mono"; }
.match-option b, .match-option small { display: block; }
.match-option b { font-size: 14px; margin-bottom: 4px; }
.match-option small { color: #aebbbc; font-size: 11px; }
.radio { width: 14px; height: 14px; border: 1px solid #76898b; border-radius: 50%; }
.selected .radio { border: 4px solid var(--green); }
.match-submit { width: 100%; margin-top: 18px; padding: 15px; border: 0; background: var(--orange); color: white; font-weight: 700; cursor: pointer; }
.match-submit span { float: right; }

.stats-strip { display: grid; grid-template-columns: repeat(4,1fr); background: var(--orange); color: white; padding: 22px max(7vw, 40px); }
.stats-strip div { display: flex; align-items: baseline; gap: 12px; justify-content: center; border-right: 1px solid rgba(255,255,255,.28); }
.stats-strip div:last-child { border: 0; }
.stats-strip strong { font: 500 30px "DM Mono"; }
.stats-strip sup { font-size: 16px; }
.stats-strip span { font-size: 12px; }

.section { padding: 90px max(7vw, 40px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 34px; }
.section-heading > div:first-child { display: grid; grid-template-columns: 44px auto; column-gap: 15px; }
.section-no { grid-row: 1 / 3; color: var(--orange); font: 500 13px "DM Mono"; padding-top: 9px; }
.section-heading h2 { margin: 0; font-size: clamp(30px,4vw,46px); letter-spacing: -.035em; }
.section-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.view-switch, .currency-switch { display: flex; border: 1px solid var(--line); }
.view-switch button, .currency-switch button { border: 0; padding: 9px 13px; background: transparent; cursor: pointer; }
.view-switch .active, .currency-switch .active { background: var(--ink); color: white; }

.toolbar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.search-box { flex: 0 1 420px; display: flex; gap: 12px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--ink); }
.search-box input, .model-search input { border: 0; outline: 0; width: 100%; background: transparent; font-size: 13px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chips button, .model-tabs button { padding: 9px 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.filter-chips button.active { color: var(--ink); border-color: var(--ink); background: var(--white); }

.provider-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.provider-grid.list { grid-template-columns: 1fr; }
.provider-card { min-width: 0; background: var(--white); border: 1px solid var(--line); padding: 24px; transition: transform .2s, box-shadow .2s; }
.provider-card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--green); }
.provider-card.recommended { border-top: 4px solid var(--orange); padding-top: 21px; }
.card-top { display: flex; justify-content: space-between; align-items: start; }
.provider-id { display: flex; gap: 13px; align-items: center; }
.provider-logo { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: white; font: 700 14px "DM Mono"; }
.provider-id h3 { margin: 0 0 3px; font-size: 18px; }
.provider-id small { color: var(--muted); font: 400 10px "DM Mono"; }
.favorite { border: 0; background: transparent; color: #9ba5a5; font-size: 20px; cursor: pointer; }
.favorite.on { color: var(--orange); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 16px; }
.badge { padding: 5px 8px; background: var(--paper-2); color: #4a5c5e; font-size: 10px; }
.badge.hot { color: #a12d10; background: #ffe0d5; }
.provider-desc { min-height: 66px; color: #526668; font-size: 12px; line-height: 1.75; }
.provider-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.provider-meta small, .provider-meta b { display: block; }
.provider-meta small { color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.provider-meta b { font-size: 12px; }
.provider-models { color: var(--muted); font: 400 10px/1.8 "DM Mono"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.risk { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.risk i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.risk.medium i { background: #f2b84b; }
.visit { padding: 9px 12px; background: var(--ink); color: white; font-size: 11px; }
.no-results { grid-column: 1/-1; padding: 70px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

.model-section { color: var(--white); background: var(--ink); }
.section-heading.inverse p { color: #9dafb0; }
.section-heading.inverse .section-no { color: var(--green); }
.currency-switch { border-color: rgba(255,255,255,.25); }
.currency-switch button { color: #aebbbc; }
.currency-switch .active { background: var(--green); color: var(--ink); }
.model-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.model-tabs { display: flex; gap: 8px; }
.model-tabs button { color: #9dafb0; border-color: rgba(255,255,255,.16); }
.model-tabs button.active { color: var(--ink); background: var(--green); border-color: var(--green); }
.model-search { display: flex; gap: 10px; width: 220px; padding: 8px 3px; border-bottom: 1px solid rgba(255,255,255,.35); }
.model-search input { color: white; }
.table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.14); }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th { color: #8fa3a4; font: 500 10px "DM Mono"; letter-spacing: .08em; text-align: left; background: rgba(255,255,255,.04); }
th, td { padding: 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
td { font-size: 12px; }
tbody tr:hover { background: rgba(169,216,165,.06); }
.model-name b, .model-name small { display: block; }
.model-name b { font-size: 13px; }
.model-name small { color: #7f9596; font: 400 9px "DM Mono"; margin-top: 5px; }
.price { color: var(--green); font: 500 13px "DM Mono"; }
.platform-pill { display: inline-block; padding: 5px 8px; border: 1px solid rgba(255,255,255,.2); }
.use-tag { color: #aababb; }
.table-note { display: flex; gap: 10px; align-items: start; color: #91a2a3; margin-top: 16px; font-size: 11px; }
.table-note p { margin: 0; }

.guide-grid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.guide-grid article { padding: 32px; border-right: 1px solid var(--line); }
.guide-grid article:last-child { border: 0; }
.guide-index { color: var(--orange); font: 500 11px "DM Mono"; }
.guide-grid h3 { margin: 25px 0 12px; font-size: 19px; }
.guide-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 34px max(7vw, 40px); background: var(--paper-2); border-top: 1px solid var(--line); }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand b, .footer-brand small { display: block; }
.footer-brand b { font: 600 13px "DM Mono"; }
.footer-brand small, footer p { color: var(--muted); font-size: 10px; }
footer p { max-width: 520px; text-align: center; }
footer > a { font-size: 11px; font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%,20px); padding: 12px 18px; color: white; background: var(--orange); font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-panel { max-width: 650px; }
  .provider-grid { grid-template-columns: repeat(2,1fr); }
  nav { display: none; }
}
@media (max-width: 680px) {
  .site-header { padding: 0 18px; height: 66px; }
  .github-link { display: none; }
  .hero, .section { padding: 55px 20px; }
  h1 { font-size: 48px; }
  .hero-panel { padding: 20px; box-shadow: 8px 8px 0 var(--green); }
  .stats-strip { grid-template-columns: 1fr 1fr; padding: 15px 20px; gap: 16px 0; }
  .stats-strip div:nth-child(2) { border: 0; }
  .toolbar, .model-toolbar { align-items: stretch; flex-direction: column; }
  .search-box, .model-search { flex-basis: auto; width: 100%; }
  .provider-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; gap: 20px; }
  .section-heading p { max-width: 360px; }
  .view-switch { display: none; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  footer { flex-direction: column; text-align: center; }
}
