/*
  School Health Portal — the "Option A" look from the prototype canvas.

  Bootstrap 5 is loaded first (grid, forms, utilities). This file sits on top
  and gives everything the prototype's colors, font and spacing.

  Layout rule:
    - 992px and wider: navy sidebar on the left (desktop artboards)
    - narrower:        navy top bar + bottom tab bar (phone artboards)
*/

/* ---------- Font (kept in static/fonts so it works with no internet) ------ */

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-700-normal.c277d7b83f8a.woff2") format("woff2");
}

/* ---------- Colors: change the palette here, in one place ----------------- */

:root {
  --navy: #1B2A9E;          /* sidebar, top bar, login panel */
  --navy-tile: #2A3DB8;     /* tiles on the login panel */
  --navy-line: #3A4CC4;     /* divider inside the sidebar */
  --accent: #1F35C7;        /* buttons and links */
  --gold: #F5B921;          /* active menu item, top bar underline */
  --gold-ink: #131C4D;      /* text on gold */
  --ink: #0F1B2D;           /* main text */
  --ink-2: #33435C;         /* secondary text on phone cards */
  --muted: #4A5D7A;         /* labels, dates */
  --page: #F1F5FB;          /* page background */
  --card: #FFFFFF;
  --line: #D6E1F2;          /* card borders */
  --line-soft: #EDF2FA;     /* row dividers */
  --field: #B8C7E0;         /* input and outline-button borders */
  --on-navy: #D6E1F2;
  --on-navy-muted: #B8C7E0;
  --danger: #B91C1C;
  --danger-ink: #991B1B;
  --danger-deep: #7F1D1D;
  --danger-bg: #FEF2F2;
  --danger-badge: #FEE2E2;
  --danger-line: #FCA5A5;
  --info-bg: #E3ECFB;
  --info-ink: #1E3A8A;
  --ok: #166534;

  /* Tell Bootstrap to use the same font, text color and link colors. */
  --bs-body-font-family: "IBM Plex Sans", system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--page);
  --bs-link-color: var(--accent);
  --bs-link-color-rgb: 31, 53, 199;
  --bs-link-hover-color: var(--navy);
  --bs-link-hover-color-rgb: 27, 42, 158;
}

body {
  font-size: 14px;
}

a {
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Seal (placeholder until the school sends the real one) -------- */

.seal {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px dashed var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.seal--lg { width: 56px; height: 56px; }
.seal--has-image { border: none; }
.seal img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 992px) {
  .seal--lg { width: 64px; height: 64px; font-size: 11px; }
}

/* ---------- App shell ------------------------------------------------------ */

.portal-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Phone: navy top bar with the gold underline */
.portal-topbar {
  background: var(--navy);
  color: #FFFFFF;
  border-bottom: 3px solid var(--gold);
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-brand__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.portal-brand__sub { font-size: 12px; color: var(--on-navy-muted); }
.portal-topbar .portal-brand { gap: 10px; }
.portal-topbar .portal-brand__name { font-size: 15px; }

/* "Log out" is a form button (POST) styled to look like the prototype link. */
.logout-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--on-navy);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.logout-button:hover { color: #FFFFFF; }
.portal-topbar .logout-button { padding: 14px 0 14px 12px; }

/* Desktop: navy sidebar. Hidden on phones by Bootstrap's d-none d-lg-flex. */
.portal-sidebar {
  background: var(--navy);
  color: #FFFFFF;
  padding: 28px 20px;
  flex-direction: column;
  gap: 32px;
}
.portal-sidebar__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portal-sidebar__link {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--on-navy);
  text-decoration: none;
  font-size: 14px;
}
.portal-sidebar__link:hover {
  color: #FFFFFF;
  background: var(--navy-tile);
}
.portal-sidebar__link.is-active,
.portal-sidebar__link.is-active:hover {
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
}
.portal-sidebar__user {
  margin-top: auto;
  border-top: 1px solid var(--navy-line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portal-sidebar__user-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.portal-sidebar__user-role { font-size: 12px; color: var(--on-navy-muted); }
.portal-sidebar__user .logout-button { margin-top: 8px; align-self: flex-start; }

.portal-main {
  flex: 1;
  min-width: 0;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Phone: bottom tab bar, always visible above the page */
.portal-tabbar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(10px + env(safe-area-inset-bottom));
}
.portal-tabbar__tab {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.portal-tabbar__tab:hover { color: var(--accent); }
.portal-tabbar__tab.is-active { color: var(--accent); font-weight: 700; }

@media (min-width: 992px) {
  .portal-shell { flex-direction: row; }
  .portal-sidebar {
    flex: 0 0 260px;
    width: 260px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
  .portal-main { padding: 28px 32px; gap: 22px; }
}

/* ---------- Page heading --------------------------------------------------- */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-date { font-size: 13px; color: var(--muted); }
.page-title { margin: 4px 0 0; font-size: 24px; font-weight: 700; }
.page-lede { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.page-note { font-size: 12px; line-height: 1.5; color: var(--muted); }

@media (min-width: 992px) {
  .page-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
  }
  .page-title { font-size: 26px; }
}

/* ---------- Cards ---------------------------------------------------------- */

.card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.card-panel--stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title { margin: 0; font-size: 17px; font-weight: 700; }
.card-label { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.card-head a { font-size: 14px; font-weight: 600; padding: 12px 0 12px 12px; }
.text-muted-2 { color: var(--muted); }
.text-small { font-size: 13px; }

@media (min-width: 992px) {
  .card-panel { padding: 20px; }
  .card-panel--tight { padding: 18px; }
  .card-head { margin-bottom: 10px; }
  .card-head a { padding: 0; }
}

/* Grids of cards. Columns per screen size match the artboards. */
.card-grid { display: grid; gap: 8px; }
.card-grid--stack { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 992px) {
  .card-grid { gap: 16px; }
  .card-grid--stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Two columns side by side on desktop (2/3 + 1/3), stacked on phones */
.split { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 992px) {
  .split { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
  .split__main { flex: 2 1 460px; min-width: 0; }
  .split__side { flex: 1 1 280px; min-width: 0; }
}

/* ---------- Stat tiles ----------------------------------------------------- */

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat__label { font-size: 13px; color: var(--muted); }
.stat__value { font-size: 28px; font-weight: 700; margin-top: 4px; line-height: 1.2; }
.stat__value--small { font-size: 17px; line-height: 1.3; margin-top: 8px; }
.stat__value--danger { color: var(--danger); }
.stat__note { font-size: 12px; line-height: 1.35; color: var(--muted); margin-top: 2px; }

/* Teacher phone layout: number first, short label under it */
.stat--compact { padding: 12px; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat--compact .stat__label { font-size: 12px; line-height: 1.35; margin-top: 2px; }
.stat--compact .stat__value { font-size: 26px; margin-top: 0; }
.stat--compact .stat__value--small { font-size: 14px; line-height: 1.3; margin-top: 0; }

@media (min-width: 992px) {
  .stat, .stat--compact { padding: 18px; display: block; }
  .stat__label, .stat--compact .stat__label { font-size: 13px; margin-top: 0; }
  .stat__value, .stat--compact .stat__value { font-size: 30px; margin-top: 6px; }
  .stat__value--small { font-size: 20px; margin-top: 10px; }
  .stat--compact .stat__value--small { font-size: 20px; margin-top: 10px; }
}

/* Small measurements inside a card (height / weight / BMI) */
.measure-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.measure__label { font-size: 12px; color: var(--muted); }
.measure__value { font-size: 20px; font-weight: 700; }

/* ---------- Alerts and badges --------------------------------------------- */

.health-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
}
.health-alert svg { flex-shrink: 0; margin-top: 2px; color: var(--danger); }
.health-alert__title { font-weight: 700; color: var(--danger-ink); font-size: 16px; }
.health-alert__text { font-size: 14px; line-height: 1.45; color: var(--danger-deep); margin-top: 2px; }

.notice {
  padding: 14px;
  border-radius: 10px;
  background: var(--info-bg);
  border: 1px solid var(--field);
  font-size: 14px;
  line-height: 1.45;
  color: var(--info-ink);
}

.badge-alert {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--danger-badge);
  color: var(--danger-ink);
  font-size: 12px;
  font-weight: 600;
}
.text-danger-ink { color: var(--danger-ink); font-weight: 600; }
.text-ok { color: var(--ok); font-weight: 600; }

@media (min-width: 992px) {
  .health-alert { padding: 16px; }
  .notice { padding: 14px 16px; }
}

/* ---------- Buttons and forms --------------------------------------------- */

.btn-portal,
.btn-portal-outline {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-portal {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #FFFFFF;
}
.btn-portal:hover { background: var(--navy); border-color: var(--navy); color: #FFFFFF; text-decoration: none; }
.btn-portal-outline {
  border: 1px solid var(--field);
  background: #FFFFFF;
  color: #0B2545;
}
.btn-portal-outline:hover { background: var(--page); text-decoration: none; }
.btn-portal:disabled,
.btn-portal-outline:disabled { opacity: 1; cursor: default; }

.button-row { display: flex; flex-direction: column; gap: 8px; }

.portal-input.form-control {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field);
  border-radius: 8px;
  font-size: 16px;   /* 16px stops iPhones from zooming in on focus */
  color: var(--ink);
}
.portal-input.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 53, 199, 0.2);
}
.portal-label { font-size: 14px; font-weight: 600; margin-bottom: 6px; }

.search-form { display: flex; gap: 8px; }
.search-form .portal-input { flex: 1; min-width: 0; background: #FFFFFF; }

@media (min-width: 992px) {
  .btn-portal, .btn-portal-outline { min-height: 44px; font-size: 14px; }
  .button-row { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .search-form { flex: 0 1 420px; }
  .search-form--wide { flex-basis: 460px; }
  .search-form .portal-input.form-control { height: 44px; font-size: 14px; }
  .search-form .btn-portal { padding: 0 20px; }
}

/* ---------- Tables (desktop) and their card lists (phone) ------------------ */

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}
.portal-table th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.portal-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.portal-table tr:last-child td { border-bottom: none; }
.portal-table .cell-strong { font-weight: 600; }
.table-responsive { position: relative; }

.row-list { list-style: none; margin: 0; padding: 0; }
.row-list > li { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.row-list > li:last-child { padding-bottom: 0; }
.row-list__meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.row-list__title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.row-list__detail { font-size: 14px; color: var(--ink-2); margin-top: 2px; }

/* label on the left, value on the right */
.pair-list { display: flex; flex-direction: column; }
.pair-list__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pair-list__row:last-child { border-bottom: none; padding-bottom: 0; }
.pair-list__row > :last-child { flex-shrink: 0; }

/* Teacher phone layout: one card per student to watch */
.watch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.watch-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.watch-card__name { font-weight: 700; font-size: 16px; }
.watch-card__contact { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-soft); padding-top: 10px; }

.todo-item { padding: 12px; border-radius: 10px; background: var(--page); }
.todo-item__title { font-weight: 600; font-size: 14px; }
.todo-item__detail { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Login page ----------------------------------------------------- */

.login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.login-hero {
  background: var(--navy);
  color: #FFFFFF;
  border-bottom: 3px solid var(--gold);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-hero .portal-brand__name { font-size: 17px; }
.login-hero .portal-brand__sub { font-size: 13px; }
.login-hero__title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; }
.login-hero__text { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--on-navy); }
.login-roles { display: none; }
.login-role { padding: 14px; border-radius: 10px; background: var(--navy-tile); }
.login-role__name { font-weight: 600; font-size: 14px; }
.login-role__text { font-size: 13px; color: var(--on-navy-muted); margin-top: 2px; }

.login-main { flex: 1; padding: 16px; display: flex; flex-direction: column; }
.login-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-card__title { margin: 0; font-size: 22px; font-weight: 700; }
.login-card__text { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.login-card .btn-portal { width: 100%; min-height: 50px; font-size: 16px; }
.login-error {
  font-size: 13px;
  color: var(--danger-ink);
  background: var(--danger-bg);
  padding: 8px 12px;
  border-radius: 8px;
}
.login-help { font-size: 13px; color: var(--muted); }
.login-dev {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

@media (min-width: 992px) {
  .login-shell { flex-direction: row; }
  .login-hero {
    flex: 1 1 50%;
    border-bottom: none;
    padding: 56px;
    justify-content: space-between;
    gap: 40px;
  }
  .login-hero .portal-brand__name { font-size: 18px; }
  .login-hero__copy { max-width: 460px; }
  .login-hero__title { font-size: 38px; line-height: 1.15; }
  .login-hero__text { margin-top: 16px; font-size: 16px; line-height: 1.6; }
  .login-roles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 460px;
  }
  .login-main {
    flex: 1 1 50%;
    padding: 56px 32px;
    align-items: center;
    justify-content: center;
  }
  .login-card { max-width: 400px; padding: 36px 32px; gap: 20px; }
  .login-card__title { font-size: 24px; }
  .login-card__text { margin-top: 6px; }
  .login-card .btn-portal { min-height: 48px; font-size: 15px; }
  .login-card .portal-input.form-control { height: 46px; font-size: 15px; }
}

/* ---------- Error pages (403, 404) ---------------------------------------- */

.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.error-card { max-width: 440px; text-align: left; }
.error-card__code { font-size: 13px; font-weight: 700; color: var(--danger-ink); letter-spacing: 0.04em; }
.error-card__title { font-size: 24px; font-weight: 700; margin: 4px 0 8px; }
.error-card form { display: inline; }

/* Bootstrap gives inputs the page color and code a pink color; undo both. */
.portal-input.form-control { background-color: #FFFFFF; }
code { color: inherit; font-size: 0.95em; }

/* ---------- Record page ---------------------------------------------------- */

.portal-input.portal-textarea.form-control { height: auto; padding: 10px 14px; }
.form-error { color: var(--danger-ink); font-size: 13px; font-weight: 600; margin-top: 4px; }
.form-help { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tab-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-links a {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--field);
  background: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}
.tab-links a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }

/* Clinic visits: stacked cards on phones, a table from 992px up. */
.visit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.visit-table, .visit-table tbody, .visit-table tr, .visit-table td { display: block; }
.visit-table tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.visit-table tr:last-child { border-bottom: none; }
.visit-table td { border-bottom: none; padding: 4px 8px; }
@media (max-width: 991.98px) {
  .visit-table td { overflow-wrap: anywhere; }
}
.visit-table td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
@media (min-width: 992px) {
  .visit-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .visit-table { display: table; }
  .visit-table thead { display: table-header-group; }
  .visit-table tbody { display: table-row-group; }
  .visit-table tr { display: table-row; padding: 0; }
  .visit-table td { display: table-cell; padding: 12px 8px; border-bottom: 1px solid var(--line-soft); }
  .visit-table tr:last-child td { border-bottom: none; }
  .visit-table td::before { content: none; }
}

/* The health form page before the first submit: a plain bar and a centred column, no menu. */
.gate-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: #FFFFFF; padding: 4px 16px;
}
.gate-bar .portal-brand__name { font-weight: 700; }
.gate-bar .logout-button { padding: 14px 0 14px 12px; }
.gate-main {
  width: 100%; max-width: 792px; margin: 0 auto; padding: 20px 16px 32px;
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}

/* ---------- Student health form --------------------------------------------- */

.health-form { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.health-form .btn-portal { align-self: flex-start; }
.form-section { min-width: 0; }
/* A floated legend sits inside the card, not on its border line. */
.form-section > legend {
  float: left; width: 100%; padding: 0; margin: 0 0 12px;
  font-size: 17px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere;
}
.form-section > legend + * { clear: left; }
.form-subsection { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.form-subsection > legend {
  float: none; width: auto; padding: 0; margin: 8px 0 0;
  font-size: 15px; font-weight: 600; color: var(--muted);
}
/* A Yes/No question: the question on the left, the answers on the right, wrapping on a narrow phone. */
.yn-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 12px; min-width: 0; padding: 4px 0; margin: 0;
  border: 0; border-bottom: 1px solid var(--line-soft);
}
.yn-row > legend {
  float: none; width: auto; flex: 1 1 140px; min-width: 0; margin: 0; padding: 0;
  font-size: 14px; font-weight: 400; overflow-wrap: anywhere;
}
.yn-row__options { display: flex; flex-wrap: wrap; gap: 0 4px; }
.yn-row .form-check { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0 8px 0 0; }
.yn-row .form-check-input { float: none; margin: 0; flex-shrink: 0; width: 20px; height: 20px; }
.yn-row .form-check-label { font-size: 14px; padding: 12px 0; }
.yn-row__error { flex-basis: 100%; margin: 0 0 4px; }
.yn-row.has-error { border-left: 3px solid var(--danger-ink); padding-left: 8px; }
.health-form .portal-input.form-control { max-width: 100%; }
.health-form-photo { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
/* Long answers wrap instead of pushing the page sideways. */
.pair-list--wrap .pair-list__row > :last-child { flex-shrink: 1; min-width: 0; text-align: right; overflow-wrap: anywhere; }
