/* NephroMed · KDIGO Guidelines module. All rules are scoped under .nmk so they cannot leak into the rest of nephromed.org.
   Colour semantics follow the NephroMed design system: blue = diagnose, green = treat, red = beware, yellow = remember, orange = classify. */
.nmk {
  --navy: #0D2440; --navy-2: #163A63; --teal: #0E9F9A; --teal-soft: #E3F5F4;
  --blue: #2563EB; --blue-soft: #E7EFFE; --green: #15803D; --green-soft: #E4F5EA;
  --red: #C2410C; --red-deep: #B91C1C; --red-soft: #FDECEC; --yellow: #A16207; --yellow-soft: #FEF6DC;
  --orange: #C2410C; --orange-soft: #FFEDE0; --violet: #6D28D9; --violet-soft: #F0EAFE;
  --ink: #0F1B2D; --ink-2: #44536A; --line: #DDE4EE; --bg: #F6F8FB; --card: #FFFFFF;
  --r: 14px; --shadow: 0 1px 2px rgba(13,36,64,.06), 0 6px 20px rgba(13,36,64,.06);
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.nmk *, .nmk *::before, .nmk *::after { box-sizing: border-box; }
.nmk a { color: var(--blue); text-underline-offset: 2px; }
.nmk h1, .nmk h2, .nmk h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .5rem; }
.nmk h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em; }
.nmk h2 { font-size: 1.35rem; }
.nmk h3 { font-size: 1.05rem; }
.nmk :focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.nmk-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.nmk-narrow { max-width: 820px; }
.nmk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nmk-skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.nmk-skip:focus { left: 8px; }

/* header */
.nmk-top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.nmk-top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.nmk-brand { color: #fff !important; text-decoration: none; font-weight: 800; letter-spacing: .02em; display: flex; gap: 8px; align-items: center; }
.nmk-top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nmk-top nav a { color: #D6E3F3; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .92rem; }
.nmk-top nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nmk-draft { background: var(--yellow-soft); color: #5B3A00; border-bottom: 2px solid #E9C46A; padding: 10px 20px; text-align: center; }

/* hero */
.nmk-hero { background: radial-gradient(1200px 400px at 90% -10%, rgba(14,159,154,.35), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 56px 0 72px; }
.nmk-hero h1 { color: #fff; }
.nmk-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: #8FE3DE; margin: 0 0 8px; }
.nmk-eyebrow-dark { color: var(--teal); margin-top: 24px; }
.nmk-sub { font-size: 1.2rem; font-weight: 600; color: #BFF0EC; margin: 0 0 12px; }
.nmk-lead { max-width: 760px; color: #D6E3F3; margin: 0 0 24px; }
.nmk-lead-dark { color: var(--ink-2); font-size: 1.08rem; }
.nmk-search input { width: 100%; max-width: 760px; font-size: 1.05rem; padding: 16px 18px 16px 48px; border-radius: 14px; border: 0; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2344536A' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 16px center no-repeat; color: var(--ink); }
.nmk-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* buttons */
.nmk-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy) !important;
  font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s; }
.nmk-btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.nmk-btn-primary { background: var(--teal); border-color: var(--teal); color: #fff !important; }
.nmk-btn-light { background: #fff; border-color: #fff; }
.nmk-btn-ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff !important; }
.nmk-btn-ghost:hover { background: rgba(255,255,255,.1); }

/* stats */
.nmk-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: -40px; position: relative; }
.nmk-stat { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--teal); }
.nmk-stat b { display: block; font-size: 1.8rem; color: var(--navy); line-height: 1.1; }
.nmk-stat span { font-size: .82rem; color: var(--ink-2); }
.nmk-stat:nth-child(2) { border-color: var(--green); } .nmk-stat:nth-child(3) { border-color: var(--violet); }
.nmk-stat:nth-child(4) { border-color: var(--orange); } .nmk-stat:nth-child(5) { border-color: var(--blue); } .nmk-stat:nth-child(6) { border-color: #E9B949; }
.nmk-stat-note { grid-column: 1 / -1; margin: 4px 0 0; font-size: .85rem; color: var(--ink-2); }

/* library */
.nmk-sec { margin: 40px 0; }
.nmk-lib-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nmk-lib-head p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.nmk-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 12px 0 18px; }
.nmk-filters label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; gap: 4px; }
.nmk-filters select { font: inherit; font-size: .92rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; min-width: 150px; }
.nmk-filters .nmk-check { flex-direction: row; align-items: center; min-height: 40px; text-transform: none; font-size: .9rem; letter-spacing: 0; color: var(--ink); }
.nmk-check input { width: 20px; height: 20px; accent-color: var(--teal); }
.nmk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.nmk-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.nmk-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(13,36,64,.06), 0 14px 30px rgba(13,36,64,.10); }
.nmk-card[hidden] { display: none; }
.nmk-card h3 { margin: 0; font-size: 1.12rem; } .nmk-card h3 a { color: var(--navy); text-decoration: none; } .nmk-card h3 a:hover { text-decoration: underline; }
.nmk-card-head { display: flex; justify-content: space-between; align-items: center; }
.nmk-icon { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--teal-soft); color: var(--teal); flex: none; }
.nmk-icon-lg { width: 64px; height: 64px; padding: 12px; border-radius: 18px; }
.nmk-card-cat { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--teal); }
.nmk-card-meta { margin: 0; font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.nmk-card-desc { margin: 0; color: var(--ink-2); font-size: .94rem; }
.nmk-card-upd { margin: 0; font-size: .85rem; background: var(--orange-soft); color: #7A2E0A; padding: 8px 10px; border-radius: 10px; }
.nmk-flags { list-style: none; padding: 0; margin: 2px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nmk-flags li { font-size: .75rem; padding: 3px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.nmk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.nmk-verified { margin: 0; font-size: .75rem; color: #6B7A90; }
.nmk-star { border: 1px solid var(--line); background: #fff; width: 40px; height: 40px; border-radius: 10px; font-size: 1.2rem; color: #94A3B8; cursor: pointer; }
.nmk-star[aria-pressed="true"] { color: #D69E0B; background: var(--yellow-soft); border-color: #F2D48A; }
.nmk-star-lg { margin-left: auto; width: 48px; height: 48px; }
.nmk-empty, .nmk-note { background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 16px; color: var(--ink-2); }
.nmk-note { border-style: solid; background: var(--blue-soft); border-color: #C8D8FB; color: #1E3A8A; }

/* badges */
.nmk-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.nmk-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; letter-spacing: .02em; border: 1px solid transparent; }
.st-published { background: var(--green-soft); color: var(--green); border-color: #BFE6CB; }
.st-focused { background: var(--blue-soft); color: var(--blue); border-color: #C8D8FB; }
.st-review { background: var(--orange-soft); color: var(--orange); border-color: #F8CBA8; }
.st-progress { background: var(--yellow-soft); color: var(--yellow); border-color: #F2D48A; }
.st-dev { background: var(--violet-soft); color: var(--violet); border-color: #D8C9FB; }
.st-partial { background: var(--yellow-soft); color: var(--yellow); border-color: #F2D48A; }
.st-archived { background: var(--red-soft); color: var(--red-deep); border-color: #F5C2C2; }
.st-pending { background: #EEF1F5; color: #475569; border-color: #D5DCE5; }

/* updates */
.nmk-updates { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.nmk-updates li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--r); padding: 16px; }
.nmk-updates li h3 { margin: 8px 0 4px; } .nmk-updates li p { margin: 0 0 8px; color: var(--ink-2); font-size: .93rem; }
.nmk-muted { color: var(--ink-2); }
.nmk-edu { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.nmk-edu-card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink) !important; }
.nmk-edu-card b { color: var(--navy); } .nmk-edu-card span { color: var(--ink-2); font-size: .92rem; }
.nmk-edu-card em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--yellow); }

/* guideline page */
.nmk-crumbs { font-size: .88rem; color: var(--ink-2); margin: 20px 0 12px; }
.nmk-ghead { display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.nmk-ghead h1 { margin: 4px 0 8px; }
.nmk-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; position: sticky; top: 56px; z-index: 3; background: var(--bg); padding: 8px 0; }
.nmk-toc a { font-size: .86rem; text-decoration: none; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 600; }
.nmk-dl { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.nmk-dl > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.nmk-dl > div:first-child { border-top: 0; }
.nmk-dl dt { font-weight: 700; color: var(--navy); font-size: .9rem; }
.nmk-dl dd { margin: 0; } .nmk-dl dd ul { margin: 0; padding-left: 18px; }
.nmk-pending { display: inline-block; font-size: .82rem; color: #475569; background: #EEF1F5; border-radius: 8px; padding: 2px 8px; }
.nmk-notice { border-radius: var(--r); padding: 14px 16px; margin: 12px 0; border: 1px solid; }
.nmk-notice p { margin: 0 0 6px; }
.nmk-beware { background: var(--red-soft); border-color: #F5C2C2; color: #7F1D1D; }
.nmk-remember { background: var(--yellow-soft); border-color: #F2D48A; color: #5B3A00; }
.nmk-classify { background: var(--orange-soft); border-color: #F8CBA8; color: #7A2E0A; }
.nmk-diagnose { background: var(--blue-soft); border-color: #C8D8FB; color: #1E3A8A; }
.nmk-small { font-size: .82rem; } .nmk-warn { color: var(--red-deep); font-weight: 600; margin: 0 0 6px; }
.nmk-resgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.nmk-resgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.nmk-resgroup ul { list-style: none; margin: 0; padding: 0; }
.nmk-resgroup li { padding: 7px 0; border-top: 1px solid var(--line); font-size: .93rem; } .nmk-resgroup li:first-child { border-top: 0; }
.nmk-ext { font-weight: 600; text-decoration: none; } .nmk-ext:hover { text-decoration: underline; }
.nmk-sub2 { color: var(--teal); font-weight: 600; margin-top: -4px; }
.nmk-soon { background: linear-gradient(135deg, var(--teal-soft), #fff); border: 1px dashed #9AD9D5; border-radius: var(--r); padding: 18px; }
.nmk-soon b { color: var(--navy); font-size: 1.05rem; } .nmk-soon p { margin: 4px 0 0; color: var(--ink-2); }
.nmk-table { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.nmk-table table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .92rem; }
.nmk-table th, .nmk-table td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.nmk-table thead th { border-top: 0; background: var(--bg); color: var(--navy); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.nmk-relg, .nmk-rel { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.nmk-relg a { display: inline-block; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--navy); }
.nmk-take { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; }
.nmk-take summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy); }
.nmk-take summary span { display: block; font-size: .72rem; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; }
.nmk-take .nmk-dl { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.nmk-take .nmk-beware { border: 0; }
.nmk-take > .nmk-btn { margin: 12px 16px 16px; }

/* footer */
.nmk-foot { background: var(--navy); color: #C9D6E6; padding: 36px 0; margin-top: 56px; font-size: .9rem; }
.nmk-foot h2 { color: #fff; font-size: 1.05rem; }
.nmk-foot a { color: #8FE3DE; }
.nmk-sup { color: #fff; font-weight: 600; }

/* responsive */
@media (max-width: 1000px) { .nmk-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .nmk { font-size: 17px; }
  .nmk-hero { padding: 36px 0 60px; }
  .nmk-stats { grid-template-columns: repeat(2, 1fr); }
  .nmk-grid, .nmk-updates, .nmk-resgrid { grid-template-columns: 1fr; }
  .nmk-filters select { min-width: 0; width: 100%; } .nmk-filters label { flex: 1 1 45%; }
  .nmk-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .nmk-top { position: static; }
  .nmk-top-in { flex-wrap: nowrap; gap: 8px; }
  .nmk-top nav, .nmk-toc { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nmk-top nav::-webkit-scrollbar, .nmk-toc::-webkit-scrollbar { display: none; }
  .nmk-top nav a, .nmk-toc a { white-space: nowrap; flex: none; }
  .nmk-top nav a { padding: 6px 8px; font-size: .85rem; }
  .nmk-ghead { position: relative; flex-direction: column; align-items: flex-start; padding-right: 72px; }
  .nmk-star-lg { position: absolute; top: 16px; right: 16px; }
  .nmk-toc { position: sticky; top: 0; }
}
@media (prefers-reduced-motion: reduce) { .nmk * { transition: none !important; } }
@media print { .nmk-top, .nmk-toc, .nmk-star, .nmk-filters, .nmk-hero-actions { display: none; } .nmk { background: #fff; } }


/* ===== Aligned with the main nephromed.org look (light, Space Grotesk + Inter, red/blue accents) ===== */
.nmk {
  --navy: #0F1B33; --navy-2: #1452A0; --teal: #1E7FD8; --teal-soft: #E3EFFC; --blue: #1765B8; --blue-soft: #E3EFFC;
  --ink: #0F1B33; --ink-2: #3A4862; --line: #E4E9F2; --bg: #F6F8FC; --brandred: #E5352B;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.nmk a { color: #1765B8; } .nmk a:hover { color: #0E4A8A; }
.nmk h1, .nmk h2, .nmk h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.02em; }
.nmk-wrap { max-width: 1240px; padding: 0 24px; }
.nmk-sec.nmk-wrap { margin: 40px auto; }
.nmk :focus-visible { outline-color: #1E7FD8; }
/* header: white, blurred, like the main site */
.nmk-top { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #0F1B33; border-bottom: 1px solid #E4E9F2; }
.nmk-top-in { min-height: 70px; padding-top: 12px; padding-bottom: 12px; }
.nmk-brand { color: #0F1B33 !important; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.01em; gap: 12px; }
.nmk-brand img { width: 46px; height: 46px; display: block; }
.nmk-red { color: #E5352B; }
.nmk-top nav { gap: 22px; }
.nmk-top nav a { color: #3A4862; font-size: 14px; font-weight: 600; padding: 6px 0; border-radius: 0; border-bottom: 2px solid transparent; }
.nmk-top nav a:hover { background: none; color: #0F1B33; border-bottom-color: #E5352B; }
/* hero: light, soft colour wash instead of dark navy */
.nmk-hero { background: radial-gradient(900px 340px at 92% -10%, rgba(245,138,27,.16), transparent 62%), radial-gradient(800px 360px at 0% 110%, rgba(30,127,216,.14), transparent 60%), #fff; color: #0F1B33; border-bottom: 1px solid #E4E9F2; padding: 60px 0 84px; }
.nmk-hero h1 { color: #0F1B33; font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.03em; }
.nmk-eyebrow { color: #B4410B; letter-spacing: .2em; }
.nmk-sub { color: #1765B8; font-family: "Space Grotesk", sans-serif; }
.nmk-lead { color: #3A4862; }
.nmk-search input { box-shadow: 0 6px 24px rgba(15,27,51,.10); border: 1px solid #E4E9F2; font-family: inherit; }
.nmk-search input::placeholder { color: #6B7893; }
.nmk-btn { border-radius: 999px; padding: 10px 20px; font-family: inherit; }
.nmk-btn-light, .nmk-btn-primary { background: #E5352B; border-color: #E5352B; color: #fff !important; }
.nmk-btn-light:hover, .nmk-btn-primary:hover { background: #C92A21; }
.nmk-btn-ghost { background: #fff; border-color: #CBD5E6; color: #0F1B33 !important; }
.nmk-btn-ghost:hover { background: #F0F5FC; }
.nmk-stat { border-top-width: 4px; }
.nmk-stat b { font-family: "Space Grotesk", sans-serif; }
.nmk-stats { margin-top: -44px; }
.nmk-eyebrow-dark { color: #B4410B; }
/* footer: white, like the main site */
.nmk-foot { background: #fff; color: #5A6782; border-top: 1px solid #E4E9F2; font-size: 13px; }
.nmk-foot h2 { color: #0F1B33; font-size: 1rem; }
.nmk-foot a { color: #1E7FD8; }
.nmk-sup { color: #0F1B33; font-weight: 600; }
.nmk-copy { margin: 0 0 18px; }
.nmk-draft { margin: 0; }
/* phone */
@media (max-width: 640px) {
  .nmk-wrap { padding: 0 18px; }
  .nmk-top { position: sticky; }
  .nmk-top-in { flex-wrap: wrap; gap: 6px 12px; min-height: 0; padding-top: 10px; padding-bottom: 8px; }
  .nmk-brand { font-size: 20px; } .nmk-brand img { width: 38px; height: 38px; }
  .nmk-top nav { flex-wrap: wrap; overflow: visible; gap: 4px 16px; width: 100%; }
  .nmk-top nav a { font-size: 13.5px; padding: 4px 0; }
  .nmk-search input { font-size: .95rem; padding-left: 44px; }
  .nmk-search input::placeholder { font-size: .9rem; }
  .nmk-hero { padding: 40px 0 70px; }
}
