:root {
  color-scheme: light;
  --ink: #183033;
  --muted: #6a7c7e;
  --paper: #fff;
  --canvas: #f2f7f6;
  --line: #d9e5e3;
  --teal: #087875;
  --teal-dark: #075c5a;
  --teal-soft: #e4f3f0;
  --amber: #b56d18;
  --amber-soft: #fff7ea;
  --red: #b84a48;
  --shadow: 0 18px 48px rgba(24, 59, 61, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 85% 12%, rgba(8, 120, 117, .07), transparent 30rem), var(--canvas);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 13px;
  font-weight: 850;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.privacy-pill { padding: 10px 15px; color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; font-size: 12px; font-weight: 750; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: 52px auto 80px; }
.intro { max-width: 820px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0 0 13px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(38px, 5vw, 58px); line-height: 1.03; letter-spacing: -.035em; }
.intro > p:last-child { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

.status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  min-height: 84px;
  margin: 0 0 24px;
  padding: 17px 20px;
  background: var(--amber-soft);
  border: 1px solid #ecd5ae;
  border-radius: 17px;
}
.status-card.ready { background: var(--teal-soft); border-color: #c8e3df; }
.status-card.error { background: #fff3f1; border-color: #efd0cc; }
.status-dot { width: 12px; height: 12px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 5px rgba(181, 109, 24, .12); }
.status-card.ready .status-dot { background: var(--teal); box-shadow: 0 0 0 5px rgba(8, 120, 117, .12); }
.status-card.error .status-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(184, 74, 72, .12); }
.status-card strong, .status-card p { display: block; margin: 0; }
.status-card p { margin-top: 4px; color: var(--muted); font-size: 13px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.main-card, .side-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.main-card { padding: 30px; }
.side-card { position: sticky; top: 22px; padding: 25px; }
.section-heading { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 24px; }
.section-heading > span { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; color: var(--teal-dark); background: var(--teal-soft); border-radius: 50%; font-weight: 850; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading h2 { font-size: 22px; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.install-panel { margin: -4px 0 30px; padding: 22px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 15px; }
.install-panel ol { margin: 0 0 18px 51px; padding: 0; color: #405658; font-size: 14px; line-height: 1.65; }
.install-panel li + li { margin-top: 5px; }
.install-panel a { color: var(--teal-dark); font-weight: 800; }
.browser-links { display: flex; align-items: center; gap: 12px; margin-left: 51px; }
.browser-links span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.alternative-install { margin: 18px 0 0 51px; color: var(--muted); font-size: 13px; }
.alternative-install summary { color: var(--teal-dark); cursor: pointer; font-weight: 800; }
.alternative-install p { margin: 10px 0 0; line-height: 1.55; }
.alternative-install a { color: var(--teal-dark); font-weight: 800; }

label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input { width: 100%; min-height: 54px; padding: 0 16px; color: var(--ink); background: #fff; border: 1px solid #bdcecc; border-radius: 12px; outline: none; font-size: 17px; }
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 120, 117, .12); }
.primary-button, .secondary-button, .link-button { min-height: 48px; padding: 0 18px; border-radius: 11px; cursor: pointer; font-weight: 800; }
.primary-button { min-height: 54px; color: white; background: var(--teal); border: 0; }
.primary-button:hover:not(:disabled) { background: var(--teal-dark); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { color: var(--teal-dark); background: white; border: 1px solid #bfd1cf; }
.link-button { min-height: 40px; color: var(--teal-dark); background: var(--teal-soft); border: 0; white-space: nowrap; }
.field-error { margin: 8px 0 0; color: var(--red); font-size: 13px; }

.readiness-list { list-style: none; margin: 20px 0 0; padding: 0; }
.readiness-list li { display: flex; align-items: center; gap: 10px; padding: 11px 0; color: var(--muted); border-bottom: 1px solid #edf2f1; font-size: 14px; }
.readiness-list span { width: 26px; height: 26px; display: grid; place-items: center; background: #eff4f3; border-radius: 50%; font-size: 12px; font-weight: 850; }
.readiness-list li.ok { color: var(--ink); }
.readiness-list li.ok span { color: var(--teal-dark); background: var(--teal-soft); }
.readiness-list li.bad span { color: var(--red); background: #fff0ee; }
.activity { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px; background: var(--teal-soft); border-radius: 12px; }
.activity strong, .activity small { display: block; }
.activity strong { font-size: 13px; }
.activity small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(8, 120, 117, .2); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scope-note { margin: 22px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.result-card { display: flex; gap: 13px; align-items: flex-start; margin-top: 22px; padding: 17px; background: var(--teal-soft); border-radius: 13px; }
.result-icon { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-weight: 850; }
.result-card strong, .result-card p { display: block; margin: 0; }
.result-card p { margin-top: 5px; color: var(--muted); font-size: 13px; }

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .status-card { grid-template-columns: auto 1fr; }
  .status-card .secondary-button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 590px) {
  .topbar { height: 72px; padding: 0 16px; }
  .brand small, .privacy-pill { display: none; }
  .page-shell { width: min(100% - 24px, 1180px); margin-top: 32px; }
  .main-card, .side-card { padding: 20px; border-radius: 16px; }
  .input-row { grid-template-columns: 1fr; }
  .browser-links { display: block; margin-left: 0; }
  .alternative-install { margin-left: 0; }
  .browser-links span { display: block; margin-top: 9px; }
  .install-panel ol { margin-left: 20px; }
}
