@font-face {
  font-family: "Archivo Black";
  src: url("assets/archivo-black.woff2") format("woff2"),
       url("assets/archivo-black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo Black";
  src: url("assets/archivo-black.woff2") format("woff2"),
       url("assets/archivo-black.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: "Arial Black", "Archivo Black", Arial, sans-serif;
  --heading: "Arial Black", "Archivo Black", Arial, sans-serif;
  --body: Arial, sans-serif;

  --text-heading: 16.5px;
  --text-body: 14.5px;
  --text-meta: 14.5px;
  --text-tagline: 16.5px;

  --weight-black: 900;
  --weight-regular: 400;
  --tracking-tight: -0.05em;
  --tracking-name: -0.025em;
  --tracking-meta: 0.04em;
  --leading-tight: 1.15;
  --leading-body: 1.45;
  --grid-unit: 24px;

  --bg: #e2e8ee;
  --paper: #faf5e6;
  --cream: var(--paper);
  --rule: #bdc9d4;
  --dot: rgba(70, 105, 135, 0.18);

  --name-bg: #7dbac9;
  --name-ink: #101820;

  --meta-bg: #b8d957;
  --panel-ink: #101820;
  --panel-hover: #000000;
  --panel-rule: rgba(16, 24, 32, 0.35);

  --ink: #14202b;
  --muted: #4b5a68;
  --heading-ink: #163e4d;
  --link-hover: var(--heading-ink);
  --tab-hover-bg: var(--meta-bg);
  --tab-hover-ink: var(--panel-ink);
  --filebar-bg: #101820;
  --filebar-ink: #ffffff;
  --filebar-hover: #b8d957;
  --filebar-border: #101820;
  --tree-color: #5a7352;
}

:root[data-theme="dark"] {
  --bg: #0c1726;
  --paper: #132236;
  --cream: var(--paper);
  --rule: #365068;
  --dot: rgba(125, 186, 201, 0.15);

  --name-bg: #5d9fb0;
  --name-ink: #101820;

  --meta-bg: #a7c847;
  --panel-ink: #101820;
  --panel-hover: #000000;
  --panel-rule: rgba(46, 88, 102, 0.55);

  --ink: #edf8fb;
  --muted: #afbfcd;
  --heading-ink: #8bc7d6;
  --accent: #8bc7d6;
  --tree-color: #698765;
}

:root[data-palette="pet-sounds"] {
  --bg: #ece5d8;
  --paper: #faf7f0;
  --cream: var(--paper);
  --rule: #cfc7b4;
  --dot: rgba(43, 124, 61, 0.30);

  --name-bg: #2b7c3d;
  --name-ink: #ffffff;

  --meta-bg: #f2d63b;
  --panel-ink: #122e17;
  --panel-hover: #000000;
  --panel-rule: rgba(18, 46, 23, 0.35);

  --ink: #142618;
  --muted: #384d3d;
  --heading-ink: #2b7c3d;
  --accent: #2b7c3d;
  --link-hover: #1c7d34;

  --filebar-bg: #122e17;
  --filebar-ink: #ffffff;
  --filebar-hover: #f2d63b;
  --filebar-border: #122e17;
  --tree-color: #5a7352;
}

:root[data-palette="pet-sounds"][data-theme="dark"] {
  --bg: #0b140e;
  --paper: #132217;
  --cream: var(--paper);
  --rule: #24382a;
  --dot: rgba(242, 214, 59, 0.14);

  --name-bg: #2b7c3d;
  --name-ink: #ffffff;

  --meta-bg: #f2d63b;
  --panel-ink: #0b140e;
  --panel-hover: #000000;
  --panel-rule: rgba(11, 20, 14, 0.35);

  --ink: #f3f8f3;
  --muted: #b6c2b9;
  --heading-ink: #f2d63b;
  --accent: #f2d63b;
  --link-hover: #ffea60;

  --filebar-bg: #0b140e;
  --filebar-ink: #ffffff;
  --filebar-hover: #f2d63b;
  --filebar-border: #0b140e;
  --tree-color: #698765;
}

:root[data-palette="today"] {
  --bg: #eee7d7;
  --paper: #faf6ed;
  --cream: var(--paper);
  --rule: #d8cdb8;
  --dot: rgba(92, 79, 48, 0.28);

  --name-bg: #5c4f30;
  --name-ink: #ffffff;

  --meta-bg: #bf4e0b;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.45);

  --ink: #1c170d;
  --muted: #4a3f2d;
  --heading-ink: #5c4f30;
  --accent: #dca644;
  --link-hover: #b54808;
  --tab-hover-bg: var(--accent);
  --tab-hover-ink: #1c170d;

  --filebar-bg: #1c170d;
  --filebar-ink: #ffffff;
  --filebar-hover: #dca644;
  --filebar-border: #1c170d;
  --tree-color: #f3b71f;
}

:root[data-palette="today"][data-theme="dark"] {
  --bg: #12100b;
  --paper: #1e1a12;
  --cream: var(--paper);
  --rule: #383022;
  --dot: rgba(240, 82, 43, 0.20);

  --name-bg: #6e5e3a;
  --name-ink: #ffffff;

  --meta-bg: #bf4e0b;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.45);

  --ink: #f8f5ee;
  --muted: #c8bfae;
  --heading-ink: #f2ba4e;
  --accent: #f2ba4e;
  --link-hover: #ffd066;
  --tab-hover-bg: var(--accent);
  --tab-hover-ink: #12100b;

  --filebar-bg: #12100b;
  --filebar-ink: #ffffff;
  --filebar-hover: #f2ba4e;
  --filebar-border: #12100b;
  --tree-color: #eaaf1e;
}

:root[data-palette="smiley-smile"] {
  --bg: #d6e2d1;
  --paper: #f1f5ec;
  --cream: var(--paper);
  --rule: #b7cbaf;
  --dot: rgba(31, 65, 45, 0.22);

  --name-bg: #315b4e;
  --name-ink: #ffffff;

  --meta-bg: #254b3e;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.35);

  --ink: #132117;
  --muted: #324736;
  --heading-ink: #132117;
  --accent: #cfa92c;
  --link-hover: #1e6b52;
  --tab-hover-bg: var(--accent);
  --tab-hover-ink: #132117;

  --filebar-bg: #111f19;
  --filebar-ink: #ffffff;
  --filebar-hover: #cfa92c;
  --filebar-border: #111f19;
  --tree-color: #ceac2d;
}

:root[data-palette="smiley-smile"][data-theme="dark"] {
  --bg: #0a140d;
  --paper: #182018;
  --cream: var(--paper);
  --rule: #344128;
  --dot: rgba(207, 169, 44, 0.18);

  --name-bg: #315b4e;
  --name-ink: #ffffff;

  --meta-bg: #3a6554;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.35);

  --ink: #f0f4e9;
  --muted: #b4bcb2;
  --heading-ink: #cfa92c;
  --accent: #cfa92c;
  --link-hover: #fad44a;
  --tab-hover-bg: var(--accent);
  --tab-hover-ink: #0a140d;

  --filebar-bg: #0a140d;
  --filebar-ink: #ffffff;
  --filebar-hover: #fad44a;
  --filebar-border: #0a140d;
  --tree-color: #ceac2d;
}

:root[data-palette="surfs-up"] {
  --bg: #e7eeeb;
  --paper: #f6f5ee;
  --cream: var(--paper);
  --rule: #c4d4ce;
  --dot: rgba(33, 65, 60, 0.24);

  --name-bg: #155b64;
  --name-ink: #ffffff;

  --meta-bg: #155b64;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.42);

  --ink: #122725;
  --muted: #364e4b;
  --heading-ink: #155b64;
  --accent: #45784d;
  --link-hover: #0d6772;
  --tab-hover-bg: #f0b865;
  --tab-hover-ink: #122725;

  --filebar-bg: #0a2428;
  --filebar-ink: #ffffff;
  --filebar-hover: #f0b865;
  --filebar-border: #0a2428;
  --tree-color: #625c72;
}

:root[data-palette="surfs-up"][data-theme="dark"] {
  --bg: #0b1417;
  --paper: #121e22;
  --cream: var(--paper);
  --rule: #244943;
  --dot: rgba(77, 182, 172, 0.20);

  --name-bg: #0f4f59;
  --name-ink: #ffffff;

  --meta-bg: #176b6a;
  --panel-ink: #ffffff;
  --panel-hover: #ffffff;
  --panel-rule: rgba(255, 255, 255, 0.38);

  --ink: #f1f6f8;
  --muted: #a2b0b6;
  --heading-ink: #f0b865;
  --accent: #45784d;
  --link-hover: #f0b865;
  --tab-hover-bg: #f0b865;
  --tab-hover-ink: #0b1417;

  --filebar-bg: #0b1417;
  --filebar-ink: #ffffff;
  --filebar-hover: #f0b865;
  --filebar-border: #0b1417;
  --tree-color: #6b617c;
}

.footer-trees {
  position: absolute;
  right: 6%;
  bottom: 100%;
  display: flex;
  align-items: flex-end;
  gap: 0;
  pointer-events: none;
  z-index: 2;
}

.footer-trees .tree {
  display: block;
  width: 62px;
  height: 62px;
  background-color: var(--tree-color, #5a7352);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: bottom center;
  mask-position: bottom center;
}

.footer-trees .t-a {
  -webkit-mask-image: url("assets/tree1.svg");
  mask-image: url("assets/tree1.svg");
}

.footer-trees .t-b {
  -webkit-mask-image: url("assets/tree2.svg");
  mask-image: url("assets/tree2.svg");
  margin-left: -22px;
}

.footer-trees .t-c {
  -webkit-mask-image: url("assets/tree3.svg");
  mask-image: url("assets/tree3.svg");
  margin-left: -22px;
}

@media (max-width: 600px) {
  .footer-trees .tree {
    width: 48px;
    height: 48px;
  }
  .footer-trees .t-b,
  .footer-trees .t-c {
    margin-left: -17px;
  }
}

:root[data-scale-preset="poster-bold"] {
  --text-heading: 18px;
  --text-body: 15px;
  --text-meta: 15px;
  --text-tagline: 18px;
}

:root[data-scale-preset="modern"] {
  --text-heading: 16.5px;
  --text-body: 14.5px;
  --text-meta: 14.5px;
  --text-tagline: 16.5px;
}

:root[data-scale-preset="standard"] {
  --text-heading: 15px;
  --text-body: 13.5px;
  --text-meta: 13.5px;
  --text-tagline: 13.5px;
}

:root[data-scale-preset="dense"] {
  --text-heading: 14px;
  --text-body: 12.5px;
  --text-meta: 12.5px;
  --text-tagline: 12.5px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(circle 2px at 0 0, var(--dot) 2px, transparent 2px);
  background-position: calc(50% + var(--grid-unit) / 2) 0;
  background-size: var(--grid-unit) var(--grid-unit);
  font-family: var(--body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  font-synthesis: none;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer-center {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-halftone-strip {
  display: block;
  width: 216px;
  height: 13px;
}

.footer-meta {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--body);
  font-size: var(--text-meta);
  font-weight: var(--weight-regular);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.footer-meta-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.footer-meta-item:not(:last-child)::after {
  content: "\00b7";
  margin-left: 0.6rem;
  opacity: 0.85;
}

.footer-updated {
  text-align: center;
}

.footer-meta a,
.theme-switch {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-switch {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.footer-meta a:hover,
.footer-meta a:focus-visible,
.theme-switch:hover,
.theme-switch:focus-visible {
  text-decoration-thickness: 2px;
}

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #101820;
}

@media (forced-colors: active) {
  :where(a, button, input, select, [tabindex]):focus-visible {
    outline: 2px solid CanvasText;
    box-shadow: none;
  }
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  color: var(--panel-ink);
  background: var(--meta-bg);
  font-family: var(--body);
  font-size: var(--text-meta);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .footer-meta {
    font-size: clamp(11px, 2.8vw, 12px);
    letter-spacing: 0.03em;
    gap: 0.35rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: center;
  }

  .footer-meta-item:not(:last-child)::after {
    display: inline;
    margin-left: 0.35rem;
    opacity: 0.85;
  }
}
