:root {
  --accent: #29822a;
  --accent-hover: #1e6620;
  --accent-soft: #eaf5ec;
  --canvas: #f3f3f3;
  --surface: #ffffff;
  --surface-muted: #f8f8f8;
  --border: #d6d6d6;
  --border-strong: #b8b8b8;
  --text: #1a1a1a;
  --muted: #616161;
  --success: #29822a;
  --radius: 4px;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 4px;
  --bs-border-radius-xl: 4px;
  --bs-border-radius-xxl: 4px;
  --bs-border-radius-pill: 4px;
}

html { min-height: 100%; font-size: 16px; }
body { min-height: 100vh; display: flex; flex-direction: column; margin: 0; color: var(--text); background: var(--canvas); font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-shadow: none !important; }
a { color: var(--accent); }

.site-header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px clamp(12px, 2.5vw, 32px); background: rgba(243, 243, 243, .96); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--accent); border: 1px solid var(--accent-hover); border-radius: var(--radius); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.site-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.site-brand strong { font-size: .92rem; font-weight: 650; }
.site-brand small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.header-meta { display: flex; align-items: center; gap: 18px; }
.environment-label { color: var(--muted); font-size: .65rem; font-weight: 650; letter-spacing: .08em; }
.header-signin { min-width: 80px; padding: 7px 14px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius); font-size: .8rem; font-weight: 600; text-align: center; text-decoration: none; }
.header-signin:hover { color: #fff; background: var(--accent-hover); }

.site-main { width: min(1440px, 100%); flex: 1 0 auto; margin: 0 auto; padding: 18px clamp(12px, 2.5vw, 32px); }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: clamp(20px, 3vw, 42px); align-items: center; min-height: 400px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: .67rem; font-weight: 700; letter-spacing: .12em; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.6rem, 5.2vw, 5rem); line-height: .98; font-weight: 650; letter-spacing: -.055em; }
.hero h1 span { color: var(--accent); }
.hero-description { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-size: clamp(.92rem, 1.3vw, 1.05rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border-radius: var(--radius) !important; font-size: .82rem; font-weight: 600; }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { color: #333; background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover { color: var(--text); background: #ececec; border-color: #999; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--muted); font-size: .72rem; }
.trust-row span, .service-status, .health-link { display: inline-flex; align-items: center; gap: 7px; }
.trust-row i, .service-status i, .health-link i { width: 7px; height: 7px; background: var(--success); border-radius: var(--radius); }

.identity-panel { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-topbar { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; background: var(--surface-muted); border-bottom: 1px solid var(--border); color: var(--muted); font-size: .73rem; }
.service-status { color: var(--success); font-weight: 600; }
.identity-visual { display: flex; align-items: center; flex-direction: column; padding: 20px 18px 16px; text-align: center; }
.identity-mark { display: grid; place-items: center; width: 58px; height: 58px; color: var(--accent); background: var(--accent-soft); border: 1px solid #b8d9bf; border-radius: var(--radius); }
.identity-mark svg { width: 42px; height: 42px; stroke-width: 1.45; }
.visual-label { margin-top: 10px; color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .1em; }
.identity-visual strong { margin-top: 7px; font-size: 1.25rem; font-weight: 650; }
.identity-visual p { max-width: 360px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.protocol-list { border-top: 1px solid var(--border); }
.protocol-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 7px 11px; border-bottom: 1px solid #e8e8e8; font-size: .74rem; }
.protocol-list div:last-child { border-bottom: 0; }
.protocol-list span { color: var(--muted); }
.protocol-list strong { font-weight: 600; }

.feature-section { margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { max-width: 680px; margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.2; font-weight: 650; letter-spacing: -.03em; }
.health-link { flex: 0 0 auto; color: var(--muted); font-size: .76rem; text-decoration: none; }
.health-link:hover { color: var(--accent); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--border); }
.feature-card { position: relative; min-height: 160px; padding: 16px; background: rgba(255,255,255,.55); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature-card svg { width: 28px; height: 28px; color: var(--accent); stroke-width: 1.6; }
.feature-number { position: absolute; top: 16px; right: 16px; color: #969696; font-size: .68rem; font-weight: 650; letter-spacing: .08em; }
.feature-card h3 { margin: 24px 0 6px; font-size: 1rem; font-weight: 650; }
.feature-card p { max-width: 320px; margin: 0; color: var(--muted); font-size: .81rem; line-height: 1.6; }

.site-footer { min-height: 44px; flex: 0 0 auto; display: flex; align-items: center; gap: 16px; margin-top: auto; padding: 8px clamp(12px, 2.5vw, 32px); color: var(--muted); background: #ededed; border-top: 1px solid var(--border); font-size: .7rem; }
.site-footer nav { display: flex; gap: 18px; margin-left: auto; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.header-user { color: var(--muted); font-size: .78rem; font-weight: 600; }
.portal { min-height: 0; }
.portal-heading { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.portal-heading h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 650; letter-spacing: -.04em; }
.portal-heading p { margin: 6px 0 0; color: var(--muted); }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.portal-card { display: flex; align-items: center; min-height: 70px; gap: 10px; padding: 10px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; }
.portal-card:hover { color: var(--text); background: var(--surface-muted); border-color: var(--accent); }
.portal-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: var(--accent-soft); border: 1px solid #b8d9bf; border-radius: var(--radius); }
.portal-icon svg { width: 25px; height: 25px; stroke-width: 1.6; }
.portal-card-copy { min-width: 0; display: flex; flex-direction: column; }
.portal-card-copy strong { overflow: hidden; font-size: .95rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.portal-card-copy small { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-arrow { flex: 0 0 auto; width: 18px; height: 18px; margin-left: auto; color: var(--muted); stroke-width: 2; }
.portal-empty { max-width: 620px; margin-top: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.portal-empty strong { font-size: 1rem; }
.portal-empty p { margin: 8px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .identity-panel { max-width: 620px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 140px; }
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .environment-label { display: none; }
  .site-main { padding-top: 12px; }
  .hero h1 { font-size: 2.65rem; }
  .identity-panel { min-width: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-footer nav { margin-left: 0; }
  .header-user { display: none; }
  .portal-grid { grid-template-columns: 1fr; }
}
