/* An eye chart under its light. Black letters on lit paper, and the two colors of the duochrome test. */
:root {
  color-scheme: light dark;
  --paper: #fbfaf5;
  --paper-2: #f1efe6;
  --ink: #0a0a0a;
  --ink-2: #57544d;
  --hair: rgba(10, 10, 10, 0.16);
  --red: #e8362b;
  --green: #12b05f;
  --glow: #ffffff;
  --rim: #e6e3d8;
  --ring: #0a0a0a;
  --ring-ink: #fbfaf5;
  --night: #0b0b0c;
  --chart: "Optician Sans", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible Next", -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, monospace;
  --head: 54px;
  --gutter: clamp(16px, 4.5vw, 44px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
:root[data-theme="dark"] {
  --paper: #0b0b0c;
  --paper-2: #17171a;
  --ink: #f4f2ea;
  --ink-2: #aeaba2;
  --hair: rgba(244, 242, 234, 0.2);
  --red: #ff4f42;
  --green: #27d27c;
  --glow: #1b1b1f;
  --rim: #000;
  --ring: #26262b;
  --ring-ink: #f4f2ea;
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0b0c;
    --paper-2: #17171a;
    --ink: #f4f2ea;
    --ink-2: #aeaba2;
    --hair: rgba(244, 242, 234, 0.2);
    --red: #ff4f42;
    --green: #27d27c;
    --glow: #1b1b1f;
    --rim: #000;
    --ring: #26262b;
    --ring-ink: #f4f2ea;
  }
}


@font-face { font-family: "Optician Sans"; src: url("/fonts/optician-sans.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; src: url("/fonts/atkinson-next-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: italic; src: url("/fonts/atkinson-next-400-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; src: url("/fonts/atkinson-next-700.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; src: url("/fonts/atkinson-mono-400.woff2") format("woff2"); font-display: swap; }

/* The frame: the header, the menu, the footer, and the base every page shares. */
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); overflow-wrap: break-word; }
main { flex: 1; width: 100%; min-width: 0; }
.frame-manual main { overflow-x: clip; }
img, canvas, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.site-head { view-transition-name: head; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 2px; height: var(--head); padding: 0 calc(var(--gutter) - 4px); background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 7px; margin-right: auto; padding: 8px 2px; font: 400 clamp(0.875rem, 3.7vw, 1.0625rem)/1 var(--chart); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.mark { position: relative; width: 22px; height: 16px; flex: none; }
.mark::before, .mark::after { content: ""; position: absolute; top: 1px; width: 14px; height: 14px; border-radius: 50%; }
.mark::before { left: 0; background: radial-gradient(circle, var(--red) 34%, transparent 72%); }
.mark::after { right: 0; background: radial-gradient(circle, var(--green) 34%, transparent 72%); }
.brand:hover .mark::before { transform: translateX(-1px); }
.brand:hover .mark::after { transform: translateX(1px); }
.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-links { display: none; }
.nav-links a, .icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 40px; padding: 0 7px; border: 0; background: none; color: inherit; font: inherit; font-size: 0.9375rem; text-decoration: none; cursor: pointer; border-radius: 6px; }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.nav-links a:hover, .icon-button:hover { background: var(--paper-2); }
.icon-button svg { width: 21px; height: 21px; }
.mode { position: relative; }
.mode-word { position: absolute; top: calc(100% + 8px); right: 0; padding: 3px 9px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 400 0.8125rem/1.4 var(--mono); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.mode.is-saying .mode-word { opacity: 1; }
.mode-icon-light, .mode-icon-dark, .mode-icon-system { display: none; }
.mode[data-now="light"] .mode-icon-light, .mode[data-now="dark"] .mode-icon-dark, .mode[data-now="system"] .mode-icon-system { display: block; }
.site-nav-go { display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-left: 3px; padding: 0 11px 0 10px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.site-nav-go svg { width: 9px; height: 9px; }
@media (max-width: 370px) { .mark { display: none; } .site-head .icon-button { min-width: 34px; padding: 0 5px; } }
.site-nav-go:hover { background: var(--green); color: #0a0a0a; }
.site-menu { position: static; }
.site-menu summary { list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu-panel { position: absolute; left: 0; right: 0; top: 100%; display: grid; justify-items: center; gap: 2px; padding: 18px var(--gutter) 22px; background: var(--paper); border-bottom: 1.5px solid var(--ink); }
.site-menu-panel a { font-family: var(--chart); text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none; line-height: 1.25; padding: 3px 8px; }
.site-menu-panel a:nth-child(1) { font-size: 2.6rem; }
.site-menu-panel a:nth-child(2) { font-size: 2.1rem; }
.site-menu-panel a:nth-child(3) { font-size: 1.7rem; }
.site-menu-panel a:nth-child(4) { font-size: 1.4rem; }
.site-menu-panel a:nth-child(5) { font-size: 1.15rem; }
.site-menu-panel a:nth-child(n + 6) { font-size: 0.95rem; }
.site-menu-panel .bars { width: min(100%, 300px); margin: 10px 0; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .site-menu { display: none; }
  .site-nav { gap: 4px; }
}

.bars { height: 11px; margin: 0; border: 0; background: linear-gradient(var(--red) 0 4px, transparent 4px 7px, var(--green) 7px 11px); }

.site-foot { margin-top: clamp(48px, 9vw, 96px); padding: 0 var(--gutter) calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.site-foot .bars { margin: 0 auto 26px; max-width: 880px; }
.foot-lines { display: grid; justify-items: center; gap: 6px; margin: 0 auto; max-width: 880px; font-family: var(--chart); text-transform: uppercase; letter-spacing: 0.13em; }
.foot-lines nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 15px; }
.foot-lines a { text-decoration: none; padding: 3px 0; }
.foot-lines a:hover { text-decoration: underline; }
.foot-a { font-size: clamp(1rem, 3.6vw, 1.5rem); }
.foot-b { font-size: clamp(0.875rem, 2.8vw, 1.0625rem); }
.fine { margin: 18px auto 0; max-width: 34rem; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.5; }
.fine-last { margin: 10px auto 0; color: var(--ink-2); font: 400 7px/1.5 var(--chart); letter-spacing: 0.12em; text-transform: uppercase; }
