/* Shared look of the activation page and the installer: the handeos.com website (the page is a desk, the device is the only dark thing on it).
   These pages are also served at barisblt.com/hande/, so nothing here is loaded from handeos.com: the fonts are in ./fonts/ and are
   named relative to this file (the Worker's CSP carries font-src 'self' for them). Tokens and values are copied from the website's site.css. */

@font-face { font-family: 'Montserrat'; src: url('fonts/montserrat.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Orbitron'; src: url('fonts/orbitron.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Material Symbols'; src: url('fonts/material-symbols.woff2') format('woff2'); font-weight: 100 700; font-display: block; }

:root {
  --desk: #d9dcde;
  --desk-deep: #c9cdd0;
  --ink: #1b1e23;
  --graphite: #5a6068;
  --hairline: #b9bec3;
  --paper: #e9ebec;
  --field: #f4f5f6;         /* text fields and quiet boxes sunk into a paper card */
  --accent: #00ffff;
  --accent-ink: #00757a;    /* a readable version of the accent on the desk */
  --ok: #0b6b3b; --err: #a5231b; --warn: #7a5200;   /* states, dark enough to read on the desk and on paper */
  --measure: 34rem;
  font-size: 106.25%;       /* 17 px */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 1rem/1.6 Montserrat, system-ui, sans-serif;
  font-feature-settings: 'tnum' 0;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wordmark { font: 500 1.35rem/1 Orbitron, sans-serif; letter-spacing: 0.04em; text-decoration: none; }

/* ---- top bar and footer: the website's ---------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--desk) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent);
}
.bar nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; font-size: 0.94rem; }
.bar nav a { text-decoration: none; color: var(--graphite); }
.bar nav a:hover { color: var(--ink); }
/* Buy is the website's pill (handeos.com css/site.css) */
.bar .primary-link { color: var(--desk); background: var(--ink); font-weight: 600; padding: 0.35rem 0.95rem; border-radius: 999px; }
.bar .primary-link:hover { color: var(--desk); filter: brightness(1.15); }

.site-footer { border-top: 1px solid var(--hairline); }
.band-inner { max-width: 82rem; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem) 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center; font-size: 0.9rem; color: var(--graphite); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-left: auto; }

/* ---- the page: a text column, like the website's support page ------------------------ */
main { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem) 4rem; }
h1 {
  font-weight: 650;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 1.4rem;
}
.lead { font-size: 1.12rem; max-width: var(--measure); margin: 0 0 1.2rem; }
.crosslink { max-width: var(--measure); margin: 0 0 2.2rem; color: var(--graphite); }
.crosslink a { color: var(--ink); font-weight: 600; }

/* a step is a paper card on the desk */
.step { background: var(--paper); border: 1px solid color-mix(in srgb, var(--hairline) 70%, transparent); border-radius: 1.1rem;
  padding: 1.4rem 1.5rem 1.5rem; margin-bottom: 1rem; }
h2 { margin: 0 0 .4rem; font-weight: 650; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; display: flex; align-items: baseline; gap: .6rem; }
.num { font: 600 1rem Orbitron, sans-serif; color: var(--graphite); }
.hint { margin: 0 0 1rem; color: var(--graphite); font-size: .95rem; max-width: 40rem; }
strong { font-weight: 650; }
code { font-size: 0.92em; background: var(--field); padding: 0.1em 0.35em; border-radius: 4px; }

/* forms */
label { display: block; margin-bottom: .35rem; font-size: .9rem; color: var(--graphite); }
input { width: 100%; padding: .75rem .95rem; margin-bottom: .9rem; border-radius: .8rem; font: inherit; letter-spacing: .04em;
  background: var(--field); color: var(--ink); border: 1.5px solid var(--hairline); }
input:focus-visible { border-radius: .8rem; }
input:disabled { opacity: .5; }
input::placeholder { color: var(--graphite); opacity: .75; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .8rem 1.3rem; border-radius: 999px;
  font: 600 .95rem Montserrat, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--desk);
}
button:hover:not(:disabled) { filter: brightness(1.12); }
button:focus-visible { border-radius: 999px; }
button:disabled { opacity: .45; cursor: not-allowed; }

.device { margin: 1rem 0 0; display: grid; gap: .4rem; }
.device div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--hairline); padding-top: .4rem; }
dt { color: var(--graphite); font-size: .9rem; }
dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; text-align: right; }

.msg { margin: .8rem 0 0; font-size: .95rem; }
.msg:empty { margin: 0; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--err); }
/* activation page: the small "Copy" beside the Board ID */
.device .copy-btn { min-height: 2rem; padding: .25rem .8rem; margin-left: .5rem; font-size: .8rem; background: transparent; color: var(--ink); vertical-align: middle; }
.id-match { margin: .5rem 0 0; font-size: .85rem; text-align: right; }
/* activation page: the "Board ID matches" tick box (the shared `input` rule is for text fields, so undo it here) */
#id-confirm { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 1rem; color: var(--ink); font-size: 1rem; cursor: pointer; }
#id-confirm[hidden] { display: none; }
#id-confirm input { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; padding: 0; flex: none; accent-color: var(--ink); }

/* activation page: the lasting result once the key is linked but the board has not unlocked yet */
.linked { margin-top: 1rem; border: 1px solid var(--ok); border-radius: .8rem; padding: .9rem 1rem;
  background: color-mix(in srgb, var(--ok) 7%, var(--paper)); }
.linked p { margin: 0 0 .6rem; color: var(--graphite); }
.linked .linked-title { color: var(--ink); font-weight: 600; }
.linked.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--paper)); }
.linked button { background: transparent; color: var(--ink); }
.linked .choice { display: flex; flex-wrap: wrap; gap: .6rem; }

/* notices: the warm box; an icon from the Material Symbols subset leads it */
.notice { border: 1px solid var(--warn); color: var(--warn); border-radius: .8rem; padding: .75rem 1rem; margin-bottom: 1rem;
  background: color-mix(in srgb, currentColor 7%, var(--paper)); }
.notice::before { content: '\e88e'; font: 400 1.25rem/1 'Material Symbols'; vertical-align: -.22em; margin-right: .5rem; }
.notice.err { border-color: var(--err); color: var(--err); }
.notice.ok { border-color: var(--ok); color: var(--ok); }
.notice.ok::before { content: '\e668'; }
.notice strong { color: var(--ink); }

main footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--hairline); color: var(--graphite); font-size: .85rem; }
main footer p { margin: 0; max-width: 40rem; }

@media (max-width: 880px) {
  .bar { gap: 1rem; }
  .bar nav { gap: 1rem; }
  .bar nav a:not(.primary-link):not(.keep) { display: none; } /* a phone keeps Install, Activate and Buy */
  .site-footer nav { margin-left: 0; }
}
@media (max-width: 380px) {
  .bar nav { gap: 0.8rem; font-size: 0.9rem; }
  .bar .primary-link { padding: 0.3rem 0.8rem; }
}
