/* termamp.com: the home page (index.html) and the phone player (session/index.html).
   The colours are termamp's Phosphor theme. Green marks what you can press. */
:root {
  color-scheme: dark;
  --page: #0b0f0c;
  --raised: #131c16;
  --text: #e2efe5;
  --weak: #a3bfab;
  --accent: #39ff78;
  --on-accent: #04180a;
  --line: #2a4433;
  --control: #4a7556;
  --hover: rgb(57 255 120 / 0.08);
  --press: rgb(57 255 120 / 0.16);
  --warn: #f0c85a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* The top line: termamp on the left. */
.top { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-bottom: 16px; color: var(--weak); }
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.brand:hover { text-decoration: underline; }
.top .end { margin-left: auto; }

footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--weak); font-size: 14px; }
footer p { margin: 0 0 8px; }
footer strong { color: var(--text); }

/* The home page. */
.hero { padding: 32px 0 16px; }
.hero h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.5px; margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--weak); margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border-radius: 8px; font-weight: 700; text-decoration: none;
}
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { filter: brightness(1.1); }
.primary:active { filter: brightness(0.9); }
.secondary { border: 2px solid var(--accent); color: var(--accent); }
.secondary:hover { background: var(--hover); }
.secondary:active { background: var(--press); }
.part { margin-top: 64px; }
.part h2 { font-size: 22px; line-height: 1.3; margin: 0 0 16px; }
.part p { margin: 0 0 16px; }
.part ul, .part ol { margin: 0 0 16px; padding-left: 24px; }
.part li + li { margin-top: 12px; }
.part li::marker { color: var(--weak); }
.note { color: var(--weak); }
pre { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 0 0 16px; overflow-x: auto; }
code { font: inherit; }
kbd { font: inherit; border: 1px solid var(--control); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; }
@media (min-width: 640px) {
  .hero { padding-top: 64px; }
  .hero h1 { font-size: 44px; }
  .part { margin-top: 96px; }
}

/* The player: what's playing, and the buttons. */
#now { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 32px; }
.station { display: flex; gap: 16px; align-items: center; }
#now .logo { width: 64px; height: 64px; font-size: 20px; }
#now-name { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.details { color: var(--weak); font-size: 14px; }
#now-status { margin: 16px 0 0; color: var(--weak); min-height: 24px; }
#now-state.problem { color: var(--warn); }
.controls { display: flex; gap: 16px; align-items: center; margin-top: 24px; }
.controls button { display: grid; place-items: center; border-radius: 50%; }
.skip { width: 56px; height: 56px; border: 2px solid var(--accent); color: var(--accent); }
.skip:hover { background: var(--hover); }
.skip:active { background: var(--press); }
#toggle { width: 72px; height: 72px; background: var(--accent); color: var(--on-accent); }
#toggle:hover { filter: brightness(1.1); }
#toggle:active { filter: brightness(0.9); }
.controls svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#toggle svg { width: 28px; height: 28px; }

/* The player: the stations. */
#stations h2 { font-size: 14px; font-weight: 400; color: var(--weak); margin: 0 0 8px; }
#list { list-style: none; margin: 0; padding: 0; }
#list li + li { margin-top: 8px; }
#list button {
  width: 100%; min-height: 56px; padding: 8px 12px; text-align: left;
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--control); border-radius: 8px;
}
#list button:hover { background: var(--hover); }
#list button:active { background: var(--press); }
/* The station in the box above: a thicker border as well as the colour. */
#list button[aria-current="true"] { border-color: var(--accent); border-left-width: 4px; padding-left: 9px; }
.name { display: block; overflow-wrap: anywhere; }
.playing { color: var(--accent); font-size: 14px; }
.logo {
  flex: none; width: 40px; height: 40px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; background: var(--line); color: var(--text); font-weight: 700;
}
.logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
#message { color: var(--weak); }
#message p { margin: 0 0 16px; }
