/* Case worker portal — shares the main site's tokens and type (index.html) */
:root {
  --bg:         #f0ebe3;
  --bg-soft:    #faf6ec;
  --bg-page:    #ffffff;
  --bg-deep:    #0f2a30;
  --bg-deeper:  #0a161a;
  --ink:        #1a2a2e;
  --ink-2:      #4a5560;
  --ink-3:      #8a8378;
  --rule:       #e4dccb;
  --accent:     #1f9aa0;
  --accent-deep:#157278;
  --accent-soft:#7ec0c4;
  --warm:       #c8825b;
  --warm-deep:  #a5643f;
  --amber:      #c99a2e;
  --shadow-sm:  0 2px 10px rgba(15,42,48,0.06);
  --shadow-md:  0 10px 30px rgba(15,42,48,0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Always reserve the scrollbar's space, so the page doesn't shift sideways
   when a short section (no scrollbar) replaces a long one (scrollbar). */
html { scroll-behavior: smooth; scroll-padding-top: 96px; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; font-weight: 500; letter-spacing: -0.005em; line-height: 1.08; margin: 0; }
em { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--accent); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 760px) { .wrap { padding: 0 20px; } }
.eyebrow { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── buttons (match index.html) ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover:not(:disabled) { background: black; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover:not(:disabled) { background: var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); background: white; }
.btn-light { background: white; color: var(--ink); }
.btn-light:hover:not(:disabled) { background: var(--bg-soft); }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--accent-deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

/* ── top bar ── */
nav.top { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--rule); backdrop-filter: blur(10px); background: rgba(240,235,227,0.92); }
nav.top .inner { display: flex; align-items: center; gap: 20px; padding: 8px 56px; max-width: 1320px; margin: 0 auto; min-height: 68px; }
nav.top .brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
nav.top .brand .brand-h { height: 52px; width: auto; display: block; }
nav.top .brand .brand-i { height: 36px; width: auto; display: none; }
nav.top .portal-tag { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--accent-deep); padding: 5px 10px; border: 1px solid rgba(31,154,160,0.35); border-radius: 999px; background: rgba(31,154,160,0.07); white-space: nowrap; }
nav.top .spacer { flex: 1; }
nav.top .nav-link { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
nav.top .nav-link:hover { color: var(--ink); }
nav.top .quick { background: var(--ink); color: white; padding: 8px 16px; border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
nav.top .quick:hover { background: black; }
nav.top .user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); min-width: 0; }
nav.top .user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-deep); color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; flex-shrink: 0; }
nav.top .user-chip .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
nav.top .user-chip .who strong { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
nav.top .user-chip .who span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }
nav.top .signout { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 7px 12px; cursor: pointer; font: 600 12px/1 'Inter', sans-serif; color: var(--ink-2); letter-spacing: 0.06em; white-space: nowrap; }
nav.top .signout:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 1080px) { nav.top .user-chip .who { display: none; } }
@media (max-width: 760px) {
  nav.top .inner { padding: 10px 20px; gap: 12px; min-height: 60px; }
  nav.top .portal-tag { display: none; }
  nav.top .nav-link.hide-sm { display: none; }
}
@media (max-width: 500px) {
  nav.top .brand .brand-h { display: none; }
  nav.top .brand .brand-i { display: block; }
  nav.top .signout .lbl { display: none; }
  nav.top .signout { padding: 7px 9px; }
  nav.top .user-chip { display: none; }
}

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.field .hint { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 6px; padding: 11px 14px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: white;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,154,160,0.14); }
.field.invalid input, .field.invalid select { border-color: var(--warm); box-shadow: 0 0 0 3px rgba(200,130,91,0.14); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
/* Side-by-side fields share a height, so a label that wraps to two lines
   doesn't push its input lower than its neighbour's. */
.field-row > .field > label:first-child { flex-grow: 1; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 4px 0 18px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.alert { border-radius: 6px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.alert[hidden] { display: none; }
.alert-error { background: #fbf0ea; border: 1px solid #ecc8b4; color: #7a3f1f; }
.alert-ok { background: #ebf6f6; border: 1px solid #b9dfe0; color: #0f4f53; }

/* ── disclaimer ── */
.disclaimer { display: flex; gap: 12px; background: #fbf4ec; border: 1px solid #ecd9c6; border-left: 3px solid var(--warm); border-radius: 6px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: #5d4433; margin-bottom: 22px; }
.disclaimer svg { flex-shrink: 0; color: var(--warm); margin-top: 2px; }
.disclaimer strong { color: #3f2c20; }

/* ── footer ── */
footer.pfoot { background: var(--bg-deeper); color: rgba(255,255,255,0.62); padding: 44px 0 32px; font-size: 13px; line-height: 1.6; }
footer.pfoot a { color: rgba(255,255,255,0.8); text-decoration: none; }
footer.pfoot a:hover { color: white; }
footer.pfoot .cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.10); margin-bottom: 22px; }
footer.pfoot .brand img { height: 40px; width: auto; display: block; margin-bottom: 14px; }
footer.pfoot h5 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin: 0 0 12px; font-weight: 600; }
footer.pfoot ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
footer.pfoot .legal { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,0.45); }
@media (max-width: 760px) { footer.pfoot .cols { grid-template-columns: 1fr; } }
