:root {
  --blue: #1761fd;
  --blue-dark: #0b3da6;
  --navy: #17243f;
  --ink: #273653;
  --muted: #7081a0;
  --canvas: #f2f5fa;
  --surface: #fff;
  --border: #e2e8f1;
  --success: #138a68;
  --shadow: 0 12px 36px rgba(31, 48, 81, .08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--canvas); color: var(--ink); margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.brand { align-items: center; display: inline-flex; font-size: 1rem; gap: .65rem; }
.brand strong { color: var(--blue); }
.brand-mark { align-items: center; background: linear-gradient(145deg, var(--blue), #65a1ff); border-radius: 10px; color: #fff; display: inline-flex; font-size: .75rem; font-weight: 800; height: 38px; justify-content: center; letter-spacing: -.03em; width: 38px; }
.brand-light { color: #fff; }
.brand-light strong { color: #a8c4ff; }
.eyebrow { color: #8fb1ff; font-size: .72rem; font-weight: 800; letter-spacing: .13em; margin: 0 0 .6rem; }
.eyebrow.blue { color: var(--blue); }
.muted { color: var(--muted); }
.status-pill { background: #e9f0ff; border-radius: 999px; color: var(--blue); font-size: .75rem; font-weight: 700; padding: .45rem .75rem; }

.directory-shell { margin: 0 auto; max-width: 1120px; padding: 2rem 1.25rem 4rem; }
.directory-header { align-items: center; display: flex; justify-content: space-between; }
.directory-intro { max-width: 680px; padding: 7rem 0 3rem; }
.directory-intro h1 { color: var(--navy); font-size: clamp(2.1rem, 5vw, 4rem); letter-spacing: -.055em; line-height: 1.02; margin: 0 0 1rem; }
.directory-intro > p:last-child { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.template-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.template-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); min-height: 250px; padding: 1.5rem; transition: transform .2s, border-color .2s; }
.template-card:hover { border-color: #9ebcff; transform: translateY(-4px); }
.template-card small { color: var(--blue); display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; margin-top: 2rem; text-transform: uppercase; }
.template-card h2 { color: var(--navy); font-size: 1.2rem; margin: .45rem 0; }
.template-card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.template-icon { align-items: center; background: #edf3ff; border-radius: 10px; color: var(--blue); display: inline-flex; font-size: .75rem; font-weight: 800; height: 44px; justify-content: center; width: 44px; }

.login-page { background: #eaf0f8; min-height: 100vh; padding: 4vh 1.25rem; }
.login-shell { background: #fff; border-radius: 18px; box-shadow: 0 25px 80px rgba(21, 39, 74, .16); display: grid; grid-template-columns: .9fr 1.1fr; margin: 0 auto; max-width: 1050px; min-height: 92vh; overflow: hidden; }
.login-showcase { background: linear-gradient(145deg, rgba(11, 48, 122, .98), rgba(23, 97, 253, .94)); color: #fff; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 3rem; position: relative; }
.login-showcase::after { border: 1px solid rgba(255,255,255,.14); border-radius: 50%; bottom: -110px; content: ""; height: 300px; position: absolute; right: -90px; width: 300px; }
.login-copy { position: relative; z-index: 1; }
.login-copy h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.05em; line-height: 1.05; margin: 0 0 1rem; }
.login-copy > p:not(.eyebrow) { color: rgba(255,255,255,.7); line-height: 1.7; }
.feature-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.feature-list li { font-size: .88rem; margin: .9rem 0; }
.feature-list li::before { color: #83e1bb; content: "✓"; font-weight: 800; margin-right: .65rem; }
.login-footnote { color: rgba(255,255,255,.55); font-size: .75rem; }
.login-panel { align-items: center; display: flex; padding: 4rem; }
.login-form-wrap { margin: 0 auto; max-width: 430px; width: 100%; }
.login-form-wrap h2 { color: var(--navy); font-size: 2rem; letter-spacing: -.035em; margin: 0 0 .4rem; }
.login-form-wrap > p.muted { line-height: 1.5; margin-bottom: 2rem; }
.login-form label { display: block; font-size: .85rem; font-weight: 650; margin: 1rem 0 .45rem; }
.login-form input[type="email"], .login-form input[type="password"] { border: 1px solid #d7dfeb; border-radius: 8px; min-height: 48px; padding: .7rem .85rem; width: 100%; }
.label-row { align-items: center; display: flex; justify-content: space-between; }
.label-row small { color: var(--muted); }
.inline-check { align-items: center; display: flex !important; font-weight: 400 !important; gap: .55rem; margin: 1.25rem 0 !important; }
.demo-note { align-items: flex-start; background: #f4f7fb; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; font-size: .78rem; gap: .15rem; margin-top: 1.25rem; padding: .8rem 1rem; }
.demo-note span { color: var(--muted); }
.form-message { color: var(--success); font-size: .8rem; min-height: 1.2rem; }

.button { border: 0; border-radius: 8px; display: inline-flex; font-weight: 700; gap: .5rem; justify-content: center; padding: .78rem 1rem; }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); }
.button-outline { background: transparent; border: 1px solid #b8c7df; color: var(--ink); }
.button-full { width: 100%; }

.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-inner { align-items: center; display: flex; justify-content: space-between; margin: 0 auto; max-width: 1240px; min-height: 70px; padding: 0 1.25rem; }
.header-nav { display: flex; gap: .7rem; }
.header-nav a { border-radius: 7px; color: var(--muted); font-size: .82rem; font-weight: 700; padding: .55rem .75rem; }
.header-nav a:hover, .header-nav a.active { background: #edf3ff; color: var(--blue); }
.page-shell { margin: 0 auto; max-width: 1240px; padding: 2rem 1.25rem 4rem; }
.form-hero { align-items: center; background: linear-gradient(135deg, #17243f, #1761fd); border-radius: 14px; color: #fff; display: flex; justify-content: space-between; margin-bottom: 1.5rem; overflow: hidden; padding: 2rem; position: relative; }
.form-hero.company { background: linear-gradient(135deg, #14333d, #148a9c); }
.form-hero::after { border: 1px solid rgba(255,255,255,.15); border-radius: 50%; content: ""; height: 220px; position: absolute; right: -70px; top: -110px; width: 220px; }
.form-hero-copy { max-width: 720px; position: relative; z-index: 1; }
.form-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.045em; margin: 0 0 .6rem; }
.form-hero p:last-child { color: rgba(255,255,255,.72); line-height: 1.6; margin: 0; }
.static-tag { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .5rem .75rem; position: relative; z-index: 1; }
.form-layout { align-items: start; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .9fr); }
.form-card, .preview-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 5px 20px rgba(39,54,83,.04); margin-bottom: 1.25rem; overflow: hidden; }
.card-heading { align-items: center; border-bottom: 1px solid var(--border); display: flex; gap: .85rem; padding: 1rem 1.25rem; }
.section-number { align-items: center; background: #e9f1ff; border-radius: 9px; color: var(--blue); display: inline-flex; flex: 0 0 36px; font-size: .8rem; font-weight: 800; height: 36px; justify-content: center; }
.card-heading h2 { color: var(--navy); font-size: 1rem; margin: 0 0 .15rem; }
.card-heading p { color: var(--muted); font-size: .75rem; margin: 0; }
.card-body { padding: 1.25rem; }
.field-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: 1.2fr .9fr .7fr; }
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field label, fieldset legend { color: #34425d; display: block; font-size: .84rem; font-weight: 650; margin-bottom: .45rem; }
fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], select, textarea { background: #fff; border: 1px solid #d7dfeb; border-radius: 7px; color: var(--ink); min-height: 44px; padding: .62rem .75rem; width: 100%; }
textarea { line-height: 1.5; min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { border-color: #7aa4ff; box-shadow: 0 0 0 3px rgba(23,97,253,.14); outline: 0; }
.choice-grid { display: grid; gap: .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { align-items: flex-start; background: #f8fafd; border: 1px solid #e4eaf3; border-radius: 7px; display: flex; font-size: .8rem; gap: .55rem; line-height: 1.35; min-height: 44px; padding: .7rem; }
.choice:hover { border-color: #a8c0f5; }
.choice input { flex: 0 0 auto; margin-top: .14rem; }
.conditional { background: #f8fafc; border: 1px dashed #cbd6e7; border-radius: 8px; margin-bottom: 1rem; padding: 1rem; }
.consent-list { display: grid; gap: .65rem; }
.submit-bar { align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); display: flex; justify-content: space-between; padding: 1rem 1.2rem; }
.submit-bar strong, .submit-bar small { display: block; }
.submit-bar small { color: var(--muted); margin-top: .18rem; }
.preview-card { position: sticky; top: 94px; }
.preview-heading { align-items: center; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: 1rem; }
.preview-heading h2 { color: var(--navy); font-size: 1rem; margin: 0; }
.preview-card pre { background: #111c31; border-radius: 8px; color: #bfd3fa; font: .72rem/1.6 Consolas, Monaco, monospace; margin: 1rem; max-height: 66vh; min-height: 260px; overflow: auto; padding: 1rem; white-space: pre-wrap; }
.preview-card:not(.has-payload) .copy-button { display: none; }
.copy-button { margin: 0 1rem 1rem; }

@media (max-width: 900px) {
  .template-grid, .form-layout { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-showcase { min-height: 440px; }
  .preview-card { position: static; }
}

@media (max-width: 640px) {
  .directory-intro { padding-top: 4rem; }
  .login-page { padding: 0; }
  .login-shell { border-radius: 0; }
  .login-showcase, .login-panel { padding: 2rem 1.25rem; }
  .login-copy h1 { font-size: 2.2rem; }
  .header-nav a:first-child { display: none; }
  .form-hero { align-items: flex-start; flex-direction: column; padding: 1.5rem; }
  .field-grid, .field-grid.three, .choice-grid { grid-template-columns: 1fr; }
  .submit-bar { align-items: stretch; flex-direction: column; gap: 1rem; }
}
