/* The site navigation, shared by every page (docs/navigation.md): the family credit, the header with the Menu and
   the section row, the breadcrumbs, the notice and the footer site map. Linked after each page's own stylesheets, it
   uses the page's colour tokens (--bg, --fg, --accent ...) with fallbacks, so it holds on pages with their own tokens.
   The markup is written by tools/nav.mjs. No script: the Menu is a <details> disclosure. */
.site-head,.crumbs,body>.notice,.foot-map,.foot-notice,.family-credit{
  --nav-fg:var(--fg,#1b1c1e);--nav-bg:var(--surface,var(--bg,#fbfbfa));--nav-accent:var(--accent,#1d4e89);
  --nav-accent-fg:var(--accent-fg,var(--bg,#fff));--nav-line:var(--line,#dcdde0);--nav-panel:var(--panel,var(--note,#f0f1f3));
  --nav-muted:var(--muted,#4f5257);--nav-font:var(--font,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif)}

/* The Sovereign Website credit (from the factory's site template), as a file so a strict CSP needs no exception.
   To remove it, the owner sets one attribute: <html data-family-credit="off">. */
.family-credit{--fam-fg:var(--family-fg,#5a5a5a);--fam-strong:var(--family-fg-strong,#111);--fam-bg:var(--family-bg,#fff);
  position:absolute;top:var(--family-top,.4rem);right:var(--family-right,.75rem);z-index:50;font-size:.75rem;line-height:1.4;font-family:var(--font)}
@media (prefers-color-scheme:dark){.family-credit{--fam-fg:var(--family-fg,#b5b5b5);--fam-strong:var(--family-fg-strong,#fff);--fam-bg:var(--family-bg,#1c1c1c)}}
.family-credit summary{display:inline-flex;align-items:center;gap:.3rem;cursor:pointer;color:var(--fam-fg);list-style:none;min-height:24px;padding:.15rem .3rem;border-radius:4px}
.family-credit summary::-webkit-details-marker{display:none}
.family-credit summary::after{content:"";width:.35rem;height:.35rem;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg) translateY(-2px)}
.family-credit summary:hover,.family-credit summary:focus-visible,.family-credit[open] summary{color:var(--fam-strong)}
.family-credit ul{position:absolute;right:0;top:100%;margin:.25rem 0 0;padding:.35rem 0;list-style:none;min-width:11rem;
  background:var(--fam-bg);border:1px solid rgba(127,127,127,.3);border-radius:6px;box-shadow:0 4px 16px rgba(0,0,0,.12)}
.family-credit a{display:block;padding:.3rem .8rem;min-height:24px;color:var(--fam-fg);text-decoration:none}
.family-credit a:hover,.family-credit a:focus-visible{color:var(--fam-strong);background:rgba(127,127,127,.1)}
.family-credit .family-gap{border-bottom:1px solid rgba(127,127,127,.25);padding-bottom:.3rem;margin-bottom:.3rem}
[data-family-credit="off"] .family-credit{display:none}
@media print{.family-credit{display:none}}

.family-credit,.site-head .menu{margin:0;border:0;padding:0;background:none}
/* Header: the site name, the Menu, and (from 48rem) the six sections. */
.site-head{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem 1rem;max-width:var(--max,72rem);
  margin:0 auto;padding:2.2rem 1rem .4rem;font-family:var(--nav-font);line-height:1.3}
.site-head .name{flex:1 1 0;min-width:0;font-weight:700;font-size:1.02rem;color:var(--nav-fg);text-decoration:none}
.site-head .name:hover{text-decoration:underline}
.menu summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:.5rem;min-height:2.75rem;padding:.3rem .95rem;
  border:2px solid var(--nav-accent);border-radius:999px;color:var(--nav-accent);font:700 .95rem/1 var(--nav-font);background:var(--nav-bg)}
.menu summary::-webkit-details-marker{display:none}
.menu summary::before{content:"";width:1rem;height:.7rem;flex:none;
  background:linear-gradient(currentColor,currentColor) 0 0/100% 2px no-repeat,linear-gradient(currentColor,currentColor) 0 50%/100% 2px no-repeat,linear-gradient(currentColor,currentColor) 0 100%/100% 2px no-repeat}
.menu[open] summary{background:var(--nav-accent);color:var(--nav-accent-fg)}
.menu[open] summary::before{background:linear-gradient(45deg,transparent calc(50% - 1px),currentColor calc(50% - 1px),currentColor calc(50% + 1px),transparent calc(50% + 1px)),
  linear-gradient(-45deg,transparent calc(50% - 1px),currentColor calc(50% - 1px),currentColor calc(50% + 1px),transparent calc(50% + 1px));width:.8rem;height:.8rem}
.menu-panel{position:absolute;z-index:45;left:1rem;right:1rem;top:100%;margin-top:.3rem;padding:1rem 1.1rem .8rem;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,14rem),1fr));gap:.9rem 1.6rem;
  background:var(--nav-bg);color:var(--nav-fg);border:1px solid var(--nav-line);border-radius:10px;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.menu-h{margin:0 0 .3rem;font:700 .74rem/1.3 var(--nav-font);letter-spacing:.1em;text-transform:uppercase;color:var(--nav-muted)}
.menu-group ul{list-style:none;margin:0;padding:0}
.menu-group li{margin:0}
.menu-group a,.menu-all a{display:block;min-height:24px;padding:.3rem .5rem;border-radius:4px;color:var(--nav-fg);text-decoration:none;font-size:.93rem}
.menu-group .sub a{padding-left:1.2rem;font-size:.88rem}
.menu-group a:hover,.menu-group a:focus-visible,.menu-all a:hover,.menu-all a:focus-visible{background:var(--nav-panel);text-decoration:underline}
.menu-panel a[aria-current="page"]{font-weight:700;color:var(--nav-accent);box-shadow:inset 3px 0 0 var(--nav-accent);background:var(--nav-panel)}
.menu-all{grid-column:1/-1;margin:.2rem 0 0;padding-top:.6rem;border-top:1px solid var(--nav-line)}
.menu-all a{display:inline-block;font-weight:700;color:var(--nav-accent)}
.sections{display:none;flex-basis:100%}
.sections ul{list-style:none;display:flex;flex-wrap:wrap;gap:0 1.6rem;margin:0;padding:0}
.sections li{margin:0}
.sections a{display:inline-block;padding:.45rem 0 .35rem;border-bottom:3px solid transparent;color:var(--nav-fg);font-weight:600;font-size:.95rem;text-decoration:none}
.sections a:hover{border-bottom-color:var(--nav-line)}
.sections a[aria-current]{border-bottom-color:var(--nav-accent);color:var(--nav-accent)}
@media (min-width:48rem){
  .site-head{padding-bottom:0;border-bottom:1px solid var(--nav-line)}
  .sections{display:block}
  .menu-panel{left:auto;width:min(60rem,calc(100% - 2rem))}
}
@media (max-width:47.99rem){
  .site-head{padding-top:2rem;gap:.5rem}
  .site-head .name{font-size:.95rem}
  .menu-group a,.menu-all a{padding:.6rem .5rem;font-size:1rem}
  .menu-group .sub a{font-size:.95rem}
  .menu-group.is-here{order:-1}
}
/* Breadcrumbs, on every page but home. */
.crumbs{max-width:var(--max,72rem);margin:0 auto;padding:.5rem 1rem .3rem;font:.85rem/1.4 var(--nav-font);color:var(--nav-muted)}
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;align-items:center;margin:0;padding:0}
.crumbs li{margin:0;display:inline-flex;align-items:center;min-width:0}
.crumbs li+li::before{content:"\203A";margin:0 .45rem;color:var(--nav-muted)}
.crumbs a{display:inline-block;min-height:24px;padding:.15rem 0;color:var(--nav-accent)}
.crumbs [aria-current]{color:var(--nav-fg)}
/* The notice: near the top of every page; short on phones. */
body>.notice{max-width:var(--max,72rem);margin:0 auto;padding:.3rem 1rem 0;border:0;font-size:inherit;color:var(--nav-fg)}
body>.notice p{margin:0;padding:.45rem .8rem;border-left:4px solid var(--nav-accent);background:var(--nav-panel);font:600 .9rem/1.45 var(--nav-font);color:var(--nav-fg)}
.n-short{display:none}
@media (max-width:40rem){
  .n-long{display:none}.n-short{display:inline}
  body>.notice p{font-size:.74rem;padding:.3rem .5rem;border-left-width:3px}
}
/* Footer: the full notice and the site map in short. */
.foot-notice{font-weight:600;color:var(--nav-fg)}
.foot-map{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,10.5rem),1fr));gap:.6rem 1.5rem;margin:.8rem 0 1rem;font:.9rem/1.45 var(--nav-font)}
.fm-h{margin:0 0 .2rem;font-weight:700}
.fm-h a{color:var(--nav-fg)}
.foot-map ul{list-style:none;margin:0;padding:0}
.foot-map li{margin:0}
.foot-map ul a{display:inline-block;min-height:24px;padding:.1rem 0;color:var(--nav-accent)}
.foot-map a[aria-current="page"]{font-weight:700;color:var(--nav-fg)}
/* The site map page. */
.sm-section{margin-top:1.5rem;scroll-margin-top:1rem}
.sm-list{list-style:none;padding:0;margin:0}
.sm-list li{margin:0;padding:.55rem 0;border-bottom:1px solid var(--line,#dcdde0)}
.sm-list li.sub{padding-left:1.2rem}
.sm-list a{font-weight:700}
.sm-line{display:block;font-size:.93rem;color:var(--muted,#4f5257)}
@media print{.menu,.sections,.crumbs{display:none}}
.menu-group .sub2 a{padding-left:1.9rem}
.sm-list li.sub2{padding-left:2.4rem}
/* "Choose a design", with a preview of each design. */
.site-head .chooser{margin:0;border:0;padding:0;background:none}
.chooser summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:.45rem;min-height:2.75rem;padding:.3rem .95rem;
  border:2px solid var(--nav-accent);border-radius:999px;color:var(--nav-accent);font:700 .95rem/1 var(--nav-font);background:var(--nav-bg)}
.chooser summary::-webkit-details-marker{display:none}
.chooser summary::after{content:"";width:.42rem;height:.42rem;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg) translateY(-2px)}
.chooser[open] summary{background:var(--nav-accent);color:var(--nav-accent-fg)}
.chooser[open] summary::after{transform:rotate(-135deg) translateY(-1px)}
.ch-short{display:none}
.chooser-panel{position:absolute;z-index:46;left:1rem;right:1rem;top:100%;margin-top:.3rem;padding:1rem 1.1rem .8rem;
  background:var(--nav-bg);color:var(--nav-fg);border:1px solid var(--nav-line);border-radius:10px;box-shadow:0 12px 32px rgba(0,0,0,.18)}
.chooser-list{list-style:none;margin:0;padding:0;display:grid;gap:.8rem;grid-template-columns:repeat(5,minmax(0,1fr))}
.chooser-list li{margin:0}
.chooser-list a{display:flex;flex-direction:column;gap:.15rem;padding:.4rem;border-radius:8px;color:var(--nav-fg);text-decoration:none;height:100%}
.chooser-list img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top;border-radius:5px;border:1px solid var(--nav-line);margin-bottom:.35rem;background:var(--nav-panel)}
.ch-name{font-weight:700;font-size:.93rem;line-height:1.25}
.ch-name .num{font-family:var(--mono,ui-monospace,monospace);color:var(--nav-muted);margin-right:.2rem}
.ch-kind{font-size:.8rem;line-height:1.3;color:var(--nav-muted)}
.chooser-list a:hover,.chooser-list a:focus-visible{background:var(--nav-panel)}
.chooser-list a:hover .ch-name{text-decoration:underline}
.chooser-list a[aria-current="page"]{background:var(--nav-panel);box-shadow:inset 0 0 0 2px var(--nav-accent)}
.chooser-list a[aria-current="page"] .ch-name{color:var(--nav-accent)}
.chooser-all{margin:.8rem 0 0;padding-top:.6rem;border-top:1px solid var(--nav-line);font-size:.88rem;color:var(--nav-muted)}
.chooser-all a{font-weight:700;color:var(--nav-accent);margin-right:.6rem}
@media (min-width:48rem){.chooser-panel{left:auto;width:min(62rem,calc(100% - 2rem))}}
@media (max-width:60rem){.chooser-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:47.99rem){
  .chooser-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem}
  .ch-long{display:none}.ch-short{display:inline}
  .chooser summary{padding:.3rem .8rem}
}
@media (max-width:26rem){.site-head .name{flex-basis:100%}.site-head .chooser{margin-left:0}}
/* The local model, as a prominent card (home page, /browser/, /studio/). */
.key-tag{display:inline-block;font:700 .72rem/1.4 var(--nav-font,system-ui,sans-serif);letter-spacing:.06em;text-transform:uppercase;padding:.15rem .6rem;border-radius:999px;border:1.5px solid currentColor}
.feature-local{--fl-bg:var(--card,var(--surface,var(--bg,#fff)));display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);align-items:stretch;margin:2rem 0;
  border:1px solid var(--line,#dcdde0);border-radius:18px;overflow:hidden;background:var(--fl-bg);color:var(--fg,#1b1c1e);box-shadow:0 1px 2px rgba(12,22,44,.05),0 12px 32px rgba(12,22,44,.08);font-family:var(--font,system-ui,sans-serif)}
.feature-local .fl-art{display:block;width:100%;height:100%;min-height:12rem;object-fit:cover;background:#0b1f4b}
.feature-local .fl-body{padding:clamp(1.1rem,3vw,2rem)}
.feature-local .fl-tag{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin:0 0 .5rem;font-size:.88rem;color:var(--muted,#4f5257)}
.feature-local .key-none{color:#0a5f59}
.feature-local h2{margin:0 0 .5rem;font-size:clamp(1.5rem,3vw,2.1rem);line-height:1.15;border:0;padding:0}
.feature-local p{margin:.4rem 0;font-size:1rem;line-height:1.55}
.feature-local .fl-go{margin-top:1rem}
.feature-local .btn{display:inline-block;padding:.75rem 1.4rem;border-radius:999px;background:var(--accent,#1d4e89);color:var(--accent-fg,#fff);font-weight:700;text-decoration:none}
.feature-local .btn:hover{text-decoration:underline}
@media (max-width:44rem){.feature-local{grid-template-columns:1fr}.feature-local .fl-art{min-height:0;height:8rem}}
@media (prefers-color-scheme:dark){.feature-local .key-none{color:var(--teal,#5fd0c6)}}
.feature-local .fl-credit{font-size:.82rem;margin-top:.6rem}.feature-local .fl-credit a{color:var(--muted,#4f5257)}
