
/* =========================================================
   ORBIT V4.0 — CLEAN DESIGN SYSTEM
   Single source of truth for layout, typography and states.
   ========================================================= */

:root{
  --bg:#f7f5f0;
  --surface:#fffefa;
  --surface-2:#fbfaf7;
  --ink:#151515;
  --muted:#6d675f;
  --line:#ddd7ce;
  --blue:#3157d5;
  --blue-hover:#274dcc;
  --blue-soft:#eef2ff;
  --danger:#a84d46;
  --shadow:0 8px 24px rgba(0,0,0,.045);

  --ui:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --display:Georgia,"Times New Roman",serif;

  --r-sm:8px;
  --r-md:12px;
  --r-lg:16px;
  --control:46px;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{background:#f1eee8}
body{
  background:#f1eee8;
  color:var(--ink);
  font-family:var(--ui);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:inherit}
[hidden]{display:none!important}

body.dark,
body.theme-dark{
  --bg:#11110f;
  --surface:#171714;
  --surface-2:#141411;
  --ink:#f4f0e7;
  --muted:#aaa69e;
  --line:#3b3934;
  --blue:#5877ea;
  --blue-hover:#6c88ee;
  --blue-soft:#1d2748;
  --shadow:none;
  background:#11110f;
}

/* ----- APP SHELL ----- */
.app{
  min-height:100vh;
  background:var(--bg);
}
.sidebar{display:none}
.topbar{
  min-height:74px;
  padding:0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  position:sticky;
  top:0;
  z-index:40;
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--bg) 94%, transparent);
  backdrop-filter:blur(10px);
}
.mobile-brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  letter-spacing:.12em;
}
.mobile-brand span{color:var(--blue)}
.greeting{display:none}
.top-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.content{
  padding:0 18px 100px;
}
.screen{
  display:none;
  min-height:calc(100vh - 150px);
}
.screen.active{display:block}

/* ----- GLOBAL TYPE ----- */
.eyebrow,
.prereq-label,
.gate-label,
.summary-grid small,
.section-title>span,
.fact-card>span{
  color:var(--muted);
  font-family:var(--ui);
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.top-title{
  color:var(--ink);
  font-family:var(--display);
  font-size:27px;
  line-height:1.08;
  font-weight:400;
  letter-spacing:-.02em;
}
.page-head{
  padding:38px 0 22px;
}
.page-head h1,
.state-copy h1,
.reveal-card h1{
  margin:9px 0 12px;
  color:var(--ink);
  font-family:var(--display);
  font-size:46px;
  line-height:1.02;
  font-weight:400;
  letter-spacing:-.03em;
}
.page-head p,
.state-copy p,
.reveal-card p{
  max-width:720px;
  margin:0;
  color:var(--muted);
  font-family:var(--ui);
  font-size:15px;
  line-height:1.6;
}
.page-head h1 span,
.page-head p span{
  color:inherit;
  font:inherit;
  letter-spacing:inherit;
}
.page-head>div>span{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

/* ----- BUTTONS ----- */
.btn,
.hero-cta,
.full-btn,
.primary-outline,
.prereq-cta,
.gate-cta,
.reminder-primary,
.premium-cta button,
.premium-lock button{
  min-height:var(--control);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  border:1px solid var(--blue);
  border-radius:var(--r-sm);
  background:var(--blue);
  color:#fff;
  font-family:var(--ui);
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.01em;
  text-transform:uppercase;
  text-decoration:none;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.btn:hover,
.hero-cta:hover,
.full-btn:hover,
.prereq-cta:hover,
.gate-cta:hover,
.reminder-primary:hover,
.premium-cta button:hover,
.premium-lock button:hover{
  background:var(--blue-hover);
  border-color:var(--blue-hover);
}
.btn:active,
.hero-cta:active,
.full-btn:active,
.prereq-cta:active,
.gate-cta:active{transform:translateY(1px)}
.secondary,
.ghost-full,
.reminder-secondary,
.ready-actions #newChartBtn{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:transparent;
  color:var(--ink);
  font-family:var(--ui);
  font-size:11px;
  font-weight:750;
  text-transform:uppercase;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible{
  outline:3px solid color-mix(in srgb,var(--blue) 34%, transparent);
  outline-offset:2px;
}

/* ----- LANGUAGE ----- */
.lang-switch{
  width:84px;
  height:40px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:3px;
  padding:3px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
}
.lang-switch button{
  min-width:0;
  height:32px;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}
.lang-switch button.active{
  background:var(--ink);
  color:var(--surface);
}

/* ----- HOME / NO CHART ----- */
.state-panel{
  padding:38px 0;
  display:grid;
  gap:26px;
}
.state-copy .eyebrow{margin-bottom:8px}
.hero-cta{margin-top:18px}
.state-copy>small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
}
.state-preview{
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.preview-ring{
  width:72px;
  height:72px;
  margin-bottom:16px;
  display:grid;
  place-items:center;
  border:1px solid var(--blue);
  border-radius:50%;
  color:var(--blue);
  font-size:28px;
}
.locked-row{
  padding:13px 0;
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  border-top:1px solid var(--line);
}
.locked-row>span{
  color:var(--blue);
  font-size:21px;
}
.locked-row b{
  color:var(--ink);
  font-family:var(--display);
  font-size:18px;
  font-weight:400;
}
.locked-row small{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}

/* ----- BIG THREE / CHART READY ----- */
.big-three-row{
  margin-top:26px;
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.big-three-row article{
  min-height:148px;
  padding:22px 24px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
  box-shadow:0 6px 20px rgba(0,0,0,.025);
}
.big-three-row article small{
  margin-bottom:11px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.big-three-row article b{
  margin:0 0 8px;
  color:var(--ink);
  font-family:var(--display);
  font-size:34px;
  line-height:1;
  font-weight:400;
  letter-spacing:-.025em;
}
.big-three-row article>span:last-child{
  color:var(--muted);
  font-size:14px;
  font-weight:500;
}
.ready-actions{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
}
#saveChartBtn,
#newChartBtn{
  width:100%;
  min-height:48px;
  border-radius:9px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
#saveChartBtn{
  border:1px solid var(--blue);
  background:var(--blue);
  color:#fff;
}

/* ----- ACCOUNT GATES ----- */
.ui-account-gate{
  width:100%;
  min-height:140px;
  margin:18px 0;
  padding:22px 24px;
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.gate-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
}
.gate-title{
  margin:0;
  color:var(--ink);
  font-family:var(--ui);
  font-size:19px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:-.012em;
}
.gate-copy{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.gate-cta{width:100%}

/* ----- DASHBOARD SUMMARY ----- */
.summary-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:1fr;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.summary-grid article{
  position:relative;
  min-height:138px;
  padding:22px 24px;
  border-bottom:1px solid var(--line);
}
.summary-grid article:last-child{border-bottom:0}
.summary-icon{
  position:absolute;
  top:22px;
  right:22px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:16px;
}
.summary-grid article>div:last-child{
  min-width:0;
  padding-right:46px;
}
.summary-grid small{display:block;margin:0 0 13px}
.summary-grid b{
  display:block;
  margin:0 0 8px;
  color:var(--ink);
  font-size:22px;
  line-height:1.1;
  font-weight:700;
  letter-spacing:-.012em;
}
.summary-grid article:nth-child(2) b{
  font-family:var(--display);
  font-size:34px;
  font-weight:400;
}
.summary-grid article>div:last-child>span{
  display:block;
  max-width:310px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

/* ----- SECTIONS / FEATURE CARDS ----- */
.section-title{
  margin:34px 0 15px;
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:16px;
}
.section-title h2{
  margin:0;
  color:var(--ink);
  font-family:var(--display);
  font-size:31px;
  line-height:1.05;
  font-weight:400;
  letter-spacing:-.02em;
}
.feature-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.feature-grid button{
  min-height:215px;
  padding:17px;
  display:flex;
  flex-direction:column;
  text-align:left;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
  color:var(--ink);
  box-shadow:var(--shadow);
}
.feature-grid h3{
  margin:18px 0 7px;
  color:var(--ink);
  font-family:var(--display);
  font-size:22px;
  line-height:1.08;
  font-weight:400;
}
.feature-grid p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}
.feature-grid em{
  margin-top:auto;
  color:var(--blue);
  font-size:11px;
  font-style:normal;
  font-weight:800;
}
.orb{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:var(--blue);
  font-size:24px;
}
.blue,.indigo{background:#eff2ff}
.pink{background:#fff0f4;color:#e64d79}
.green{background:#eef9f2;color:#1fa060}
.purple{background:#f4efff;color:#914ddd}
.orange{background:#fff3e7;color:#e98b21}
body.dark .blue,body.dark .indigo,
body.dark .pink,body.dark .green,
body.dark .purple,body.dark .orange{background:var(--blue-soft);color:var(--blue)}

/* ----- EMAIL ----- */
.email-panel{
  margin-top:28px;
  padding:22px;
  display:grid;
  gap:20px;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.email-panel h2{
  margin:8px 0;
  color:var(--ink);
  font-family:var(--display);
  font-size:28px;
  font-weight:400;
}
.email-panel p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.email-row{
  display:grid;
  grid-template-columns:1fr auto;
  border-bottom:1px solid var(--ink);
}
.email-row input{
  min-width:0;
  min-height:48px;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
}
.email-row button{
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:11px;
  font-weight:800;
}
.consent{
  margin-top:10px;
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.email-message{
  display:none;
  margin-top:10px;
  padding:10px;
  border-left:3px solid var(--blue);
  background:var(--blue-soft);
  font-size:12px;
}
.email-message.show{display:block}

/* ----- PREMIUM ----- */
.premium-strip{
  min-height:132px;
  margin-top:26px;
  padding:22px 24px;
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  gap:16px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.premium-symbol{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--blue) 55%,var(--line));
  color:var(--blue);
  font-size:28px;
}
.premium-copy>div{
  display:flex;
  align-items:center;
  gap:9px;
}
.premium-copy>div>span{
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.045em;
}
.premium-copy>div b{
  padding:5px 8px;
  border-radius:5px;
  background:var(--blue);
  color:#fff;
  font-size:10px;
  line-height:1;
  font-weight:800;
  letter-spacing:.035em;
}
.premium-copy>div b span{color:#fff}
.premium-copy h2{
  margin:7px 0 5px;
  color:var(--ink);
  font-family:var(--display);
  font-size:27px;
  line-height:1.05;
  font-weight:400;
}
.premium-copy p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.premium-cta{
  grid-column:1/-1;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.premium-cta small{
  text-align:center;
  color:var(--muted);
  font-size:12px;
}

/* ----- FORMS ----- */
.form-card{
  padding:22px;
  display:grid;
  gap:20px;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.form-card label{
  color:var(--muted);
  font-size:11px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.form-card input,
.form-card select,
.auth-input{
  width:100%;
  display:block;
  margin-top:7px;
  padding:12px 0;
  border:0;
  border-bottom:1px solid var(--ink);
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:16px;
}
.form-note{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.place-wrap{position:relative}
.suggestions{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:100%;
  z-index:50;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:0 0 8px 8px;
  background:var(--surface);
}
.suggestions.show{display:block}
.suggestions button{
  width:100%;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid var(--line);
  background:var(--surface);
  color:var(--ink);
  text-align:left;
  font-size:12px;
}

/* ----- LOADING / REVEAL ----- */
.loading-screen{
  padding-top:25vh;
  text-align:center;
}
.loader-orbit{
  width:80px;
  height:80px;
  margin:auto;
  display:grid;
  place-items:center;
  border:1px solid var(--blue);
  border-radius:50%;
  color:var(--blue);
  font-size:26px;
}
.loading-screen h2{
  color:var(--ink);
  font-family:var(--display);
  font-size:32px;
  font-weight:400;
}
.loading-screen p{color:var(--muted);font-size:14px}
.reveal-card{padding:46px 0}
.reveal-big3{
  margin:26px 0;
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.reveal-big3 article{
  padding:20px;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.reveal-big3 small{
  color:var(--muted);
  font-size:11px;
  letter-spacing:.06em;
}
.reveal-big3 b{
  display:block;
  margin:7px 0;
  color:var(--ink);
  font-family:var(--display);
  font-size:28px;
  font-weight:400;
}
.reveal-big3 span{color:var(--muted);font-size:12px}

/* ----- PREREQUISITE CARDS ----- */
.ui-prereq-card{
  width:100%;
  min-height:156px;
  margin:34px 0;
  padding:24px 26px;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:18px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.prereq-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--blue-soft);
  color:var(--blue);
  font-size:22px;
}
.prereq-content{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
}
.prereq-title{
  margin:0;
  color:var(--ink);
  font-size:19px;
  line-height:1.28;
  font-weight:700;
  letter-spacing:-.012em;
}
.prereq-copy{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.prereq-cta{
  grid-column:1/-1;
  width:100%;
}

/* ----- CHARTS ----- */
.charts-layout{
  display:grid;
  gap:18px;
}
.chart-card,
.list-card,
.big-insight,
.fact-card,
.chat-card,
.compat-score,
.premium-lock{
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
  box-shadow:var(--shadow);
}
.chart-card{padding:12px}
.chart-card svg{width:100%;display:block}
.list-card{overflow:hidden}
.placement,
.aspect{
  padding:12px;
  display:grid;
  grid-template-columns:36px 1fr auto;
  gap:8px;
  border-bottom:1px solid var(--line);
  color:var(--ink);
  font-size:13px;
}
.aspect{grid-template-columns:1fr auto}
.placement:last-child,
.aspect:last-child{border-bottom:0}
.glyph{
  color:var(--blue);
  font-size:20px;
}
.charts-side-gate{
  grid-template-columns:1fr;
  min-height:0;
  margin-top:22px;
}
.charts-side-gate .gate-cta{white-space:normal}

/* ----- DETAIL ----- */
.detail-grid{
  display:grid;
  gap:16px;
}
.big-insight{
  padding:20px;
  display:grid;
  grid-template-columns:54px 1fr;
  gap:12px;
}
.number{
  color:var(--blue);
  font-family:var(--display);
  font-size:31px;
}
.big-insight h2,
.fact-card h2{
  margin:0 0 10px;
  color:var(--ink);
  font-family:var(--display);
  font-size:26px;
  font-weight:400;
}
.big-insight p{
  margin:0;
  color:var(--muted);
  font-size:15px;
  line-height:1.65;
}
.fact-card{padding:20px}
.fact{
  padding:12px 0;
  display:grid;
  grid-template-columns:36px 1fr;
  border-bottom:1px solid var(--line);
  color:var(--ink);
  font-size:13px;
}

/* ----- ASK ORBIT ----- */
.chat-card{
  min-height:360px;
  padding:16px;
}
.message{
  max-width:80%;
  margin-bottom:10px;
  padding:12px;
  border-radius:10px;
  font-size:14px;
  line-height:1.55;
}
.message.ai{
  background:#f0f2f8;
  color:var(--ink);
}
.message.user{
  margin-left:auto;
  background:var(--blue);
  color:#fff;
}
body.dark .message.ai{background:#20242d}
.chat-compose{
  width:100%;
  min-height:58px;
  margin-top:14px;
  padding:6px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 48px;
  gap:8px;
  align-items:center;
  position:sticky;
  bottom:18px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface);
  box-shadow:var(--shadow);
}
.chat-compose input{
  width:100%;
  min-width:0;
  height:44px;
  padding:0 12px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:14px;
}
.chat-compose input::placeholder{color:var(--muted)}
.chat-compose button{
  width:48px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid var(--blue);
  border-radius:8px;
  background:var(--blue);
  color:#fff;
  font-size:21px;
}
.ask-login-reminder{
  margin:14px 0;
  padding:14px 16px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:14px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface);
}
.reminder-icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--blue-soft);
  color:var(--blue);
}
.reminder-copy strong{
  display:block;
  margin-bottom:3px;
  color:var(--ink);
  font-size:13px;
}
.reminder-copy p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.reminder-actions{
  grid-column:1/-1;
  display:flex;
  gap:8px;
}

/* ----- COMPATIBILITY ----- */
.compat-loading{
  display:none;
  padding:28px;
  color:var(--muted);
  text-align:center;
}
.compat-loading.show{display:block}
.compat-result{display:none}
.compat-result.show{display:block}
.compat-score{
  margin-top:18px;
  padding:22px;
  display:grid;
  gap:18px;
}
.compat-score small{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.05em;
}
.compat-score strong{
  color:var(--ink);
  font-family:var(--display);
  font-size:58px;
  font-weight:400;
}
.compat-score p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.score-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.score-grid>div{
  padding:16px;
  border:1px solid var(--line);
  border-radius:var(--r-md);
  background:var(--surface);
}
.score-grid small{
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.05em;
}
.score-grid b{
  display:block;
  margin:6px 0 10px;
  color:var(--ink);
  font-size:22px;
}
.score-grid i{
  height:5px;
  display:block;
  overflow:hidden;
  border-radius:4px;
  background:var(--line);
}
.score-grid em{
  width:0;
  height:100%;
  display:block;
  background:var(--blue);
}
.premium-lock{
  margin-top:18px;
  padding:22px;
}
.premium-lock>span{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.06em;
}
.premium-lock h2{
  margin:8px 0;
  color:var(--ink);
  font-family:var(--display);
  font-size:27px;
  font-weight:400;
}
.premium-lock p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.disclaimer{
  color:var(--muted);
  font-size:11px;
  line-height:1.5;
}

/* ----- SAVED ----- */
.empty{
  padding:22px;
  color:var(--muted);
  font-size:14px;
}

/* ----- FOOTER / MOBILE NAV ----- */
.footer{
  padding:24px 18px 90px;
  display:flex;
  flex-direction:column;
  gap:16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:11px;
}
.footer nav{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}
.footer a{color:var(--muted)}
.theme-toggle{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--surface);
  color:var(--ink);
  font-size:25px;
}
.mobile-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:45;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line);
  background:var(--surface);
}
.mobile-nav button{
  min-height:62px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
}
.mobile-nav button span:first-child{
  color:var(--ink);
  font-size:18px;
}

/* ----- SIDEBAR ACCOUNT ----- */
.account-card{
  display:grid;
  grid-template-columns:24px 1fr 18px;
  gap:8px;
  align-items:center;
  text-align:left;
  border:1px solid var(--line);
  border-radius:var(--r-sm);
  background:transparent;
  color:var(--ink);
}
.account-card b{font-size:11px}
.account-card small{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.gift{color:var(--blue)}
.arrow{font-size:24px}

/* ----- MODAL / AUTH ----- */
.modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:100;
  padding:20px;
  background:rgba(0,0,0,.58);
  align-items:center;
  justify-content:center;
}
.modal.show{display:flex}
.modal-card{
  position:relative;
  width:min(520px,100%);
  max-height:calc(100vh - 40px);
  overflow:auto;
  padding:24px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 24px 70px rgba(0,0,0,.2);
}
.modal-card h2{
  margin:8px 0;
  color:var(--ink);
  font-family:var(--display);
  font-size:31px;
  font-weight:400;
  letter-spacing:-.02em;
}
.modal-card p{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
}
.close-modal{
  position:absolute;
  right:12px;
  top:9px;
  width:36px;
  height:36px;
  border:0;
  background:transparent;
  color:var(--ink);
  font-size:24px;
}
.auth-tabs{
  margin:18px 0;
  display:grid;
  grid-template-columns:1fr 1fr;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:8px;
}
.auth-tabs button{
  min-height:42px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
}
.auth-tabs button.active{
  background:var(--ink);
  color:var(--surface);
}
.auth-input{
  margin:0 0 12px;
  font-size:14px;
}
.password-field{
  position:relative;
  width:100%;
}
.password-field .auth-input{padding-right:46px}
.password-toggle{
  position:absolute;
  right:2px;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--muted);
  font-size:18px;
}
.password-toggle:hover{
  background:var(--blue-soft);
  color:var(--blue);
}
.account-marketing-consent{
  margin:2px 0 8px;
  display:grid;
  grid-template-columns:18px 1fr;
  gap:10px;
  align-items:start;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}
.account-marketing-consent input{
  width:16px;
  height:16px;
  margin-top:2px;
}
.auth-error{
  margin-bottom:6px;
  padding:9px 11px;
  border:1px solid #c96a63;
  border-radius:7px;
  background:rgba(201,106,99,.08);
  color:var(--danger);
  font-size:12px;
}
.forgot-password{
  display:block;
  margin:-2px 0 8px auto;
  padding:2px 0;
  border:0;
  background:transparent;
  color:var(--blue);
  font-size:12px;
  font-weight:700;
}
.reset-view{position:relative}
.reset-view h2{margin:8px 0}
.reset-view p{margin:0 0 18px}
.reset-back{
  position:absolute;
  right:0;
  top:0;
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:8px;
  background:transparent;
  color:var(--ink);
  font-size:18px;
}
.reset-message{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--blue-soft);
  color:var(--ink);
  font-size:12px;
  line-height:1.45;
}
.ghost-full{width:100%;margin-top:9px}

/* ----- DESKTOP ----- */
@media(min-width:980px){
  .app{
    max-width:1500px;
    min-height:100vh;
    margin:auto;
    display:grid;
    grid-template-columns:286px minmax(0,1fr);
    grid-template-rows:96px auto auto;
  }
  .sidebar{
    grid-column:1;
    grid-row:1/4;
    display:flex;
    position:sticky;
    top:0;
    height:100vh;
    flex-direction:column;
    padding:28px 20px 18px;
    border-right:1px solid var(--line);
    background:var(--bg);
  }
  .brand{
    padding-bottom:24px;
    display:flex;
    align-items:center;
    gap:12px;
    border-bottom:1px solid var(--ink);
  }
  .brand-mark{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border:1px solid var(--blue);
    color:var(--blue);
    font-size:22px;
  }
  .brand b{
    font-size:14px;
    letter-spacing:.18em;
  }
  .brand small{
    display:block;
    margin-top:3px;
    color:var(--muted);
    font-size:10px;
    letter-spacing:.12em;
  }
  .sidebar-nav{
    padding-top:16px;
    display:grid;
    gap:1px;
  }
  .sidebar-nav button,
  .saved-button{
    padding:11px 10px;
    display:grid;
    grid-template-columns:38px 1fr;
    gap:10px;
    align-items:center;
    border:0;
    border-radius:7px;
    background:transparent;
    color:var(--ink);
    text-align:left;
  }
  .sidebar-nav button.active{
    background:linear-gradient(var(--blue),var(--blue-hover));
    color:#fff;
  }
  .sidebar-nav>button>span,
  .saved-button>span{font-size:20px}
  .sidebar-nav b,
  .saved-button b{
    font-family:var(--display);
    font-size:18px;
    font-weight:400;
  }
  .sidebar-nav small,
  .saved-button small{
    display:block;
    color:inherit;
    font-size:11px;
    opacity:.68;
  }
  .saved-button{
    margin-top:10px;
    padding-top:15px;
    border-top:1px solid var(--line);
    border-radius:0;
  }
  .account-card{
    margin-top:auto;
    padding:14px;
  }

  .topbar{
    grid-column:2;
    min-height:96px;
    padding:0 36px;
    position:static;
  }
  .mobile-brand{display:none}
  .greeting{display:block}
  .greeting small{
    display:block;
    margin-bottom:5px;
    color:var(--muted);
    font-size:12px;
  }
  .top-actions{margin-left:auto}
  .btn{padding:0 20px}

  .content{
    grid-column:2;
    padding:0 36px 46px;
  }
  .screen{min-height:auto}
  .state-panel{
    grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
    align-items:center;
    padding:54px 0;
  }
  .state-copy h1{font-size:64px}
  .state-copy p{font-size:18px}

  .big-three-row{
    grid-template-columns:repeat(3,minmax(0,1fr)) 184px;
  }
  .ready-actions{width:184px}

  .ui-account-gate{
    grid-template-columns:minmax(0,1fr) 270px;
    gap:28px;
  }

  .summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .summary-grid article{
    border-bottom:0;
    border-right:1px solid var(--line);
  }
  .summary-grid article:last-child{border-right:0}

  .feature-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:12px;
  }
  .feature-grid button{
    min-height:280px;
    padding:18px;
  }
  .feature-grid p{font-size:13px}

  .email-panel{
    grid-template-columns:minmax(0,.9fr) minmax(360px,1.1fr);
    align-items:end;
    gap:34px;
    padding:24px;
  }

  .premium-strip{
    grid-template-columns:64px minmax(0,1fr) 300px;
  }
  .premium-cta{
    grid-column:3;
    max-width:300px;
    justify-self:end;
    width:100%;
  }

  .page-head{padding:42px 0 24px}
  .page-head h1{font-size:54px}

  .form-card{
    grid-template-columns:1fr 1fr;
  }
  .form-card.three-col{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .form-card .full-btn{
    grid-column:1/-1;
    max-width:360px;
  }
  .form-note{grid-column:1/-1}

  .reveal-card{padding:70px 0}
  .reveal-card h1{font-size:64px}
  .reveal-big3{
    max-width:900px;
    grid-template-columns:repeat(3,1fr);
  }

  .ui-prereq-card{
    grid-template-columns:56px minmax(0,1fr) 260px;
    gap:22px;
  }
  .prereq-cta{
    grid-column:3;
  }

  .charts-layout{
    grid-template-columns:minmax(540px,1.15fr) minmax(360px,.85fr);
    align-items:start;
  }
  .chart-card{
    position:sticky;
    top:20px;
  }

  .detail-grid{
    grid-template-columns:1.1fr .9fr;
  }

  .ask-login-reminder{
    grid-template-columns:34px minmax(0,1fr) auto;
  }
  .reminder-actions{grid-column:auto}

  .compat-score{
    grid-template-columns:160px 1fr;
    align-items:center;
  }
  .score-grid{
    grid-template-columns:repeat(3,1fr);
  }

  .footer{
    grid-column:2;
    padding:26px 36px 32px;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .footer nav{gap:26px}
  .mobile-nav{display:none}
}

/* ----- TABLET / NARROW DESKTOP ----- */
@media(min-width:800px) and (max-width:1100px){
  .big-three-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .ready-actions{
    grid-column:1/-1;
    width:100%;
    flex-direction:row;
  }
  .ready-actions button{flex:1}
}

/* ----- MOBILE ----- */
@media(max-width:799px){
  .page-head h1{font-size:38px}
  .top-title{font-size:24px}
  .feature-grid{grid-template-columns:1fr 1fr}
  .ui-prereq-card{
    grid-template-columns:52px minmax(0,1fr);
    padding:20px;
  }
  .prereq-cta{grid-column:1/-1}
  .ui-account-gate{padding:20px}
  .score-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:620px){
  .top-actions .secondary{display:none}
  .topbar{padding:0 12px}
  .content{padding-left:14px;padding-right:14px}
  .feature-grid{grid-template-columns:1fr}
  .score-grid{grid-template-columns:1fr}
  .premium-strip{grid-template-columns:52px 1fr}
  .premium-cta{grid-column:1/-1}
}

/* V4.1 — verified auth state */
#askPageInput:disabled{cursor:not-allowed;opacity:.58}
#askSend:disabled{cursor:not-allowed;opacity:.48;background:var(--muted);border-color:var(--muted)}
#saveChartBtn[data-auth-state="checking"]{opacity:.62;pointer-events:none}


/* V4.2 — Saved Charts open/restore */
.saved-chart-row{
  min-height:84px;
  padding:16px 18px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  border-bottom:1px solid var(--line);
}
.saved-chart-row:last-child{border-bottom:0}
.saved-chart-copy{
  min-width:0;
}
.saved-chart-copy b{
  display:block;
  margin:0 0 5px;
  color:var(--ink);
  font-family:var(--ui);
  font-size:14px;
  line-height:1.3;
  font-weight:700;
}
.saved-chart-copy small{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.saved-chart-open{
  min-width:92px;
  min-height:40px;
  padding:0 14px;
  border:1px solid var(--blue);
  border-radius:8px;
  background:transparent;
  color:var(--blue);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}
.saved-chart-open:hover{
  background:var(--blue);
  color:#fff;
}
.saved-chart-open:disabled{
  cursor:wait;
  opacity:.58;
}


/* V4.9 — Ask Orbit chart-aware engine */
.ask-quota{
  margin:12px 2px 8px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  text-align:right;
}
.ask-answer{
  max-width:min(760px,92%);
  white-space:normal;
}
.ask-answer-text{
  white-space:pre-line;
}
.ask-evidence{
  margin-top:14px;
  padding-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  border-top:1px solid color-mix(in srgb,var(--line) 78%, transparent);
}
.ask-evidence-label{
  width:100%;
  margin-bottom:2px;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
}
.ask-evidence-item{
  min-width:150px;
  padding:9px 11px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--surface);
}
.ask-evidence-item b{
  display:block;
  margin-bottom:2px;
  color:var(--ink);
  font-size:11px;
}
.ask-evidence-item span{
  color:var(--muted);
  font-size:10px;
}
.ask-disclaimer{
  display:block;
  margin-top:12px;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.ask-thinking{
  opacity:.72;
  font-style:italic;
}
.ask-error{
  border:1px solid color-mix(in srgb,var(--danger) 45%,var(--line));
}
