:root {
    --ink: #12211d;
    --ink-soft: #3e4f49;
    --paper: #faf7f0;
    --paper-raised: #ffffff;
    --teal: #0b6e63;
    --teal-dark: #063a33;
    --teal-deep: #04211d;
    --teal-tint: #e7efea;
    --teal-tint-2: #eff3ec;
    --gold: #c79a45;
    --line: #dedacb;
    --line-soft: #eae6d8;
    --shadow-soft: 0 30px 60px -30px rgba(6, 58, 51, 0.25);
    --shadow-tiny: 0 10px 24px -14px rgba(6, 58, 51, 0.35);
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --maxw: 1240px;
  }
  * {
    box-sizing: border-box;
  }
  html {
    scroll-behavior: smooth;
  }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Work Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  img {
    max-width: 100%;
    display: block;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 32px;
  }
  @media (max-width: 768px) {
    .wrap {
      padding: 0 20px;
    }
  }
  h1,
  h2,
  h3,
  h4 {
    font-family: "Fraunces", serif;
    font-weight: 500;
    line-height: 1.05;
    margin: 0;
    color: var(--teal-deep);
    letter-spacing: -0.01em;
  }
  .serif-italic {
    font-style: italic;
    font-weight: 400;
    color: var(--teal);
  }
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--teal);
    background: var(--teal-tint);
    border: 1px solid rgba(11, 110, 99, 0.18);
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    font-weight: 500;
  }
  .eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex: none;
    box-shadow: 0 0 0 3px rgba(199, 154, 69, 0.25);
  }
  section {
    position: relative;
  }
  .section-pad {
    padding: 100px 0;
  }
  @media (max-width: 900px) {
    .section-pad {
      padding: 64px 0;
    }
  }
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(6px);
    transition:
      opacity 800ms var(--ease),
      transform 800ms var(--ease),
      filter 800ms var(--ease);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition:
      transform 550ms var(--ease),
      box-shadow 550ms var(--ease);
    white-space: nowrap;
  }
  .btn:active {
    transform: scale(0.97);
  }
  .btn-primary {
    background: var(--teal-deep);
    color: #f4f1e6;
  }
  .btn-primary:hover {
    box-shadow: var(--shadow-tiny);
  }
  .btn-ghost {
    background: transparent;
    color: var(--teal-deep);
    border: 1.5px solid var(--line);
    padding: 6px 8px 6px 22px;
  }
  .btn-ghost:hover {
    border-color: var(--teal);
  }
  .btn .ic {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    transition: transform 550ms var(--ease);
    background: var(--teal);
  }
  .btn-ghost .ic {
    background: var(--teal-tint);
    color: var(--teal-deep);
  }
  .btn:hover .ic {
    transform: translate(2px, -2px) scale(1.06);
  }
  .btn .ic svg {
    width: 15px;
    height: 15px;
  }

  /* nav */
  .nav-shell {
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
  }
  .nav-pill {
    pointer-events: all;
    width: 100%;
    max-width: 1160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(250, 247, 240, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(6, 58, 51, 0.1);
    border-radius: 999px;
    padding: 9px 10px 9px 22px;
    box-shadow: 0 18px 40px -24px rgba(6, 58, 51, 0.35);
    transition: box-shadow 400ms var(--ease);
  }
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--teal-deep);
  }
  .nav-logo .mark {
    width: 30px;
    height: 30px;
    flex: none;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
  }
  .nav-links a {
    position: relative;
    padding: 4px 0;
    transition: color 300ms;
  }
  .nav-links a.active {
    color: var(--teal-deep);
  }
  .nav-links a:hover {
    color: var(--teal-deep);
  }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0;
    background: var(--teal);
    transition: width 350ms var(--ease);
  }
  .nav-links a:hover::after,
  .nav-links a.active::after {
    width: 100%;
  }
  .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .lang-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    font-weight: 600;
    background: var(--teal-tint);
    border-radius: 999px;
    padding: 4px;
  }
  .lang-toggle span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--ink-soft);
    cursor: pointer;
  }
  .lang-toggle span.active {
    background: var(--teal-deep);
    color: #fff;
  }
  @media (max-width: 940px) {
    .nav-links {
      display: none;
    }
  }

  /* hero */
  .sp-hero {
    padding: 160px 0 20px;
    overflow: hidden;
    position: relative;
  }
  .sp-hero::before {
    content: "";
    position: absolute;
    top: -260px;
    right: -220px;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(
      circle at 30% 30%,
      rgba(11, 110, 99, 0.15),
      rgba(11, 110, 99, 0) 70%
    );
    pointer-events: none;
  }
  .sp-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: end;
  }
  @media (max-width: 960px) {
    .sp-hero-grid {
      grid-template-columns: 1fr;
    }
  }
  .sp-hero h1 {
    font-size: clamp(34px, 4.6vw, 58px);
  }
  .sp-hero p {
    margin-top: 20px;
    font-size: 16.5px;
    line-height: 1.75;
    color: var(--ink-soft);
    max-width: 520px;
  }
  .mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    overflow: hidden;
  }
  .mini-stats div {
    background: var(--paper-raised);
    padding: 18px 16px;
  }
  .mini-stats .num {
    font-family: "Fraunces", serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--teal-deep);
  }
  .mini-stats .lbl {
    margin-top: 4px;
    font-family: var(--Font-2);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  /* filter toolbar */
  .filter-shell {
    margin-top: 56px;
  }
  .filter-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-soft);
    border-radius: 26px;
    padding: 20px 24px;
    box-shadow: var(--shadow-tiny);
  }
  .filter-row1 {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
  }
  .search-box {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--teal-tint-2);
    border-radius: 999px;
    padding: 10px 18px;
  }
  .search-box svg {
    width: 16px;
    height: 16px;
    color: var(--teal);
    flex: none;
  }
  .search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-family: "Work Sans", sans-serif;
    font-size: 14px;
    color: var(--ink);
    width: 100%;
  }
  .result-count {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    color: var(--ink-soft);
    white-space: nowrap;
  }
  .chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
  }
  .chip {
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 300ms var(--ease);
    background: var(--paper-raised);
  }
  .chip:hover {
    border-color: var(--teal);
    color: var(--teal-deep);
  }
  .chip.active {
    background: var(--teal-deep);
    border-color: var(--teal-deep);
    color: #fff;
  }

  .head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 44px;
  }
  @media (max-width: 760px) {
    .head-row {
      flex-direction: column;
      align-items: flex-start;
      gap: 18px;
    }
  }
  .head-row h2 {
    font-size: clamp(26px, 3vw, 38px);
    max-width: 640px;
  }
  .head-tagline {
    font-size: 14.5px;
    color: var(--ink-soft);
    max-width: 340px;
    line-height: 1.6;
  }

  /* department grid (primary browse) */
  .dept-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  @media (max-width: 980px) {
    .dept-grid {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media (max-width: 560px) {
    .dept-grid {
      grid-template-columns: 1fr;
    }
  }
  .dept-card {
    background: var(--paper-raised);
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition:
      transform 500ms var(--ease),
      box-shadow 500ms var(--ease),
      border-color 400ms;
  }
  .dept-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-color: transparent;
  }
  .dept-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .dept-ic {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--teal-tint);
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }
  .dept-ic svg {
    width: 22px;
    height: 22px;
  }
  .dept-count {
    font-family: "IBM Plex Mono", monospace;
    font-size: 10.5px;
    color: var(--ink-soft);
    background: var(--teal-tint-2);
    padding: 4px 10px;
    border-radius: 999px;
  }
  .dept-card h3 {
    font-family: "Fraunces", serif;
    font-weight: 500;
    font-size: 19px;
    line-height: 1.3;
  }
  .dept-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--teal-deep);
    margin-top: auto;
  }
  .dept-link svg {
    width: 11px;
    height: 11px;
    transition: transform 350ms var(--ease);
  }
  .dept-card:hover .dept-link svg {
    transform: translate(3px, -3px);
  }

  /* topic grid (condition/procedure guides) */
  .topic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  @media (max-width: 980px) {
    .topic-grid {
      grid-template-columns: 1fr 1fr;
    }
  }
  @media (max-width: 560px) {
    .topic-grid {
      grid-template-columns: 1fr;
    }
  }
  .topic-card {
    background: var(--paper-raised);
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    padding: 6px;
    overflow: hidden;
    transition:
      transform 500ms var(--ease),
      box-shadow 500ms var(--ease);
  }
  .topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
  }
  .topic-media {
    height: 120px;
    border-radius: 17px;
    background: linear-gradient(
      140deg,
      var(--teal-tint),
      var(--teal-tint-2)
    );
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 12px;
  }
  .topic-media span {
    font-family: "IBM Plex Mono", monospace;
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.88);
    color: var(--teal-deep);
    padding: 4px 9px;
    border-radius: 999px;
  }
  .topic-body {
    padding: 16px 14px 14px;
  }
  .topic-body h3 {
    font-family: var(--Font-2);
    font-weight: 500;
    font-size: 16.5px;
    margin-bottom: 8px;
    min-height: 40px;
    color: var(--ink-soft);
  }
  .topic-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
  }
  .topic-link svg {
    width: 10px;
    height: 10px;
    transition: transform 350ms var(--ease);
  }
  .topic-card:hover .topic-link svg {
    transform: translate(2px, -2px);
  }

  .empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 70px 20px;
    border: 1.5px dashed var(--line);
    border-radius: 26px;
  }
  .empty-state.show {
    display: flex;
  }
  .empty-state .ic {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--teal-tint);
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .empty-state h3 {
    font-size: 19px;
  }
  .empty-state p {
    margin: 0;
    font-size: 14px;
    color: var(--ink-soft);
    max-width: 340px;
  }

  .cta-band {
    background: var(--teal-deep);
    border-radius: 36px;
    margin: 0 32px;
    padding: 70px 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
  }
  @media (max-width: 900px) {
    .cta-band {
      margin: 0 16px;
      padding: 48px 28px;
      flex-direction: column;
      align-items: flex-start;
    }
  }
  .cta-band::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(127, 217, 182, 0.16),
      transparent 70%
    );
  }
  .cta-band h2 {
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
    max-width: 560px;
  }
  .cta-band p {
    color: #b7ccc5;
    margin-top: 12px;
    font-size: 14.5px;
    max-width: 440px;
  }
  .cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
  }
  .cta-band .btn-primary {
    background: #fff;
    color: var(--teal-deep);
  }
  .cta-band .btn-primary .ic {
    background: var(--teal-tint);
    color: var(--teal-deep);
  }
  .cta-band .btn-ghost {
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
  }
  .cta-band .btn-ghost .ic {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }

  footer {
    background: var(--paper);
    padding: 90px 0 30px;
  }
  .foot-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
    gap: 40px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line-soft);
  }
  @media (max-width: 860px) {
    .foot-grid {
      grid-template-columns: 1fr 1fr;
      row-gap: 36px;
    }
  }
  @media (max-width: 560px) {
    .foot-grid {
      grid-template-columns: 1fr;
    }
  }
  .foot-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Fraunces", serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--teal-deep);
    margin-bottom: 16px;
  }
  .foot-logo .mark {
    width: 32px;
    height: 32px;
  }
  .foot-blurb {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.7;
    max-width: 300px;
  }
  .foot-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }
  .foot-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--teal-tint);
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      background 300ms,
      color 300ms;
  }
  .foot-social a:hover {
    background: var(--teal-deep);
    color: #fff;
  }
  .foot-social svg {
    width: 15px;
    height: 15px;
  }
  .foot-h {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 18px;
  }
  .foot-links li {
    margin-bottom: 11px;
    font-size: 14px;
    color: var(--ink-soft);
  }
  .foot-links a:hover {
    color: var(--teal-deep);
  }
  .foot-contact li {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 12px;
    line-height: 1.5;
  }
  .foot-contact b {
    display: block;
    color: var(--ink);
    font-size: 11px;
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 3px;
  }
  .foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 26px;
    font-size: 12.5px;
    color: var(--ink-soft);
    flex-wrap: wrap;
    gap: 10px;
  }

  .mbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 190;
    display: none;
    gap: 1px;
    background: var(--line-soft);
  }
  @media (max-width: 760px) {
    .mbar {
      display: flex;
    }
  }
  .mbar a {
    flex: 1;
    background: var(--paper-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-deep);
  }
  .mbar a:first-child {
    background: var(--teal-deep);
    color: #fff;
  }
  .mbar svg {
    width: 16px;
    height: 16px;
  }