:root {
  color-scheme: light;
  --ink: #102a3a;
  --muted: #587080;
  --surface: #ffffff;
  --line: #dce7e6;
  --brand: #0f766e;
  --brand-dark: #164e63;
  --brand-soft: #dff6f1;
  --danger: #b42318;
  --shadow: 0 22px 60px rgba(15, 76, 86, 0.16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(45, 212, 191, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(14, 116, 144, 0.12), transparent 28rem),
    #f3f8f7;
}

button, a { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; }
.brand img { width: 42px; height: 42px; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.toplink { color: var(--brand-dark); font-size: 14px; font-weight: 750; text-decoration: none; }
.toplink:hover { text-decoration: underline; }

.home-main { flex: 1; display: grid; place-items: center; padding: clamp(40px, 8vw, 90px) 20px; }
.hero { width: min(1100px, 100%); display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 6vw, 76px); align-items: center; }
.eyebrow { color: var(--brand); font-size: 13px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 12px 0 18px; font-size: clamp(40px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; }
.lead { max-width: 680px; color: var(--muted); font-size: clamp(18px, 2.4vw, 23px); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(15, 118, 110, .22);
}
.button:hover { transform: translateY(-1px); }
.button.secondary { background: white; color: var(--brand-dark); border-color: var(--line); box-shadow: none; }
.button[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.feature-card { padding: 28px; border: 1px solid rgba(255,255,255,.65); border-radius: 24px; background: rgba(255,255,255,.78); box-shadow: var(--shadow); }
.feature-card img { width: 72px; height: 72px; }
.feature-card h2 { margin: 20px 0 8px; font-size: 24px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.feature-list { display: grid; gap: 13px; margin: 24px 0 0; padding: 0; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.feature-list li::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 900; }

.portal-shell { height: 100vh; overflow: hidden; }
.portal-header { height: 58px; min-height: 58px; padding-block: 7px; }
.portal-header .brand img { width: 34px; height: 34px; }
.portal-frame { width: 100%; height: calc(100vh - 58px); border: 0; background: #fff; }
.portal-status { flex: 1; display: grid; place-items: center; padding: 28px; text-align: center; }
.portal-status-card { width: min(620px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.portal-status-card h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.08; }
.portal-status-card p { color: var(--muted); line-height: 1.6; }
.config-code { display: block; margin: 18px 0; padding: 12px; border-radius: 8px; background: #f5f8f8; color: var(--danger); font: 700 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.footer { padding: 22px; color: var(--muted); text-align: center; font-size: 13px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .topbar { padding-inline: 16px; }
  .brand-copy small { display: none; }
  .portal-header .brand-copy span { font-size: 14px; }
}
