:root {
  --ink: #1b1a24;
  --muted: #625d69;
  --paper: #f5f0e7;
  --paper-deep: #e9e0d3;
  --line: rgba(27, 26, 36, 0.17);
  --lime: #c9ff51;
  --lilac: #b8a7ff;
  --coral: #ff7077;
  --violet: #6b51ce;
  --blue: #b9d9f5;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 87% 8%, rgba(184, 167, 255, 0.25), transparent 26rem),
    var(--paper);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 4px;
}

button,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(100% - 2rem, 1240px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-transform: lowercase;
}

.wordmark strong {
  padding: 0.2rem 0.35rem 0.25rem;
  background: var(--lime);
  font-size: 0.86rem;
  line-height: 1;
}

.wordmark i {
  width: 0.65rem;
  height: 0.65rem;
  margin-left: 0.15rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.beta-tag {
  color: var(--violet);
}

.signin-link {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}

.signin-link:hover {
  text-decoration: underline;
}

.eyebrow,
.kicker,
.section-number,
.url-card-topline,
.url-label {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(21rem, 0.97fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  align-items: center;
  min-height: 38rem;
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 39rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
  color: var(--violet);
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 255, 81, 0.24);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1.6rem;
  font-size: clamp(3.7rem, 7.8vw, 7.6rem);
  font-weight: 800;
  line-height: 0.9;
}

h1 em {
  color: var(--violet);
  font-style: normal;
}

.hero-intro {
  max-width: 31rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.65;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.proof-number {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--lime);
  font-size: 0.64rem;
}

.proof-line {
  width: 2rem;
  height: 1px;
  margin: 0 0.25rem;
  background: var(--line);
}

.brief-card {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0.9rem 0.9rem 0 var(--lilac);
}

.brief-card::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 240, 231, 0.22) 1px, transparent 1px);
  background-size: 17px 17px;
  content: "";
  opacity: 0.25;
  pointer-events: none;
}

.brief-card > * {
  position: relative;
}

.card-topline,
.url-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.click-count {
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-card h2 {
  max-width: 10ch;
  margin: 2.2rem 0 1.2rem;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  line-height: 0.96;
}

#agent-brief {
  display: block;
  width: 100%;
  min-height: 10rem;
  resize: vertical;
  padding: 1rem;
  border: 1px solid rgba(245, 240, 231, 0.36);
  border-radius: 0;
  color: var(--paper);
  background: rgba(245, 240, 231, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
}

#agent-brief::selection {
  color: var(--ink);
  background: var(--lime);
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.3rem;
  margin-top: 0.9rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--lime);
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.copy-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 5px 5px 0 var(--paper);
  background: var(--paper);
}

.copy-status {
  min-height: 1.3rem;
  margin: 0.85rem 0 0;
  color: rgba(245, 240, 231, 0.72);
  font-size: 0.75rem;
  line-height: 1.45;
}

.handoff,
.outcome,
.workspace {
  padding: clamp(4rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 31rem;
}

.section-number {
  margin-bottom: 1.3rem;
  color: var(--violet);
}

h2 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  line-height: 0.94;
}

.section-heading > p:last-child,
.outcome-copy > p:last-child {
  max-width: 28rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
}

.step {
  min-height: 12rem;
  padding: 1.2rem;
  border-top: 3px solid var(--ink);
  background: var(--paper-deep);
}

.step-one { border-color: var(--lime); }
.step-two { border-color: var(--lilac); }
.step-three { border-color: var(--coral); }
.step-four { border-color: var(--blue); }

.step-mark {
  display: block;
  margin-bottom: 2rem;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.step h3,
.account-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.35rem;
  line-height: 1.05;
}

.step p,
.account-card p,
.url-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.step p {
  color: #4f4a56;
}

.outcome {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(20rem, 1.15fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
}

.url-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 2px solid var(--ink);
  background: var(--lime);
  box-shadow: 0.8rem 0.8rem 0 var(--coral);
}

.url-card-topline {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(27, 26, 36, 0.25);
  font-size: 0.66rem;
}

.ready-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.ready-label .status-dot {
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(27, 26, 36, 0.14);
}

.url-label {
  margin: 2rem 0 0.8rem;
}

.url-card code {
  display: block;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.url-note {
  max-width: 25rem;
  margin-top: 1rem;
  color: rgba(27, 26, 36, 0.72);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
  margin-top: 3rem;
}

.account-card,
.limits-card {
  min-height: 15rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
}

.account-card {
  background: var(--blue);
}

.limits-card {
  background: var(--paper-deep);
}

.account-card .eyebrow,
.limits-card .eyebrow {
  margin-bottom: 2rem;
}

.account-card p:not(.eyebrow) {
  max-width: 25rem;
  margin-bottom: 1.2rem;
  color: #39404c;
}

.soft-tag {
  display: inline-block;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--ink);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-card-action {
  cursor: pointer;
}

.account-card-action:hover {
  color: var(--paper);
  background: var(--ink);
}

.auth-dialog {
  width: min(calc(100% - 2rem), 30rem);
  max-width: 30rem;
  padding: 0;
  border: 2px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0.8rem 0.8rem 0 var(--lilac);
}

.auth-dialog::backdrop {
  background: rgba(27, 26, 36, 0.64);
}

.auth-form {
  padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-topline .eyebrow {
  margin: 0;
  color: var(--lime);
}

.dialog-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(245, 240, 231, 0.4);
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--ink);
  background: var(--paper);
}

.auth-form h2 {
  margin: 2rem 0 0.85rem;
  font-size: clamp(2.3rem, 6vw, 3.8rem);
}

.auth-description {
  margin-bottom: 1.5rem;
  color: rgba(245, 240, 231, 0.76);
  font-size: 0.9rem;
  line-height: 1.6;
}

.auth-form label {
  display: block;
  margin: 1rem 0 0.4rem;
  color: var(--paper-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(245, 240, 231, 0.45);
  border-radius: 0;
  color: var(--paper);
  background: rgba(245, 240, 231, 0.08);
}

.auth-submit {
  width: 100%;
  min-height: 3rem;
  margin-top: 1.4rem;
  border: 2px solid var(--lime);
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-submit:hover {
  color: var(--ink);
  background: var(--paper);
}

.auth-switch {
  display: block;
  margin: 1rem auto 0;
  padding: 0;
  border: 0;
  color: var(--paper-deep);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.auth-status {
  min-height: 1.25rem;
  margin: 1rem 0 0;
  color: var(--coral);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.limit-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.limit-row:last-child {
  border-bottom: 0;
}

.limit-row strong {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.07em;
}

.limit-row span {
  color: #4f4a56;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    min-height: auto;
  }

  .brief-card {
    max-width: 42rem;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .outcome,
  .workspace-grid,
  .oauth-approval {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 1.25rem, 1240px);
  }

  .topbar {
    min-height: 4.5rem;
  }

  .beta-tag {
    display: none;
  }

  .hero {
    padding-top: 3.5rem;
  }

  h1 {
    font-size: clamp(3.25rem, 15.5vw, 5.6rem);
  }

  .brief-card {
    box-shadow: 0.55rem 0.55rem 0 var(--lilac);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 2.5rem;
  }

  .step {
    min-height: auto;
  }

  .step-mark {
    margin-bottom: 1rem;
  }

  .url-card {
    box-shadow: 0.55rem 0.55rem 0 var(--coral);
  }

  .limit-row {
    grid-template-columns: 5.5rem 1fr;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .copy-button {
    transition: none;
  }

  .copy-button:hover {
    transform: none;
    box-shadow: none;
  }
}
