/* app.css — Queue. One number, one track, one polite nothing. */

:root {
  --sux-bg: #101014;
  --sux-fg: #f4f2ec;
  --sux-accent: #5B7CFA;
  --muted: #a8a49b;
  --line: #2b2b31;
  color-scheme: dark light;
  --on-accent: #08130d;
  --line-strong: #3a3a41;
  --sheet: color-mix(in srgb, var(--sux-fg) 3%, var(--sux-bg));
  --card: #16161b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --dialog-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
  :root {
    --sux-bg: #f6f3ec;
    --sux-fg: #17171a;
    --muted: #55524c;
    --line: #ded8cc;
    --on-accent: #08130d;
    --line-strong: #cfc7b8;
    --sheet: #fdfbf6;
    --card: #fffdf8;
    --shadow: 0 10px 30px rgba(90, 55, 35, 0.12);
    --dialog-shadow: 0 24px 60px rgba(90, 55, 35, 0.28);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  padding-block-start: var(--sux-shell-h, 0);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--sux-bg);
  color: var(--sux-fg);
  font: 400 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  flex: 1;
  width: min(40rem, 100% - 2.5rem);
  margin: 0 auto;
  padding-block: 1.5rem 2rem;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.05;
}

.job {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.intro {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 38rem;
}

.counter {
  padding: 1.3rem 1.4rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--sux-accent) 7%, transparent);
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.number {
  margin: 0.2rem 0 0.9rem;
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sux-fg) 12%, transparent);
  overflow: hidden;
}

.track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--sux-accent);
}

.note {
  margin: 0.7rem 0 0;
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.88rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1rem;
}

button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--sux-accent);
}

button[aria-pressed="true"] {
  border-color: var(--sux-accent);
  box-shadow: inset 0 0 0 1px var(--sux-accent);
}

.turn {
  padding: 1.1rem 1.2rem 1.2rem;
  border: 1px solid var(--sux-accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--sux-accent) 10%, transparent);
}

.turn h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.turn p {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
}

.turn p:last-child {
  margin-bottom: 0;
}

.hint {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 38rem;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--sux-accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
}
.skip:focus {
  inset-inline-start: 1rem;
  inset-block-start: calc(var(--sux-shell-h, 0px) + 1rem);
  z-index: 2;
  padding: 0.6rem 1rem;
  background: var(--sux-fg);
  color: var(--sux-bg);
  border-radius: 8px;
}

footer {
  width: min(40rem, 100% - 2.5rem);
  margin: 0 auto;
  padding-block: 1.25rem 2rem;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0 0 0.35rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- About panel (the suite-wide pattern; see template/app/app.css). ---- */
dialog.about {
  display: block;
  width: min(46rem, 100% - 2.5rem);
  margin: 0 auto;
  padding: 1.1rem 1.4rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  color: var(--sux-fg);
}

dialog.about .intro,
dialog.about .hint {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40rem;
  margin: 0 0 0.9rem;
}

.about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.9rem;
}

.about-head h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

dialog.about .close {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
}

dialog.about .close:hover {
  color: var(--sux-fg);
}

.about-body h3 {
  margin: 1.1rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-body h3 + .hint {
  margin-block-start: 0;
}

/* Scripts running: the panel becomes a modal behind the About button. */
.js dialog.about:not([open]) {
  display: none;
}

.js dialog.about .close {
  display: inline-block;
}

.js dialog.about {
  max-width: min(40rem, calc(100% - 2rem));
  max-height: min(24rem, 80svh);
  overflow: auto;
}

.js dialog.about::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.about-body a {
  color: var(--sux-accent);
  text-decoration-color: color-mix(in srgb, var(--sux-accent) 55%, transparent);
}

.about-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.about-btn:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--sux-fg) 6%, transparent);
  color: var(--sux-fg);
}
