:root {
  --ink: #071b35;
  --blue: #0b315e;
  --paper: #f8f5ed;
  --aqua: #a7f3d0;
  --mint: #dff9eb;
  --coral: #ff8b75;
  --line: rgba(7, 27, 53, 0.16);
  --display: Georgia, 'Times New Roman', serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 94%, rgba(167, 243, 208, 0.22), transparent 28rem),
    var(--paper);
  font-family: var(--body);
}

button, input { font: inherit; }
.optional { color: #74808f; font-size: .72rem; font-weight: 600; }

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--aqua);
}

.skip-link:focus { top: 1rem; }

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(24rem, .88fr);
  min-height: 100vh;
}

.intro {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 6.25rem) clamp(1.5rem, 8vw, 9rem);
  background: var(--ink);
  color: var(--paper);
}

.intro::before {
  position: absolute;
  right: -7rem;
  bottom: -10rem;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(167, 243, 208, .34);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(167, 243, 208, .04), 0 0 0 8rem rgba(167, 243, 208, .03);
  content: '';
}

.brand, .eyebrow { letter-spacing: .13em; font-size: .72rem; font-weight: 800; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--aqua); }
.brand-mark { display: grid; width: 1.85rem; height: 1.85rem; place-items: center; color: var(--ink); background: var(--aqua); clip-path: polygon(0 0, 100% 50%, 0 100%); font-size: .65rem; }
.intro > .eyebrow { margin: clamp(5rem, 14vh, 10rem) 0 1rem; color: var(--aqua); }

h1, h2, p { margin-top: 0; }
h1 { max-width: 9ch; margin-bottom: 1.4rem; font-family: var(--display); font-size: clamp(3.6rem, 7vw, 7.2rem); line-height: .88; letter-spacing: -.065em; font-weight: 500; }
h1 em { color: var(--aqua); font-weight: 400; }
.lead { position: relative; max-width: 30rem; color: rgba(248, 245, 237, .76); font-size: 1.02rem; line-height: 1.7; }

.steps { position: relative; display: grid; gap: 1rem; max-width: 31rem; margin: clamp(3rem, 11vh, 7rem) 0 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { display: grid; grid-template-columns: 2.6rem 1fr; align-items: center; min-height: 2.7rem; border-top: 1px solid rgba(248, 245, 237, .2); color: rgba(248, 245, 237, .76); font-size: .88rem; }
.steps span { color: var(--coral); font: .78rem ui-monospace, SFMono-Regular, Menlo, monospace; }

.panel { padding: clamp(2rem, 7vw, 6.25rem) clamp(1.5rem, 7vw, 7rem); background: var(--paper); }
.panel-header { max-width: 26rem; }
.panel .eyebrow { margin-bottom: 1rem; color: #2d7268; }
h2 { margin-bottom: .6rem; font-family: var(--display); font-size: clamp(2.3rem, 4vw, 4.2rem); line-height: .94; letter-spacing: -.055em; font-weight: 500; }
.panel-header > p:last-child { color: #5b6878; line-height: 1.55; }
form { max-width: 30rem; margin-top: 2.75rem; }
label { display: block; margin: 1.35rem 0 .55rem; font-size: .82rem; font-weight: 800; letter-spacing: .03em; }
input { width: 100%; min-height: 3.65rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 0; outline: none; color: var(--ink); background: #fffdf8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
input::placeholder { color: #9ba5af; }
input:focus { border-color: #2d7268; box-shadow: 0 0 0 3px rgba(45, 114, 104, .16); }
button { display: flex; width: 100%; min-height: 3.7rem; align-items: center; justify-content: space-between; margin-top: 2rem; padding: 0 1.2rem; border: 0; color: var(--ink); background: var(--aqua); cursor: pointer; font-weight: 850; transition: transform .2s ease, background .2s ease; }
button:hover { background: #8de8c0; transform: translateY(-2px); }
button:focus-visible, .remove-device:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .7; transform: none; }
.form-note { margin: 1rem 0 0; color: #647080; font-size: .79rem; line-height: 1.55; }
.status { min-height: 1.5rem; margin: 1rem 0 0; color: #245d55; font-size: .9rem; font-weight: 700; }
.status.is-error { color: #a23527; }

.text-button { display:inline-flex; width:auto; min-height:0; margin:1rem 0 0; padding:0; border:0; color:#2d7268; background:transparent; font-size:.8rem; font-weight:800; text-decoration:underline; text-underline-offset:.24rem; }
.text-button:hover { color:#0b315e; background:transparent; transform:none; }
.quick-access { max-width:30rem; margin-top:2.5rem; padding-top:1.8rem; border-top:1px solid var(--line); }
.quick-access .eyebrow { margin-bottom:.7rem; color:#c75445; }
.quick-access h3 { margin:0 0 .5rem; font-family:var(--display); font-size:2rem; font-weight:500; letter-spacing:-.04em; }
.quick-access > p:not(.eyebrow) { margin:0; color:#647080; font-size:.84rem; line-height:1.55; }
.quick-access form { margin-top:1.25rem; }
.quick-access label { margin-top:1rem; }
.quick-button { color:var(--paper); background:var(--ink); }
.quick-button:hover { background:var(--blue); }

.devices { max-width: 34rem; margin-top: 3.8rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.devices-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.devices h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.25rem); }
.device-count { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 50%; color: var(--ink); background: var(--coral); font: 1rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.devices-list { display: grid; gap: .75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.device { display: grid; grid-template-columns: 1fr auto; gap: .7rem; align-items: center; padding: 1rem; border: 1px solid var(--line); background: rgba(255,255,255,.43); }
.device-name { margin: 0 0 .25rem; font-weight: 800; }
.device-meta { margin: 0; color: #657182; font: .74rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.remove-device { border: 0; color: #8c3b31; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 800; text-decoration: underline; text-underline-offset: .22rem; }

@media (max-width: 760px) {
  .shell { display: block; }
  .intro { min-height: auto; padding-bottom: 3.5rem; }
  .intro > .eyebrow { margin-top: 4rem; }
  .steps { margin-top: 3.5rem; }
  .panel { padding-top: 3.5rem; padding-bottom: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
