/* Generated from tokens/watchy.tokens.json by scripts/build-assets.ts. Do not edit. */
:root {
  color-scheme: dark light;
  --accent: #5AB4FF;
  --accent-dim: #173A5E;
  --bg: #0A0F16;
  --error: #FF4D5E;
  --focus: #EEF4FA;
  --live: #FF4D5E;
  --on-accent: #04111F;
  --on-live: #0A0F16;
  --on-soon: #0A0F16;
  --scrim: #0A0F1699;
  --soon: #FFB547;
  --stroke: #2B3748;
  --stroke-strong: #6B7A8E;
  --surface: #121A24;
  --surface-hi: #1B2533;
  --text: #EEF4FA;
  --text-dim: #A3B1C2;
  --text-faint: #8391A3;
  --focus-gap: 2px;
  --focus-ring-width: 2px;
  --focus-scale: 1;
}
@media (prefers-color-scheme: light) {
  :root {
    --accent: #0B6BC4;
    --accent-dim: #D8E9FA;
    --bg: #F4F7FA;
    --error: #B81F2D;
    --focus: #0A0F16;
    --live: #D42A3C;
    --on-accent: #FFFFFF;
    --on-live: #FFFFFF;
    --on-soon: #0A0F16;
    --scrim: #0A0F1699;
    --soon: #FFB547;
    --stroke: #D3DBE5;
    --stroke-strong: #7A889B;
    --surface: #FFFFFF;
    --surface-hi: #E8EDF3;
    --text: #0A0F16;
    --text-dim: #3F4C5E;
    --text-faint: #566376;
  }
}
.theme-dark {
  color-scheme: dark;
  --accent: #5AB4FF;
  --accent-dim: #173A5E;
  --bg: #0A0F16;
  --error: #FF4D5E;
  --focus: #EEF4FA;
  --live: #FF4D5E;
  --on-accent: #04111F;
  --on-live: #0A0F16;
  --on-soon: #0A0F16;
  --scrim: #0A0F1699;
  --soon: #FFB547;
  --stroke: #2B3748;
  --stroke-strong: #6B7A8E;
  --surface: #121A24;
  --surface-hi: #1B2533;
  --text: #EEF4FA;
  --text-dim: #A3B1C2;
  --text-faint: #8391A3;
}

/* key.zuxi.me pages, drawn on the "key.zuxi.me" page of the Watchy Figma file. Colors and focus
   come from the token variables above (generated). Dark is the default; Light follows the
   system; .theme-dark pins the art panel to Dark. Fonts are self-hosted (SIL OFL 1.1, see
   src/pages/fonts/OFL.txt). */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/pt-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/pt-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "PT Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/pt-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --font-display: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-text: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "PT Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --icon-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25' stroke='black' stroke-width='1.5'/%3E%3Crect x='7' y='4' width='2' height='5' rx='1' fill='black'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='black'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.5 12L13 4.5' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 var(--font-text);
}
[hidden] { display: none !important; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2 { font-family: var(--font-display); font-weight: 700; margin: 0; }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.15; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
.icon { flex: none; display: block; }

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus);
  outline-offset: var(--focus-gap);
}

/* ---- Split layout: art panel + content column ---------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(592px, 45fr);
}
.art {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px 64px;
  color: var(--text);
  /* Placeholder for the matchup art: surface-hi under the scrim. */
  background: linear-gradient(var(--scrim), var(--scrim)), var(--surface-hi);
}
.brand { color: inherit; display: block; width: max-content; border-radius: 4px; }
.brand svg { display: block; height: 50px; width: auto; }
.tagline { font: 700 44px/1.05 var(--font-display); max-width: 14em; }
.content {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 48px 96px;
}
.column { width: 100%; max-width: 400px; }

@media (max-width: 1100px) {
  .content { padding-inline: 48px; }
}
@media (max-width: 760px) {
  .split { display: block; }
  .art { position: static; height: 200px; min-height: 0; padding: 20px 24px 24px; }
  .brand svg { height: 30px; }
  .tagline { font-size: 24px; }
  .content { display: block; min-height: 0; padding: 32px 24px 48px; }
  .column { max-width: none; }
}

/* ---- Content groups ------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 760px) { .stack { gap: 24px; } }
.group { display: flex; flex-direction: column; gap: 12px; }
.group-tight { display: flex; flex-direction: column; gap: 8px; }
.heading-group { display: flex; flex-direction: column; gap: 8px; }
.intro { display: flex; flex-direction: column; gap: 12px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form > .btn, .form > .group-tight, .form > .row { margin-top: 12px; }
.buttons { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.signed-in { font-size: 14px; line-height: 1.45; color: var(--text-dim); }
.hint { font-size: 13px; line-height: 1.4; color: var(--text-faint); }
.field .hint { color: var(--text-dim); }
.body { color: var(--text-dim); }

.tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--text);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }

/* ---- Buttons --------------------------------------------------------------------------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn-icon { padding-left: 22px; }
.btn-hug { width: auto; min-height: 44px; padding: 0 26px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:active:not(:disabled) { background: var(--accent-dim); color: var(--text); }
.btn-secondary { background: var(--accent-dim); color: var(--text); }
.btn-secondary:active:not(:disabled) { background: var(--surface-hi); }
.btn-text {
  width: auto;
  min-height: 38px;
  padding: 10px 12px;
  background: transparent;
  color: var(--accent);
}
.btn-text:hover:not(:disabled) { background: var(--surface-hi); text-decoration: underline; }
.btn-danger { color: var(--error); }
.btn-center { align-self: center; }
.btn-start { align-self: flex-start; margin-left: -12px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface); color: var(--text-faint); cursor: default; }
.btn-text:disabled { background: transparent; }
.btn[aria-busy="true"] { cursor: progress; }

/* ---- Fields ---------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 14px; line-height: 1.45; color: var(--text-dim); }
input[type="text"], input[type="password"] {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--stroke-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 400 16px/1.45 var(--font-text);
}
input::placeholder { color: var(--text-dim); opacity: 1; }
input:disabled { border-color: var(--stroke); color: var(--text-faint); }
input[aria-invalid="true"] { border-color: var(--error); }
input.code {
  min-height: 64px;
  padding: 18px;
  font: 400 28px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
input.code::placeholder { color: var(--text-faint); }

/* Error line under a field and the alert box: the icon is drawn by CSS so the script only
   ever sets textContent. Both are empty (and take no room) until there is a message. */
.field-error, .alert-box, .status { display: flex; align-items: flex-start; }
.field-error:empty, .alert-box:empty, .status:empty { display: none; }
.field-error { gap: 6px; font-size: 13px; line-height: 16px; color: var(--error); }
.field-error::before, .alert-box::before, .status.done::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon-error) center / 16px no-repeat;
  mask: var(--icon-error) center / 16px no-repeat;
}
.alert-box {
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--error);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  line-height: 1.45;
}
.alert-box::before { color: var(--error); margin-top: 2px; }
.status { gap: 8px; font-size: 14px; line-height: 1.45; color: var(--text-dim); }
.status.done::before { color: var(--accent); margin-top: 2px; -webkit-mask-image: var(--icon-check); mask-image: var(--icon-check); }

.warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-hi);
  font-weight: 700;
  line-height: 1.35;
}
.warning .icon { margin-top: 2px; }

/* ---- Client and device card ------------------------------------------------------------- */
.device-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
}
.device-text { flex: 1; min-width: 0; }
.device-name { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.device-meta { font-size: 14px; color: var(--text-dim); }
.device-code { flex: none; font: 400 18px/1 var(--font-mono); letter-spacing: 0.08em; }

/* ---- /account ------------------------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 16px 52px 16px 64px;
  border-bottom: 1px solid var(--stroke);
}
.topbar .brand svg { height: 32px; }
.topbar-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { font-size: 14px; color: var(--text-dim); overflow-wrap: anywhere; }
.account {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 768px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
.account h1 { font-size: 32px; }
.section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-text { display: flex; flex-direction: column; gap: 4px; }
.section-text p { font-size: 14px; color: var(--text-dim); }
.panel {
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.list:empty { display: none; }
.list li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px 12px 14px 20px;
}
.list li + li { border-top: 1px solid var(--stroke); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 700; overflow-wrap: anywhere; }
.item-meta { font-size: 14px; color: var(--text-dim); }
.item-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.list li.empty { color: var(--text-dim); font-size: 14px; }
.list form.item-main { gap: 6px; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.dialog {
  width: min(440px, calc(100% - 48px));
  padding: 24px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}
.dialog::backdrop { background: var(--scrim); }
.dialog h2 { font-size: 22px; overflow-wrap: anywhere; }
.dialog p { margin-top: 8px; color: var(--text-dim); }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 24px; }

@media (max-width: 760px) {
  .topbar { padding: 14px 16px 14px 24px; min-height: 64px; }
  .who-prefix { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .account { padding: 32px 24px 64px; gap: 40px; }
  .section-head { flex-direction: column; align-items: stretch; }
  .section-head .btn-hug { align-self: flex-start; }
  .list li { padding-left: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 120ms ease, color 120ms ease; }
}
