:root {
  --ink: #10201b;
  --muted: #68736e;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d9d7ce;
  --green: #0a7a53;
  --green-dark: #07543b;
  --red: #d94a38;
  --amber: #b87812;
  --navy: #102c3a;
  --shadow: 0 18px 48px rgba(16, 32, 27, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
.site-header {
  min-height: 76px;
  padding: 14px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid rgba(16, 32, 27, .12);
  background: rgba(244, 241, 233, .92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; white-space: nowrap; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: var(--navy);
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: .08em;
}
nav { display: flex; gap: 24px; margin-right: auto; font-size: 14px; }
nav a:hover { color: var(--green); }
.header-action { border-bottom: 2px solid var(--green); font-size: 14px; font-weight: 700; }
main { min-height: 70vh; }
.hero {
  min-height: 610px;
  padding: 88px clamp(20px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 8vw;
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 75% 30%, rgba(17, 128, 91, .42), transparent 28%),
    linear-gradient(135deg, #0c2834 0%, #10201b 72%);
}
.eyebrow {
  margin: 0 0 12px;
  color: #b68027;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}
.hero .eyebrow { color: #79d6ae; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.025em; }
.hero h1 { max-width: 740px; margin-bottom: 26px; font-size: clamp(48px, 7vw, 92px); }
.hero-copy { max-width: 650px; color: #c8d5d0; font-size: 18px; }
.hero-actions, .card-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions { margin-top: 34px; }
.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { border-color: currentColor; background: transparent; }
.hero .button-secondary { color: white; }
.signal-panel {
  padding: 28px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 30px 80px rgba(0,0,0,.2);
}
.panel-label { margin-top: 0; color: #79d6ae; font: 700 11px/1 monospace; letter-spacing: .16em; }
.provider-signal {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.provider-signal small { display: block; color: #9fb2aa; }
.provider-signal b { font-size: 20px; }
.signal-dot { width: 9px; height: 9px; border-radius: 50%; }
.signal-dot.healthy { background: #48d89d; box-shadow: 0 0 0 5px rgba(72,216,157,.12); }
.signal-dot.warning { background: #e7a53d; box-shadow: 0 0 0 5px rgba(231,165,61,.12); }
.section { padding: 84px clamp(20px, 8vw, 120px); }
.compact-section { padding-top: 42px; }
.section-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-heading h2 { margin-bottom: 0; font-size: clamp(30px, 4vw, 48px); }
.section-heading > a { color: var(--green); font-weight: 750; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.provider-link { color: var(--green); font-size: 13px; font-weight: 800; }
.product-card h3 { min-height: 2.3em; margin: 20px 0 6px; font-size: 20px; overflow-wrap: anywhere; }
.series, .muted, .confirmed { color: var(--muted); }
.series { min-height: 1.5em; margin-top: 0; font-size: 13px; }
.network-line, .region-line { margin: 8px 0; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-in_stock, .status-low_stock { color: #075c3f; background: #d8f4e7; }
.status-out_of_stock { color: #922d22; background: #f9dfda; }
.status-suspended { color: #83550d; background: #f7ead1; }
.status-unknown { color: #555e5a; background: #e5e8e6; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.spec-grid div { padding-top: 8px; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 2px 0 0; font-weight: 700; }
.price-line { display: flex; align-items: baseline; gap: 6px; }
.price-line strong { font-size: 22px; }
.price-line span { color: var(--muted); font-size: 13px; }
.confirmed { font-size: 12px; }
.card-actions { margin-top: 20px; }
.event-section { background: #ebe8df; }
.event-list { border-top: 1px solid var(--line); }
.event-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.event-row a { margin: 0 10px; font-weight: 750; }
.event-type { color: var(--green); font-size: 12px; font-weight: 850; }
.event-meta { display: flex; gap: 18px; align-items: center; color: var(--muted); font-size: 13px; }
.empty-state { padding: 44px; border: 1px dashed #aeb5b1; border-radius: 12px; color: var(--muted); text-align: center; }
.page-intro, .product-hero {
  padding: 76px clamp(20px, 8vw, 120px) 54px;
  color: white;
  background: var(--navy);
}
.page-intro h1, .product-hero h1 { margin-bottom: 14px; font-size: clamp(42px, 6vw, 74px); }
.page-intro > p:last-of-type { max-width: 740px; color: #c4d1cd; font-size: 18px; }
.provider-facts { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.provider-facts span { padding: 7px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; font-size: 13px; }
.filter-bar { padding: 24px clamp(20px, 8vw, 120px); border-bottom: 1px solid var(--line); background: #fffdf8; }
.filter-bar form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.filter-bar label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.filter-bar select, .filter-bar input { min-width: 160px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: white; font: inherit; }
.filter-bar .search-field { flex: 1; }
.filter-bar .search-field input { width: 100%; }
.filter-bar form { max-width: 1500px; }
.filter-bar input[type="number"] { min-width: 110px; width: 130px; }
.line-index { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.line-index a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: white; }
.product-line-group { margin-top: 30px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 30px; }
.pagination a { padding: 10px 16px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.price-options { display: grid; gap: 8px; margin-bottom: 14px; }
.price-options .detail-price { padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.result-count { margin-bottom: 18px; color: var(--muted); }
.product-hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.product-state { min-width: 250px; text-align: right; }
.product-state .status { font-size: 16px; padding: 8px 14px; }
.product-state p { color: #c4d1cd; font-size: 12px; }
.product-state strong { color: white; }
.warning-banner { padding: 14px clamp(20px, 8vw, 120px); color: #704509; background: #f6dfb5; font-weight: 700; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding: 54px clamp(20px, 8vw, 120px); }
.detail-card, .purchase-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.detail-list div { display: grid; grid-template-columns: 150px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 24px; }
.detail-price strong { font-size: 30px; }
.full-button { width: 100%; margin-top: 10px; }
.disclosure { color: var(--muted); font-size: 12px; }
.prose { max-width: 820px; padding: 58px clamp(20px, 8vw, 120px) 90px; }
.prose h2 { margin-top: 42px; font-size: 28px; }
.prose p { color: #45514c; font-size: 17px; }
footer { padding: 34px clamp(20px, 8vw, 120px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer p { margin: 4px 0; }
.account-shell { min-height: 70vh; display: grid; place-items: center; padding: 60px 20px; }
.account-card { width: min(540px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.account-card h1 { font-size: 38px; }
.account-card p { color: var(--muted); }
.account-warning { margin: 20px 0; padding: 14px; }
.subscription-grid { display: grid; gap: 14px; }
.subscription-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.subscription-card h2 { margin: 4px 0; }
.subscription-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.subscription-state { display: flex; align-items: center; gap: 10px; }
.subscription-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.logout-form { margin-top: 24px; }

@media (max-width: 960px) {
  nav { display: none; }
  .header-action { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 64px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { min-height: 64px; padding: 10px 16px; }
  .brand-mark { width: 34px; height: 34px; }
  .header-action { font-size: 12px; }
  .hero { min-height: auto; padding: 56px 20px; }
  .hero h1 { font-size: 48px; }
  .section { padding: 58px 20px; }
  .product-grid { grid-template-columns: 1fr; }
  .event-row, .product-hero { align-items: flex-start; flex-direction: column; }
  .event-meta { width: 100%; justify-content: space-between; }
  .page-intro, .product-hero { padding: 54px 20px 40px; }
  .product-state { min-width: 0; text-align: left; }
  .filter-bar { padding: 18px 20px; }
  .filter-bar form, .filter-bar label, .filter-bar select, .filter-bar input { width: 100%; }
  .detail-layout { padding: 32px 20px; }
  .detail-list div { grid-template-columns: 120px 1fr; }
  .subscription-card { grid-template-columns: 1fr; }
  .subscription-actions { justify-content: start; }
}
