@font-face {
  font-family: "TWK Lausanne";
  src: url("/fonts/TWKLausanne-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TWK Lausanne";
  src: url("/fonts/TWKLausanne-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TWK Lausanne";
  src: url("/fonts/TWKLausanne-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Mono";
  src: url("/fonts/aeonikmono-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Mono";
  src: url("/fonts/aeonikmono-semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --panel-3: #e2e8f0;
  --border: rgba(15, 23, 42, 0.13);
  --border-strong: rgba(15, 23, 42, 0.22);
  --text: #111827;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-rgb: 37, 99, 235;
  --green: #059669;
  --green-bg: #ecfdf5;
  --green-border: rgba(5, 150, 105, 0.34);
  --yellow: #d97706;
  --yellow-bg: #fffbeb;
  --yellow-border: rgba(217, 119, 6, 0.38);
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: rgba(220, 38, 38, 0.38);
  --font-ui: "TWK Lausanne", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Aeonik Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --topbar-min-height: 66px;
  --topbar-padding-y: 13px;
  --topbar-padding-x: 16px;
  --topbar-gap: 18px;
  --brand-logo-width: 214px;
  --brand-gap: 16px;
  --brand-product-min-height: 30px;
  --brand-product-font-size: 18px;
  --brand-product-padding-left: 16px;
  --topbar-action-height: 30px;
  --topbar-action-padding-x: 10px;
  --r: 0;
  --r-sm: 4px;
  --r-md: 7px;
  --r-lg: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 16px;
  width: min(1240px, calc(100vw - 44px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0;
}

.topbar,
.hero-band,
.status-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: none;
}

.topbar {
  display: flex;
  align-self: start;
  min-height: var(--topbar-min-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--topbar-gap);
  padding: var(--topbar-padding-y) var(--topbar-padding-x);
}

.brand-logo {
  display: block;
  width: var(--brand-logo-width);
  height: auto;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--brand-gap);
  color: inherit;
  text-decoration: none;
}

.brand-product {
  display: inline-flex;
  align-items: center;
  min-height: var(--brand-product-min-height);
  border-left: 1px solid var(--border-strong);
  padding-left: var(--brand-product-padding-left);
  color: var(--text);
  font-size: var(--brand-product-font-size);
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-link:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.22);
  outline-offset: 4px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-cta,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-cta {
  width: auto;
  height: var(--topbar-action-height);
  min-height: var(--topbar-action-height);
  padding: 0 var(--topbar-action-padding-x);
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  line-height: 1;
}

.topbar-cta:hover {
  border-color: #1d4ed8;
  color: #ffffff;
  background: #1d4ed8;
}

.topbar-cta:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.22);
  outline-offset: 3px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  overflow: hidden;
}

.hero-copy,
.activation-panel {
  min-height: 450px;
  padding: 24px 28px;
}

.hero-copy {
  display: grid;
  align-content: space-between;
  gap: 28px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.workspace {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(38px, 5vw, 72px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 520px;
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.02;
}

.setup-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 15px 0;
}

.step-number {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.step-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.step-copy h2 {
  font-size: 16px;
  line-height: 1.2;
}

.step-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
}

.step-copy a {
  color: var(--accent);
  font-weight: 600;
  text-underline-offset: 2px;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-subcopy,
.panel-subcopy {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
}

.panel-subcopy {
  margin-top: 12px;
}

.activation-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  background: var(--panel);
}

.panel-copy {
  max-width: 430px;
}

.activation-form {
  display: grid;
  gap: 8px;
}

.activation-workflow {
  display: grid;
  gap: 18px;
  margin-top: auto;
}

.refresh-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.refresh-step .step-copy p {
  max-width: 440px;
}

label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px;
  gap: 8px;
}

input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 0 13px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-mono);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

button {
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  width: fit-content;
  min-width: 104px;
  height: 40px;
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--panel);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.form-error {
  min-height: 18px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.status-panel {
  display: grid;
  min-height: 310px;
  align-content: start;
  gap: 16px;
  padding: 0;
  overflow: hidden;
}

.status-panel.active {
  border-color: var(--green-border);
}

.status-panel.pending {
  border-color: var(--yellow-border);
}

.status-panel.failed {
  border-color: var(--red-border);
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  background: var(--panel-2);
}

.status-panel.active .status-header {
  border-bottom-color: var(--green-border);
  background: var(--green-bg);
}

.status-panel.pending .status-header {
  border-bottom-color: var(--yellow-border);
  background: var(--yellow-bg);
}

.status-panel.failed .status-header {
  border-bottom-color: var(--red-border);
  background: var(--red-bg);
}

.status-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  background: var(--panel);
}

.status-feedback[hidden] {
  display: none;
}

.status-feedback p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.troubleshooting {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 24px;
  border: 1px solid var(--border);
  padding: 22px 16px;
  background: var(--panel);
}

.troubleshooting h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
}

.troubleshooting-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding-left: 19px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

#status-heading {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.05;
}

.status-badge {
  min-width: 76px;
  min-height: 28px;
  padding: 0 10px;
}

.status-badge.active {
  border-color: var(--green-border);
  color: var(--green);
  background: var(--green-bg);
}

.status-badge.pending {
  border-color: var(--yellow-border);
  color: var(--yellow);
  background: var(--yellow-bg);
}

.status-badge.failed {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-bg);
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 16px 16px;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  color: var(--text);
  font-size: 12px;
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline time,
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
}

.timeline time {
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-band {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-copy,
  .activation-panel {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  :root {
    --topbar-padding-y: 14px;
    --brand-logo-width: 190px;
    --brand-gap: 8px;
    --brand-product-font-size: 16px;
    --brand-product-padding-left: 0;
  }

  .shell {
    width: min(100vw - 20px, 1240px);
    padding: 10px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-product {
    border-left: 0;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .hero-copy,
  .activation-panel {
    padding: 18px 20px;
  }

  h1 {
    font-size: 42px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .troubleshooting {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 4px 8px;
  }

  button,
  input {
    width: 100%;
  }

  .topbar button {
    width: auto;
  }

  .status-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-feedback {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
