*{margin:0;padding:0;box-sizing:border-box}
ol,ul{list-style:none}
table{border-collapse:collapse}

:root{
  --aeg-bg:#3d1129;
  --aeg-ink:#b9a6ae;
  --aeg-accent:#9ad64a;
  --aeg-accent2:#a9b0bd;
  --aeg-surface:#5c2340;
  --aeg-baseline:#7a4a63;
  --aeg-rule:#6d3350;
  --aeg-head:#efe4ea;
  --aeg-week:0.9615%;
  --aeg-gutter:3.7rem;
  --aeg-spine:1.35rem;
  --aeg-lab:0rem;
  --aeg-today:0.4423;
}

html{background:var(--aeg-bg)}

body{
  background:var(--aeg-bg);
  color:var(--aeg-ink);
  font-family:"Saira Condensed","Arial Narrow",system-ui,sans-serif;
  font-weight:400;
  font-size:1.24rem;
  line-height:1.42;
  letter-spacing:.006em;
  overflow-x:hidden;
}

h1,h2,h3,h4,dt,th,caption,legend{
  font-family:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  font-weight:700;
  color:var(--aeg-head);
  letter-spacing:-.01em;
  line-height:1.06;
}

a{color:var(--aeg-accent);transition:color 160ms linear,border-color 160ms linear}
a:hover{color:var(--aeg-head)}

a:focus-visible,[tabindex]:focus-visible,button:focus-visible,
input:focus-visible,summary:focus-visible{
  outline:3px solid var(--aeg-accent);
  outline-offset:3px;
}

.aeg-col{
  width:100%;
  max-width:46rem;
  margin:0 auto;
  padding:0 1.1rem;
}

.aeg-wide .aeg-col{max-width:60rem}

/* ---- masthead ---------------------------------------------------- */

header[role="banner"]{
  background:var(--aeg-surface);
  padding:2.6rem 0 2rem;
  border-bottom:6px solid var(--aeg-accent);
}

h1{
  font-size:clamp(2.1rem,8.4vw,4.1rem);
  text-transform:uppercase;
  word-spacing:-.04em;
  animation:aeg-rise 520ms cubic-bezier(.18,.72,.3,1) both;
}

[role="doc-subtitle"]{
  margin:.9rem 0 1.5rem;
  font-size:1.3rem;
  max-width:38rem;
  color:var(--aeg-accent2);
}

header address{
  font-style:normal;
  font-size:1.18rem;
  color:var(--aeg-head);
  border-left:3px solid var(--aeg-accent);
  padding-left:.8rem;
}

header p{margin-top:.85rem;max-width:36rem}

header nav{margin-top:1.7rem;border-top:1px solid var(--aeg-rule);padding-top:1rem}
header nav ol{display:flex;flex-wrap:wrap;gap:.35rem 1.25rem;counter-reset:aeg-nav}
header nav li{counter-increment:aeg-nav}

header nav a{
  display:inline-block;
  padding:.15rem 0;
  text-decoration:none;
  border-bottom:2px solid var(--aeg-rule);
}

header nav a::before{content:counter(aeg-nav,decimal-leading-zero) "\00a0\00a0";color:var(--aeg-accent2)}
header nav a:hover{border-bottom-color:var(--aeg-accent)}

header nav a[aria-current="page"]{
  color:var(--aeg-head);
  border-bottom-color:var(--aeg-accent);
}

/* ---- the programme spine ----------------------------------------- */

main{
  position:relative;
  padding-left:var(--aeg-gutter);
  background-image:linear-gradient(var(--aeg-rule),var(--aeg-rule));
  background-repeat:no-repeat;
  background-size:2px 100%;
  background-position:var(--aeg-spine) 0;
}

main section{position:relative;padding:2.9rem 0}
main section + section{border-top:1px solid var(--aeg-rule)}

main h2{
  position:relative;
  font-size:clamp(1.65rem,5.4vw,2.5rem);
  max-width:23ch;
  margin-bottom:.35rem;
  padding-top:.1rem;
}

main h2 > b{
  position:absolute;
  left:calc(var(--aeg-gutter) * -1);
  top:-.15rem;
  width:calc(var(--aeg-gutter) - .45rem);
  padding:.25rem .4rem .4rem 0;
  text-align:right;
  font-size:1.45rem;
  line-height:1;
  color:var(--aeg-accent);
  background:var(--aeg-bg);
  transition:color 200ms linear;
}

main h2 > b > small{
  display:block;
  margin-top:.3rem;
  font-family:"Saira Condensed","Arial Narrow",system-ui,sans-serif;
  font-weight:400;
  font-size:.62rem;
  line-height:1.15;
  letter-spacing:.03em;
  text-transform:uppercase;
  overflow-wrap:anywhere;
  color:var(--aeg-accent2);
}

main section:hover h2 > b{color:var(--aeg-head)}

main [role="doc-subtitle"]{
  margin:0 0 1.1rem;
  font-size:1.1rem;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--aeg-accent2);
  border-bottom:1px solid var(--aeg-rule);
  padding-bottom:.6rem;
  max-width:34rem;
}

h3{font-size:1.45rem;margin:2.1rem 0 .6rem;color:var(--aeg-head)}
h4{font-size:1.18rem;margin:1.5rem 0 .4rem;letter-spacing:.03em;text-transform:uppercase;color:var(--aeg-accent2)}

main p{margin-bottom:1rem;max-width:40rem}

strong{color:var(--aeg-head);font-weight:600}
em{color:var(--aeg-accent);font-style:normal;text-decoration:underline;text-underline-offset:.18em}
abbr{text-decoration:none;border-bottom:1px dotted var(--aeg-accent2)}

/* ---- question and answer ----------------------------------------- */

dl{margin-top:1.5rem}

dt{
  font-size:1.4rem;
  margin-top:1.6rem;
  color:var(--aeg-accent);
  max-width:34ch;
}

dd{
  margin-top:.45rem;
  max-width:40rem;
  padding-left:.9rem;
  border-left:2px solid var(--aeg-rule);
  transition:border-color 200ms linear;
}

dd:hover{border-left-color:var(--aeg-baseline)}

/* ---- the phase legend -------------------------------------------- */

main ol[role="list"] > li{
  display:flex;
  flex-wrap:wrap;
  gap:.1rem .8rem;
  padding:.55rem 0;
  border-bottom:1px dotted var(--aeg-rule);
  font-size:1.12rem;
}

main ol[role="list"] > li > b{
  flex:0 0 2.2rem;
  font-family:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  color:var(--aeg-accent);
}

main ol[role="list"] > li > span{flex:1 1 12rem;color:var(--aeg-head)}
main ol[role="list"] > li > small{flex:0 0 auto;font-size:1rem;color:var(--aeg-accent2);letter-spacing:.04em}

main ul[role="list"]{margin:1rem 0 1.2rem;max-width:40rem}

main ul[role="list"] > li{
  padding:.4rem 0 .4rem 1.5rem;
  position:relative;
  border-bottom:1px solid var(--aeg-rule);
}

main ul[role="list"] > li::before{
  content:"";
  position:absolute;
  left:0;
  top:1.05em;
  width:.62rem;
  height:.62rem;
  background:var(--aeg-accent2);
  transition:background-color 200ms linear;
}

main ul[role="list"] > li:hover::before{background:var(--aeg-accent)}

/* ---- tables ------------------------------------------------------- */

[role="region"][tabindex]{overflow-x:auto;margin:1.4rem 0 1.2rem}

table{width:100%;margin:1.5rem 0 1.3rem;font-size:1.08rem;text-align:left}
caption{text-align:left;font-size:1.14rem;padding-bottom:.5rem;max-width:40rem}

thead th{
  border-bottom:2px solid var(--aeg-accent);
  padding:.4rem .6rem .4rem 0;
  font-size:1.02rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  white-space:nowrap;
}

tbody th{
  padding:.5rem .9rem .5rem 0;
  vertical-align:top;
  color:var(--aeg-accent2);
  font-size:1.03rem;
  border-bottom:1px solid var(--aeg-rule);
}

tbody td{padding:.5rem .8rem .5rem 0;vertical-align:top;border-bottom:1px solid var(--aeg-rule)}
tbody tr{transition:background-color 180ms linear}
tbody tr:hover{background:var(--aeg-surface)}
tbody td:last-child{padding-right:0}

/* ---- folded working ----------------------------------------------- */

details{
  border:1px solid var(--aeg-rule);
  background:var(--aeg-surface);
  padding:.2rem .9rem;
  margin:1.3rem 0;
  max-width:44rem;
  transition:border-color 200ms linear;
}

details[open]{border-color:var(--aeg-accent)}

summary{
  cursor:pointer;
  padding:.65rem 0;
  font-family:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  font-weight:700;
  color:var(--aeg-head);
  font-size:1.12rem;
}

summary::marker{color:var(--aeg-accent)}
details > p{padding-bottom:.9rem}

/* ---- the two calculators ------------------------------------------ */

form{
  background:var(--aeg-surface);
  border:1px solid var(--aeg-rule);
  padding:1.1rem 1rem 1.3rem;
  margin-top:1rem;
  max-width:44rem;
}

form ol li{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem .9rem;
  padding:.7rem 0;
  border-bottom:1px dashed var(--aeg-rule);
}

form label{display:flex;align-items:center;gap:.4rem;font-size:1.06rem}
form > p > label{padding:.45rem 0}

form input[type="text"]{flex:1 1 12rem;min-width:8rem}

form input[type="text"],form input[type="number"]{
  font:inherit;
  font-size:1.04rem;
  color:var(--aeg-head);
  background:var(--aeg-bg);
  border:1px solid var(--aeg-rule);
  padding:.3rem .45rem;
  transition:border-color 160ms linear,background-color 160ms linear;
}

form input[type="text"]:hover,form input[type="number"]:hover{border-color:var(--aeg-accent2)}
form input[type="number"]{width:5.4rem}
form input[inputmode="numeric"]{width:8.4rem}
form input[type="checkbox"]{width:1.1rem;height:1.1rem;accent-color:var(--aeg-accent)}

fieldset{border:0;margin:0 0 .4rem}
legend{font-size:1.1rem;padding-bottom:.4rem;letter-spacing:.02em}

fieldset > p{
  display:flex;
  flex-wrap:wrap;
  gap:.3rem .9rem;
  align-items:center;
  padding:.5rem 0;
  border-bottom:1px dashed var(--aeg-rule);
  max-width:none;
  margin:0;
}

fieldset > p > label{flex:1 1 15rem}
fieldset > p > small{flex:1 1 100%;font-size:.98rem;color:var(--aeg-accent2)}

button{
  font:inherit;
  font-size:1.04rem;
  color:var(--aeg-bg);
  background:var(--aeg-accent);
  border:0;
  padding:.42rem 1rem;
  cursor:pointer;
  transition:background-color 160ms linear,transform 120ms ease-out;
}

button:hover{background:var(--aeg-head)}
button:active{transform:translateY(1px)}

output[for]{
  display:block;
  white-space:pre-wrap;
  font-size:1.04rem;
  line-height:1.5;
  color:var(--aeg-head);
  background:var(--aeg-bg);
  border-left:4px solid var(--aeg-accent);
  padding:.8rem .9rem;
  transition:border-color 200ms linear;
}

/* ---- the drawn programme ------------------------------------------ */

[role="figure"]{
  max-width:60rem;
  margin:1.4rem auto 0;
  padding:0 1.1rem;
}

[role="figure"] > [role="img"]{
  position:relative;
  background:var(--aeg-surface);
  border:1px solid var(--aeg-rule);
  padding:1rem .9rem .6rem;
}

[role="img"] > ol > li{padding:.55rem 0}

[role="img"] > ol > li > span:first-child{
  display:block;
  font-size:1rem;
  color:var(--aeg-accent2);
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-bottom:.25rem;
  transition:color 200ms linear;
}

[role="img"] > ol > li > span:last-child{
  display:block;
  position:relative;
  height:1.15rem;
  background:var(--aeg-bg);
}

[role="img"] > ol > li > span:last-child > span{
  position:absolute;
  top:0;
  height:100%;
  left:calc(var(--aeg-s) * var(--aeg-week));
  width:calc(var(--aeg-d) * var(--aeg-week));
  transform-origin:left center;
  animation:aeg-extend 620ms cubic-bezier(.2,.75,.3,1) both;
  animation-delay:calc(var(--aeg-i) * 150ms);
}

[role="img"] > ol > li > span:last-child > span:first-child{background:var(--aeg-baseline)}

[role="img"] > ol > li > span:last-child > span:last-child{
  background:var(--aeg-accent2);
  border-left:2px solid var(--aeg-bg);
  animation-delay:calc(var(--aeg-i) * 150ms + 90ms);
  transition:left 240ms ease-in-out,background-color 200ms linear;
}

[role="img"] > ol > li[aria-current="true"] > span:first-child{color:var(--aeg-accent)}

[role="img"] > ol > li[aria-current="true"] > span:last-child > span:last-child{
  background:var(--aeg-accent);
  left:calc((var(--aeg-s) + var(--aeg-w)) * var(--aeg-week));
}

[role="img"] > [role="separator"]{
  position:absolute;
  top:.7rem;
  bottom:2.5rem;
  left:calc(.9rem + var(--aeg-lab) + (100% - 1.8rem - var(--aeg-lab)) * var(--aeg-today));
  width:2px;
  background:var(--aeg-head);
  animation:aeg-drop 540ms cubic-bezier(.3,.9,.4,1) 1320ms both;
}

[role="img"] > [role="separator"] > b{
  position:absolute;
  top:-.25rem;
  left:.3rem;
  font-family:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
  font-size:.76rem;
  letter-spacing:.03em;
  color:var(--aeg-bg);
  background:var(--aeg-head);
  padding:0 .25rem;
  white-space:nowrap;
}

[role="img"] > p{
  display:flex;
  justify-content:space-between;
  font-size:.94rem;
  color:var(--aeg-accent2);
  border-top:1px solid var(--aeg-rule);
  margin-top:.6rem;
  padding-top:.35rem;
  max-width:none;
}

[role="note"]{
  display:inline-block;
  margin-left:.5rem;
  padding:0 .35rem;
  font-size:.9rem;
  color:var(--aeg-bg);
  background:var(--aeg-accent);
  letter-spacing:.04em;
}

[role="figure"] > ol{margin-top:1.2rem}

[role="figure"] > ol > li{
  padding:.7rem .8rem;
  margin-bottom:.5rem;
  font-size:1.06rem;
  background:var(--aeg-surface);
  border-left:4px solid var(--aeg-rule);
  transition:border-color 200ms linear,color 200ms linear,background-color 200ms linear;
}

[role="figure"] > ol > li > b{color:var(--aeg-accent);margin-right:.4rem}

[role="figure"] > ol > li:hover,
[role="figure"] > ol > li:focus{border-left-color:var(--aeg-accent);color:var(--aeg-head)}

figcaption{
  margin-top:1rem;
  font-size:.99rem;
  color:var(--aeg-accent2);
  max-width:42rem;
}

/* ---- drawn diagrams ------------------------------------------------ */

svg[role="img"]{
  display:block;
  width:100%;
  height:auto;
  background:var(--aeg-surface);
  border:1px solid var(--aeg-rule);
  margin:1.2rem 0 .5rem;
  max-width:44rem;
}

svg[role="img"] text{
  font-family:"Saira Condensed","Arial Narrow",system-ui,sans-serif;
  letter-spacing:.03em;
}

svg[role="img"] text[font-weight="700"]{
  font-family:"Bricolage Grotesque","Trebuchet MS",system-ui,sans-serif;
}

/* ---- footer -------------------------------------------------------- */

footer[role="contentinfo"]{
  background:var(--aeg-surface);
  border-top:6px solid var(--aeg-accent);
  padding:2.1rem 0 2.6rem;
  margin-top:2.6rem;
  font-size:1.06rem;
}

footer p{margin-bottom:.7rem;max-width:44rem}
footer p:first-child{color:var(--aeg-head)}
footer nav{margin-top:1.2rem;border-top:1px solid var(--aeg-rule);padding-top:.9rem}
footer nav ol{display:flex;flex-wrap:wrap;gap:.3rem 1.1rem;font-size:1.02rem}
footer nav a{text-decoration:none;border-bottom:1px solid var(--aeg-rule)}
footer nav a:hover{border-bottom-color:var(--aeg-accent)}

/* ---- the information page ------------------------------------------ */

[role="doc-abstract"]{
  border:2px solid var(--aeg-accent);
  padding:1rem 1.1rem;
  margin:1.4rem 0 2rem;
  max-width:44rem;
  color:var(--aeg-head);
}

/* ---- wider viewports ------------------------------------------------ */

@media (min-width:760px){
  :root{--aeg-gutter:5.4rem;--aeg-spine:2.3rem}
  body{font-size:1.34rem}
  header[role="banner"]{padding:3.6rem 0 2.4rem}
  main section{padding:3.6rem 0}
  main h2 > b{font-size:2.1rem;padding-right:.65rem}
  main h2 > b > small{font-size:.78rem;letter-spacing:.05em}
  [role="img"]{--aeg-lab:15.1rem}
  [role="img"] > ol > li{display:flex;align-items:center;gap:1.1rem;padding:.42rem 0}
  [role="img"] > ol > li > span:first-child{flex:0 0 14rem;margin-bottom:0}
  [role="img"] > ol > li > span:last-child{flex:1 1 auto;height:1.3rem}
  [role="img"] > p{padding-left:15.1rem}
  form ol li{flex-wrap:nowrap;align-items:center}
  fieldset > p > small{flex:0 1 13rem;text-align:right}
}

@media (min-width:1040px){
  [role="figure"]{
    display:grid;
    grid-template-columns:minmax(0,1.4fr) minmax(16rem,.8fr);
    gap:1.6rem;
    align-items:start;
  }
  [role="figure"] > ol{margin-top:0}
  figcaption{grid-column:1 / -1}
}

/* ---- motion ---------------------------------------------------------- */

@keyframes aeg-extend{
  from{transform:scaleX(0)}
  to{transform:scaleX(1)}
}

@keyframes aeg-drop{
  from{transform:translateY(-115%);opacity:0}
  to{transform:translateY(0);opacity:1}
}

@keyframes aeg-rise{
  from{opacity:0;transform:translateY(.5rem)}
  to{opacity:1;transform:translateY(0)}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation:none !important;
    transition:none !important;
  }
}

/* ---- small idioms ---------------------------------------------------- */

::selection{background:var(--aeg-accent);color:var(--aeg-bg)}

main > section:first-of-type{padding-top:2.2rem}

a[rel="next"]{
  display:inline-block;
  margin-top:.4rem;
  padding:.3rem 0;
  text-decoration:none;
  border-bottom:2px solid var(--aeg-rule);
  transition:border-color 180ms linear,padding-left 180ms ease-out;
}

a[rel="next"]::after{content:"\00a0\2192";color:var(--aeg-accent2)}
a[rel="next"]:hover{border-bottom-color:var(--aeg-accent);padding-left:.3rem}

p[aria-describedby],[aria-describedby] > small{color:var(--aeg-accent2)}

form > p:last-of-type{margin-top:.9rem}

main section > .aeg-col > p:last-child{margin-bottom:0}

@media print{
  body{background:#fff;color:#000;font-size:11pt;overflow:visible}
  main{padding-left:0;background-image:none}
  header[role="banner"],footer[role="contentinfo"]{background:#fff;border-color:#000}
  h1,h2,h3,h4,dt,caption,th{color:#000}
  a{color:#000}
  form,details,[role="figure"] > ol > li,svg[role="img"]{background:#fff;border-color:#000}
  main h2 > b{position:static;width:auto;text-align:left;background:none;color:#000}
  main h2 > b > small{display:inline;margin-left:.6rem}
}
