/*
 * Reset
 * :::::
 * https://hankchizljaw.com/wrote/a-modern-css-reset/
 */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Set core root defaults */
html {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}


/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*
 * Variables
 * :::::::::
 */

:root {

  /* colors */
  --cyan: #009cdd;
  --magenta: #d60078;
  --yellow: #fedd00;
  --black:  #1b1e23; /*midnight black*/
  --grey: #e8e8e8;
  --dark-grey: #d1d1d1;
  /* --border-color: #31363F; /1* --black + 10% lightness *1/ */
  --border-color: #262A31; /* --black +5% lightness */

  --font-body: "Inter";
  --font-display: "Uxum Grotesque";

  --font-size: calc(0.333vw + 1rem);
  
  --ratio: 1.4;

  /* Scale is exponential
   * if 1rem is 16px
   *  -5: 16 / 1.4 / 1.4 / 1.4 / 1.4 / 1.4 = 2.9
   *  -4: 16 / 1.4 / 1.4 / 1.4 / 1.4 = 4.2 
   *  -3: 16 / 1.4 / 1.4 / 1.4 = 5.8 
   *  -2: 16 / 1.4 / 1.4 = 8.6 
   *  -1: 16 / 1.4 = 11.428 
   *   0: 16
   *   1: 16 * 1.4 = 22.4
   *   2: 16 * 1.4 * 1.4 = 31.4
   *   3: 16 * 1.4 * 1.4 * 1.4 = 43.9
   *   4: 16 * 1.4 * 1.4 * 1.4 * 1.4 = 61.5
   *   5: 16 * 1.4 * 1.4 * 1.4 * 1.4 * 1.4 = 86.l
   */
  --size-6: calc(var(--size-5) / var(--ratio));
  --size-5: calc(var(--size-4) / var(--ratio));
  --size-4: calc(var(--size-3) / var(--ratio));
  --size-3: calc(var(--size-2) / var(--ratio));
  --size-2: calc(var(--size-1) / var(--ratio));
  --size-1: calc(var(--size0) / var(--ratio));
  --size0: 1rem;
  --size1: calc(var(--size0) * var(--ratio));
  --size2: calc(var(--size1) * var(--ratio));
  --size3: calc(var(--size2) * var(--ratio));
  --size4: calc(var(--size3) * var(--ratio));
  --size5: calc(var(--size4) * var(--ratio));
  --size6: calc(var(--size5) * var(--ratio));
  --size7: calc(var(--size6) * var(--ratio));

  /* line height is the basis for vertical spacing */
  --line-height: calc(var(--ratio));
  --line-height-small: 1;

  /* max character width for text */
  --measure: 60ch;

  --grid-gap: var(--size0);
}

/* Use a tighter scale on mobile */
@media only screen and (max-width: 600px) {
  :root {
    --ratio:  1.3;
    --grid-gap: var(--size-1);
  }
}
@media only screen and (max-width: 400px) {
  :root {
    --font-size: 1rem;
  }
}

/*
 * Blocks
 * ::::::
 */

.cover,
.cover\:half {
  display: flex;
  flex-direction: column;
  min-height: 99vh;
}
.cover\:half {
  min-height: 50vh;
}
.cover .principal,
.cover\:half .principal {
  margin-top:  auto;
  margin-bottom: auto;
}
.cover .masthead {
  margin-bottom: 0;
}

article .title {
  --grid-cs: 3;
  margin-bottom: var(--size3);
}
@media only screen and (max-width: 720px) {
  article .title {
    --grid-cs: 1;
  }
}
[class*="border"] {
  --border-width: 1px;
}

[class*="border-top"] {
  border-top: var(--border-width) solid var(--border-color);
}
.border {
  border: var(--border-width) solid var(--border-color);
}
.border-top-dotted {
  border-top-style: dotted;
}
.border-top\:2px {
  --border-width: 2px;
}
.border-top\:3px {
  --border-width: 3px;
}
.border\:img img {
  border: var(--border-width) solid var(--dark-grey);
}

[class*=border-accent] {
   --gaps: calc( ( var(--grid-tc) - 1 ) * var(--grid-gap) );
   --colorstop: calc( (100% - var(--gaps) ) / var(--grid-tc));
   border-image: linear-gradient(
      to right, 
      var(--color) var(--colorstop),
      currentColor var(--colorstop) )
      1 / var(--border-width) 0 0 0
   ;
}
.border-accent\:cyan    { --color: var(--cyan); }
.border-accent\:magenta { --color: var(--magenta); }
.border-accent\:yellow  { --color: var(--yellow); }

.border-bottom\:white {
  border-bottom: 1px solid white;
}
.no-border,
.no-border * {
  border: unset !important;
}

/*
 * Bottom Nav
 * ::::::::::
 * This should probably be folded into the `indenter` sub-classes
 */

.grid.bottom-nav > *:first-child {
  --grid-ce: span 2
}
.grid.bottom-nav > *:last-child {
  --grid-cs: 3;
}

@media only screen and ( max-width: 800px ) {
  .grid.bottom-nav > *:first-child,
  .grid.bottom-nav > *:last-child {
    --grid-cs: 1;
    --grid-ce: 7 ;
  }
}

/* 
 * Debug
 * :::::
 */

.baseline {
  --base: calc(var(--line-height) * 1em);
  background-image: repeating-linear-gradient(
    to bottom,
    /* ascender */
    gainsboro 0px,
    transparent 1px,
    /* x-height */ 
    transparent calc( 1em - 1ex - 1px ),
    powderblue calc( 1em - 1ex ),
    transparent calc( 1em - 1ex + 1px ),
    /* baseline */ 
    transparent calc( 1em - 1px ),
    cadetblue 1em,
    /* descender */
    transparent calc( 1em + 1px ),
    transparent var(--base),
    gainsboro calc( var(--base) + 1px )
  );
  background-repeat: repeat-y;
  /* background-size: 100% var(--base); */
  background-position: 0 var(--base);
}

/* show grid column gutters */
.grid-columns {
  position: relative;
}
.grid-columns::before {
  --width: calc( 100% - (2 * var(--padding)) );
  /* 6 columns / 5 gaps */
  --gaps: calc(  5 * var(--grid-gap) );
  --fr: calc( ( 100% - var(--gaps) ) / 6 );

  content: '';
  position: absolute;
  z-index: -1;
  mix-blend-mode: multiply;
  top: 0;
  height: 100%;
  width: var(--width);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent var(--fr),
    lavenderblush var(--fr),
    lavenderblush calc(var(--fr) + 1rem )
  );
  /* background-size: calc( var(--fr) + 1em); */
}

.debug-border .grid > * {
  box-shadow: inset 0 0 0 1px var(--cyan);
}
.debug-border .subgrid > * {
  box-shadow: inset 0 0 0 1px var(--magenta);
}
.debug-border .subgrid > .subgrid > *,
.debug-border .subgrid > ul > *,
.debug-border .subgrid > ol > * {
  outline: 1px solid var(--yellow);
}

/*
 * Elements
 * :::::::::
 */

/* measure */

* {
  max-width: var(--measure);
}

html,
body,
div,
figure,
figcaption,
header,
hr,
ol,
ul,
nav,
main,
article,
section,
svg,
footer,
.grid,
.subgrid {
  max-width: none;
}

/* document */

body {
  --padding: var(--size1);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  overflow-x: hidden;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 100ch;
  margin: auto;
  padding: var(--padding);
}

@media only screen and (max-width: 450px) {
  body {
    --padding: var(--size-1);
  }
}

main {
  /* dont show tabIndex border */
  outline: none;
}

/* interactive */

a {
  color: initial;
  text-decoration: none;
  border-bottom: 1px dotted;
}
nav a {
  border-bottom: unset;
}
a:visited {
  color: initial;
}

button.simple { 
  border: none;
  padding: 0;
  margin: 0;
  text-align: right;
  text-decoration: none;
  background: unset;
  border-bottom: 1px dotted;
  font-size: inherit;
  cursor: pointer;
  transition: background 250ms ease-in-out, 
              transform 150ms ease;
  -webkit-appearance: none;
  -moz-appearance: none;
}
button.simple:active {
  transform: scale(0.99);
}

/* content */
article h3 {
  margin-bottom: var(--size1);
}
article h4 {
  margin-top: var(--size3);
  margin-bottom: var(--size1);
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border-color);
  margin-top: var(--size2);
  margin-bottom: calc( var(--size1) - 1px);
}

p + p,
p + ol {
  margin-top: var(--size1);
}

/* media */

img {
  /* width: auto; */
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
figure img,
video {
  max-height: 85vh;
  margin: 0 auto;
}
figure,
video {
  margin-top: var(--size2);
  margin-bottom: var(--size2);
}
figcaption {
  margin-top: var(--size-2);
}
svg.icon {
  width: .75em;
  height: .75em;
  stroke: currentColor;
  stroke-width: 4;
  fill: none;
}

video {
  max-width: 100%;
}

/*
 * Fix-up
 * ::::::
 * Fix this proper, some day...
 */

@media only screen and (max-width: 720px) {
  .fixup\@\<720px {
    margin-top: -1.2ex;
    margin-left: var(--grid-gap);
  }
}


/*
 * Font: Inter
 * ::::::::::::
 */

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 100;
  font-display: swap;
  src: url("/assets/fonts/Inter-Thin.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Thin.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 100;
  font-display: swap;
  src: url("/assets/fonts/Inter-ThinItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-ThinItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 200;
  font-display: swap;
  src: url("/assets/fonts/Inter-ExtraLight.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-ExtraLight.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 200;
  font-display: swap;
  src: url("/assets/fonts/Inter-ExtraLightItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-ExtraLightItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/Inter-Light.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Light.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/Inter-LightItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-LightItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Regular.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Regular.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-Italic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Italic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Inter-Medium.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Medium.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Inter-MediumItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-MediumItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBold.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-SemiBold.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-SemiBoldItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-SemiBoldItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Inter-Bold.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Bold.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Inter-BoldItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-BoldItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/Inter-ExtraBold.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-ExtraBold.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/Inter-ExtraBoldItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-ExtraBoldItalic.woff?v=3.15") format("woff");
}

@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/Inter-Black.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-Black.woff?v=3.15") format("woff");
}
@font-face {
  font-family: 'Inter';
  font-style:  italic;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/Inter-BlackItalic.woff2?v=3.15") format("woff2"),
       url("/assets/fonts/Inter-BlackItalic.woff?v=3.15") format("woff");
}

/*
 * Font: Uxum Grotesque
 * :::::::::::::::::::::
 */

@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 200;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-UltraLight.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-UltraLight.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 200;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-UltraLightItalic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-UltraLightItalic.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Light.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Light.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-LightItalic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-LightItalic.woff") format("woff");
}

@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Regular.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Regular.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Italic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Italic.woff") format("woff");
}

@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Medium.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Medium.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-MediumItalic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-MediumItalic.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Bold.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Bold.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-BoldItalic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-BoldItalic.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-Ultra.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-Ultra.woff") format("woff");
}
@font-face {
  font-family: "Uxum Grotesque";
  font-style:  italic;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/UxumGrotesque-UltraItalic.woff2") format("woff2"),
       url("/assets/fonts/UxumGrotesque-UltraItalic.woff") format("woff");
}

/*
 * Footer
 * ::::::
 */

footer {
  margin-top: var(--size5);
  padding-top: var(--size1);
}
footer .version {
  --grid-ce: 3;
}
footer .links  {
  --grid-cs: 3;
  --grid-ce: 4;
}
footer .debug-list {
  --grid-cs: 4;
  --grid-ce: 7;
}
footer .debug-list div {
  --grid-cs: span 1;
  --subgrid-ce: auto;
}

@media only screen and (max-width: 900px) {
  footer .version {
    --grid-cs: 1;
    /* --grid-ce: 3; */
    /* grid-row-start: 1; */
    margin-bottom: var(--size1);
  }
  footer .links {
    --grid-cs: 3;
    --grid-ce: 7;
    --border-width: 1px;
  }
  footer .debug-list {
    --grid-cs: 3;
    --grid-ce: 7;
    grid-row-start: 1;
  }
  footer .subgrid div {
    --grid-cs: span 2;
  }
}

@media only screen and (max-width: 600px) {
  footer .version {
    --grid-ce: 7;
  }
  footer .version > p {
    display: inline;
  }
  footer .version > p:first-child {
    margin-right: 1ex;
  }

  footer .links {
    --grid-cs: 4;
  }
  footer .debug-list {
    --grid-cs: 1;
    --grid-ce: 4;
    --border-width: 1px;
    grid-row-start: 2;
  }
}


/*
 * Grid
 * ::::
 */

/*
 * Note: `.subrid` is a kludge
 * Ideally, we would pass `display: passthrough`, or better yet, `display: subgrid`
 * it's a double workaround: poor browser support, and Pandoc's DOM
 * doesn't allow classes or attributes to be applied to ol/ul lists,
 * so we'll just reach in from the top with inheritance.
 */

.grid,
.grid > ol,
.subgrid,
.subgrid > .subgrid,
.subgrid > ul,
.subgrid > ol {
  display: grid;
  grid-template-columns: repeat( var(--subgrid-tc, var(--grid-tc)), 1fr );
  grid-column-gap: var(--grid-gap);
}
.grid {
  --grid-tc: 6;
}
.subgrid {
  --grid-tc: calc( var(--grid-ce) - var(--grid-cs) );
}
.grid * {
  /* default grid cell behavior: span all columns */
  --grid-cs: 1;
  --grid-ce: 7;
  grid-column-start: var(--grid-cs); grid-column-end: var(--grid-ce);
}
.grid > ul,
.grid > ol,
.subgrid * {
  --subgrid-ce: calc( var(--grid-tc) + 1 );
  grid-column-end: var(--subgrid-ce);
}
.grid > ul,
.grid > ol, 
.grid > .subgrid,
.subgrid > ul,
.subgrid > ol {
  --subgrid-tc: calc( var(--subgrid-ce) - var(--grid-cs) );
}
.subgrid > .subgrid *,
.subgrid > ul *,
.subgrid > ol * {
  --subsubgrid-ce: calc( var(--subgrid-tc) + 1 );
  grid-column-end: var(--subsubgrid-ce);
}

/*
 * Grid composable classes
 * Hijacking `span` to specify alignment along grid columns
 * inspired by @rsms raster.grid: https://rsms.me/raster/
 */

/* column start */
.grid [span^="1/"] { --grid-cs: 1; }
.grid [span^="2/"] { --grid-cs: 2; }
.grid [span^="3/"] { --grid-cs: 3; }
.grid [span^="4/"] { --grid-cs: 4; }
.grid [span^="5/"] { --grid-cs: 5; }
.grid [span^="6/"] { --grid-cs: 6; }
/* column end */
.grid [span$="/1"] { --grid-ce: 2; }
.grid [span$="/2"] { --grid-ce: 3; }
.grid [span$="/3"] { --grid-ce: 4; }
.grid [span$="/4"] { --grid-ce: 5; }
.grid [span$="/5"] { --grid-ce: 6; }
.grid [span$="/6"] { --grid-ce: 7; }
/* column end */
.subgrid [span$="/1"] { --subgrid-ce: 2; }
.subgrid [span$="/2"] { --subgrid-ce: 3; }
.subgrid [span$="/3"] { --subgrid-ce: 4; }
.subgrid [span$="/4"] { --subgrid-ce: 5; }
.subgrid [span$="/5"] { --subgrid-ce: 6; }
.subgrid [span$="/6"] { --subgrid-ce: 7; }

/*
 * Indenter
 * ::::::::
 *
 * sets specified "tab-stops" along the grid
 * (b/c everything is the grid)
 */
[class*="indenter"] {
  --tab1: 2;
  --tab2: 3;
  margin-top: var(--size2);
  margin-bottom: var(--size4);
  padding-top: calc( var(--size1) + var(--size2) );
}

/* tabbed siblings */

[class*="indenter"] > h2 ~ *,
[class*="indenter"] > .tab1 ~ * {
  --grid-cs: var(--tab1);
}
[class*="indenter"] > h3 ~ *,
[class*="indenter"] > .tab2 ~ * {
  --grid-cs: var(--tab3, var(--tab2));
}
[class*="indenter"] > hr {
  --grid-cs: var(--tab1);
}

/* tab markers */

[class*="indenter"] > h2,
[class*="indenter"] > .tab1 {
  --grid-ce: var(--tab1);
  /* cinch-up to the x-height of the following paragraph */
  margin-top: calc( var(--size-5) * -1);
}
[class*="indenter"] > h3,
[class*="indenter"] > .tab2 {
  --grid-cs: var(--tab1);
  --grid-ce: var(--tab3, var(--tab2));
}

/* fix spacing */

[class*="indenter"] > h2 + p {
  margin-top: 0;
}
[class*="indenter"] > h2 + ol,
[class*="indenter"] > .tab1 + ol {
  margin-top: calc( var(--size-5) * -1 );
}

.indenter\:3\/5 {
  --tab1: 3;
  --tab2: 5;
}
/* | 1  | 2  | 3  | 4  | 5  | 6  |  column
 * 1    2    3    4    5    6    7  line ID
 * +----+----+----+----+----+----+
 * | h2      | h2 ~ *            | 
 * +----+----+----+----+----+----+
 *           | h3      | h3 ~ *  |
 *           +----+----+----+----+
 *           | hr                |
 *           +----+----+----+----+
 *           | h3      | h3 ~ *  |
 *           +----+----+----+----+
 */

.indenter\:3\/2\/4 {
  --tab1: 3;
  --tab2: 2;
  --tab3: 4;
}
.indenter\:3\/2\/4 > h3,
.indenter\:3\/2\/4 > .tab2 {
  --grid-cs: var(--tab2);
}
.indenter\:3\/2\/4 > hr {
  --grid-cs: var(--tab2);
}
/* 
 * Useful when h2 text is a long word
 *
 * | 1  | 2  | 3  | 4  | 5  | 6  |  column
 * 1    2    3    4    5    6    7  line ID
 * +----+----+----+----+----+----+
 * | h2      | h2 ~ *            | 
 * +----+----+----+----+----+----+
 *           | h2 ~ *            | 
 *      +----+----+----+----+----+
 *      | h3      | h3 ~ *       |
 *      +----+----+----+----+----+
 *      | hr                     |
 *      +----+----+----+----+----+
 *      | h3      | h3 ~ *       |
 *      +----+----+----+----+----+
 */

/* granular control */
[data-tab="0"] {
  --grid-cs: 1 !important;
}
[data-tab="1"] {
  --grid-cs: var(--tab1) !important;
}
[data-tab="2"] {
  --grid-cs: var(--tab2) !important;
}
[data-tab="3"] {
  --grid-cs: var(--tab3) !important;
}

/* image and content alignment */

[class*="indenter"] .one-third {
  --grid-ce: span 2;
}
[class*="indenter"] .left-third {
  --grid-cs: 2;
  --grid-ce: 4;
  --subgrid-ce: 4;
}
[class*="indenter"] .half {
  --grid-ce: span 3;
}
[class*="indenter"] .two-thirds {
  --grid-ce: span 4;
}
[class*="indenter"] .five-sixths {
  --grid-cs: 2;
  --grid-ce: span 5;
}
[class*="indenter"] .span-all {
  --grid-cs: span 6;
}
.subgrid.side-by-side {
  --grid-cs: 1;
  margin-bottom: 2rem;
}
.side-by-side {
  padding: 1rem;
}

.side-by-side > * {
  --grid-cs: span 3;
  --subgrid-ce: auto;
}
.side-by-side figure {
  margin-top: 0;
}



.pano {
  --margin: calc( (100vw - 100%) / 2 );
  width: 100vw;
  text-align: right;
  margin-left: calc( var(--margin) * -1); 
  margin-top: var(--size3);
  margin-bottom: var(--size3);
  padding: var(--size4)
           var(--margin)
           var(--size5);
}
.pano figure {
  text-align: center;
}
[class*="indenter"] .pano {
  --grid-cs: 1;
  --grid-ce: 7;
}
.shadow\:img img {
  box-shadow: 1px 1px 10px #d1d1d1;
}

.cinch-up {
  margin-top: -20%;
}
/* stylelint-disable no-descending-specificity */

/* fix no space between a 'visual' p + p */
.cinch-up + p  {
  margin-top: var(--size1);
}
/* stylelint-enable no-descending-specificity */

/* fixup
 * remove margin when inside the box
 */
[class*="indenter"] div figure,
[class*="indenter"] div video {
  margin-top: 0;
  margin-bottom: 0;
}

/* breakpoint */
@media only screen and ( max-width: 960px ) {
  .indenter\:3\/5 {
    --tab1: 2;
    --tab2: 2;
  }
  .indenter\:3\/2\/4 {
    --tab1: 2;
    --tab2: 2;
    --tab3: 2;
  }
  /* note: .tab1 and .tab2 do not go full-width like headings */
  [class*="indenter"] > h2, 
  [class*="indenter"] > h3 {
    --grid-ce: 7;
    margin-bottom: var(--size1)
  }
  .cinch-up {
    margin-top: var(--size2);
  }
  [class*="indenter"] .one-third,
  [class*="indenter"] .left-third,
  [class*="indenter"] .half,
  [class*="indenter"] .two-thirds,
  .side-by-side > * {
    --grid-cs: var(--tab1);
    --grid-ce: 7;
  }
  [class*="indenter"] .side-by-side > * {
    --subgrid-ce: 7;
    margin-top: var(--size1);
  }
  .side-by-side {
    padding: 0;
  }
}

/*
 * lists
 * :::::
 */

ol,
ul {
  list-style: none;  
  margin-top: var(--size0);
  margin-bottom:var(--size1);
}
ul > li,
.list > *,
.list-between > * + * {
  --border-width: 1px;
  border-top: var(--border-width) solid var(--border-color);
}
.list-between > a + a {
  border-top-style: dotted;
}
.no-list > *,
.no-list > li,
.no-list > *:first-child,
.no-list > *:last-child {
  border-top: initial;
}

.list-between > *:first-child {
  border-top: unset;
  padding-top: unset;
}

li,
.list > * {
  padding-top: calc(var(--size-2) - var(--border-width, 0px) );
  padding-bottom: var(--size-2) ;
}
ol > li {
  counter-increment: numbered;
  margin-bottom: var(--size1);
}
ol > li::before {
  content: counter(numbered);
  display: block;
  font-family: var(--font-display);
  font-size: var(--size2);
  font-weight: 400;
}

/* strike a line, but only between */
/* article ul li + li { */
/*   border-top: 1px solid var(--black); */
/* } */

li > ul {
  margin-top: var(--size1);
}

/* split lists */
@media only screen and (min-width: 720px) {
  .split-lists li { 
    --grid-cs: span 2;
    grid-column-end: auto;
  }
}

/*
 * Masthead
 * ::::::::
 */

.masthead {
  margin-bottom: var(--size5);
}
.masthead h2 {
  --grid-ce: 2;
  margin-bottom: var(--size-3);
}
.masthead button {
  display: none;
}
.masthead nav  {
  --grid-cs: 2;
}
.masthead ul { 
  margin-top: 0;
}
.masthead li {
  --grid-cs: auto;
  --subsubgrid-ce: auto;
}
.masthead li:last-child {
  /* unset standard list underline */
  border-bottom: 0;
}
.masthead  li[aria-current] {
  --subsubgrid-ce: span 3;
  font-weight: bold;
}
.masthead li a {
  display: block;
}

@media only screen and (max-width: 720px) {
  .masthead h2 {
    --grid-ce: 4;
    border-top: 0;
  }
  .masthead nav {
    --grid-cs: 1;
    --grid-gap: 0;
    margin-top: var(--size-3);
  }
  .masthead li,
  .masthead li[aria-current=page] {
    --grid-cs: 1;
    --subsubgrid-ce: 7;
  }
  .with-js .masthead li[aria-current=page] {
    grid-row-end: 4;
    display: block;
  }
  /* with javascript enabled */
  .with-js .masthead li {
    display: none;
  }
  .with-js [aria-expanded=true] + nav li {
    display: block;
  }
  .with-js .masthead button {
    --grid-cs: 5;
    --grid-ce: 7;
    display: initial;
  }
}

/*
 * Primitives
 * ::::::::::
 */

.stack > * + * {
  margin-top: var(--size0);
  margin-bottom: var(--size0);
}
.stack\:small  > * + * {
  margin-top: var(--size-1);
  margin-bottom: var(--size-1);
}
.stack\:large > * + * {
  margin-top: var(--size1);
  margin-bottom: var(--size1);
}

.padding {
  padding: var(--size1);
}
.padding\:size3 {
  padding: var(--size2);
}
.padding-stack {
  padding-top: calc( var(--size0) - var(--border-width, 0px) );
  padding-bottom: var(--size1);
}
.padding-stack\:size2 {
  padding-top: calc( var(--size2) - var(--border-width, 0px) );
  padding-bottom: var(--size2);
}
.padding-stack\:size5 {
  padding-top: calc( var(--size5) - var(--border-width, 0px) );
  padding-bottom: var(--size5);
}

.padding-top\:size-2 {
  padding-top: calc( var(--size-2) - var(--border-width, 0px) );
}
/*
 * Tables
 * ::::::
 */

table {
  border: var(--size-4) solid var(--dark);
}
thead {
  font-weight: 600;
  border-bottom-width: var(--size-4);
}
tr {
  border: var(--size-5) solid var(--dark);
}
td, th {
  padding: var(--size-1) 0;
}
td:first-child,
th:first-child {
  padding-left: var(--size-1);
}
td:last-child,
th:last-child {
  padding-right: var(--size-1);
}

/*
 * Typography
 * ::::::::::
 */

/* Set the base font */
html {
  font-family: var(--font-body), "Helvetica Neue", "Helvetica", "Arial";
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--black);
  letter-spacing: -0.015em; 
  text-size-adjust: 100%;
  font-variant-ligatures: contextual common-ligatures;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'cv10' 1; 
}

/* Headings */
h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-display), "Helvetica Neue", "Helvetica", "Arial";
  line-height: var(--line-height-small);
  max-width: 45rem;
  overflow-wrap: break-word;
  font-kerning: normal;
}
h1, .h1 {
  font-size: var(--size4);
  font-weight: 300;
  letter-spacing: -0.015em;
}
h2, .h2 {
  font-size: var(--size3);
  font-weight: 400;
  letter-spacing: -0.0175em;
}
h3, .h3 {
  font-size: var(--size2);
  font-weight: 500;
  letter-spacing: -0.02em;
}
h4, .h4 {
  font-size: var(--size1);
  font-weight: 600;
  letter-spacing: -0.012em;
}
h5, .h5 {
  font-size: var(--size0);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}

/* Text style modifiers */
em,
.font\:italic {
  font-style: italic;
}

.font\:uppercase {
  text-transform: uppercase;
}
.font\:capitalize {
  text-transform: capitalize;
}
.font\:smallcaps {
  font-variant: all-small-caps;
}

.font\:light {
  font-weight: 300;
}
.font\:regular {
  font-weight: 400;
}
.font\:semibold {
  font-weight: 500;
}
strong,
.font\:bold {
  font-weight: 600;
}
.font\:black {
  font-weight: 900;
}

sup, .font\:super {
  font-variant-position: super;
}
sub, .font\:sub {
  font-variant-position: sub;
}

/* Small text */
figcaption,
.font\:small {
  font-size: var(--size-1);
}

.font\:xsmall {
  font-size: var(--size-2);
}

/*
 * Utilities
 * :::::::::
 */

.cinch-up\:10rem {
  /* kinda kludgy, but oh well */
  margin-top: -10rem;
}

.img-height\:unset img {
  max-height: unset !important;
}

.pointer-events\:none {
  /* don't get in the way of other elements */
  pointer-events: none;
}

.align-self\:end {
  align-self: end;
}
.margin\:none {
  margin: unset !important;
}
.margin-top\:size0 {
  margin-top: var(--size0);
}
.margin-top {
  margin-top: var(--size1);
}
.margin-top\:size2 {
  margin-top: var(--size2);
}
.margin-top\:size3 {
  margin-top: var(--size3);
}
.margin-bottom\:size2 {
  margin-bottom: var(--size2);
}
.margin-bottom\:size3 {
  margin-bottom: var(--size3);
}
.margin-stack\:large {
  margin-top: var(--size3);
  margin-bottom: var(--size4);
}
.margin-stack {
  margin-top: var(--size1);
  margin-bottom: var(--size2);
}

.position\:absolute {
  position: absolute !important
}
.position\:relative {
  position: relative;
}
.left\:-grid-gap {
  left: calc(var(--grid-gap) * -1);
}

.display\:block {
  display: block;
  max-width: unset; 
}
.display\:inline-block {
  display: inline-block;
}

/* text related */
.text-align\:center {
  text-align: center;
}

/* viewport  dependent */

.flex\:col-to-row\<900px {
  display: flex;
  flex-direction: column;
}
@media only screen and (max-width: 900px) {
  .flex\:col-to-row\<900px {
    flex-direction: row;
  }
}

/*
 * Visual effects
 * ::::::::::::::
 */

.shadow,
.shadow\:img img {
  box-shadow: 1px 1px 10px #d1d1d1;
  box-shadow: 1px 1px 10px var(--dark-grey);
}

.multiply,
.multiply::before,
.multiply::after,
svg.multiply * {
  mix-blend-mode: multiply;
}
.bkg\:cyan {
  background-color: var(--cyan);
  fill: var(--cyan);
}
.bkg\:magenta {
  background-color: var(--magenta);
  fill: var(--magenta);
}
.bkg\:yellow {
  background-color: var(--yellow);
  fill: var(--yellow);
}
.bkg\:grey {
  background-color: var(--grey);
  fill: var(--grey);
}

.kodak {
  margin-top: var(--size2);
  height: var(--size-2);
  /* width is the first column and the gap */
  width: calc( 50% + ( var(--grid-gap) / 2 ) );
  overflow: visible;
}
.kodak #tall {
  display:none;
}

@media only screen and (max-width: 960px) {

  .flip-top\:kid > *:first-child {
    writing-mode: vertical-lr;
    margin-top: unset;
    margin-bottom: unset; /* dont collide with indenter h2 */
    margin-left: -0.5rem;
    padding-bottom: unset;
  }
  /* cinch up element after the flip-top-kid */
  .flip-top\:kid > *:first-child + p {
    margin-top: calc( (var(--size-3) * -1) - 1.4ex );
  }
  .flip-top\:kid >  *:first-child + ol {
    margin-top: calc( (var(--size3) + var(--size1)) * -1 );
  }

  .kodak {
    width: var(--size-3);
    height: 100%;
    margin-top: unset;
    margin-left: var(--size-2);
  }
  .kodak #tall {
    display: initial;
  }
  .kodak #long {
    display: none;
  }
}

/* off-register effect */

.registration {
  position: relative;
  color: var(--cyan);
}
.registration,
.registration::before,
.registration::after {
  transition: transform 500ms ease-out;
  /* clean up overshoot wierdness */
  /* animation-iteration-count: 1; */
  /* animation-fill-mode: both; */  
}
.registration::before,
.registration::after {
  content: attr(data-echo);
  position: absolute;
  top: 0;
  left: 0;
  padding: inherit;
  transform: translateX(var(--position));
}

/* off-register seperates vertically */

.registration::before {
  --position: calc( var(--scroll) * 30px );
  color: var(--yellow);
}
.registration::after {
  --position: calc( var(--scroll) * 15px );
  color: var(--magenta);
}

/* alternate version */
/* off-register seperates diagonally */

/* /1* .registration::before { *1/ */
/* .registration::before { */
/*   --position: calc( var(--scroll) * 10px ); */
/*   color: var(--magenta); */
/*   transform: translate(var(--position), var(--position)); */
/* } */
/* .registration::after { */
/*   --position: calc( var(--scroll) * -10px ); */
/*   color: var(--yellow); */
/*   transform: translate(var(--position), var(--position)); */
/* } */
