:root {
  color-scheme: light;
  --navy: #062f5f;
  --navy-hover: #0c4179;
  --coral: #ff5b45;
  --cream: #f6f2e9;
  --paper: #fffdf9;
  --muted: #576674;
  --line: #dfded8;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
h1, h2, p { margin: 0; }
form { margin: 0; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 5px; }
.site-header :focus-visible, .login-hero :focus-visible { outline-color: var(--paper); }
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 16px;
  padding: 11px 18px;
  transform: translateY(-170%);
  border-radius: 6px;
  background: var(--paper);
  color: var(--navy);
  font-weight: 600;
}
.skip-link:focus { transform: translateY(0); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .075em;
  line-height: 1.5;
  text-transform: uppercase;
}
.eyebrow-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
h1 { font-size: clamp(2.5rem, 4.2vw, 3.5rem); font-weight: 650; line-height: 1.08; letter-spacing: -.05em; }
.intro { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.button-primary { background: var(--navy); color: var(--paper); }
.button-primary:hover { background: var(--navy-hover); }
.button-quiet { background: transparent; border-color: #7189a5; color: var(--paper); }
.button-quiet:hover { background: #123e6c; border-color: #9aadc1; }

/* Login: a generous brand panel and a focused form. */
.login-layout { flex: 1; display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); }
.login-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(36px, 4.5vw, 72px);
  background: var(--navy);
  color: var(--paper);
}
.hero-brand { position: relative; z-index: 1; display: block; width: min(100%, 410px); border-radius: 4px; }
.hero-logo { width: 100%; }
.hero-logo-mobile { display: none; }
.hero-message { position: relative; z-index: 1; margin-top: clamp(75px, 13vh, 150px); padding-bottom: 260px; }
.hero-accent { display: block; width: 42px; height: 5px; margin-bottom: 25px; border-radius: 3px; background: var(--coral); }
.hero-slogan { font-size: clamp(2.6rem, 4.2vw, 4.4rem); font-weight: 550; letter-spacing: -.055em; line-height: 1.08; }
.hero-caption { margin-top: 22px; color: #d5dfeb; font-size: .95rem; }
.hero-skyline { position: absolute; bottom: -2px; left: 0; width: 100%; max-width: none; opacity: .17; pointer-events: none; }
.login-panel { min-width: 0; display: flex; flex-direction: column; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 64px 44px 34px; }
.login-card { width: min(100%, 390px); }
.login-card h1 { margin-top: 23px; font-size: clamp(2.6rem, 4vw, 3.35rem); }
.login-card .intro { margin-top: 21px; max-width: 350px; }
.login-form { margin-top: 34px; }
.form-field + .form-field { margin-top: 23px; }
.form-field label { display: block; margin-bottom: 9px; font-size: .85rem; font-weight: 650; }
.form-field input {
  width: 100%;
  min-height: 53px;
  padding: 13px 15px;
  border: 1px solid #7b8995;
  border-radius: 8px;
  background: var(--paper);
  color: var(--navy);
  transition: border-color 150ms ease;
}
.form-field input:hover { border-color: #5e7182; }
.form-field input:focus { border-color: var(--navy); }
.login-submit { width: 100%; min-height: 54px; margin-top: 30px; justify-content: space-between; padding-right: 19px; padding-left: 20px; }
.form-error { margin-top: 24px; padding: 13px 15px; border: 1px solid #e6b7ae; border-radius: 8px; background: #ffefeb; color: #8b2b1c; font-size: .875rem; }
.form-error:empty { display: none; }
.private-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 23px; color: var(--muted); font-size: .75rem; }
.site-footer { padding: 25px 24px 29px; color: var(--muted); font-size: .73rem; text-align: center; }
.site-footer strong { color: var(--navy); font-weight: 650; letter-spacing: .035em; }

/* Portal */
.site-header { background: var(--navy); color: var(--paper); }
.header-inner { width: min(100% - 80px, 1160px); min-height: 111px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; }
.header-brand-group { min-width: 0; display: flex; align-items: center; gap: 29px; }
.brand-link { display: block; width: 300px; border-radius: 4px; }
.header-logo { width: 100%; }
.site-product { padding: 3px 0 3px 27px; border-left: 1px solid #54708e; color: #d5dfeb; font-size: .9rem; letter-spacing: .02em; }
.logout-form { flex-shrink: 0; }
.portal-main { flex: 1; width: min(100% - 80px, 1160px); margin: 0 auto; padding: 61px 0 56px; }
.portal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.portal-heading-copy { min-width: 0; }
.portal-heading h1 { margin-top: 21px; }
.portal-heading .intro { margin-top: 21px; }
.session-user { flex-shrink: 0; display: flex; align-items: center; gap: 12px; max-width: 280px; padding-bottom: 4px; }
.session-avatar { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #dbd9d1; border-radius: 50%; background: var(--paper); }
.session-user p { min-width: 0; }
.session-user p > span { display: block; color: var(--muted); font-size: .73rem; }
.session-user strong { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: .9rem; font-weight: 650; }
.locations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.location-card { min-width: 0; display: flex; flex-direction: column; min-height: 334px; padding: 30px 33px 26px; border: 1px solid #e1e0d8; border-radius: 15px; background: var(--paper); text-decoration: none; transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease; }
.location-card:hover { transform: translateY(-4px); border-color: #b2b9bc; box-shadow: 0 12px 30px rgb(6 47 95 / 6%); }
.location-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.camera-symbol { width: 57px; height: 57px; display: flex; align-items: center; justify-content: center; border: 1px solid #e7e2d8; border-radius: 12px; background: var(--cream); }
.recorder-label { color: var(--muted); font-size: .75rem; }
.recorder-label span { margin-left: 3px; color: var(--navy); font-variant-numeric: tabular-nums; font-weight: 650; }
.location-card h2 { margin-top: 29px; font-size: clamp(2rem, 3vw, 2.55rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.15; }
.location-description { margin-top: 10px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.location-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 27px; padding-top: 20px; border-top: 1px solid #e7e4dc; font-size: .9rem; font-weight: 650; }
.arrow-circle { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--coral); color: var(--navy); }
.arrow-circle svg { transition: transform 170ms ease; }
.location-card:hover .arrow-circle svg { transform: translateX(2px); }
.access-note { display: flex; align-items: center; gap: 13px; margin-top: 27px; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.note-icon { flex-shrink: 0; color: var(--navy); }
.portal-footer { width: min(100% - 80px, 1160px); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 auto; padding: 23px 0 27px; border-top: 1px solid #dfded6; text-align: left; }
.portal-footer > span { color: var(--navy); font-size: .75rem; }

/* The same visual language covers temporary recorder outages. */
.offline-page { align-items: center; justify-content: center; padding: 32px 20px; }
.offline-card { width: min(100%, 600px); padding: clamp(28px, 6vw, 50px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.offline-card .brand-logo { width: min(100%, 320px); margin-bottom: 42px; }
.offline-card .eyebrow { margin-bottom: 18px; }
.offline-card h1 { margin-bottom: 21px; font-size: clamp(2.2rem, 6vw, 3rem); }
.offline-card p { color: var(--muted); line-height: 1.7; }
.offline-card p + p { margin-top: 22px; }
.offline-card .button-primary { min-height: 48px; color: var(--paper); }
.offline-card > .button { margin-top: 28px; }

@media (max-width: 1080px) {
  .login-hero { padding: 38px; }
  .hero-message { margin-top: 95px; }
  .hero-slogan { font-size: 3.3rem; }
  .login-main { padding-right: 34px; padding-left: 34px; }
  .header-inner, .portal-main, .portal-footer { width: calc(100% - 64px); }
  .header-brand-group { gap: 22px; }
  .site-product { padding-left: 22px; }
  .portal-heading { align-items: flex-start; }
  .session-user { margin-top: 2px; max-width: 220px; }
}
@media (max-width: 840px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); }
  .login-hero { min-height: 0; padding: 26px 32px; }
  .hero-brand { width: min(100%, 300px); }
  .hero-logo { display: none; }
  .hero-logo-mobile { display: block; width: 100%; }
  .hero-message, .hero-skyline { display: none; }
  .login-main { padding: 47px 28px 28px; }
  .login-card { width: min(100%, 420px); }
  .login-card h1 { font-size: 2.8rem; }
  .login-panel .site-footer { padding-top: 27px; }
  .site-product { display: none; }
  .portal-heading { flex-direction: column; gap: 23px; margin-bottom: 29px; }
  .session-user { max-width: 100%; padding-bottom: 0; }
  .session-user p > span, .session-user strong { display: inline; font-size: .8rem; }
  .session-user strong { margin-left: 5px; }
  .session-avatar { width: 36px; height: 36px; }
  .session-avatar svg { width: 19px; height: 19px; }
  .locations { gap: 19px; }
  .location-card { padding: 25px 25px 22px; }
}
@media (max-width: 640px) {
  .header-inner, .portal-main, .portal-footer { width: calc(100% - 40px); }
  .header-inner { min-height: 88px; gap: 16px; }
  .header-brand-group { flex: 1; }
  .brand-link { width: min(100%, 220px); }
  .button-quiet { width: 44px; min-height: 44px; padding: 10px; }
  .logout-label { display: none; }
  .portal-main { padding-top: 35px; padding-bottom: 34px; }
  .portal-heading h1 { margin-top: 19px; font-size: 2.65rem; }
  .portal-heading .intro { margin-top: 18px; font-size: .95rem; }
  .locations { grid-template-columns: minmax(0, 1fr); }
  .location-card { min-height: 308px; padding: 25px 25px 23px; }
  .location-card h2 { margin-top: 25px; font-size: 2.2rem; }
  .location-description { max-width: 250px; }
  .location-action { margin-top: 24px; padding-top: 16px; }
  .access-note { align-items: flex-start; margin-top: 24px; font-size: .8rem; }
  .note-icon { margin-top: 2px; }
  .portal-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 20px; padding-bottom: 24px; }
}
@media (max-width: 400px) {
  .login-hero { padding: 25px 23px; }
  .hero-brand { width: min(100%, 280px); }
  .login-main { padding: 37px 23px 23px; }
  .login-card h1 { margin-top: 19px; font-size: 2.5rem; }
  .login-card .intro { margin-top: 18px; font-size: .95rem; }
  .login-form { margin-top: 29px; }
  .private-note { font-size: .7rem; }
  .header-inner, .portal-main, .portal-footer { width: calc(100% - 36px); }
  .location-card { padding-right: 23px; padding-left: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .location-card:hover, .location-card:hover .arrow-circle svg { transform: none; }
}
