:root {
  --navy: #0a2b4f;
  --navy-deep: #071c31;
  --teal: #00a7b5;
  --teal-dark: #007f8d;
  --sky: #e9f6f8;
  --paper: #f5f8fb;
  --white: #ffffff;
  --ink: #14263a;
  --muted: #5f7183;
  --line: #d5e2ea;
  --amber: #b76b00;
  --green: #267247;
  --shadow: 0 16px 45px rgba(7, 28, 49, .12);
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: .5rem;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--white);
  color: var(--navy);
  padding: .6rem .8rem;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 28, 49, .97);
  border-top: 5px solid var(--teal);
  box-shadow: 0 5px 24px rgba(0, 0, 0, .15);
}

.nav {
  width: min(1180px, calc(100% - 36px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  margin-right: auto;
  color: white;
  text-decoration: none;
  font-weight: 800;
}

.brand small {
  display: block;
  color: #a9dfe5;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a,
.nav-summary {
  color: #e9f7fa;
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
}

.nav-links a:hover,
.nav-summary:hover {
  color: #77e1e9;
}

.nav-summary {
  list-style: none;
  cursor: pointer;
}

.nav-summary::-webkit-details-marker {
  display: none;
}

.nav-summary::after {
  content: " v";
  font-size: .75em;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown[open] .dropdown-panel {
  display: grid;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 14px);
  display: none;
  min-width: 250px;
  padding: 8px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dropdown-group {
  border-block: 1px solid var(--line);
  margin: 4px 0;
  padding: 4px 0;
}

.dropdown-panel .dropdown-parent {
  color: var(--teal-dark);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dropdown-children {
  display: grid;
  padding-left: 12px;
  border-left: 2px solid #b7e4e7;
  margin-left: 10px;
}

.dropdown-children a::before {
  content: "— ";
  color: var(--teal-dark);
}

.dropdown-panel a {
  color: var(--navy);
  padding: 9px 10px;
  border-radius: 6px;
}

.dropdown-panel a:hover {
  background: var(--sky);
}

.mobile-menu {
  display: none;
  color: white;
}

.mobile-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  gap: 2px;
  padding: 12px 18px 18px;
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, .12);
  max-height: calc(100dvh - 67px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-panel a {
  color: white;
  padding: 10px 0;
  font-weight: 800;
  text-decoration: none;
}

.mobile-submenu {
  border-block: 1px solid rgba(255, 255, 255, .14);
}

.mobile-submenu summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: white;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.mobile-submenu summary::-webkit-details-marker {
  display: none;
}

.mobile-submenu summary::after {
  content: "+";
  color: #77e1e9;
  font-size: 1.2rem;
}

.mobile-submenu[open] summary::after {
  content: "−";
}

.mobile-submenu > div {
  display: grid;
  padding: 0 0 8px 16px;
  border-left: 2px solid rgba(119, 225, 233, .55);
}

.mobile-panel .mobile-submenu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 0 8px 10px;
  font-size: .95rem;
}

.menu-button {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px;
  padding: .45rem .65rem;
  font-weight: 800;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.container {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 70px));
  display: grid;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 28, 49, .94) 0%, rgba(7, 28, 49, .80) 44%, rgba(7, 28, 49, .28) 100%),
    url("/assets/daniel-john.jpg") right 4% center / min(68rem, 64vw) auto no-repeat,
    var(--navy-deep);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0;
}

.eyebrow,
.kicker {
  margin: 0 0 13px;
  color: #67d7df;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .82rem;
}

.kicker {
  color: var(--teal-dark);
}

h1,
h2,
h3,
h4 {
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.hero h2 {
  margin: 18px 0 0;
  max-width: 720px;
  color: #bdebf0;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
}

.hero-copy {
  max-width: 700px;
  color: #dfecf3;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

.button-row,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.button-primary {
  background: var(--teal);
  color: white;
}

.button-primary:hover {
  background: #08bdca;
}

.button-secondary {
  border-color: rgba(255, 255, 255, .32);
  color: white;
  background: rgba(255, 255, 255, .06);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, .12);
}

.button-muted {
  border-color: var(--line);
  color: var(--navy);
  background: white;
}

main section,
.page-section {
  padding: clamp(58px, 8vw, 90px) 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading h2,
.section-heading h3,
.page-title {
  margin: 8px 0 12px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
}

.band {
  background: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.timeline-card,
.resource-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgba(7, 28, 49, .06);
}

.card {
  padding: 22px;
}

.card h3,
.card h4 {
  margin-top: 0;
  color: var(--navy);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px;
}

.timeline-label {
  color: var(--teal-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}

.timeline-card h3,
.timeline-card h4 {
  margin: 4px 0 7px;
  color: var(--navy);
  font-size: 1.15rem;
}

.timeline-card p,
.card p {
  color: var(--muted);
}

.resource-card {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--navy);
  color: white;
}

.resource-list {
  display: grid;
  gap: 24px;
}

.resource-preview {
  min-height: 330px;
  background: #061a2e;
  overflow: hidden;
}

.resource-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.resource-preview--room {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f8f8;
}

.resource-preview--room svg {
  width: 100%;
  height: auto;
  color: var(--navy);
}

.resource-preview--room .plan-room,
.resource-preview--room .plan-bed,
.resource-preview--room .plan-hoist,
.resource-preview--room .plan-chair,
.resource-preview--room .plan-commode {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 5;
}

.resource-preview--room .plan-zone {
  fill: rgba(13, 143, 153, .14);
  stroke: #0d8f99;
  stroke-dasharray: 7 5;
  stroke-width: 3;
}

.resource-preview--room .plan-door,
.resource-preview--room .plan-turn,
.resource-preview--room .plan-measure {
  fill: none;
  stroke: #0d8f99;
  stroke-width: 3;
}

.resource-preview--room .plan-turn {
  stroke-dasharray: 8 6;
}

.resource-preview--room text {
  fill: var(--navy);
  font: 700 14px Arial, sans-serif;
  text-anchor: middle;
}

.resource-copy {
  padding: clamp(26px, 5vw, 46px);
  align-self: center;
}

.resource-copy h3 {
  margin: 7px 0 15px;
  color: white;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.resource-copy p {
  color: #d8e9f1;
}

.notice {
  border-left: 5px solid var(--teal);
  background: white;
  padding: 18px 20px;
  border-radius: 8px;
}

.notice.warning {
  border-left-color: var(--amber);
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.meta-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.meta-item strong {
  display: block;
  color: var(--navy);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list a,
.tag-list span,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--sky);
  color: var(--navy);
  font-size: .84rem;
  font-weight: 800;
  text-decoration: none;
}

.status-pill.private,
.status-pill.draft {
  background: #fff5d9;
  color: #7a4a00;
}

.status-pill.public,
.status-pill.published {
  background: #e3f4ea;
  color: var(--green);
}

.filters,
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: white;
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 70px);
}

.admin-sidebar {
  background: var(--navy-deep);
  color: white;
  padding: 24px 18px;
}

.admin-sidebar a {
  display: block;
  padding: 10px 0;
  color: white;
  font-weight: 800;
  text-decoration: none;
}

.admin-main {
  padding: clamp(24px, 5vw, 46px);
}

.admin-panel {
  padding: 22px;
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--navy);
}

.poster-viewer {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow: var(--shadow);
}

.poster-toolbar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .7rem;
  background: var(--navy);
  border-top: 4px solid var(--teal);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: white;
  user-select: none;
}

.poster-toolbar h2 {
  margin: 0 auto 0 0;
  font-size: clamp(.85rem, 2vw, 1rem);
  color: white;
}

.poster-toolbar button,
.poster-toolbar a {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 6px;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: .45rem .7rem;
  background: #123b66;
  color: white;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.poster-toolbar button:hover,
.poster-toolbar a:hover {
  background: #165080;
}

.zoom-label {
  min-width: 4.3rem;
  text-align: center;
  font-size: .86rem;
  color: #dbe9f4;
}

.poster-viewport {
  position: relative;
  height: min(78vh, 820px);
  min-height: 420px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: #081d33;
}

.poster-viewport.dragging {
  cursor: grabbing;
}

.poster-image {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 3508px;
  height: 4961px;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 8px 34px rgba(0, 0, 0, .45);
  background: white;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: .8rem;
  transform: translateX(-50%);
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(10, 43, 79, .86);
  color: #eaf5fb;
  font-size: .76rem;
  pointer-events: none;
  transition: opacity .35s ease;
}

.site-footer {
  padding: 28px 0;
  background: var(--navy-deep);
  color: #b9ceda;
  font-size: .84rem;
}

.footer-grid {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid strong {
  color: white;
}

@media (max-width: 900px) {
  .grid,
  .grid.two,
  .resource-card,
  .filters,
  .form-grid,
  .meta-list,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(7, 28, 49, .46) 0%, rgba(7, 28, 49, .86) 54%, rgba(7, 28, 49, .96) 100%),
      url("/assets/daniel-john.jpg") center top / min(48rem, 135vw) auto no-repeat,
      var(--navy-deep);
  }

  .hero-content {
    padding-top: clamp(22rem, 58vh, 32rem);
  }

  .timeline-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-sidebar {
    display: flex;
    gap: 16px;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .nav {
    min-height: 62px;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .poster-toolbar {
    gap: .3rem;
    padding: .42rem;
  }

  .poster-toolbar h2 {
    display: none;
  }

  .poster-toolbar button,
  .poster-toolbar a {
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: .4rem .55rem;
  }

  .zoom-label {
    min-width: 3.6rem;
    font-size: .78rem;
  }

  .pdf-text {
    display: none;
  }

  .poster-viewport {
    min-height: 360px;
  }

  .footer-grid {
    flex-direction: column;
  }
}
