:root {
  color-scheme: light;
  --ink: #16231f;
  --muted: #63706b;
  --line: #dbe5e0;
  --paper: #fbf8f1;
  --surface: #ffffff;
  --green: #1f9d63;
  --green-dark: #0d6b45;
  --mint: #dff5eb;
  --sky: #e7f2fb;
  --amber: #f0b84d;
  --shadow: 0 24px 70px rgb(22 35 31 / 14%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.has-task-overlay {
  overflow: hidden;
}

button,
a,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgb(251 248 241 / 86%);
  border-bottom: 1px solid rgb(219 229 224 / 70%);
  backdrop-filter: blur(18px);
}

.brand,
.header-link,
.secondary-link {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.header-link,
.secondary-link {
  color: var(--green-dark);
  font-weight: 700;
}

.hero {
  display: grid;
  min-height: 82vh;
  padding: 108px clamp(20px, 5vw, 72px) 44px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.hero-copy {
  max-width: 660px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-text {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.email-panel {
  display: grid;
  width: min(100%, 620px);
  max-width: 620px;
  margin-top: 22px;
  gap: 10px;
}

.hero-email-panel {
  position: relative;
  padding: 14px;
  border: 1px solid rgb(31 157 99 / 20%);
  border-radius: 28px;
  background: rgb(255 255 255 / 62%);
  box-shadow: 0 22px 60px rgb(22 35 31 / 9%);
}

.email-panel label {
  color: var(--ink);
  font-weight: 850;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) max-content;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.email-row input {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 20px;
  border: 1px solid rgb(13 107 69 / 22%);
  border-radius: 999px;
  background: rgb(255 255 255 / 96%);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 85%),
    0 12px 34px rgb(22 35 31 / 8%);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.email-row input::placeholder {
  color: rgb(99 112 107 / 74%);
}

.email-row input:focus {
  outline: 0;
  border-color: rgb(31 157 99 / 68%);
  background: white;
  box-shadow:
    0 0 0 5px rgb(31 157 99 / 15%),
    0 18px 42px rgb(22 35 31 / 12%);
}

.email-row .primary-button {
  min-width: 190px;
  min-height: 58px;
  white-space: nowrap;
}

.email-status {
  min-height: 23px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.inline-link {
  color: var(--green-dark);
  font-weight: 850;
}

.primary-button,
.ghost-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  background: var(--green);
  color: white;
  box-shadow: 0 14px 28px rgb(31 157 99 / 24%);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.ghost-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.phone-stage {
  display: grid;
  min-width: 0;
  place-items: center;
}

.phone {
  width: min(100%, 410px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 12px solid #14221d;
  border-radius: 42px;
  background: #efe7d4;
  box-shadow: var(--shadow);
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 74px;
  padding: 14px 18px;
  background: #075e54;
  color: white;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #d8f3e5;
  color: #075e54;
  font-weight: 900;
}

.chat-title {
  font-weight: 800;
}

.chat-presence {
  color: rgb(255 255 255 / 75%);
  font-size: 0.78rem;
}

.chat-area {
  display: flex;
  min-height: calc(100% - 74px);
  padding: 22px 16px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  background:
    linear-gradient(rgb(255 255 255 / 62%), rgb(255 255 255 / 62%)),
    repeating-linear-gradient(45deg, #efe4cf 0, #efe4cf 12px, #eadfc8 12px, #eadfc8 24px);
}

.bubble {
  width: fit-content;
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.35;
  box-shadow: 0 2px 6px rgb(25 35 32 / 8%);
}

.bubble-out {
  margin-left: auto;
  border-bottom-right-radius: 5px;
  background: #d9fdd3;
}

.bubble-in {
  border-bottom-left-radius: 5px;
  background: white;
}

.bubble.small {
  font-size: 0.86rem;
}

.file-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(92%, 310px);
  padding: 11px;
  border-radius: 13px;
  background: white;
  box-shadow: 0 6px 18px rgb(25 35 32 / 10%);
}

.file-icon {
  width: 38px;
  height: 44px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 14px, #c7dcff 14px),
    linear-gradient(#2869cf, #1b4d99);
}

.file-name {
  font-size: 0.88rem;
  font-weight: 800;
}

.file-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.typing {
  display: flex;
  width: 58px;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 16px;
  border-bottom-left-radius: 5px;
  background: white;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7b8983;
  animation: typing 1.1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.onboarding-band {
  scroll-margin-top: 82px;
  padding: 32px clamp(20px, 5vw, 72px) 72px;
  background: linear-gradient(180deg, var(--paper), #eaf4ef);
}

.setup-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.setup-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.setup-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.steps {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 12px;
  list-style: none;
}

.product-steps {
  align-content: start;
}

.step {
  position: relative;
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 14px;
  padding: 15px 58px 15px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / 74%);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.step.is-active {
  border-color: rgb(31 157 99 / 56%);
  background: var(--mint);
  box-shadow: 0 14px 34px rgb(31 157 99 / 12%);
}

.step.is-done {
  border-color: rgb(31 157 99 / 36%);
  background: linear-gradient(135deg, rgb(223 245 235 / 88%), white);
}

.step.is-done::after {
  content: "Done";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgb(31 157 99 / 12%);
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 950;
}

.step.is-waiting {
  opacity: 0.78;
}

.step-index {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.step.is-active .step-index,
.step.is-done .step-index {
  background: var(--green-dark);
}

.step small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.setup-card {
  min-width: 0;
  min-height: 430px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgb(22 35 31 / 10%);
}

.product-card {
  display: grid;
  gap: 18px;
}

.setup-status {
  display: flex;
  align-items: center;
  min-height: 32px;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.setup-email-panel {
  width: 100%;
  max-width: none;
  margin: -2px 0 2px;
  padding: 16px;
  border: 1px solid rgb(31 157 99 / 18%);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(223 245 235 / 56%), rgb(255 255 255 / 86%)),
    var(--surface);
}

.setup-email-panel .email-row {
  grid-template-columns: minmax(220px, 1fr) max-content;
}

.progress-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.progress-meter {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eee9;
}

.progress-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgb(255 255 255 / 28%), transparent),
    linear-gradient(90deg, var(--green), #36b7a0);
  background-size:
    180px 100%,
    100% 100%;
  animation: progress-sheen 1.5s linear infinite;
  transition: width 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

#overall-progress-label {
  color: var(--green-dark);
  font-weight: 900;
}

.runtime-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgb(13 107 69 / 14%);
  border-radius: 14px;
  background: rgb(246 252 249 / 78%);
}

.runtime-strip.is-done {
  border-color: rgb(31 157 99 / 22%);
  background: rgb(246 252 249 / 96%);
}

.runtime-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgb(240 184 77 / 14%);
}

.runtime-dot.is-done {
  background: var(--green);
  box-shadow: 0 0 0 6px rgb(31 157 99 / 12%);
}

.runtime-copy {
  min-width: 0;
}

.runtime-copy strong,
.runtime-copy small {
  display: block;
}

.runtime-copy strong {
  font-size: 0.9rem;
}

.runtime-copy small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.runtime-strip em {
  color: var(--green-dark);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 950;
}

.phase-list {
  display: grid;
  gap: 9px;
}

.phase-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e4ece8;
  border-radius: 14px;
  background: #fbfdfc;
}

.phase-marker {
  display: grid;
  width: 44px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eef5f1;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
}

.phase-item.is-done .phase-marker {
  background: var(--mint);
  color: var(--green-dark);
}

.phase-item.is-active .phase-marker {
  background: #fff4d9;
  color: #8b5d08;
  animation: active-pulse 1.6s ease-in-out infinite;
}

.phase-item.is-active {
  border-color: rgb(240 184 77 / 45%);
  box-shadow: 0 10px 26px rgb(139 93 8 / 6%);
}

.phase-item strong,
.phase-item small {
  display: block;
}

.phase-item strong {
  font-size: 0.95rem;
}

.phase-item small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.phase-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 850;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgb(31 157 99 / 22%);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(223 245 235 / 54%), rgb(255 255 255 / 90%)),
    var(--surface);
  box-shadow: 0 16px 38px rgb(22 35 31 / 8%);
}

.ai-panel[hidden] {
  display: none;
}

.ai-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.4;
}

.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-provider-button {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.ai-provider-button:hover,
.ai-provider-button.is-selected {
  border-color: rgb(31 157 99 / 48%);
  background: #f5fcf9;
  box-shadow: 0 12px 28px rgb(31 157 99 / 10%);
  transform: translateY(-1px);
}

.ai-provider-button strong {
  font-size: 0.94rem;
  font-weight: 950;
}

.ai-provider-button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.ai-key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: stretch;
}

.ai-key-row input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgb(13 107 69 / 22%);
  border-radius: 999px;
  background: white;
  color: var(--ink);
}

.ai-key-row input:focus {
  outline: 0;
  border-color: rgb(31 157 99 / 68%);
  box-shadow: 0 0 0 5px rgb(31 157 99 / 14%);
}

.connector-button {
  display: grid;
  min-height: 78px;
  gap: 4px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.connector-button:hover {
  border-color: rgb(31 157 99 / 45%);
  transform: translateY(-1px);
}

.connector-button.is-attention {
  border-color: rgb(31 157 99 / 42%);
  background: linear-gradient(135deg, rgb(223 245 235 / 45%), white);
  box-shadow: 0 14px 34px rgb(31 157 99 / 10%);
}

.connector-button.is-complete {
  border-color: rgb(31 157 99 / 28%);
  background: #f6fcf9;
}

.connector-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.connector-button span {
  font-weight: 900;
}

.connector-button small {
  color: var(--muted);
  line-height: 1.25;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgb(240 184 77 / 16%);
}

.status-dot.is-live {
  background: var(--green);
  box-shadow: 0 0 0 6px rgb(31 157 99 / 16%);
}

.status-dot.is-error {
  background: #d94b4b;
  box-shadow: 0 0 0 6px rgb(217 75 75 / 14%);
}

.qr-frame {
  display: grid;
  min-height: 256px;
  margin: 22px 0;
  place-items: center;
  border: 1px dashed #bfd0c8;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgb(223 245 235 / 55%), transparent),
    var(--surface);
}

.qr-frame[hidden],
.qr-frame img[hidden] {
  display: none !important;
}

.qr-frame img {
  display: block;
  width: min(256px, 78vw);
  height: min(256px, 78vw);
  border-radius: 12px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  gap: 16px;
  color: var(--muted);
  font-weight: 750;
  text-align: center;
}

.onedrive-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #bfd0c8;
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(231 242 251 / 70%), white);
}

.onedrive-panel[hidden] {
  display: none;
}

.panel-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.device-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: center;
}

.device-code-row strong {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgb(255 255 255 / 82%);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.microsoft-link {
  display: inline-flex;
  min-width: 220px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.onedrive-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.ready-panel {
  display: grid;
  max-width: 520px;
  place-items: center;
  gap: 10px;
  color: var(--ink);
}

.ready-panel[hidden] {
  display: none;
}

.ready-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 1.45rem;
  font-weight: 950;
}

.ready-panel strong {
  font-size: 1.08rem;
}

.ready-panel span {
  max-width: 38ch;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.product-ready-panel {
  margin: 2px 0 4px;
  padding: 18px;
  border: 1px solid rgb(31 157 99 / 22%);
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(223 245 235 / 65%), white);
}

.ready-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.ready-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
}

.primary-button.is-complete {
  background: var(--green-dark);
}

.loader {
  display: inline-block;
  width: 42px;
  height: 42px;
  border: 4px solid rgb(31 157 99 / 18%);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.setup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.setup-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.task-overlay {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  min-width: 320px;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
}

.task-overlay[hidden] {
  display: none;
}

.task-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgb(255 255 255 / 72%), transparent 42%),
    rgb(22 35 31 / 52%);
  backdrop-filter: blur(14px);
}

.task-sheet {
  position: relative;
  display: grid;
  width: min(720px, 100%);
  max-height: calc(100dvh - 32px);
  gap: 18px;
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgb(246 252 249 / 96%), rgb(255 255 255 / 98%)),
    var(--surface);
  box-shadow: 0 34px 110px rgb(4 18 13 / 32%);
}

.task-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-step-pill,
.task-live-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 0.78rem;
  font-weight: 950;
}

.task-step-pill {
  background: var(--ink);
  color: white;
}

.task-live-pill {
  background: #fff4d9;
  color: #8b5d08;
}

.task-live-pill.is-done {
  background: var(--mint);
  color: var(--green-dark);
}

.task-sheet h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.task-sheet p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
  font-weight: 700;
  line-height: 1.45;
}

.task-qr-frame {
  display: grid;
  min-height: 370px;
  place-items: center;
  border: 1px dashed rgb(13 107 69 / 28%);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(223 245 235 / 70%), rgb(255 255 255 / 78%)),
    var(--surface);
}

.task-qr-frame[hidden],
.task-qr-frame img[hidden] {
  display: none !important;
}

.task-qr-frame img {
  display: block;
  width: min(330px, 72vw);
  height: min(330px, 72vw);
  border-radius: 16px;
  background: white;
  box-shadow: 0 20px 56px rgb(22 35 31 / 12%);
}

.task-placeholder {
  display: grid;
  place-items: center;
  gap: 16px;
  color: var(--muted);
  font-weight: 850;
  text-align: center;
}

.task-onedrive-panel {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid rgb(37 99 235 / 18%);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(231 242 251 / 88%), rgb(255 255 255 / 98%)),
    var(--surface);
}

.task-onedrive-panel[hidden],
.task-ready-panel[hidden] {
  display: none;
}

.task-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px;
  align-items: center;
}

.device-code-button {
  display: grid;
  min-width: 0;
  min-height: 86px;
  grid-template-columns: minmax(0, max-content) 40px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border: 1px solid rgb(13 107 69 / 10%);
  border-radius: 18px;
  background: rgb(255 255 255 / 88%);
  color: var(--ink);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgb(13 107 69 / 6%);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.device-code-button:hover,
.device-code-button:focus-visible,
.device-code-button.is-copied {
  border-color: rgb(31 157 99 / 38%);
  box-shadow:
    inset 0 0 0 1px rgb(31 157 99 / 16%),
    0 14px 34px rgb(31 157 99 / 10%);
}

.device-code-button:focus-visible {
  outline: 0;
}

.device-code-button:active {
  transform: translateY(1px);
}

.device-code-button strong {
  min-width: 0;
  font-size: 2.45rem;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.copy-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-dark);
}

.copy-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.task-device-row .microsoft-link {
  min-width: 230px;
  min-height: 62px;
  font-size: 1.05rem;
}

.task-ready-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 28px 20px;
  border: 1px solid rgb(31 157 99 / 22%);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(223 245 235 / 76%), white),
    var(--surface);
  text-align: center;
}

.task-ready-panel strong {
  font-size: 1.35rem;
}

.task-ready-panel span {
  max-width: 36ch;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.task-footnote {
  font-size: 0.94rem !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes progress-sheen {
  from {
    background-position:
      -180px 0,
      0 0;
  }

  to {
    background-position:
      calc(100% + 180px) 0,
      0 0;
  }
}

@keyframes active-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(240 184 77 / 24%);
  }

  50% {
    box-shadow: 0 0 0 7px rgb(240 184 77 / 0%);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-top: 112px;
    grid-template-columns: 1fr;
  }

  .phone {
    width: min(100%, 340px);
  }

  .setup-copy {
    display: block;
  }

  .setup-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .step {
    min-width: 180px;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 64px;
    padding-inline: 16px;
  }

  .hero {
    gap: 18px;
    padding: 96px 16px 8px;
    justify-items: stretch;
  }

  .hero-copy,
  .phone-stage,
  .setup-shell {
    width: 100%;
    max-width: 358px;
    margin-inline: 0;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 2.75rem);
    line-height: 0.98;
  }

  .hero-actions,
  .email-row,
  .setup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .email-row {
    display: flex;
  }

  .primary-button,
  .ghost-button,
  .email-row input,
  .secondary-link {
    width: 100%;
    text-align: center;
  }

  .connector-grid {
    grid-template-columns: 1fr;
  }

  .ai-provider-grid,
  .ai-key-row,
  .device-code-row,
  .task-device-row {
    grid-template-columns: 1fr;
  }

  .phase-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

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

  .runtime-strip em {
    display: none;
  }

  .phase-item em {
    display: none;
  }

  .secondary-link {
    padding: 10px 0;
  }

  .phone {
    width: min(100%, 204px);
    height: 138px;
    aspect-ratio: auto;
    border-width: 9px;
    border-radius: 34px;
  }

  .phone-stage {
    overflow: visible;
    place-items: start center;
  }

  .chat-area {
    padding: 14px;
    gap: 8px;
  }

  .file-result {
    display: none;
  }

  .onboarding-band {
    padding: 28px 16px 52px;
  }

  .setup-card {
    min-height: 380px;
    border-radius: 18px;
  }

  .qr-frame {
    min-height: 230px;
  }

  .task-overlay {
    align-items: stretch;
    padding: 10px;
  }

  .task-sheet {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }

  .task-qr-frame {
    min-height: 300px;
  }

  .task-device-row .microsoft-link {
    width: 100%;
    min-width: 0;
  }

  .device-code-button {
    min-height: 72px;
    grid-template-columns: minmax(0, max-content) 36px;
    gap: 10px;
  }

  .device-code-button strong {
    font-size: 1.75rem;
  }

  .copy-icon {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader,
  .typing span,
  .progress-meter span,
  .phase-item.is-active .phase-marker {
    animation: none;
  }
}
