/* Kidney Navigator /app shell: left menu (sidebar on wide screens, slide-in drawer on phones),
   the tops of Today (greeting, blood pressure card, section tiles). Loaded after every other
   stylesheet. Text is 16px or larger, targets are 48px or taller, the current page is shown with a
   bar and bold type as well as colour. */
:root { --kn-side: 288px; --kn-nav-bg: #fff; --kn-nav-ink: #171719; --kn-nav-line: #e5e5e5; }
.kn-num { font-variant-numeric: tabular-nums; }

/* ---- the menu (nav.tabs, rendered by the app core) ---- */
html body nav.tabs {
  position: fixed; top: 0; bottom: 0; left: 0; right: auto; width: var(--kn-side);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: var(--kn-nav-bg); color: var(--kn-nav-ink);
  border: 0; border-right: 1.5px solid var(--kn-nav-line);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  z-index: 60; box-sizing: border-box;
}
html body nav.tabs > div#tabs { display: flex; flex-direction: column; gap: 6px; max-width: none; margin: 0; padding: 0; }
html body nav.tabs > div#tabs button {
  position: relative; flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px;
  min-height: 56px; width: 100%; padding: 0 16px 0 20px; margin: 0;
  background: transparent; color: var(--kn-nav-ink); border: 0; border-radius: 14px;
  font-size: 1.125rem; font-weight: 600; line-height: 1.2; text-align: left; overflow-wrap: normal;
}
html body nav.tabs > div#tabs button svg { width: 26px; height: 26px; flex: none; }
html body nav.tabs > div#tabs button:hover { background: #f1f1f1; }
html body nav.tabs > div#tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
html body nav.tabs > div#tabs button[aria-current="page"] {
  background: #f6e9ea; color: #7d1219; font-weight: 800; border-radius: 14px;
  box-shadow: inset 6px 0 0 var(--blue);
}
html.contrast body nav.tabs > div#tabs button[aria-current="page"] { background: #000; color: #fff; box-shadow: none; }
html.contrast body nav.tabs { border-right-color: #000; }
/* High contrast (2026-11-24): kn-reference.css paints "html.contrast nav.tabs" navy, which beat the
   white menu and left dark labels on navy and pale text on the white Settings buttons. Keep the menu
   white with black text in high contrast. */
html.contrast body nav.tabs { background: #fff; color: #000; }
html.contrast body nav.tabs > div#tabs button { color: #000; }
html.contrast body nav.tabs > div#tabs button:not([aria-current="page"]):hover { background: #ececec; }
html.contrast body nav.tabs .kn-nav-extra h2 { color: #000; border-top-color: #000; }
html.contrast body nav.tabs .kn-nav-extra button { background: #fff; color: #000; border-color: #000; font-size: 1.0625rem; font-weight: 700; }
html.contrast body nav.tabs .kn-nav-extra .kn-hlinks a, html.contrast body nav.tabs .kn-nav-extra label { color: #000; }

html body nav.tabs div.kn-nav-extra, html body nav.tabs div.kn-lang { display: flex; grid-template-columns: none; max-width: none; margin-left: 0; margin-right: 0; }
.kn-nav-extra { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.kn-nav-extra h2 { margin: 12px 4px 0; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; border-top: 1.5px solid var(--kn-nav-line); padding-top: 16px; }
.kn-nav-extra .kn-nav-cust { min-height: 52px; padding: 0 16px; border: 1.5px solid var(--kn-nav-line); border-radius: 14px; background: #fff; color: var(--kn-nav-ink); font: inherit; font-size: 1.0625rem; font-weight: 700; text-align: left; cursor: pointer; }
.kn-nav-extra .kn-hlinks { display: flex; flex-direction: column; gap: 0; max-width: none; margin: 0; padding: 0; }
.kn-nav-extra .kn-hlinks a { min-height: 48px; padding: 0 16px; display: flex; align-items: center; font-size: 1.0625rem; color: var(--kn-nav-ink); text-decoration: underline; border-radius: 12px; }
.kn-nav-extra .kn-hlinks a:hover { background: #f1f1f1; }
.kn-nav-extra .kn-top-details { max-width: none; margin: 0; border: 1.5px solid var(--kn-nav-line); border-radius: 14px; background: #fff; }
.kn-nav-extra .kn-top-details > summary { min-height: 48px; padding: 10px 16px; font-size: 1.0625rem; }
.kn-nav-extra .kn-top-details aside { padding: 4px 8px 10px; }
.kn-nav-extra .kn-a11y { display: flex; grid-template-columns: none; flex-wrap: wrap; gap: 8px; max-width: none; margin: 0; }
.kn-nav-extra .kn-lang { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.kn-nav-extra .kn-lang label { font-size: 1rem; font-weight: 700; position: static; left: auto; }
.kn-nav-extra .kn-lang select { width: 100%; max-width: none; min-height: 52px; font-size: 1.0625rem; }

.kn-menu-btn { display: none; align-items: center; gap: 8px; min-height: 48px; min-width: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.kn-menu-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.kn-menu-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.kn-menu-overlay { display: none; }

/* wide screens: sidebar always shown, content shifts right */
@media (min-width: 900px) {
  html body { padding-left: var(--kn-side); padding-bottom: 32px; }
  main, .bar, header .kn-hlinks, .kn-top-details, aside[aria-label="Privacy notice"], footer .kn-legal { max-width: 720px; }
  html body .toast { bottom: 24px; left: calc(50% + var(--kn-side) / 2); }
}

/* phones and small tablets: drawer from the left */
@media (max-width: 899.98px) {
  html body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  html body nav.tabs { display: none; width: min(86vw, 340px); box-shadow: none; }
  html.kn-menu-open body nav.tabs { display: flex; box-shadow: 8px 0 32px rgba(0,0,0,.25); animation: kn-drawer-in .24s ease both; }
  .kn-menu-btn { display: inline-flex; }
  .kn-menu-overlay { display: block; position: fixed; inset: 0; background: rgba(23,23,25,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .24s ease; }
  html.kn-menu-open .kn-menu-overlay { opacity: 1; pointer-events: auto; }
  html.kn-menu-open body { overflow: hidden; }
  html body .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
  header .bar { flex-wrap: wrap; gap: 8px; }
  header .bar .kn-brand { flex: 1 1 140px; min-width: 0; }
  header .bar .kn-bs { display: none; }
}
@keyframes kn-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.kn-menu-open body nav.tabs { animation: none; }
  .kn-menu-overlay { transition: none; }
}
@media print { .kn-menu-btn, .kn-menu-overlay { display: none !important; } html body { padding-left: 0; } }
/* shared-view pages hide the menu: hide its button too */
html:has(nav.tabs[style*="display: none"]) .kn-menu-btn { display: none; }

/* ---- Today: "Your progress" hero ----
   Colours are variables so the palette can switch (for example to the reference's green) in one place. */
:root {
  --kn-hero-a: #171719; --kn-hero-b: #2b1519; --kn-hero-ink: #fff; --kn-hero-sub: #e9d9db;
  --kn-hill-back: #4a1a20; --kn-hill-mid: #7d1c24; --kn-hill-front: #a51f25;
  --kn-tree-a: #2d1a1d; --kn-tree-b: #5c1d24; --kn-tree-c: #8a2a31; --kn-trunk: #2a1517;
  --kn-pin-1: #fff; --kn-pin-1-ink: #171719; --kn-pin-2: #171719; --kn-pin-2-ink: #fff; --kn-pin-3: #f6d7d9; --kn-pin-3-ink: #171719;
  --kn-ring-1: #a51f25; --kn-ring-2: #171719; --kn-ring-3: #5b6572; --kn-ring-4: #c78a2c;
  --kn-score-ink: #171719; --kn-pts-bg: #f6e9ea; --kn-pts-ink: #5d0f15;
}
body:has(#kn-dc-hello) > main { padding-left: 16px; padding-right: 16px; }
main > .kn-hero { order: -5; position: relative; margin: 0 -16px 0; padding: 20px 22px 0; border-radius: 0 0 36px 36px; overflow: hidden; color: var(--kn-hero-ink); background: radial-gradient(120% 90% at 100% 0%, var(--kn-hero-b), var(--kn-hero-a) 70%); }
main:has(> #kn-dc-hello) > .kn-home-hero { display: none; }
html body main:has(> #kn-dc-hello) > a.urgent { order: -6; margin: 0 0 12px; }
.kn-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kn-hero-hi { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; padding-top: 10px; }
.kn-hero-hello { font-size: 1.125rem; font-weight: 600; overflow-wrap: anywhere; }
.kn-level { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 16px 2px 10px; font-size: 1rem; letter-spacing: .06em; color: #171719; background: #d9a066; clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%); }
.kn-level b { font-weight: 800; }
.kn-level .kn-level-i { width: 16px; height: 16px; stroke: #171719; fill: #171719; stroke-width: 1; }
.kn-level-silver { background: #d5d9df; }
.kn-level-gold { background: #f0c64a; }
.kn-level-platinum { background: #e8e4f6; }
.kn-hero .kn-avatar { width: 60px; height: 60px; border: 3px solid rgba(255,255,255,.9); box-shadow: none; flex: none; }
.kn-hero h1 { margin: 6px 0 2px; color: var(--kn-hero-ink); font-size: clamp(2.4rem, 11vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; }
.kn-hero-sub { margin: 0; color: var(--kn-hero-sub); font-size: 1.125rem; }
.kn-hills { display: block; width: calc(100% + 44px); max-width: none; height: auto; margin: 6px -22px 0; overflow: visible; }
.kn-hill-back { fill: var(--kn-hill-back); }
.kn-hill-mid { fill: var(--kn-hill-mid); }
.kn-hill-front { fill: var(--kn-hill-front); }
.kn-tree-a { fill: var(--kn-tree-a); }
.kn-tree-b { fill: var(--kn-tree-b); }
.kn-tree-c { fill: var(--kn-tree-c); }
.kn-trunk { fill: var(--kn-trunk); }
.kn-pin line { stroke: #fff; stroke-width: 3; }
.kn-pin-n { font-size: 20px; font-weight: 800; font-family: inherit; }
.kn-pin-l { font-size: 16px; font-weight: 700; font-family: inherit; fill: #fff; }
.kn-pin-1 circle { fill: var(--kn-pin-1); stroke: var(--kn-hill-front); stroke-width: 3; }
.kn-pin-1 .kn-pin-n { fill: var(--kn-pin-1-ink); }
.kn-pin-2 circle { fill: var(--kn-pin-2); stroke: #fff; stroke-width: 3; }
.kn-pin-2 .kn-pin-n { fill: var(--kn-pin-2-ink); }
.kn-pin-3 circle { fill: var(--kn-pin-3); stroke: #fff; stroke-width: 3; }
.kn-pin-3 .kn-pin-n { fill: var(--kn-pin-3-ink); }
html.contrast .kn-hero { background: #000; }
@media (min-width: 900px) {
  main > .kn-hero { margin: 0; border-radius: 36px; padding-top: 16px; }
  .kn-hero h1 { font-size: 3rem; margin-top: 2px; }
  /* shorter scene on wide screens: the hills run past the edges so the hero stays one piece */
  .kn-hills { width: 470px; max-width: 100%; margin: 0 auto; }
}
/* the first card overlaps the bottom of the hero, like the reference */
main:has(> #kn-dc-hello) > #kn-dash { position: relative; z-index: 1; margin-top: -28px; }
main > .kn-hero + * { margin-top: 0; }
.kn-hero .kn-avatar svg { stroke: #fff; }

/* avatar (initials, or the chosen photo or picture from assets/kn-avatar.js) */
.kn-avatar { flex: none; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.25rem; font-weight: 800; letter-spacing: .02em; overflow: hidden; box-sizing: border-box; }
.kn-avatar svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; }
.kn-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* On Today the hero comes first on the page. The stage picker and the layout tools (both sit above
   main in the page) move below the cards so the hero is not pushed down. */
body:has(#kn-dc-hello) { display: flex; flex-direction: column; }
body:has(#kn-dc-hello) > header, body:has(#kn-dc-hello) > details.kn-top-details, body:has(#kn-dc-hello) > main, body:has(#kn-dc-hello) > footer, body:has(#kn-dc-hello) > #kn-stage-bar { width: 100%; box-sizing: border-box; }
body:has(#kn-dc-hello) > main { flex: 0 0 auto; }
body:has(#kn-dc-hello) > #kn-stage-bar { order: 20; }
body:has(#kn-dc-hello) > #kn-layout-tools { order: 21; align-self: center; }
body:has(#kn-dc-hello) > footer { order: 30; }

/* ---- Today: blood pressure card ---- */
.kn-dc-bp { display: flex; flex-direction: column; gap: 12px; }
.kn-dc-bp .row { margin: 0; }
.kn-dc-bp h2 { margin: 0; }
.kn-bp-latest .sub { font-size: 1rem; color: var(--muted); }
.kn-bp-big { font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.kn-bp-big .sub { font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }
.kn-bp-extra { font-size: 1.0625rem; margin-top: 4px; }
.kn-bp-table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.kn-bp-table caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.kn-bp-table th, .kn-bp-table td { padding: 10px 8px; text-align: right; border-top: 1.5px solid var(--line); }
.kn-bp-table thead th, .kn-bp-table thead td { border-top: 0; font-size: 1rem; color: var(--muted); font-weight: 700; }
.kn-bp-table tbody th { text-align: left; font-weight: 800; }
.kn-bp-table tbody td { font-weight: 700; font-size: 1.25rem; }
.kn-bp-table abbr { text-decoration: none; }
.kn-bp-recent ul { list-style: none; margin: 4px 0 0; padding: 0; }
.kn-bp-recent li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1.5px solid var(--line); font-size: 1.0625rem; }
.kn-bp-log { width: 100%; min-height: 60px; font-size: 1.25rem; font-weight: 800; border-radius: 16px; }
.kn-bp-note { margin: 0; font-size: 1rem; }

/* ---- Today: score card ---- */
.kn-dc-score { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; align-items: center; grid-template-areas: "n ring" "title title" "meta meta" "cats cats" "feed feed" "note note"; }
.kn-score-top, .kn-score-grid { display: contents; }
.kn-score-n { grid-area: n; }
.kn-score-top h2 { grid-area: title; }
.kn-score-meta { grid-area: meta; }
.kn-cats { grid-area: cats; }
.kn-ring { grid-area: ring; }
.kn-feed { grid-area: feed; }
.kn-dc-score > .kn-bp-note { grid-area: note; }
@media (min-width: 480px) {
  .kn-dc-score { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "n title title" "meta meta meta" "cats cats ring" "feed feed feed" "note note note"; }
  .kn-score-top h2 { justify-self: start; }
}
.kn-score-n { display: flex; align-items: baseline; gap: 6px; color: var(--kn-score-ink); }
.kn-score-n .kn-num { font-size: clamp(4.25rem, 20vw, 6.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .95; }
.kn-score-u { font-size: 1.5rem; font-weight: 700; }
.kn-score-top h2 { margin: 0; align-self: center; font-size: clamp(1.4rem, 6vw, 1.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.kn-score-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; font-size: 1rem; font-weight: 700; }
.kn-meta-i { display: inline-flex; align-items: center; gap: 6px; }
.kn-meta-i svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kn-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px 18px; }
.kn-cats li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kn-cat-t { word-break: normal; overflow-wrap: break-word; display: flex; flex-direction: column; line-height: 1.1; min-width: 0; font-size: 1rem; font-weight: 700; color: var(--muted); }
.kn-cat-t b { font-size: 1.5rem; color: var(--kn-score-ink); font-weight: 800; }
.kn-cat-t .kn-cat-d { font-size: 1rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.kn-chip { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; }
.kn-chip svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kn-chip-1 { background: var(--kn-ring-1); }
.kn-chip-2 { background: var(--kn-ring-2); }
.kn-chip-3 { background: var(--kn-ring-3); }
.kn-chip-4 { background: #8a5a14; }
.kn-chip-5 { background: #4a4a4a; }
.kn-chip-s { width: 36px; height: 36px; }
.kn-chip-s svg { width: 20px; height: 20px; }
.kn-ring { width: 104px; height: auto; justify-self: end; }
@media (min-width: 480px) { .kn-ring { width: 150px; } }
.kn-ring circle { fill: none; stroke-width: 10; }
.kn-ring-track { stroke: #e9e4e4; }
.kn-ring-arc { stroke-linecap: round; }
.kn-ring-1 { stroke: var(--kn-ring-1); }
.kn-ring-2 { stroke: var(--kn-ring-2); }
.kn-ring-3 { stroke: var(--kn-ring-3); }
.kn-ring-4 { stroke: #8a5a14; }
.kn-feed { margin: 0 -20px; border-top: 1.5px solid var(--line); }
.kn-feed-h { margin: 0; padding: 14px 20px 0; font-size: 1.125rem; }
.kn-feed-day { padding: 12px 20px 4px; border-top: 0; }
.kn-feed-day + .kn-feed-day { border-top: 1.5px solid var(--line); }
.kn-feed-date { font-size: 1rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.kn-feed-day ul { list-style: none; margin: 4px 0 6px; padding: 0; }
.kn-feed-day li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; font-size: 1.0625rem; }
.kn-feed-t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.kn-pts { flex: none; padding: 6px 12px; border-radius: 10px; background: var(--kn-pts-bg); color: var(--kn-pts-ink); font-weight: 800; font-size: 1rem; }
.kn-feed .empty { padding: 8px 20px 12px; margin: 0; }
@media (min-width: 900px) { .kn-ring { width: 170px; } }

/* "Read this aloud" on the new top cards only: a small icon button in the top-right corner
   (same button, same aria-label, same handler; it just no longer takes a full row). */
#kn-dc-bp, #kn-dc-score { position: relative; }
#kn-dc-bp > .kn-read, #kn-dc-score > .kn-read {
  position: absolute; top: 12px; right: 12px; margin: 0; z-index: 2;
  width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0; border-radius: 50%;
  font-size: 0; line-height: 0; display: inline-grid; place-items: center;
}
#kn-dc-bp > .kn-read::before, #kn-dc-score > .kn-read::before { content: '\1F50A'; font-size: 1.35rem; line-height: 1; }
#kn-dc-bp > .kn-read[aria-pressed='true']::before, #kn-dc-score > .kn-read[aria-pressed='true']::before { content: '\23F9'; }
#kn-dc-bp > .kn-read ~ .row h2, #kn-dc-bp > .kn-read ~ .row { padding-right: 56px; }
#kn-dc-score > .kn-read ~ .kn-score-top h2, #kn-dc-score > .kn-read ~ .kn-score-n { max-width: calc(100% - 56px); }
#kn-dc-score:has(> .kn-read) .kn-ring { margin-top: 40px; }
@media (min-width: 480px) { #kn-dc-score:has(> .kn-read) .kn-ring { margin-top: 0; } }
@media (max-width: 420px) {
  .kn-cats { gap: 14px 12px; grid-template-columns: repeat(2, minmax(0, max-content)); justify-content: start; }
  .kn-cats li { gap: 8px; }
  .kn-cats .kn-chip { width: 40px; height: 40px; }
}
/* Read-aloud button docked in the header (kn-shell.js dockReadButton) so it never covers content. */
#kn-read-fab.kn-read-dock { position: static; display: inline-grid; place-items: center; width: 48px; height: 48px; margin-left: 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink); font-size: 22px; line-height: 1; box-shadow: none; cursor: pointer; flex: none; }
#kn-read-fab.kn-read-dock:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Large text modes: keep the blood pressure summary table inside the card (it was 43px too wide at 390) */
.kn-bp-table { table-layout: fixed; }
.kn-bp-table th, .kn-bp-table td { overflow-wrap: anywhere; padding-left: 4px; padding-right: 4px; }
.kn-bp-table thead th { font-size: 1rem; }
html.xlarge .kn-bp-table thead th, html.large .kn-bp-table thead th { font-size: .875rem; letter-spacing: 0; }
html.xlarge .kn-bp-table tbody td { font-size: 1.125rem; }
/* ---- profile photo: the tappable avatar, the menu item and the panel (assets/kn-avatar.js) ---- */
button.kn-avatar { border: 0; padding: 0; font-family: inherit; cursor: pointer; min-height: 0; }
.kn-hero button.kn-avatar { border: 3px solid rgba(255,255,255,.9); }
button.kn-avatar:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #171719; }
.kn-avatar svg.kn-av-art, .kn-hero .kn-avatar svg.kn-av-art { width: 100%; height: 100%; stroke: none; stroke-width: 0; fill: none; display: block; }
.kn-nav-extra .kn-nav-mail, .kn-nav-extra .kn-nav-photo, .kn-nav-extra .kn-nav-all { min-height: 52px; padding: 0 16px; border: 1.5px solid var(--kn-nav-line); border-radius: 14px; background: #fff; color: var(--kn-nav-ink); font: inherit; font-size: 1.0625rem; font-weight: 700; text-align: left; cursor: pointer; }
.kn-nav-extra .kn-nav-all:focus-visible, .kn-nav-extra .kn-nav-mail:focus-visible, .kn-nav-extra .kn-nav-photo:focus-visible, .kn-nav-extra .kn-nav-cust:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

dialog.kn-av-dlg { box-sizing: border-box; width: min(26rem, calc(100% - 2rem)); max-height: min(92dvh, 46rem); overflow-y: auto; overscroll-behavior: contain; padding: 20px; border: 0; border-radius: 24px; background: #fff; color: var(--kn-nav-ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
dialog.kn-av-dlg::backdrop { background: rgba(23,23,25,.55); }
dialog.kn-av-dlg[open] { display: flex; flex-direction: column; gap: 14px; }
.kn-av-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kn-av-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.kn-av-x { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 1.5px solid var(--kn-nav-line); border-radius: 50%; background: #fff; color: var(--kn-nav-ink); cursor: pointer; padding: 0; }
.kn-av-x svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.kn-av-preview { align-self: center; width: 96px; height: 96px; font-size: 2rem; }
.kn-av-preview svg:not(.kn-av-art) { width: 48px; height: 48px; }
.kn-av-btn { min-height: 52px; padding: 0 16px; border: 1.5px solid #6b6b70; border-radius: 14px; background: #fff; color: var(--kn-nav-ink); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.kn-av-btn[aria-pressed="true"] { border-color: #171719; box-shadow: inset 0 0 0 2px #171719; }
.kn-av-primary, .kn-av-done { background: var(--blue); border-color: var(--blue); color: #fff; }
.kn-av-pick, .kn-av-x { font: inherit; font-size: 1rem; }
.kn-av-sub { margin: 4px 0 0; font-size: 1.0625rem; font-weight: 800; }
.kn-av-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kn-av-pick { aspect-ratio: 1; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: none; cursor: pointer; box-shadow: 0 0 0 1.5px #c9c9cc; }
.kn-av-pick svg { width: 100%; height: 100%; display: block; }
.kn-av-pick[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #171719; }
.kn-av-pick:focus-visible, .kn-av-btn:focus-visible, .kn-av-x:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.kn-av-body { display: contents; }
.kn-av-head, .kn-av-preview, .kn-av-primary { order: 0; }
.kn-av-status { order: 1; }
.kn-av-sub, .kn-av-grid, .kn-av-btn:not(.kn-av-primary), .kn-av-note { order: 2; }
.kn-av-status:empty { display: none; }
/* belt and braces: never show a face photo behind the PIN lock, or on paper */
body:has(#gate .gate[role="dialog"]) .kn-avatar img { visibility: hidden; }
@media print { .kn-avatar img { display: none; } }
.kn-av-status { margin: 0; font-size: 1rem; font-weight: 700; }
.kn-av-note { margin: 0; font-size: 1rem; line-height: 1.45; color: #3b3b40; }
html.contrast .kn-av-note { color: #000; }
@media (max-width: 599px) {
  dialog.kn-av-dlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: no-preference) {
  .kn-av-pick, .kn-av-btn { transition: transform .1s ease; }
  .kn-av-pick:active, .kn-av-btn:active { transform: scale(.97); }
}


/* Phone bottom tab bar (REQ-4326): the five main sections, always one tap away, like the
   reference apps. Phones only; the left sidebar stays on wide screens. Rollback: delete this
   block and bottomBar() in kn-shell.js. */
.kn-bottom { display: none; }
@media (max-width: 899.98px) {
  .kn-bottom {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--card, #fff); border-top: 1px solid var(--line, #e3e3e6);
    box-shadow: 0 -4px 18px rgba(23,23,25,.08);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .kn-bottom button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 58px; padding: 4px 2px; border: 0; border-radius: 12px; background: transparent;
    color: var(--muted, #5b5b63); font: inherit; font-size: .8rem; font-weight: 700; line-height: 1.1;
    cursor: pointer;
  }
  .kn-bottom button svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .kn-bottom button[aria-current="page"] { color: var(--crimson, #b3122e); background: rgba(179,18,46,.08); }
  .kn-bottom button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
  html body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  html body .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  html.kn-menu-open .kn-bottom { display: none; }
}
@media print { .kn-bottom { display: none !important; } }


/* Brand line at the top of the Your progress box (Michael 11-25): KN heart + kidneynav.com. */
.kn-hero .kn-hero-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -6px 0 6px; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .01em; text-decoration: none; position: relative; z-index: 1; }
.kn-hero .kn-hero-brand img { width: 28px; height: 28px; border-radius: 8px; background: #fff; padding: 2px; }
.kn-hero .kn-hero-brand:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 8px; }
html.contrast .kn-hero .kn-hero-brand { color: inherit; }
