:root {
  --ink: #172022;
  --muted: #516167;
  --line: rgba(23, 32, 34, 0.16);
  --paper: #fff8ec;
  --foam: #b9fff1;
  --teal: #00a7b8;
  --coral: #ff4f6d;
  --gold: #ffc43d;
  --leaf: #47c266;
  --blue: #246bfe;
  --violet: #8a55ff;
  --shadow: 0 26px 0 rgba(23, 32, 34, 0.10), 0 34px 70px rgba(19, 35, 38, 0.20);
  --home-tile-height: 500px;
  --hero-image-bg: #fbfbf7;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 167, 184, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(0, 167, 184, 0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 11% 7%, rgba(255, 79, 109, 0.24), transparent 28%),
    radial-gradient(circle at 90% 2%, rgba(255, 196, 61, 0.28), transparent 23%),
    radial-gradient(circle at 82% 84%, rgba(36, 107, 254, 0.15), transparent 26%),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(164px, 0.6fr) auto minmax(260px, 0.9fr);
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 42px);
  background: rgba(251, 250, 246, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(23, 32, 34, 0.10);
}

.left-tools,
.brand,
.search {
  display: flex;
  align-items: center;
}

.left-tools {
  gap: 10px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--hero-image-bg);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(23, 32, 34, 0.14);
}

.icon-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.login-button,
.text-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

.admin-link {
  text-decoration: none;
}

.login-button {
  height: 44px;
  padding: 0 13px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 5px 0 rgba(23, 32, 34, 0.14);
}

.login-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.password-field input {
  min-width: 0;
}

.password-toggle {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.brand {
  justify-self: center;
  color: var(--ink);
  text-decoration: none;
  gap: 12px;
  min-width: max-content;
}

.brand-text {
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
}

.logo-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 6px 6px 0 rgba(8, 127, 140, 0.2);
}

.lung {
  position: absolute;
  top: 13px;
  width: 16px;
  height: 25px;
  background: var(--coral);
  border: 2px solid var(--ink);
}

.left-lung {
  left: 9px;
  border-radius: 14px 7px 12px 12px;
  transform: rotate(-7deg);
}

.right-lung {
  right: 9px;
  border-radius: 7px 14px 12px 12px;
  transform: rotate(7deg);
}

.logo-mark::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 24px;
  width: 3px;
  height: 28px;
  background: var(--ink);
  border-radius: 4px;
}

.spark {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.search {
  justify-self: end;
  width: min(100%, 430px);
  min-width: 0;
  gap: 8px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.search span {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--teal);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: var(--hero-image-bg);
  color: var(--ink);
}

main {
  padding: 26px clamp(16px, 3vw, 42px) 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  min-height: 280px;
  padding: clamp(22px, 4vw, 44px);
  border: 2px solid rgba(23, 32, 34, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2.1rem, 5vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-illustration {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
}

.hero-custom-image {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: block;
  object-fit: contain;
  background: var(--hero-image-bg);
}

.monitor {
  position: absolute;
  inset: 18px 0 16px 30px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #102628;
  box-shadow: 14px 14px 0 rgba(232, 93, 69, 0.18);
  overflow: hidden;
}

.monitor::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 52%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.wave {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 44px;
  border: solid var(--gold);
  border-width: 0 0 4px 0;
  border-radius: 50%;
}

.wave-one {
  top: 44px;
}

.wave-two {
  bottom: 48px;
  border-color: #79d4df;
}

.pressure-loop {
  position: absolute;
  width: 70px;
  height: 90px;
  right: 30px;
  top: 65px;
  border: 5px solid var(--coral);
  border-radius: 50%;
}

.alveoli {
  position: absolute;
  left: 0;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(3, 38px);
  gap: 8px;
}

.alveoli span {
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(430px, auto));
  gap: 16px;
  margin-top: 18px;
}

.tile {
  position: relative;
  min-height: 430px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(23, 32, 34, 0.20);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.84)),
    #fff;
  overflow: hidden;
  box-shadow: 9px 9px 0 rgba(23, 32, 34, 0.11), 0 22px 46px rgba(19, 35, 38, 0.16);
  transform: translateZ(0);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 12px 14px 0 rgba(23, 32, 34, 0.11), 0 28px 54px rgba(19, 35, 38, 0.18);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8, 127, 140, 0.09), transparent 58%);
  pointer-events: none;
}

.tile > * {
  position: relative;
}

.article-tile {
  grid-column: auto;
  grid-row: auto;
  min-height: 430px;
}

.tile-visual {
  position: relative;
  height: 92px;
  margin-bottom: 14px;
  border: 2px solid rgba(23, 32, 34, 0.18);
  border-radius: 8px;
  background: var(--foam);
  overflow: hidden;
  box-shadow: inset 0 -10px 0 rgba(23, 32, 34, 0.06), 0 8px 0 rgba(23, 32, 34, 0.08);
}

.tile-visual::after {
  position: absolute;
  right: 14px;
  bottom: 10px;
  min-width: 44px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 950;
  box-shadow: 5px 5px 0 rgba(23, 32, 34, 0.16);
}

.tile-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tile-number {
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 900;
}

.tile h2 {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.45rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.tile h2 a {
  color: inherit;
  text-decoration: none;
}

.tile h2 a:hover,
.tile h2 a:focus-visible {
  color: var(--blue);
}

.tile-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 0.94rem;
}

.article-list,
.resource-list,
.trial-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  max-height: 310px;
  overflow: auto;
  padding-right: 5px;
}

.guidelines-tile .resource-list {
  max-height: 235px;
}

.article-list li,
.resource-list li,
.trial-list li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.resource-list .guideline-bucket {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  background: #172022;
  color: #fff;
  border-color: #172022;
}

.resource-list .guideline-bucket.active {
  background: var(--teal);
  border-color: var(--teal);
}

.trial-list .trial-bucket {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  border-color: rgba(106, 168, 79, 0.42);
  background: rgba(106, 168, 79, 0.18);
}

.trial-list .trial-bucket.active,
.trial-list .trial-bucket:hover,
.trial-list .trial-bucket:focus-visible {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.trial-list .trial-bucket small {
  color: inherit;
  opacity: 0.74;
  margin-top: 0;
  white-space: nowrap;
}

.resource-list .guideline-bucket small {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 0;
  white-space: nowrap;
}

.resource-list .guideline-bucket.empty {
  background: rgba(23, 32, 34, 0.08);
  color: var(--muted);
  border-color: var(--line);
}

.resource-list .guideline-bucket.empty small {
  color: var(--muted);
}

.article-list a,
.resource-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.guideline-item.muted {
  color: var(--muted);
  font-weight: 800;
}

.trial-item strong {
  display: block;
}

.trial-item small,
.trial-item.muted {
  color: var(--muted);
  font-weight: 800;
}

.trial-item:not(.muted) {
  cursor: pointer;
}

.trial-detail {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(45, 114, 217, 0.22);
  border-radius: 8px;
  background: rgba(230, 244, 255, 0.72);
}

.trial-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  max-height: 180px;
  overflow: auto;
}

.trial-detail a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.bookmark-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  border: 1px solid rgba(45, 114, 217, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(23, 32, 34, 0.10);
}

.bookmark-button.saved {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.tile-search,
.score-workbench select,
.score-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  margin-top: 12px;
  outline: 0;
}

.score-workbench {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.score-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 138px;
  overflow: auto;
  padding-right: 4px;
}

.score-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.score-field.checkbox {
  grid-template-columns: 18px 1fr;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
}

.score-field.checkbox input {
  min-height: 0;
  margin: 0;
}

.score-result {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(220, 238, 234, 0.7);
  color: var(--muted);
  font-size: 0.86rem;
}

.score-result strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.master-panel,
.upload-panel {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.master-panel input[type="file"],
.upload-panel input[type="file"] {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.75);
  padding: 10px;
}

.master-panel small,
.upload-panel small {
  color: var(--muted);
  font-weight: 800;
}

.tile-library {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.tile-library ul {
  display: grid;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.subtopic-list {
  display: grid;
  gap: 8px;
}

.subtopic-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(185, 255, 241, 0.35);
  padding: 8px 10px;
}

.subtopic-item summary {
  cursor: pointer;
  font-weight: 950;
}

.subtopic-item p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

.tile-library li {
  min-width: 0;
}

.tile-library a {
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.featured-image-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.featured-thumb {
  min-width: 0;
  border: 1px solid rgba(45, 114, 217, 0.2);
  border-radius: 8px;
  background: rgba(230, 244, 255, 0.72);
  overflow: hidden;
}

.featured-thumb img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  display: block;
}

.featured-thumb span {
  display: block;
  padding: 6px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-library small {
  display: block;
  color: var(--muted);
  font-weight: 750;
  margin-top: 3px;
}

.section-main,
.search-main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.section-hero,
.search-results-panel {
  margin-top: 24px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(23, 32, 34, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 8px 8px 0 rgba(23, 32, 34, 0.12);
}

.section-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  letter-spacing: 0;
}

.section-library {
  display: grid;
  gap: 20px;
  margin: 24px 0 44px;
}

.section-block {
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid rgba(23, 32, 34, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 6px 6px 0 rgba(23, 32, 34, 0.1);
}

.section-block h2 {
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
}

.section-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.section-atlas-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.atlas-title-tabs {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.atlas-title-tab {
  background: rgba(255, 255, 255, 0.72);
}

.atlas-extra-image:not([hidden]) {
  display: contents;
}

.atlas-extra-image[hidden] {
  display: none;
}

.atlas-more-button {
  justify-self: start;
  min-height: 38px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #9c3b68, #77214d);
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(124, 33, 77, 0.16);
}

.atlas-more-button:hover {
  filter: brightness(1.05);
}

.section-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.section-image-card {
  display: grid;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.section-video-card {
  display: grid;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.section-video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #111827;
}

.section-video-card a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.section-image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(23, 32, 34, 0.08);
}

.section-image-card small,
.section-video-card small,
.section-resource-list small,
.section-subtopic small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.section-subtopics {
  display: grid;
  gap: 12px;
}

.section-subtopic {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(185, 255, 241, 0.25);
  padding: 12px;
}

.section-subtopic summary {
  cursor: pointer;
  font-weight: 950;
}

.section-subtopic summary small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 850;
}

.section-subtopic p {
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.48;
}

.section-subtopic ul,
.section-resource-list {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
}

.section-subtopic li,
.section-resource-list li,
.section-empty {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.section-subtopic a,
.section-resource-list a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.article-list small,
.resource-list small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.tile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 34, 0.42);
  backdrop-filter: blur(8px);
}

.menu-popover {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  align-items: start;
  justify-items: start;
  padding: 74px clamp(16px, 3vw, 42px) 18px;
  background: rgba(23, 32, 34, 0.22);
  backdrop-filter: blur(6px);
}

.menu-popover[hidden] {
  display: none;
}

.menu-card {
  width: min(430px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 2px solid rgba(23, 32, 34, 0.20);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.menu-card h2,
.menu-card h3 {
  margin: 0;
}

.menu-item {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 5px 0 rgba(23, 32, 34, 0.12);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--foam);
}

.menu-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel form,
.menu-panel label {
  display: grid;
  gap: 10px;
}

.menu-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

.menu-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.menu-panel a {
  color: var(--blue);
  font-weight: 950;
  text-decoration: none;
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 34, 0.34);
  backdrop-filter: blur(7px);
}

.about-modal[hidden] {
  display: none;
}

.about-card {
  width: min(780px, 100%);
  max-height: min(86vh, 780px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid rgba(23, 32, 34, 0.18);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: auto;
}

.about-content {
  display: grid;
  gap: 12px;
}

.about-content p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.55;
  font-weight: 750;
}

.about-content em {
  color: var(--blue);
  font-weight: 900;
}

.about-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid rgba(45, 114, 217, 0.16);
  border-radius: 8px;
  margin-bottom: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 40, 90, 0.12);
}

.notebook-panel {
  max-height: min(70vh, 560px);
  overflow: auto;
}

.notebook-list {
  display: grid;
  gap: 10px;
}

.notebook-bucket {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(230, 244, 255, 0.68);
  padding: 10px;
}

.notebook-bucket summary {
  cursor: pointer;
  font-weight: 950;
}

.notebook-bucket ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.notebook-bucket li {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.notebook-bucket a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.notebook-bucket small {
  color: var(--muted);
  font-weight: 800;
}

.notebook-page {
  padding-bottom: 42px;
}

.notebook-hero p {
  max-width: 760px;
  color: var(--muted);
  font-weight: 850;
}

.notebook-hero a {
  color: var(--blue);
  font-weight: 950;
  text-decoration: none;
}

.notebook-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
}

.notebook-page-bucket {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(45, 114, 217, 0.18);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(230, 244, 255, 0.72));
  box-shadow: 0 14px 34px rgba(15, 40, 90, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.notebook-page-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notebook-page-bucket h2 {
  margin: 0;
  color: var(--blue);
  font-size: 1.08rem;
  line-height: 1.15;
}

.notebook-page-bucket-head span {
  min-width: 32px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.notebook-page-bucket ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.notebook-page-bucket li {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(23, 32, 34, 0.08);
}

.notebook-item-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
}

.notebook-delete-button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(124, 16, 62, 0.2);
  border-radius: 8px;
  background: #fff5f8;
  color: #8a1648;
  font-size: 1.15rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(124, 16, 62, 0.08);
}

.notebook-delete-button:hover {
  background: #8a1648;
  color: #fff;
}

.notebook-page-bucket a {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.notebook-page-bucket small,
.notebook-page-bucket p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 760px) {
  .section-atlas-grid {
    grid-template-columns: 1fr;
  }

  .notebook-page-grid {
    grid-template-columns: 1fr;
  }
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 2px solid rgba(23, 32, 34, 0.14);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.auth-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-card h2 {
  margin: 0;
}

.icon-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.inline-recovery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.active {
  display: grid;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 850;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

#user-auth-status {
  color: var(--muted);
  font-weight: 800;
}

.new-user-line {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.text-button {
  min-height: 36px;
  padding: 0 12px;
  font-weight: 800;
}

.mini-tags,
.score-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 16px;
}

.mini-tags span,
.score-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.score-chip {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(74, 127, 61, 0.42);
  border-radius: 8px;
  background: rgba(106, 168, 79, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
  font-size: 0.78rem;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.score-chip:hover,
.score-chip:focus-visible,
.score-chip.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.score-chip:focus-visible {
  outline: 3px solid rgba(45, 114, 217, 0.25);
  outline-offset: 2px;
}

.score-chip small {
  color: inherit;
  opacity: 0.72;
  font-size: 0.68rem;
}

.article-visual {
  position: relative;
  background: linear-gradient(135deg, #fff1a8, #ffcfdf);
}

.article-visual::after {
  content: "NEW";
}

.paper {
  position: absolute;
  width: 100px;
  height: 66px;
  left: 22px;
  top: 13px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  transform: rotate(-5deg);
}

.paper::before,
.paper::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 4px;
  background: var(--teal);
  border-radius: 3px;
}

.paper::before {
  top: 18px;
}

.paper::after {
  top: 34px;
  right: 34px;
}

.pulse-line {
  position: absolute;
  right: 24px;
  top: 42px;
  width: 120px;
  height: 28px;
  border-top: 5px solid var(--coral);
  clip-path: polygon(0 46%, 17% 46%, 25% 4%, 38% 92%, 48% 46%, 100% 46%, 100% 60%, 49% 60%, 37% 100%, 25% 18%, 19% 60%, 0 60%);
  background: var(--coral);
}

.guideline-visual {
  display: grid;
  place-items: center;
  grid-template-columns: repeat(3, 1fr);
  background: linear-gradient(135deg, #c6f7ff, #d8ccff);
}

.guideline-visual::after {
  content: "GUIDE";
}

.guideline-visual span {
  width: 42px;
  height: 58px;
  border: 3px solid var(--ink);
  background: #fff;
  border-radius: 4px;
  box-shadow: 5px 5px 0 rgba(45, 114, 217, 0.18);
}

.vent-visual {
  position: relative;
  background: linear-gradient(135deg, #b9fff1, #d8ffbc);
}

.vent-visual::after {
  content: "VENT";
}

.bellows {
  position: absolute;
  left: 22px;
  top: 23px;
  width: 82px;
  height: 42px;
  border: 3px solid var(--ink);
  background: repeating-linear-gradient(90deg, #fff 0 12px, #c6dfbd 12px 20px);
  border-radius: 8px;
}

.tube {
  position: absolute;
  left: 102px;
  top: 43px;
  width: 58px;
  height: 22px;
  border-top: 4px solid var(--ink);
  border-right: 4px solid var(--ink);
  border-radius: 0 16px 0 0;
}

.gauge {
  position: absolute;
  right: 20px;
  top: 22px;
  width: 50px;
  height: 50px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.gauge::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 3px;
  left: 22px;
  top: 24px;
  background: var(--coral);
  transform: rotate(-38deg);
  transform-origin: left center;
}

.physiology-visual,
.case-visual,
.core-visual,
.imaging-visual,
.airway-visual,
.critical-visual,
.score-visual {
  position: relative;
}

.physiology-visual {
  background: linear-gradient(135deg, #ffe4b8, #b9fff1);
}

.physiology-visual::after {
  content: "V/Q";
}

.physiology-visual span {
  position: absolute;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.physiology-visual span:nth-child(1) { width: 64px; height: 64px; left: 20px; top: 14px; }
.physiology-visual span:nth-child(2) { width: 44px; height: 44px; left: 74px; top: 35px; background: var(--foam); }
.physiology-visual span:nth-child(3) { width: 34px; height: 34px; right: 28px; top: 18px; background: var(--coral); }

.case-visual {
  background: linear-gradient(135deg, #efe7ff, #ffd6e0);
}

.case-visual::after {
  content: "CASE";
}

.case-visual span {
  position: absolute;
  border: 3px solid var(--ink);
  background: #fff;
}

.case-visual span:nth-child(1) { width: 56px; height: 72px; left: 20px; top: 10px; border-radius: 30px 30px 8px 8px; }
.case-visual span:nth-child(2) { width: 64px; height: 30px; left: 84px; top: 34px; border-radius: 8px; background: var(--gold); }
.case-visual span:nth-child(3) { width: 34px; height: 34px; right: 24px; top: 29px; border-radius: 50%; background: var(--violet); }

.trial-visual,
.score-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #e6f4ff;
}

.trial-visual::after {
  content: "RCT";
}

.trial-visual span:first-child,
.score-visual span:first-child {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-weight: 950;
  color: var(--blue);
  font-size: 1.4rem;
}

.trial-visual span:last-child,
.score-visual span:last-child {
  width: 64px;
  height: 64px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 40%, var(--gold) 40% 72%, var(--leaf) 72%);
}

.core-visual {
  background: linear-gradient(135deg, #fff1a8, #ffd1ee);
}

.core-visual::after {
  content: "ART";
}

.core-visual span {
  position: absolute;
  border: 3px solid var(--ink);
}

.core-visual span:nth-child(1) { width: 70px; height: 52px; left: 18px; top: 22px; border-radius: 50%; background: #fff; }
.core-visual span:nth-child(2) { width: 58px; height: 38px; right: 26px; top: 14px; border-radius: 8px; background: var(--gold); transform: rotate(7deg); }
.core-visual span:nth-child(3) { width: 38px; height: 38px; right: 66px; bottom: 13px; border-radius: 50%; background: var(--teal); }

.imaging-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  background: #20272a;
}

.imaging-visual::after {
  content: "CT";
  color: #fff;
  background: #172022;
  border-color: #fff;
}

.imaging-visual span {
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.8), transparent 23%),
    linear-gradient(145deg, #445057, #111);
}

.airway-visual {
  background: linear-gradient(135deg, #b9fff1, #c6f7ff);
}

.airway-visual::after {
  content: "ETT";
}

.airway-visual span {
  position: absolute;
  border: 3px solid var(--ink);
  background: #fff;
}

.airway-visual span:nth-child(1) { width: 118px; height: 30px; left: 22px; top: 33px; border-radius: 999px; }
.airway-visual span:nth-child(2) { width: 46px; height: 46px; right: 34px; top: 22px; border-radius: 50%; background: var(--teal); }
.airway-visual span:nth-child(3) { width: 82px; height: 16px; left: 92px; top: 48px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; background: transparent; }

.critical-visual {
  background: linear-gradient(135deg, #ffd6e0, #fff1a8);
}

.critical-visual::after {
  content: "ICU";
}

.critical-visual span {
  position: absolute;
}

.critical-visual span:nth-child(1) {
  left: 18px;
  top: 22px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.critical-visual span:nth-child(2) {
  left: 90px;
  top: 49px;
  width: 98px;
  height: 5px;
  background: var(--coral);
  clip-path: polygon(0 50%, 20% 50%, 27% 0, 39% 100%, 48% 50%, 100% 50%, 100% 100%, 47% 100%, 39% 58%, 28% 100%, 21% 100%, 0 100%);
}

.critical-visual span:nth-child(3) {
  right: 22px;
  top: 18px;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
}

/* Public dashboard tile illustrations */
.article-visual::after,
.guideline-visual::after,
.vent-visual::after,
.physiology-visual::after,
.case-visual::after,
.core-visual::after,
.imaging-visual::after,
.airway-visual::after,
.critical-visual::after {
  display: none;
}

.newspaper {
  position: absolute;
  left: 28px;
  top: 14px;
  width: 146px;
  height: 70px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  box-shadow: 8px 8px 0 rgba(23, 32, 34, 0.13);
  transform: rotate(-3deg);
}

.newspaper::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 9px;
  border-radius: 999px;
  background: var(--ink);
}

.newspaper span {
  position: absolute;
  height: 6px;
  border-radius: 999px;
  background: var(--teal);
}

.newspaper span:nth-child(1) { left: 10px; top: 30px; width: 48px; }
.newspaper span:nth-child(2) { left: 68px; top: 30px; width: 58px; background: var(--coral); }
.newspaper span:nth-child(3) { left: 10px; top: 47px; width: 70px; background: var(--gold); }
.newspaper span:nth-child(4) { left: 90px; top: 47px; width: 38px; }

.certificate {
  position: absolute;
  left: 44px;
  top: 12px;
  width: 112px;
  height: 70px;
  border: 3px solid var(--ink);
  border-radius: 7px;
  background: #fffef8;
  box-shadow: 8px 8px 0 rgba(36, 107, 254, 0.18);
}

.certificate::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(23, 32, 34, 0.22);
  border-radius: 4px;
}

.certificate span {
  position: absolute;
  left: 18px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink);
}

.certificate span:nth-child(1) { top: 20px; width: 52px; }
.certificate span:nth-child(2) { top: 34px; width: 74px; background: var(--teal); }
.certificate span:nth-child(3) { top: 48px; width: 44px; background: var(--gold); }

.seal {
  position: absolute;
  left: 132px;
  top: 44px;
  width: 38px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 26%, var(--coral) 28%);
  box-shadow: 4px 4px 0 rgba(23, 32, 34, 0.14);
}

.seal::before,
.seal::after {
  content: "";
  position: absolute;
  bottom: -21px;
  width: 13px;
  height: 24px;
  background: var(--coral);
  border: 2px solid var(--ink);
}

.seal::before { left: 5px; transform: rotate(10deg); }
.seal::after { right: 5px; transform: rotate(-10deg); }

.ventilator-body {
  position: absolute;
  left: 24px;
  top: 14px;
  width: 98px;
  height: 68px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 7px 7px 0 rgba(23, 32, 34, 0.14);
}

.ventilator-body::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 46px;
  height: 25px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: #123033;
}

.ventilator-body span {
  position: absolute;
  border: 2px solid var(--ink);
  background: var(--gold);
}

.ventilator-body span:nth-child(1) { right: 11px; top: 11px; width: 18px; height: 18px; border-radius: 50%; }
.ventilator-body span:nth-child(2) { right: 12px; top: 38px; width: 18px; height: 11px; border-radius: 999px; background: var(--teal); }
.ventilator-body span:nth-child(3) { left: 15px; bottom: 8px; width: 62px; height: 5px; border: 0; background: var(--coral); }

.ventilator-hose {
  position: absolute;
  left: 116px;
  top: 44px;
  width: 72px;
  height: 30px;
  border-top: 5px solid var(--ink);
  border-right: 5px solid var(--ink);
  border-radius: 0 20px 0 0;
}

.ventilator-mask {
  position: absolute;
  left: 178px;
  top: 53px;
  width: 38px;
  height: 25px;
  border: 3px solid var(--ink);
  border-radius: 50% 50% 12px 12px;
  background: var(--foam);
  transform: rotate(5deg);
}

.gas {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
  box-shadow: 4px 4px 0 rgba(23, 32, 34, 0.13);
}

.gas-o2 { left: 24px; top: 16px; }
.gas-co2 { right: 24px; bottom: 16px; color: var(--coral); }

.lung-pair {
  position: absolute;
  left: 84px;
  top: 10px;
  width: 86px;
  height: 76px;
}

.lung-pair::before {
  content: "";
  position: absolute;
  left: 41px;
  top: 2px;
  width: 5px;
  height: 52px;
  border-radius: 999px;
  background: var(--ink);
}

.lung-pair span {
  position: absolute;
  top: 18px;
  width: 37px;
  height: 50px;
  border: 3px solid var(--ink);
  background: #ff8aa0;
}

.lung-pair span:first-child {
  left: 4px;
  border-radius: 25px 12px 24px 24px;
  transform: rotate(-7deg);
}

.lung-pair span:last-child {
  right: 4px;
  border-radius: 12px 25px 24px 24px;
  transform: rotate(7deg);
}

.writing-pad {
  position: absolute;
  left: 54px;
  top: 11px;
  width: 112px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #ffe1a6;
  box-shadow: 8px 8px 0 rgba(23, 32, 34, 0.14);
}

.writing-pad::before {
  content: "";
  position: absolute;
  inset: 10px 12px 8px;
  border: 3px solid var(--ink);
  border-radius: 5px;
  background: #fff;
}

.writing-pad span {
  position: absolute;
  z-index: 1;
  left: 30px;
  top: 29px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 950;
  transform: rotate(-6deg);
}

.clip {
  position: absolute;
  left: 96px;
  top: 6px;
  width: 30px;
  height: 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--teal);
}

.pen {
  position: absolute;
  left: 132px;
  top: 16px;
  width: 22px;
  height: 78px;
  border: 3px solid var(--ink);
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(var(--gold) 0 70%, var(--ink) 70% 76%, #fff 76%);
  transform: rotate(43deg);
  box-shadow: 5px 5px 0 rgba(23, 32, 34, 0.13);
}

.draw-line {
  position: absolute;
  left: 28px;
  top: 50px;
  width: 150px;
  height: 36px;
  border-bottom: 6px solid var(--coral);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.xray-cartoon,
.ct-cartoon {
  position: absolute;
  top: 13px;
  width: 82px;
  height: 68px;
  border: 3px solid #fff;
  border-radius: 7px;
  background: #15252e;
  box-shadow: 6px 6px 0 rgba(255, 255, 255, 0.12);
}

.xray-cartoon {
  left: 32px;
}

.ct-cartoon {
  left: 136px;
}

.xray-cartoon::before {
  content: "XR";
  position: absolute;
  left: 7px;
  top: 6px;
  color: #fff;
  font-weight: 950;
}

.xray-cartoon span {
  position: absolute;
  top: 22px;
  width: 22px;
  height: 34px;
  border: 2px solid #c6f7ff;
  border-radius: 15px 15px 10px 10px;
}

.xray-cartoon span:first-child { left: 18px; transform: rotate(-8deg); }
.xray-cartoon span:last-child { right: 18px; transform: rotate(8deg); }

.ct-cartoon::before {
  content: "CT";
  position: absolute;
  left: 8px;
  top: 6px;
  color: #fff;
  font-weight: 950;
}

.ct-cartoon span {
  position: absolute;
  left: 20px;
  top: 22px;
  width: 40px;
  height: 32px;
  border: 3px solid #c6f7ff;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 34%, rgba(198, 247, 255, 0.75) 36% 42%, transparent 44%);
}

.ett-cartoon {
  position: absolute;
  left: 30px;
  top: 45px;
  width: 128px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  transform: rotate(-6deg);
  box-shadow: 6px 6px 0 rgba(23, 32, 34, 0.13);
}

.ett-cartoon::before {
  content: "";
  position: absolute;
  right: -28px;
  top: -9px;
  width: 44px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--foam);
}

.laryngoscope-cartoon {
  position: absolute;
  left: 74px;
  top: 12px;
  width: 92px;
  height: 70px;
  border-left: 16px solid var(--blue);
  border-bottom: 15px solid var(--blue);
  border-radius: 0 0 0 30px;
  transform: rotate(14deg);
  filter: drop-shadow(5px 5px 0 rgba(23, 32, 34, 0.13));
}

.laryngoscope-cartoon::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -12px;
  width: 44px;
  height: 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
}

.laryngoscope-cartoon::before {
  content: "";
  position: absolute;
  left: -23px;
  top: -5px;
  width: 28px;
  height: 54px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.search-main {
  padding: 26px clamp(16px, 3vw, 42px) 48px;
}

.search-results-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 2px solid rgba(23, 32, 34, 0.20);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.search-results-panel h1 {
  margin: 0;
}

.search-results {
  display: grid;
  gap: 14px;
}

.result-bucket {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.result-bucket h2 {
  margin: 0 0 10px;
}

.result-bucket ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-bucket li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-bucket a {
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
}

.result-bucket small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.icu-bed {
  position: absolute;
  left: 28px;
  top: 50px;
  width: 138px;
  height: 28px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 7px 7px 0 rgba(23, 32, 34, 0.13);
}

.icu-bed::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -24px;
  width: 42px;
  height: 22px;
  border: 3px solid var(--ink);
  border-radius: 14px 14px 5px 5px;
  background: var(--foam);
}

.icu-bed::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -18px;
  height: 14px;
  border-left: 4px solid var(--ink);
  border-right: 4px solid var(--ink);
}

.icu-monitor {
  position: absolute;
  right: 34px;
  top: 16px;
  width: 62px;
  height: 45px;
  border: 3px solid var(--ink);
  border-radius: 7px;
  background: #12292e;
  box-shadow: 5px 5px 0 rgba(23, 32, 34, 0.14);
}

.icu-monitor::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 19px;
  height: 5px;
  background: var(--gold);
  clip-path: polygon(0 50%, 22% 50%, 31% 0, 44% 100%, 54% 50%, 100% 50%, 100% 100%, 53% 100%, 44% 62%, 32% 100%, 21% 100%, 0 100%);
}

.icu-pole {
  position: absolute;
  right: 108px;
  top: 14px;
  width: 5px;
  height: 72px;
  border-radius: 999px;
  background: var(--ink);
}

.icu-pole::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 2px;
  width: 34px;
  height: 25px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--coral);
}

/* Reference-style PulmCrit IQ cards */
.tile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 22px;
}

.tile {
  min-height: var(--home-tile-height);
  padding: 22px 18px;
  align-items: center;
  text-align: center;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(28, 42, 57, 0.18), inset 0 1px 0 rgba(255,255,255,0.82);
}

.tile-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  z-index: 20;
  cursor: ns-resize;
  touch-action: none;
}

.tile-resize-handle.top {
  top: -6px;
}

.tile-resize-handle.bottom {
  bottom: -6px;
}

.article-tile,
.guidelines-tile {
  grid-column: span 2;
  min-height: calc(var(--home-tile-height) + 190px);
}

.landmark-tile {
  grid-column: span 2;
  min-height: calc(var(--home-tile-height) + 110px);
}

.tile::before {
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.65), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
}

.core-tile { background: linear-gradient(180deg, #eaf6ff, #f5fbff); }
.airway-tile { background: linear-gradient(180deg, #eef8f4, #f6fbf8); }
.critical-tile { background: linear-gradient(180deg, #fff2df, #fff8ef); }
.vent-tile { background: linear-gradient(180deg, #e6f4ff, #f4faff); }
.physiology-tile { background: linear-gradient(180deg, #e9f8fb, #f6fcfd); }
.guidelines-tile { background: linear-gradient(180deg, #f3e9ff, #fbf6ff); }
.article-tile { background: linear-gradient(180deg, #fff6df, #fffaf0); }
.landmark-tile { background: linear-gradient(180deg, #eaf8f0, #f6fcf8); }
.image-tile { background: #fff; }
.cases-tile { background: linear-gradient(180deg, #eef3ff, #f8faff); }

.tile-visual {
  width: 100%;
  height: 170px;
  margin: 0 0 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.tile-visual::before,
.tile-visual::after {
  display: none !important;
}

.tile-icon-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 8px 12px rgba(20, 38, 54, 0.12));
}

.image-tile .tile-icon-image {
  width: 165%;
  height: 112%;
  margin: -6% 0 0 -32.5%;
  object-fit: fill;
  transform: scaleX(1.16) scaleY(0.88);
  transform-origin: center;
}

.image-tile .tile-visual {
  height: 170px;
  margin-bottom: 14px;
  overflow: hidden;
}

.article-tile .tile-visual,
.guidelines-tile .tile-visual {
  height: 132px;
  margin-bottom: 6px;
}

.tile-head {
  justify-content: center;
  min-height: 62px;
  align-items: center;
}

.tile-number {
  display: none;
}

.tile h2 {
  font-size: clamp(1.2rem, 1.45vw, 1.85rem);
  line-height: 1.05;
  text-transform: uppercase;
  font-weight: 950;
}

.core-tile h2,
.vent-tile h2,
.cases-tile h2 { color: #083f92; }
.airway-tile h2,
.physiology-tile h2 { color: #087480; }
.critical-tile h2 { color: #9a3c00; }
.guidelines-tile h2 { color: #51299a; }
.article-tile h2 { color: #7c4a00; }
.landmark-tile h2 { color: #2f6f35; }
.image-tile h2 { color: #7c214d; }

.tile-overview {
  min-height: 58px;
  margin: 0 0 16px;
  color: #051c4c;
  font-weight: 650;
  line-height: 1.32;
}

.article-tile .tile-overview,
.guidelines-tile .tile-overview {
  min-height: 30px;
  margin-bottom: 8px;
}

.article-tile .tile-head,
.guidelines-tile .tile-head {
  min-height: 42px;
}

.explore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
  min-height: 48px;
  margin: 0 auto 12px;
  border-radius: 9px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 18px rgba(20, 40, 70, 0.18);
}

.core-tile .explore-button,
.vent-tile .explore-button,
.cases-tile .explore-button { background: linear-gradient(180deg, #1859c8, #073f9a); }
.airway-tile .explore-button { background: linear-gradient(180deg, #119a78, #03704f); }
.critical-tile .explore-button { background: linear-gradient(180deg, #f38b13, #dd6200); }
.physiology-tile .explore-button { background: linear-gradient(180deg, #159ba0, #05747f); }
.guidelines-tile .explore-button { background: linear-gradient(180deg, #7646cb, #4d2398); }
.article-tile .explore-button { background: linear-gradient(180deg, #c88a15, #9b6100); }
.landmark-tile .explore-button { background: linear-gradient(180deg, #5a9647, #27672f); }
.image-tile .explore-button { background: linear-gradient(180deg, #9c3b68, #77214d); }

.article-list,
.resource-list,
.trial-list {
  width: 100%;
  max-height: 230px;
  text-align: left;
}

.article-tile .article-list,
.guidelines-tile .resource-list {
  max-height: 390px;
}

.landmark-tile .trial-list {
  max-height: 320px;
}

.tile-library {
  width: 100%;
  text-align: left;
  margin-top: 10px;
}

.featured-image-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-icon {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 160px;
  height: 112px;
  transform: translateX(-50%);
  border: 4px solid #0b4599;
  border-radius: 12px 12px 28px 28px;
  background: linear-gradient(90deg, #fff 0 49%, #ddecff 50% 100%);
  box-shadow: 0 10px 0 rgba(11,69,153,0.22);
}

.book-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: 0;
  width: 4px;
  background: #9dc2ef;
}

.book-icon span:first-child {
  position: absolute;
  left: 43px;
  top: 37px;
  width: 24px;
  height: 38px;
  border: 3px solid #ef4f5e;
  border-radius: 18px 9px 18px 18px;
  background: #ff7b83;
}

.book-icon span:nth-child(2) {
  position: absolute;
  left: 72px;
  top: 24px;
  width: 4px;
  height: 54px;
  background: #ef4f5e;
  border-radius: 999px;
}

.book-icon span:nth-child(3) {
  position: absolute;
  right: 25px;
  top: 30px;
  width: 62px;
  height: 55px;
  background: repeating-linear-gradient(180deg, #1b5aaa 0 10px, transparent 10px 21px);
  clip-path: polygon(0 0, 12px 0, 12px 12px, 100% 12px, 100% 18px, 12px 18px, 12px 31px, 88% 31px, 88% 37px, 12px 37px, 12px 50px, 78% 50px, 78% 56px, 0 56px);
}

.airway-visual::before,
.physiology-visual::before,
.critical-visual::before,
.vent-visual::before,
.landmark-tile .tile-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 150px;
  height: 125px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(84, 190, 174, 0.18);
}

.laryngoscope-cartoon {
  left: 50%;
  top: 20px;
  width: 84px;
  height: 114px;
  border-left: 22px solid #3f474d;
  border-bottom: 18px solid #3f474d;
  border-radius: 0 0 0 44px;
  transform: translateX(-50%) rotate(-22deg);
}

.laryngoscope-cartoon::before {
  left: 42px;
  top: 26px;
  width: 34px;
  height: 90px;
  border-radius: 9px;
  background: #303235;
}

.laryngoscope-cartoon::after {
  right: -52px;
  bottom: 5px;
  width: 52px;
  height: 16px;
  background: #0a936c;
}

.critical-monitor {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 150px;
  height: 96px;
  transform: translateX(-50%);
  border: 4px solid #9ca3a9;
  border-radius: 14px;
  background: #eef2f3;
  box-shadow: 0 8px 0 rgba(23,32,34,0.12);
}

.critical-monitor::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 82px;
  height: 54px;
  border-radius: 8px;
  background: #12282e;
}

.critical-monitor span:first-child {
  position: absolute;
  left: 22px;
  top: 39px;
  width: 70px;
  height: 4px;
  background: #22d07a;
  clip-path: polygon(0 50%, 20% 50%, 28% 0, 38% 100%, 48% 50%, 100% 50%, 100% 100%, 48% 100%, 38% 60%, 28% 100%, 20% 100%, 0 100%);
}

.critical-monitor span:nth-child(2),
.critical-monitor span:nth-child(3) {
  position: absolute;
  right: 18px;
  font-size: 1.2rem;
  font-weight: 950;
}

.critical-monitor span:nth-child(2)::before { content: "120"; color: #64d25b; }
.critical-monitor span:nth-child(3)::before { content: "98"; color: #2aa7ff; }
.critical-monitor span:nth-child(2) { top: 24px; }
.critical-monitor span:nth-child(3) { top: 48px; }

.critical-iv {
  position: absolute;
  right: 36px;
  top: 36px;
  width: 24px;
  height: 80px;
  border: 3px solid #9ca3a9;
  border-radius: 7px;
  background: rgba(255,255,255,0.72);
}

.ventilator-body {
  left: 50%;
  top: 28px;
  width: 130px;
  height: 92px;
  transform: translateX(-55%);
  border-color: #356aa7;
  background: #e9f4ff;
}

.ventilator-body::before {
  width: 72px;
  height: 48px;
  background: #0d3460;
}

.ventilator-hose {
  left: 58%;
  top: 80px;
  width: 72px;
  height: 44px;
  border-color: #356aa7;
}

.ventilator-mask {
  left: calc(58% + 62px);
  top: 104px;
  background: #4d8edc;
  border-color: #24548f;
}

.physiology-visual .lung-pair {
  left: 50%;
  top: 20px;
  width: 130px;
  height: 120px;
  transform: translateX(-50%);
}

.physiology-visual .lung-pair::before {
  left: 62px;
  width: 8px;
  height: 88px;
  background: #1473b7;
}

.physiology-visual .lung-pair span {
  top: 34px;
  width: 56px;
  height: 72px;
  background: #ff7b83;
}

.alveoli-badge {
  position: absolute;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border: 3px solid #1473b7;
  border-radius: 50%;
  background: #fff;
}

.alveoli-badge span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f05b68;
}

.alveoli-badge span:first-child { left: 12px; top: 22px; }
.alveoli-badge span:nth-child(2) { left: 24px; top: 12px; }
.alveoli-badge span:nth-child(3) { right: 12px; top: 24px; }

.checklist-icon {
  position: absolute;
  left: 32px;
  top: 26px;
  width: 132px;
  height: 110px;
  border: 4px solid #5b42a6;
  border-radius: 9px;
  background: #fbfbff;
}

.checklist-icon::before {
  content: "";
  position: absolute;
  left: 42px;
  top: -18px;
  width: 48px;
  height: 28px;
  border: 4px solid #5b42a6;
  border-radius: 14px 14px 6px 6px;
  background: #7660bd;
}

.checklist-icon span {
  position: absolute;
  left: 22px;
  width: 70px;
  height: 20px;
  border-left: 5px solid #46ad6f;
  border-bottom: 5px solid #46ad6f;
  transform: rotate(-45deg) scale(0.35);
}

.checklist-icon span:first-child { top: 22px; }
.checklist-icon span:nth-child(2) { top: 52px; }
.checklist-icon span:nth-child(3) { top: 82px; }

.shield-icon {
  position: absolute;
  right: 32px;
  top: 74px;
  width: 64px;
  height: 78px;
  background: #6e54b5;
  clip-path: polygon(50% 0, 100% 18%, 88% 78%, 50% 100%, 12% 78%, 0 18%);
  filter: drop-shadow(0 6px 0 rgba(23,32,34,0.14));
}

.shield-icon::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 950;
}

.newspaper {
  left: 50%;
  top: 26px;
  width: 154px;
  height: 108px;
  transform: translateX(-50%) rotate(2deg);
  border-color: #9aa0a6;
  box-shadow: 0 8px 0 rgba(23,32,34,0.12);
}

.newspaper::after {
  content: "PCCM";
  position: absolute;
  left: 18px;
  top: 10px;
  font-size: 1.1rem;
  font-weight: 950;
  color: #344250;
}

.newspaper::before {
  top: 38px;
  background: #78828a;
}

.trial-visual {
  display: block;
  border: 4px solid #9ca3a9;
  border-radius: 10px;
  background: #fff;
}

.trial-visual span {
  position: absolute;
  border: 0;
  background: transparent;
  color: #172022;
  font-size: 0.67rem;
  font-weight: 850;
}

.trial-visual span:first-child { left: 20px; top: 18px; }
.trial-visual span:nth-child(2) { left: 70px; top: 18px; }
.trial-visual span:nth-child(3) { left: 124px; top: 18px; }
.trial-visual span:nth-child(4) { left: 166px; top: 18px; }
.trial-visual span:nth-child(5) {
  left: 50%;
  top: 56px;
  width: 78px;
  height: 78px;
  transform: translateX(-15%);
  border: 8px solid #273559;
  border-radius: 50%;
  background: transparent;
}

.trial-visual span:nth-child(5)::before,
.trial-visual span:nth-child(5)::after {
  content: "";
  position: absolute;
  bottom: -42px;
  right: -25px;
  width: 14px;
  height: 52px;
  border-radius: 999px;
  background: #273559;
  transform: rotate(-43deg);
}

.trial-visual::before {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 32px;
  width: 92px;
  height: 86px;
  background: linear-gradient(90deg, #4b94d8 0 24%, transparent 24% 38%, #50b66f 38% 62%, transparent 62% 76%, #5a66b0 76%);
}

.ultrasound-icon {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 170px;
  height: 112px;
  transform: translateX(-50%);
  border: 5px solid #111820;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 65%, rgba(255,255,255,0.6), transparent 18%),
    conic-gradient(from 210deg at 50% 0, transparent 0 28%, #8fa0aa 28% 50%, transparent 50% 100%),
    #1d2830;
}

.ultrasound-icon::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 18px;
  bottom: 16px;
  background: repeating-radial-gradient(ellipse at 50% 5%, rgba(255,255,255,0.55) 0 2px, transparent 2px 6px);
  opacity: 0.5;
  clip-path: polygon(50% 0, 92% 100%, 8% 100%);
}

.chat-icon {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 110px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 14px;
  background: #3768bf;
}

.chat-icon::after {
  content: "";
  position: absolute;
  left: 38px;
  bottom: -18px;
  border-width: 18px 16px 0 0;
  border-style: solid;
  border-color: #3768bf transparent transparent transparent;
}

.people-icon {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 164px;
  height: 70px;
  transform: translateX(-50%);
}

.people-icon span,
.people-icon::before,
.people-icon::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 50px;
  height: 46px;
  border-radius: 18px 18px 6px 6px;
  background: #3768bf;
}

.people-icon span:first-child { left: 0; }
.people-icon span:nth-child(2) { left: 57px; height: 56px; }
.people-icon span:nth-child(3) { right: 0; }

.people-icon::before,
.people-icon::after {
  bottom: 46px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.people-icon::before { left: 8px; }
.people-icon::after { right: 8px; }

@media (max-width: 1120px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-tile,
  .guidelines-tile,
  .landmark-tile {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .brand {
    justify-self: start;
    order: -1;
  }

  .search {
    justify-self: stretch;
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .tile-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .article-tile {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 0;
  }

  .guidelines-tile,
  .landmark-tile {
    grid-column: span 1;
    min-height: 0;
  }
}
