/*
 * Attempts to create universal defaults for various basic HTML elements.
 *
 * Browsers are inconsistent and these rules bring them in line and enhance
 * behaviour match to what novices intuit.
 *
 * Development guidelines:
 *   1. Keep selector specificity minimal to make overriding easier
 *     a. No ID references                        eg.  #button { ... }
 *     b. No class references                     eg.  .button { ... }
 *     c. No custom element/component references  eg.  custom-button { ... }
 *   2. Every ruleset must have accompanying commentary to justify its inclusion.
 *
 * ---
 * Authors: Robin Miller
 */

/* ============================================
 *                   GENERAL
 * ============================================ */

/**
 * Setting all basic container elements to flex + column because either flex or grid is more commonly
 * expected behaviour of container elements.
 *
 * Defaulting to scrollbars on containers prevents unexpectedly drawing over adjacent content.
 * Better to always be able to access content if the container is unexpectedly too small.
 */
html,
body,
header,
main,
nav,
footer,
article,
section,
div,
aside,
address,
picture,
figure,
dl,
form {
   display: flex;
   flex-direction: column;
}

/**
 * Chrome limits the HTML node to min height of viewport. Firefox does not.
 * This can cause odd behaviour when, eg. a linear-gradient background is set.
 * 
 * Sans-serif fonts are better for displays, serif is better for print.
 */
html {
   min-height: 100%;

   font-family: ui-sans-serif, system-ui, sans-serif;
}

@media print {
   html {
      font-family: serif;
   }
}

/**
 * All elements should default to border-box instead of content-box because the
 * intuitive "size" of an object includes all its visible area. Since borders
 * are very commonly visible, many developers (especially new ones) expect
 * border-box behaviour instead of content-box.
 */
* {
   box-sizing: border-box;
}

/**
 * Creating space from viewport edge should be done by the primary <header>, <footer>,
 * and <main> elements, instead of <body>.
 *
 * Then these core containers may fill the space but maintain legible spacing for their content.
 */
body > header,
main,
body > footer {
   padding: 1rem;
}

/* see ruleset above */
body {
   margin: 0;
   padding: 0;
}

/**
 * Headers should be closer to their contents than the previous section to indicate relationship
 */
h1,
h2,
h3,
h4,
h5,
h6 {
   margin-block-start: 1rem;
   margin-block-end: 0.5rem;
}

/**
 * With containers set to flex, text containers can drop their leading margins
 */
p,
pre,
dl,
ol,
ul {
   margin-block-start: 0.5em; /* flex containers do not merge margins, so using half standard values */
   margin-block-end: 0.5em;
}

/**
 * Definition terms should be highlighted as different from definitions
 */
dt {
   font-weight: bold;
}

/**
 * Separate interior definitions from each other
 */
dd + dt {
   margin-block-start: 0.25em;
}

/**
 * Flex layout can stretch Anchors and Labels to have a much larger clickable area than expected.
 * This resets that default behaviour to reduce the cases of accidental interaction.
 *
 * Note: Chrome does not respect align-items in fieldsets.
 */
a,
label {
   align-self: flex-start;
}

/**
 * Links should be visually distinct from surrounding text, and should draw the eye.
 * Additive-styling of underline on hover (extremely common design practice) implies that
 * bold font is the correct morphological distinguisher.
 * Restricting to :any-link (ie. :link and :visited) to only style links with an href attribute,
 * allowing links to be quazi-disabled when href is missing as per spec.
 */
a:any-link {
   font-weight: bold;
   text-decoration: underline rgba(0, 0, 0, 0);
}

/**
 * Show underline on hover to indicate interactivity.
 */
a:any-link:hover {
   text-decoration-color: inherit;
}

/**
 * Indicating there is hover title text increases discoverability.
 */
abbr[title],
dfn[title] {
   cursor: help;
}

/* Figures are almost always centered on the page between paragraphs */
figure {
   margin-left: auto;
   margin-right: auto;

   max-height: fit-content;
   max-width: fit-content;
}

/* Distinguishes caption from normal body text */
figcaption {
   text-align: center;
}

/**
 * Alt-text should appear different than standard text to indicate it is metadata
 */
img {
   font-style: italic;
}

/**
 * remove underline for <u> as it no longer should be used to underline text.
 * It now means "Unarticulated Annotation", which *may* be indicated by underline, (eg. spellcheck)
 * but could also indicate highlight, etc.
 *
 * Better to disable the old behaviour to discourage incorrect use.
 */
u {
   text-decoration: none;
}

/**
 * Template nodes should never be shown, by spec.
 * Explicitly hidden just in case the browser does not know about templates.
 */
template {
   display: none;
}

/**
 * Removing user-select because summary is a clickable element that confusingly highlights on doubleclick
 */
details > summary {
   user-select: none;
}

/**
 * When an hr (thematic break) is a child of a flex layout container, it can disappear
 * in some default browser styles
 */
hr {
   /* providing any vertical margin will allow it to render in flex;
    * choosing this amount as a reasonable default */
   margin: 2rem 0;

   /* browser defaults often make it an inset 1px box, for some reason.
    * Using a single border is a simpler basic line. */
   border: none;
   border-top: 1px solid black;
}

/* Key-press instructions should be obvious as such. */
kbd {
   display: inline-block;

   box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2),
   0 2px 0 0 rgba(255, 255, 255, 0.7) inset;

   border: 1px solid #b4b4b4;
   border-radius: 0.2em;

   background-color: #eee;
   padding: 0.12em 0.25em;

   color: #333;
   font-size: 0.85em;
   line-height: 1;
   white-space: nowrap;
   text-transform: capitalize;
}

/* Much more commonly want to ignore leading whitespace, because the tag itself will be indented */
pre {
   white-space: pre-line;
}

/* code lines inside a pre block can retain their interior whitespace */
pre code {
   white-space: pre-wrap;
}

/* ============================================
 *                INPUTS & FORMS
 * ============================================ */

form {
   /* shrink to a consistent size; contents will default to full width */
   width: fit-content;
}

fieldset {
   /* Space for fieldsets from other form elements increases legibility */
   margin: 0.5rem 0;

   /* space for the fieldset top and bottom border for visibility */
   padding-top: 0.5em; /* most contents in a fieldset have their own top margin */
   padding-bottom: 1em;
}

/**
 * Labels should create space from other form elements to indicate relationship of the label
 * and the input.
 *
 * Recommendation: place label text and input inside the same label tag to gain the expected behaviour of
 * selecting the input when the label is clicked.
 * Otherwise an ID on the input is required and the label must have a "for" attribute.
 */
label {
   /* better control over internal positioning */
   display: flex;

   /* Visual separation from other form elements by default for legibility & accessibility */
   margin: 0.5rem 0;

   /* checkboxes for example only make sense horizontally, so that limits the general rule here */
   flex-direction: row;

   /* flexibility for squished up situations */
   flex-wrap: wrap;

   /* Align labels and widget along central axis for clean line */
   align-items: center;

   /* avoid stretching to container width by default */
   width: fit-content;

   /* space label from input */
   gap: 0.5em;
}

label span:has(+:required):after,
fieldset[aria-required] legend:after {
   content: '*';
}

/**
 * Users can get confused when the placeholder text doesn't disappear on click, thinking
 * that it is inputted text they cannot delete.
 * Both Firefox and Chrome keep the text.
 */

/* NOTE: these are done in separate blocks because of the behaviour where
 * if any listed pseudo selector is invalid, the entire rule is ignored.
 *
 * For Chrome 6-57 & Opera 15-44 & Safari 5-10.1 ...
 */
input:focus::placeholder::-webkit-input-placeholder,
textarea:focus::placeholder::-webkit-input-placeholder {
   color: transparent;
}

/* ... Firefox 19-51 ... */
input:focus::placeholder::-moz-placeholder,
textarea:focus::placeholder::-moz-placeholder {
   color: transparent;
}

/* ... Edge 12-18 ... */
input:focus::placeholder:-ms-input-placeholder,
textarea:focus::placeholder:-ms-input-placeholder {
   color: transparent;
}

/* ... and the official pseudo-element */
input:focus::placeholder,
textarea:focus::placeholder {
   color: transparent;
}

/**
 * Text areas are x-y resizable by default, but interfaces are normally designed to expand downward, not sideways.
 *
 * Defaulting to only-vertical reduces breaking behaviour.
 */
textarea {
   resize: vertical;
}

/**
 * Chrome has essentially no padding on form fields, which decreases legibility.
 *
 * Firefox has over-designed fields (gradient, sizing), which the border-radius causes to reset to plain white.
 *
 * Fields should be at least slightly rounded-edged, for UI psychology.
 */
input,
textarea,
select {
   /* Default border to override Firefox's huge default borders and standardize */
   border: 1px inset grey;
   border-radius: 0.25rem;

   /* Visual separation from input content for legibility */
   padding: 0.25rem 0.5rem;

   /* Chrome does not apply input font family consistently */
   font-family: ui-sans-serif, system-ui, sans-serif;

   /* Firefox does not apply a consistent input font size */
   font-size: 1rem;
}

/**
 * Clickable things should indicate their clickiness via the cursor and a hover highlight
 */
button:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover,
input[type="submit"]:enabled:hover,
input[type="radio"]:enabled:hover,
label:hover input[type="radio"]:enabled,
label:hover input[type="radio"]:enabled + span,
input[type="checkbox"]:enabled:hover,
label:hover input[type="checkbox"]:enabled,
label:hover input[type="checkbox"]:enabled + span,
select:enabled:hover,
select:enabled:focus-within, /* as of at least Firefox 91, filter rule closes the dropdown. Including focus-within fixes it  */
summary:hover {
   /* highlighting on hover provides instant feedback */
   filter: brightness(105%);
   cursor: pointer;
}

/*
 * Same clickable indicator but without highlight to prevent double highlight
 */
label:has(input[type="radio"]:enabled):hover,
label:has(input[type="checkbox"]:enabled):hover {
   cursor: pointer;
}

/**
 * Firefox uses OS focus indication, which may only be colour based (bad for colourblind)
 * Chrome uses Outlines to indicate focus.
 *
 * This standardizes and forces morphological visual focus indication.
 */
input:focus,
textarea:focus,
button:focus,
select:focus,
input[type="reset"]:focus,
input[type="button"]:focus,
input[type="submit"]:focus {
   /* remove Chrome's focus highlight outline */
   outline: none;

   /* use internal shading to indicate focus */
   box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8) inset
}

/**
 * General button style
 */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
   /* Center button labelling */
   display: inline-flex;
   align-items: center;
   justify-content: center;

   /**
    * Minimum size based on accessibility recommendations:
    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
    */
   min-width: 44px;
   min-height: 44px;

   /* basic raised appearance indicates it is separate from page content */
   box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
   border: none;
   border-radius: 0.25rem;

   /* visual separation of text from button edge and interior contents from each other for legibility. */
   padding: 0.5rem 1rem;
   gap: 0.5rem;

   background-color: buttonFace;
   color: buttonText;

   /* Some browsers have a custom smaller fontsize for inputs */
   font-size: 1rem;
}

/* draw button as depressed to indicate active interaction / movement */
button:enabled:active:hover,
input[type="button"]:enabled:active:hover,
input[type="reset"]:enabled:active:hover,
input[type="submit"]:enabled:active:hover {
   box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4) inset;
}

/**
 * disabled elements get reduced contrast to draw less attention, and
 * a little transparency to further blend & imply a reduced tangibility
 */
*:disabled,
input[type="radio"]:disabled + span:before,
input[type="checkbox"]:disabled + span:before,
input[type="radio"]:disabled + span:after,
input[type="checkbox"]:disabled + span:after {
   opacity: 0.5;
   filter: saturate(0.5) contrast(0.8);
}

input[type="checkbox"],
input[type="radio"] {
   /* chrome adds margins which break alignment in flex centering */
   margin: 0;
}
/*
 * A basis for theme files to extend.
 */

label {
   flex-direction: column;
   align-items: flex-start;
}

/* ============================================
 *                INPUTS & FORMS:
 *            Checkboxes / Radiobuttons
 * ============================================ */

/* Replace standard radios/checkboxes with one that can be styled */
input[type="radio"],
input[type="checkbox"] {
   display: none;
}

input[type="radio"] + span,
input[type="checkbox"] + span {
   position: relative;

   padding: 0 0 0 1.25rem;
   overflow: visible;

   -webkit-user-select: none;
   -moz-user-select: none;
   user-select: none;
}

/* box and mark */
input[type="radio"] + span:before,
input[type="checkbox"] + span:before,
input[type="radio"] + span:after,
input[type="checkbox"] + span:after {
   position: absolute;
   display: flex;

   left: 0;
   top: 0;
   bottom: 0;
   margin: auto;

   align-items: center;
   justify-content: center;

   width: 1em;
   height: 1em;

   box-sizing: border-box;

   overflow: visible;
}

/* box / radio-circle */
input[type="radio"] + span:before,
input[type="checkbox"] + span:before {
   box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3);
   border: 1px solid #aaa;

   background: #f8f8f8;

   content: '';
}

input[type="radio"] + span:before {
   border-radius: 100%;
}

input[type="checkbox"] + span:before {
   border-radius: 0.2rem;
}

/* both radio and check mark (unchecked) */
input[type="radio"] + span:after,
input[type="checkbox"] + span:after {
   opacity: 0;
   transform: scale(0);

   font-size: 1em;

   /* remove pointer events on the marks for cases when the mark is stylized to draw larger than the box
      eg. a really big checkmark whose tail goes outside the box */
   pointer-events: none;
   --transition-speed: 150ms;
   transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
}

/* radio mark */
input[type="radio"] + span:after {
   text-shadow: 0 0 2px;
   font-weight: bold;

   content: '\2022';
}

/* check mark */
input[type="checkbox"] + span:after {
   /* the base of the check in Arial is approx here */
   transform-origin: 30% 70%;

   content: '\2714';
}

/* scale to full size when checked */
input[type="radio"]:checked + span:after,
input[type="checkbox"]:checked + span:after {
   transform: scale(1);
}

/* be visible when checked & enabled (general disabled element rules also use opacity) */
input[type="radio"]:enabled:checked + span:after,
input[type="checkbox"]:enabled:checked + span:after {
   opacity: 1;
}
dialog-busy {
   display: flex;

   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;

   flex-direction: column;

   transition: all 1s ease-out;
   pointer-events: none;
}

dialog-busy > * {
   --duration: 200ms;

   opacity: 0;
   visibility: hidden;

   transition-property: visibility, all;
   transition-duration: 0s, var(--duration);
   transition-delay: var(--duration), 0s;
   transition-timing-function: ease-out;

   pointer-events: all;
}

dialog-busy .visible {
   opacity: 1;
   visibility: visible;
}

dialog-busy > .frame {
   position: sticky;
   top: 15vh;

   margin: 15vh auto;
   z-index: 101;

   box-shadow: 0.15rem 0.15rem 0.25rem rgba(0, 0, 0, 0.3);
   border-radius: 0.3em;

   max-width: 30rem;
   min-width: 25vw;

   overflow: auto;
}

dialog-busy header {
   padding: 1rem;

   background-color: lightgrey;

   text-align: center;
   font-weight: bold;
   user-select: none;
}

dialog-busy .frame .title-text {
   grid-column: 2;
}

dialog-busy > .frame .dialog-contents {
   padding: 1em;

   background-color: white;
}

dialog-busy .message-body {
   padding: 2rem;

   background: white;
}

dialog-busy .message {
   margin: 0;

   text-align: center;
}

dialog-busy .message-body {
   /* scrollbar if needed */
   overflow-y: auto;
   overscroll-behavior: contain;
}

@keyframes dialog-busy-dots {
   0% {
      content: '';
   }
   33% {
      content: '.';
   }
   66% {
      content: '..';
   }
   100% {
      content: '...';
   }
}

dialog-busy .message:after {
   position: absolute;

   animation-name: dialog-busy-dots;
   animation-duration: 1s;
   animation-timing-function: steps(3, end);
   animation-iteration-count: infinite;

   white-space: nowrap;
   content: '...';
}

dialog-busy .overlay {
   position: absolute;

   padding: 0.5rem;

   /* set to content box and be a tiny bit wider overall */
   box-sizing: content-box;
   top: -0.5rem;
   left: -0.5rem;
   width: 100%;
   height: 100%;
   z-index: 100;

   background: rgba(0, 0, 0, 0.5);
}
dialog-confirm {
   display: flex;

   position: absolute;

   flex-direction: column;

   transition: all 1s ease-out;
}

dialog-confirm > * {
   --duration: 200ms;

   opacity: 0;
   visibility: hidden;

   transition-property: visibility, all;
   transition-duration: 0s, var(--duration);
   transition-delay: var(--duration), 0s;
   transition-timing-function: ease-out;
}

dialog-confirm .visible {
   opacity: 1;
   visibility: visible;
}

dialog-confirm > .frame {
   margin: 0 auto 1em auto;

   border-radius: 0.3em;
   width: fit-content;
   min-width: 5rem;

   overflow: auto;
}

dialog-confirm header {
   display: grid;

   padding: 1rem;

   grid-template-columns: 1fr 8fr 1fr;
   align-items: center;
   background-color: lightgrey;

   text-align: center;
   font-weight: bold;
   user-select: none;
}

dialog-confirm header .dismiss {
   margin-left: auto
}

dialog-confirm .frame .title-text {
   grid-column: 2;
}

dialog-confirm > .frame {
   position: fixed;
   top: 10vh;

   /* centering */
   left: 0;
   right: 0;
   z-index: 101;

   box-shadow: 0.15rem 0.15rem 0.25rem rgba(0, 0, 0, 0.3);

   max-width: 30rem;
}

dialog-confirm > .frame .dialog-contents {
   /* inline padding is actually applied at the interior level to leave room for overlay scrollbars, ugh */
   --frame-spacing: 1rem;

   /* to trigger the overflow bar in main-section */
   overflow: hidden;

   padding-block: var(--frame-spacing);
   gap: var(--frame-spacing);
   background-color: white;
}

dialog-confirm .dialog-contents .main-section {
   /* scrollbar if needed */
   overflow-y: auto;
   /* prevent scrolling bubbling up to parent scroller */
   overscroll-behavior: contain;

   padding-inline: var(--frame-spacing);
}

dialog-confirm .overlay {
   position: fixed;

   padding: 0.5em;

   /* set to content box and be a tiny bit wider overall */
   box-sizing: content-box;
   top: -0.5em;
   left: -0.5em;
   width: 100%;
   height: 100%;
   z-index: 100;

   background: rgba(0, 0, 0, 0.5);
}

dialog-confirm .controls {
   display: flex;

   padding-inline: var(--frame-spacing);
   flex-direction: row;
   justify-content: flex-end;
   gap: 1rem;
}

dialog-confirm .controls .action {
   text-transform: capitalize;
}
@keyframes fade-in {
   0% {
      opacity: 0;
   }
   100% {
      opacity: 1;
   }
}

info-toast {
   display: flex;
   flex-direction: column;
}

info-toast .toasts-container {
   display: flex;

   position: fixed;
   /* ten above normal float-panels */
   z-index: 110;

   gap: 1rem;
   flex-direction: column;
   align-items: flex-end;
}

info-toast .notices,
info-toast .warnings,
info-toast .errors {
   display: flex;

   margin: 0;

   padding: 0;
   gap: 1rem;
   flex-direction: column;

   color: white;
}

info-toast .toast {
   box-shadow: 0.15em 0.15em 0.25em rgba(0, 0, 0, 0.5);
   border-radius: 0.25rem;

   overflow: auto;
}

info-toast .toast header {
   position: relative;

   padding: 1em;

   font-weight: bold;
   text-align: center;

   user-select: none;
   cursor: default;
}

info-toast .toast header .title-text {
   margin: auto;
}

info-toast .toast .dismiss {
   border: none;
   padding: 0;

   background: none;
}

info-toast .toast .dismiss:before {
   display: flex;

   border-radius: 100%;

   width: 1.5em;
   height: 1.5em;

   min-width: 1em;
   min-height: 1em;
   align-items: center;
   justify-content: center;

   font-size: 1.1rem;

   content: "\2715";
}

info-toast .toast .dismiss:hover {
   cursor: pointer;
}

info-toast .toast .dismiss:hover:before {
   background: rgba(0, 0, 0, 0.2);
}

info-toast .toast .dismiss:hover:active:before {
   background: rgba(0, 0, 0, 0.4);
}

info-toast .toast .dismiss:focus {
   outline: none;
}

info-toast .toast {
   display: flex;

   position: relative;
   animation: fade-in 200ms ease-out;
   animation-fill-mode: forwards;

   max-width: min(25rem, 50vw);

   gap: 0.25rem 0.5rem;
   padding: 0.75rem;
   flex-direction: row;
   flex-wrap: wrap;
   justify-content: space-between;
   align-items: flex-start;
   background-color: lightgrey;
}

info-toast .toast header {
   padding: 0;
   flex-basis: 100%;

   text-transform: capitalize;
   text-align: left;
}

info-toast .notices header {
   display: none;
}

info-toast .toast .dismiss {
   position: static;

   min-height: auto;
   min-width: auto;
}

info-toast .toast .dismiss,
info-toast .toast .dismiss:active:hover {
   box-shadow: none;
}

info-toast .message {
   margin: 0;
   flex-direction: row;
   flex-grow: 1;
   width: 80%; /* prevents overflow nudging the dismiss button into wrapping */

   text-align: justify;
   color: white;
}

info-toast .warnings .toast {
   background-color: rgba(238, 255, 184, 0.97);
}

info-toast .errors .toast {
   background-color: rgba(255, 128, 128, 0.98);
}

info-toast .errors header {
   margin: 0;

   width: 100%;

   background: none;
   font-size: 1.25em;
   font-weight: bold;
}

/* mobile */
@media (max-width: 1023px) {
   info-toast {
      font-size: larger;
   }

   info-toast .toasts-container {
      left: 0;
      right: 0;
      bottom: 0;

      width: 100%;
      min-height: 3em;
      align-items: normal;
   }

   info-toast .toast {
      max-width: 100%;
   }
}

/* desktop */
@media (min-width: 1024px) {
   info-toast > div {
      left: auto;
      right: 4rem;
      bottom: 2rem;
   }

   info-toast .toast {
      width: 20rem;
   }
}
input-checklist {
   display: flex;
   flex-direction: column;
}

input-checklist legend {
   text-transform: capitalize;
}
input-date-range .range {
   display: flex;
   flex-direction: row;
   align-items: center;
   flex-wrap: wrap;
   gap: 0.25rem;
}

input-date-range .range label {
   width: auto;
}

/* Chrome adds extra padding that isn't quite needed */
input::-webkit-calendar-picker-indicator {
   margin: 0;
}

input-date-range input[type="date"] {
   max-width: 8.5em; /* 8rem for Chrome, a bit more space needed for FF */
}

input-date-range .quick-options summary {
   margin-block: 0.5rem;
}

input-date-range .quick-options-list {
   gap: 0.5rem;
   flex-wrap: wrap;
   justify-content: space-around;
}

input-date-range .quick-options button {
   min-height: auto;
   padding-inline: 0.5rem;
   font-size: small;
}

/* need to assign a class instead of using something like :empty
   because :empty always returns true for inputs - remiller, Aug 2021 */
input-date-range input[type="date"].blank {
   color: rgba(0, 0, 0, 0.5);
}

input-date-range input[type="date"].blank:not(:focus-within) {
   color: transparent;
}
input-duration .time-unit {
   text-transform: capitalize;
}
/**
 * Applied as part of the longclick binding.
 *
 * Note: The styling is imperfect for circular buttons, but close. It cannot use overflow: hidden because that also
 *       clips the help prompt.
 */

.kowt-longclick {
   position: relative;

   /*overflow: hidden;*/

   /* bugfix to cause chrome to clip filter on circular buttons */
   filter: brightness(1);
}

.kowt-longclick:focus-within {
   /* TODO: this is here because chrome adds a focus outline, which is great normally, but
      TODO: gets extended to the helper popup. would be nice to find a way to support focus */
   outline: none;
}

/* === FILL-UP BAR === */
.kowt-longclick:before {
   position: absolute;

   display: flex;

   bottom: -2px;

   box-sizing: border-box;
   /*
    * removed border-top and bo shadow to sidestep the clipping issue
    */
   /*box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3) inset, -1px -1px 1px rgba(255, 255, 255, 0.7) inset;*/
   /*border-top: 2px solid transparent;*/
   width: calc(100% + 1px);
   height: 0;
   opacity: 0.3; /* start a little more visible than 0 */

   -webkit-backdrop-filter: invert(20%) hue-rotate(180deg); /* webkit prefix needed until IOS 17 (2024) */
   backdrop-filter: invert(20%) hue-rotate(180deg);
   transition-property: height;
   /* duration optionally defined on the html element */
   transition-duration: var(--kowt-longclick-duration, 1s);
   transition-timing-function: ease-out;

   content: '';
}

.kowt-longclick-active:enabled:before {
   border-top-color: var(--brand1, grey);
   opacity: 0.75;
   height: calc(100% + 1px);
}

/* using :active to hopefully still allow selection when in larger block. Trying to use as light a touch as possible (ba-dum-tsh) */
.kowt-longclick:active {
   /* Required to prevent Safari from triggering text select on long presses */
   -webkit-user-select: none;
}

/* === HELP TEXT POPUP === */
.kowt-longclick:after {
   position: absolute;

   opacity: 0;
   visibility: hidden;

   bottom: calc(100%);
   z-index: 10;

   box-shadow: 0.2em 0.2em 0.25em rgba(0, 0, 0, 0.7);

   padding: 0.5em;
   background-color: grey;

   transition: all 200ms;
   color: white;
   font-size: 0.9em;

   content: 'Hold to Complete';
   /* TODO: fallback-enabled line below is eventually supposed to be supported, but not yet */
   /* content: attr(data-help-text, 'Hold to Complete'); */
}

.kowt-longclick-help:active:after,
.kowt-longclick-help:focus-within:after {
   opacity: 1;
   visibility: visible;
}

.kowt-longclick:focus-within {
   z-index: 1; /* Need any z-index for the pseudoelements of the focused button to draw their shadows over neighbour buttons */
}
input-password {
   display: flex;
   flex-direction: row;

   white-space: nowrap;

   --pw-radius: 0.25em;
}

input-password:focus-within {
   outline: -webkit-focus-ring-color auto 5px;
}

input-password .input-wrapper {
   flex-grow: 1;

   display: inline-block;
   position: relative;
}

input-password input[type="text"],
input-password input[type="password"] {
   position: relative;
   z-index: 2;

   margin: 0;

   border-radius: var(--pw-radius) 0 0 var(--pw-radius);
   border-right: none;
   height: 100%;
   width: 100%;

   font-family: monospace;
}

/* hide the non-standard built-in show password button in MS Edge */
input-password input::-ms-reveal {
   display: none;
}

input-password input:focus {
   outline: none;
}

input-password .char-boxes {
   display: flex;

   position: absolute;
   top: 0;
   bottom: 0;
   left: 0;

   width: 100%;
   flex-direction: row;
   gap: 0;

   font-family: monospace;
   font-size: 1rem;
}

input-password .char-box {
   font-family: monospace;

   /* retain cursor for input hover */
   pointer-events: none;
}

input-password .space-highlight {
   z-index: 3;

   opacity: 0.25;

   margin: 0;
   padding: 0;

   background: grey;
}

input-password button {
   min-height: auto;
}

input-password .show-pw {
   position: relative;
   z-index: 1;

   display: flex;

   box-shadow: none;

   border: 1px solid grey;
   border-radius: 0 var(--pw-radius) var(--pw-radius) 0;

   padding: 0.5em 0.5em 0.5em 0.5em;
}

input-password .show-pw:active {
   box-shadow: none;
}

input-password .show-pw .hide,
input-password .show-pw[aria-checked="true"] .show {
   display: none;
}

input-password .show-pw .show,
input-password .show-pw[aria-checked="true"] .hide {
   display: inline-block;
}


input-password .show-pw span {
   display: flex;
   align-items: center;

   margin: 0;

   min-width: auto;

   line-height: 1em;
   font-size: 0.75em;
}

input-password .fa-solid {
   min-width: 20px; /* the width of the wider icon */
}

input-password .show-pw .icon-label {
   min-width: 2.5em;
}

input-password .show-pw .hide {
   position: relative;
}

input-password .show-pw .hide:before {
   opacity: 0.5;
}
input-radiolist {
   display: flex;
   flex-direction: column;
}

input-radiolist legend {
   text-transform: capitalize;
}
input-search {
   display: flex;
   flex-direction: column;
   position: relative;
}

input-search > .searchbox {
   margin: 0;

   min-width: 6em;
}

input-search .results-section {
   /*display: none;*/
   display: flex;
   flex-direction: column;

   position: absolute;
   top: calc(100% - 2px); /* snug up to the input border for mental association */
   z-index: 10;
   width: 100%;
}

/*
input-search:focus-within .results-section {
   display: flex;
}
*/

input-search .results-section {
   margin: 0;

   box-shadow: 0.1rem 0.2rem 0.5rem rgba(0, 0, 0, 0.4);

   border: 1px solid grey;
   border-radius: 0 0 0.5rem 0.5rem;

   padding: 0;

   width: max-content;
   background: white;
}

input-search .no-results .result {
   padding: 0.5rem;
   opacity: 0.7;
}

input-search .result {
   white-space: nowrap;
   user-select: none;

   list-style: none;
}

input-search button {
   display: flex;

   border: none;
   width: 100%;

   justify-content: flex-start;
   background: none;
   cursor: pointer;

   color: inherit;
}

input-search button:focus,
input-search button:hover {
   background: lightblue;
}
pane-carousel {
   display: flex;
   flex-direction: column;
}
pane-menu ul {
   padding: 0;
}

/* Dropdown Menus */
pane-menu > ul ul {
   visibility: hidden;
   opacity: 0;
   position: absolute;
   background: #000;
   border: 1px solid #fff;
   
   white-space: nowrap;
   
   box-shadow: 5px 5px 5px #333;
   
   text-align: left;
   padding-left: 0;
   
   transition: visibility 0s linear 0s, opacity 0.3s ease-in-out;
}

/* Every menu item, including the menu headers */
pane-menu li {
   position: relative;
   list-style: none;
}

/* All menu item contents */
pane-menu a,
pane-menu span {
   display: flex;
   flex-direction: column;
}

/* Show the immediate dropdown menu iff the parent item is hovered over */
pane-menu > ul li:hover > ul {
   opacity: 1;
   visibility: visible;
}

/* sub-menus */
pane-menu ul ul {
   top: 1.15em;
   left: -1px;
   z-index: 1;
}

/* sub-sub menus and deeper */
/* TODO: should probably use nth-of-type(odd) here */
pane-menu > ul ul ul {
   left: 10em;
   top: -1px;
}

pane-menu > ul {
   display: flex;
   
   margin: 0 auto;
}

/* Menu header contents only */
pane-menu > ul > li > span,
pane-menu > ul > li > a {
   padding: 0.5em;
}

pane-menu img {
   max-height: 1em;
}

pane-menu > ul li > * {
   display: inline-flex;
}

pane-menu > ul li > div {
   height: 100%;
}

pane-menu .current-page span,
pane-menu .current-page a {
   font-weight: bold;
}
pane-paged {
   display: flex;
   flex-direction: row;

   align-items: center;

   margin-top: 1rem;
   margin-bottom: 1rem;
}

pane-paged .hidden {
   --duration: 200ms;

   visibility: hidden;
   opacity: 0;
   transition-property: visibility, all;
   transition-duration: var(--duration);
   transition-delay: var(--duration), 0s;
   transition-timing-function: ease-out;
}

pane-paged .meta-controls,
pane-paged .meta-controls label,
pane-paged .controls,
pane-paged .numbers,
pane-paged .stats {
   flex-direction: row;
}

pane-paged .meta-controls,
pane-paged .stats {
   font-size: smaller;
   gap: 0.25rem;
}

pane-paged .meta-controls label {
   margin: auto;

   gap: 0.5rem;
   align-items: center;
}

pane-paged .per-page {
   width: auto;
}

pane-paged .controls {
   margin: 0 auto;
}

pane-paged .numbers {
   margin: auto 1rem;

   grid-gap: 0.75rem;
}

pane-paged .current {
   font-weight: bold;
}

pane-paged .page-gap {
   margin: 0 0.25rem;

   align-self: center;
   font-size: medium;
}

pane-paged .prev:before,
pane-paged .next:after {
   line-height: 1rem;
}

pane-paged .prev:before {
   /* \00A0 is equal to &nbsp;. Used here to add padding but not interrupt underline */
   content: '\25C4\00A0';
}

pane-paged .next:after {
   /* \00A0 = &nbsp; and is used to add padding but not interrupt underline */
   content: '\00A0\25BA';
}
/* To include a new directory, list it here using a require, require_directory, or require_tree directive.
 * 






 */
/* Fonts & other resources */

/* latin-ext */
@font-face {
   font-family: 'Cutive Mono';
   font-style: normal;
   font-weight: 400;
   font-display: fallback;
   src: url('/fonts/cutive-mono/CutiveMono-Regular.ttf') format('truetype');
   unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
   font-family: 'Cutive Mono';
   font-style: normal;
   font-weight: 400;
   font-display: fallback;
   src: url('/fonts/cutive-mono/CutiveMono-Regular.ttf') format('truetype');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


@font-face {
   font-family: 'Special Elite';
   src: url('/fonts/special-elite/special_elite-webfont.eot');
   src: url('/fonts/special-elite/special_elite-webfont.eot') format('embedded-opentype'),
   url('/fonts/special-elite/special_elite-webfont.woff2') format('woff2'),
   url('/fonts/special-elite/special_elite-webfont.woff') format('woff'),
   url('/fonts/special-elite/special_elite-webfont.ttf') format('truetype'),
   url('/fonts/special-elite/special_elite-webfont.svg#SpecialEliteRegular') format('svg');
}

/* latin-ext */
@font-face {
   font-family: 'Raleway';
   font-style: normal;
   font-weight: 400;
   font-display: fallback;
   src: url(/fonts/raleway/Raleway-VariableFont_wght.ttf) format('truetype');
   unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
   font-family: 'Raleway';
   font-style: normal;
   font-weight: 400;
   font-display: fallback;
   src: url(/fonts/raleway/Raleway-VariableFont_wght.ttf) format('truetype');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
   /* Reasonable max column size for text containers */
   --max-text-width: 80ch;

   /* Pads elements that span the whole screen from the screen edge */
   --page-padding: 2rem;

   /* brand color 1 */
   /* black & white */
   --brand1-h: 0;
   --brand1-s: 0%;
   --brand1-l: 5%;
   --brand1: hsl(var(--brand1-h), var(--brand1-s), var(--brand1-l));
   --brand1-light: hsl(var(--brand1-h), var(--brand1-s), calc(var(--brand1-l) / .9));
   --brand1-dark: hsl(var(--brand1-h), var(--brand1-s), calc(var(--brand1-l) * .9));

   --neutral1-h: 0;
   --neutral1-s: 0%;
   --neutral1-l: 99%;
   --neutral1: hsl(var(--neutral1-h), var(--neutral1-s), var(--neutral1-l));
   --neutral1-light: hsl(var(--neutral1-h), var(--neutral1-s), calc(var(--neutral1-l) / .9));
   --neutral1-dark: hsl(var(--neutral1-h), var(--neutral1-s), calc(var(--neutral1-l) * .9));

   /* brand color 2 */
   /* charcoal and white */
   --brand2-h: 0;
   --brand2-s: 0%;
   --brand2-l: 20%;
   --brand2: hsl(var(--brand2-h), var(--brand2-s), var(--brand2-l));
   --brand2-light: hsl(var(--brand2-h), var(--brand2-s), calc(var(--brand2-l) / .9));
   --brand2-dark: hsl(var(--brand2-h), var(--brand2-s), calc(var(--brand2-l) * .9));

   --neutral2-h: 0;
   --neutral2-s: 0%;
   --neutral2-l: 95%;
   --neutral2: hsl(var(--neutral2-h), var(--neutral2-s), var(--neutral2-l));
   --neutral2-light: hsl(var(--neutral2-h), var(--neutral2-s), calc(var(--neutral2-l) / .9));
   --neutral2-dark: hsl(var(--neutral2-h), var(--neutral2-s), calc(var(--neutral2-l) * .9));

   /* brand color 3 */
   /* rose */
   --brand3-h: 347;
   --brand3-s: 80%;
   --brand3-l: 72%;
   --brand3: hsl(var(--brand3-h), var(--brand3-s), var(--brand3-l));
   --brand3-light: hsl(var(--brand3-h), var(--brand3-s), calc(var(--brand3-l) / .9));
   --brand3-dark: hsl(var(--brand3-h), var(--brand3-s), calc(var(--brand3-l) * .9));

   --neutral3-h: 0;
   --neutral3-s: 100%;
   --neutral3-l: 100%;
   --neutral3: hsl(var(--neutral3-h), var(--neutral3-s), var(--neutral3-l));
   --neutral3-light: hsl(var(--neutral3-h), var(--neutral3-s), calc(var(--neutral3-l) / .9));
   --neutral3-dark: hsl(var(--neutral3-h), var(--neutral3-s), calc(var(--neutral3-l) * .9));

   --body-font: "Raleway", Verdana, sans-serif;
   --accent-font1: 'Cutive Mono', Courier, monospace;

   --accent-font2: 'Special Elite', monospace;
   /*--accent-font2: Garamond, "Times New Roman", serif;*/

   --dark-glass-filter: blur(10px) saturate(50%);
   --dark-glass-bg: hsla(var(--brand1-h), var(--brand1-s), var(--brand1-l), 0.7);
}

html {
   background-color: var(--neutral1);
   color: var(--brand1);

   font-size: 14pt;
   font-family: var(--body-font);
}

* {
   transition-property: all, font-size;
   transition-duration: 150ms, 0ms;
   transition-timing-function: ease-out;
}

html {
   /**
    * This is here to prevent sideways scrollbar in chrome with 100vw elements.
    * Attempted 'contain: paint;', but that prevents all scroll on safari.
    * NOTE: this may interfere with nested 'position: sticky', which is why it is on html
    */
   overflow-x: hidden;
}

/* main page header */
body > header {
   position: sticky;

   /* z index needed to capture mouse events due to overlapping elements */
   z-index: 1;
   top: 0;

   margin-bottom: -3rem;
   height: 3rem;
   padding: 0 var(--page-padding);

   justify-content: space-between;
   flex-direction: row;

   user-select: none;
}

/* backdrop filter can't be in a parent and a descendent, so if we want it in submenus, we need a psuedoelement here */
/* the bg color is included just for mental grouping.  */
body > header:before {
   position: absolute;

   margin-left: calc(-1 * var(--page-padding));
   z-index: -1;

   width: 100%;
   height: 100%;

   background-color: var(--dark-glass-bg);
   backdrop-filter: var(--dark-glass-filter);
   content: '';
}

body > header .logo {
   display: flex;

   box-shadow: 1px 2px 2px 2px;

   padding: 0.5rem 1.25rem;
   gap: 0.25rem;
   flex-direction: column;
   background-color: var(--neutral1);

   text-align: center;
   font-weight: bold;
   color: var(--brand1);
   text-decoration: none;
}

body > header .logo span:first-of-type {
   margin: 0;

   border-bottom: 1px solid transparent;

   font-size: xx-large;
   font-family: var(--accent-font1);
}

body > header .logo span:first-of-type:after {
   display: block;
   border-bottom: 1px solid transparent;
   width: 100%;
   max-width: 0;
   margin: auto;
   content: '';
   transition: max-width 200ms ease-in-out, border-bottom-color 300ms 50ms ease-out;
}

body > header .logo:hover span:first-of-type:after {
   max-width: 100%;
   border-bottom-color: var(--brand3);
}

body > header .logo span:last-of-type {
   display: block;
   margin-top: 0.25rem;
   margin-bottom: 0.8rem;

   font-family: var(--accent-font2);
   font-style: italic;
   font-size: medium;
   white-space: nowrap;
}

nav {
   height: 100%;
   justify-content: center;
}

nav > ul {
   display: flex;

   margin: 0;
}

nav ul {
   position: relative;
   height: 100%;
   padding: 0;
}

/* submenu */
nav > ul ul {
   position: absolute;

   left: -0.25rem;
   top: 100%;

   opacity: 0;
   visibility: hidden;
   height: auto;
   padding: 0 1rem 0.5rem 1rem;

   backdrop-filter: var(--dark-glass-filter);
   background-color: var(--dark-glass-bg);
}

nav li:hover ul {
   opacity: 1;
   visibility: visible;
}

nav li {
   display: flex;
}

nav span,
nav a {
   display: flex;

   height: 100%;
   padding: 0.5rem 0.75rem;
   align-items: center;
   gap: 0.5rem;

   font-size: 1.5rem;
   font-family: var(--body-font);
   font-weight: normal;
   color: var(--neutral1);
}

nav .current {
   border-radius: 0.25rem;
   background: var(--brand2);
   color: var(--neutral2);
}

nav .fa-solid {
   font-size: 0.8rem;
   vertical-align: middle;
   color: inherit;
}

nav label {
   display: none;
}

body > header .menu-hamburger,
body > header .menu-dismiss {
   cursor: pointer;
}


/* Page hero image */
.hero {
   position: relative;

   box-shadow: 0 -1em 1em -1em black inset;
   width: 100%;
   max-height: min(50vh, 600px);
   min-height: min(50vh, 30rem);

   justify-content: center;
   overflow: hidden;
   background-size: 100%;
   background-position: 50% 0;
   background-repeat: no-repeat;
}

.hero h1 {
   position: absolute;

   margin: 0;

   backdrop-filter: var(--dark-glass-filter);
   background-color: var(--dark-glass-bg);

   color: var(--neutral1);
}

.hero img {
   flex-grow: 1;
   object-fit: cover;

   z-index: -1;
}

body > header,
h1,
h2 {
   align-items: center;
   font-weight: normal;
}

h1 {
   margin-top: 4rem;

   top: 40%;

   width: 100%;
   padding: 0.75em;

   text-shadow: none;
   text-align: center;
   line-height: 100%;
   font-size: xxx-large;
   font-weight: normal;
   font-family: var(--accent-font1);
}

h2 {
   margin: 2rem auto;
   text-shadow: 1px 1px 1px #bbb;
   font-size: xx-large;
   font-family: var(--accent-font2);
   opacity: 0.5;
   text-align: center;

   max-width: 80vw;
   width: 100%;

   padding: 2rem 0;
   border-bottom: 1px solid grey;
   border-image: linear-gradient(90deg, transparent, var(--brand2), transparent) 1;
}

h3 {
   margin-top: 2rem;

   font-size: x-large;
   font-family: var(--accent-font1);
   /*font-style: italic;*/
   font-weight: normal;
   text-shadow: 1px 1px grey;
   text-align: left;
}

main {
   padding: 0;
   font-family: var(--body-font);
}

a {
   font-family: var(--accent-font1);
   color: var(--brand3-dark);
   /*text-decoration-color: inherit;*/
}

section {
   margin: 0 auto;

   max-width: var(--max-text-width);
}

/* top level sections  */
main > div > section {
   max-width: 100%;
   padding: 0 var(--page-padding);
   align-items: center;
}

/* usually a div */
.section-group {
   flex-direction: row;
   flex-wrap: wrap;
   justify-content: center;
   column-gap: 3rem;
}

/* initial capital for longer text segments */
.narrative section:first-of-type > p:first-of-type:first-letter {
   margin-right: 0.25rem;

   border-radius: 0.1rem;
   padding: 0 0.5rem;
   background-color: var(--brand3);

   text-shadow: 0 -1px grey;
   line-height: 1em;
   font-size: 2.25em;
   font-family: var(--accent-font1);
   color: var(--neutral1);
}

/* pull quotes and section groups need to stretch to full page width */
blockquote,
.section-group {
   position: relative;
   margin-left: -50vw;
   /*margin-right: -50vw;*/

   left: 50%;
   right: 50%;
   width: 100vw;
}

.section-group section {
   margin: 0;
   max-width: 23rem;
   padding: 0;
}

small {
   opacity: 0.6;
}

p {
   margin: 0.6em 0;

   /*max-width: 40rem;*/
   max-width: var(--max-text-width);
   width: 100%;

   line-height: 1.6rem;
   text-align: justify;
}

hr {
   margin: 2rem auto;
   border: none;
   background: #ddd;
   background: linear-gradient(to right, rgba(221, 221, 221, 0) 0%, rgba(221, 221, 221, 1) 20%, rgba(221, 221, 221, 1) 80%, rgba(221, 221, 221, 0) 100%);

   height: 1px;
   width: 66%;
}

blockquote {
   position: relative;
   margin: 4rem -50vw;

   left: 50%;
   right: 50%;
   width: 100vw;

   padding: 4rem 1rem;
   background-color: var(--brand2);

   color: var(--neutral2);
   font-size: 1.5em;
   /*font-style: italic;*/
}

blockquote p {
   margin-top: 0;
   margin-left: auto;
   margin-right: auto;

   padding: 0;

   text-align: justify;
   line-height: 2.25rem;
}

/* quips are extremely short blockquotes. */
blockquote.quip p {
   text-align: center;
}

blockquote p:before,
blockquote p:after {
   vertical-align: text-bottom;
   line-height: 1rem;
   text-shadow: 1px 1px 2px #111;
   font-family: var(--body-font);
   font-size: 2.5em;
   color: var(--brand3);
}

blockquote p:before {
   /*margin: 0.12em;*/
   content: '\201C';
}

blockquote p:after {
   margin: 0.12em;
   /*margin: -0.5rem;*/
   content: '\201D';
}

blockquote cite {
   display: block;

   margin: 0.5rem auto;

   max-width: var(--max-text-width);

   text-align: right;
   font-size: 0.75em;
}

ol,
ul {
   line-height: 1.5rem;
}

dl {
   max-width: 40ch;
}

dt {
   font-size: 1.5rem;
   font-weight: bold;
}

dd {
   margin-bottom: 0.75rem;
}

form {
   max-width: var(--max-text-width);
}

form label {
   margin: 0.5rem 0;

   width: fit-content;
   flex-direction: row;
   align-items: center;
}

label input[type="checkbox"] + span {
   min-width: auto;
}

input,
textarea {
   border-color: var(--brand3);
}

textarea {
   width: 100%;
   padding: 0.5rem;
}

fieldset {
   border-radius: 0.25rem;
   border: 1px dotted var(--brand2);
   padding: 1rem 1.5rem;
}

legend {
   padding: 0 1rem;
}

button {
   margin: 1rem auto;
   background-color: var(--brand3);
   color: var(--neutral3);
   font-size: larger;
}

.fa-solid {
   color: var(--brand2);
}

button .fa-solid {
   color: inherit;
}

/* main page footer */
body > footer {
   margin: 0;
   padding: 8rem var(--page-padding) 2rem var(--page-padding);

   align-items: center;
   text-align: center;
   font-size: 0.8rem;
}

body > footer p {
   text-align: center;
}

@media (max-width: 1023px) {
   :root {
      --page-padding: 1.5rem;
   }

   nav ul {
      display: none;

      position: absolute;
      opacity: 0;
      top: 7rem; /* approx height of header w/ logo */
      left: var(--page-padding);
      right: var(--page-padding);
      height: fit-content;
      max-height: 80vh;

      overflow-y: auto;
      padding: 0.75rem;
      background-color: var(--dark-glass-bg);
      backdrop-filter: var(--dark-glass-filter);
      flex-direction: column;
   }

   nav li {
      flex-direction: column;
   }

   nav label {
      display: block;
   }

   nav .fa-solid {
      font-size: 1rem;
   }

   nav input:checked ~ ul,
   nav ul ul {
      display: flex;
      flex-direction: column;
      opacity: 1;
      visibility: visible;
   }

   nav .menu-dismiss {
      visibility: hidden;
      position: absolute;

      margin: 0;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;

      width: 100vw;
      height: 100vh;
   }

   nav input:checked ~ .menu-hamburger span {
      color: var(--brand3);
   }

   nav input:checked ~ .menu-dismiss {
      visibility: visible;
   }

   /* submenu */
   nav > ul ul {
      position: unset;
      background: unset;
      backdrop-filter: unset;
   }

   .section-group {
      position: static;
      margin: auto;
      width: auto;
   }

   h1 {
      /* longer page titles can wrap and overflow when too big */
      font-size: xx-large;
   }

   h3 {
      margin-top: 2rem;
   }

   p {
      text-align: justify;
   }

   li,
   dd {
      text-align: justify;
   }

   form input {
      width: 100%;
   }

   form label {
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
   }

   fieldset {
      border-style: none;
      border-top-style: solid;
      border-radius: 0;
      padding: 0.5rem 0 0 0;
   }

   legend {
      margin-left: 1rem;
   }
}
#folio-page .projects {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(min-content, 22rem));
   justify-content: center;
   column-gap: 3rem;
   padding: 0 var(--page-padding);
}

#folio-page .projects section {
   width: 100%;
   padding: 0;
}

#folio-page .projects p {
   text-align: justify;
}
#home .summary p {
   margin: 0.5rem 0;
   padding: 0;
}
@font-face {
   font-family: 'Germania One';
   font-style: normal;
   font-weight: 400;
   src: local('Germania One'), local('GermaniaOne-Regular'), url(https://fonts.gstatic.com/s/germaniaone/v4/3_6AyUql_-FbDi1e68jHdOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
   unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}

#folio-subphoto .hero {
   --shadow: 0.25rem 0.25rem 0.5rem black;

   background-color: var(--brand2);
}

#folio-subphoto h1 {
   position: static;
   display: flex;

   background-color: unset;
   padding: 6rem 0 4rem 0;
   flex-direction: column;
   gap: 2rem;

   text-shadow: 1px 1px grey, 3px 3px 3px black;
}

#folio-subphoto h1 a {
   margin: auto;
}

#folio-subphoto h1 img {
   padding: 5rem;

   box-shadow: var(--shadow);
   border-radius: 0.5rem;

   /* not using brand colours (eg. neutral1) because we need a universal neutral for the project logo */
   background: #f7f7f7;
}

#folio-subphoto .hero {
   box-shadow: var(--shadow) inset;
}

#folio-subphoto .german {
   font-size: 1.1rem;
   font-family: "Germania One", serif;
}

#folio-subphoto .pitch p {
   font-size: x-large;
   text-align: center;
}

#folio-subphoto section blockquote:last-child {
   margin-bottom: 2rem;
}
#privacy-page h1 {
   position: initial;
   margin-top: 10rem;
}

#privacy-page .mod-time {
   display: block;
   
   margin: 0.5rem 0;
   
   font-family: monospace;
   text-align: center;
}
#process-page .summary section div {
   box-shadow: 0 0 5px grey;
   border: 1px solid grey;
   border-radius: 1rem;
   height: 15rem;
   
   padding: 1rem;
   justify-content: center;
   align-items: center;
}

#process-page .summary .section-group {
   margin-top: 4rem;
}

#process-page .summary .next {
   font-size: xx-large;
   margin-top: 6.5rem;
}

#process-page .easter-egg {
   cursor: pointer;
}

#process-page .summary img {
   max-width: 100%;
   max-height: 100%;
   object-fit: contain;
}

#process-page .general-idea {
   width: 100%;
   gap: 1rem;
   flex-direction: row;
   justify-content: space-evenly;
   flex-wrap: wrap;
}

#process-page .user-story {
   margin: 1rem 0;
   padding: 1rem;
   
   border-radius: 1rem;
   
   background-color: hsla(var(--brand1-h), var(--brand1-s), var(--brand1-l), 0.7);
   
   text-align: left;
   color: var(--neutral1);
}

#process-page .user-story .title {
   text-align: left;
   text-shadow: none;
}

#process-page .user-story span {
   display: inline-block;
   
   min-width: 5em;
   border-bottom: 1px dotted var(--brand2);
}

@media (max-width: 1023px) {
   #process-page .summary .next {
      display: none;
   }
}
#services-page .tech-stack {
   position: relative;
   margin-top: 3rem;
   margin-left: -50vw;
   /*margin-right: -50vw;*/

   left: 50%;
   right: 50%;
   width: 100vw;

   max-width: none;
   padding-bottom: 3rem;
   background-color: var(--brand1);
   flex-direction: row;
   flex-wrap: wrap;
   justify-content: center;
   gap: 2rem 4rem;

   color: var(--neutral1);
}

#services-page .tech-stack h3 {
   flex-basis: 100%;
   text-align: center;
}

#services-page .tech-stack img {
   max-height: 8em;
   max-width: 8em;
   /* explicit width needed for svg */
   height: 6rem;

   opacity: 0.5;
}

#services-page .tech-stack img:hover {
   opacity: 0.9;

   transition: opacity 200ms ease-out;
}

#services-page .pricing-categories a {
   margin: auto;
}

#services-page .cta {
   text-align: center;
   font-size: x-large;
}

#services-page small {
   margin-top: 3rem;
}

#services-page table {
   margin: auto;
   width: fit-content;
}

#services-page td {
   max-width: 15em;
   padding: 0.25rem 0.5rem;
   vertical-align: top;
}

#services-page th span {
   display: block;
   font-weight: normal;
   font-size: 0.9em;
}

@media (max-width: 1023px) {
   #services-page .tech-stack {
      gap: 1rem;
      justify-content: space-evenly;
   }

   #services-page .tech-stack img {
      max-height: 3rem;
   }
}
contact-form label span {
   min-width: 7rem;
}
@keyframes time-tracker-throb {
   0% {
      transform: rotate(0deg);
   }
   100% {
      transform: rotate(180deg);
   }
}

time-tracker {
   display: flex;

   padding: 0 1rem;
   gap: 1rem;
   flex-direction: column;
}

time-tracker .records {
   opacity: 0.7;
}

time-tracker .magnitude {
   display: grid;

   margin: 0;

   gap: 0.5rem;
   grid-template-columns: auto auto;
   align-items: center;
}

time-tracker .magnitude input {
   margin: 0;
   max-width: 5rem;
   grid-row-start: 2;
}

time-tracker .magnitude .unit {
   grid-row: 2;
   grid-column: 2;
}

time-tracker .time-record {
   padding: 0.25rem;
   gap: 0.25rem 1.5rem;
   flex-direction: row;
   flex-wrap: wrap;

   font-size: xx-large;
}

time-tracker .time-record .stamp {
   flex-grow: 1
}

time-tracker .records .time-record:nth-of-type(odd) {
   background-color: rgba(0, 0, 0, 0.05);
}

time-tracker .status {
   margin-top: 1rem;
}

time-tracker .status:after {
   display: inline-block;

   margin: 0.5rem;
   vertical-align: middle;

   border: 1px solid black;
   justify-content: center;
   align-items: center;
   width: 1rem;
   height: 0;

   content: '';

   transform-origin: 50% 1px;
   animation-name: time-tracker-throb;
   animation-duration: 1s;
   animation-timing-function: ease-in-out;
   animation-iteration-count: infinite;
   /*animation-direction: alternate;*/
   animation-play-state: paused;
}

time-tracker .status.active:after {
   animation-play-state: running;
}


time-tracker .controls {
   flex-direction: row;
   flex-wrap: wrap;
   gap: 0.5rem 1.5rem;
}

time-tracker .controls button {
   margin: auto 0 0 0;
}

@media (max-width: 1023px) {
   time-tracker .controls button span {
      display: none;
   }

   time-tracker .magnitude {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
   }
}
dialog-confirm .permanent-warning {
   margin: 0 0 1rem 0;

   padding: 1rem;

   background: red;
   color: white;
}

dialog-confirm p {
   margin: 0.5rem 0;
}

dialog-confirm .confirm-data {
   margin: 0;

   padding: 0.5rem 0;

   background: var(--brand2);
}

dialog-confirm label span {
   display: flex;
   padding: 0;
}

dialog-confirm input[type=text] {
   width: 100%;
}

dialog-busy header,
dialog-confirm header {
   background: var(--brand3);
   color: var(--neutral3);
}
sign-in {
   display: block;

   margin: 3em auto 0 auto;

   max-width: 16rem;
   width: 100%;
}

sign-in h1 {
   margin: 0;
}

sign-in ul {
   display: flex;
   flex-direction: column;

   padding: 0;
}

sign-in li {
   list-style: none;

   margin-bottom: 0.5rem;
}
table.sortable {
   table-layout: fixed;
   /*width: min-content;*/
}

table.sortable .controls {
   width: 100%;
}

table.sortable th,
table.sortable td {
   --side-pad: 0.5rem;

   min-width: 5rem;

   vertical-align: top;

   text-align: left;
}

table.sortable th {
   padding: 0.5rem var(--side-pad) 0.25rem var(--side-pad);

   vertical-align: middle;
}

table.sortable tbody tr:nth-of-type(odd) {
   background: lightgrey;
}

table.sortable td {
   padding: 0.75rem var(--side-pad);
}

/* === SORTABLE HEADER === */
table.sortable thead a {
   position: relative;

   padding-left: 0.5em;
}

table.sortable thead a:before,
table.sortable thead a:after {
   position: absolute;

   left: 0;

   line-height: 165%;
   font-size: 0.5rem;
}

table.sortable thead a:before {
   bottom: 0;

   /* down-arrow */
   content: '\25BE';
}

table.sortable thead a:after {
   top: -0.1rem;

   /* up-arrow */
   content: '\25B4';
}

table.sortable thead a.sorted:before,
table.sortable thead a.sorted:after {
   top: 0.25em;
   bottom: 0.25em;

   line-height: 100%;
   font-size: 0.75rem;
}

table.sortable thead a.sorted.asc:before {
   content: '';
}

table.sortable thead a.sorted.desc:after {
   content: '';
}

/*=== END SORTABLE HEADER === */
user-session {
   display: flex;
}
/**
 * To include a new directory, list it here using a require, require_directory, or require_tree directive.
 *





 */
/* TODO: make each of the 'page' stylesheets only import as needed. Then delete the container divs. */
