
:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5e6d64;
  --paper: #f7f2e8;
  --line: #d9d2c2;
  --forest: #164a38;
  --forest-bright: #1f6a4f;
  --ember: #d45b37;
  --shadow: 0 28px 80px rgba(24, 37, 30, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(212, 91, 55, 0.2), transparent 28rem),
    radial-gradient(circle at 92% 85%, rgba(31, 106, 79, 0.23), transparent 32rem),
    linear-gradient(135deg, #eee6d6, #fbf8f1 46%, #e7eee8);
  font-family: "Avenir Next", "Century Gothic", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(var(--forest) 1px, transparent 1px),
    linear-gradient(90deg, var(--forest) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom right, black, transparent 70%);
}

.shell {
  width: min(92vw, 580px);
  margin: 0 auto;
  padding: clamp(28px, 8vh, 88px) 0 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px 4px;
  color: var(--forest);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px 3px 10px 3px;
  color: var(--paper);
  background: var(--forest);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.card {
  position: relative;
  padding: clamp(28px, 6vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 28, 0.13);
  border-radius: 4px 28px 4px 28px;
  background: rgba(247, 242, 232, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: arrive 480ms cubic-bezier(.2,.8,.2,1) both;
}

.card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 92px;
  height: 7px;
  content: "";
  background: var(--ember);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--ember);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lede {
  margin: 24px 0 30px;
  color: var(--muted);
  line-height: 1.65;
}

.lede strong {
  color: var(--ink);
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px 12px 3px 12px;
  padding: 15px 16px;
  outline: none;
  color: var(--ink);
  background: #fffdf8;
  font: inherit;
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: var(--forest-bright);
  box-shadow: 0 0 0 4px rgba(31, 106, 79, 0.12);
}

input::placeholder {
  color: #929b95;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 3px 12px 3px 12px;
  padding: 0 20px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: transform 150ms ease, background 150ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(212, 91, 55, 0.42);
  outline-offset: 3px;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: white;
  background: var(--forest);
}

.primary:hover {
  background: var(--forest-bright);
}

.primary::after {
  content: "→";
  font-size: 1.15rem;
}

.secondary {
  color: var(--forest);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

[role="alert"] {
  margin: 0 0 20px;
  border-left: 3px solid var(--ember);
  padding: 10px 12px;
  color: #7b2f1d;
  background: rgba(212, 91, 55, 0.09);
}

.hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.progress {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  width: min(100%, 240px);
  margin: 22px 0 8px;
}

.progress span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #fffdf8;
  font-size: 0.78rem;
  font-weight: 800;
}

.progress i {
  height: 1px;
  background: var(--line);
}

.progress .active,
.progress .complete {
  border-color: var(--forest);
  color: #fff;
  background: var(--forest);
}

.progress i.complete {
  background: var(--forest);
}

.qr-panel {
  display: grid;
  gap: 16px;
  margin: 0 0 26px;
}

.qr-panel img {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px 20px 4px 20px;
  padding: 10px;
  background: #fffdf8;
  box-shadow: 0 12px 34px rgba(24, 37, 30, 0.11);
}

.manual-key {
  display: grid;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 3px 12px 3px 12px;
  padding: 14px 16px;
  text-align: center;
}

.manual-key span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-key code {
  overflow-wrap: anywhere;
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.scopes {
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.scopes li {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 9px 14px;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.7);
  font-size: 0.86rem;
}

.scopes li::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  content: "";
  background: var(--ember);
}

.callback {
  display: grid;
  gap: 7px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.76rem;
}

.callback code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.72rem;
}

footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.73rem;
}

.signal {
  position: fixed;
  right: clamp(18px, 4vw, 60px);
  bottom: 28px;
  display: flex;
  align-items: end;
  gap: 5px;
  height: 30px;
}

.signal span {
  width: 5px;
  border-radius: 4px;
  background: var(--forest);
  animation: signal 1.3s ease-in-out infinite alternate;
}

.signal span:nth-child(1) { height: 35%; }
.signal span:nth-child(2) { height: 70%; animation-delay: 140ms; }
.signal span:nth-child(3) { height: 100%; animation-delay: 280ms; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes signal {
  to { opacity: 0.35; transform: scaleY(0.72); }
}

@media (max-width: 520px) {
  .shell {
    width: min(94vw, 580px);
    padding-top: 24px;
  }

  .card {
    border-radius: 3px 20px 3px 20px;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Corporate interaction surface (v3). Kept after the original rules so that
   every existing form shares the updated layout and accessibility states. */
:root {
  --ink: #132235;
  --muted: #617187;
  --paper: #ffffff;
  --line: #d8e1eb;
  --forest: #092640;
  --forest-bright: #0b5cab;
  --ember: #0b5cab;
  --shadow: 0 18px 50px rgba(10, 37, 63, .12);
}

body { background: linear-gradient(122deg, #e9f1f8 0%, #f4f7fa 48%, #edf3f8 100%); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body::before { width: 100%; height: 6px; opacity: 1; background: linear-gradient(90deg, #06467f, #1682ce, #15805d); background-image: linear-gradient(90deg, #06467f, #1682ce, #15805d); mask-image: none; }
.page { width: min(94vw, 1040px); margin: 0 auto; padding: 28px 0 34px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--forest); text-decoration: none; }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 38px; height: 38px; padding: 8px; border-radius: 8px; background: var(--forest); }
.brand-mark i { display: block; width: 5px; border-radius: 2px; background: #fff; }
.brand-mark i:nth-child(1) { height: 10px; opacity: .72; }.brand-mark i:nth-child(2) { height: 17px; }.brand-mark i:nth-child(3) { height: 23px; background: #63c3ee; }
.brand-copy { display: grid; gap: 1px; }.brand-copy strong { font-size: 1rem; letter-spacing: -.02em; }.brand-copy small { color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.secure-badge { display: inline-flex; align-items: center; gap: 7px; color: #15805d; font-size: .75rem; font-weight: 700; }.secure-badge span { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: #15805d; font-size: .67rem; }
.content { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr); align-items: stretch; box-shadow: var(--shadow); }
.context-panel { display: grid; align-content: center; gap: 16px; min-height: 580px; padding: 48px; color: #fff; background: linear-gradient(155deg, #092640, #0e4877); }.context-panel::after { width: 74px; height: 3px; content: ""; background: #63c3ee; }.context-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; color: #7cd2f5; font-size: 1.4rem; }.context-panel p { margin: 10px 0 0; color: #94cce9; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.context-panel h2 { max-width: 13ch; margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }.context-panel > span:last-child { max-width: 26ch; color: #c6ddec; font-size: .9rem; line-height: 1.6; }
.card { min-width: 0; padding: clamp(32px, 5vw, 58px); border: 0; border-radius: 0; background: var(--paper); box-shadow: none; backdrop-filter: none; }.card::after { display: none; }.eyebrow { color: #0b5cab; }.card h1 { max-width: none; color: #092640; font-family: inherit; font-size: clamp(1.9rem, 4vw, 2.65rem); font-weight: 750; line-height: 1.12; letter-spacing: -.045em; }
input { border-radius: 6px; background: #fff; }.primary, .secondary { border-radius: 6px; }.primary { background: #0b5cab; box-shadow: 0 7px 14px rgba(11,92,171,.2); }.primary:hover { background: #06467f; }.secondary { color: #06467f; background: #fff; }.manual-key, .qr-panel img { border-radius: 8px; }
.connection-summary { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fbfdff; }.connection-summary > span:not(.client-avatar):not(.connection-arrow) { display: grid; min-width: 0; gap: 3px; }.connection-summary small { overflow: hidden; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }.connection-summary strong { overflow: hidden; color: var(--forest); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }.client-avatar { display: grid; flex: 0 0 auto; width: 32px; height: 32px; place-items: center; border-radius: 7px; color: #06467f; background: #dceefa; font-size: .84rem; font-weight: 800; }.connection-arrow { color: #8ba1b4; font-size: 1.15rem; }
.permissions { margin: 0 0 22px; }.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--forest); }.section-icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 5px; color: #0b5cab; background: #e4f0f9; font-size: .85rem; }.section-heading h2 { font-size: .92rem; }.scopes { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }.permission-card { display: flex; align-items: flex-start; gap: 11px; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 12px; color: inherit; background: #fff; font-size: inherit; }.permission-card::before { display: none; }.permission-icon { display: grid; flex: 0 0 auto; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #fff; background: #15805d; font-size: .7rem; font-weight: 800; }.permission-card > span:last-child { display: grid; gap: 3px; }.permission-card strong { color: var(--ink); font-size: .86rem; }.permission-card small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.callback { border-left: 3px solid #c9d9e8; padding-left: 10px; }.legal { margin: 21px 0 0; color: #77889b; font-size: .7rem; text-align: center; }.signal { display: none; }
@media (max-width: 760px) { .page { width: min(100%, 620px); padding: 20px 16px 28px; }.topbar { margin-bottom: 24px; }.content { display: block; box-shadow: 0 12px 32px rgba(10,37,63,.1); }.context-panel { display: none; }.card { padding: 30px 23px; } }
@media (max-width: 430px) { .brand-copy small, .secure-badge { display: none; }.connection-summary { flex-wrap: wrap; }.connection-arrow { display: none; } }
