/* The Public Protocol family shell: tokens, typefaces, the top bar, the family
   menu, the footer and the base type, taken from publicprotocol.org's own
   stylesheet so that every sub-site reads as a room of the same house.
   Identical in every sub-site. Page-specific styles go in each site's own
   stylesheet, on top of this file, and read these names.

   The parent has one theme. A dark one is added here from the parent's own
   dark sheet (ink ground, paper text), following the device until chosen. */

@font-face{font-family:Alegreya;src:url(/assets/family/fonts/alegreya-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Alegreya;src:url(/assets/family/fonts/alegreya-500.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Alegreya Sans";src:url(/assets/family/fonts/alegreya-sans-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Alegreya Sans";src:url(/assets/family/fonts/alegreya-sans-500.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Alegreya Sans SC";src:url(/assets/family/fonts/alegreya-sans-sc-500.woff2) format("woff2");font-weight:500;font-display:swap}

/* Colours are pigments: linen ground, bone black, red ochre, yellow ochre,
   vermilion, mauve, YInMn blue, green earth. The -deep values are the same
   pigments darkened just far enough to carry small text or a thin mark. */
:root{
  color-scheme:light;
  --paper:#EFE9DA;
  --ink:#1F1B16;
  --soft:#5E574B;
  --rule:#1F1B16;
  --c-red:#B5472B;
  --c-ochre:#C4912A;
  --c-verm:#D9442B;
  --c-mauve:#8E5A9E;
  --c-blue:#2F4FA8;
  --c-green:#5E7F5A;
  --c-red-deep:#A8401F;
  --c-ochre-deep:#8A650F;
  --c-green-deep:#4C6B48;
  --on-pigment:#1F1B16;
  --bar:58px;
  --serif:Alegreya,"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
  --sans:"Alegreya Sans","Gill Sans","Trebuchet MS",sans-serif;
  --caps:"Alegreya Sans SC","Alegreya Sans","Gill Sans",sans-serif;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --paper:#1F1B16;--ink:#EFE9DA;--soft:#C2B9A6;--rule:#EFE9DA;
    --c-red:#E38B6E;--c-ochre:#E0B45A;--c-verm:#F07A63;--c-mauve:#C39AD0;--c-blue:#9DB1F0;--c-green:#9CBF97;
    --c-red-deep:#E38B6E;--c-ochre-deep:#E0B45A;--c-green-deep:#9CBF97;
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#1F1B16;--ink:#EFE9DA;--soft:#C2B9A6;--rule:#EFE9DA;
  --c-red:#E38B6E;--c-ochre:#E0B45A;--c-verm:#F07A63;--c-mauve:#C39AD0;--c-blue:#9DB1F0;--c-green:#9CBF97;
  --c-red-deep:#E38B6E;--c-ochre-deep:#E0B45A;--c-green-deep:#9CBF97;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top:calc(var(--bar) + 12px);-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:1.125rem;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;overflow-wrap:break-word}
h1,h2,h3,h4,p,ol,ul,dl,dd,figure{margin:0}
ol,ul{padding:0;list-style:none}
img,svg{display:block}
a{color:inherit;text-decoration-thickness:1px;text-underline-offset:.2em}
button,input,textarea{font:inherit;color:inherit}
a:focus-visible,summary:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--c-blue);outline-offset:3px}
[hidden]{display:none !important}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip{position:absolute;left:1rem;top:-4rem;z-index:50;background:var(--ink);color:var(--paper);padding:.5rem .875rem;font-family:var(--sans)}
.skip:focus{top:.5rem}

/* top bar: the parent's, with this room's name after a thin divider */
.bar{position:sticky;top:0;z-index:30;height:var(--bar);display:flex;align-items:center;gap:1.75rem;padding:0 clamp(1rem,3vw,2.25rem);background:var(--paper);color:var(--ink);border-bottom:1px solid var(--rule)}
.mark{font-family:var(--caps);font-size:1.125rem;letter-spacing:.06em;font-weight:500;text-decoration:none;white-space:nowrap}
.bar-room{display:flex;align-items:center;gap:.9rem;margin-right:auto;min-width:0}
.bar-room::before{content:"";width:1px;height:1.4rem;background:var(--rule)}
.bar-room a{font-family:var(--caps);font-size:1.125rem;letter-spacing:.06em;font-weight:500;text-decoration:none;white-space:nowrap}
.bar .mark + .bar-room{margin-left:-.85rem}
.bar-nav{display:flex;align-items:center;gap:1.75rem}
.bar-link,.index summary{font-family:var(--sans);font-size:1.0625rem;white-space:nowrap}
.bar-link{text-decoration:none}
.bar-link:hover,.bar-link[aria-current="page"]{text-decoration:underline}
.bar-link.is-action{border:1px solid var(--ink);border-radius:999px;padding:.2rem .9rem .28rem;background:var(--ink);color:var(--paper)}
.bar-link.is-action:hover{background:transparent;color:var(--ink);text-decoration:none}
.index summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:.55rem;user-select:none}
.index summary::-webkit-details-marker{display:none}
.index summary::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--c-red)}
.sheet{position:fixed;left:0;right:0;top:var(--bar);bottom:0;overflow:auto;background:#1F1B16;color:#EFE9DA;padding:clamp(1.5rem,6vh,4rem) clamp(1.25rem,6vw,6rem) 4rem}
.sheet-title{font-family:var(--serif);font-size:clamp(2.2rem,5vw,3.4rem);line-height:1;margin-bottom:2rem}
.sheet ol{max-width:44rem}
.sheet li{display:grid;grid-template-columns:minmax(0,11rem) minmax(0,1fr);gap:0 1rem;align-items:baseline;padding:.3rem 0;font-family:var(--serif);font-size:1.25rem;color:#CFC6B4}
.sheet li span{font-family:var(--sans);font-size:.9375rem}
.sheet li.group{display:block;margin-top:1.1rem;padding-top:.6rem;border-top:1px solid #57503F;color:#EFE9DA;font-family:var(--caps);font-size:1.0625rem;letter-spacing:.05em}
.sheet li.group:first-child{margin-top:0}
.sheet li.here{color:#EFE9DA}
.sheet a{text-decoration:none;display:block;color:#EFE9DA}
.sheet a:hover{text-decoration:underline}
.sheet a:focus-visible,.sheet button:focus-visible,.foot a:focus-visible,.foot button:focus-visible{outline-color:#9DB1F0}
@media (max-width:899px){
  .bar{gap:1rem}
  .bar-nav{display:none}
  .sheet li{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:420px){
  .mark,.bar-room a{font-size:1rem;letter-spacing:.04em}
  .bar-room{gap:.6rem}
  .bar .mark + .bar-room{margin-left:-.4rem}
}
@media (min-width:900px){.sheet .small-only{display:none}}

/* type, in the parent's rhythm */
h1,h2{font-family:var(--serif);font-weight:400;text-wrap:balance}
h1{font-size:clamp(2.7rem,5vw,4.6rem);line-height:.98;letter-spacing:-.012em}
h2{font-size:clamp(2.1rem,3.3vw,2.9rem);line-height:1.05;letter-spacing:-.006em}
h3{font-family:var(--caps);font-weight:500;font-size:1.3125rem;letter-spacing:.04em;line-height:1.2}
.lead{font-family:var(--serif);font-size:1.4375rem;line-height:1.42;max-width:36rem;text-wrap:pretty}
.wrap{max-width:76rem;margin:0 auto;padding:0 clamp(1.25rem,5vw,5rem)}
@media (max-width:899px){.lead{font-size:1.3125rem}}

/* actions */
.go{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.6rem;margin-top:2.2rem}
.btn{display:inline-block;padding:.62rem 1.5rem .7rem;border:1px solid var(--ink);border-radius:999px;text-decoration:none;font-family:var(--sans);font-weight:500;font-size:1.125rem;line-height:1.3;background:var(--ink);color:var(--paper);cursor:pointer;transition:background-color .2s,color .2s}
.btn:hover{background:transparent;color:var(--ink)}
.btn-quiet{background:transparent;color:var(--ink)}
.btn-quiet:hover{background:var(--ink);color:var(--paper)}

/* footer: the parent's dark foot */
.foot{background:#1F1B16;color:#EFE9DA;padding:3rem 0 3.5rem;margin-top:clamp(3rem,8vh,6rem);font-family:var(--sans);font-size:1rem;line-height:1.55}
.foot .mark{display:block;margin-bottom:1rem}
.foot p{color:#C2B9A6}
.foot p.mark,.foot a{color:#EFE9DA}
.foot p + p{margin-top:.5rem}
.foot-in{display:grid;gap:1.5rem 3rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr))}
.foot .theme{margin-top:1rem;background:transparent;border:1px solid #57503F;border-radius:999px;color:#EFE9DA;padding:.25rem .9rem .32rem;cursor:pointer;font-size:.9375rem}
.foot .theme:hover{border-color:#EFE9DA}

/* moving between rooms and pages: a short cross-fade where the browser can */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.16s}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none !important;transition:none !important}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important}
}
