:root {
  --page: #fbfbfa;
  --surface: #ffffff;
  --surface-subtle: #f7f7f5;
  --surface-muted: #f1f1ef;
  --ink: #111111;
  --text: #202020;
  --muted: #6f6f6b;
  --soft: #8b8b86;
  --line: #e2e2df;
  --line-strong: #c9c9c4;
  --button: #111111;
  --button-text: #ffffff;
  --danger: #3b3b38;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(0, 0, 0, 0.05);
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.52;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  padding: 48px 0 24px;
  display: grid;
  align-content: center;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
}

.brand-logo {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(3rem, 6.8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.auth-form,
.url-form,
.promise-row {
  max-width: 760px;
}

.auth-form {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-form h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.08;
}

.auth-form p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-form input,
.url-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  outline: 0;
}

.auth-form input {
  min-height: 54px;
  margin-top: 8px;
  padding: 0 14px;
  font-size: 1rem;
}

.auth-form input:focus,
.url-box input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.auth-form button,
.url-box button,
.primary-action {
  min-height: 48px;
  border-radius: 6px;
  background: var(--button);
  color: var(--button-text);
  padding: 0 18px;
  font-weight: 700;
}

.auth-form button {
  margin-top: 18px;
}

.ghost-auth,
.secondary-action,
.ghost-action,
.top-actions button,
.terminal-head button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-form .ghost-auth {
  margin: 18px 0 0 8px;
}

.auth-form small {
  display: block;
  min-height: 22px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.92rem;
}

.promise-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.promise-row span,
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 0.84rem;
  font-weight: 650;
}

/* Homepage sections */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-title {
  max-width: 760px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
}

.section-sub {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.work-card h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.2;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.math-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 32px;
}

.math-band h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.05;
}

.math-band p {
  margin: 0;
  color: var(--muted);
}

.math-figures {
  display: grid;
  gap: 10px;
}

.math-figures article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  padding: 16px;
}

.math-figures span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.math-figures strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1.1;
}

.math-figures small {
  color: var(--muted);
}

.founder-note {
  max-width: 820px;
}

.founder-note blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.25;
}

.founder-note figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

/* Workspace */

.app {
  min-height: 100vh;
  padding: 48px 0;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.workspace-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 1;
}

.workspace-title p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.launch-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.launch-band span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.launch-band strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.08;
}

.launch-band p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
}

.launch-actions {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.secondary-action {
  background: var(--surface-subtle);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metrics article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.2vw, 2.1rem);
  line-height: 1;
}

.metrics small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.3;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab {
  min-height: 36px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 650;
}

.tab.active {
  background: var(--ink);
  color: var(--button-text);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.queue {
  display: grid;
  gap: 10px;
}

.queue-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.queue-card.approved {
  background: var(--surface-subtle);
}

.status-chip {
  display: inline-block;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 720;
  text-transform: uppercase;
}

.status-chip.needs {
  border-color: var(--ink);
  color: var(--ink);
}

.queue-card h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.25;
}

.queue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.queue-actions {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.queue-actions .primary-action {
  min-height: 40px;
  font-size: 0.92rem;
}

.queue-actions .ghost-action {
  min-height: 34px;
  font-size: 0.86rem;
}

.terminal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink);
}

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

.log-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 0.88rem;
}

.log-list li b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  margin-right: 8px;
}

.property-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 14px;
  overflow: hidden;
}

.property-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.5fr 0.7fr minmax(0, 1.4fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.property-row:first-child {
  border-top: 0;
}

.property-row.head {
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-transform: uppercase;
}

.property-row strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.property-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.url-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.url-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.url-box input {
  min-height: 50px;
  border-color: transparent;
  background: var(--surface-subtle);
  padding: 0 14px;
}

.demo-note {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
  color: var(--muted);
  padding: 10px 14px;
  font-size: 0.88rem;
}

@media (max-width: 960px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .work-layout,
  .math-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .auth-grid,
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .workspace-header {
    flex-direction: column;
  }

  .launch-band,
  .queue-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .property-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .property-row span:nth-child(3),
  .property-row span:nth-child(4),
  .property-row strong:nth-child(3),
  .property-row p:nth-child(4) {
    grid-column: span 1;
  }
}
