:root {
  --ink: #181816;
  --muted: #5f5d57;
  --line: #cfccc3;
  --paper: #f4f3ee;
  --white: #fff;
  --success: #31724a;
  --danger: #9a3828;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body {
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}
button, input, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }

.action-section {
  width: min(1240px, calc(100% - 80px));
  margin-inline: auto;
}
.account {
  position: fixed;
  z-index: 1;
  top: 24px;
  right: max(40px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-size: 9px;
  font-weight: 700;
}
.account-email {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account .text-button { font-size: inherit; }
.text-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:hover { color: var(--ink); }

main { flex: 1; display: flex; }
h1, h2, h3, p { margin-top: 0; }

.action-section {
  padding: 72px 0 80px;
  display: grid;
  grid-template-columns: minmax(320px, .86fr) minmax(440px, 1.14fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
.brand-name {
  margin-bottom: 34px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.eyebrow {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.action-intro h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: clamp(52px, 5.2vw, 76px);
  line-height: .96;
  letter-spacing: -.055em;
}
.hero-test-item {
  min-height: 1.4em;
  max-width: 520px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  transform-origin: left center;
  transition: opacity .16s ease, transform .16s ease;
}
.hero-test-item.is-flipping {
  opacity: 0;
  transform: translateY(-5px) rotateX(72deg);
}
.intro-copy {
  max-width: 440px;
  margin-bottom: 0;
  color: #3f3e39;
  font-size: 18px;
  line-height: 1.5;
}

.action-card {
  width: 100%;
  max-width: 610px;
  padding: 32px;
  border: 1px solid #d6d3ca;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(24, 24, 22, .035);
}
.card-heading {
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.card-heading h3 {
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.card-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.status-heading { display: grid; grid-template-columns: 12px 1fr; gap: 14px; }
.status-pulse {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.label-row {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.label-row > span {
  color: var(--muted);
  font-size: 11px;
}
.label-row label { margin-bottom: 0; }
input, textarea {
  width: 100%;
  border: 1px solid #98968f;
  border-radius: 8px;
  outline: none;
  background: var(--white);
  font-size: 16px;
}
input { height: 52px; padding: 0 14px; }
textarea { min-height: 145px; padding: 14px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
input::placeholder, textarea::placeholder { color: #77746d; opacity: 1; }
.provider-button {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
}
.provider-button:hover { background: #ecebe6; }
.divider {
  margin: 25px 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.input-action input { border-right: 1px solid #98968f; }
.inline-button {
  min-width: 108px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.inline-button:hover { background: #343430; }
.fine-print, .code-sent { margin: 11px 0 0; color: var(--muted); font-size: 11px; }
.code-sent { margin: 0 0 22px; font-size: 13px; line-height: 1.5; }
.code-input {
  height: 60px;
  margin-bottom: 14px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .4em;
}
.code-actions { margin-top: 15px; display: flex; justify-content: space-between; }
.code-actions .text-button:disabled { cursor: default; text-decoration: none; }
.auth-back { margin-top: 30px; }
.auth-card label,
.auth-card input:not(.code-input),
.auth-card .provider-button,
.auth-card .inline-button,
.auth-card .primary-button { font-size: 15px; }
.auth-card .card-heading p,
.auth-card .divider,
.auth-card .fine-print,
.auth-card .code-sent,
.auth-card .text-button,
.auth-card .notice { font-size: 13px; }
.request-form { display: grid; gap: 24px; }
.request-form label,
.request-form input,
.request-form textarea,
.request-form .primary-button { font-size: 15px; }
.request-form .label-row > span,
.request-form .character-count { font-size: 13px; }
.field { position: relative; }
.textarea-wrap { position: relative; }
.character-count {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 2px 4px;
  color: var(--muted);
  background: var(--white);
  font-size: 12px;
  line-height: 1.2;
}
.primary-button, .secondary-button {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.primary-button:hover { background: #343430; }
.primary-button span { font-size: 18px; font-weight: 400; }
.submit-area .primary-button {
  width: 100%;
  min-height: 58px;
  padding-inline: 20px;
  font-size: 17px;
}
.submit-area .primary-button span {
  font-size: 28px;
  line-height: 1;
}
.secondary-button { width: 100%; justify-content: center; color: var(--ink); background: transparent; }
.secondary-button:hover { background: var(--white); }
.notice {
  margin: -14px 0 22px;
  padding: 11px 13px;
  border: 1px solid;
  font-size: 12px;
  line-height: 1.5;
}
.error-notice { color: var(--danger); border-color: #c98f84; background: #f7e8e3; }
.request-summary { margin: 0 0 27px; border-top: 1px solid var(--line); }
.request-summary > div {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.request-summary dt { color: var(--muted); font-size: 10px; }
.request-summary dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.progress-track { width: 100%; height: 3px; overflow: hidden; background: #d7d5cf; }
.progress-track span { display: block; width: 18%; height: 100%; background: var(--ink); transition: width .5s ease; }
.progress-meta { margin: 10px 0 26px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.report-button { margin-top: 18px; }
.status-card .secondary-button { margin-top: 12px; }
.status-card.is-complete .status-pulse { background: var(--success); animation: none; }
.status-card.is-failed .status-pulse { background: var(--danger); animation: none; }
.schedule-card .status-pulse { background: var(--success); animation: none; }
.schedule-card .secondary-button { margin-top: 8px; }

@media (max-width: 900px) {
  .action-section {
    padding: 68px 0 76px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 48px;
  }
  .action-card { max-width: 680px; }
  .action-intro h1 { max-width: 680px; }
  .intro-copy { max-width: 560px; }
}

@media (max-width: 640px) {
  .account { top: 18px; right: 18px; }
  .account-email { display: none; }
  .action-section { width: calc(100% - 36px); }
  .action-section { padding: 42px 0 56px; gap: 36px; }
  .brand-name { margin-bottom: 28px; }
  .action-intro h1 { font-size: clamp(48px, 15vw, 64px); }
  .hero-test-item { font-size: 20px; }
  .intro-copy { font-size: 17px; }
  .action-card { padding: 24px; border-radius: 10px; }
  .input-action { grid-template-columns: 1fr; gap: 9px; }
  .input-action input { border-right: 1px solid #98968f; }
  .inline-button { min-height: 48px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .action-section { padding: 24px 0 36px; gap: 18px; }
  .brand-name { margin-bottom: 16px; }
  .eyebrow { margin-bottom: 8px; }
  .action-intro h1 { margin-bottom: 8px; font-size: 42px; }
  .hero-test-item { margin-bottom: 12px; font-size: 17px; }
  .intro-copy { font-size: 15px; line-height: 1.4; }
  .action-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-pulse { animation: none; }
  .progress-track span { transition: none; }
  .hero-test-item { transition: none; }
}
