/* The docs pages in the new template (Jman 30 Nov: "convert the remaining docs pages into the new template").
   build_docpages.py wraps each /alive3/ page's own content in the new header and footer. The old pages use
   --text as a colour, so the new header and footer keep their own variables on themselves. */

/* ---- the new header and footer, with their own variables ---- */
header.top,footer.site{
  --display:"Saira",system-ui,sans-serif; --font:"Inter",system-ui,sans-serif;
  --bg2:#1c2125; --line:#2c3338; --line2:#3a4248; --ink:#fff; --soft:rgba(255,255,255,.78); --mute:#8794a0;
  --label:#3a6872; --accent:#f2a541; --pad:80px; --max:1760px;
  font-family:var(--font); color:var(--ink); line-height:1.55;
}
header.top *,footer.site *{box-sizing:border-box}
header.top .wrap,footer.site .wrap{max-width:var(--max);margin:0 auto;padding:0 var(--pad);position:relative}
header.top{position:relative;z-index:20;background:#161a1d;border-bottom:1px solid var(--line)}
header.top .wrap{display:flex;align-items:center;height:84px;gap:26px}
header.top .logo{flex:none}
header.top .logo img{height:30px;width:auto;display:block}
header.top nav.main{display:flex;gap:20px;margin:0 auto}
header.top nav.main a,header.top .right a{text-decoration:none;font-size:var(--t-ui,14px);color:var(--ink);white-space:nowrap}
header.top nav.main a:hover,header.top .right a:hover{color:var(--accent)}
header.top .right{display:flex;align-items:center;gap:18px}
header.top .menu{display:none}
header.top .tools{position:relative}
header.top .tools summary{list-style:none;cursor:pointer;font-size:var(--t-ui,14px);color:var(--ink);white-space:nowrap}
header.top .tools summary::-webkit-details-marker{display:none}
header.top .tools summary::after{content:"";display:inline-block;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 0 4px 9px}
header.top .tools summary:hover{color:var(--accent)}
header.top .tools nav{position:absolute;right:0;top:38px;background:var(--bg2);border:1px solid var(--line2);padding:8px 20px;min-width:220px;display:flex;flex-direction:column;z-index:60}
header.top .tools nav a{padding:10px 0;border-bottom:1px solid var(--line)}
header.top .tools nav a:last-child{border:0}
header.top .socials{display:flex;align-items:center;gap:18px}
header.top .socials a,header.top .socials .lang{display:flex;align-items:center;color:var(--ink);text-decoration:none;opacity:.85}
header.top .socials a:hover{opacity:1;color:var(--accent)}
header.top .socials svg{width:19px;height:19px;display:block}
header.top .socials .lang{gap:6px;font-size:var(--t-ui,14px);letter-spacing:.04em;opacity:.7}
header.top .socials .lang svg{width:16px;height:16px}
/* news bell */
.bell{position:relative;display:flex;align-items:center}
.bell-btn{position:relative;background:none;border:0;padding:0;color:rgba(255,255,255,.85);cursor:pointer;display:flex}
.bell-btn:hover{color:#f2a541}
.bell-btn svg{width:21px;height:21px;display:block}
.bell-n{position:absolute;top:-7px;right:-10px;min-width:17px;height:17px;padding:0 4px;background:#f2a541;color:#161a1d;font:600 11px/17px Inter,system-ui,sans-serif;text-align:center}
.bell-panel{position:absolute;right:-12px;top:36px;width:min(380px,90vw);max-height:70vh;overflow:auto;background:#1c2125;border:1px solid #3a4248;padding:16px 18px;z-index:60;box-shadow:0 14px 34px rgba(0,0,0,.5);text-align:left}
.bell-head{margin:0 0 12px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#3a6872}
.bell-page{padding:12px 0;border-top:1px solid #2c3338}
.bell-title{display:block;color:#fff;font:500 15px/1.3 Saira,system-ui,sans-serif;text-transform:uppercase;text-decoration:none;margin-bottom:6px}
.bell-title:hover{color:#f2a541}
.bell-row{display:grid;grid-template-columns:84px 1fr;gap:10px;font-size:13px;line-height:1.45;color:rgba(255,255,255,.78)}
.bell-when{color:#8794a0}
.bell-more{font-size:13px;color:#8794a0;margin-top:4px}
.bell-clear{margin-top:12px;background:none;border:1px solid #fff;color:#fff;padding:8px 14px;font:500 13px Inter,system-ui,sans-serif;cursor:pointer}
.bell-clear:hover{background:#fff;color:#161a1d}
/* footer */
footer.site{border-top:1px solid var(--line);background:#161a1d;margin-top:40px}
footer.site .wrap{padding-top:80px;padding-bottom:40px}
footer.site .fgrid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:30px}
footer.site .fgrid h4{font:500 12px var(--font);color:var(--label);text-transform:uppercase;letter-spacing:.04em;margin:0 0 16px}
footer.site .fgrid ul{list-style:none;margin:0;padding:0;line-height:2.1;font-size:var(--t-ui,14px)}
footer.site .fgrid a{text-decoration:none;color:var(--soft)}
footer.site .fgrid a:hover{color:var(--accent)}
footer.site .fgrid img{height:34px;width:auto;margin-bottom:22px;display:block}
footer.site .fgrid p{font-size:13px;color:var(--mute);max-width:42ch;margin:0}
footer.site .legal{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:12px;color:var(--mute);border-top:1px solid var(--line);margin-top:60px;padding-top:24px}
footer.site .legal a{color:var(--mute)}
/* narrower screens: the Menu button */
@media (max-width:1360px){
  header.top nav.main,header.top .tools,header.top .right>a{display:none}
  header.top .right{margin-left:auto}
  header.top .menu{display:block;position:relative}
  header.top .menu summary{padding:10px 0;font-size:var(--t-ui,14px);cursor:pointer;list-style:none;color:var(--ink)}
  header.top .menu summary::-webkit-details-marker{display:none}
  header.top .menu nav{position:absolute;right:0;top:46px;background:var(--bg2);border:1px solid var(--line2);padding:12px 20px;min-width:240px;display:flex;flex-direction:column;z-index:60}
  header.top .menu nav a{text-decoration:none;padding:10px 0;border-bottom:1px solid var(--line);color:var(--ink)}
  header.top .menu nav a:last-child{border:0}
}
@media (max-width:1100px){header.top,footer.site{--pad:40px} footer.site .fgrid{grid-template-columns:1fr 1fr}}
@media (max-width:760px){header.top .socials{display:none} header.top,footer.site{--pad:16px} footer.site .fgrid{grid-template-columns:1fr}}

/* ---- the page itself, in the new colours and fonts (the old pages' own variables, re-set) ---- */
:root,:root[data-theme="dark"],:root[data-theme="light"]{
  color-scheme:dark;
  --bg:#161a1d; --surface:#1c2125; --surface-2:#20262b; --border:#2c3338;
  --text:#ffffff; --muted:#8794a0; --accent:#f2a541; --accent-dim:#b9812f;
  --shadow:none;
}
body{background:#161a1d!important;color:#fff;font-family:"Inter",system-ui,sans-serif!important;-webkit-font-smoothing:antialiased}
.wrap{max-width:1760px!important;padding-left:80px!important;padding-right:80px!important}
@media (max-width:1100px){.wrap{padding-left:40px!important;padding-right:40px!important}}
@media (max-width:760px){.wrap{padding-left:16px!important;padding-right:16px!important}}
.dochead{padding-top:56px!important}
.dochead h1,.doc-main h2,.doc-main h3{font-family:"Saira",system-ui,sans-serif!important;font-weight:500!important;text-transform:uppercase;letter-spacing:-.01em}
.dochead h1{line-height:1.05}
.doc-main h2{font-size:var(--t-h2)!important;line-height:1.1;margin-top:1.6em}
.doc-main h3{font-size:var(--t-h3)!important;line-height:1.2}
.doc-main h4{font-family:"Inter",system-ui,sans-serif;font-weight:600}
.doc-main a{color:#fff;text-decoration-color:rgba(255,255,255,.4);text-underline-offset:3px}
.doc-main a:hover,.toc a:hover{color:#f2a541!important;text-decoration-color:#f2a541}
.toc a{color:rgba(255,255,255,.78)}
.eyebrow{color:#3a6872!important;letter-spacing:.06em}
/* square corners, flat panels, like the website */
.doc :is(div,pre,code,table,img,figure,details,aside,section,button,input,select,textarea,a.btn,.btn,blockquote,kbd){border-radius:0!important}
.doc :is(div,aside,section,details,figure){box-shadow:none!important}
.docfoot{color:#8794a0;font-size:13px}
/* the old title logo beside the page title goes: the new header already carries the ALiVE wordmark */
.dochead .brandlogo{display:none!important}
.dochead.hasbrand{display:block!important}
/* small labels: Inter, spaced capitals, in the label blue */
.eyebrow,.toc-title{font:500 12px/1.3 "Inter",system-ui,sans-serif!important;letter-spacing:.08em!important;text-transform:uppercase}
.toc-title{color:#3a6872!important}
.doc :is(a,li,ul,ol,dl,span.dg-k,span.setdef,span.chip,span.tag,span.mi,span.pill,span.badge,label,summary){border-radius:0!important}
/* pagination like the War Room: 13px Inter, no capitals (Jman 30 Nov) */
.doc .pg-btn{font:500 13px/1.2 "Inter",system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;padding:8px 14px!important}
.doc .pg-at{font:400 13px/1.2 "Inter",system-ui,sans-serif!important;letter-spacing:0!important}
/* the old one-line page footer: the new footer replaces it */
.docfoot{display:none!important}
.wrap>hr.rule:last-of-type{display:none}
/* the overview title sits level with the module icon beside it (Jman 30 Nov) */
.ovsec .pagemi{margin-top:0!important}
.ovsec>.eyebrow{margin-top:0!important;margin-bottom:6px!important}
.ovsec>.eyebrow+h2{margin-top:0!important}
/* the "how modules sync" cards, in the website's card style (Jman 30 Nov) */
ul.dg-set{gap:1px!important;background:#2c3338;border:1px solid #2c3338}
ul.dg-set>li{padding:24px 26px!important;background:#1c2125!important;border:0!important;border-radius:0!important;transition:background .15s}
ul.dg-set>li:hover{background:#20262b!important}
ul.dg-set>li.dg-opt{border:0!important}
ul.dg-set b{display:block;font:500 16px/1.25 "Saira",system-ui,sans-serif!important;text-transform:uppercase;letter-spacing:0!important;color:#fff;margin-bottom:10px}
ul.dg-set .dg-s{font-size:14px!important;line-height:1.6;color:rgba(255,255,255,.78)!important;margin-top:0!important}
.doc .dg-k{font:500 12px/1.4 "Inter",system-ui,sans-serif;background:#161a1d;border-color:#3a4248;color:#f2a541;padding:1px 6px}
ul.dg-set{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr))!important}
@media (max-width:760px){ul.dg-set>li{padding:18px 16px!important} .doc .dg-k{white-space:normal}}
/* table headers at the label size (Jman 30 Nov: "header fonts too big") */
.doc thead th,.doc thead th button{font-family:"Inter",system-ui,sans-serif!important;font-size:12px!important;font-weight:600!important;letter-spacing:.06em!important;line-height:1.3!important}
/* filter buttons on the terrain list and similar pages: the website's button size (Jman 30 Nov) */
.doc .t-chip{font:500 13px/1.2 "Inter",system-ui,sans-serif!important;letter-spacing:0!important;text-transform:none!important;padding:8px 12px!important}
.doc .t-chips select,.doc .t-chips+select,.doc :is(.t-tools,.t-bar) :is(select,button,input){font-size:13px!important}
.doc :is(.t-search,.t-sel,.t-reset,.ix-reset,.colpick>summary){font-family:"Inter",system-ui,sans-serif!important;font-size:13px!important}
/* one card per row: title on the left, text on the right, like the website's steps rows (Jman 30 Nov) */
ul.dg-set{grid-template-columns:1fr!important}
ul.dg-set>li{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:12px 40px;align-items:start}
ul.dg-set>li>b{margin-bottom:0}
ul.dg-set>li>.dg-s{max-width:90ch}
@media (max-width:900px){ul.dg-set>li{grid-template-columns:1fr}}
/* the page-title status badges ("In development", "In testing", "Overhaul complete"): not for release (Jman 30 Nov) */
.dochead .badge{display:none!important}
/* settings group titles (General, Air Operations ...): the 13px label size, not the h3 size (Jman 30 Nov) */
.doc-main details.setgroup>summary h3{font:500 13px/1.3 "Inter",system-ui,sans-serif!important;letter-spacing:.08em!important;text-transform:uppercase}
/* docs page title and section headings one size down (Jman 30 Nov): the title takes the section size,
   sections drop to the next step */
.dochead h1{font-size:var(--t-h2)!important}
.doc-main h2{font-size:clamp(22px,1.8vw,28px)!important}
/* Mission Builder fullscreen badge: its SVG text asks for Bebas Neue, which these pages don't load; the
   fallback ran wider than the pill and under the wordmark (Jman 30 Nov). Saira at this size fits the pill. */
.mbx-badge text{font-family:"Saira",system-ui,sans-serif!important;font-weight:600!important;font-size:30px!important;letter-spacing:.6px!important}
/* "New" on this page's unread changelog rows, and a dot on what they changed (news-bell.js) */
.a3n-newtag{display:inline-block;margin-right:8px;padding:1px 7px;vertical-align:1px;background:rgba(242,165,65,.18);color:#f2a541;font:600 10.5px/1.5 "Inter",system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.a3n-ondot::after{content:"";display:inline-block;width:7px;height:7px;margin-left:7px;border-radius:50%;background:#f2a541;vertical-align:middle;flex:none}
/* phones (Jman 1 Dec): the account shows its picture only, so the Menu button stays on the screen */
@media (max-width:760px){header.top .acct .nm,header.top .acct .role{display:none!important} header.top .right{gap:10px!important} header.top .wrap{gap:12px!important}}
/* small phones (Jman 1 Dec): smaller logo and the language globe only, so Menu stays on screen */
@media (max-width:760px){header.top .logo img{height:22px} header.top .socials .lang{font-size:0!important;gap:0} header.top .menu summary{white-space:nowrap}}

/* long paths, URLs and hashes wrap, and wide tables scroll in their own box, so a phone never scrolls sideways (3 Dec) */
@media (max-width:760px){.doc :is(p,li,td,dd,figcaption) :is(code,strong,a){overflow-wrap:anywhere} .doc table.cmp{display:block;max-width:100%;overflow-x:auto}}
/* F620: the Menu button at any width when the header doesn't fit on one row (lang-switch.js sets html.hdr-tight) */
html.hdr-tight header.top nav.main,html.hdr-tight header.top .tools,html.hdr-tight header.top .right>a{display:none}
html.hdr-tight header.top .right{margin-left:auto}
html.hdr-tight header.top .menu{display:block;position:relative}
html.hdr-tight header.top .menu summary{padding:10px 0;font-size:var(--t-ui,14px);cursor:pointer;list-style:none;color:var(--ink)}
html.hdr-tight header.top .menu summary::-webkit-details-marker{display:none}
html.hdr-tight header.top .menu nav{position:absolute;right:0;top:46px;background:var(--bg2);border:1px solid var(--line2);padding:12px 20px;min-width:240px;display:flex;flex-direction:column;z-index:60}
html.hdr-tight header.top .menu nav a{text-decoration:none;padding:10px 0;border-bottom:1px solid var(--line);color:var(--ink)}
html.hdr-tight header.top .menu nav a:last-child{border:0}
/* F620: between 761 and 1100px the docs header runs past the edge with the Discord, Steam and GitHub icons shown;
   the language button stays, and the icons are in the footer */
@media (max-width:1100px){header.top .socials>a{display:none}}
