/* AdvisorDefense portal. Tokens match the IR Tabletop and Risk Assessment platforms:
   navy #003087 (hover #002070), sky #00A4E4 (decorative only, fails contrast on white),
   Open Sans, 6px controls, 9px cards. */
@font-face { font-family: 'Open Sans'; font-weight: 400; font-display: swap; src: url('/assets/fonts/open-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-display: swap; src: url('/assets/fonts/open-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 700; font-display: swap; src: url('/assets/fonts/open-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #003087; --navy-hover: #002070; --navy-dark: #001f5c; --sky: #00a4e4; --tint: #e1e7ef;
  --text: #1d283a; --muted: #637083; --bg: #f9fafb; --bg-alt: #f0f2f5; --surface: #fff; --border: #dfe2e7;
  --success: #047857; --warning: #b45309; --danger: #b91c1c;
  --shadow: 0 4px 6px -1px rgba(0, 48, 135, 0.06), 0 2px 4px -1px rgba(0, 48, 135, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(0, 48, 135, 0.25);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: 'Open Sans', Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-hover); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 600; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1148px; margin: 0 auto; padding: 0 24px; }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0, 48, 135, 0.06); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 64px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand img { height: 40px; width: auto; display: block; }
.product { color: var(--navy); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.product-strong { font-weight: 700; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; }
.who { color: var(--muted); font-size: 13px; }
.nav a { padding: 8px 14px; border-radius: 6px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--bg-alt); color: var(--navy); }
.nav a[aria-current='page'] { background: var(--tint); color: var(--navy); }
.site-footer { background: var(--navy); color: #fff; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; text-decoration-color: var(--sky); }

/* View-as banner */
.view-as { background: #fffbeb; border-bottom: 1px solid #fde68a; color: #92400e; font-size: 14px; }
.view-as .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.view-as strong { font-weight: 600; }
.view-as button { font: inherit; font-weight: 700; color: #92400e; background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 4px; }

/* Hero: the banner image under a navy tint, darker behind the heading. */
.hero { color: #fff; background-color: var(--navy-dark);
  background-image: linear-gradient(90deg, rgba(0, 31, 92, 0.94) 0%, rgba(0, 48, 135, 0.84) 45%, rgba(0, 48, 135, 0.55) 100%), url('/assets/hero.jpg');
  background-size: cover; background-position: center; }
@media (max-width: 800px) { .hero { background-image: linear-gradient(rgba(0, 31, 92, 0.9), rgba(0, 31, 92, 0.9)), url('/assets/hero-1200.jpg'); } }
.hero .wrap { padding-top: 48px; padding-bottom: 104px; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 24px; height: 3px; background: var(--sky); border-radius: 2px; }
.hero h1 { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.hero .lead { margin: 12px 0 0; font-size: 18px; max-width: 680px; opacity: 0.92; }
.lifted { margin-top: -56px; position: relative; padding-bottom: 64px; }

/* Cards, tiles, buttons */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.tile { display: flex; flex-direction: column; }
.tile h2, .tile h3 { font-size: 18px; margin: 0 0 6px; }
.tile .desc { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 9px; background: var(--tint); color: var(--navy); margin-bottom: 16px; }
.chip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.good { background: var(--success); } .dot.attention { background: var(--warning); } .dot.ready { background: var(--sky); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 6px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(0, 34, 102, 0.2); }
.btn-primary:hover { background: var(--navy-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn-ghost { background: transparent; color: var(--navy); min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--border); }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; background: var(--border); color: var(--muted); border-color: var(--border); box-shadow: none; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.help { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px 28px; }
.help p { margin: 0; }

/* Forms */
label { font-weight: 600; font-size: 15px; display: block; margin-bottom: 6px; }
input[type='email'], input[type='text'], select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--muted); border-radius: 6px; padding: 11px 14px; min-height: 48px; width: 100%; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--tint), 0 0 0 4px var(--navy); }
.field { margin-bottom: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row .field { flex: 1 1 220px; margin: 0; }
.error { color: var(--danger); font-weight: 600; margin: 12px 0 0; }
.ok { color: var(--success); font-weight: 600; margin: 12px 0 0; }
.inline-label { display: inline; font-weight: 400; margin: 0; }
.table-box + .card, .card + .table-box { margin-top: 16px; }

/* Sign-in */
.signin-shell { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 64px 24px; background-color: var(--navy-dark);
  background-image: linear-gradient(rgba(0, 31, 92, 0.78), rgba(0, 31, 92, 0.78)), url('/assets/hero-1200.jpg'); background-size: cover; background-position: center; }
.signin-card { width: 100%; max-width: 440px; text-align: center; padding: 40px 32px 32px; box-shadow: var(--shadow-lg); border: 0; }
.signin-card h1 { font-size: 24px; font-weight: 700; color: var(--navy); }
.signin-card form, .signin-card .left { text-align: left; margin-top: 24px; }
.signin-card .chip { width: 56px; height: 56px; margin-bottom: 20px; }
.signin-foot { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
#turnstile { margin: 0 0 16px; min-height: 0; }

/* Admin */
.section-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { font-size: 20px; margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 9999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 9999px; font-size: 13px; font-weight: 700; color: #fff; background: var(--success); }
.tag.off { background: var(--muted); }
.stack > * + * { margin-top: 32px; }
.table-box { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; background: var(--bg-alt); color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding: 12px 16px; }
td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
td.actions { text-align: right; white-space: nowrap; }
.rows > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 24px; border-top: 1px solid var(--border); }
.rows > div:first-child { border-top: 0; }
.rows .main { flex: 1 1 280px; min-width: 0; }
.rows .main p { margin: 0; }
.mono { font-family: Consolas, 'Courier New', monospace; font-size: 13px; word-break: break-all; }
.notice { display: flex; align-items: center; justify-content: center; padding: 64px 24px; }
.notice .card { max-width: 520px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 28px; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
