:root {
  --ink: #101820;
  --navy: #111923;
  --navy-soft: #1d2a36;
  --steel: #536f88;
  --steel-light: #9aafc0;
  --brass: #b7904f;
  --paper: #ecebe7;
  --white: #fff;
  --muted: #6e7b83;
  --line: rgba(16, 24, 32, .14);
  --shadow: 0 24px 70px rgba(8, 20, 28, .16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header, .portal-header {
  position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 12px max(24px, calc((100vw - 1160px) / 2));
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(16, 24, 32, .95); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-seal { width: 48px; height: 48px; border: 1px solid var(--brass); display: grid; place-items: center; color: #d2b67e; font: 800 12px/1 Georgia, serif; letter-spacing: .11em; clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%); background: rgba(183,144,79,.08); }
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font: 700 16px/1.1 Georgia, serif; letter-spacing: .025em; }
.brand small { color: #acbbc4; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 25px; }
.site-nav a { color: #dce5e8; text-decoration: none; font-size: 14px; }
.site-nav a:hover { color: #d2b67e; }
.site-nav .nav-login { padding: 11px 16px; border: 1px solid var(--brass); color: #d2b67e; }
.menu-button { display: none; border: 1px solid rgba(255,255,255,.25); color: white; background: transparent; padding: 9px 12px; }

.hero { position: relative; overflow: hidden; color: var(--white); background: #0d1218; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: url('/assets/hero-nsb-operations-v1.png') center center / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(7,11,15,.98) 0%, rgba(9,14,19,.9) 34%, rgba(11,17,23,.46) 67%, rgba(8,12,16,.28) 100%), linear-gradient(0deg, rgba(5,8,11,.7), transparent 48%); }
.hero-grid { position: absolute; inset: 0; z-index: 2; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg, transparent, #000); }
.hero-layout { position: relative; z-index: 3; min-height: 640px; padding: 100px 0 88px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr); gap: 80px; align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--steel-light); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow.dark { color: #465f75; }
.hero h1 { margin: 0; max-width: 790px; font: 700 clamp(46px, 6vw, 76px)/1.02 Georgia, serif; letter-spacing: -.04em; }
.hero h1 span { color: #c6a05b; }
.hero-lead { max-width: 700px; margin: 28px 0 0; color: #d2dde1; font-size: 19px; line-height: 1.7; }
.button-row { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }
.button { min-height: 46px; padding: 0 19px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--brass); color: #17130d; }
.button.primary:hover { background: #c9a760; }
.button.secondary { border-color: rgba(255,255,255,.34); background: transparent; color: var(--white); }
.button.small { min-height: 38px; padding: 0 14px; }
.button.disabled, .button:disabled { opacity: .55; cursor: not-allowed; }
.fiction-note { margin: 22px 0 0; color: #91a2aa; font-size: 12px; }
.briefing-card { padding: 30px; border: 1px solid rgba(154,175,192,.3); background: rgba(9,15,21,.76); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.briefing-label { display: flex; align-items: center; gap: 10px; color: #d2b67e; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.briefing-label span { width: 24px; height: 2px; background: var(--brass); }
.briefing-card dl { margin: 28px 0; display: grid; gap: 0; }
.briefing-card dl div { padding: 16px 0; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.13); }
.briefing-card dt { color: #91a7b0; }
.briefing-card dd { margin: 0; font-weight: 800; }
.briefing-card p { margin: 0; color: #b9c7cc; line-height: 1.65; }

.status-strip { background: #0d171d; color: white; }
.status-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.status-grid > div { padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; border-right: 1px solid rgba(255,255,255,.1); }
.status-grid > div:first-child { padding-left: 0; }
.status-grid strong { font-size: 14px; }
.status-grid small { grid-column: 2; color: #8fa1aa; line-height: 1.4; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 5px rgba(183,144,79,.12); align-self: center; }

.section { padding: 100px 0; }
.split-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.section h2 { margin: 0; font: 700 clamp(38px, 5vw, 61px)/1.05 Georgia, serif; letter-spacing: -.035em; }
.body-copy p, .section-heading > p:last-child { color: #56646b; font-size: 18px; line-height: 1.75; }
.body-copy p:first-child { margin-top: 0; }
.operations { background: var(--navy); color: var(--white); }
.section-heading { max-width: 760px; }
.operations .section-heading > p:last-child { color: #b8c5ca; }
.card-grid { margin-top: 46px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(255,255,255,.14); }
.card-grid article { min-height: 270px; padding: 28px; border-right: 1px solid rgba(255,255,255,.14); }
.card-grid article:last-child { border-right: 0; }
.card-grid article > span { color: #d2b67e; font-size: 12px; letter-spacing: .15em; }
.card-grid h3 { margin: 70px 0 12px; font: 700 24px/1.15 Georgia, serif; }
.card-grid p { color: #b8c5ca; line-height: 1.55; }
.standards { background: #e7e4dc; }
.standards-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 90px; align-items: start; }
.standards-panel { position: sticky; top: 120px; }
.standards-panel > p:last-child { color: #59666c; font-size: 18px; line-height: 1.7; }
.standards-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.standards-list li { padding: 28px 0; display: grid; grid-template-columns: 50px 1fr; gap: 20px; border-bottom: 1px solid var(--line); }
.standards-list li > span { color: #806536; font-weight: 800; }
.standards-list strong { font: 700 23px/1.2 Georgia, serif; }
.standards-list p { margin: 7px 0 0; color: #66747b; }
.join { background: var(--ink); color: white; }
.join-card { display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.join-card p:last-child { max-width: 680px; color: #b7c2c7; font-size: 17px; line-height: 1.65; }
footer { padding: 34px 0; background: #080f13; color: #8fa0a8; }
.footer-layout { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.footer-layout div { display: grid; gap: 4px; }
.footer-layout strong { color: white; }
.footer-layout p { font-size: 12px; }

.portal-page { min-height: 100vh; color: white; background: linear-gradient(135deg, #0c1117, #182431 70%, #101820); }
.portal-header-actions { display: flex; align-items: center; gap: 10px; }
.portal-header-actions form { margin: 0; }
.portal-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 80px 0; }
.portal-intro { display: flex; justify-content: space-between; align-items: end; gap: 50px; }
.portal-intro > div { max-width: 720px; }
.portal-intro h1 { margin: 0; font: 700 clamp(43px, 6vw, 72px)/1 Georgia, serif; letter-spacing: -.04em; }
.portal-intro p:last-child { color: #b7c6cb; font-size: 18px; line-height: 1.7; }
.portal-login .button { flex: 0 0 auto; }
.portal-alert { margin: 24px 0 0; padding: 18px 22px; border: 1px solid rgba(206,118,92,.55); background: rgba(118,45,29,.22); }
.portal-alert p { margin: 5px 0 0; color: #e2c2b8; }
.employee-identity { display: flex; align-items: center; gap: 22px; }
.employee-identity img, .employee-avatar-fallback { width: 80px; height: 80px; flex: 0 0 80px; border-radius: 50%; border: 1px solid rgba(210,182,126,.55); background: #131d25; object-fit: cover; }
.employee-avatar-fallback { display: grid; place-items: center; color: #d2b67e; font: 800 15px/1 Georgia, serif; letter-spacing: .1em; }
.agent-dashboard-hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; padding: 30px; background: linear-gradient(135deg, rgba(25,38,49,.98), rgba(12,19,26,.98)); border: 1px solid rgba(183,144,79,.34); box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.agent-overview { min-width: 0; padding: 12px 6px 6px; }
.agent-overview .employee-identity h1 { margin: 0; font: 700 clamp(32px, 5vw, 58px)/1.02 Georgia, serif; letter-spacing: -.035em; }
.agent-overview .employee-identity p { margin: 8px 0 0; color: #d2b67e; font-weight: 750; }
.agent-summary-pills { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.agent-summary-pills span { padding: 7px 10px; color: #d9e3e7; background: rgba(83,111,136,.18); border: 1px solid rgba(154,175,192,.25); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.agent-identity-grid { margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.13); border-left: 1px solid rgba(255,255,255,.13); }
.agent-identity-grid div { min-width: 0; padding: 17px; border-right: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.025); }
.agent-identity-grid dt { margin: 0 0 7px; color: #8fa3ae; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.agent-identity-grid dd { margin: 0; overflow-wrap: anywhere; color: #f3f6f7; font-weight: 760; font-variant-numeric: tabular-nums; }
.agent-credentials { display: grid; align-content: start; gap: 16px; }
.agent-rank-badge, .agent-plate-card { margin: 0; padding: 18px; background: rgba(4,9,13,.54); border: 1px solid rgba(255,255,255,.12); }
.agent-rank-badge { min-height: 330px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; justify-items: center; }
.agent-rank-badge > span, .agent-plate-card > span { justify-self: start; color: #8fa3ae; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.agent-rank-badge img { width: 100%; height: 246px; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(0,0,0,.4)); }
.agent-rank-badge figcaption { max-width: 100%; color: #f0d9a8; font: 700 18px/1.15 Georgia, serif; text-align: center; }
.agent-rank-badge-fallback { width: 175px; height: 210px; align-self: center; position: relative; display: grid; place-items: center; color: #d2b67e; background: radial-gradient(circle at 50% 42%, #263b50 0 31%, #0d1720 32% 49%, #b7904f 50% 53%, #111c26 54%); border: 2px solid #b7904f; clip-path: polygon(50% 0, 91% 13%, 100% 58%, 76% 91%, 50% 100%, 24% 91%, 0 58%, 9% 13%); }
.agent-rank-badge-fallback::before { content: ""; position: absolute; inset: 35px; border: 2px solid rgba(255,255,255,.65); transform: rotate(45deg); }
.agent-rank-badge-fallback b { position: relative; z-index: 1; font: 800 25px/1 Georgia, serif; letter-spacing: .12em; }
.agent-plate-card { display: grid; gap: 11px; }
.agent-plate-card small { color: #81949e; text-align: center; font-size: 11px; }
.nsb-license-plate { position: relative; width: 100%; aspect-ratio: 500 / 244; overflow: hidden; border-radius: 8px; background: url('/assets/ca-exempt-plate-blank.webp') center / cover no-repeat; box-shadow: 0 10px 18px rgba(0,0,0,.35); color: #111b37; }
.nsb-license-plate strong { position: absolute; left: 50%; top: 64%; width: 114%; transform: translate(-50%, -50%) scaleX(.78); transform-origin: center; color: #101a36; font-family: "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif; font-size: clamp(31px, 4.2vw, 48px); font-variant-numeric: tabular-nums; font-weight: 800; line-height: 1; letter-spacing: 0; text-align: center; white-space: nowrap; -webkit-text-stroke: .35px rgba(7,15,34,.42); text-shadow: 1px 1px 0 rgba(255,255,255,.96), -1px -1px 0 rgba(7,15,34,.34), 0 2px 1px rgba(7,13,27,.3); }
.nsb-license-plate.unavailable { filter: grayscale(.8); opacity: .68; }
.nsb-license-plate.unavailable strong { font-family: inherit; font-size: 12px; letter-spacing: .08em; }
.resource-directory-card { min-height: 0; }
.employee-resource-links { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.employee-resource-links a { min-width: 0; padding: 16px; display: grid; gap: 6px; text-decoration: none; background: rgba(83,111,136,.11); border: 1px solid rgba(154,175,192,.2); }
.employee-resource-links a:hover { border-color: rgba(210,182,126,.58); background: rgba(183,144,79,.1); }
.employee-resource-links strong { overflow-wrap: anywhere; }
.employee-resource-links small { color: #8fa3ae; text-transform: uppercase; letter-spacing: .1em; }
.portal-notice { margin: 42px 0 24px; padding: 20px 24px; display: flex; gap: 18px; align-items: center; background: rgba(83,111,136,.12); border: 1px solid rgba(154,175,192,.28); }
.portal-notice p { margin: 4px 0 0; color: #aebdc3; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dashboard-card { min-height: 220px; padding: 28px; position: relative; overflow: hidden; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.13); }
.dashboard-card.wide { grid-column: 1 / -1; }
.dashboard-card > span { color: #d2b67e; font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.dashboard-card h2 { margin: 28px 0 10px; font: 700 29px/1 Georgia, serif; }
.dashboard-card p { max-width: 650px; color: #aebdc3; line-height: 1.6; }
.dashboard-card b { position: absolute; right: 22px; top: 22px; padding: 7px 9px; color: #a4b4bb; border: 1px solid rgba(255,255,255,.14); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.employee-record { margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.12); }
.employee-record div { min-width: 0; padding: 18px; background: #17232d; }
.employee-record dt { margin-bottom: 7px; color: #8fa3ae; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.employee-record dd { margin: 0; overflow-wrap: anywhere; font-weight: 750; }
.skeleton-lines { margin-top: 24px; display: grid; gap: 10px; }
.skeleton-lines i { display: block; height: 10px; width: 70%; background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(83,111,136,.24), rgba(255,255,255,.06)); }
.skeleton-lines i:nth-child(2) { width: 48%; }.skeleton-lines i:nth-child(3) { width: 60%; }

@media (max-width: 850px) {
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; left: 20px; right: 20px; top: 70px; padding: 20px; align-items: stretch; flex-direction: column; background: #101a21; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .hero-layout, .split-layout, .standards-layout { grid-template-columns: 1fr; gap: 45px; }
  .hero-layout { padding: 74px 0; }
  .hero::before { background-position: 62% center; }
  .status-grid, .card-grid { grid-template-columns: 1fr 1fr; }
  .status-grid > div:first-child { padding-left: 24px; }
  .card-grid article { border-bottom: 1px solid rgba(255,255,255,.14); }
  .standards-panel { position: static; }
  .portal-intro { align-items: start; flex-direction: column; }
  .agent-dashboard-hero { grid-template-columns: 1fr; }
  .agent-credentials { grid-template-columns: minmax(250px, 1fr) minmax(250px, 1fr); }
  .agent-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-resource-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-record { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .container, .portal-main { width: min(100% - 28px, 1160px); }
  .site-header, .portal-header { padding: 10px 14px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 9px; }
  .brand-seal { width: 41px; height: 41px; }
  .hero h1 { font-size: 50px; }
  .hero-layout { min-height: auto; }
  .status-grid, .card-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .card-grid article { min-height: 220px; border-right: 0; }
  .card-grid h3 { margin-top: 42px; }
  .join-card, .footer-layout { align-items: start; flex-direction: column; }
  .dashboard-card.wide { grid-column: auto; }
  .section { padding: 72px 0; }
  .portal-header-actions { gap: 6px; }
  .portal-header-actions .button { padding: 0 10px; font-size: 12px; }
  .agent-dashboard-hero { padding: 18px; }
  .agent-overview { padding: 4px 0; }
  .agent-overview .employee-identity { align-items: flex-start; flex-direction: column; }
  .agent-identity-grid, .agent-credentials, .employee-resource-links { grid-template-columns: 1fr; }
  .agent-rank-badge { min-height: 300px; }
  .agent-rank-badge img { height: 220px; }
  .employee-record { grid-template-columns: 1fr; }
}
