:root {
  color-scheme: dark;
  --canvas: #101923;
  --panel: #16232f;
  --raised: #1b2b38;
  --line: #354653;
  --line-soft: #2a3946;
  --ink: #edf4f2;
  --secondary: #b6c4ca;
  --muted: #9fafb7;
  --mint: #a4ead2;
  --mint-ink: #11332b;
  --display: "Inter", "Roboto", "Arial", sans-serif;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", monospace;
  font-family: var(--display);
  color: var(--ink);
  background: var(--canvas);
  font-size: 100%;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, .button, .primary, .secondary {
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--raised);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
button:hover, .button:hover { border-color: #70868e; background: #223543; }
button:disabled, input:disabled { opacity: .6; cursor: default; }
a { color: var(--mint); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; z-index: 3; left: .75rem; top: .5rem; padding: .6rem 1rem; background: var(--canvas); transform: translateY(-160%); }
.skip:focus { transform: none; }
.masthead { border-bottom: 1px solid var(--line-soft); background: #111d28; }
.masthead-inner, .main, .login-main { width: min(81rem, 100%); margin-inline: auto; padding-inline: clamp(1.05rem, 5vw, 4.5rem); }
.masthead-inner { min-height: 4.75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; gap: .65rem; align-items: center; text-decoration: none; color: var(--ink); }
.brand img { height: 2.45rem; width: 2.45rem; border: 1px solid #3c595d; border-radius: .48rem; }
.brand > span { display: grid; gap: .1rem; }
.brand-name { font: 600 .68rem/1.2 var(--mono); letter-spacing: .15em; color: var(--secondary); }
.brand strong { font: 730 1.06rem/1.15 var(--display); letter-spacing: .12em; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; flex-wrap: wrap; }
.quiet { color: var(--secondary); background: transparent; padding-inline: .75rem; border-color: transparent; font-size: .875rem; }
.quiet:hover { color: var(--ink); }
#push { border-color: var(--line); }
.main { padding-bottom: max(3rem, env(safe-area-inset-bottom)); }
.page-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-block: clamp(2.4rem, 6vw, 5.2rem) clamp(1.5rem, 3.8vw, 2.5rem); }
.eyebrow, .section-head h2, .meta-line, .row-meta, .detail dt, .detail .label {
  font: 550 .79rem/1.5 var(--mono);
  letter-spacing: .045em;
}
.eyebrow { color: var(--mint); text-transform: uppercase; margin: 0 0 .45rem; letter-spacing: .1em; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, .detail h2 { letter-spacing: -.055em; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.75rem, 6.2vw, 5.15rem); line-height: 1.05; font-weight: 600; }
.notice:not(:empty) { padding: .7rem 1rem; color: var(--ink); border-left: 3px solid var(--mint); background: var(--panel); }
.notice:empty { display: none; }
.tabs { display: flex; gap: clamp(.1rem, 2vw, 1.4rem); border-bottom: 1px solid var(--line); }
.tabs button { position: relative; border: 0; border-radius: 0; padding: .6rem .4rem .8rem; color: var(--secondary); background: transparent; }
.tabs button[aria-pressed=true], .tabs button.active { color: var(--mint); }
.tabs button[aria-pressed=true]::after, .tabs button.active::after { content: ""; height: 3px; position: absolute; bottom: -1px; left: 0; right: 0; background: var(--mint); border-radius: 2px; }
.workspace { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.22fr); gap: clamp(1rem, 2.7vw, 2.45rem); align-items: start; padding-top: clamp(1rem, 2.5vw, 2rem); }
.queue, .detail { min-width: 0; border: 1px solid var(--line-soft); border-radius: .85rem; background: var(--panel); }
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; gap: .75rem; padding: .9rem 1.2rem; }
.section-head h2 { margin: 0; color: var(--secondary); text-transform: uppercase; letter-spacing: .1em; }
#count { font: 600 .875rem/1 var(--mono); color: var(--mint); }
#items { display: grid; gap: .1rem; }
#items > p, #items > .empty { color: var(--secondary); margin: 0; padding: .65rem 1.2rem 1.5rem; }
#items > button, .request-row {
  display: grid; gap: .4rem; width: 100%; text-align: left; padding: 1.15rem 1.2rem;
  border: 0; border-top: 1px solid var(--line-soft); border-left: 3px solid transparent;
  border-radius: 0; background: transparent; line-height: 1.4; overflow-wrap: anywhere;
}
#items > button:last-child, .request-row:last-child { border-bottom-left-radius: .8rem; border-bottom-right-radius: .8rem; }
#items > button:hover, .request-row:hover { background: #1c2d39; }
#items button[aria-pressed=true], #items button[aria-current=true], .request-row.selected { background: #20333e; border-left-color: var(--mint); }
.row-title, .request-row strong { color: var(--ink); font-size: 1.09rem; font-weight: 650; letter-spacing: -.013em; }
.meta-line, .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; color: var(--mint); }
.row-context, .request-row small { color: var(--muted); font-weight: 400; font-size: .9rem; }
.detail { min-height: 12rem; padding: clamp(1.2rem, 3.1vw, 2.4rem); scroll-margin-top: 1rem; }
.detail > :first-child { margin-top: 0; }
.detail > :last-child { margin-bottom: 0; }
.detail h2 { font-size: clamp(1.65rem, 3.6vw, 2.65rem); line-height: 1.13; margin: .55rem 0 1.1rem; font-weight: 600; }
.detail h3 { font-size: 1rem; }
.detail .context, .detail p { color: var(--secondary); }
.detail .context { white-space: pre-line; font-size: 1.05rem; }
.detail dl { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: .5rem 1.1rem; margin-block: 1.3rem; }
.detail dt { color: var(--muted); align-self: baseline; }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.detail ul, .detail ol { padding-left: 1.25rem; }
.empty-detail, .detail .empty { color: var(--muted); }
.detail:has(.empty-detail) { display: grid; place-content: center; text-align: center; }
.actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: .65rem; border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.3rem; }
.primary, .secondary, .button { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.primary { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); }
.primary:hover { color: #0a261f; background: #bff9e7; border-color: #bff9e7; }
.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.secondary:hover { border-color: #70868e; }
.login-page { background: var(--canvas); }
.login-main { display: grid; place-items: center; padding-block: clamp(2rem, 8vh, 7rem); }
.login-card { position: relative; width: min(100%, 29.5rem); padding: clamp(1.45rem, 5vw, 3rem); background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.login-card::before { content: ""; display: block; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--mint), #628a93 58%, var(--panel)); }
.login-symbol { margin-bottom: 1.8rem; }
.login-symbol img { display: block; border-radius: .8rem; border: 1px solid #3c595d; }
.login-card h1 { font-size: clamp(2.5rem, 5.6vw, 3.3rem); }
.login-help { color: var(--secondary); margin: 1rem 0 1.8rem; }
.login-card form { display: grid; gap: .65rem; }
.login-card label { font-weight: 600; }
input, select, textarea { border: 1px solid #607681; border-radius: .4rem; padding: .7rem .75rem; background: #101a24; color: var(--ink); min-width: 0; }
.login-card button { margin-top: .5rem; }
@media (max-width: 48rem) {
  .masthead-inner { min-height: 4.25rem; gap: .35rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .detail:has(.empty-detail) { display: none; }
  .account { gap: .05rem; }
  .quiet { padding-inline: .5rem; }
  .section-head { min-height: 3rem; }
}
@media (max-width: 26rem) {
  .masthead-inner, .main, .login-main { padding-inline: .9rem; }
  .masthead-inner { align-items: center; flex-wrap: wrap; padding-block: .4rem; }
  .brand { gap: .42rem; }
  .brand img { width: 2.1rem; height: 2.1rem; }
  .quiet { padding-inline: .4rem; }
  .detail dl { grid-template-columns: 1fr; gap: .19rem; }
  .detail dd { margin-bottom: .35rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
.pair-open { white-space: nowrap; flex-shrink: 0; }
dialog { width: min(30rem, calc(100% - 1.8rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: clamp(1.25rem, 3vw, 2rem); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: .9rem; }
dialog::backdrop { background: rgb(5 13 19 / 80%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.dialog-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.035em; }
#pair-form { display: grid; gap: .5rem; }
#pair-form > label:not(:first-child) { margin-top: .5rem; }
#pair-form label { font-weight: 600; }
#pair-form .check { display: flex; align-items: start; gap: .65rem; color: var(--secondary); font-weight: 400; }
.check input { width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--mint); margin: .15rem 0 0; }
#pair-form button { margin-top: .6rem; }
#pair-result:not(:empty) { display: block; padding: .8rem; margin-top: .35rem; background: var(--canvas); border: 1px solid var(--line); border-radius: .4rem; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--mint); }
@media (max-width: 39rem) {
  .page-title { align-items: start; flex-direction: column; gap: 1rem; }
  .pair-open { font-size: .9rem; }
}
.detail details { border-top: 1px solid var(--line-soft); margin-top: 1.15rem; }
.detail summary { min-height: 44px; padding-block: .7rem; color: var(--secondary); cursor: pointer; font-size: .94rem; }
.detail details[open] summary { color: var(--ink); }
.detail details ul { margin-block: .15rem 0; color: var(--secondary); }
@media (max-width: 39rem) {
  .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions > .primary { grid-column: 1 / -1; }
  .actions > :last-child:nth-child(2) { grid-column: 1 / -1; }
}
