/* Connect-your-accounts, in the main site's visual language.
 *
 * Deliberately NOT base.css. The candidate page is blue-slate and sans because
 * it sits around a video feed; this page is one a recruiter arrives at from
 * lab352.com, so it reads as the same product they were just looking at —
 * black ground, monospace, Special Elite for headings.
 *
 * Two languages, chosen rather than inherited: one for pages you look at, one
 * for pages you operate.
 *
 * SPECIAL ELITE IS SELF-HOSTED, and that is a CSP decision rather than a
 * performance one. server.js sets style-src 'self' and font-src 'self' data:,
 * so a Google Fonts <link> is blocked twice over — once for the stylesheet and
 * once for the woff2. Loosening either would loosen it for every page,
 * including the one running the Zoom SDK. The font is SIL Open Font Licensed,
 * so serving our own copy is permitted and costs one request.
 */

@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/special-elite-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/special-elite-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The site's palette, from main_website/style.css. */
:root {
  --bg:     #000000;
  --ink:    #ffffff;
  --muted:  #b2b1b1;
  --faint:  #7d7c7c;
  --line:   rgba(255,255,255,.16);
  --line-soft: rgba(255,255,255,.07);
  --panel:  #0b0b0b;
  --ok:     #6bcf7f;
  --warn:   #ffcc8a;
  --bad:    #ff8f7d;
  --display: 'Special Elite', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: monospace;
  font-size: 14px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}

/* ── Chrome ────────────────────────────────────────────────────────────────*/
.topbar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .5px;
}
.topbar .spacer { flex: 1; }
.topbar a { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--ink); }

/* ── Document ──────────────────────────────────────────────────────────────*/
.doc {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 44px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

h1 {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: .5px;
  margin: 0;
}
.sub { color: var(--muted); margin: -10px 0 0; }

/* ── Form ──────────────────────────────────────────────────────────────────*/
form { display: grid; gap: 12px; max-width: 25rem; }

label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

input {
  padding: 9px 11px;
  border-radius: 6px;
  border: 1px solid #333;
  background: var(--panel);
  color: var(--ink);
  font-family: monospace;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
}
input::placeholder { color: var(--faint); }
input:focus-visible { outline: none; border-color: #bbb; }

button, .btn {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 6px;
  border: 1px solid #bbb;
  background: transparent;
  color: var(--ink);
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .btn:hover { border-color: var(--ink); }
button:disabled { opacity: .5; cursor: default; }
/* No primary here. Zoom was filled and Google outlined, to say that one is
   required and the other is not — but that reads as two different kinds of
   button rather than one emphasis, and the REQUIRED badge already says it in
   words. Two equal actions, styled equally. */
.btn.done { border-color: #333; color: var(--muted); }

/* ── The two connections ───────────────────────────────────────────────────*/
.cards { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cardhead { display: flex; align-items: center; gap: 9px; }
.cardhead h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .3px;
  margin: 0;
  flex: 1;
}

/* Grey until checked — colour is a claim, and before the check we have none. */
.dot { width: 9px; height: 9px; border-radius: 50%; background: #444; flex: none; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--bad); }
.dot.warn { background: var(--warn); }

.need {
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid #555;
  border-radius: 3px;
  padding: 3px 6px;
  color: var(--ink);
}
.need.soft { color: var(--faint); border-color: #2a2a2a; }

.state { font-size: 12.5px; margin: 0; }
.state:empty { display: none; }
.state .who { color: var(--muted); }
.card .btn { margin-top: auto; align-self: flex-start; }

.err { color: var(--bad); margin: 0; font-size: 13px; }

/* ── Afterwards ────────────────────────────────────────────────────────────*/
.more { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 6px; }
.more > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.more ol { margin: 12px 0 0; padding-left: 22px; color: var(--muted); font-size: 13px; }
.more li { margin-bottom: 8px; }
.more strong { color: var(--ink); }

/* Shown while a connect tab is open. Removed as soon as the connection
   appears, or after two minutes if it never does. */
.watching {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ── The key form ──────────────────────────────────────────────────────────
   Referenced by setup.html since the card was added, never defined — so the
   bare `form` rule above applied and stacked the field over the button in a
   25rem column, which in a card that wide read as two unrelated controls.

   Flex rather than grid: the visually-hidden label is a third child, and out of
   flow, so a two-column grid would have allocated it a track anyway. */
.keyform {
  display: flex;
  gap: 8px;
  max-width: none;
}
.keyform input { flex: 1; min-width: 0; }
/* Undoes `.card .btn { margin-top: auto }`, which pushes a button to the bottom
   of the card — right for the connect cards, wrong for one sitting in a row. */
.keyform .btn { flex: none; margin-top: 0; }

/* Visible to a screen reader, not on screen. The key field has a placeholder
   and a heading above it, so a visible label would be the same words a third
   time — but a form control with no label at all is not navigable. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── Try it ────────────────────────────────────────────────────────────────*/
#testCard .btn { margin-top: 0; }

.testrow { display: flex; gap: 8px; }
/* Monospace and slightly smaller: this is a URL to be checked character by
   character against one somebody else received, not prose. */
.testrow input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.testrow .btn { flex: none; }

/* Test mode leaves one connection card. Full width, so a deliberately shorter
   page does not read as a broken two-column one. */
.cards.solo { grid-template-columns: 1fr; }
