:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5c6875;
  --surface: #fff;
  --on-accent: #fff;
  --surface-strong: #f5f8fa;
  --surface-hover: #edf3f5;
  --surface-accent: #e3f3f5;
  --surface-accent-hover: #edf8f9;
  --line: #d9e1e6;
  --line-hover: #8ec0c9;
  --accent: #007c91;
  --accent-strong: #005d70;
  --control-ink: #40505e;
  --muted-strong: #72808c;
  --track: #e3eaee;

  /* Namespaced aliases keep third-party component variables isolated. */
  --gf-surface: var(--surface);
  --gf-on-accent: var(--on-accent);
  --gf-surface-strong: var(--surface-strong);
  --gf-surface-hover: var(--surface-hover);
  --gf-surface-accent: var(--surface-accent);
  --gf-ink: var(--ink);
  --gf-muted: var(--muted);
  --gf-line: var(--line);
  --gf-accent: var(--accent);
}

html { background-color: var(--surface); }

* { box-sizing: border-box; }

body.site-shell {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-header__inner, .page, .agent-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand, .eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.site-nav a { padding: 0.55rem 0.75rem; border-radius: 0.5rem; color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); background: var(--surface-hover); outline: none; }
.site-account { display: flex; align-items: center; gap: 0.6rem; padding-left: 0.85rem; border-left: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
.site-account form { margin: 0; }
.site-account button, .site-account a { padding: 0.42rem 0.6rem; border: 1px solid var(--line); border-radius: 0.45rem; color: var(--ink); background: var(--surface); font: inherit; text-decoration: none; cursor: pointer; }
.site-account button:hover, .site-account a:hover { background: var(--surface-hover); }

.page { padding-block: 4.5rem; }
.page--hero { display: grid; grid-template-columns: 1.12fr 0.88fr; align-items: center; gap: 4rem; min-height: calc(100vh - 68px); }

h1, h2, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 1.25rem; font-size: clamp(2.35rem, 5vw, 4.75rem); line-height: 1.02; letter-spacing: -0.055em; }
h2 { margin-bottom: 0.55rem; font-size: 1.1rem; }
.lede { max-width: 620px; margin-bottom: 2rem; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.muted { color: var(--muted); }

.action-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.55rem; font-weight: 650; text-decoration: none; }
.button--primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.button--primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.button--secondary { color: var(--ink); background: var(--surface); }
.button--secondary:hover { background: var(--surface-hover); }

.feature-grid { display: grid; gap: 1rem; }
.feature-card, .content-card { border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); box-shadow: 0 14px 34px rgba(26, 51, 69, 0.08); }
.feature-card { display: block; padding: 1.4rem; text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.feature-card:hover { transform: translateY(-3px); border-color: var(--line-hover); background: var(--surface-strong); }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.feature-card__number { display: block; margin-bottom: 2rem; color: var(--accent); font-size: 0.78rem; font-weight: 700; }

.content-card { max-width: 830px; padding: clamp(1.5rem, 5vw, 3.5rem); }
.content-card h1 { font-size: clamp(2.1rem, 4vw, 3.75rem); }
.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.workflow-steps div { padding: 1rem 0; border-top: 1px solid var(--line); }
.workflow-steps span { display: block; margin-bottom: 0.75rem; color: var(--accent); font-weight: 750; }
.workflow-steps p { margin: 0; color: var(--muted); line-height: 1.5; }

.agent-page { padding-block: 1.5rem; }
.agent-help { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin-bottom: 0.75rem; padding: 0.15rem 0 0.75rem; }
.agent-help summary { color: var(--control-ink); cursor: pointer; font-weight: 600; }
.agent-help p { margin: 0.6rem 0 0; }
.agent-help strong { color: var(--ink); }
.agent-widget-shell { min-height: calc(100vh - 116px); display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); box-shadow: 0 14px 34px rgba(26, 51, 69, 0.08); overflow: hidden; }
.agent-loading { max-width: 650px; padding: 2rem; text-align: center; }
.agent-loading h1 { margin: 0.75rem auto 1rem; font-size: clamp(2rem, 4vw, 3.4rem); }
.agent-loading p { color: var(--muted); line-height: 1.6; }

.auth-page { width: min(480px, calc(100% - 2rem)); margin: 0 auto; padding-block: 5rem; }
.auth-card { padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); box-shadow: 0 14px 34px rgba(26, 51, 69, 0.08); }
.auth-card h1 { margin-top: 0.75rem; font-size: clamp(2rem, 6vw, 3.1rem); }
.auth-microsoft-button { width: 100%; cursor: pointer; font: inherit; }
.login-form { display: grid; gap: 1.2rem; margin-top: 2rem; }
.login-form label { display: grid; gap: 0.45rem; color: var(--ink); font-size: 0.92rem; font-weight: 650; }
.login-form input { width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 0.5rem; color: var(--ink); background: var(--surface); font: inherit; }
.login-form input:focus { border-color: var(--accent); outline: 3px solid rgba(92, 200, 215, 0.18); }
.login-form .button { width: 100%; border: 0; cursor: pointer; font: inherit; }
.form-alert { padding: 0.8rem 0.9rem; border: 1px solid rgba(255, 153, 153, 0.35); border-radius: 0.5rem; color: #ffd0d0; background: rgba(157, 43, 43, 0.2); font-size: 0.9rem; }

@media (max-width: 720px) {
  .site-header__inner { align-items: flex-start; flex-direction: column; padding-block: 0.85rem; }
  .site-nav { width: 100%; overflow-x: auto; padding-bottom: 0.15rem; }
  .site-nav a { padding-inline: 0.55rem; white-space: nowrap; }
  .site-account { width: 100%; padding: 0; border: 0; }
  .page--hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 3.5rem; }
  .workflow-steps { grid-template-columns: 1fr; }
}
