/* ------------------------------------------------------
   Atlas UI
------------------------------------------------------ */

.filters{margin-top:18px}
.filters__row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.filters__row input, .filters__row select{
  padding:12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(20,35,70,.18);
  background: white;
  min-width: 220px;
}
.filters__row input:focus, .filters__row select:focus{
  outline:none;
  border-color: rgba(31,111,230,.55);
  box-shadow: 0 0 0 4px rgba(31,111,230,.12);
}

.atlas-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:18px;
}

/* 4 columns for provider sections (and allow shrink) */
.atlas-grid--provider{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.atlas-section{margin-top:26px}
.atlas-section--alt{
  background: linear-gradient(180deg, rgba(15,27,94,.045), rgba(255,255,255,0));
  border-radius: 22px;
  padding: 20px;
}

.atlas-section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding-bottom:8px;
  border-bottom: 1px solid rgba(20,35,70,.08);
}
.atlas-section__head h2{margin:0; font-size:22px}
.atlas-section__head .muted{margin:4px 0 0}
.atlas-section__actions{white-space:nowrap}

.atlas-card{
  background: white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 35px rgba(12,25,55,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display:flex;
  flex-direction:column;
  min-width: 0;
  position: relative; /* needed for overlay hit */
}
.atlas-card:hover{
  transform: translateY(-3px);
  border-color: rgba(31,111,230,.18);
  box-shadow: 0 22px 38px rgba(12,25,55,.12);
}

.atlas-card__top{display:flex; justify-content:space-between; align-items:center}
.atlas-provider{font-weight:800; color: rgba(20,35,70,.80); font-size:12px}
.atlas-status{
  font-size:11px;
  color: rgba(20,35,70,.6);
  background: rgba(20,35,70,.06);
  padding:4px 8px;
  border-radius:999px;
}

/* full-card clickable overlay */
.atlas-card__hit{
  position:absolute;
  inset:0;
  border-radius: 18px;
  z-index: 2;
}

/* keep links above overlay */
.atlas-meta{
  position: relative;
  z-index: 3;
}
.atlas-meta a{
  position: relative;
  z-index: 3;
}
.atlas-card__hit:focus-visible{
  outline: 3px solid rgba(31,111,230,.45);
  outline-offset: 3px;
}

.atlas-name{
  margin-top:8px;
  font-size:18px;
  font-weight:800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atlas-desc{
  margin-top:6px;
  color: rgba(20,35,70,.65);
  line-height:1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.atlas-price{
  margin-top:auto;
  margin-bottom:6px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap:10px;
  padding:10px;
  border-radius:12px;
  border: 1px dashed rgba(20,35,70,.12);
  background: rgba(20,35,70,.02);
}
.atlas-price__label{font-size:11px; color: rgba(20,35,70,.6); text-transform:uppercase; letter-spacing:.12em}
.atlas-price__value{font-weight:800; margin-top:4px; font-size:16px}
.atlas-meta{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  font-size:12px;
}
.atlas-source{font-weight:700; color: rgba(31,111,230,.95)}
.atlas-source.muted{color: rgba(20,35,70,.45); font-weight:600}
.atlas-foot{
  margin-top:6px;
  font-size:12px;
}
.atlas-missing{
  margin-top:8px;
  font-size:12px;
  color:#5d6b85;
}

.info-panel{
  margin-top:16px;
  background: linear-gradient(120deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(12,25,55,.10);
  backdrop-filter: blur(16px);
  position:relative;
  overflow:hidden;
}
.info-panel::after{
  content:"";
  position:absolute;
  inset:-1px;
  background: radial-gradient(180px 80px at 20% 0%, rgba(46,191,255,.25), transparent 60%);
  pointer-events:none;
  opacity:.65;
}
.info-panel__title{
  font-weight:800;
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#1a2a5a;
}
.info-panel__body{
  margin-top:8px;
  color:#3f4c66;
  line-height:1.55;
}

.link{color: var(--blue); font-weight:700}
.link:hover{text-decoration:underline}

/* Provider grid responsive behavior */
@media (max-width: 980px){
  .atlas-grid--provider{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters__row input, .filters__row select{min-width: 100%}
}
@media (max-width: 640px){
  .atlas-grid--provider{ grid-template-columns: 1fr; }
}

/* ---- View toggle (API vs Subscriptions) ---- */
.atlas-toggle{
  margin-top: 14px;
  display:inline-flex;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,27,94,.12), rgba(20,35,70,.08));
  border: 1px solid rgba(20,35,70,.12);
  box-shadow:
    0 12px 28px rgba(12,25,55,.08),
    0 0 0 1px rgba(46,191,255,.12),
    0 0 24px rgba(46,191,255,.18);
}
.atlas-toggle__tab{
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 850;
  font-size: 13px;
  color: rgba(20,35,70,.72);
}
.atlas-toggle__tab:hover{
  background: rgba(255,255,255,.85);
}
.atlas-toggle__tab.is-active{
  background: #0f1b5e;
  box-shadow: 0 12px 26px rgba(12,25,55,.16);
  color: #eef3ff;
}

/* ---- Subscriptions view ---- */
.substack{display:grid; gap:14px; margin-top: 14px;}
.subprov{background: rgba(255,255,255,.65); border-radius: 16px; padding: 12px;}
.subprov__head{display:flex; align-items:center; justify-content:space-between; margin-bottom: 8px;}
.subprov__title{margin:0; font-size:16px}

.subtable{display:grid; gap:0; border-radius: 14px; overflow:hidden;}
.subrow{
  display:grid;
  grid-template-columns: 1.2fr .45fr 1.2fr .25fr;
  gap: 12px;
  padding: 10px 12px;
  align-items:center;
}
.subrow--head{
  background: rgba(20,35,70,.06);
  font-weight: 900;
  color: rgba(20,35,70,.75);
}
.subrow:not(.subrow--head):nth-child(odd){
  background: rgba(255,255,255,.75);
}
.subrow:not(.subrow--head):nth-child(even){
  background: rgba(255,255,255,.55);
}
.subcell--right{justify-self:end; text-align:right;}
.subplan{font-weight:900}
.subbilling{font-size:12px}
.subprice{font-weight:900; font-variant-numeric: tabular-nums;}
.sub-updated{
  margin-left:10px;
  padding-left:10px;
  border-left: 1px solid rgba(20,35,70,.12);
  font-weight:700;
  color:#3f4c66;
}
.subsrc{font-weight:900; color: rgba(31,111,230,.95);}
.subsrc--muted{opacity:.35}

@media (max-width: 980px){
  .subtable{gap:10px}
  .subrow{grid-template-columns: 1fr; gap:8px; border:1px solid rgba(20,35,70,.10); border-radius:14px;}
  .subrow--head{display:none}
  .subcell{display:flex; gap:10px; align-items:flex-start}
  .subcell::before{
    content: attr(data-label);
    min-width:88px;
    font-weight:700;
    color: rgba(20,35,70,.65);
  }
  .subcell--right{justify-self:start; text-align:left;}
  .subnotes:empty::after{content:"—"; color: rgba(20,35,70,.45);}
}

/* Model detail price */
.model-price{
  margin-top:18px;
  background: white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 35px rgba(12,25,55,.08);
}
.model-price__grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap:12px;
}
.model-price__item{
  background: rgba(20,35,70,.02);
  border: 1px dashed rgba(20,35,70,.12);
  border-radius:12px;
  padding:10px;
}
.model-price__label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color: rgba(20,35,70,.6);
}
.model-price__value{font-weight:800; margin-top:4px}
.model-price__meta{
  margin-top:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
}

 /* ------------------------------------------------------
   Overview (dense zebra + bars, no card)
------------------------------------------------------ */

.atlas-overview .atlas-section__head{ align-items:flex-start; }

.atlas-overview__controls{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.atlas-overview__control{ display:flex; gap:8px; align-items:center; }

.atlas-overview__select{
  padding:10px 12px;
  border-radius:14px;
  border: 1px solid rgba(20,35,70,.18);
  background:#fff;
  font-size:13px;
}
.atlas-overview__select:focus{
  outline:none;
  border-color: rgba(31,111,230,.55);
  box-shadow: 0 0 0 4px rgba(31,111,230,.12);
}
.atlas-overview__pill{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(20,35,70,.12);
  background: rgba(255,255,255,.85);
  color: rgba(20,35,70,.78);
  font-weight:800;
  font-size:12px;
}

.overview-axis{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  padding: 10px 2px 10px;
  border-bottom: 1px solid rgba(20,35,70,.08);
}

/* list container (no card) */
.ovtable--bars{
  margin-top: 2px;
}

/* row */
.ovtr{
  position: relative;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(20,35,70,.08);
  background: transparent;
}
.ovtr:nth-child(odd){ background: rgba(20,35,70,.018); }
.ovtr:nth-child(even){ background: rgba(20,35,70,0); }
.ovtr:hover{ background: rgba(31,111,230,.045); }

.ovtr__hit{
  position:absolute;
  inset:0;
  z-index:1;
}

/* grid layout: left | bar | right */
.ovtr__grid{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns: minmax(280px, 1.2fr) 1.8fr auto;
  gap: 12px;
  align-items:center;
}

.ovtr__left{
  min-width:0;
  display:flex;
  align-items:baseline;
  gap: 10px;
  overflow:hidden;
}
.ovtr__provider{
  font-weight:750;
  color: rgba(20,35,70,.78);
  white-space:nowrap;
}
.ovtr__dot{ color: rgba(20,35,70,.35); }
.ovtr__model{
  font-weight:900;
  color: rgba(20,35,70,.92);
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* bar */
.ovtr__bar{
  height: 7px;
  border-radius: 999px;
  background: rgba(20,35,70,.06);
  overflow:hidden;
}
.ovtr__bar span{
  display:block;
  height:100%;
  width: calc(var(--pct, 0) * 1%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(31,111,230,.55), rgba(255,125,46,.70));
}

.ovtr__right{
  display:flex;
  align-items:center;
  gap: 10px;
  justify-self:end;
  white-space:nowrap;
}
.ovtr__price{
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgba(20,35,70,.92);
}
.ovtr__unit{
  font-weight: 750;
  color: rgba(20,35,70,.60);
  margin-left: 4px;
}

/* info button (subtle) */
.ovtr__info{
  width: 26px;
  height: 26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  border: 0;
  background: rgba(20,35,70,.04);
  color: rgba(20,35,70,.70);
  cursor:pointer;
  text-decoration:none;
}
.ovtr__info:hover{
  background: rgba(20,35,70,.07);
  color: rgba(20,35,70,.88);
}
.ovtr__info:focus-visible{
  outline:none;
  box-shadow: 0 0 0 4px rgba(31,111,230,.14);
}
.ovtr__info--muted{
  opacity:.30;
  background: transparent;
}

/* missing values */
.ovtr--missing{ opacity: .65; }
.ovtr--missing .ovtr__bar span{ width: 0%; }

/* tooltip */
.ovtip{
  position:absolute;
  z-index:999;
  min-width: 260px;
  max-width: 360px;
  background: #0b1324;
  color: rgba(235,245,255,.95);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,.28);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.ovtip--on{
  opacity: 1;
  transform: translateY(-18px);
  pointer-events: auto;
}
.ovtip__title{
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 6px;
}
.ovtip__link{
  color: rgba(180,220,255,.95);
  font-weight: 800;
  font-size: 12px;
  word-break: break-all;
}
.ovtip__link:hover{ text-decoration: underline; }

/* responsive */
@media (max-width: 980px){
  .ovtr__grid{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ovtr__right{ justify-self:start; }
}

/* =========================
   Overview: dense bar chart
   ========================= */

.overview-axis--tight{
  display:flex;
  justify-content:space-between;
  padding: 8px 0 6px;
  font-size: 12px;
  border-bottom: 1px solid rgba(20,35,70,.08);
}

.ovchart{
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden; /* keeps bars clipped */
}

/* dense, borderless zebra rows */
.ovrow{
  position: relative;
  padding: 0;
  background: transparent;
}
.ovrow:nth-child(odd){ background: rgba(20,35,70,.018); }
.ovrow:nth-child(even){ background: rgba(20,35,70,.00); }

.ovrow:hover{
  background: rgba(31,111,230,.045);
}

/* clickable overlay */
.ovrow__hit{
  position:absolute;
  inset:0;
  z-index: 1;
}

/* bar fill behind text */
.ovrow__fill{
  position:absolute;
  left:0; top:0; bottom:0;
  width: var(--bar, 0%);
  z-index: 0;
  opacity: .20;
  background: linear-gradient(90deg, rgba(31,111,230,.55), rgba(255,125,46,.65));
}

/* layout: label | price | source (tight) */
.ovrow__grid{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 26px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;     /* <- compression knob */
  line-height: 1.15;
}

/* single-line label */
.ovrow__label{
  min-width: 0;
  font-weight: 850;
  color: rgba(20,35,70,.92);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size: 14px;
}
.ovrow__provider{ opacity: .90; }
.ovrow__dot{ opacity: .55; margin: 0 6px; }
.ovrow__model{ opacity: .95; }

/* right price */
.ovrow__price{
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: rgba(20,35,70,.92);
}
.ovrow__unit{
  font-weight: 800;
  opacity: .65;
  margin-left: 4px;
  font-size: 12px;
}

/* source link: hidden until hover (keeps overview “clean”) */
.ovrow__src{
  position: relative;
  z-index: 3;                 /* above overlay */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9px;
  color: rgba(20,35,70,.55);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(20,35,70,.10);
  opacity: 0;
  pointer-events: auto;
  transition: opacity .12s ease, transform .12s ease;
  transform: translateY(1px);
}
.ovrow:hover .ovrow__src,
.ovrow:focus-within .ovrow__src{
  opacity: 1;
  transform: translateY(0);
}
.ovrow__src:hover{
  color: rgba(20,35,70,.85);
  background: rgba(255,255,255,.92);
}
.ovrow__src--muted{
  opacity: .25 !important;
  border-style: dashed;
}

/* missing rows: muted + no bar */
.ovrow--missing{
  opacity: .70;
}
.ovrow--missing .ovrow__fill{
  width: 0% !important;
}

/* small note */
.overview-note{
  margin-top: 10px;
  font-size: 12px;
}

/* responsive: keep it one-line as long as possible */
@media (max-width: 640px){
  .ovrow__grid{
    grid-template-columns: 1fr auto;
  }
  .ovrow__src{ display:none; }
}

/* Blog */
.blog-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}
.blog-card{
  background: white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 35px rgba(12,25,55,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-thumb{
  display:block;
  border-radius:16px;
  overflow:hidden;
  margin-bottom:12px;
  aspect-ratio: 16 / 9;
  background: #edf1f8;
}
.blog-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.blog-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(12,25,55,.14);
  border-color: rgba(31,111,230,.22);
}
.blog-meta{font-size:12px; color:#5d6b85; text-transform:uppercase; letter-spacing:.12em}
.blog-title{margin:10px 0 8px; font-size:22px}
.blog-title a{color:#0b1324}
.blog-title a:hover{text-decoration:underline}
.blog-excerpt{margin:0 0 12px; color:#3f4c66; line-height:1.55}
.blog-link{color: var(--blue); font-weight:700}
.blog-link:hover{text-decoration:underline}

.blog-detail h1{margin-bottom:8px}
.blog-detail__meta{margin-bottom:12px}
.blog-hero{
  margin: 16px 0 18px;
  border-radius: 22px;
  overflow:hidden;
  box-shadow: 0 18px 35px rgba(12,25,55,.10);
  background:#edf1f8;
}
.blog-hero img{
  width:100%;
  display:block;
  object-fit:cover;
}
.blog-body{line-height:1.7; color:#1a2440}
.blog-body p{margin:0 0 14px}

/* Learn */
.learn-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:16px;
}
.learn-card{
  background: white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 35px rgba(12,25,55,.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.learn-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(12,25,55,.14);
  border-color: rgba(46,191,255,.25);
}
.learn-meta{font-size:12px; color:#5d6b85; text-transform:uppercase; letter-spacing:.12em}
.learn-title{margin:10px 0 8px; font-size:22px}
.learn-title a{color:#0b1324}
.learn-title a:hover{text-decoration:underline}
.learn-excerpt{margin:0 0 12px; color:#3f4c66; line-height:1.55}
.learn-link{color: rgba(31,111,230,.95); font-weight:700}
.learn-link:hover{text-decoration:underline}

.learn-detail h1{margin-bottom:8px}
.learn-detail__meta{margin-bottom:12px}
.learn-body{line-height:1.7; color:#1a2440}
.learn-body p{margin:0 0 14px}

.learn-coming{
  background: linear-gradient(135deg, rgba(15,27,94,.08), rgba(31,111,230,.08));
  border: 1px solid rgba(20,35,70,.12);
  border-radius: 24px;
  padding: 38px;
  box-shadow: 0 24px 45px rgba(12,25,55,.10);
  position: relative;
  overflow:hidden;
}
.learn-coming::after{
  content:"";
  position:absolute;
  right:-80px;
  top:-80px;
  width:200px;
  height:200px;
  background: radial-gradient(circle, rgba(31,111,230,.25), transparent 60%);
}
.learn-coming__badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: rgba(31,111,230,.12);
  color:#1f44c5;
  font-weight:700;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  padding:8px 12px;
  border-radius:999px;
}
.learn-coming h1{margin:14px 0 10px}
.learn-coming .lead{color:#3f4c66; max-width:640px}
.learn-coming__cta{
  margin-top:18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.table{
  margin-top:16px;
  background: white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 18px 35px rgba(12,25,55,.06);
}
.table__head, .table__row{
  display:grid;
  gap:12px;
  padding: 12px 14px;
  align-items:center;
}
.table__head{
  background: rgba(31,111,230,.06);
  font-weight:800;
  color: rgba(20,35,70,.75);
}
.table__row{
  border-top: 1px solid rgba(20,35,70,.08);
  color: rgba(20,35,70,.80);
}
.table__row:hover{background: rgba(20,35,70,.02)}

.crumbs{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px}
.pill-row{display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 18px}
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20,35,70,.12);
  background: rgba(255,255,255,.85);
  color: rgba(20,35,70,.75);
  font-weight:800;
  font-size:12px;
}

.changelog{margin-top:18px; display:grid; gap:12px}
.change{
  background:white;
  border: 1px solid rgba(20,35,70,.10);
  border-radius:18px;
  padding: 14px 16px;
  box-shadow: 0 18px 35px rgba(12,25,55,.06);
}
.change__meta{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.change__title{margin-top:8px; font-weight:900; font-size:16px}
.change__summary{margin-top:6px; color: rgba(20,35,70,.70); line-height:1.5}
