/* Jarvis · setup screens. A plain working page; Plan 2's core screen replaces this look.
   Same night-navy and ice-cyan palette as the core screen, so the two read as one product.
   Everything is self-hosted: the CSP allows no external font, image or style. */

@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #030811;
  --panel: rgba(9, 22, 40, .78);
  --line: rgba(111, 216, 255, .18);
  --line-strong: rgba(111, 216, 255, .45);
  --c: #6fd8ff;
  --txt: #def4ff;
  --soft: #9bb9cf;
  --dim: #6c8aa3;
  --amb: #ffb547;
  --go: #7fe0a0;
  --end: #ff7a6b;
  --gutter: 16px;
  --radius: 14px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% 0%, #0d2440 0%, #071225 45%, var(--night) 100%) fixed, var(--night);
  color: var(--txt);
  font-family: "Rubik", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) var(--gutter) calc(env(safe-area-inset-bottom) + 40px);
}

/* ---------- header ---------- */

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.brand img { flex: none; border-radius: 11px; }
.brand h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
.tagline { margin: 2px 0 0; font-size: 14px; color: var(--soft); }

/* ---------- cards ---------- */

.screen > * + * { margin-top: 14px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.card.accent { border-color: rgba(255, 181, 71, .45); }
.card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.card h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; color: var(--soft); }
.card p { margin: 0 0 12px; }
.card > :last-child { margin-bottom: 0; }

details.card > summary {
  cursor: pointer;
  font-weight: 600;
  list-style-position: inside;
  min-height: 28px;
}
details.card[open] > summary { margin-bottom: 10px; }

.muted { color: var(--dim); font-size: 14px; }
.center { text-align: center; }
.lead { font-size: 17px; font-weight: 500; }
.hint { margin: 6px 0 12px !important; font-size: 13px; color: var(--dim); }

/* ---------- form controls ---------- */

.field { display: block; margin: 12px 0 6px; font-size: 14px; color: var(--soft); }
input[type="text"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(3, 8, 17, .7);
  font-size: 17px;
}
input[type="text"][dir="ltr"] { text-align: left; letter-spacing: .04em; }
input[type="text"]::placeholder { color: var(--dim); opacity: .7; }
input[type="text"] + button { margin-top: 12px; }

button {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
}
button.primary {
  width: 100%;
  background: var(--c);
  border-color: var(--c);
  color: #04121f;
  font-weight: 600;
}
button.quiet { color: var(--c); }
button.link {
  min-height: 44px;
  padding: 8px 2px;
  border: 0;
  color: var(--c);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}
button:disabled { opacity: .5; cursor: progress; }
button:not(:disabled):active { transform: translateY(1px); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions > button { flex: 1 1 160px; }

/* ---------- codes: fingerprint and pairing code ---------- */

.fp, .code {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  border-radius: 10px;
  background: rgba(3, 8, 17, .65);
  border: 1px dashed var(--line-strong);
  padding: 14px 10px;
}
.fp { font-size: 20px; font-weight: 500; letter-spacing: .04em; line-height: 1.7; color: var(--c); }
.fp > span { display: block; white-space: nowrap; }
.fp.check { color: var(--amb); }
.code { font-size: 22px; font-weight: 600; letter-spacing: .08em; color: var(--amb); }
#first-fp { font-size: 22px; }

code {
  font-family: inherit;
  font-weight: 600;
  color: var(--c);
  unicode-bidi: isolate;
}

.steps { margin: 14px 0; padding-inline-start: 22px; }
.steps li { margin-bottom: 6px; }
.pairing { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }

/* ---------- lists ---------- */

.list { list-style: none; margin: 0 0 12px; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:first-child { padding-top: 4px; }
.list > li:last-child { border-bottom: 0; }
.row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; }
.row-title .tag { font-weight: 400; font-size: 13px; color: var(--dim); }
.row-path {
  margin: 2px 0 0;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-size: 13px;
  color: var(--soft);
  overflow-wrap: anywhere;
}
.row-meta { margin: 2px 0 8px; font-size: 13px; color: var(--dim); }
.row-code { margin: 8px 0 12px !important; font-size: 19px; }
.list button { width: 100%; }

/* ---------- results ---------- */

.result { margin: 10px 0 0; font-size: 15px; min-height: 0; }
.result:empty { display: none; }
.result.ok { color: var(--go); }
.result.error { color: var(--end); }
.result.busy { color: var(--soft); }

a.back { color: var(--c); text-underline-offset: 3px; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--dim);
}
