:root {
  --bg-0: #050814;
  --bg-1: #0b1124;
  --bg-2: #111936;
  --card: rgba(16, 24, 48, 0.78);
  --card-solid: #101830;
  --border: rgba(148, 179, 255, 0.16);
  --border-strong: rgba(56, 189, 248, 0.42);
  --text-0: #f4f7ff;
  --text-1: #c5d1ec;
  --text-2: #8a99bf;
  --cyan: #38bdf8;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --violet: #a78bfa;
  --grad-hero: linear-gradient(135deg, #38bdf8 0%, #34d399 52%, #a78bfa 100%);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.48);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", sans-serif;
  background: radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.14), transparent 36%),
              radial-gradient(circle at 88% 12%, rgba(167, 139, 250, 0.14), transparent 34%),
              radial-gradient(circle at 50% 65%, rgba(52, 211, 153, 0.08), transparent 44%),
              var(--bg-0);
  color: var(--text-0);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: min(1240px, 92vw);
  margin: 0 auto;
}

/* Alert Strip */
.law-alert {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.14), rgba(251, 113, 133, 0.14));
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  padding: 10px 0;
  font-size: 13px;
  color: #fde68a;
}

.law-alert-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.law-alert strong {
  color: #fff;
}

.law-pill {
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fef3c7;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(5, 8, 20, 0.84);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-0);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(52, 211, 153, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.5);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.brand-text span {
  display: block;
  font-size: 11.5px;
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-1);
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 9px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.14);
}

.nav-cta {
  background: linear-gradient(135deg, #0284c7, #059669);
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

/* Hero */
.hero {
  padding: 64px 0 54px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(16, 24, 48, 0.9);
  color: var(--text-1);
}

.badge.cyan { border-color: rgba(56, 189, 248, 0.45); color: #7dd3fc; background: rgba(56, 189, 248, 0.12); }
.badge.emerald { border-color: rgba(52, 211, 153, 0.45); color: #6ee7b7; background: rgba(52, 211, 153, 0.12); }
.badge.violet { border-color: rgba(167, 139, 250, 0.45); color: #ddd6fe; background: rgba(167, 139, 250, 0.12); }

.hero h1 {
  font-size: clamp(32px, 4.3vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  font-weight: 850;
}

.gradient-text {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 16.5px;
  color: var(--text-1);
  margin-bottom: 24px;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #03111c;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.34);
}

.btn-secondary {
  background: rgba(16, 24, 48, 0.85);
  border-color: var(--border-strong);
  color: var(--text-0);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 9px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 14px;
}

.kpi-card strong {
  display: block;
  font-size: 22px;
  font-weight: 850;
  color: var(--cyan);
  line-height: 1.2;
}

.kpi-card span {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

/* Hero Visual Card */
.hero-visual {
  background: linear-gradient(160deg, rgba(17, 25, 54, 0.94), rgba(8, 13, 30, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.visual-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cyan);
}

.mode-pills {
  display: flex;
  gap: 6px;
  background: rgba(5, 8, 20, 0.75);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-2);
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(52, 211, 153, 0.25));
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.svg-stage {
  background: radial-gradient(circle at 50% 45%, rgba(56, 189, 248, 0.1), rgba(5, 8, 20, 0.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-stage svg {
  width: 100%;
  height: auto;
  max-height: 320px;
}

.hero-visual-caption {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-1);
  background: rgba(5, 8, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
}

/* Section Generic */
section {
  padding: 64px 0;
  border-top: 1px solid rgba(148, 179, 255, 0.08);
}

.section-head {
  margin-bottom: 32px;
  max-width: 820px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--emerald);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.22;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--text-1);
  font-size: 15.5px;
}

/* Grid Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #fff;
}

.card p {
  color: var(--text-1);
  font-size: 14.5px;
}

.icon-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 14px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Interactive 4-Stage Eversion Simulator */
.sim-box {
  background: linear-gradient(160deg, rgba(16, 24, 48, 0.94), rgba(7, 11, 26, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.sim-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.sim-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.sim-tab {
  text-align: left;
  background: rgba(5, 8, 20, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s;
}

.sim-tab strong {
  display: block;
  font-size: 13.5px;
  color: #fff;
  margin-bottom: 3px;
}

.sim-tab span {
  font-size: 11.5px;
  color: var(--text-2);
}

.sim-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(52, 211, 153, 0.16));
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.sim-canvas {
  background: #040712;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

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

.sim-readout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.telemetry-item {
  background: rgba(5, 8, 20, 0.76);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.telemetry-item small {
  display: block;
  font-size: 11.5px;
  color: var(--text-2);
}

.telemetry-item strong {
  font-size: 17px;
  color: var(--emerald);
}

.slider-wrap {
  margin-top: 6px;
  background: rgba(5, 8, 20, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.slider-wrap label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-1);
  margin-bottom: 8px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
  cursor: pointer;
}

/* Patent Figure Gallery (White Technical Paper Style!) */
.patent-gallery {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 22px;
  align-items: start;
}

.fig-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fig-btn {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s;
}

.fig-btn strong {
  display: block;
  color: #fff;
  font-size: 13.5px;
}

.fig-btn small {
  color: var(--text-2);
  font-size: 11.5px;
}

.fig-btn.active {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.14);
}

.patent-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 2px solid #cbd5e1;
}

.patent-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-family: "Courier New", monospace;
  font-size: 12.5px;
  font-weight: 700;
  gap: 10px;
  flex-wrap: wrap;
}

.patent-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  background: #fff;
}

.patent-svg-wrap svg {
  width: 100%;
  max-width: 680px;
  height: auto;
}

.patent-sheet-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #334155;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.8px;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 179, 255, 0.1);
  vertical-align: top;
}

th {
  background: rgba(56, 189, 248, 0.1);
  color: #e0f2fe;
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

code {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

/* Prior Art Filter */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--cyan);
  color: #fff;
}

/* NIH Bar Chart */
.bar-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.bar-item label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 5px;
}

.bar-track {
  height: 11px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* USPTO Workbench */
.workbench-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
}

.fee-total {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.fee-total strong {
  font-size: 32px;
  color: var(--emerald);
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(5, 8, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13.5px;
}

.checklist input[type="checkbox"] {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  accent-color: var(--emerald);
  flex-shrink: 0;
  cursor: pointer;
}

.checklist li.done {
  border-color: rgba(52, 211, 153, 0.4);
  opacity: 0.8;
}

.draft-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.draft-box {
  background: #060a18;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  max-height: 490px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.6px;
  line-height: 1.72;
  color: #dbeafe;
  white-space: pre-wrap;
}

.copy-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Revenue Simulator */
.rev-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.rev-metric {
  background: rgba(5, 8, 20, 0.78);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px;
}

.rev-metric small {
  display: block;
  color: var(--text-2);
  font-size: 11.5px;
}

.rev-metric strong {
  font-size: 22px;
  color: var(--cyan);
}

/* Domain Cards */
.domain-chip {
  display: inline-block;
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #e9d5ff;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  margin: 4px 4px 0 0;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}

.step-num {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: #03111c;
  background: var(--grad-hero);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.step-card ul {
  margin-top: 10px;
  padding-left: 18px;
  color: var(--text-1);
  font-size: 13.5px;
}

.step-card li {
  margin-bottom: 6px;
}

/* Safety Disclaimer */
.disclaimer-box {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.12), rgba(16, 24, 48, 0.92));
  border: 1px solid rgba(251, 113, 133, 0.42);
  border-radius: 20px;
  padding: 26px;
}

.disclaimer-box h3 {
  color: #fda4af;
  margin-bottom: 10px;
}

footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #064e3b;
  color: #ecfdf5;
  border: 1px solid #34d399;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .sim-layout,
  .workbench-grid,
  .patent-gallery {
    grid-template-columns: 1fr;
  }
  .grid-3, .grid-4, .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-strip, .sim-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .timeline, .rev-metrics {
    grid-template-columns: 1fr;
  }
  .kpi-strip, .sim-tabs {
    grid-template-columns: 1fr;
  }
}
