/* 01 The Fairlight: the PLAIN mode. Same pages, same data, same addresses, without the machine.
   Dark, full colour, an ordinary type face; Fairlight green kept as the one accent. Switched with #modesw. */

/* the switch, top right of the window, in both modes */
.modesw {
  position: fixed; top: 14px; right: 16px; z-index: 40;
  display: flex; align-items: center; gap: 0; padding: 3px; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(#26231f, #141210); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px #000, 0 6px 14px rgba(0, 0, 0, .6);
  font: 700 10.5px/1 'Archivo', system-ui, sans-serif; letter-spacing: .1em; color: #8d877b;
}
.modesw span { padding: 7px 10px 6px; border-radius: 2px; transition: background .12s, color .12s; }
.modesw .m-fl { background: linear-gradient(#f3ecda, #d8ccad); color: #2b2620; box-shadow: inset 0 -2px 0 #bfb394; }
html.plain .modesw .m-fl { background: none; color: #8d877b; box-shadow: none; }
html.plain .modesw .m-pl { background: #33ff66; color: #031207; box-shadow: inset 0 -2px 0 #1fa84a; }
.modesw:focus-visible { outline: 2px solid #33ff66; outline-offset: 3px; }
.plainname { display: none; }

/* ---------- PLAIN ---------- */
html.plain {
  --mono: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --phos: #ecebe6; --phos-dim: #9b988f; --phos-faint: #2c2b29;
  --glass: #121212; --glass-lift: #1b1b1a; --ink-on-phos: #0b0b0b;
  --accent: #3ee06f;
  color-scheme: dark;
}
html.plain, html.plain body { background: #121212; }
html.plain body { overflow: hidden; }
html.plain * { text-shadow: none !important; }
html.plain .room, html.plain .mon-shell, html.plain .penbay, html.plain .plinth, html.plain .mk, html.plain .handpen,
html.plain .facetape, html.plain .glass-fx, html.plain .redraw, html.plain .boot, html.plain .os, html.plain .tallkey,
html.plain .topline .pageid { display: none !important; }

/* the page is a plain column: menu bar on top, the content filling the rest */
html.plain .rig { height: 100dvh; overflow: hidden; }
html.plain .stage { position: static !important; transform: none !important; width: auto !important; height: 100dvh !important; display: flex; flex-direction: column; }
html.plain .stage > * { position: relative !important; left: auto !important; top: auto !important; }
html.plain .ascii {
  order: 0; width: auto !important; height: auto !important; display: flex !important; align-items: center; gap: 22px;
  padding: 0 170px 0 28px !important; min-height: 62px; border-radius: 0; background: #0b0b0b; box-shadow: 0 1px 0 #262523; transform: none;
}
html.plain .plainname { display: flex; flex-direction: column; text-decoration: none; color: #ecebe6; line-height: 1.05; flex: none; }
html.plain .plainname b { font: 800 19px/1 'Archivo', sans-serif; letter-spacing: .01em; }
html.plain .plainname span { font: 500 11px/1.3 'Archivo', sans-serif; color: #9b988f; letter-spacing: .04em; }
html.plain .ascii .keys { display: flex !important; flex-wrap: wrap; gap: 2px 18px; flex: 1; justify-content: flex-end; }
html.plain .ascii .keys li { flex: none; }
html.plain .ascii .key {
  width: auto; height: auto; padding: 8px 0; background: none; box-shadow: none; border-radius: 0; transform: none;
}
html.plain .ascii .key span { font: 700 12px/1 'Archivo', sans-serif; letter-spacing: .08em; color: #b9b6ad; }
html.plain .ascii .key:hover span { color: #fff; }
html.plain .ascii .key.down { background: none; box-shadow: inset 0 -2px 0 var(--accent); }
html.plain .ascii .key.down span { color: #fff; }

html.plain .mon { order: 1; flex: 1; min-height: 0; width: auto !important; height: auto !important; display: flex; }
html.plain .face { position: static !important; flex: 1; display: flex; clip-path: none !important; border: 0 !important; background: none !important; padding: 0 !important; }
html.plain .face .recess { position: static !important; flex: 1; display: flex; width: auto !important; height: auto !important; padding: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
html.plain .glass { width: 100% !important; height: auto !important; flex: 1; border-radius: 0 !important; filter: none !important; background: var(--glass) !important; box-shadow: none !important; }
html.plain .topline { display: none; }
html.plain .topline, html.plain .scroll, html.plain .tvbar { zoom: 1; }
html.plain .scroll { padding: 34px max(28px, calc(50vw - 640px)) 60px; font-size: 17px; line-height: 1.55; }
html.plain .scroll h1, html.plain .scroll h2, html.plain .scroll h3, html.plain .scroll h4 { font-family: 'Archivo', sans-serif; font-weight: 800; letter-spacing: -.005em; }
html.plain .dirh { font-size: 26px; margin: 34px 0 12px; }
html.plain .dirh.small { font-size: 15px; letter-spacing: .06em; color: var(--phos-dim); }
html.plain .home .name { font-size: clamp(48px, 7vw, 96px); font-weight: 900; line-height: .9; letter-spacing: -.02em; }
html.plain .bio { font-family: 'Archivo', sans-serif; font-size: 18px; line-height: 1.65; }

/* pictures in full colour, no tint and no flicker */
html.plain .ph img { filter: none !important; animation: none !important; transform: none !important; }
html.plain .ph::after, html.plain .ph::before { display: none !important; }

/* links: green text; nothing in blocks */
html.plain .scroll a, html.plain .scroll a[href^="/"], html.plain .scroll a[href^="#"], html.plain .scroll a.mail[href^="mailto:"] { background: none; color: var(--accent); text-decoration: none; padding: 0; }
html.plain .scroll a:hover, html.plain .scroll a:focus-visible { background: none; color: #8dffb0; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
html.plain .scroll a.vol, html.plain .scroll .index a, html.plain .scroll a.newlink, html.plain .scroll .gallery a { color: var(--phos); }
html.plain .scroll a.vol:hover, html.plain .scroll .index a:hover { background: #1f1f1e; color: #fff; text-decoration: none; }
html.plain .dir .row.open > .vol { background: #1f1f1e; color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
html.plain .dir .row.open > .vol .dim { color: var(--phos-dim); }
html.plain .index a b, html.plain .inv, html.plain .won, html.plain .scroll a.donate { background: var(--accent); color: #031207; }
html.plain .ev.hl h3, html.plain .perf.lm h3 { background: none; color: #fff; padding: 0; box-shadow: inset 0 -2px 0 var(--accent); }
html.plain .panel { background: #181817; }
html.plain .contact-mail a.mail { font-size: 28px; }

/* the sequencer, drawn plainly */
html.plain .lane .note { background: #5c5a55; }
html.plain .lane .note.hl { background: var(--accent); }
html.plain .lane { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px calc(100% / 77)); }
html.plain .head::before { background: #fff; box-shadow: none; }
html.plain .head::after { border-top-color: #fff; }

@media (max-width: 900px) {
  html.plain .ascii { flex-wrap: wrap; padding: 10px 150px 10px 16px !important; gap: 8px 14px; }
  html.plain .ascii .keys { justify-content: flex-start; gap: 2px 14px; }
}
@media (max-width: 759px) {
  .modesw { top: auto; bottom: calc(var(--deck-mob, 150px) + 10px); right: 10px; }
  html.plain .modesw { top: 10px; bottom: auto; }
  html.plain .ascii { padding: 12px 120px 10px 16px !important; }
  html.plain .ascii .keys { display: flex !important; }
  html.plain .scroll { padding: 22px 18px 40px; font-size: 16px; }
}

/* sizes: the screen face is narrow; Archivo is wide. Scale the whole page down a fifth and keep reading sizes */
html.plain .scroll { zoom: .8; font-size: 20.5px; line-height: 1.55; padding: 40px max(34px, calc(62.5vw - 800px)) 70px; }
html.plain .bio { font-size: 22.5px; }
html.plain .facts { font-size: 18px; line-height: 1.3; }
html.plain .index a b { display: none; }
html.plain .index a { grid-template-columns: 1fr; }
html.plain .homeside h2, html.plain .index h2 { font-size: 22px; letter-spacing: .04em; }
html.plain .dir .row.open > .vol { scroll-margin-top: 20px; }
@media (max-width: 759px) { html.plain .scroll { zoom: .85; font-size: 19px; padding: 22px 18px 40px; } }

/* phone: the switch sits in the empty top-right of the screen's top line; in PLAIN the menu wraps under the name */
@media (max-width: 759px) {
  .modesw { top: 16px !important; bottom: auto !important; right: 14px; font-size: 9px; }
  .modesw span { padding: 6px 7px 5px; }
  html.plain .ascii { flex-direction: column; align-items: flex-start !important; gap: 10px !important; padding: 12px 16px 10px !important; }
  html.plain .ascii .keys { display: flex !important; flex-wrap: wrap; justify-content: flex-start; gap: 0 14px; width: 100%; }
  html.plain .ascii .keys li { flex: none !important; }
  html.plain .ascii .key { padding: 6px 0; }
  html.plain .ascii .key span { font-size: 11px; }
}
html.plain .ascii { flex-shrink: 0; }
@media (max-width: 759px) { html.plain .ascii { flex-wrap: nowrap !important; padding-right: 16px !important; } html.plain .plainname { padding-right: 130px; } }

/* Fairlight mode: the switch stands on end at the right edge of the window, text turned with it */
@media (min-width: 760px) {
  html:not(.plain) .modesw { top: 50%; right: 14px; transform-origin: 100% 0; transform: translateY(-50%) rotate(-90deg) translateX(50%); }
}
/* no pen of any kind in PLAIN */
html.plain .pen, html.plain .handpen, html.plain #restpen { display: none !important; }
html.plain .glass, html.plain .glass * { cursor: auto !important; }
html.plain .glass a, html.plain .glass button { cursor: pointer !important; }
@media (min-width: 760px) {
  /* rotate about the top-left corner: the turned switch then reaches up from (left, top) and is as wide as the switch is tall */
  html:not(.plain) .modesw { right: auto; left: calc(100vw - 50px); top: calc(50% + 80px); transform-origin: 0 0; transform: rotate(-90deg); }
}
@media (min-width: 760px) {
  /* on end, at the top right corner of the window */
  html:not(.plain) .modesw { top: 178px; left: calc(100vw - 50px); }
}

/* ---------- the switch: same place in both modes, tucked into the top right corner ---------- */
.modesw, html:not(.plain) .modesw { top: 6px !important; right: 6px !important; left: auto !important; bottom: auto !important; transform: none !important; }
html.plain .ascii { padding-right: 168px !important; }
@media (max-width: 759px) { .modesw, html:not(.plain) .modesw { top: 6px !important; right: 6px !important; } }

/* ---------- PLAIN home: the photograph fills the left half, edge to edge ---------- */
html.plain .scroll[data-sec="home"] { padding: 0 !important; zoom: 1; overflow: hidden; }
html.plain .scroll[data-sec="home"] .home { display: grid; grid-template-columns: 50% 1fr; gap: 0; height: 100%; min-height: 100%; }
html.plain .scroll[data-sec="home"] .hero { position: relative; margin: 0; height: 100%; min-height: 0; }
html.plain .scroll[data-sec="home"] .hero .ph { position: absolute; inset: 0; }
html.plain .scroll[data-sec="home"] .hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
html.plain .scroll[data-sec="home"] .hero figcaption { position: absolute; left: 20px; bottom: 16px; z-index: 1; padding: 4px 8px; background: rgba(0, 0, 0, .5); color: #ddd; font-size: 13px; }
html.plain .scroll[data-sec="home"] .homemain { padding: 52px 52px 36px; overflow: auto; zoom: .82; }
html.plain .scroll[data-sec="home"] .home .name { font-size: clamp(72px, 9vw, 128px); line-height: .86; letter-spacing: -.03em; margin: 0 0 14px; }
html.plain .scroll[data-sec="home"] .colophon { display: none; }
@media (max-width: 900px) {
  html.plain .scroll[data-sec="home"] { overflow: auto; }
  html.plain .scroll[data-sec="home"] .home { grid-template-columns: 1fr; height: auto; }
  html.plain .scroll[data-sec="home"] .hero { height: 62vh; }
  html.plain .scroll[data-sec="home"] .homemain { padding: 26px 18px 36px; zoom: .9; }
  html.plain .scroll[data-sec="home"] .home .name { font-size: 58px; }
}
/* the home grid fills the window under the menu bar; the photo always covers its half */
html.plain .scroll[data-sec="home"] .home { height: auto; min-height: calc(100dvh - 63px); }
html.plain .scroll[data-sec="home"] .hero img { aspect-ratio: auto !important; height: 100% !important; width: 100% !important; }
@media (max-width: 900px) {
  html.plain .scroll[data-sec="home"] .home { min-height: 0; }
}
@media (max-width: 759px) {
  html.plain .plainname { padding-right: 0; white-space: nowrap; }
}
html.plain .scroll[data-sec="home"] .hero .ph { aspect-ratio: auto !important; height: 100% !important; width: 100% !important; flex: none; }

/* the switch stands on end, in the same place in both modes: top right corner, text read from below */
.modesw, html:not(.plain) .modesw {
  writing-mode: vertical-rl; transform: rotate(180deg) !important;
  top: 6px !important; right: 6px !important; left: auto !important; bottom: auto !important;
}
.modesw span { padding: 10px 7px; }
html.plain .ascii { padding-right: 52px !important; }
@media (max-width: 759px) { html.plain .ascii { padding-right: 46px !important; } .modesw span { padding: 8px 6px; } }

/* PLAIN hover: everything inside a hovered link stays readable on the dark */
html.plain .scroll a:hover *, html.plain .scroll a:focus-visible * { color: inherit; }
html.plain .index a:hover .pl, html.plain .index a:focus-visible .pl,
html.plain .dir .vol:hover .dim, html.plain .dir .vol:focus-visible .dim { color: #b9b6ad !important; }
html.plain .scroll .index a:hover, html.plain .scroll a.newlink:hover, html.plain .scroll a.vol:hover { background: #1f1f1e; color: #fff; text-decoration: none; }
html.plain .scroll a.newlink:hover .big, html.plain .scroll .index a:hover .pn { color: var(--accent); }
html.plain .pagemenu a:hover, html.plain .pagemenu a:focus-visible { background: #1f1f1e; color: #fff; }

/* the switch turns about its own middle in both modes (an older rule turned it about a corner) */
.modesw, html:not(.plain) .modesw { transform-origin: 50% 50% !important; }
/* Fairlight: the dim line inside the newest record stays readable on the lit field */
html:not(.plain) .scroll a.newlink:hover .dim, html:not(.plain) .scroll a.newlink:focus-visible .dim { color: var(--ink-on-phos); }
