/* 01 The Fairlight: usability pass (29 November 2026). Applies to both modes unless html.plain says otherwise. */

/* 1. sources: a row whose only link is its source opens it anywhere; the arrow itself gets a finger-sized area */
.rowlink { cursor: pointer; }
.rowlink:hover > td, .rowlink:hover { background: rgba(51, 255, 102, .07); }
html.plain .rowlink:hover > td, html.plain .rowlink:hover { background: #1c1c1b; }
.rowlink:hover a.src.mini { background: var(--phos); color: var(--ink-on-phos); }
html.plain .rowlink:hover a.src.mini { background: none; color: var(--accent); }
.scroll a.src.mini { position: relative; display: inline-block; padding: 6px 9px; margin: -6px -5px; }

/* 2. rows that open in place carry a sign, and are tall enough for a finger on a phone */
.dir .row > .vol .nm::before { content: "\25B8\00A0"; color: var(--phos-dim); }
.dir .row.open > .vol .nm::before { content: "\25BE\00A0"; color: inherit; }
html.plain .dir .row > .vol .nm::before { color: var(--accent); }
@media (max-width: 759px) {
  .dir .vol, .songs .vol { min-height: 46px !important; align-items: center; }
}

/* 3. the sequencer lanes take presses and drags; a lower strip on a phone */
.lane { touch-action: pan-y; cursor: pointer; }
@media (max-width: 759px) {
  .lane { height: calc(var(--lanes) * 6px + 8px); }
  .lane .note { height: 5px; top: calc(4px + var(--l) * 6px); }
  .solo { font-size: 14px; }
}

/* 4. FIND: one search box over the whole catalogue, on the screen itself */
.findkey { cursor: pointer; border: 0; }
.find { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: auto 1fr; background: var(--glass); border-radius: inherit; }
.find[hidden] { display: none; }
.findbar { display: flex; align-items: center; gap: 12px; padding: 22px 34px 12px; font-size: 26px; zoom: var(--z, 1); border-bottom: 2px solid var(--phos-faint); }
.findbar label { color: var(--phos); }
.findbar input { flex: 1; min-width: 0; font: inherit; color: var(--phos); background: var(--glass-lift); border: 0; border-bottom: 2px solid var(--phos); padding: 4px 8px; border-radius: 0; caret-color: var(--phos); }
.findbar input:focus { outline: none; background: #0c2c15; }
.findbar input::placeholder { color: var(--phos-faint); }
.findres { list-style: none; margin: 0; padding: 10px 34px 30px; overflow: auto; overscroll-behavior: contain; zoom: var(--z, 1); font-size: 22px; }
.findres a { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 6px 8px; color: var(--phos); text-decoration: none; min-height: 40px; }
.findres a:hover, .findres a:focus-visible { background: var(--phos); color: var(--ink-on-phos); outline: none; }
.findres .fk { color: var(--phos-dim); font-size: .8em; }
.findres .fs { color: var(--phos-dim); font-size: .85em; text-align: right; }
.findres a:hover .fk, .findres a:hover .fs, .findres a:focus-visible .fk, .findres a:focus-visible .fs { color: var(--ink-on-phos); }
.findres .none { padding: 10px 8px; color: var(--phos-dim); }
html.plain .find { background: #121212; }
html.plain .findbar { zoom: 1; font: 700 18px/1.2 'Archivo', sans-serif; padding: 26px max(28px, calc(50vw - 640px)) 14px; border-bottom-color: #2a2a28; }
html.plain .findbar input { font: 500 20px/1.3 'Archivo', sans-serif; color: #fff; background: #1b1b1a; border-bottom-color: var(--accent); }
html.plain .findres { zoom: 1; font: 500 17px/1.3 'Archivo', sans-serif; padding: 10px max(28px, calc(50vw - 640px)) 30px; }
html.plain .findres a { color: #ecebe6; }
html.plain .findres a:hover, html.plain .findres a:focus-visible { background: #1f1f1e; color: #fff; }
html.plain .findres a:hover .fk, html.plain .findres a:focus-visible .fk { color: var(--accent); }
html.plain .findres .fk { color: var(--accent); font-size: 12px; letter-spacing: .08em; }
@media (max-width: 759px) {
  .findbar { padding: 14px 14px 10px; font-size: 20px; }
  .findres { padding: 6px 10px 20px; font-size: 18px; }
  .findres a { grid-template-columns: 5.6em minmax(0, 1fr); }
  .findres .fs { display: none; }
  html.plain .findbar { padding: 16px 16px 10px; }
  html.plain .findres { padding: 6px 16px 20px; }
}

/* 5. PLAIN on a phone: a MENU button, the menu as a full panel */
.plainmenu { display: none; }
@media (max-width: 759px) {
  html.plain .plainmenu {
    display: block; margin-left: auto; margin-right: 4px; padding: 10px 14px; border: 0; border-radius: 3px; cursor: pointer;
    background: #1f1f1e; color: #fff; font: 700 13px/1 'Archivo', sans-serif; letter-spacing: .1em;
  }
  html.plain .plainmenu[aria-expanded="true"] { background: var(--accent); color: #031207; }
  html.plain .ascii { flex-direction: row !important; align-items: center !important; flex-wrap: wrap !important; }
  html.plain .ascii .keys { display: none !important; }
  html.plain.pmopen .ascii .keys { display: flex !important; flex-direction: column; flex-basis: 100%; gap: 0; padding: 6px 0 10px; }
  html.plain.pmopen .ascii .key { padding: 13px 0; border-top: 1px solid #262523; justify-content: flex-start; }
  html.plain.pmopen .ascii .key span { font-size: 15px; }
}

/* 7. Music on a phone: the studio albums first, the list of directories after them as a compact row */
@media (max-width: 759px) {
  .scroll[data-sec="music"] { display: flex; flex-direction: column; }
  .scroll[data-sec="music"] > * { order: 3; }
  .scroll[data-sec="music"] > #d-studio { order: 1; }
  .scroll[data-sec="music"] > .diridx { order: 2; }
  .diridx ul { display: flex; flex-wrap: wrap; gap: 6px 8px; columns: auto; }
  .diridx li { margin: 0; }
}

/* 10. Fairlight on a phone: the top line of the screen leaves room for the mode switch */
@media (max-width: 759px) {
  html:not(.plain) .topline { padding-right: 40px; }
}

/* phone: running times over an hour fit (1:06:59) */
@media (max-width: 759px) {
  .dir .vol, .dirhead { grid-template-columns: 40px minmax(0, 1fr) 4.4ch 7ch !important; gap: 6px; }
}

@media (max-width: 759px) { .scroll a.src.mini { padding: 8px 11px; margin: -8px -7px; } }

/* headlines on HOME */
.papers { margin-top: 18px; }
.papers h2 { font-size: 24px; color: var(--phos-dim); margin: 0 0 6px; }
.papers li { margin: 0 0 8px; line-height: 1.15; }
.papers .dim { display: block; font-size: .8em; }
html.plain .papers h2 { font-size: 22px; letter-spacing: .04em; }
.papers li { font-size: 17px; }
html.plain .papers li { font-size: 15px; }
.papers a { line-height: 1.15; }

/* NEWS */
.newsupd { margin: 0 0 6px; }
.papers-list { list-style: none; margin: 0; padding: 0; }
.papers-list li { display: grid; grid-template-columns: 7.4em 1fr; gap: 14px; padding: 7px 0; border-top: 1px solid rgba(51, 255, 102, .12); }
html.plain .papers-list li { border-top-color: #262523; }
.papers-list .d { color: var(--phos-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 759px) { .papers-list li { grid-template-columns: 1fr; gap: 2px; } }

/* HOME: news where the index was */
.homenews h2 { font-size: 24px; color: var(--phos-dim); margin: 0 0 6px; }
.homenews .papers-list li { grid-template-columns: 5.6em 1fr; gap: 10px; padding: 4px 0; font-size: 18px; line-height: 1.15; }
.homenews .papers-list .dim { display: block; font-size: .85em; }
.homenews .allnews { margin-top: 10px; }
html.plain .homenews h2 { font-size: 22px; letter-spacing: .04em; }
html.plain .homenews .papers-list li { font-size: 16px; }

/* phone: twelve keys in two rows of seven, KEYS beside them */
@media (max-width: 759px) { html:not(.plain) .ascii .keys { grid-template-columns: repeat(7, 1fr) !important; } html:not(.plain) .ascii .key span { font-size: 7.5px; } }

/* video releases keep their upright box art in the list */
.dir .vidrow .th .ph img { object-fit: contain; background: #000; }
