/* ArchOnTheGo v8 — architectural sunset + dark studio. Overrides only; logic remains in app.js. */
:root{
  --v8-snow:#f8f6f4;
  --v8-warm:#f4e7da;
  --v8-fog:#c3b7ad;
  --v8-ink:#0b0d0f;
  --v8-ease:cubic-bezier(.2,.8,.2,1);
}
html{scroll-padding-top:84px}
body{background:#080a0c;color:#f6f5f4}
body::before{display:none!important}
body.home-active {background:#111112}
body.home-active .main {background:#111112}
body.home-active .topbar{
  background:linear-gradient(180deg,rgba(61,54,50,.91),rgba(57,52,49,.80))!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter:blur(25px) saturate(105%);
  -webkit-backdrop-filter:blur(25px) saturate(105%);
  min-height:76px;
  padding:10px clamp(24px,3.7vw,74px)!important;
}
.ag-home-link,.ag-home-link span{font-size:21px!important;font-weight:650;letter-spacing:-.045em;color:var(--v8-snow)!important}
.ag-home-link img{width:40px;height:40px;filter:drop-shadow(0 2px 1px #0002)}
.ag-desktop-nav{gap:clamp(16px,2.5vw,42px)}
.ag-desktop-nav button{color:#f8f5f1!important;font-size:13px;font-weight:500}
.ag-desktop-nav button:hover{opacity:.72}
.topbar .credit-chip,.topbar #auth-button{
 background:linear-gradient(180deg,rgba(255,255,255,.17),rgba(255,255,255,.08))!important;
 border:1px solid rgba(255,255,255,.27)!important;
 border-radius:15px!important;
 min-height:42px;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 4px 12px rgba(0,0,0,.1)!important;
 color:#fff!important;
}
.topbar .credit-chip span{font:600 12px Inter,sans-serif!important;color:#fff!important;letter-spacing:0!important}
.topbar #auth-button{padding-inline:23px}
body.home-active .landing-tab{overflow:visible}
.ag-v8-page{width:100%;margin:0 auto;padding-bottom:68px;background:linear-gradient(180deg,#443a35 0%,#272321 54%,#111317 84%)}
.ag-v8-hero{
 position:relative;isolation:isolate;overflow:hidden;
 width:100%;min-height:750px;
 padding:76px clamp(28px,4vw,74px) 32px;
 background-image:url('assets/archonthego-hero-clean.webp');
 background-position:center center;
 background-size:cover;
 background-repeat:no-repeat;
 display:flex;flex-direction:column;justify-content:space-between;gap:44px;
 border-bottom:1px solid rgba(255,255,255,.08);
}
.ag-v8-warm-fade{position:absolute;z-index:-1;inset:0;pointer-events:none;
 background:
  linear-gradient(90deg,rgba(22,20,20,.19) 0%,rgba(26,24,24,.07) 38%,transparent 74%),
  linear-gradient(180deg,rgba(23,22,23,.10) 0%,transparent 35%,rgba(18,17,17,.40) 100%);
}
.ag-v8-hero-content{width:min(100%,635px);position:relative;z-index:1;margin-top:0}
.ag-v8-eyebrow{display:block;color:#f3ede8;font-size:12px;letter-spacing:.26em;font-weight:600;line-height:1.6;margin-bottom:20px}
.ag-v8-hero h2{
 margin:0 0 17px!important;
 font:650 clamp(66px,6.2vw,101px)/.97 'Space Grotesk',Inter,sans-serif;
 color:#fff9f3!important;
 letter-spacing:-.068em;
 text-shadow:0 2px 20px rgba(28,18,13,.12);
}
.ag-v8-hero h2 span{color:#fff!important}
.ag-v8-hero-content>p{max-width:540px;margin:0!important;color:#f5ebe4;
 font-size:clamp(16px,1.5vw,22px);line-height:1.46;letter-spacing:-.017em;
 text-shadow:0 1px 4px rgba(35,25,20,.12)
}
.ag-v8-actions{display:flex!important;gap:13px;flex-wrap:wrap;margin:24px 0 22px!important}
.ag-v8-glass-btn{
 --mx:50%;--my:0%;
 appearance:none;position:relative;overflow:hidden;isolation:isolate;
 display:inline-flex;align-items:center;justify-content:center;gap:13px;
 min-height:54px;padding:12px 27px;border-radius:16px;
 font:650 15px/1.2 Inter,sans-serif;letter-spacing:-.012em;
 transition:transform .3s var(--v8-ease),border-color .2s,background .2s,box-shadow .25s;
 cursor:pointer;touch-action:manipulation;
 backdrop-filter:blur(22px) saturate(110%);
 -webkit-backdrop-filter:blur(22px) saturate(110%);
}
.ag-v8-glass-btn>span{font-size:19px;font-weight:400;position:relative;z-index:1}
.ag-v8-glass-btn:before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:radial-gradient(180px 90px at var(--mx) var(--my),rgba(255,255,255,.20),transparent 70%);
 opacity:.55;transition:opacity .2s;
}
.ag-v8-glass-btn:hover{transform:translateY(-2px)}
.ag-v8-glass-btn:hover:before{opacity:1}
.ag-v8-glass-btn:active{transform:translateY(1px) scale(.98)}
.ag-v8-glass-btn:focus-visible{outline:2px solid #fff;outline-offset:3px}
.ag-v8-primary{
 background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(240,236,231,.92));
 color:#201d1b;border:1px solid rgba(255,255,255,.77);
 box-shadow:inset 0 1px 0 #fff,0 10px 25px rgba(13,12,13,.16);
}
.ag-v8-primary:hover{background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(251,246,241,.95));box-shadow:inset 0 1px #fff,0 14px 32px #0003}
.ag-v8-secondary{
 background:linear-gradient(180deg,rgba(255,255,255,.15),rgba(255,255,255,.08));
 color:#fffbf8;border:1px solid rgba(255,255,255,.28);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 9px 23px rgba(20,14,11,.13);
}
.ag-v8-secondary:hover{background:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,.11));border-color:rgba(255,255,255,.42)}
.ag-v8-proofs{display:flex;align-items:center;gap:clamp(14px,2.6vw,39px);flex-wrap:wrap;color:#f4ece5;font:500 12px Inter,sans-serif;line-height:1.6;letter-spacing:-.006em}
.ag-v8-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;z-index:1;position:relative;width:100%}
.ag-v8-feature{
 appearance:none;cursor:pointer;text-align:left;color:#fff;
 min-width:0;min-height:132px;display:flex;align-items:center;gap:12px;
 padding:12px;border:1px solid rgba(255,255,255,.20);
 background:linear-gradient(150deg,rgba(255,255,255,.15),rgba(255,255,255,.07));
 border-radius:18px;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 7px 25px rgba(17,13,11,.13);
 backdrop-filter:blur(26px) saturate(110%);
 -webkit-backdrop-filter:blur(26px) saturate(110%);
 transition:transform .34s var(--v8-ease),background .25s,border-color .25s;
}
.ag-v8-feature:hover{transform:translateY(-4px);border-color:rgba(255,255,255,.34);background:linear-gradient(150deg,rgba(255,255,255,.20),rgba(255,255,255,.09))}
.ag-v8-feature:active{transform:translateY(0) scale(.985)}
.ag-v8-feature:focus-visible{outline:2px solid #fff;outline-offset:3px}
.ag-v8-feature img{flex:0 0 91px;width:91px;height:106px;display:block;object-fit:cover;border-radius:13px;border:1px solid rgba(255,255,255,.09)}
.ag-v8-feature-text{min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.ag-v8-feature-text strong{font-size:18px;font-weight:650;letter-spacing:-.028em;color:#fff!important}
.ag-v8-feature-text small{font-size:11px;line-height:1.42;color:#f0e7e0}
.ag-v8-feature-text em{display:flex;gap:8px;align-items:center;max-width:100%;font-size:10px;font-style:normal;line-height:1.25;color:#fbf7f4;padding:6px 10px;border-radius:99px;
 border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.09);white-space:normal}
.ag-v8-feature-text em span{font-size:15px}
/* The list of real tools stays below the hero, never underneath the buttons/cards. */
.ag-v8-tools-section{max-width:1470px;margin:auto;padding:72px clamp(20px,4.5vw,74px) 16px;scroll-margin-top:88px}
.ag-v8-section-top{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:30px}
.ag-v8-section-kicker{color:#aea49e;font-size:10px;letter-spacing:.2em;font-weight:750}
.ag-v8-section-top h3{color:#fff5f0;margin:10px 0 0;font:650 clamp(33px,4vw,53px)/1.04 'Space Grotesk',Inter,sans-serif;letter-spacing:-.055em}
.ag-v8-section-top p{color:#b8b2af;font-size:13px;line-height:1.65;max-width:335px;margin:0}
.ag-v8-tools-section .ag-tool-finder{margin:24px 0 20px}
.ag-v8-tools-section .ag-tool-finder label{border-radius:14px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.16)}
.ag-v8-tools-section .ag-tool-finder input{background:transparent;border:0;color:#f5f5f5}
.ag-v8-tools-section .ag-tool-finder input::placeholder{color:#aaa6a4}
.ag-v8-tools-section #tool-finder-count{font-size:11px;color:#aaa6a4}
.ag-v8-tools-section .ag-tool-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ag-v8-tools-section .ag-tool{
 min-height:154px;border:1px solid rgba(255,255,255,.12)!important;
 background:linear-gradient(160deg,rgba(255,255,255,.095),rgba(255,255,255,.025))!important;
 border-radius:18px;
 box-shadow:inset 0 1px rgba(255,255,255,.12),0 9px 30px rgba(0,0,0,.15)!important;
 color:#f8f7f6!important;
}
.ag-v8-tools-section .ag-tool:hover{border-color:rgba(255,255,255,.25)!important;background:linear-gradient(160deg,rgba(255,255,255,.15),rgba(255,255,255,.05))!important}
.ag-v8-tools-section .ag-tool-ico,.ag-v8-tools-section .ag-tool-text strong{color:#f8f7f6}
.ag-v8-tools-section .ag-tool-text small{color:#aaa6a4}
.ag-v8-bottom-banner{max-width:1310px;margin:42px auto 0;padding:31px clamp(22px,3vw,38px);border:1px solid rgba(255,255,255,.13);border-radius:24px;background:
 radial-gradient(550px 180px at 100% 0%,rgba(202,169,140,.15),transparent 80%),
 linear-gradient(135deg,#28231f,#1a1b1e);
 display:flex;align-items:center;justify-content:space-between;gap:20px}
.ag-v8-bottom-banner h3{font:650 29px 'Space Grotesk',sans-serif;letter-spacing:-.04em;margin:9px 0;color:#fff}
.ag-v8-bottom-banner p{color:#ccc3bc;font-size:13px;margin:0}
/* Tool pages are dark, while the homepage is warm. Keep the original calculators and canvases. */
body:not(.home-active){background:#080a0d!important;color:#f6f6f6}
body:not(.home-active) .sidebar{background:#0b0d10!important;border-right:1px solid rgba(255,255,255,.09)!important}
body:not(.home-active) .topbar{background:rgba(9,11,14,.90)!important;border-bottom:1px solid rgba(255,255,255,.10)!important}
body:not(.home-active) .nav-item{border-radius:11px;color:#c8c8ca}
body:not(.home-active) .sidebar .nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
body:not(.home-active) .sidebar .nav-item.active{border-color:rgba(255,255,255,.18)!important;background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.08))!important;color:#fff!important}
body:not(.home-active) .main{background:#080a0d}
body:not(.home-active) .panel,body:not(.home-active) .calc-card{background:linear-gradient(155deg,rgba(255,255,255,.065),rgba(255,255,255,.025)),#101317!important;border:1px solid rgba(255,255,255,.12)!important}
body:not(.home-active) .toolbar{background:#121519;border-bottom:1px solid rgba(255,255,255,.10)}
body:not(.home-active) .tool{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.045);color:#e9ecf0}
body:not(.home-active) .tool.active{background:linear-gradient(180deg,rgba(255,255,255,.25),rgba(255,255,255,.09));border-color:rgba(255,255,255,.3);color:#fff}
body:not(.home-active) .canvas-wrap{background:#121416}
body:not(.home-active) .canvas-empty{background:radial-gradient(circle at 50% 38%,#1e2227,#0b0d10 70%)}
@media(min-width:1500px){.ag-v8-hero{min-height:780px}.ag-v8-hero-content{margin-top:15px}.ag-v8-feature{min-height:142px}}
@media(max-width:1160px){
 .ag-v8-feature img{width:78px;height:93px;flex-basis:78px}
 .ag-v8-feature-text strong{font-size:16px}
 .ag-v8-feature-text small{font-size:10px}
 .ag-v8-feature-text em{font-size:9px}
 .ag-v8-hero{min-height:740px}
 .ag-v8-tools-section .ag-tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:880px){
 .ag-v8-hero{min-height:730px;background-position:55% center}
 .ag-v8-hero-content{width:68%}
 .ag-v8-hero h2{font-size:clamp(52px,8vw,76px)}
 .ag-v8-feature-grid{gap:9px}
 .ag-v8-feature{padding:10px;gap:9px}
 .ag-v8-feature img{width:60px;height:81px;flex-basis:60px}
 .ag-v8-feature-text em{padding:5px 7px}
 .ag-v8-feature-text strong{font-size:14px}
 .ag-v8-feature-text small{font-size:9px}
}
@media(max-width:760px){
 body.home-active .topbar{padding:7px 14px!important;min-height:64px}
 .ag-home-link,.ag-home-link span{font-size:17px!important}
 .ag-home-link img{width:35px;height:35px}
 .topbar .credit-chip{padding:6px 10px!important}
 .topbar #auth-button{padding:8px 12px!important}
 .ag-v8-hero{min-height:auto;display:block;padding:62px 18px 22px;background-position:63% top;background-size:auto 590px;background-color:#453c38}
 .ag-v8-warm-fade{background:linear-gradient(90deg,rgba(28,25,24,.64),rgba(27,24,23,.30)),linear-gradient(180deg,rgba(23,20,19,.08) 0%,rgba(28,23,21,.5) 53%,#352f2c 76%,#332c29 100%)}
 .ag-v8-hero-content{width:100%;max-width:500px}
 .ag-v8-eyebrow{font-size:10px;letter-spacing:.18em;margin-bottom:17px}
 .ag-v8-hero h2{font-size:clamp(50px,10.5vw,72px);margin-bottom:15px!important}
 .ag-v8-hero-content>p{font-size:15px;line-height:1.57;max-width:370px}
 .ag-v8-desktop-break{display:none}
 .ag-v8-actions{margin:24px 0 18px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px!important}
 .ag-v8-glass-btn{padding:10px 12px;min-height:51px;border-radius:13px;font-size:13px;gap:7px}
 .ag-v8-proofs{font-size:10px;gap:9px 13px}
 .ag-v8-feature-grid{margin-top:39px;grid-template-columns:1fr;gap:10px}
 .ag-v8-feature{min-height:111px;padding:10px;gap:13px;border-radius:15px}
 .ag-v8-feature img{width:91px;height:89px;flex-basis:91px;border-radius:11px}
 .ag-v8-feature-text strong{font-size:16px}
 .ag-v8-feature-text small{font-size:11px}
 .ag-v8-feature-text em{font-size:10px}
 .ag-v8-tools-section{padding:44px 17px 10px}
 .ag-v8-section-top{display:block;margin-bottom:18px}
 .ag-v8-section-top h3{font-size:34px}
 .ag-v8-section-top p{margin-top:13px;font-size:12px}
 .ag-v8-tools-section .ag-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .ag-v8-tools-section .ag-tool{min-height:132px}
 .ag-v8-bottom-banner{margin:24px 17px 0;padding:24px 20px;display:flex;flex-direction:column;align-items:flex-start}
 .ag-v8-bottom-banner h3{font-size:24px}
 .ag-v8-bottom-banner .ag-v8-glass-btn{width:100%}
}
@media(max-width:365px){.ag-v8-actions{grid-template-columns:1fr}.ag-v8-proofs{gap:8px}.ag-v8-hero h2{font-size:48px}}
@media(prefers-reduced-motion:reduce){
 .ag-v8-hero .ag-reveal,.ag-v8-glass-btn,.ag-v8-feature,.ag-v8-tools-section .ag-tool{animation:none!important;transition:none!important}
}
/* Final account accessibility and responsive header fixes. */
.auth-backdrop[hidden],
.auth-modal .auth-account[hidden],
.auth-modal .auth-form[hidden],
.auth-modal #ag-oauth-wrap[hidden]{display:none!important}
.auth-modal>.modal-close{
 position:absolute!important;inset:auto 16px auto auto!important;
 top:16px!important;right:16px!important;left:auto!important;
 z-index:4;
}
.auth-modal .auth-user-row{
 background:rgba(255,255,255,.06)!important;
 border-color:rgba(255,255,255,.16)!important;
 color:#fff!important;
}
.auth-modal .auth-user-row span:not(.plan-badge){color:#c7ccd2!important}
.auth-modal .auth-user-row .auth-avatar{
 background:rgba(255,255,255,.16)!important;
 border-color:rgba(255,255,255,.22)!important;
}
@media(max-width:760px){
 body.home-active .topbar .credit-chip{
  min-width:79px!important;
  min-height:37px!important;
  padding:6px 8px!important;
  justify-content:center;
 }
 body.home-active .topbar .credit-chip span{
  display:inline!important;
  font-size:9px!important;
  font-weight:550!important;
 }
 body.home-active .topbar .credit-chip strong{font-size:11px!important}
}
@media(max-width:380px){
 body.home-active .topbar .credit-chip span{display:none!important}
 body.home-active .topbar .credit-chip{min-width:49px!important}
}
/* Workspace refinements: readable native buttons and a single mobile header. */
body:not(.home-active) .sidebar .brand-name,
body:not(.home-active) .panel-head h2,
body:not(.home-active) .calc-card h2,
body:not(.home-active) .panel h2{
 font-family:Inter,system-ui,sans-serif!important;
 letter-spacing:-.035em;
}
body:not(.home-active) .file-btn{
 color:#f7f8f9!important;
 background:linear-gradient(180deg,rgba(255,255,255,.20),rgba(255,255,255,.07))!important;
 border:1px solid rgba(255,255,255,.25)!important;
 box-shadow:inset 0 1px rgba(255,255,255,.20),0 7px 19px rgba(0,0,0,.12);
 border-radius:12px!important;
}
body:not(.home-active) .file-btn:hover{border-color:rgba(255,255,255,.40)!important;background:rgba(255,255,255,.18)!important}
@media(max-width:760px){
 body:not(.home-active) .sidebar:not(.mobile-nav-open){display:none!important}
 body:not(.home-active) .sidebar.mobile-nav-open{
  display:flex!important;
  position:fixed!important;
  top:60px!important;bottom:76px!important;left:0!important;right:0!important;
  width:100%!important;max-width:none!important;max-height:calc(100dvh - 136px)!important;
  overflow-y:auto!important;
  z-index:250!important;padding:14px!important;
  border-right:0!important;border-bottom:1px solid rgba(255,255,255,.14)!important;
  background:rgba(12,14,17,.97)!important;backdrop-filter:blur(20px);
 }
 body:not(.home-active) .sidebar.mobile-nav-open nav{display:block!important;opacity:1!important;pointer-events:auto!important}
 body:not(.home-active) .topbar .credit-chip{min-width:68px!important;justify-content:center;padding:6px 8px!important}
 body:not(.home-active) .topbar .credit-chip span{display:none!important}
 body:not(.home-active) .panel-head h2{font-size:19px!important}
}
/* Keep mobile header controls within the viewport: no clipping/overlapping brand. */
@media(max-width:760px){
 body.home-active .topbar{gap:10px!important;justify-content:space-between!important}
 body.home-active .topbar .top-actions{
  display:flex!important;flex:0 0 auto!important;min-width:0!important;
  width:auto!important;max-width:calc(100vw - 165px)!important;
  overflow:visible!important;flex-wrap:nowrap!important;gap:7px!important;
 }
 body.home-active .topbar #auth-button{
  width:auto!important;max-width:90px!important;min-width:74px!important;
  flex:0 0 auto!important;min-height:37px!important;padding:7px 12px!important;
  justify-content:center!important;
 }
 body.home-active .topbar .credit-chip{
  width:auto!important;max-width:73px!important;min-width:59px!important;
  flex:0 0 auto!important;min-height:37px!important;padding:6px 9px!important;
  justify-content:center!important;gap:5px!important;
 }
 body.home-active .topbar .credit-chip span{display:none!important}
 body.home-active .topbar .credit-chip::before{content:'◈';font-size:14px;line-height:1;color:#efe9e4}
 body.home-active .topbar .credit-chip strong{font-size:12px!important;line-height:1}
}
@media(max-width:365px){
 body.home-active .ag-home-link span{font-size:15px!important}
 body.home-active .topbar .top-actions{max-width:calc(100vw - 145px)!important}
 body.home-active .topbar #auth-button{min-width:64px!important;padding:7px 9px!important}
 body.home-active .topbar .credit-chip{min-width:49px!important;padding:6px 7px!important}
}
@media(max-width:760px){
 body:not(.home-active) .topbar{gap:9px!important;justify-content:space-between!important}
 body:not(.home-active) .topbar .top-actions{
  display:flex!important;flex:0 0 auto!important;min-width:0!important;
  width:auto!important;max-width:calc(100vw - 160px)!important;
  overflow:visible!important;flex-wrap:nowrap!important;gap:7px!important;
 }
 body:not(.home-active) .topbar #auth-button{
  width:auto!important;max-width:90px!important;min-width:74px!important;
  flex:0 0 auto!important;min-height:37px!important;padding:7px 12px!important;
  justify-content:center!important;
 }
 body:not(.home-active) .topbar .credit-chip{
  width:auto!important;max-width:73px!important;min-width:59px!important;
  flex:0 0 auto!important;min-height:37px!important;padding:6px 9px!important;
  justify-content:center!important;gap:5px!important;
 }
 body:not(.home-active) .topbar .credit-chip span{display:none!important}
 body:not(.home-active) .topbar .credit-chip::before{content:'◈';font-size:14px;line-height:1;color:#eceff3}
 body:not(.home-active) .topbar .credit-chip strong{font-size:12px!important;line-height:1}
}
