/* ============================================================
   PEPTIDE ATLAS · v2 design system
   White and black. Apple / Tesla energy, no purple.
   ============================================================ */

:root{
  --bg:            #ffffff;
  --bg-2:          #f5f5f5;
  --surface:       #ffffff;
  --surface-2:     #f3f3f3;
  --surface-solid: #ffffff;
  --line:          rgba(0,0,0,.08);
  --line-2:        rgba(0,0,0,.16);

  --text:          #111111;
  --text-2:        #3a3a3a;
  --text-3:        #6d6d6d;

  --accent:        #111111;
  --accent-2:      #111111;
  --accent-soft:   rgba(0,0,0,.05);
  --accent-line:   rgba(0,0,0,.22);

  --green:         #0c7a43;
  --amber:         #8a5a00;
  --red:           #c42323;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(.22,.8,.3,1);
  --spring: cubic-bezier(.34,1.4,.4,1);

  --maxw: 1160px;
  --nav-h: 64px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;
  min-height:100vh;
}
::selection{ background:var(--accent-soft); color:var(--text); }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
input,select{ font:inherit; color:inherit; }
a{ color:var(--accent-2); text-decoration:none; }
kbd{
  font-family:var(--font-mono); font-size:11px; color:var(--text-3);
  background:var(--surface); border:1px solid var(--line);
  border-radius:6px; padding:2px 6px;
}
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ambient background */
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background: var(--bg);
}

/* ---------- top nav ---------- */
.topnav{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:20px;
  height:var(--nav-h); padding:0 clamp(16px,4vw,32px);
  background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:saturate(1.4) blur(16px);
  backdrop-filter:saturate(1.4) blur(16px);
  border-bottom:1px solid transparent;
  transition:border-color .3s var(--ease);
}
.topnav.scrolled{ border-bottom-color:var(--line); }
.brand{ display:flex; align-items:center; gap:10px; color:var(--text); }
.brand-mark{ width:28px; height:28px; color:var(--accent-2); display:grid; place-items:center; }
.brand-mark svg{ width:100%; height:100%; }
.brand-word{ font-family:var(--font-display); font-weight:700; font-size:19px; letter-spacing:-.02em; }
.brand-word em{ font-style:normal; color:var(--text-2); font-weight:500; }

.topnav-links{ display:flex; align-items:center; gap:2px; margin-left:8px; }
.topnav-links > button{
  padding:8px 14px; border-radius:999px; font-size:14px; font-weight:500;
  color:var(--text-2); transition:.2s var(--ease);
}
.topnav-links > button:hover{ color:var(--text); background:var(--surface); }
.nav-calc{
  display:flex; align-items:center; gap:7px;
  background:var(--surface); border:1px solid var(--line);
  color:var(--text) !important; margin-left:6px;
}
.nav-calc svg{ width:15px; height:15px; }
.nav-calc:hover{ background:var(--surface-2); border-color:var(--line-2); }

.nav-search{
  margin-left:auto; display:flex; align-items:center; gap:9px;
  padding:8px 12px 8px 14px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line);
  color:var(--text-2); font-size:13.5px; transition:.2s var(--ease);
}
.nav-search:hover{ background:var(--surface-2); color:var(--text); border-color:var(--line-2); }
.nav-search svg{ width:15px; height:15px; }
.nav-burger{ display:none; }

/* ---------- home hero ---------- */
main{ display:block; }
.home{
  max-width:var(--maxw); margin:0 auto;
  padding:clamp(56px,10vh,120px) clamp(20px,4vw,32px) 40px;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:11.5px; letter-spacing:.18em;
  text-transform:uppercase; color:var(--text-3); margin-bottom:26px;
}
.eyebrow::before,.eyebrow::after{ content:""; width:24px; height:1px; background:var(--line-2); }
.hero-title{
  font-family:var(--font-display);
  font-size:clamp(40px,7.2vw,88px);
  font-weight:600; letter-spacing:-.045em; line-height:1.02;
  margin-bottom:22px;
}
.hero-title .grad{
  color:var(--text);
}
.hero-sub{
  font-size:clamp(16px,2vw,19px); color:var(--text-2);
  max-width:620px; margin:0 auto 44px; line-height:1.6;
}

/* hero search */
.hero-search{ max-width:680px; margin:0 auto; position:relative; }
.search-pill{
  display:flex; align-items:center; gap:12px;
  background:var(--surface-solid);
  border:1px solid var(--line-2);
  border-radius:999px;
  padding:8px 8px 8px 22px;
  box-shadow:0 8px 30px rgba(0,0,0,.06);
  transition:border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
  cursor:text;
}
.search-pill:hover{ border-color:var(--accent-line); }
.search-pill:focus-within{
  border-color:var(--accent);
  box-shadow:0 8px 30px rgba(0,0,0,.08), 0 0 0 4px var(--accent-soft);
  transform:translateY(-1px);
}
.search-pill svg{ width:19px; height:19px; color:var(--text-3); flex:none; }
.search-pill input{
  flex:1; background:none; border:0; outline:0;
  font-size:16.5px; color:var(--text); padding:12px 0; min-width:0;
}
.search-pill input::placeholder{ color:var(--text-3); }
.search-go{
  flex:none; display:flex; align-items:center; gap:8px;
  background:var(--accent); color:#fff;
  font-weight:600; font-size:14.5px;
  padding:12px 22px; border-radius:999px;
  transition:.2s var(--ease);
}
.search-go:hover{ background:#333; transform:translateX(1px); }
.search-go svg{ width:15px; height:15px; color:#fff; }

.search-suggest{
  margin-top:16px; display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
  font-size:13.5px; color:var(--text-3);
}
.search-suggest span{ align-self:center; margin-right:2px; }
.chip{
  padding:7px 14px; border-radius:999px;
  background:var(--surface); border:1px solid var(--line);
  color:var(--text-2); font-size:13.5px; font-weight:500;
  transition:.2s var(--ease);
}
.chip:hover{ background:var(--surface-2); color:var(--text); border-color:var(--line-2); transform:translateY(-1px); }

/* category tiles */
.tiles{
  display:grid; grid-template-columns:repeat(5,1fr); gap:12px;
  max-width:880px; margin:40px auto 0;
}
.tile{
  display:flex; flex-direction:column; align-items:center; gap:12px;
  padding:24px 12px; border-radius:var(--r-md);
  background:var(--surface); border:1px solid var(--line);
  color:var(--text-2); font-size:14px; font-weight:600;
  transition:.25s var(--ease);
}
.tile svg{ width:22px; height:22px; color:var(--text-3); transition:.25s var(--ease); }
.tile:hover{
  background:var(--surface-2); color:var(--text);
  border-color:var(--accent-line); transform:translateY(-3px);
  box-shadow:0 12px 30px rgba(0,0,0,.4);
}
.tile:hover svg{ color:var(--accent-2); transform:scale(1.08); }

/* home stat strip */
.stat-strip{
  max-width:880px; margin:56px auto 0;
  display:flex; flex-wrap:wrap; justify-content:center; gap:12px 40px;
  color:var(--text-3); font-size:13px;
}
.stat-strip b{ color:var(--text); font-weight:600; font-family:var(--font-display); }

/* ---------- section headers ---------- */
.section{ max-width:var(--maxw); margin:0 auto; padding:48px clamp(20px,4vw,32px); }
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:16px; margin-bottom:28px; flex-wrap:wrap;
}
.section-head h2{
  font-family:var(--font-display); font-size:clamp(24px,3.4vw,34px);
  font-weight:600; letter-spacing:-.03em;
}
.section-head .link-more{ font-size:14px; font-weight:500; display:inline-flex; align-items:center; gap:6px; }
.section-head .link-more svg{ width:14px; height:14px; }

/* ---------- peptide grid ---------- */
.pep-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(255px,1fr)); gap:14px;
}
.pep-card{
  position:relative; text-align:left;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:20px;
  transition:.25s var(--ease); overflow:hidden;
}
.pep-card::after{
  content:""; position:absolute; inset:0; border-radius:inherit;
  background:radial-gradient(400px 120px at 50% -20%, var(--accent-soft), transparent 70%);
  opacity:0; transition:.3s var(--ease); pointer-events:none;
}
.pep-card:hover{
  background:var(--surface-2); border-color:var(--line-2);
  transform:translateY(-4px); box-shadow:0 16px 40px rgba(0,0,0,.45);
}
.pep-card:hover::after{ opacity:1; }
.pep-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.pep-cat{
  font-family:var(--font-mono); font-size:10px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--text-3);
}
.tier{
  font-family:var(--font-mono); font-size:10.5px; font-weight:500;
  padding:3px 8px; border-radius:999px; border:1px solid var(--line);
  color:var(--text-3);
}
.tier.t1{ color:var(--green); border-color:rgba(61,220,151,.35); }
.tier.t2{ color:var(--text); border-color:var(--line-2); }
.tier.t3{ color:var(--amber); border-color:rgba(255,180,84,.3); }
.pep-name{
  font-family:var(--font-display); font-size:19px; font-weight:600;
  letter-spacing:-.02em; margin-bottom:7px; line-height:1.2;
}
.pep-sum{ font-size:13.5px; color:var(--text-2); line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pep-route{
  margin-top:14px; padding-top:13px; border-top:1px solid var(--line);
  font-family:var(--font-mono); font-size:11px; color:var(--text-3);
  display:flex; align-items:center; gap:7px;
}
.pep-route::before{ content:""; width:5px; height:5px; border-radius:99px; background:var(--accent); }

/* ---------- results page ---------- */
.results-page{ max-width:880px; margin:0 auto; padding:36px clamp(20px,4vw,32px) 80px; }
.results-hero{ margin-bottom:26px; }
.tabs{
  display:flex; gap:6px; flex-wrap:wrap; margin:22px 0 8px;
  border-bottom:1px solid var(--line); padding-bottom:0;
}
.tab{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 16px; font-size:14px; font-weight:500; color:var(--text-2);
  border-bottom:2px solid transparent; margin-bottom:-1px;
  transition:.2s var(--ease);
}
.tab svg{ width:15px; height:15px; }
.tab:hover{ color:var(--text); }
.tab.active{ color:var(--text); border-bottom-color:var(--accent); }
.tab-caption{ font-size:13px; color:var(--text-3); margin:12px 0 22px; max-width:640px; }

.result-meta{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  margin:20px 0 16px; font-size:13px; color:var(--text-3);
}
.result-meta strong{ color:var(--text); font-weight:600; font-size:15px; }

.result-card{
  display:block; width:100%; text-align:left;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:22px 24px; margin-bottom:12px;
  transition:.22s var(--ease);
}
.result-card:hover{ background:var(--surface-2); border-color:var(--line-2); transform:translateY(-2px); }
.result-src{
  display:flex; align-items:center; gap:9px; margin-bottom:11px;
  font-size:12px; color:var(--text-3); flex-wrap:wrap;
}
.mini-badge{
  font-family:var(--font-mono); font-size:10px; font-weight:500;
  padding:3px 8px; border-radius:6px;
  background:var(--accent-soft); color:var(--accent-2);
  border:1px solid var(--accent-line);
}
.type-badge{
  margin-left:auto; font-family:var(--font-mono); font-size:10px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--text-3);
}
.result-title{ font-family:var(--font-display); font-size:20px; font-weight:600; letter-spacing:-.02em; margin-bottom:7px; line-height:1.25; }
.result-sum{ font-size:14px; color:var(--text-2); line-height:1.55; }
.result-foot{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line); font-size:12.5px; color:var(--text-3); }
.src-out{ display:inline-flex; align-items:center; gap:6px; font-weight:500; color:var(--accent-2); font-size:13px; }
.src-out svg{ width:13px; height:13px; }

.empty{
  text-align:center; padding:80px 24px; color:var(--text-2);
}
.empty svg{ width:40px; height:40px; color:var(--text-3); margin-bottom:16px; }
.empty h2{ font-family:var(--font-display); font-size:22px; font-weight:600; margin-bottom:8px; color:var(--text); }

/* ---------- stacking lab ---------- */
.stack-lab{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:26px; margin-bottom:28px;
}
.stack-lab > h2{ font-family:var(--font-display); font-size:20px; font-weight:600; letter-spacing:-.02em; margin-bottom:6px; }
.stack-lab > p{ font-size:13.5px; color:var(--text-3); margin-bottom:20px; }
.stack-selects{ display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.stack-selects .plus{ font-size:22px; color:var(--text-3); align-self:center; padding-bottom:12px; font-weight:300; }
.stack-field{ flex:1; min-width:200px; }
.stack-field label{ display:block; font-size:12px; font-weight:500; color:var(--text-3); margin-bottom:8px; }
.stack-field select{
  width:100%; appearance:none;
  background:var(--surface-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%239aa0ae' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border:1px solid var(--line-2); border-radius:var(--r-sm);
  padding:13px 40px 13px 16px; font-size:15px; color:var(--text);
  outline:0; transition:.2s var(--ease); cursor:pointer;
}
.stack-field select:hover{ border-color:var(--accent-line); }
.stack-field select:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }

.stack-verdict{ margin-top:22px; border-radius:var(--r-md); padding:20px; border:1px solid var(--line); background:var(--bg-2); }
.stack-verdict .verdict-tag{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--font-mono); font-size:11px; font-weight:500;
  padding:4px 11px; border-radius:999px; margin-bottom:12px;
}
.stack-verdict .verdict-tag::before{ content:""; width:6px; height:6px; border-radius:99px; background:currentColor; }
.stack-verdict h3{ font-family:var(--font-display); font-size:18px; font-weight:600; margin-bottom:8px; }
.stack-verdict p{ font-size:14px; color:var(--text-2); line-height:1.6; }
.v-good .verdict-tag{ color:var(--green); background:rgba(61,220,151,.1); border:1px solid rgba(61,220,151,.3); }
.v-mid .verdict-tag{ color:var(--amber); background:rgba(255,180,84,.08); border:1px solid rgba(255,180,84,.28); }
.v-bad .verdict-tag{ color:var(--red); background:rgba(255,107,107,.08); border:1px solid rgba(255,107,107,.28); }
.v-neutral .verdict-tag{ color:var(--text-2); background:var(--surface); border:1px solid var(--line); }
.stack-verdict .verdict-links{ margin-top:14px; display:flex; gap:16px; flex-wrap:wrap; }

/* popular stacks */
.stack-list{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; margin-top:8px; }
.stack-item{
  text-align:left; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-md); padding:18px; transition:.2s var(--ease);
}
.stack-item:hover{ background:var(--surface-2); border-color:var(--line-2); transform:translateY(-2px); }
.stack-item .si-pair{ display:flex; align-items:center; gap:8px; font-weight:600; font-size:15px; font-family:var(--font-display); margin-bottom:7px; flex-wrap:wrap; }
.stack-item .si-pair .plus{ color:var(--text-3); font-weight:300; }
.stack-item .si-label{ font-family:var(--font-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); margin-bottom:8px; }
.stack-item .si-body{ font-size:13px; color:var(--text-2); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ---------- detail sheet ---------- */
.sheet{
  border:0; padding:0; background:transparent; color:var(--text);
  max-width:640px; width:calc(100% - 32px); max-height:86vh;
  margin:auto; border-radius:var(--r-lg);
}
.sheet::backdrop{ background:rgba(0,0,0,.6); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.sheet-inner{
  background:var(--surface-solid); border:1px solid var(--line-2);
  border-radius:var(--r-lg); overflow:hidden auto; max-height:86vh;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.sheet-head{
  position:sticky; top:0; z-index:2;
  display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:26px 26px 18px;
  background:linear-gradient(var(--surface-solid) 75%, transparent);
}
.sheet-head .eyebrow{ margin-bottom:10px; }
.sheet-head .eyebrow::before,.sheet-head .eyebrow::after{ display:none; }
.sheet-head h2{ font-family:var(--font-display); font-size:clamp(22px,3vw,28px); font-weight:600; letter-spacing:-.03em; line-height:1.15; }
.icon-btn{
  flex:none; width:38px; height:38px; border-radius:999px;
  display:grid; place-items:center; color:var(--text-2);
  background:var(--surface); border:1px solid var(--line); transition:.2s var(--ease);
}
.icon-btn:hover{ color:var(--text); background:var(--surface-2); }
.icon-btn svg{ width:16px; height:16px; }
.sheet-body{ padding:0 26px 30px; }
.sheet-body > p.lead{ font-size:16px; color:var(--text); line-height:1.6; margin-bottom:20px; }
.fact-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:22px; }
.fact{
  background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-sm); padding:13px 15px;
}
.fact small{ display:block; font-size:11px; color:var(--text-3); margin-bottom:5px; }
.fact strong{ font-size:14.5px; font-weight:600; font-family:var(--font-display); letter-spacing:-.01em; }
.sheet-body h3{ font-family:var(--font-display); font-size:15px; font-weight:600; margin:22px 0 10px; color:var(--text); }
.sheet-body .note{ font-size:14px; color:var(--text-2); line-height:1.65; }
.sheet-source{
  display:flex; align-items:center; gap:13px; margin-top:24px;
  background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-md);
  padding:15px 17px; transition:.2s var(--ease);
}
.sheet-source:hover{ border-color:var(--accent-line); }
.sheet-source .mini-badge{ flex:none; }
.sheet-source .st{ flex:1; min-width:0; font-size:13.5px; font-weight:500; color:var(--text); }
.sheet-source .st small{ display:block; font-weight:400; font-size:12px; color:var(--text-3); margin-top:2px; }
.sheet-source svg{ width:15px; height:15px; color:var(--text-3); flex:none; }
.sheet-actions{ display:flex; gap:10px; margin-top:22px; flex-wrap:wrap; }
.disclaimer{ margin-top:22px; font-size:11px; color:var(--text-3); line-height:1.5; }

/* buttons */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 20px; border-radius:999px; font-size:14px; font-weight:600;
  background:var(--surface); border:1px solid var(--line-2); color:var(--text);
  transition:.2s var(--ease);
}
.btn:hover{ background:var(--surface-2); transform:translateY(-1px); }
.btn.primary{ background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.primary:hover{ background:var(--accent-2); }
.btn svg{ width:14px; height:14px; }

/* ---------- calculator ---------- */
.calc-page{ max-width:1000px; margin:0 auto; padding:36px clamp(20px,4vw,32px) 80px; }
.back-link{ display:inline-flex; align-items:center; gap:8px; font-size:14px; font-weight:500; color:var(--text-2); margin-bottom:30px; transition:.2s var(--ease); }
.back-link:hover{ color:var(--text); }
.back-link svg{ width:15px; height:15px; }
.calc-head{ margin-bottom:34px; }
.calc-head .eyebrow::before,.calc-head .eyebrow::after{ display:none; }
.calc-head h1{ font-family:var(--font-display); font-size:clamp(32px,5vw,48px); font-weight:600; letter-spacing:-.04em; margin-bottom:10px; }
.calc-head p{ color:var(--text-2); font-size:16px; }

.calculator{ display:grid; grid-template-columns:1.15fr .85fr; gap:18px; align-items:start; }
.calc-fields,.calc-result{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:26px;
}
.calc-fields h2{ font-family:var(--font-display); font-size:19px; font-weight:600; letter-spacing:-.02em; margin-bottom:5px; }
.calc-fields .micro{ font-size:12.5px; color:var(--text-3); margin-bottom:24px; }

.field{ margin-bottom:20px; }
.field > label{ display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:500; color:var(--text-2); margin-bottom:10px; }
.field .num{
  width:20px; height:20px; border-radius:6px; flex:none;
  display:grid; place-items:center; font-family:var(--font-mono); font-size:11px;
  background:var(--accent-soft); color:var(--accent-2); border:1px solid var(--accent-line);
}
.input-unit{ display:flex; align-items:center; background:var(--surface-solid); border:1px solid var(--line-2); border-radius:var(--r-sm); transition:.2s var(--ease); }
.input-unit:focus-within{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.input-unit input{ flex:1; background:none; border:0; outline:0; padding:14px 16px; font-size:17px; font-weight:500; min-width:0; }
.input-unit input::-webkit-outer-spin-button,.input-unit input::-webkit-inner-spin-button{ -webkit-appearance:none; }
.input-unit > span{ flex:none; padding:0 16px; color:var(--text-3); font-size:13.5px; border-left:1px solid var(--line); }
.input-unit select{ flex:none; background:none; border:0; outline:0; border-left:1px solid var(--line); padding:14px 14px; color:var(--text); font-size:14px; cursor:pointer; }
.presets{ display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.preset{
  padding:6px 12px; border-radius:999px; font-size:12.5px; font-weight:500;
  background:var(--surface); border:1px solid var(--line); color:var(--text-2); transition:.15s var(--ease);
}
.preset:hover{ background:var(--surface-2); color:var(--text); }
.preset.active{ background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-2); }

.calc-controls{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:6px; padding-top:20px; border-top:1px solid var(--line); }
.calc-controls .lab{ display:block; font-size:12px; font-weight:500; color:var(--text-3); margin-bottom:9px; }
.segmented{ display:inline-flex; background:var(--surface-solid); border:1px solid var(--line); border-radius:999px; padding:3px; }
.segmented button{ padding:7px 15px; border-radius:999px; font-size:13px; font-weight:500; color:var(--text-2); transition:.18s var(--ease); }
.segmented button.active{ background:var(--accent); color:#fff; }
.reset-btn{ font-size:13px; font-weight:500; color:var(--text-3); }
.reset-btn:hover{ color:var(--text); }
.calc-error{ margin-top:16px; font-size:13px; color:var(--red); min-height:0; }
.calc-error:empty{ display:none; }

.calc-result{ position:sticky; top:calc(var(--nav-h) + 18px); }
.calc-result .eyebrow::before,.calc-result .eyebrow::after{ display:none; }
.calc-big{
  font-family:var(--font-display); font-size:clamp(40px,5vw,54px); font-weight:700;
  letter-spacing:-.04em; line-height:1; margin:8px 0 4px;
  color:var(--text);
}
.calc-sub{ font-size:13px; color:var(--text-3); margin-bottom:22px; }
.ruler{ position:relative; height:34px; margin-bottom:22px; }
.ruler-track{ position:absolute; inset:auto 0 0 0; height:18px; display:flex; }
.ruler-track .tick{ flex:1; border-left:1px solid var(--line-2); position:relative; }
.ruler-track .tick span{ position:absolute; bottom:100%; left:0; transform:translateX(-50%); font-family:var(--font-mono); font-size:9px; color:var(--text-3); padding-bottom:3px; white-space:nowrap; }
.ruler-marker{
  position:absolute; bottom:0; width:2px; height:26px; background:var(--accent);
  border-radius:2px; left:var(--position,0%); transition:left .35s var(--spring);
  box-shadow:0 0 12px var(--accent);
}
.metrics{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.metric{ background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-sm); padding:12px 14px; }
.metric small{ display:block; font-size:11px; color:var(--text-3); margin-bottom:5px; }
.metric strong{ font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:-.01em; }
.calc-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:18px; border-top:1px solid var(--line); font-size:11px; color:var(--text-3); line-height:1.5; }
.calc-foot button{ display:inline-flex; align-items:center; gap:7px; flex:none; font-size:13px; font-weight:600; color:var(--accent-2); }
.calc-foot button:disabled{ color:var(--text-3); cursor:default; }
.calc-foot button svg{ width:14px; height:14px; }
.calc-help{ margin-top:22px; font-size:13px; color:var(--text-3); max-width:760px; line-height:1.65; }
.math-box{ margin-top:14px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md); padding:18px 20px; font-family:var(--font-mono); font-size:12.5px; color:var(--text-2); line-height:2; max-width:760px; }
.math-box b{ color:var(--text); }

/* ---------- command palette ---------- */
.palette{ position:fixed; inset:0; z-index:100; display:flex; align-items:flex-start; justify-content:center; padding:12vh 18px 18px; }
.palette[hidden]{ display:none; }
.palette-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); animation:fade .18s var(--ease); }
.palette-panel{
  position:relative; width:100%; max-width:600px;
  background:var(--surface-solid); border:1px solid var(--line-2);
  border-radius:18px; overflow:hidden;
  box-shadow:0 40px 100px rgba(0,0,0,.7);
  animation:pop .22s var(--spring);
}
@keyframes fade{ from{opacity:0} }
@keyframes pop{ from{opacity:0; transform:translateY(10px) scale(.98)} }
.palette-input{ display:flex; align-items:center; gap:13px; padding:17px 20px; border-bottom:1px solid var(--line); }
.palette-input svg{ width:18px; height:18px; color:var(--text-3); flex:none; }
.palette-input input{ flex:1; background:none; border:0; outline:0; font-size:17px; color:var(--text); }
.palette-input input::placeholder{ color:var(--text-3); }
.palette-results{ max-height:44vh; overflow:auto; padding:8px; }
.p-item{
  display:flex; align-items:center; gap:13px; width:100%; text-align:left;
  padding:11px 13px; border-radius:11px; transition:.12s var(--ease);
}
.p-item.active,.p-item:hover{ background:var(--surface-2); }
.p-item .pi-ico{ flex:none; width:34px; height:34px; border-radius:9px; display:grid; place-items:center; background:var(--surface); border:1px solid var(--line); color:var(--accent-2); }
.p-item .pi-ico svg{ width:16px; height:16px; }
.p-item .pi-main{ flex:1; min-width:0; }
.p-item .pi-name{ font-size:14.5px; font-weight:600; letter-spacing:-.01em; }
.p-item .pi-sub{ font-size:12px; color:var(--text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.p-item .pi-type{ flex:none; font-family:var(--font-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-3); }
.p-group{ padding:12px 13px 5px; font-family:var(--font-mono); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-3); }
.palette-foot{ display:flex; gap:18px; padding:11px 20px; border-top:1px solid var(--line); font-size:11.5px; color:var(--text-3); }
.palette-foot kbd{ margin-right:3px; }
.palette-empty{ padding:36px 20px; text-align:center; color:var(--text-3); font-size:14px; }

/* ---------- footer ---------- */
.footer{ border-top:1px solid var(--line); margin-top:40px; }
.footer-inner{
  max-width:var(--maxw); margin:0 auto; padding:34px clamp(20px,4vw,32px);
  display:flex; flex-wrap:wrap; gap:8px 26px; align-items:center; justify-content:space-between;
  font-size:12.5px; color:var(--text-3);
}
.footer-brand{ font-family:var(--font-display); font-weight:700; font-size:15px; color:var(--text-2); }
.footer-brand em{ font-style:normal; color:var(--text-3); font-weight:500; }

/* ---------- toast ---------- */
#toast{
  position:fixed; bottom:26px; left:50%; transform:translate(-50%,16px);
  background:var(--surface-solid); border:1px solid var(--line-2);
  color:var(--text); font-size:13.5px; font-weight:500;
  padding:12px 20px; border-radius:999px; z-index:200;
  opacity:0; pointer-events:none; transition:.25s var(--ease);
  box-shadow:0 16px 40px rgba(0,0,0,.5);
}
#toast.show{ opacity:1; transform:translate(-50%,0); }

/* ---------- reveal animation ----------
   Default: visible. JS adds .pre to stage the animation, then .in.
   This guarantees content never gets stuck invisible. */
.reveal{ opacity:1; transform:none; }
.reveal.pre{ opacity:0; transform:translateY(16px); }
.reveal.pre.in{ opacity:1; transform:none; transition:opacity .55s var(--ease), transform .55s var(--ease); }

/* ---------- dosing at a glance ---------- */
.dose-grid-wrap{ max-width:860px; margin:0 0 28px; }
.dose-title{ font-family:var(--font-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-3); margin-bottom:12px; }
.dose-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.dose-cell{
  background:linear-gradient(180deg,var(--surface-2),var(--surface));
  border:1px solid var(--line-2); border-radius:var(--r-md); padding:15px 16px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.dose-cell small{ display:block; font-size:11px; color:var(--text-3); margin-bottom:6px; text-transform:uppercase; letter-spacing:.06em; }
.dose-cell strong{ font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:-.01em; line-height:1.25; }
.dose-note{ margin-top:12px; font-size:12.5px; color:var(--text-3); line-height:1.55; max-width:640px; }

/* ---------- stacking lab · visual picker ---------- */
.stack-slots{ display:flex; align-items:stretch; gap:14px; flex-wrap:wrap; margin-bottom:4px; }
.stack-slot{ flex:1; min-width:220px; }
.stack-plus{ align-self:center; font-size:26px; font-weight:300; color:var(--text-3); padding-bottom:4px; }
.stack-empty{
  height:100%; min-height:76px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  border:1.5px dashed var(--line-2); border-radius:var(--r-md); color:var(--text-3); font-size:13.5px; font-weight:500;
}
.stack-empty svg{ width:18px; height:18px; }
.stack-sel-btn{
  width:100%; min-height:76px; display:flex; align-items:center; gap:12px; text-align:left;
  background:linear-gradient(180deg,var(--surface-2),var(--surface));
  border:1px solid var(--accent-line); border-radius:var(--r-md); padding:13px 15px;
  box-shadow:0 6px 20px rgba(0,0,0,.05);
  transition:.2s var(--ease);
}
.stack-sel-btn:hover{ border-color:var(--accent); transform:translateY(-1px); }
.ssb-ico{ flex:none; width:38px; height:38px; border-radius:10px; display:grid; place-items:center; background:var(--accent-soft); border:1px solid var(--accent-line); color:var(--accent-2); }
.ssb-ico svg{ width:17px; height:17px; }
.ssb-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.ssb-name{ font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:-.01em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ssb-cat{ font-family:var(--font-mono); font-size:10.5px; color:var(--text-3); margin-top:2px; }
.ssb-x{ flex:none; width:26px; height:26px; border-radius:99px; display:grid; place-items:center; color:var(--text-3); background:var(--surface); }
.ssb-x svg{ width:12px; height:12px; }
.stack-pick-label{ margin:22px 0 11px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--text-3); }
.stack-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.stack-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 14px; border-radius:999px; font-size:13.5px; font-weight:500;
  background:var(--surface); border:1px solid var(--line); color:var(--text-2);
  transition:.18s var(--ease);
}
.stack-chip .sc-ico{ width:15px; height:15px; display:grid; place-items:center; color:var(--text-3); }
.stack-chip .sc-ico svg{ width:15px; height:15px; }
.stack-chip:hover{ background:var(--surface-2); color:var(--text); border-color:var(--line-2); transform:translateY(-1px); }
.stack-chip.active{
  background:var(--accent-soft); border-color:var(--accent); color:var(--accent-2);
  box-shadow:0 0 0 1px var(--accent-line), 0 4px 16px rgba(0,0,0,.06);
}
.stack-chip.active .sc-ico{ color:var(--accent-2); }

/* verdict per-compound dose strip */
.stack-dose-pair{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.stack-dose-chip{
  flex:1; min-width:180px; display:flex; flex-direction:column; gap:3px; text-align:left;
  background:var(--bg-2); border:1px solid var(--line); border-radius:var(--r-sm); padding:11px 13px; transition:.18s var(--ease);
}
.stack-dose-chip:hover{ border-color:var(--accent-line); }
.sdc-name{ font-size:12px; font-weight:600; color:var(--text-2); text-transform:uppercase; letter-spacing:.05em; }
.sdc-dose{ font-family:var(--font-display); font-size:15px; font-weight:600; color:var(--text); letter-spacing:-.01em; }

/* ---------- 3-tier dosing card ---------- */
.tdose-card{
  max-width:860px; margin:0 0 28px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); overflow:hidden;
}
.tdose-head{
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  padding:18px 22px; border-bottom:1px solid var(--line);
}
.tdose-title{ font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:-.01em; }
.tdose-cycle{ font-family:var(--font-mono); font-size:11px; color:var(--text-3); }
.tdose-rows{ padding:8px 22px 4px; }
.tdose-row{
  display:flex; align-items:center; gap:16px;
  padding:13px 0; border-bottom:1px solid var(--line);
}
.tdose-row:last-child{ border-bottom:0; }
.tdose-tier{
  flex:none; display:inline-flex; align-items:center; gap:8px;
  width:118px; font-family:var(--font-mono); font-size:11px; font-weight:500;
  letter-spacing:.06em; text-transform:uppercase; color:var(--tc,var(--text-2));
}
.tdose-dot{ width:7px; height:7px; border-radius:99px; background:var(--tc,var(--text-2)); box-shadow:0 0 8px var(--tc,transparent); }
.tdose-amount{ flex:1; font-family:var(--font-display); font-size:19px; font-weight:700; letter-spacing:-.02em; }
.tdose-freq{ flex:none; font-size:13px; color:var(--text-2); }
.tdose-note{ padding:16px 22px 6px; font-size:13.5px; color:var(--text-2); line-height:1.6; border-top:1px solid var(--line); }
.tdose-src{ padding:0 22px 18px; font-size:11px; color:var(--text-3); }

/* ---------- plan builder ---------- */
.nav-plan{ }
.plan-form{ max-width:820px; margin-bottom:40px; }
.plan-fields{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:26px; }
.plan-field{ }
.plan-field label{ display:block; font-size:12px; font-weight:500; color:var(--text-3); margin-bottom:8px; }
.plan-field input{
  width:100%; background:var(--surface-solid); border:1px solid var(--line-2); border-radius:var(--r-sm);
  padding:13px 15px; font-size:16px; color:var(--text); outline:0; transition:.2s var(--ease);
}
.plan-field input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.plan-seg{ display:flex; background:var(--surface-solid); border:1px solid var(--line); border-radius:var(--r-sm); padding:3px; gap:3px; }
.plan-seg-btn{ flex:1; padding:10px; border-radius:8px; font-size:14px; font-weight:500; color:var(--text-2); transition:.18s var(--ease); }
.plan-seg-btn.active{ background:var(--accent); color:#fff; }
.plan-goals-label{ font-size:12px; font-weight:500; color:var(--text-3); margin-bottom:12px; }
.plan-goals{ display:flex; flex-wrap:wrap; gap:9px; margin-bottom:26px; }
.plan-goal{
  padding:11px 18px; border-radius:999px; font-size:14px; font-weight:500;
  background:var(--surface); border:1px solid var(--line); color:var(--text-2); transition:.18s var(--ease);
}
.plan-goal:hover{ background:var(--surface-2); color:var(--text); transform:translateY(-1px); }
.plan-goal.active{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-2); box-shadow:0 0 0 1px var(--accent-line), 0 4px 16px rgba(0,0,0,.06); }
.plan-build{ font-size:15px; padding:14px 28px; }
.plan-result{ max-width:860px; }
.plan-summary{ background:var(--surface); border:1px solid var(--accent-line); border-radius:var(--r-lg); padding:24px 26px; margin-bottom:22px; }
.plan-meta{ font-family:var(--font-display); font-size:18px; font-weight:600; letter-spacing:-.01em; margin-bottom:12px; }
.plan-goal-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.plan-tag{ font-size:12.5px; font-weight:600; padding:5px 13px; border-radius:999px; background:var(--accent-soft); color:var(--accent-2); border:1px solid var(--accent-line); }
.plan-items{ display:flex; flex-direction:column; gap:14px; }
.plan-item{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px 22px; }
.plan-item-head{ display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.plan-num{ flex:none; width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:var(--accent-soft); border:1px solid var(--accent-line); color:var(--accent-2); font-family:var(--font-display); font-weight:700; font-size:14px; }
.plan-item-title{ flex:1; min-width:0; display:flex; flex-direction:column; }
.plan-item-name{ font-family:var(--font-display); font-size:19px; font-weight:600; letter-spacing:-.02em; }
.plan-item-cat{ font-family:var(--font-mono); font-size:10.5px; color:var(--text-3); margin-top:3px; }
.plan-open{ flex:none; display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--accent-2); padding:8px 14px; border-radius:999px; background:var(--accent-soft); border:1px solid var(--accent-line); transition:.18s var(--ease); }
.plan-open:hover{ background:var(--accent); color:#fff; }
.plan-open svg{ width:13px; height:13px; }
.plan-doses{ border-top:1px solid var(--line); }
.plan-dose-row{ display:flex; align-items:center; gap:16px; padding:11px 0; border-bottom:1px solid var(--line); }
.plan-dose-row:last-child{ border-bottom:0; }
.plan-dose-amt{ flex:1; font-family:var(--font-display); font-size:17px; font-weight:700; letter-spacing:-.01em; }
.plan-dose-freq{ flex:none; font-size:13px; color:var(--text-2); }
.plan-note{ margin-top:12px; font-size:12.5px; color:var(--accent-2); }
.plan-cyc{ margin-top:8px; font-family:var(--font-mono); font-size:11px; color:var(--text-3); }

/* ---------- plan item · compact ---------- */
.plan-main{ border-top:1px solid var(--line); padding-top:14px; }
.plan-start{ display:flex; align-items:baseline; gap:14px; flex-wrap:wrap; }
.plan-start-label{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--green); }
.plan-start-dose{ font-family:var(--font-display); font-size:26px; font-weight:700; letter-spacing:-.02em; }
.plan-start-freq{ font-size:14px; color:var(--text-2); }
.plan-meta-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.plan-cyc{ font-family:var(--font-mono); font-size:11px; color:var(--text-3); }
.plan-tiers-toggle{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--text-2); padding:7px 14px; border-radius:999px; background:var(--surface); border:1px solid var(--line); transition:.18s var(--ease); }
.plan-tiers-toggle svg{ width:12px; height:12px; transition:transform .2s var(--ease); }
.plan-tiers-toggle:hover{ color:var(--text); border-color:var(--line-2); }
.plan-tiers-toggle.open svg{ transform:rotate(90deg); }
.plan-tiers{ margin-top:6px; }
.plan-tiers .plan-doses{ border-top:1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width:960px){
  .tiles{ grid-template-columns:repeat(3,1fr); }
  .calculator{ grid-template-columns:1fr; }
  .calc-result{ position:static; }
}
@media (max-width:760px){
  .topnav-links{ display:none; }
  .nav-search span{ display:none; }
  .nav-search{ padding:9px; }
  .nav-search kbd{ display:none; }
  .nav-burger{ display:flex; flex-direction:column; gap:5px; width:40px; height:40px; align-items:center; justify-content:center; border-radius:999px; background:var(--surface); border:1px solid var(--line); margin-left:8px; }
  .nav-burger span{ width:16px; height:1.6px; background:var(--text); border-radius:2px; transition:.25s var(--ease); }
  .nav-burger[aria-expanded="true"] span:first-child{ transform:translateY(3.3px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:last-child{ transform:translateY(-3.3px) rotate(-45deg); }
  .topnav-links.open{
    display:flex; flex-direction:column; align-items:stretch; gap:4px;
    position:absolute; top:var(--nav-h); left:12px; right:12px; margin:0;
    background:var(--surface-solid); border:1px solid var(--line-2); border-radius:var(--r-md);
    padding:10px; box-shadow:0 24px 60px rgba(0,0,0,.6);
  }
  .topnav-links.open > button{ text-align:left; padding:13px 16px; }
  .tiles{ grid-template-columns:repeat(2,1fr); }
  .hero-title{ letter-spacing:-.04em; }
  .search-go span{ display:none; }
  .search-go{ padding:12px 16px; }
  .result-foot{ flex-direction:column; align-items:flex-start; gap:6px; }
  .type-badge{ display:none; }
  .metrics{ grid-template-columns:1fr 1fr; }
  .stack-selects{ flex-direction:column; align-items:stretch; }
  .stack-selects .plus{ align-self:center; padding:0; }
  .stack-slots{ flex-direction:column; }
  .stack-plus{ padding:0; }
  .sheet{ width:calc(100% - 20px); }
  .sheet-head{ padding:20px 20px 14px; }
  .sheet-body{ padding:0 20px 24px; }
}

/* Ask Atlas — one obvious action, readable answers, generous touch targets. */
.nav-chat{color:var(--text)!important;background:var(--accent-soft);border:1px solid var(--line);white-space:nowrap;min-height:44px}
.atlas-chat{max-width:820px;margin:8px auto 0;text-align:left;border:1px solid rgba(0,0,0,.1);border-radius:32px;background:#fff;box-shadow:0 24px 60px rgba(0,0,0,.06)}
.chat-bar{display:flex;align-items:center;justify-content:space-between;padding:22px 28px 0;font-size:13px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#888}
.chat-bar button{min-height:32px;padding:0;color:#888;font-size:13px;font-weight:500;letter-spacing:0;text-transform:none}
.chat-transcript{padding:8px 28px 4px;display:flex;flex-direction:column}
.chat-welcome{padding:18px 0 22px;width:100%}
.chat-welcome h2{font-family:var(--font-display);font-size:34px;line-height:1.12;font-weight:600;letter-spacing:-.045em;margin:0;color:#111}
.chat-form{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 26%);padding:10px 16px 16px;border-radius:inherit}
.chat-compose{display:flex;gap:8px;align-items:flex-end;background:#f4f4f4;border-radius:22px;padding:8px 8px 8px 14px}
.chat-compose:focus-within{outline:2px solid #111;outline-offset:3px}
.chat-compose textarea{flex:1;min-height:40px;max-height:160px;resize:none;font:inherit;font-size:16.5px;line-height:1.45;color:#111;background:transparent;border:0;padding:7px 0;outline:none;overflow:hidden}
.chat-compose textarea::placeholder{color:#9a9a9a}
.chat-compose button{width:40px;height:40px;border-radius:13px;background:#111;color:#fff;font-size:19px;font-weight:600}
.chat-message{margin:18px 0;font-size:16px;line-height:1.55}

.atlas-chat,.chat-message{scroll-margin-top:calc(var(--nav-h) + 14px)}
.chat-user p{margin:0}
.chat-assistant h3{font-family:var(--font-display);font-size:26px;letter-spacing:-.04em;margin:4px 0 10px}
.chat-assistant p{margin:0 0 12px;color:#333}
.cycle-list{display:grid;gap:10px;margin:12px 0}
.cycle-card{border:1px solid rgba(0,0,0,.12);border-radius:16px;padding:14px 16px;background:#fff}
.cycle-top{display:flex;justify-content:space-between;gap:12px;align-items:baseline;font-size:13px;color:#666}
.cycle-top strong{font-size:18px;color:#111;letter-spacing:-.02em}
.cycle-dose{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-top:10px}
.cycle-dose b{font-size:28px;letter-spacing:-.04em}
.cycle-dose em{font-style:normal;color:#444}
.cycle-len{margin-top:4px;font-size:13px;color:#666}
.cycle-card p{margin:10px 0 0;font-size:14px;color:#333}
.cycle-note,.chat-help{display:none}
.chat-assistant ul{margin:8px 4px 0;padding-left:18px;color:#111}
.home:has(.atlas-chat){padding-top:58px}
.home:has(.atlas-chat) .hero-title{font-size:clamp(44px,6.5vw,76px)}
.chat-browse{margin:48px 0 18px}
.chat-browse h2{font-size:24px;letter-spacing:-.03em;margin-bottom:8px}
.chat-browse p{font-size:15px;color:var(--text-2)}
.chat-page{max-width:860px;margin:auto;padding:32px 24px 72px}
.chat-page h1{font-family:var(--font-display);font-size:clamp(32px,5vw,48px);letter-spacing:-.04em;line-height:1.12;margin:12px 0}
.atlas-chat [hidden]{display:none!important}
@media(min-width:761px) and (max-width:1120px){.topnav{gap:12px}.topnav-links>button{padding:8px 9px}.topnav-links{margin-left:0}}
@media(max-width:600px){
  .home:has(.atlas-chat){padding-top:34px}
  .chat-bar{padding:10px 16px}
  .chat-bar small{display:none}
  .chat-welcome{padding:24px 18px 18px;gap:12px}
  .chat-welcome h2{font-size:20px}
  .chat-welcome-icon{width:32px;height:32px;font-size:24px;border-radius:10px}
  .chat-starters{padding:0 18px 22px}
  .chat-starters button{font-size:15px;padding:12px}
  .chat-compose textarea{min-height:44px}
  .chat-help{padding:14px 18px 20px}
  .chat-message{margin:16px 14px;font-size:16px}
  .chat-followups{padding:0 14px 16px}
  .chat-page{padding:24px 16px 50px}
}
@media(prefers-reduced-motion:reduce){.atlas-chat *{scroll-behavior:auto;animation:none;transition:none}}

.chat-page>.back-link{display:flex;width:max-content;margin-bottom:24px}
/* ---------- mobile-first chat + scan ---------- */
.chat-scan-btn{flex:none;width:40px;height:40px;border-radius:13px;background:#fff;border:1.5px solid #111;color:#111;display:grid;place-items:center;transition:background .15s ease,color .15s ease}
.chat-scan-btn:hover{background:#111;color:#fff}
.chat-scan-btn:active{transform:scale(.94)}
.scan-status{margin:14px 28px;font-size:15px;color:#6d6d6d;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.45}}
@media(max-width:760px){
  .topnav{gap:10px;height:56px}
  .nav-search kbd{display:none}
  .home{padding:40px 14px 24px}
  .home .eyebrow{margin-bottom:14px;font-size:10.5px}
  .home .hero-title{font-size:clamp(34px,9.5vw,44px)!important;margin-bottom:12px}
  .home .hero-sub{font-size:15.5px;margin:0 auto 18px;max-width:100%!important}
  .atlas-chat{border-radius:22px;margin:0!important;box-shadow:0 10px 28px rgba(0,0,0,.05)}
  .chat-bar{padding:14px 18px 0}
  .chat-transcript{padding:6px 16px 2px;min-height:180px}
  .chat-welcome{padding:16px 2px 18px}
  .chat-welcome h2{font-size:24px}
  .chat-form{padding:8px 12px 12px;position:sticky;bottom:0;background:linear-gradient(transparent, #fff 30%)}
  .chat-compose{border-radius:18px;padding:8px 8px 8px 14px}
  .chat-compose textarea{min-height:44px;font-size:16.5px}
  .chat-scan-btn,.chat-compose button[type=submit]{width:44px;height:44px}
  .cycle-card{border-radius:14px;padding:12px 14px}
  .cycle-dose b{font-size:24px}
  .scan-status{margin:12px 16px}
  .home:has(.atlas-chat){padding-top:34px}
}


/* ---------- used-for line on peptide pages ---------- */
.used-for{max-width:860px;margin:0 0 26px;display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.used-for small{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-3)}
.used-for strong{font-family:var(--font-display);font-size:19px;font-weight:600;letter-spacing:-.01em;color:var(--text)}
/* ---------- chat-first hero (trial) ---------- */
.home{padding:clamp(28px,5vh,64px) clamp(16px,4vw,32px) 32px;text-align:center}
.home .hero-title{font-size:clamp(26px,4vw,40px);letter-spacing:-.03em;margin-bottom:22px}
.home:has(.atlas-chat) .hero-title{font-size:clamp(26px,4vw,40px)}
.home .atlas-chat{margin-top:0}
.atlas-chat{max-width:820px}
.chat-welcome h2{font-size:clamp(30px,4.5vw,44px)}
.chat-transcript{min-height:260px}
@media(max-width:760px){
  .home{padding:20px 12px 24px}
  .home .hero-title{font-size:24px;margin-bottom:14px}
  .chat-welcome h2{font-size:28px}
  .chat-transcript{min-height:300px}
}

/* ---------- chat-live: the conversation is the page ---------- */
body.chat-live .chat-browse,
body.chat-live .home .hero-search,
body.chat-live .home .tiles,
body.chat-live .home .stat-strip{display:none}
body.chat-live .footer{display:none}
/* ---------- Pro pricing + sign-in ---------- */
.pricing{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;max-width:820px;margin:56px auto 0;text-align:left}
.pricing-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:28px 26px;position:relative;display:flex;flex-direction:column}
.pricing-card.is-pro{border:1.5px solid #111;box-shadow:0 18px 44px rgba(0,0,0,.10)}
.pricing-badge{position:absolute;top:-13px;right:18px;background:#111;color:#fff;font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;padding:4px 12px;border-radius:999px}
.pricing-card h2{font-family:var(--font-display);font-size:21px;font-weight:600;letter-spacing:-.02em;margin-bottom:10px}
.pricing-price{font-family:var(--font-display);font-size:44px;font-weight:700;letter-spacing:-.04em;line-height:1;margin-bottom:12px}
.pricing-price span{font-size:15px;font-weight:500;color:var(--text-3);letter-spacing:0}
.pricing-line{font-size:14px;color:var(--text-2);line-height:1.5;margin-bottom:16px}
.pricing-card ul{list-style:none;margin:0 0 22px;display:grid;gap:8px}
.pricing-card li{font-size:13.5px;color:var(--text-2);padding-left:20px;position:relative}
.pricing-card li::before{content:"";position:absolute;left:0;top:8px;width:7px;height:7px;border-radius:99px;background:#111}
.pricing-card .btn{margin-top:auto;justify-content:center;text-align:center}
.chat-paywall-cta{margin:14px 0 4px;display:flex;flex-direction:column;gap:6px}
.chat-paywall-btn{display:inline-flex;align-items:center;justify-content:center;background:#111;color:#fff;font-weight:600;font-size:15px;padding:13px 22px;border-radius:14px;text-decoration:none}
.chat-paywall-btn:hover{background:#000}
.chat-paywall-sub{font-size:12.5px;color:var(--text-3);text-align:center}
.atlas-pro-pill{font-family:var(--font-mono);font-size:10px;font-weight:600;letter-spacing:.12em;background:#111;color:#fff;padding:3px 9px;border-radius:999px}
.atlas-pro-pill.is-pro{background:#0c7a43}
.chat-bar-right{display:flex;align-items:center;gap:12px}
.signin-sheet{max-width:420px;width:calc(100% - 32px)}
.signin-inner{background:#fff;border:1px solid var(--line-2);border-radius:var(--r-lg);padding:32px 28px;position:relative;box-shadow:0 30px 80px rgba(0,0,0,.25)}
.signin-inner h2{font-family:var(--font-display);font-size:24px;letter-spacing:-.03em;margin-bottom:8px}
.signin-sub{font-size:14px;color:var(--text-2);margin-bottom:20px}
.signin-x{position:absolute;top:14px;right:14px;border:0;background:none;font-size:26px;line-height:1;color:var(--text-3);cursor:pointer}
.signin-form{display:grid;gap:10px}
.signin-form input{border:1.5px solid var(--line-2);border-radius:12px;padding:14px 16px;font-size:16.5px;outline:0}
.signin-form input:focus{border-color:#111}
.signin-go{background:#111;color:#fff;font-weight:600;font-size:15px;padding:14px;border-radius:12px;border:0;cursor:pointer}
.signin-go:disabled{opacity:.6}
.signin-note{margin-top:14px;font-size:13.5px;color:var(--text-2);line-height:1.5;overflow-wrap:anywhere}
.signin-fine{margin-top:16px;font-size:11.5px;color:var(--text-3)}
@media(max-width:760px){
  .pricing{grid-template-columns:1fr;gap:18px;margin:40px auto 0}
  .pricing-card{padding:22px 20px}
  .pricing-price{font-size:36px}
}

/* ============================================================
   MOBILE PASS — big targets, three-shade palette, chat as page
   ============================================================ */
/* ---- home v2: one alignment, three matching cards, nothing else ---- */
.home-v2{max-width:520px;margin:0 auto;padding:clamp(28px,7vh,64px) 20px 40px;text-align:left}
.home-v2 .home-greet{margin:0}
.home-greet-line{font-family:var(--font-display);font-size:34px;font-weight:700;letter-spacing:-.03em;color:#111;margin:0;line-height:1.12}
.home-greet-sub{font-size:15px;color:#666;margin:8px 0 0;line-height:1.5}
.home-actions{margin:30px 0 0;display:grid;gap:12px}
.home-action{display:flex;align-items:center;gap:18px;text-align:left;border-radius:20px;padding:24px;min-height:88px;background:#f3f3f3;color:#111;transition:transform .12s var(--ease),background .12s;width:100%}
.home-action:active{transform:scale(.985);background:#e9e9e9}
.home-action.is-primary{background:#111;color:#fff}
.home-action.is-primary small{color:rgba(255,255,255,.7)}
.home-action-icon{display:flex;width:40px;height:40px;align-items:center;justify-content:center;flex:0 0 auto}
.home-action-icon svg{width:40px;height:40px}
.home-action-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.home-action-text b{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.1}
.home-action-text small{font-size:15px;color:#666;line-height:1.4}
.home-action.is-primary .home-action-text small{color:rgba(255,255,255,.7)}
.home-footnote{font-size:12.5px;color:#9a9a9a;margin:26px 0 0;text-align:center}
@media(max-width:600px){
  .home-v2{padding:24px 16px 40px}
  .home-greet-line{font-size:30px}
  .home-actions{gap:10px}
  .home-action{padding:20px;border-radius:18px;min-height:80px}
  .home-action-icon{width:36px;height:36px}
  .home-action-icon svg{width:36px;height:36px}
  .home-action-text b{font-size:20px}
}

/* subpages (My plan / Settings / Pro) */
.subpage{max-width:720px;margin:0 auto;padding:20px 16px 80px;text-align:left}
.subpage-head{display:flex;align-items:center;gap:12px;padding:6px 0 18px}
.subpage-head h1{flex:1;font-family:var(--font-display);font-size:clamp(26px,6vw,34px);font-weight:600;letter-spacing:-.04em;margin:0}
.subpage-edit{font-size:15px;color:#111;font-weight:600;min-height:44px;padding:0 10px}
.plan-empty{text-align:center;padding:40px 10px 20px}
.plan-empty-icon{display:inline-flex;width:54px;height:54px;border-radius:16px;background:#f3f3f3;align-items:center;justify-content:center;margin-bottom:16px}
.plan-empty-icon svg{width:28px;height:28px;color:#555}
.plan-empty h2{font-family:var(--font-display);font-size:24px;letter-spacing:-.03em;margin-bottom:8px}
.plan-empty p{font-size:15px;color:#666;max-width:340px;margin:0 auto 22px}
.plan-empty-actions{display:grid;gap:10px;max-width:340px;margin:0 auto}
.plan-empty-doctor{margin-top:26px;font-size:13.5px;color:#999}
.myplan-goal{font-family:var(--font-display);font-size:19px;letter-spacing:-.03em;margin:0 0 16px;color:#111}
.myplan-eyebrow{font-family:var(--font-mono);font-size:11px;font-weight:600;letter-spacing:.14em;color:#999;margin:18px 0 10px}
.myplan-tonight{border:1.5px solid rgba(0,0,0,.12);border-radius:20px;padding:6px 16px;background:#fff}
.myplan-full{margin-top:8px}
.myplan-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid rgba(0,0,0,.07);width:100%;text-align:left}
.myplan-row:last-child{border-bottom:0}
.myplan-row.static{padding:12px 0}
.myplan-check{width:24px;height:24px;accent-color:#111;flex:0 0 auto}
.myplan-main{display:flex;flex-direction:column}
.myplan-main b{font-size:16px;font-weight:600;letter-spacing:-.01em;color:#111}
.myplan-main small{font-size:13.5px;color:#777;margin-top:2px}
.myplan-ask{width:100%;margin-top:14px}

/* settings */
.settings-user{display:flex;align-items:center;gap:14px;padding:14px 0 22px}
.settings-avatar{display:flex;width:48px;height:48px;border-radius:999px;background:#111;color:#fff;font-weight:700;font-size:20px;align-items:center;justify-content:center}
.settings-id b{display:block;font-size:16.5px;font-weight:600}
.settings-id small{font-size:13.5px;color:#888}
.settings-block{margin:8px 0 22px}
.settings-eyebrow{font-family:var(--font-mono);font-size:11px;font-weight:600;letter-spacing:.14em;color:#999;margin-bottom:10px}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;font-size:15.5px;color:#111;padding:15px 16px;background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:14px;margin-bottom:8px;min-height:54px}
.settings-row.link svg{width:16px;height:16px;color:#999}
.settings-signout{display:block;width:100%;text-align:center;font-size:15.5px;font-weight:600;color:#c42323;padding:16px;border:0;background:none;border-radius:14px}
.btn.small{padding:9px 18px;font-size:14px;min-height:40px}

/* pro page */
.pro-hero{padding:10px 0 4px}
.pro-hero h2{font-family:var(--font-display);font-size:clamp(28px,6.4vw,38px);font-weight:600;letter-spacing:-.045em;line-height:1.1;margin:0 0 10px}
.pro-hero p{font-size:15px;color:#777;margin:0}
.pro-benefits{display:grid;gap:16px;margin:26px 0}
.pro-benefit{display:flex;gap:14px;align-items:flex-start}
.pro-check{display:flex;width:26px;height:26px;border-radius:999px;background:#111;color:#fff;font-size:14px;align-items:center;justify-content:center;flex:0 0 auto;margin-top:2px}
.pro-benefit b{display:block;font-size:16.5px;font-weight:600;letter-spacing:-.01em}
.pro-benefit small{display:block;font-size:14px;color:#777;margin-top:3px;line-height:1.45}
.pro-price{display:flex;align-items:baseline;gap:8px;margin:6px 0 18px}
.pro-price b{font-family:var(--font-display);font-size:44px;font-weight:700;letter-spacing:-.05em}
.pro-price span{font-size:15px;color:#777}
.pro-actions{display:grid;gap:10px}

/* chat refinements: bubbles per mockups */
.chat-user{align-self:flex-end;max-width:78%;background:#111;color:#fff;border-radius:20px 20px 6px 20px;padding:13px 16px}
.chat-assistant{max-width:100%}
.chat-thinking{display:flex;align-items:center;gap:8px;color:#999;font-size:14px;padding:6px 0 2px}
.chat-thinking .dots{display:inline-flex;gap:4px}
.chat-thinking .dots i{width:5px;height:5px;border-radius:99px;background:#bbb;animation:dotpulse 1.2s infinite}
.chat-thinking .dots i:nth-child(2){animation-delay:.15s}
.chat-thinking .dots i:nth-child(3){animation-delay:.3s}
@keyframes dotpulse{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}

@media(max-width:600px){
  .home-actions{gap:10px}
  .home-action{padding:16px;border-radius:18px}
  .subpage{padding:16px 14px 70px}
}

/* scan actions + misc new buttons */
.chat-paywall-cta{gap:8px}
.chat-scan-secondary{background:#f3f3f3;color:#111;font-size:14.5px;font-weight:600;padding:13px 20px;border-radius:14px;min-height:48px}
.chat-plan-btn{display:inline-flex;align-items:center;justify-content:center;background:#111;color:#fff;font-weight:600;font-size:15px;padding:13px 22px;border-radius:14px;text-decoration:none}
.cycle-count{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.12em;color:#999}
.scan-status{font-size:13.5px;color:#999;padding:10px 2px;display:flex;align-items:center;gap:8px}
.scan-status::after{content:"";width:14px;height:14px;border:2px solid #ddd;border-top-color:#111;border-radius:99px;animation:spin 0.9s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* nav avatar (account) */
.nav-avatar{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:999px;background:#f0f0f0;color:#111;font-weight:700;font-size:15px;margin-left:auto;flex:0 0 auto}
.nav-avatar:hover{background:#e6e6e6}
#nav-avatar-letter{pointer-events:none}

/* home footnote: light grey per mockup */
.home-footnote{color:#9a9a9a;text-align:center}

/* ============ Scan sheet: results overlay (no camera stage) ============ */
.scan-sheet{position:fixed;inset:0;max-width:520px;margin:0 auto;width:100%;height:100%;max-height:100%;border:0;border-radius:0;padding:0;background:#fff;overflow-y:auto}
.scan-sheet::backdrop{background:rgba(255,255,255,.96)}
.scan-close{position:sticky;top:14px;margin-left:14px;z-index:3;width:38px;height:38px;border-radius:999px;background:#f0f0f0;color:#111;font-size:24px;line-height:1;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.scan-preview{width:100%;max-height:46vh;object-fit:contain;display:block;background:#111;border-radius:0}
.scan-panel{padding:0 20px 30px;text-align:left;display:grid;gap:14px;justify-items:start}
.scan-hint{font-size:15px;color:#555;margin:0;line-height:1.5}
.scan-analyze{display:flex;align-items:center;gap:8px}
.scan-analyze::after{content:"";width:14px;height:14px;border:2px solid #ddd;border-top-color:#111;border-radius:99px;animation:spin .9s linear infinite}
.scan-choices{display:grid;gap:10px;width:100%}
.scan-fine{font-size:11.5px;color:#9a9a9a;margin:0}
.scan-recognized{display:flex;align-items:center;gap:8px;font-family:var(--font-mono);font-size:11.5px;font-weight:600;letter-spacing:.12em;color:#0c7a43;margin:0}
.scan-recognized i{width:9px;height:9px;border-radius:99px;background:#0c7a43;display:inline-block}
.scan-panel-title{font-family:var(--font-display);font-size:24px;font-weight:700;letter-spacing:-.03em;margin:0}
.scan-panel-text{font-size:15px;color:#555;margin:0;line-height:1.5}
.scan-result-card{border:1px solid rgba(0,0,0,.1);border-radius:16px;padding:14px 16px;width:100%}
.src-name{font-size:17px;font-weight:700;letter-spacing:-.01em}
.src-dose{display:flex;align-items:baseline;gap:8px;margin-top:6px}
.src-dose b{font-size:26px;font-weight:700;letter-spacing:-.03em}
.src-dose small{font-size:14px;color:#777}
.src-mix{font-size:13.5px;color:#666;margin:8px 0 0;line-height:1.45}
.scan-steps{margin:0;padding-left:18px;color:#666;font-size:13.5px}


.signin-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;background:#fff;color:#111;font-weight:600;font-size:15px;padding:14px;border-radius:12px;border:1.5px solid var(--line-2);cursor:pointer}
.signin-google:hover{border-color:#111}
.signin-google:disabled{opacity:.6;cursor:wait}
.chat-sources{margin-top:10px;font-size:12.5px;color:var(--text-3)}
.chat-sources span{font-weight:600;text-transform:uppercase;letter-spacing:.06em;font-size:11px}
.chat-sources ol{margin:4px 0 0 18px;padding:0}
.chat-sources a{color:inherit;text-decoration:underline}
.chat-disclaimer{margin-top:8px;font-size:12px;color:var(--text-3)}
/* ---------- legal pages (/privacy, /terms) ---------- */
.legal-page{ max-width:720px; margin:0 auto; padding:36px clamp(20px,4vw,32px) 24px; color:var(--text); line-height:1.65; font-size:15.5px; }
.legal-page h1{ font-family:var(--font-display); font-size:clamp(30px,5vw,40px); letter-spacing:-.02em; margin:0 0 6px; }
.legal-page h2{ font-family:var(--font-display); font-size:19px; margin:32px 0 8px; }
.legal-page p, .legal-page ul{ margin:0 0 12px; color:var(--text-2); }
.legal-page ul{ padding-left:20px; }
.legal-page li{ margin:0 0 6px; }
.legal-page strong{ color:var(--text); font-weight:600; }
.legal-page a:not(.back-link){ color:var(--text); text-decoration:underline; text-underline-offset:2px; }
.legal-updated{ font-size:13px; color:var(--text-3) !important; margin-bottom:24px !important; }
.legal-placeholder{ background:rgba(0,0,0,.05); border-radius:4px; padding:0 4px; }
.footer-links{ display:inline-flex; gap:16px; }
.footer-links a{ color:var(--text-2); }
.footer-links a:hover{ color:var(--text); text-decoration:underline; }
.legal-links{ margin-top:14px; font-size:12.5px; color:var(--text-3); }
.legal-links a{ color:var(--text-2); text-decoration:underline; text-underline-offset:2px; }

/* ---------- Answer cards: add to My plan ---------- */
.cycle-card p.cycle-src{margin:6px 0 0;font-size:12px;color:#888}
.cycle-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;flex-wrap:wrap}
.plan-add-btn,.plan-add-all{appearance:none;border:1px solid #111;background:#111;color:#fff;border-radius:999px;font:inherit;font-size:13px;font-weight:600;padding:7px 14px;cursor:pointer;line-height:1.2}
.plan-add-btn:hover:not(:disabled),.plan-add-all:hover:not(:disabled){background:#333}
.plan-add-btn.is-added,.plan-add-all.is-added{background:#fff;color:#1a7f37;border-color:rgba(26,127,55,.45);cursor:default}
.plan-add-all{display:block;width:100%;margin:10px 0 4px;padding:11px 16px;font-size:14px}
.cycle-more{font-size:13px;font-weight:500;color:#111;text-decoration:underline;text-underline-offset:3px}
.myplan-row.static{justify-content:space-between}
.myplan-link{color:#111}
.myplan-link:hover b{text-decoration:underline}
.myplan-remove{appearance:none;border:0;background:none;color:#999;font:inherit;font-size:13px;cursor:pointer;padding:4px 0}
.myplan-remove:hover{color:#b42318}
