/* ==========================================================================
   Life Line Nursing Home — Digital Management System
   Custom theme layer on top of Tailwind.

   Tailwind (Play CDN) supplies the utilities; this file supplies the
   component classes, the decorative layers Tailwind cannot express, the
   motion system and the print stylesheet.
   ========================================================================== */

:root {
  --header-h: 68px;

  --ink: #08211E;
  --body: #41565C;
  --muted: #6B8189;
  --primary: #0E9F8E;
  --primary-deep: #065F55;
  --primary-soft: #E6F7F4;
  --accent: #F59E0B;
  --accent-soft: #FEF4E2;
  --accent-ink: #8A5206;
  --page: #FAFCFB;
  --line: #E2EDEA;

  --shadow-card: 0 1px 2px rgba(6, 95, 85, .05), 0 12px 32px -14px rgba(6, 95, 85, .16);
  --shadow-lift: 0 2px 4px rgba(6, 95, 85, .06), 0 22px 48px -18px rgba(6, 95, 85, .26);

  --ease: cubic-bezier(.22, .68, 0, 1);
}

@media (min-width: 1024px) {
  :root { --header-h: 76px; }
}

/* Anchors must clear the sticky header. */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body { overflow-x: hidden; }
body.is-locked { overflow: hidden; }

::selection { background: rgba(14, 159, 142, .18); color: var(--ink); }

/* Consistent, visible keyboard focus everywhere. */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* Grid and flex items default to min-width:auto, so they refuse to shrink
   below their content's intrinsic width. A nested scroll rail or a long
   unbroken title then drags the whole column wider than its track and the
   page scrolls sideways on mobile. :where() keeps specificity at zero, so an
   explicit min-w-* utility still wins wherever one is actually wanted. */
:where(.grid, .flex) > * { min-width: 0; }

/* A `hidden` attribute must always win over a display declaration. Both
   Tailwind's display utilities (.grid, .flex) and our own component classes
   (.to-top, .drawer, .btn-ghost) otherwise out-rank the [hidden] selector on
   source order, leaving JS-hidden controls visible. The one deliberate
   exception is the print rule for .module-panel[hidden], which is more
   specific and still wins. */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -160%);
  z-index: 90;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  background: var(--primary-deep);
  color: #fff;
  font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-lift);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Scroll progress + header
   -------------------------------------------------------------------------- */
.progress-bar {
  position: fixed; inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.progress-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform-origin: left;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 252, 251, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px -22px rgba(6, 95, 85, .55);
  background: rgba(250, 252, 251, .93);
}

.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 8px 18px -8px rgba(14, 159, 142, .7);
  transition: transform .25s var(--ease);
}
.group:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-mark-dark { box-shadow: none; }

.nav-link {
  position: relative;
  padding: .55rem .85rem;
  border-radius: 10px;
  font-size: 14.5px; font-weight: 600;
  color: var(--body);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(14, 159, 142, .07); }
.nav-link.is-active { color: var(--primary-deep); }
.nav-link.is-active::after {
  content: '';
  position: absolute; left: .85rem; right: .85rem; bottom: .18rem;
  height: 2px; border-radius: 2px;
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-outline,
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: 12px;
  font-size: 15px; font-weight: 700;
  line-height: 1;
  min-height: 46px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-sm { padding: .6rem 1rem; min-height: 40px; font-size: 14px; border-radius: 10px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 14px 30px -14px rgba(14, 159, 142, .8);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(14, 159, 142, .85); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(6, 95, 85, .05);
}
.btn-outline:hover { border-color: rgba(14, 159, 142, .45); color: var(--primary-deep); transform: translateY(-2px); }

.btn-ghost { color: var(--primary-deep); background: var(--primary-soft); }
.btn-ghost:hover { background: rgba(14, 159, 142, .16); }

/* --------------------------------------------------------------------------
   Mobile drawer
   -------------------------------------------------------------------------- */
.drawer-trigger {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.drawer-trigger:hover { background: var(--primary-soft); border-color: rgba(14, 159, 142, .3); }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 33, 30, .42);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; }

.drawer {
  position: fixed; inset: 0 0 0 auto; z-index: 80;
  display: flex; flex-direction: column;
  width: min(87vw, 340px);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -30px rgba(6, 95, 85, .5);
  transform: translateX(100%);
  transition: transform .32s var(--ease);
}
.drawer.is-open { transform: translateX(0); }

.drawer-link {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  padding: .95rem 1rem;
  min-height: 48px;
  border-radius: 12px;
  font-size: 15.5px; font-weight: 600;
  color: var(--body);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.drawer-link:hover { background: var(--primary-soft); color: var(--ink); }
.drawer-link.is-active { background: var(--primary-soft); color: var(--primary-deep); }

/* --------------------------------------------------------------------------
   Surfaces and typography helpers
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}
.card-hover { transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease); }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(14, 159, 142, .28); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem .4rem .7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(14, 159, 142, .16);
  color: var(--primary-deep);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 159, 142, .18);
}
.eyebrow-amber {
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, .25);
  color: var(--accent-ink);
}
.eyebrow-amber .eyebrow-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }

.tag-muted {
  display: inline-flex; align-items: center;
  padding: .2rem .55rem;
  border-radius: 6px;
  background: #F2F7F5;
  color: var(--muted);
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em;
}

.icon-tile {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  border: 1px solid rgba(14, 159, 142, .14);
  flex-shrink: 0;
}
.icon-tile-amber { color: var(--accent-ink); background: var(--accent-soft); border-color: rgba(245, 158, 11, .22); }

/* Horizontally scrollable rails (timelines, steppers, chip flows). */
.scroll-rail {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 159, 142, .35) transparent;
  padding-bottom: 4px;
}
.scroll-rail::-webkit-scrollbar { height: 6px; }
.scroll-rail::-webkit-scrollbar-track { background: transparent; }
.scroll-rail::-webkit-scrollbar-thumb { background: rgba(14, 159, 142, .3); border-radius: 999px; }
.scroll-rail::-webkit-scrollbar-thumb:hover { background: rgba(14, 159, 142, .5); }

/* --------------------------------------------------------------------------
   Decorative backgrounds
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(58% 46% at 12% 0%, rgba(14, 159, 142, .17) 0%, transparent 62%),
    radial-gradient(46% 40% at 92% 8%, rgba(245, 158, 11, .15) 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(56, 189, 248, .09) 0%, transparent 62%);
}
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(6, 95, 85, .13) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(78% 62% at 50% 24%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(78% 62% at 50% 24%, #000 0%, transparent 78%);
}

.band-dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #063E37 0%, var(--primary-deep) 45%, #04302B 100%);
  color: #fff;
}
.band-dark::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(72% 70% at 50% 40%, #000 0%, transparent 76%);
  -webkit-mask-image: radial-gradient(72% 70% at 50% 40%, #000 0%, transparent 76%);
  pointer-events: none;
}
.band-dark > * { position: relative; z-index: 1; }

.band-amber {
  position: relative;
  background:
    radial-gradient(52% 44% at 8% 0%, rgba(245, 158, 11, .16) 0%, transparent 60%),
    radial-gradient(48% 40% at 96% 96%, rgba(245, 158, 11, .11) 0%, transparent 60%),
    #FFFDF8;
  border-block: 1px solid rgba(245, 158, 11, .18);
}

.band-soft {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(14, 159, 142, .07) 0%, transparent 62%),
    #F5FAF8;
  border-block: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Module explorer
   -------------------------------------------------------------------------- */
.filter-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(250, 252, 251, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.filter-tab {
  flex-shrink: 0;
  padding: .55rem 1rem;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--body);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.filter-tab:hover { border-color: rgba(14, 159, 142, .4); color: var(--primary-deep); }
.filter-tab[aria-pressed="true"] {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(14, 159, 142, .9);
}

.search-field {
  width: 100%;
  padding: .8rem 1rem .8rem 2.75rem;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(6, 95, 85, .05);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus {
  outline: none;
  border-color: rgba(14, 159, 142, .55);
  box-shadow: 0 0 0 4px rgba(14, 159, 142, .12);
}

.module-card { overflow: hidden; transition: box-shadow .28s var(--ease), border-color .28s var(--ease); }
.module-card:hover { border-color: rgba(14, 159, 142, .3); box-shadow: var(--shadow-lift); }
.module-card.is-open { border-color: rgba(14, 159, 142, .38); box-shadow: var(--shadow-lift); }
.module-card[hidden] { display: none; }

.module-toggle {
  display: flex; align-items: flex-start; gap: 1rem;
  width: 100%;
  padding: 1.25rem;
  text-align: left;
}
@media (min-width: 640px) { .module-toggle { padding: 1.4rem 1.5rem; } }

.module-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  border: 1px solid rgba(14, 159, 142, .14);
  transition: transform .28s var(--ease), background .28s var(--ease), color .28s var(--ease);
}
.module-toggle:hover .module-icon,
.is-open .module-icon {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  transform: scale(1.05);
}

.module-chevron {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  margin-top: 4px;
  border-radius: 999px;
  color: var(--muted);
  background: #F2F7F5;
  transition: transform .3s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.module-toggle:hover .module-chevron { background: var(--primary-soft); color: var(--primary-deep); }
.is-open .module-chevron { transform: rotate(180deg); background: var(--primary-soft); color: var(--primary-deep); }

.module-panel {
  overflow: hidden;
  height: 0;
  transition: height .34s var(--ease);
}
.module-panel-inner {
  display: grid;
  gap: .9rem;
  margin: 0 1.25rem 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .module-panel-inner { margin-inline: 1.5rem; } }

.group-title {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--primary-deep);
}
.group-title:not(:first-child) { margin-top: .5rem; }

.module-note {
  display: flex; align-items: flex-start; gap: .6rem;
  margin-top: .4rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(14, 159, 142, .14);
  font-size: 14px; line-height: 1.55;
  color: var(--primary-deep);
}

.empty-state { display: none; }
.empty-state.is-shown { display: block; }

/* --------------------------------------------------------------------------
   Journey timeline
   -------------------------------------------------------------------------- */
.journey-item {
  position: relative;
  flex-shrink: 0;
  width: 176px;
  padding-top: 2.15rem;
}
.journey-item::before {
  content: '';
  position: absolute; top: 11px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(14, 159, 142, .28), rgba(14, 159, 142, .28));
}
.journey-item:first-child::before { left: 50%; border-radius: 2px 0 0 2px; }
.journey-item:last-child::before  { right: 50%; border-radius: 0 2px 2px 0; }
.journey-item::after {
  content: '';
  position: absolute; top: 5px; left: calc(50% - 7px);
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 159, 142, .13);
}
.journey-item:last-child::after {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}

/* --------------------------------------------------------------------------
   PM-JAY stepper
   -------------------------------------------------------------------------- */
.step-node {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  text-align: center;
}
.step-node::before {
  content: '';
  position: absolute; top: 21px; left: 50%; width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(245, 158, 11, .45) 0 7px, transparent 7px 13px);
}
.step-node:last-child::before { display: none; }
.step-dot {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin: 0 auto;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(245, 158, 11, .5);
  color: var(--accent-ink);
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 6px 16px -8px rgba(245, 158, 11, .6);
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Dashboard preview
   -------------------------------------------------------------------------- */
.kpi-tile {
  padding: .95rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.kpi-tile:hover { transform: translateY(-2px); border-color: rgba(14, 159, 142, .32); }

.bar-track { height: 8px; border-radius: 999px; background: #EDF4F1; overflow: hidden; }
.bar-fill {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #34C7B4);
  transition: width 1.1s var(--ease);
}
.is-visible .bar-fill { width: var(--pct, 0%); }

.alert-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; margin-top: 6px; }
.tone-danger { background: #E5484D; box-shadow: 0 0 0 3px rgba(229, 72, 77, .16); }
.tone-warn   { background: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.tone-info   { background: var(--primary); box-shadow: 0 0 0 3px rgba(14, 159, 142, .16); }

/* Donut for bed occupancy. */
.donut circle.track { stroke: #EDF4F1; }
.donut circle.value {
  stroke: url(#donutGrad);
  stroke-linecap: round;
  stroke-dasharray: var(--circ, 264);
  stroke-dashoffset: var(--circ, 264);
  transition: stroke-dashoffset 1.3s var(--ease);
}
.is-visible .donut circle.value { stroke-dashoffset: var(--offset, 66); }

/* --------------------------------------------------------------------------
   Phone frame (mobile app spotlights)
   -------------------------------------------------------------------------- */
.phone {
  position: relative;
  width: 258px;
  border-radius: 34px;
  padding: 9px;
  background: linear-gradient(150deg, #0B302B, #061F1C);
  box-shadow: 0 30px 70px -28px rgba(6, 95, 85, .7), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.phone-screen {
  border-radius: 26px;
  background: #F7FBFA;
  overflow: hidden;
  min-height: 430px;
}
.phone::before {
  content: '';
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  z-index: 2;
}

/* --------------------------------------------------------------------------
   EMR timeline (vertical)
   -------------------------------------------------------------------------- */
.emr-row { position: relative; padding-left: 2.1rem; padding-bottom: 1.05rem; }
.emr-row::before {
  content: '';
  position: absolute; left: 6px; top: 15px; bottom: -3px;
  width: 2px;
  background: linear-gradient(180deg, rgba(14, 159, 142, .3), rgba(14, 159, 142, .1));
}
.emr-row:last-child { padding-bottom: 0; }
.emr-row:last-child::before { display: none; }
.emr-row::after {
  content: '';
  position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--primary);
}
.emr-row:last-child::after { border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Architecture stack
   -------------------------------------------------------------------------- */
.arch-layer {
  position: relative;
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 15px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.arch-layer:hover { transform: translateX(4px); border-color: rgba(14, 159, 142, .32); }
.arch-connector {
  display: grid; place-items: center;
  height: 26px;
  color: rgba(14, 159, 142, .5);
}

/* --------------------------------------------------------------------------
   Roadmap rail
   -------------------------------------------------------------------------- */
.phase-card { position: relative; }
.phase-num {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 16px; font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 10px 22px -12px rgba(14, 159, 142, .9);
}

/* --------------------------------------------------------------------------
   Confirmation checklist
   -------------------------------------------------------------------------- */
.check-item {
  display: flex; align-items: flex-start; gap: .85rem;
  width: 100%;
  padding: .85rem 1rem;
  min-height: 52px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  transition: all .2s var(--ease);
}
.check-item:hover { border-color: rgba(14, 159, 142, .4); background: #FCFEFD; }
.check-box {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid #C9DBD5;
  color: transparent;
  background: #fff;
  transition: all .2s var(--ease);
}
.check-item[aria-pressed="true"] { background: var(--primary-soft); border-color: rgba(14, 159, 142, .35); }
.check-item[aria-pressed="true"] .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-item[aria-pressed="true"] .check-label { color: var(--primary-deep); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field-label {
  display: block;
  margin-bottom: .4rem;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink);
}
.field {
  width: 100%;
  padding: .8rem 1rem;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 15px; font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field::placeholder { color: var(--muted); }
.field:focus {
  outline: none;
  border-color: rgba(14, 159, 142, .55);
  box-shadow: 0 0 0 4px rgba(14, 159, 142, .12);
}
.field.has-error { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .1); }
.field-error { display: none; margin-top: .35rem; font-size: 13px; font-weight: 600; color: #C62A2F; }
.field-error.is-shown { display: block; }
textarea.field { min-height: 128px; resize: vertical; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #052E29 0%, #04211E 100%);
}
.footer::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(70% 70% at 30% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 30% 20%, #000, transparent 75%);
  pointer-events: none;
}
.footer > * { position: relative; z-index: 1; }

.footer-heading {
  font-family: 'Plus Jakarta Sans', Inter, sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.footer-link {
  font-size: 14.5px;
  color: rgba(255, 255, 255, .72);
  transition: color .18s var(--ease);
}
.footer-link:hover { color: #fff; }

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 16px 32px -14px rgba(14, 159, 142, .9);
  opacity: 0; transform: translateY(12px) scale(.9);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: translateY(0) scale(1); }
.to-top:hover { transform: translateY(-3px) scale(1.05); }
@media (min-width: 640px) { .to-top { right: 1.5rem; bottom: 1.5rem; } }

/* --------------------------------------------------------------------------
   Motion — reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(14, 159, 142, .4); }
  70%  { box-shadow: 0 0 0 12px rgba(14, 159, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 159, 142, 0); }
}
.pulse { animation: pulse-ring 2.6s ease-out infinite; }

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.floaty { animation: float-y 6s ease-in-out infinite; }

/* Respect the user's motion preference. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .bar-fill { width: var(--pct, 0%); }
  .donut circle.value { stroke-dashoffset: var(--offset, 66); }
}

/* --------------------------------------------------------------------------
   Print — the site becomes a readable scope document
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .drawer, .drawer-backdrop, .progress-bar,
  .to-top, .filter-bar, .skip-link, .module-chevron { display: none !important; }

  body { background: #fff; }
  .hero::before, .hero::after, .footer::after, .band-dark::after { display: none !important; }
  .band-dark, .footer { background: #04211E !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .reveal { opacity: 1 !important; transform: none !important; }

  /* Every module prints fully expanded, whatever its on-screen state. */
  .module-panel { height: auto !important; overflow: visible !important; }
  .module-panel[hidden] { display: block !important; }
  .module-card { break-inside: avoid; box-shadow: none; border-color: #CFDDD8; }

  .scroll-rail { overflow: visible !important; }
  .scroll-rail ol { flex-wrap: wrap !important; width: auto !important; }

  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #667; }
}
