/* Orbiq tokens: design-system/tokens and App/Design.swift. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/HankenGrotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink-950: #0b0b0c;
  --ink-900: #121214;
  --ink-850: #17171a;
  --ink-800: #1e1e22;
  --text-hi: #f3f3f1;
  --text-mid: #9e9ea3;
  --text-lo: #68686d;
  --line-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --lime: #c4ee4e;
  --lime-300: #dcf57a;
  --lime-soft: rgba(196, 238, 78, 0.14);
  --lime-line: rgba(196, 238, 78, 0.32);
  --amber: #efb141;
  --red: #f0564b;
  --red-soft: rgba(240, 86, 75, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family:
    "Hanken Grotesk",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--ink-950);
  color: var(--text-hi);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 22px 40px;
  background:
    radial-gradient(
      110% 60% at 50% -10%,
      rgba(196, 238, 78, 0.07) 0%,
      rgba(11, 11, 12, 0) 60%
    ),
    var(--ink-950);
}
main {
  max-width: 480px;
  margin: 0 auto;
}

/* Header */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(28px, 7vh, 88px);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.2em;
}
.brand .mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 16px rgba(196, 238, 78, 0.5);
}
.brand-context,
.brand span:not(.mark) {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Type */
h1 {
  font-size: clamp(34px, 8.5vw, 48px);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
h1:focus {
  outline: none;
}
h1.small {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
p {
  line-height: 1.55;
  margin: 0;
}
.lede {
  color: var(--text-mid);
  font-size: 17px;
  margin-bottom: 28px;
}
.lede strong {
  color: var(--text-hi);
  font-weight: 550;
  overflow-wrap: anywhere;
}
.step,
.micro,
legend {
  display: block;
  margin-bottom: 14px;
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fine {
  color: var(--text-lo);
  font-size: 13px;
  line-height: 1.5;
}
footer.fine {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Views */
.view {
  animation: enter 360ms var(--ease) both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Fields */
form {
  margin: 0;
}
label[for] {
  display: block;
  margin-bottom: 8px;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
}
input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  margin: 0 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--ink-850);
  color: inherit;
  font: inherit;
  font-size: 18px;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}
input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--lime-line);
  background: var(--ink-800);
  box-shadow: 0 0 0 4px var(--lime-soft);
}
input[aria-invalid="true"] {
  border-color: rgba(240, 86, 75, 0.6);
}
input.code {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}
input:disabled {
  opacity: 0.6;
}

/* Buttons */
button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button.primary,
button.secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 16px 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    transform 120ms ease,
    opacity 160ms ease,
    background-color 160ms ease;
}
button.primary {
  border: 0;
  background: var(--lime);
  color: var(--ink-950);
}
button.primary:hover:not(:disabled) {
  background: var(--lime-300);
}
button.secondary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-hi);
}
button.secondary:hover:not(:disabled) {
  background: var(--ink-850);
}
button.primary:active:not(:disabled),
button.secondary:active:not(:disabled) {
  transform: scale(0.98);
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button[aria-busy="true"] {
  opacity: 1;
  cursor: progress;
}
button[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}
button.link {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--lime);
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--lime-line);
  text-underline-offset: 4px;
}
button.link:hover:not(:disabled) {
  text-decoration-color: currentColor;
}
.switch {
  margin-top: 20px;
  color: var(--text-mid);
  font-size: 15px;
}
.row-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  margin-top: 12px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 440px) {
  .actions {
    grid-template-columns: 2fr 1fr;
  }
}

/* Notices */
.notice {
  margin: -6px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.notice.error {
  border: 1px solid rgba(240, 86, 75, 0.35);
  background: var(--red-soft);
  color: #ffb4ad;
}
.notice.info {
  border: 1px solid var(--line);
  background: var(--ink-900);
  color: var(--text-mid);
}
.actions + .notice,
#consent-error {
  margin: 20px 0 0;
}

/* Remember checkbox and suggestion checkbox */
label.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}
label.check small {
  display: block;
  margin-top: 2px;
  color: var(--text-lo);
  font-size: 13px;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--lime);
}

/* Signed-in account */
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--ink-900);
}
.account p {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.account .micro {
  margin-bottom: 2px;
  letter-spacing: 0.12em;
  font-size: 10px;
}
.account .link {
  flex-shrink: 0;
  font-size: 14px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime);
  font-weight: 600;
  text-transform: uppercase;
}
@media (max-width: 440px) {
  .account {
    flex-wrap: wrap;
  }
  .account .link {
    width: 100%;
    padding: 4px 0 0 48px;
    text-align: left;
    min-height: 32px;
  }
}

/* Native connection summary */
.summary {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}
.summary li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.4;
}
.summary li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

/* Agent categories */
fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  padding: 0;
}
.hint {
  margin-bottom: 16px;
  color: var(--text-mid);
  font-size: 14px;
}
.hint strong {
  color: var(--text-hi);
  font-weight: 600;
}
.grid {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--ink-900);
  overflow: hidden;
  margin-bottom: 18px;
}
.category {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas:
    "name view edit"
    "detail view edit";
  align-items: center;
  column-gap: 8px;
  padding: 14px 14px 14px 16px;
}
.category + .category {
  border-top: 1px solid var(--line-soft);
}
.category .name {
  grid-area: name;
  font-weight: 550;
}
.category .detail {
  grid-area: detail;
  margin-top: 2px;
  padding-right: 8px;
  color: var(--text-lo);
  font-size: 13px;
  line-height: 1.4;
}
@media (max-width: 420px) {
  .category {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "name name name"
      "detail detail detail"
      "view edit .";
    row-gap: 10px;
  }
  .category .detail {
    margin-top: -8px;
  }
}
.toggle:first-of-type {
  grid-area: view;
}
.toggle:last-of-type {
  grid-area: edit;
}
.toggle {
  position: relative;
  cursor: pointer;
}
.toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 68px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}
.toggle span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background-color 140ms ease;
}
.toggle input:checked + span {
  border-color: transparent;
  background: var(--lime);
  color: var(--ink-950);
}
.toggle input:checked + span::before {
  background: currentColor;
}
.toggle input:focus-visible + span {
  outline: 2px solid var(--lime-300);
  outline-offset: 2px;
}
.toggle input:disabled + span {
  opacity: 0.5;
}
#sharing-summary {
  display: block;
  margin-bottom: 6px;
  color: var(--text-hi);
  font-size: 15px;
  line-height: 1.45;
}
#identity-scopes {
  margin-top: 4px;
}

/* Waiting and finished states */
.waiting {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 0;
}
.waiting p {
  color: var(--text-mid);
  font-size: 17px;
}
#loading-text {
  color: var(--text-hi);
}
.spinner {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  border: 2.5px solid var(--lime-soft);
  border-top-color: var(--lime);
  animation: spin 800ms linear infinite;
}
.spinner.done {
  display: grid;
  place-items: center;
  border: 0;
  background: var(--lime);
  animation: pop 320ms var(--ease) both;
}
.spinner.done::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border: solid var(--ink-950);
  border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg);
}
.spinner.stopped {
  border: 0;
  background: var(--ink-800);
  animation: pop 320ms var(--ease) both;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
*:focus-visible {
  outline: 2px solid var(--lime-300);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .view,
  .spinner.done,
  .spinner.stopped {
    animation: none;
  }
  .spinner,
  button[aria-busy="true"]::before {
    animation-duration: 1.6s;
  }
}
