@font-face {
  font-family: "Woodrow Matrix";
  src: url("assets/matrix.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #24321e;
  --muted: #465439;
  --screen: #b8c59e;
  --rule: #34442c77;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --matrix: "Woodrow Matrix", var(--mono);
  font-family: var(--mono);
  color: var(--ink);
  background: var(--screen);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  --gutter: clamp(1.25rem, 5.4vw, 7rem);
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.lcd {
  --lcd-ghost-opacity: .083;
  --lcd-ink-filter: drop-shadow(.7px 1.5px .45px #2d3b2247);
  isolation: isolate;
  background: radial-gradient(ellipse at 29% 20%, #d0d8b557, transparent 72%),
              linear-gradient(117deg, #bdcaa4 0%, var(--screen) 55%, #aebb96 100%);
}
.lcd::before, .lcd::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.lcd::before {
  z-index: -1;
  background: url("assets/ghosts.svg") left top / 19px 27px repeat;
  mask-image: radial-gradient(ellipse at center, #000a, #000 80%);
  opacity: var(--electrode-opacity,.058);
}
.lcd::after {
  z-index: 2;
  background: radial-gradient(ellipse at var(--reflection-x,30%) var(--reflection-y,18%), #fffbe2a3, transparent 65%), url("assets/grain.png");
  opacity: .105;
  mix-blend-mode: soft-light;
}
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; padding: 0; cursor: pointer; background: transparent; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px dashed currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; white-space: nowrap; clip-path: inset(50%);
}
.skip-link:focus { position: absolute; z-index: 3; top: 8px; left: var(--gutter); padding: .5rem; color: var(--screen); background: var(--ink); }
.masthead, .footer, .viewport { width: 100%; min-width: 0; }
.masthead {
  display: flex; align-items: center; justify-content: flex-end; gap: 1rem;
  min-height: clamp(4.5rem, 10vh, 6.25rem);
  border-bottom: 2px solid var(--ink);
}
.masthead :where(#app-back) {
  display: inline-flex; align-items: center; min-height: 44px; margin-inline-end: auto;
  font: 400 1.1rem/1.15 var(--matrix); text-transform: uppercase; text-underline-offset: .2em;
}
.sound-control { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font: 400 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .055em; }
.sound-control svg { width: 18px; height: 18px; fill: currentColor; }
.sound-control:hover .sound-label { text-decoration: underline; text-underline-offset: 4px; }
.viewport {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(2.5rem, 6svh, 5.5rem);
  outline: 0;
}
.folio-label { display: flex; align-items: center; gap: .8rem; margin-bottom: clamp(1.4rem, 3.6svh, 2.5rem); text-transform: uppercase; font: 400 .78rem/1.3 var(--mono); letter-spacing: .07em; }
#counter { font-variant-numeric: tabular-nums; }
.label-line { width: 2.4em; height: 1px; background: var(--muted); }
#section-readout { font-weight: bold; }
.page { min-width: 0; }
.profile-page { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(.75rem, 4.8vw, 6rem); align-items: center; }
.profile-copy { min-width: 0; }
h1, h2 { margin: 0; font: 600 clamp(3rem, 7vw, 7rem)/1 var(--mono); }
h1 { width: 100%; max-width: 54rem; }
h1 .name-line { display: block; }
.role {
  margin: clamp(1rem, 2.5vw, 2rem) 0 0;
  font: 400 clamp(1.2rem, 1.84vw, 2rem)/1.28 var(--matrix);
}
.terminal-caret { display: inline-block; height: .12em; width: .48em; margin-left: .35em; background: currentColor; }
.role-ending { white-space: nowrap; }
.portrait-art {
  justify-self: center; width: min(100%, 31vw, 27rem); height: auto;
}
.detail-page { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0,1.06fr); gap: clamp(2rem, 5vw, 6rem); align-items: start; }
.detail-page h1 { width: 100%; max-width: 42rem; }
.records { margin: 0; }
.records div { border-bottom: 1px dashed var(--rule); padding: .85rem 0; }
.records div:first-child { padding-top: 0; }
.records dt { font-family: var(--matrix); font-size: clamp(1.3rem,1.85vw,1.8rem); line-height: 1.12; }
.records dd, .contact-copy p { margin: .42rem 0 0; font-size: clamp(1rem,1.15vw,1.2rem); line-height: 1.5; }
.records a, .contact-link { text-underline-offset: .24em; text-decoration-thickness: 1px; }
.records a:hover, .contact-link:hover { text-decoration-thickness: 2px; }
.skill-items div { display: grid; align-items: baseline; grid-template-columns: 6.4rem 1fr; gap: 1rem; }
.skill-items dd { margin: 0; }
body:not(.lcd-live) .karate-row { position: relative; }
body:not(.lcd-live) #karate-kick::after { content: ""; position: absolute; inset: 0; }
#karate-art { display: block; width: 9rem; max-width: 100%; height: auto; }
.lcd-live #karate-art { display: none; }
.contact-copy p { margin: 0 0 1.5rem; }
#london-clock {
  grid-column: 1 / -1;
  justify-self: center;
  margin: 0;
  text-align: center;
}
#clock-face { display: block; width: clamp(9rem,24vmin,14rem); height: auto; }
#london-clock figcaption { display: grid; gap: .15rem; font: 400 1rem/1.15 var(--matrix); }
#clock-location { color: var(--muted); }
body:not(.lcd-live) #clock-toggle { margin-bottom: .65rem; border-radius: 50%; }
body:not(.lcd-live) #clock-location { justify-self: center; min-height: 2.5rem; padding-inline: .65rem; text-decoration: underline dotted; text-underline-offset: .24em; }
body:not(.lcd-live) #clock-locations {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  width: min(30rem, 84vw); gap: .25rem .75rem; margin-inline: auto; padding: .5rem;
  border-block: 1px dashed var(--rule);
}
body:not(.lcd-live) #clock-locations button { min-height: 2.75rem; padding: .25rem; }
body:not(.lcd-live) #clock-locations button:is(:hover, [aria-pressed="true"]) { text-decoration: underline; }
#london-clock:has(#clock-locations:not([hidden])) :is(#clock-toggle, #clock-zone) { display: none; }
.clock-expanded > :is(.masthead, .footer, .skip-link),
.clock-expanded .viewport > :not(#page-contact),
.clock-expanded #page-contact > :not(#london-clock, #contact-title) { display: none; }
body.clock-expanded:not(.lcd-live) { grid-template-rows: 1fr; padding-inline: 1rem; }
body.clock-expanded:not(.lcd-live) .viewport { padding-block: 1rem; }
body.clock-expanded:not(.lcd-live) #page-contact { display: grid; grid-template-columns: 1fr; place-items: center; }
body.clock-expanded:not(.lcd-live) #clock-face { width: min(calc(100vw - 3rem),calc(100svh - 7.5rem)); }
.contact-link { display: inline-block; font: 400 clamp(1.35rem, 1.8vw, 1.8rem)/1.25 var(--matrix); }
body:not(.lcd-live) .contact-link + .contact-link { display: block; width: fit-content; margin-top: .75rem; }
.app-list { margin: 0; padding: 0; list-style: none; }
.app-list li { border-bottom: 1px dashed var(--rule); }
.app-list a {
  display: flex; align-items: center; min-height: 44px; padding: .5rem 0 .85rem;
  font: 400 clamp(1.3rem, 1.85vw, 1.8rem)/1.2 var(--matrix); text-underline-offset: .2em;
}
body[data-app] { grid-template-rows: auto 1fr; }
body[data-app] :is(.footer, .folio-label) { display: none; }
body:not(.lcd-live)[data-app="step-sequencer"] .viewport { padding-block: clamp(1rem, 3.5svh, 3rem); }
.sequencer {
  display: grid; width: 100%; min-width: 0; gap: clamp(1.3rem, 3.5svh, 2.7rem);
}
.sequencer h1 { font: 400 clamp(2rem, 4.8vw, 4.5rem)/1.1 var(--matrix); text-transform: uppercase; }
.seq-step-grid {
  --track-label-width: clamp(3.65rem, 7vw, 7rem);
  --step-gap: clamp(2px, .42vw, 7px);
  display: grid; row-gap: clamp(1rem, 3svh, 2rem);
}
.seq-bank { display: grid; min-width: 0; row-gap: clamp(.3rem, .8vmin, .65rem); }
.seq-numbers, .seq-track {
  display: grid; grid-template-columns: var(--track-label-width) repeat(var(--first-steps, 8), minmax(0, 1fr));
  column-gap: var(--step-gap); align-items: center;
}
.seq-numbers { color: var(--muted); font: 400 1rem/1.25 var(--matrix); text-align: center; }
.seq-numbers > span { padding-block: .25rem; }
.seq-numbers [aria-current] { color: var(--screen); background: var(--ink); }
.seq-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .2rem;
  width: 100%; max-width: 4.2rem;
}
.seq-row .seq-label { grid-column: 1 / -1; }
.seq-label, .seq-controls { text-transform: uppercase; }
.seq-label { font: 400 clamp(.95rem, 1.85vw, 1.3rem)/1.2 var(--matrix); }
.seq-track button {
  min-width: 0; height: clamp(2.75rem, min(7vw, 7.5svh), 4.5rem); border: 1px solid var(--rule);
  background: rgb(66 83 48 / .07); color: var(--muted); font: 400 1.1rem/1 var(--mono);
}
.seq-row button { height: clamp(1.625rem, 3.4svh, 1.875rem); font: 400 .875rem/1 var(--mono); }
.seq-track .seq-pad[data-note] {
  cursor: ns-resize; touch-action: none; -webkit-user-select: none; user-select: none;
  font-size: clamp(.75rem, 1.25vw, 1rem); font-variant-numeric: tabular-nums;
}
.seq-track button[aria-pressed="true"] { color: var(--screen); background: var(--ink); }
.seq-track[data-silent] .seq-pad { border-style: dashed; }
.seq-pad[data-dragging] { outline: 2px solid var(--ink); outline-offset: 1px; }
.seq-track button:focus-visible { outline-offset: 1px; outline-color: var(--ink); }
.seq-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: .7rem clamp(.6rem, 2vw, 1.25rem);
  padding-top: clamp(1rem, 2.6svh, 1.75rem); border-top: 1px solid var(--rule);
}
.seq-controls button, .seq-pages button {
  min-width: 44px; min-height: 44px; border: 1px solid currentColor;
  font: 400 1.2rem/1 var(--matrix); text-transform: inherit;
}
.seq-controls button:where(#seq-transport, #seq-randomise) { min-width: 5.5rem; padding: .5em .9em; }
.seq-tempo-controls, .seq-pages {
  display: inline-flex; align-items: center; gap: clamp(.25rem, .7vw, .6rem);
}
.seq-tempo, #seq-page-range, #seq-status { font-size: .875rem; }
body:not(.lcd-live) .seq-length-control { position: relative; }
body:not(.lcd-live) #seq-length {
  display: inline-flex; align-items: center; gap: .5em; padding-inline: .65em;
}
body:not(.lcd-live) #seq-length::after {
  content: ""; width: .38em; height: .38em;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.1em) rotate(45deg);
}
body:not(.lcd-live) #seq-length[aria-expanded="true"]::after { transform: translateY(.1em) rotate(225deg); }
body:not(.lcd-live) #seq-length-options {
  position: absolute; z-index: 3; inset-inline-start: 0; inset-block-end: calc(100% + .3rem);
  display: flex; gap: .2rem; padding: .2rem; border: 1px solid var(--ink);
  background: var(--screen); box-shadow: 2px 2px 0 var(--rule);
}
body:not(.lcd-live) #seq-length-options button { font-variant-numeric: tabular-nums; }
body:not(.lcd-live) #seq-length-options [aria-selected="true"] { color: var(--screen); background: var(--ink); }
body:not(.lcd-live) #seq-length-options button:focus-visible { outline-offset: -4px; }
.seq-pages { white-space: nowrap; }
#seq-page-range { min-width: 10ch; text-align: center; font-variant-numeric: tabular-nums; }
.seq-tempo { min-width: 7ch; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.seq-controls button:disabled, .seq-pages button:disabled { color: var(--muted); border-color: var(--rule); cursor: default; }
#seq-status:empty { display: none; }
.seq-pitch-hint { margin: 0; min-height: 1.4em; color: var(--muted); font: 400 .875rem/1.4 var(--mono); }
.section-nav {
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr));
  padding-block: clamp(.55rem,1.3svh,.9rem); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.section-link {
  position: relative;
  display: flex; align-items: center; gap: clamp(.5rem,1vw,1.2rem);
  min-width: 0; min-height: clamp(3rem,6.2svh,4.4rem); padding: .65rem clamp(.7rem,1.65vw,1.65rem); text-decoration: none;
  font: 400 clamp(1.16rem, 1.65vw, 1.6rem)/1 var(--matrix);
}
.section-link svg { width: 1em; height: 1em; flex: none; fill: currentColor; }
.section-link kbd { font: 400 .75rem/1 var(--mono); margin-left: auto; opacity: .76; }
.section-link + .section-link::before { content: ""; position: absolute; left: 0; top: 20%; height: 60%; border-left: 1px solid var(--rule); }
.section-link[aria-current], .section-link:active { color: var(--screen); background: var(--ink); }
.section-link[aria-current]::before, .section-link[aria-current] + .section-link::before { visibility: hidden; }
.section-link[aria-current]:focus-visible { outline-color: var(--ink); }
@media (hover: hover) { .section-link:not([aria-current]):hover { background: #293c2013; } }
.browse { display: flex; align-items: center; justify-content: flex-end; min-height: clamp(3.3rem,7.3svh,5rem); color: var(--muted); }
.browse button { min-width: 40px; min-height: 44px; font: 400 1.35rem/1 var(--mono); }
.browse button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
::selection { color: var(--screen); background: var(--ink); }
@media (max-width: 760px) {
  .section-link kbd { display: none; }
  .section-link { justify-content: center; }
  .detail-page { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; }
  .skill-items div { grid-template-columns: 4.3rem 1fr; gap: .5rem; }
  .role { font-size: 1.15rem; }
}
@media (max-width: 620px) {
  .lcd::before { background-size: 15.2px 21.6px; }
  .masthead { min-height: 4.1rem; }
  .sound-control { gap: .3rem; font-size: .68rem; }
  .sound-control svg { width: 16px; height: 16px; }
  .viewport { padding-block: clamp(1.6rem,5svh,3rem); }
  .folio-label { margin-bottom: 1.25rem; }
  .profile-page { grid-template-columns: 1fr; gap: clamp(1.1rem,3.4svh,2rem); }
  h1 { max-width: 29rem; }
  .role { font-size: clamp(1rem,4.1vw,1.4rem); margin-top: 1.05rem; }
  .portrait-art { width: min(78vw, 19rem); }
  .detail-page { grid-template-columns: 1fr; gap: 1.6rem; }
  .detail-page h1 { width: min(75%,22rem); }
  .skill-items div { grid-template-columns: 5rem 1fr; }
  .section-link { flex-direction: column; gap: .38rem; padding: .45rem .2rem; font-size: clamp(.96rem,3.8vw,1.16rem); }
  .section-link svg { width: 18px; height: 18px; }
  .browse { min-height: 3.2rem; }
  .browse button { min-width: 31px; }
}
@media (max-width: 370px) {
  .section-link { font-size: .86rem; }
  .sound-control { letter-spacing: 0; }
}
@media (min-width: 768px) {
  .seq-step-grid {
    max-width: calc(var(--track-label-width) + var(--page-capacity, 16) * 7rem);
    grid-template-columns: var(--track-label-width) repeat(var(--page-capacity, 16), minmax(0, 1fr));
    column-gap: var(--step-gap);
  }
  .seq-step-grid[data-full-loop] {
    --track-label-width: clamp(3.65rem, 5.5vw, 5.25rem);
    --step-gap: clamp(1px, .13vw, 2px);
  }
  .seq-step-grid[data-full-loop] .seq-numbers { font-size: clamp(.8rem, 1.55vw, 1rem); }
  .seq-bank { grid-column: 1 / span calc(1 + var(--first-steps, 8)); }
  .seq-bank + .seq-bank { grid-column: span var(--second-steps, 8); }
  .seq-bank + .seq-bank :is(.seq-numbers, .seq-track) { grid-template-columns: repeat(var(--second-steps, 8), minmax(0, 1fr)); }
  .seq-bank + .seq-bank .seq-numbers > :first-child,
  body:not(.lcd-live) .seq-bank + .seq-bank .seq-row { display: none; }
}
@media (max-height: 540px) and (min-width: 621px) {
  .masthead { min-height: 3.3rem; }
  .viewport { padding-block: 1.35rem; }
  .folio-label { margin-bottom: .8rem; }
  h1 { width: min(100%,120svh); }
  .portrait-art { max-width: 46svh; }
  .section-link { min-height: 2.7rem; }
  .browse { min-height: 2.75rem; }
}
@media (forced-colors: active) {
  .lcd::before,.lcd::after { display: none; }
  .section-link[aria-current] { outline: 2px solid Highlight; }
  .seq-track button { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
  .seq-track button[aria-pressed="true"], .seq-numbers [aria-current] {
    forced-color-adjust: none; color: HighlightText; background: Highlight; border-color: Highlight;
  }
  .seq-track button:focus-visible, .seq-pad[data-dragging] { outline-color: CanvasText; }
  body:not(.lcd-live) #seq-length-options { background: Canvas; border-color: CanvasText; box-shadow: none; }
  body:not(.lcd-live) #seq-length-options [aria-selected="true"] {
    forced-color-adjust: none; color: HighlightText; background: Highlight; border-color: Highlight;
  }
  .seq-controls button:disabled, .seq-pages button:disabled { color: GrayText; border-color: GrayText; }
}

/* The semantic document doubles as a plain HTML fallback. Once the glass is
   populated, its real links sit at their electrode addresses for native input. */
#lcd-display, .lcd-pressure, .glass-edge { display: none; }
body.lcd-live {
  position: relative;
  display: block;
  touch-action: pan-y pinch-zoom;
  height: var(--plate-height);
  min-height: 100svh;
}
.lcd-live::before { content: none; }
body.lcd-booting { height: 100svh; overflow: clip; }
#lcd-mobile-boot {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden; background-repeat: repeat-y;
}
#lcd-mobile-boot > * { position: absolute; opacity: 0; pointer-events: none; }
#boot-skip {
  position: fixed; inset: 0; z-index: 4;
  width: 100%; height: 100%; padding: 0; border: 0;
  background: transparent; touch-action: manipulation;
}
@media screen and (forced-colors: none) {
  .lcd-live .glass-edge {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: clamp(7px, 1.15vmin, 12px);
    box-shadow:
      inset 0 1.5px 4.5px rgb(40 54 33 / .18),
      inset 0 1px 13px rgb(40 54 33 / .13),
      0 0 0 12px #98a582;
  }
  .glass-edge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    --rim: clamp(9px, 1.5vmin, 15px);
    --falloff: #000, transparent var(--rim), transparent calc(100% - var(--rim)), #000;
    -webkit-backdrop-filter: blur(1.4px);
    backdrop-filter: blur(1.4px);
    -webkit-mask-image: linear-gradient(90deg, var(--falloff)), linear-gradient(0deg, var(--falloff));
    mask-image: linear-gradient(90deg, var(--falloff)), linear-gradient(0deg, var(--falloff));
  }
}
@media screen and (hover: none) and (pointer: coarse) and (forced-colors: none) {
  /* Keep the grain and inset rim without resampling the whole moving canvas. */
  .lcd-live::after { mix-blend-mode: normal; opacity: .04; }
  .lcd-live .glass-edge::before { content: none; }
}
.lcd-live #lcd-display {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}
.lcd-live .lcd-pressure {
  display: block;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.lcd-live > :is(header, main, footer) {
  position: absolute; inset: 0; width: auto; height: auto;
  display: block; padding: 0; margin: 0; border: 0; overflow: clip;
  pointer-events: none; opacity: 0;
}
.lcd-live :is(.masthead, .viewport, .footer) * { pointer-events: none; }
.lcd-live [data-lcd-hit] {
  position: absolute;
  left: var(--hit-x); top: var(--hit-y); width: var(--hit-width); height: var(--hit-height);
  min-height: 0; min-width: 0; margin: 0; padding: 0;
  border: none; z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
}
.lcd-live :is(.masthead, .viewport, .footer) [data-lcd-hit] { pointer-events: auto; }
.lcd-live .seq-bank + .seq-bank .seq-row :is(.seq-mute, .seq-solo):not([data-lcd-hit]),
.lcd-live .sequencer[data-lcd-banks="1"] .seq-bank + .seq-bank :is(.seq-mute, .seq-solo) { display: none; }
.lcd-live .skip-link:focus { opacity: 0; }

#draw-surface { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; cursor: crosshair; }
body:not(.lcd-live) #draw-surface {
  display: block; width: 100%; height: max(40svh, 160px);
  outline: 1px dashed currentColor;
}
body:not(.lcd-live) .draw-toolbar { display: inline-flex; gap: .5rem; margin: 1rem .75rem 1rem 0; }
body:not(.lcd-live) .draw-toolbar button { padding: .5rem; border: 1px solid; }
body:not(.lcd-live) .draw-toolbar [aria-pressed="true"] { text-decoration: underline; }
body:not(.lcd-live) .draw-palette {
  display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; margin: 0 0 1rem;
}
body:not(.lcd-live) .draw-palette button {
  min-width: 2.25rem; min-height: 2.5rem; border: 1px solid transparent;
}
body:not(.lcd-live) .draw-palette [aria-pressed="true"] { border-color: currentColor; }
body.lcd-live[data-app="lcd-drawing-system"] > .viewport { opacity: 1; }
.lcd-live #app-lcd-drawing-system > :not(#draw-surface) { opacity: 0; }
.lcd-live #draw-surface:focus-visible { outline: 1px dashed var(--rule); outline-offset: 2px; }

#app-serious-writing-application {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: min(100%, 70ch);
  margin-inline: auto;
}
.writer-toolbar { display: flex; justify-self: end; gap: .3rem; }
.writer-toolbar button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: .4rem;
  border: 1px solid var(--rule);
}
.writer-toolbar [aria-pressed="true"] { color: var(--screen); background: var(--ink); }
#writer-paper {
  grid-column: 1 / -1;
  border-block: 1px dashed var(--rule);
  padding-block: 1rem;
}
:is(#writer-afterburn, #writer-ink) { display: none; }
#writer-editor {
  height: 52svh;
  overflow: auto;
  overscroll-behavior: contain;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 1rem/1.6 var(--mono);
  caret-color: var(--ink);
}
#writer-editor :is(p, div) { margin: 0; }
#writer-paper:focus-within { border-color: var(--ink); }
.writer-status {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .8rem;
}
@media (max-width: 620px) {
  #app-serious-writing-application { gap: .75rem; }
}
body.lcd-live.writer-lcd-ready[data-app="serious-writing-application"] > .viewport { opacity: 1; }
.lcd-live.writer-lcd-ready #app-serious-writing-application > :not(#writer-paper) { opacity: 0; }
.lcd-live.writer-lcd-ready #writer-paper {
  position: absolute;
  left: var(--writer-x);
  top: var(--writer-y);
  width: var(--writer-width);
  height: var(--writer-height);
  isolation: isolate;
  overflow: hidden;
  border: 0;
  padding: 0;
}
.lcd-live.writer-lcd-ready #writer-paper :is(#writer-afterburn, #writer-ink, #writer-editor) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
}
.lcd-live.writer-lcd-ready :is(#writer-afterburn, #writer-ink) { display: block; pointer-events: none; }
.lcd-live.writer-lcd-ready #writer-editor {
  z-index: 1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-y pinch-zoom;
  cursor: text;
  scrollbar-width: none;
  overflow-x: hidden;
  font-family: "Courier New", Courier, monospace;
  font-size: max(16px, var(--writer-row));
  line-height: var(--writer-row);
  font-kerning: none;
  font-variant-ligatures: none;
  tab-size: 4;
}
.lcd-live.writer-lcd-ready :is(#writer-editor, #writer-editor *) {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  letter-spacing: calc(var(--writer-pitch) - 1ch);
}
.lcd-live.writer-lcd-ready #writer-editor::-webkit-scrollbar { display: none; }
.lcd-live.writer-lcd-ready :is(#writer-editor, #writer-editor *)::selection {
  color: transparent;
  background: rgb(44 61 34 / .23);
}
@media print {
  body[data-app="serious-writing-application"] { display: block; padding: 0; background: white; color: black; }
  body[data-app="serious-writing-application"] :is(.masthead, .writer-toolbar, .writer-status) { display: none; }
  #app-serious-writing-application { display: block; width: 100%; }
  #writer-paper { border: 0; }
  #writer-editor { height: auto; overflow: visible; }
}
