/* hopli — phone shell
   One accent colour, flat surfaces, no glows. Icons are stroked SVG inheriting
   currentColor, so they stay legible in both themes and at any size. */

:root {
  --bg:     #f6f6f4;
  --panel:  #ffffff;
  --ink:    #16171a;
  --muted:  #6d6a64;
  --faint:  #9a968e;
  --line:   #e4e1db;
  --track:  #edeae4;
  --accent: #2f6f4f;
  --ok:     #1f7a4d;
  --bad:    #b3261e;
  --wait:   #8a6d15;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:     #121311;
    --panel:  #1b1d1a;
    --ink:    #eceae5;
    --muted:  #97938a;
    --faint:  #6f6c65;
    --line:   #2c2f2b;
    --track:  #272a26;
    --accent: #7fc4a0;
    --ok:     #6ecf9b;
    --bad:    #ff8a80;
    --wait:   #e0c060;
  }
}
:root[data-theme="dark"] {
  --bg:     #121311;
  --panel:  #1b1d1a;
  --ink:    #eceae5;
  --muted:  #97938a;
  --faint:  #6f6c65;
  --line:   #2c2f2b;
  --track:  #272a26;
  --accent: #7fc4a0;
  --ok:     #6ecf9b;
  --bad:    #ff8a80;
  --wait:   #e0c060;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 18px 48px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 540px; margin: 0 auto; }

.head { margin-bottom: 22px; }
h1 {
  font-size: 21px; font-weight: 650; margin: 0;
  letter-spacing: -0.02em;
}
.sub { color: var(--muted); font-size: 13px; margin: 1px 0 0; }

/* ---- Icons -------------------------------------------------------------- */

.i { width: 20px; height: 20px; flex: none; display: block; }
.i.lg { width: 26px; height: 26px; }

/* ---- Cards -------------------------------------------------------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 11px;
}
.card h2 {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.085em;
  color: var(--faint); margin: 0 0 12px;
}

.dim { color: var(--muted); }
.small { font-size: 13px; }
.lead p { margin: 0 0 8px; }
.lead p:last-child, .card p:last-child { margin-bottom: 0; }

.steps { margin: 0; padding-left: 19px; }
.steps li { margin-bottom: 5px; }
.steps li:last-child { margin-bottom: 0; }
.steps code, code {
  font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--track); padding: 1.5px 5px; border-radius: 5px;
}

/* ---- Connection --------------------------------------------------------- */

.path { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.path .line {
  flex: 1; height: 2px; background: var(--line); border-radius: 2px;
  transition: background .2s;
}
.path .line.live { background: var(--accent); }
.meta { margin-top: 10px; font-size: 13px; color: var(--muted); }
.meta code { font-size: 12px; word-break: break-all; }
.absent { color: var(--faint); font-size: 12px; margin-top: 3px; }

/* ---- Pairing fingerprint ------------------------------------------------ */

#fp {
  font: 600 32px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 10px 0 14px;
}
#pairing.ok  { border-color: var(--ok); }
#pairing.bad { border-color: var(--bad); }
#pairing.bad #pairstatus { color: var(--bad); }

/* ---- Counters ----------------------------------------------------------- */

.counters { display: flex; gap: 20px; flex-wrap: wrap; }
.counters div { font-size: 12px; color: var(--muted); }
.counters b {
  display: block; font-size: 19px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---- Drop zone ---------------------------------------------------------- */

#drop {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 18px 16px; text-align: left;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
#drop b { color: var(--ink); font-weight: 600; }
#drop:hover { border-color: var(--accent); }
#drop.hot { border-color: var(--accent); background: var(--track); }
#drop.off { opacity: .4; pointer-events: none; }
#pick { display: none; }

/* ---- Transfer rows ------------------------------------------------------ */

.file { margin-top: 14px; font-size: 13px; }
.file .row1 { display: flex; justify-content: space-between; gap: 12px; }
.file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .pc {
  color: var(--muted); flex: none; font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.file .rmeta {
  color: var(--faint); font-size: 11.5px; margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bar {
  height: 3px; background: var(--track); border-radius: 3px;
  margin-top: 7px; overflow: hidden;
}
.bar i {
  display: block; height: 100%; width: 0; background: var(--accent);
  transition: width .12s linear;
}
.file.done .bar i { background: var(--ok); }
.file.err  .bar i { background: var(--bad); }
.file.err  .pc, .file.err .rmeta { color: var(--bad); }

/* ---- Incoming offers ---------------------------------------------------- */

.offer {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; margin-top: 11px;
}
.offer .on { font-weight: 600; font-size: 14px; word-break: break-all; }
.offer .os {
  color: var(--muted); font-size: 12px; margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.offer.done { border-color: var(--ok); }
.offer.done .os { color: var(--ok); }
.offer.err  { border-color: var(--bad); }
.offer.err  .os { color: var(--bad); }
.offer .bar { margin-top: 11px; }

.btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btns button {
  font: 600 13px ui-sans-serif, system-ui, sans-serif;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 9px; padding: 9px 15px; cursor: pointer;
  transition: border-color .15s;
}
.btns button:hover:not(:disabled) { border-color: var(--accent); }
.btns button.go {
  background: var(--accent); border-color: transparent; color: var(--bg);
}
.btns button:disabled { opacity: .4; cursor: default; }

/* ---- Log ---------------------------------------------------------------- */

#log {
  font: 11.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word;
  max-height: 190px; overflow-y: auto; margin: 0;
}
#log .t { color: var(--faint); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.wait { color: var(--wait); }

[hidden] { display: none !important; }

/* ---- Footer ------------------------------------------------------------- */

.foot {
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.head a { color: var(--muted); text-decoration: none; }
.head a:hover { text-decoration: underline; }
