/* jam/public/style.css — one dark room. The type is workspace's (Atkinson Hyperlegible Next,
   IBM Plex Mono, served from here); the colours are the night side of twoplanets.org. */

@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/fonts/atkinson-hyperlegible-next-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ground: #0f0e0d;
  --card: #181715;
  --line: #2a2825;
  --ink: #ece6dd;
  --quiet: #9c958b;
  --faint: #6c665e;
  --warm: #e0a458;
  --warm-ink: #1a1208;
  --danger: #e07a5f;
  --ok: #8fbf8a;
  --sans: 'Atkinson Hyperlegible Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font: 16px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--warm); }
h1, h2, h3 { font-weight: 600; margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.05rem; letter-spacing: .01em; }
h3 { font: 400 .72rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--quiet); margin-top: 1rem; }
p { margin: .4rem 0; }
ul, ol { margin: .3rem 0; padding-left: 1.1rem; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiet, .hint, .meta { color: var(--quiet); }
.hint { font-size: .85rem; display: block; }
.meta { font: 300 .78rem/1.5 var(--mono); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.error { color: var(--danger); }

.bar { display: flex; align-items: center; gap: .9rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(15, 14, 13, .92); backdrop-filter: blur(8px); z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font: 400 .8rem var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.brand img { filter: invert(1) brightness(.9); }
.crumb { color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow { flex: 1; }
.who { color: var(--quiet); font-size: .9rem; }
.pill { font: 400 .72rem var(--mono); text-transform: uppercase; letter-spacing: .12em; padding: .2rem .6rem; border-radius: 99px; border: 1px solid var(--line); color: var(--quiet); white-space: nowrap; }
.pill.live { color: var(--warm-ink); background: var(--warm); border-color: var(--warm); }
.pill.ended { color: var(--faint); }

button { font: inherit; cursor: pointer; }
.go { background: var(--ink); color: var(--ground); border: 0; border-radius: 8px; padding: .55rem 1rem; font: 400 .85rem var(--mono); letter-spacing: .03em; }
.go:hover { background: var(--warm); color: var(--warm-ink); }
.go:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; color: var(--quiet); padding: .2rem .3rem; text-decoration: underline; text-underline-offset: 3px; font-size: .88rem; }
.link:hover { color: var(--ink); }
.danger { color: var(--danger); }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: #11100f; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; }
input:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--warm); outline-offset: 1px; }
input[type=checkbox] { width: auto; }
label { display: block; font-size: .9rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; color: var(--quiet); }
.stack > * + * { margin-top: .7rem; }
.row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 10rem; }

main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.25rem; flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.intro { margin: 1.5rem 0 1.25rem; max-width: 46rem; }
.lede { font-size: 1.12rem; color: var(--ink); }
.jams { list-style: none; padding: 0; }
.jams li { display: flex; gap: .8rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.jams li:first-child { border-top: 0; }
.jams a { font-size: 1.05rem; }

/* the player */
.player { display: grid; grid-template-columns: auto auto 1fr; gap: .4rem 1rem; align-items: center; background: linear-gradient(180deg, #1d1a16, var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: 1rem; position: relative; overflow: hidden; }
.listen { display: inline-flex; gap: .55rem; align-items: center; background: var(--warm); color: var(--warm-ink); border: 0; border-radius: 99px; padding: .7rem 1.25rem; font: 400 .9rem var(--mono); letter-spacing: .05em; }
.listen[aria-pressed=true] { background: var(--ink); color: var(--ground); }
.listen .icon { font-size: .8rem; }
.volume input { width: 7rem; padding: 0; accent-color: var(--warm); background: none; border: 0; }
.now-playing { min-width: 0; }
.section { font: 400 .72rem var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--warm); margin: 0; }
.why { margin: .1rem 0 0; color: var(--ink); font-size: .95rem; }
.trace { grid-column: 1 / -1; position: relative; height: 34px; border-top: 1px solid var(--line); margin-top: .4rem; overflow: hidden; }
.tick { position: absolute; bottom: 4px; width: 3px; border-radius: 2px; right: 0; animation: drift 90s linear forwards; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-1240px); opacity: .1; } }
.notice { background: #221d16; border: 1px solid #3a3022; color: var(--ink); border-radius: 10px; padding: .6rem .9rem; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.headline { font-size: 1.25rem; font-weight: 600; margin: .1rem 0 .4rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.2rem; }
.doing { list-style: none; padding: 0; }
.doing li b { font-weight: 600; }
.circling { color: var(--danger); }
.history summary { color: var(--quiet); cursor: pointer; margin-top: .6rem; font-size: .88rem; }
.history ol { padding-left: 1.2rem; color: var(--quiet); font-size: .9rem; }
.history li { margin: .4rem 0; }

.convo-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.chip { background: none; border: 1px solid var(--line); color: var(--quiet); border-radius: 99px; padding: .2rem .7rem; font-size: .82rem; }
.chip.on { border-color: var(--warm); color: var(--ink); }
.messages { list-style: none; padding: 0; margin: .6rem 0; max-height: 70vh; overflow-y: auto; scroll-behavior: smooth; }
.msg { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: .1rem .7rem; padding: .65rem .3rem .65rem 0; border-top: 1px solid var(--line); transition: background .6s; }
.msg:first-child { border-top: 0; }
.msg .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; background: var(--faint); box-shadow: 0 0 0 0 transparent; transition: box-shadow .4s, transform .4s; }
.msg.sounding .dot { transform: scale(1.5); box-shadow: 0 0 14px 3px var(--glow, var(--warm)); }
.msg.sounding { background: rgba(224, 164, 88, .06); }
.msg .head { display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap; }
.msg .label { font-weight: 600; }
.msg.human .label { color: var(--warm); }
.msg .time, .msg .fig { font: 300 .74rem var(--mono); color: var(--faint); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; color: #ddd6cb; }
.msg .body.clipped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.msg .more { grid-column: 2; justify-self: start; }
.msg .reply { font-size: .82rem; color: var(--faint); }
.say { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; border-top: 1px solid var(--line); padding-top: .8rem; }
.say .hint { grid-column: 1 / -1; min-height: 1.2em; }

.people ul { list-style: none; padding: 0; }
.people li { display: flex; gap: .5rem; align-items: center; padding: .3rem 0; flex-wrap: wrap; }
.presence { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.presence.here { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.people .sub { color: var(--faint); font-size: .82rem; }
.reveal { border: 1px solid var(--warm); border-radius: 10px; padding: .8rem; margin-top: .6rem; background: #1f1a12; }
.reveal pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 300 .78rem/1.5 var(--mono); background: #11100f; border-radius: 8px; padding: .7rem; max-height: 18rem; overflow-y: auto; }
.legend ul { list-style: none; padding: 0; }
.legend li { display: grid; grid-template-columns: 12px 4.2rem 1fr; gap: .5rem; align-items: baseline; padding: .2rem 0; font-size: .9rem; }
.legend .swatch { width: 10px; height: 10px; border-radius: 50%; }
.legend li b { font-weight: 600; }
.words p, .legend #how p { font-size: .9rem; color: #cfc8bd; }
.actions { margin-top: .8rem; }
.board .pre { max-height: 22rem; overflow-y: auto; font-size: .92rem; }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--ground); padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; max-width: calc(100vw - 2rem); z-index: 20; }
.foot { text-align: center; color: var(--faint); font: 300 .75rem var(--mono); padding: 1.5rem 1rem 2rem; }
.foot a { color: var(--faint); }

/* About & privacy */
.prose-page main.prose { max-width: 44rem; padding: 2.5rem 1.25rem 3rem; }
.prose h2 { margin-top: 1.8rem; }
.prose p { color: #d7d0c5; }
.eyebrow { font: 400 .75rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--quiet); }
.eyebrow a { color: var(--quiet); text-decoration: none; }

@media (max-width: 980px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  main { padding: 1rem; }
  .bar { padding: .6rem 1rem; gap: .6rem; }
  .who { display: none; }
  .player { grid-template-columns: auto 1fr; }
  .now-playing { grid-column: 1 / -1; }
  .volume input { width: 100%; }
  .cols { grid-template-columns: 1fr; }
  .say { grid-template-columns: 1fr; }
}
