:root {
  --bg: #08080a;
  --bg-raised: #0e0e12;
  --bg-surface: #131318;
  --bg-hover: #1a1a21;
  --bg-active: #1f1f28;
  --border: #1e1e28;
  --border-mid: #2a2a36;
  --border-bright: #3a3a4a;
  --text-0: #f0eee9;
  --text-1: #c4c2bb;
  --text-2: #8a8880;
  --text-3: #5c5a55;
  --amber: #c9a227;
  --amber-dim: rgba(201, 162, 39, 0.1);
  --display: "Fraunces", Georgia, serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

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

body {
  font-family: var(--body);
  background: radial-gradient(circle at 15% -20%, rgba(201, 162, 39, 0.08), transparent 45%), var(--bg);
  color: var(--text-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--amber);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.muted {
  color: var(--text-2);
}

.small {
  font-size: 12px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.9);
  backdrop-filter: blur(14px) saturate(160%);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.logo-main,
.logo-tld {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.logo-main {
  color: var(--text-0);
}

.logo-tld {
  color: var(--amber);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.3px;
}

.header-link:hover {
  color: var(--text-1);
}

.header-source {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-strip {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -0.5px;
}

.hero-title em {
  color: var(--amber);
  font-style: italic;
  font-weight: 400;
}

#heroLocation {
  white-space: nowrap;
}

.hero-sub {
  margin-top: 10px;
  max-width: 560px;
  color: var(--text-2);
  font-size: 15px;
}

.hero-stats {
  display: flex;
  gap: 1px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
  flex-shrink: 0;
}

.hero-stat {
  min-width: 160px;
  padding: 16px 18px;
  background: var(--bg-raised);
}

.hero-stat-val {
  font-family: var(--display);
  font-size: clamp(19px, 1.8vw, 26px);
  line-height: 1.1;
  color: var(--text-0);
  font-weight: 300;
}

.hero-stat-label {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

.toolbar-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 420px;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text-0);
  font-family: var(--body);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search::placeholder {
  color: var(--text-3);
}

.search:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-dim);
}

.toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}

.quick-pills {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill:hover {
  border-color: var(--border-mid);
  color: var(--text-1);
  background: var(--bg-hover);
}

.pill.on {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

.pill .pill-icon {
  font-size: 11px;
}

.industry-btn {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.industry-btn:hover {
  border-color: var(--border-mid);
  color: var(--text-1);
  background: var(--bg-hover);
}

.industry-btn.has-filter {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

.industry-chevron {
  font-size: 10px;
  transition: transform 0.2s;
}

.industry-btn.open .industry-chevron {
  transform: rotate(90deg);
}

.active-filters {
  margin-top: 10px;
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-filters.visible {
  display: flex;
}

.af-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-right: 4px;
}

#afTags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.af-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.af-x {
  cursor: pointer;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1;
  border: 0;
  background: transparent;
  padding: 0;
}

.af-x:hover {
  color: #f87171;
}

.af-clear {
  font-size: 11.5px;
  color: var(--text-3);
  cursor: pointer;
  margin-left: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  border: 0;
  background: transparent;
  padding: 0;
}

.af-clear:hover {
  color: var(--text-2);
}

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.panel.open {
  transform: translateX(0);
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
}

.panel-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-0);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.ind-group {
  border-bottom: 1px solid var(--border);
}

.ind-group-header {
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.ind-group-header:hover {
  background: var(--bg-hover);
}

.ind-group-left {
  display: inline-flex;
  align-items: center;
}

.ind-group-chevron {
  font-size: 11px;
  color: var(--text-3);
  transition: transform 0.2s;
  margin-right: 8px;
}

.ind-group.expanded .ind-group-chevron {
  transform: rotate(90deg);
}

.ind-group-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-0);
}

.ind-group-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.ind-subs {
  display: none;
  padding: 0 0 8px;
}

.ind-group.expanded .ind-subs {
  display: block;
}

.ind-sub {
  padding: 6px 24px 6px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text-2);
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

.ind-sub:hover {
  background: var(--bg-hover);
  color: var(--text-0);
}

.ind-sub.selected {
  color: var(--amber);
  background: var(--amber-dim);
}

.ind-sub-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

.table-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.table-toolbar h1 {
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 400;
  letter-spacing: -0.2px;
}

#plans {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(14, 14, 18, 0.75);
  font-family: var(--body);
}

#plans thead th {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  text-align: left;
  padding: 9px 12px;
}

#plans td.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#plans td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--body);
  font-size: 13px;
  color: var(--text-0);
  vertical-align: middle;
  white-space: nowrap;
}

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

#plans tbody tr {
  transition: background 0.1s;
  cursor: pointer;
}

#plans tbody tr:hover {
  background: var(--bg-hover);
}

#plans td:first-child a,
#plans .col-name {
  color: var(--text-0);
  font-family: var(--body);
  font-weight: 600;
  transition: color 0.15s;
  display: inline-block;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#plans tbody tr:hover .col-name,
#plans td:first-child a:hover {
  color: var(--amber);
}

#plans .col-num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-0);
}

.col-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.col-minibar {
  width: 48px;
  height: 3px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.col-minibar-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 2px;
  transition: width 0.4s ease;
}

#plans td.industry-col {
  max-width: 350px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#plans.filtered .industry-col {
  display: none;
}

.error {
  display: none;
  margin-top: 14px;
  white-space: pre-wrap;
  color: #ffc9cf;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.92);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 32px 28px;
}

.site-footer h2 {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-3);
  margin-bottom: 16px;
}

.columns {
  columns: 4 160px;
  column-gap: 24px;
  margin-bottom: 20px;
}

.columns a {
  display: inline-block;
  width: 100%;
  font-size: 13px;
  color: var(--amber);
  opacity: 0.75;
  padding: 2px 0;
  break-inside: avoid;
}

.columns a:hover {
  opacity: 1;
}

@media (max-width: 1100px) {
  .hero-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-stat {
    flex: 1 1 220px;
  }
}

@media (max-width: 900px) {
  .header-inner,
  .hero-strip,
  .toolbar-wrap,
  .table-section,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-right {
    gap: 12px;
  }

  .header-source {
    display: none;
  }

  .toolbar {
    gap: 10px;
  }

  .toolbar-divider {
    display: none;
  }

  .pill,
  .industry-btn {
    font-size: 12px;
  }

  .columns {
    columns: 2 140px;
  }
}

@media (max-width: 700px) {
  .search-box {
    flex-basis: 100%;
  }

  .panel {
    max-width: 100vw;
  }
}
