/* ANT unified header + settings modal — extracted from homepage master (index.html).
   Namespaced under .ah-root / .ah-modal-root so it cannot collide with page CSS. */
.ah-root,.ah-modal-root{--blue:#0081FB;--blue-dark:#0064E0;--ink:#172336;--body:#5D6879;--lav:#EEF4FF;--line:#E5EAF1;--bg:#fff;--soft:#F7F9FC;--radius:20px;--r-sm:12px;--r-md:16px;--r-lg:24px;--shadow-sm:0 2px 4px #17233604,0 6px 16px #17233604;--shadow-lg:0 4px 8px #17233604,0 16px 40px #1723360B;}
.ah-root .ui-icon{width:20px;height:20px;stroke-width:1.8;fill:none}
.ah-root .wrap{max-width:1240px;margin:0 auto;padding:0 32px}
.ah-root{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid #E5EAF1D9}
.ah-root .nav{display:flex;align-items:center;gap:24px;height:80px}
.ah-root .logo{display:flex;align-items:center;gap:11px;font-weight:700;font-size:1.25rem;color:var(--ink);letter-spacing:-.03em;flex-shrink:0}
.ah-root .nav .logo img{height:40px!important;width:auto;max-width:210px;object-fit:contain}
.ah-root .logo b{color:var(--blue)}
.ah-root .nav-links{display:flex;gap:4px;margin-left:16px}
.ah-root .nav-links a{font-size:.875rem;font-weight:600;color:#475569;padding:11px 14px;border-radius:var(--r-sm);transition:background .2s,color .2s}
.ah-root .nav-links a:hover{color:var(--ink);background:var(--soft)}
.ah-root #settingsBtn{margin-left:auto}
.ah-root .nav-cta{margin-left:0}
.ah-root .icon-btn, .ah-root .hamburger{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);width:44px;height:44px;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;color:#637084;transition:background .2s,color .2s,border-color .2s;box-shadow:var(--shadow-sm)}
.ah-root .icon-btn:hover, .ah-root .hamburger:hover{background:var(--soft);border-color:#BCD6F3;color:var(--blue-dark)}
.ah-root .key-dot{position:absolute;top:7px;right:7px;width:8px;height:8px;border-radius:50%;background:#CBD5E1;border:2px solid #fff}
.ah-root .key-dot.on{background:#16A34A}
.ah-root .hamburger{display:none;margin-left:auto}
.ah-root .nav-links{display:flex;gap:2px;margin-left:12px;align-items:center}
.ah-root .fam-dd{position:relative}
.ah-root .fam-trigger{background:none;border:0;cursor:pointer;display:flex;align-items:center;gap:5px;font-size:.8125rem;font-weight:600;color:#475569;padding:11px 8px;border-radius:8px;white-space:nowrap;transition:background .2s,color .2s}
.ah-root .fam-trigger svg{width:12px;height:12px;transition:transform .2s}
.ah-root .fam-trigger:hover{color:var(--fc);background:var(--soft)}
.ah-root .fam-dd.open .fam-trigger{color:var(--fc);background:var(--soft)}
.ah-root .fam-dd.open .fam-trigger svg{transform:rotate(180deg)}
.ah-root .fam-panel{display:none;position:absolute;top:calc(100% + 8px);left:0;min-width:272px;max-width:300px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 44px #17233626;padding:8px;z-index:60}
.ah-root .fam-dd.open .fam-panel{display:block}
.ah-root .fam-dd:nth-last-child(-n+3) .fam-panel{left:auto;right:0}
.ah-root .fam-panel a{display:block;font-size:.8125rem;line-height:1.4;padding:8px 10px;border-radius:8px;color:#637187;text-decoration:none;transition:background .15s,color .15s}
.ah-root .fam-panel a:hover{background:var(--soft);color:var(--ink)}
.ah-root .fam-all{display:block!important;font-size:.75rem!important;font-weight:700!important;color:var(--fc)!important;border-top:1px solid var(--line);margin-top:6px;padding-top:10px!important}
.ah-root .fam-all:hover{text-decoration:underline;text-underline-offset:4px;background:none!important}
.ah-root .mobile-nav{display:none;position:absolute;top:calc(100% + 6px);left:12px;right:12px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 32px #1723362E;z-index:60;max-height:calc(100dvh - 80px);overflow-y:auto;overscroll-behavior:contain;padding:10px 18px}
.ah-root .mobile-nav.open{display:block}
.ah-root .mnav-block{border-bottom:1px solid var(--line)}
.ah-root .mnav-head{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;padding:13px 2px;font-size:.9375rem;font-weight:600;color:var(--ink);cursor:pointer;text-align:left}
.ah-root .mnav-head::after{content:"";width:7px;height:7px;border-right:1.5px solid #8290A4;border-bottom:1.5px solid #8290A4;transform:rotate(45deg);margin-left:auto;margin-right:6px;transition:transform .2s}
.ah-root .mnav-block.open .mnav-head::after{transform:rotate(225deg)}
.ah-root .mnav-dot{width:12px;height:12px;border-radius:4px;flex:none}
.ah-root .mnav-links{display:none;padding:2px 0 10px 22px}
.ah-root .mnav-block.open .mnav-links{display:block}
.ah-root .mnav-links a{display:block;font-size:.875rem;padding:8px 6px;color:#637187;text-decoration:none;border-radius:8px}
.ah-root .mnav-links a:hover{background:var(--soft);color:var(--ink)}
.ah-root .mnav-links a.mnav-all{font-weight:700}
.ah-root .mnav-auth{padding:14px 2px 8px;text-align:center}
.ah-root .mnav-auth .ant-loginbtn{margin-left:0;width:100%}
@media(max-width:1023px){.ah-root .nav-links{display:none}}
@media(max-width:1023px){.ah-root .hamburger{display:flex}}
@media(max-width:1023px){.ah-root #settingsBtn{margin-left:0}}
@media(max-width:860px){.ah-root .wrap{padding-left:24px;padding-right:24px}}
@media(max-width:860px){.ah-root .nav{gap:12px;height:72px}}
@media(max-width:639px){.ah-root .wrap{padding-left:20px;padding-right:20px}}
@media(max-width:639px){.ah-root .nav{height:68px;gap:8px}}
@media(max-width:639px){.ah-root .nav .logo img{height:auto!important;width:154px!important;max-width:100%}}
@media(max-width:639px){.ah-root .nav .logo{min-width:0;flex-shrink:1}}
@media(max-width:639px){.ah-root .nav-cta{display:none}}
@media(max-width:639px){.ah-root .icon-btn, .ah-root .hamburger{width:40px;height:40px;border-radius:10px}}
@media(max-width:479px){.ah-root .nav .logo img{width:146px!important}}
.ah-root .ant-loginbtn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 20px;border-radius:10px;background:#0081FB;color:#fff;font-weight:700;font-size:.9rem;text-decoration:none;white-space:nowrap;margin-left:8px}
.ah-root .ant-loginbtn:hover{filter:brightness(.93)}
.ah-modal-root .btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:600;font-size:.875rem;line-height:1.4;padding:13px 22px;min-height:46px;border-radius:var(--r-sm);transition:background .2s,box-shadow .2s,transform .2s;border:1px solid transparent;cursor:pointer;white-space:nowrap}
.ah-modal-root .btn:active{transform:translateY(0)}
.ah-modal-root .modal-overlay{position:fixed;inset:0;background:#0B1C3673;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);z-index:100;display:none;align-items:center;justify-content:center;padding:24px}
.ah-modal-root .modal-overlay.open{display:flex}
.ah-modal-root .modal{background:#fff;border:1px solid #FFFFFF80;border-radius:var(--r-lg);max-width:460px;width:100%;padding:32px;box-shadow:0 32px 100px #05152C40;position:relative;max-height:calc(100dvh - 48px);overflow:auto}
.ah-modal-root .modal h3{color:var(--ink);font-size:1.375rem;letter-spacing:-.03em;margin-bottom:12px;display:flex;align-items:center;gap:10px;font-weight:600;padding-right:20px}
.ah-modal-root .modal h3 svg{color:#7C3AED;width:23px;height:23px}
.ah-modal-root .modal p.desc{font-size:.875rem;line-height:1.8;margin-bottom:16px}
.ah-modal-root .get-key{display:inline-flex;align-items:center;gap:8px;font-size:.8125rem;font-weight:600;color:#7C3AED;margin-bottom:26px}
.ah-modal-root .get-key svg{width:14px;height:14px}
.ah-modal-root .get-key:hover{text-decoration:underline;text-underline-offset:4px}
.ah-modal-root .modal label{font-size:.6875rem;font-weight:700;letter-spacing:.07em;color:#65748A;display:block;margin-bottom:9px}
.ah-modal-root .key-row{display:flex;gap:8px}
.ah-modal-root .key-row input{flex:1;min-width:0;width:100%;padding:13px 14px;font-size:.875rem;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;border:1px solid #D8E0EC;border-radius:var(--r-sm);outline:none;color:var(--ink);background:#FCFDFF;transition:border-color .2s,box-shadow .2s}
.ah-modal-root .key-row input:focus{border-color:#7C3AED;box-shadow:0 0 0 3px #7C3AED12}
.ah-modal-root .key-row button{background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);width:46px;flex-shrink:0;cursor:pointer;color:#7D8BA0;display:flex;align-items:center;justify-content:center}
.ah-modal-root .key-row button:hover{border-color:#7C3AED;color:#7C3AED}
.ah-modal-root .modal-actions{display:flex;gap:10px;margin-top:16px}
.ah-modal-root .btn-violet{background:#7C3AED;color:#fff;flex:1;box-shadow:0 3px 7px #7C3AED20}
.ah-modal-root .btn-violet:hover{background:#6D28D9}
.ah-modal-root .btn-ghost{background:#fff;border:1px solid var(--line);color:#65748A}
.ah-modal-root .btn-ghost:hover{border-color:#E5322D;color:#E5322D}
.ah-modal-root .modal .fine{font-size:.75rem;color:#7B889C;line-height:1.8;margin-top:24px;background:var(--soft);border:1px solid #EDF1F6;border-radius:var(--r-sm);padding:14px 16px}
.ah-modal-root .modal .fine svg{width:14px;height:14px;color:#16A34A;margin-right:5px;vertical-align:-2px}
.ah-modal-root .modal-close{position:absolute;top:18px;right:18px;width:32px;height:32px;border-radius:8px;background:none;border:0;color:#9CA9BB;cursor:pointer;display:flex;align-items:center;justify-content:center}
.ah-modal-root .modal-close:hover{color:var(--ink);background:var(--soft)}
@media(max-width:639px){.ah-modal-root .modal-overlay{padding:16px}}
@media(max-width:639px){.ah-modal-root .modal{padding:28px 24px;max-height:calc(100dvh - 32px)}}
@media(prefers-reduced-motion:reduce){.ah-modal-root .btn, .ah-modal-root .card, .ah-modal-root .fan-card{transition:none}}
@media(prefers-reduced-motion:reduce){.ah-modal-root .btn:hover, .ah-modal-root .card:hover, .ah-modal-root .fan-card:hover{transform:none}}
/* Compact shared header. Higher specificity keeps legacy page styles consistent. */
:root{--ant-header-height:64px}
header.ah-root,.ant-modern header.ah-root{height:calc(var(--ant-header-height) + 1px);min-height:0;box-sizing:border-box}
header.ah-root .nav,.ant-modern header.ah-root .nav{height:var(--ant-header-height);min-height:0;gap:18px;flex-wrap:nowrap;padding-top:0;padding-bottom:0}
header.ah-root .nav .logo img,.ant-modern header.ah-root .nav .logo img{width:148px!important;height:auto!important;max-width:100%;max-height:38px}
header.ah-root .nav .logo,.ant-modern header.ah-root .nav .logo{flex:0 0 auto;line-height:1}
header.ah-root .ant-nav-actions,.ant-modern header.ah-root .ant-nav-actions{gap:8px;flex:0 0 auto;margin-left:auto}
header.ah-root .icon-btn,header.ah-root .hamburger,header.ah-root .ant-credit-button,header.ah-root .ant-loginbtn,.ant-modern header.ah-root .icon-btn,.ant-modern header.ah-root .hamburger,.ant-modern header.ah-root .ant-credit-button,.ant-modern header.ah-root .ant-loginbtn{height:36px;min-height:36px;border-radius:9px;box-sizing:border-box}
header.ah-root .icon-btn,header.ah-root .hamburger,.ant-modern header.ah-root .icon-btn,.ant-modern header.ah-root .hamburger{width:36px}
header.ah-root .ant-loginbtn,.ant-modern header.ah-root .ant-loginbtn{padding:0 15px;font-size:12px;line-height:1;margin:0}
header.ah-root .ant-credit-button,.ant-modern header.ah-root .ant-credit-button{padding:0 10px;font-size:11px}
header.ah-root .ant-all-tools-trigger,.ant-modern header.ah-root .ant-all-tools-trigger{height:36px;min-height:36px;padding:0 12px;border-radius:9px;font-size:12px;line-height:1}
header.ah-root .icon-btn>.ant-icon,header.ah-root .hamburger>.ant-icon{width:19px;height:19px}
.ant-modern header.ah-root .ant-mega{max-height:calc(100dvh - var(--ant-header-height) - 18px)}
header.ah-root .ant-global-menu-body{max-height:calc(100dvh - var(--ant-header-height) - 82px)}
header.ah-root .ant-family-list,header.ah-root .ant-global-menu-content{max-height:calc(100dvh - var(--ant-header-height) - 122px)}
@media(max-width:1199px){:root{--ant-header-height:60px}header.ah-root .nav,.ant-modern header.ah-root .nav{gap:16px}.ant-modern header.ah-root .nav .logo img{width:140px!important}}
@media(max-width:1024px){header.ah-root .icon-btn,header.ah-root .hamburger,header.ah-root .ant-credit-button,header.ah-root .ant-loginbtn,header.ah-root .ant-all-tools-trigger,.ant-modern header.ah-root .icon-btn,.ant-modern header.ah-root .hamburger,.ant-modern header.ah-root .ant-credit-button,.ant-modern header.ah-root .ant-loginbtn,.ant-modern header.ah-root .ant-all-tools-trigger{height:44px;min-height:44px}header.ah-root .icon-btn,header.ah-root .hamburger,.ant-modern header.ah-root .icon-btn,.ant-modern header.ah-root .hamburger{width:44px}.ant-modern header.ah-root .wrap{padding-left:20px;padding-right:20px}}
@media(max-width:760px){:root{--ant-header-height:56px}header.ah-root .nav,.ant-modern header.ah-root .nav{gap:10px}.ant-modern header.ah-root .wrap{padding-left:12px;padding-right:12px}header.ah-root .nav .logo img,.ant-modern header.ah-root .nav .logo img{width:112px!important;max-height:32px}header.ah-root .ant-nav-actions,.ant-modern header.ah-root .ant-nav-actions{gap:4px}header.ah-root .ant-loginbtn,header.ah-root .ant-credit-button,.ant-modern header.ah-root .ant-loginbtn,.ant-modern header.ah-root .ant-credit-button{width:44px;min-width:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}.ant-modern header.ah-root .ant-global-menu-body{max-height:calc(100dvh - var(--ant-header-height) - 72px)}header.ah-root .ant-family-list,header.ah-root .ant-global-menu-content{max-height:none}}
@media(max-width:360px){header.ah-root .nav .logo img,.ant-modern header.ah-root .nav .logo img{width:92px!important}.ant-modern header.ah-root .wrap{padding-left:10px;padding-right:10px}header.ah-root .nav,.ant-modern header.ah-root .nav{gap:8px}header.ah-root .ant-nav-actions,.ant-modern header.ah-root .ant-nav-actions{gap:3px}}

/* Workspaces may add page-specific nav padding; keep the shared row geometry. */
.ant-modern header.ah-root .wrap.nav{padding-top:0;padding-bottom:0}
@media(max-width:760px){.ant-modern header.ah-root .wrap.nav{gap:10px;padding-left:12px;padding-right:12px}}
@media(max-width:360px){.ant-modern header.ah-root .wrap.nav{gap:8px;padding-left:10px;padding-right:10px}}
