/* Knowledge, learning, and connection status. Loaded after the legacy module CSS. */
body.mac-theme .focus-shell #main > .rk-page {
  --rk-ink: #1b302e;
  --rk-muted: #60736f;
  --rk-line: #dbe6e0;
  --rk-teal: #176f62;
  --rk-teal-deep: #0d594f;
  --rk-surface: #fff;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 28px clamp(22px, 2.6vw, 38px) 54px;
  background: #f6f8f7;
  color: var(--rk-ink);
}
body.mac-theme .focus-shell #main .rk-page *,
body.mac-theme .focus-shell #main .rk-page *::before,
body.mac-theme .focus-shell #main .rk-page *::after { box-sizing: border-box; }
body.mac-theme .focus-shell #main .rk-page :is(button,a,input,textarea,summary):focus-visible { outline: 3px solid #6bb1a5; outline-offset: 3px; }
body.mac-theme .focus-shell #main .rk-page :is(h1,h2,h3,p) { margin-top: 0; }
body.mac-theme .focus-shell #main .rk-page button { font: inherit; }
body.mac-theme .focus-shell #main .rk-page .tag { background: #edf4f0; color: #52786d; border: 1px solid #d7e7de; }
body.mac-theme .focus-shell #main .rk-page .tag.green { background: #e6f3ea; color: #326e4b; border-color: #cce6d4; }
body.mac-theme .focus-shell #main .rk-page .tag.amber { background: #fff4e2; color: #876325; border-color: #eedfbf; }
body.mac-theme .focus-shell #main .rk-page .secondary { background: #fff; color: #33524b; border: 1px solid #d8e3dd; box-shadow: none; }
body.mac-theme .focus-shell #main .rk-page .secondary:hover { background: #f3f8f5; border-color: #a8cabc; }
body.mac-theme .focus-shell #main .rk-page .text-button,
body.mac-theme .focus-shell #main .rk-page a { color: var(--rk-teal); }
body.mac-theme .focus-shell #main .rk-page .primary { background: var(--rk-teal); border-color: var(--rk-teal); color: #fff; }
body.mac-theme .focus-shell #main .rk-page .primary:hover { background: var(--rk-teal-deep); border-color: var(--rk-teal-deep); }

body.mac-theme .focus-shell #main .rk-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px 28px; margin-bottom: 27px; padding-bottom: 24px; border-bottom: 1px solid var(--rk-line); }
body.mac-theme .focus-shell #main .rk-page-head > div:first-child { max-width: 760px; min-width: 0; }
body.mac-theme .focus-shell #main .rk-kicker { display: block; margin-bottom: 8px; color: var(--rk-teal); font-size: 11px; font-weight: 750; letter-spacing: .13em; }
body.mac-theme .focus-shell #main .rk-page-head h1 { color: #1b302e; font-size: clamp(28px, 2.8vw, 39px); font-weight: 700; letter-spacing: -.055em; line-height: 1.26; margin-bottom: 8px; word-break: keep-all; }
body.mac-theme .focus-shell #main .rk-page-head p { color: var(--rk-muted); font-size: 14px; line-height: 1.7; margin-bottom: 0; word-break: keep-all; }
body.mac-theme .focus-shell #main .rk-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
body.mac-theme .focus-shell #main .rk-head-actions button { min-height: 36px; padding: 7px 11px; font-size: 12px; white-space: nowrap; }
body.mac-theme .focus-shell #main .rk-panel-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
body.mac-theme .focus-shell #main .rk-panel-head .rk-kicker { margin-bottom: 4px; }
body.mac-theme .focus-shell #main .rk-panel-head h2 { color: var(--rk-ink); font-size: 19px; font-weight: 700; letter-spacing: -.035em; line-height: 1.4; margin-bottom: 0; }
body.mac-theme .focus-shell #main .rk-panel-head > span { color: var(--rk-muted); font-size: 12px; white-space: nowrap; }
body.mac-theme .focus-shell #main .rk-empty { color: var(--rk-muted); font-size: 13px; line-height: 1.75; padding: 24px 15px; text-align: center; }
body.mac-theme .focus-shell #main .rk-empty h3 { color: #3e5650; font-size: 15px; margin-bottom: 6px; }
body.mac-theme .focus-shell #main .rk-empty p { margin-bottom: 0; }

/* The index answers which source to read; the document remains the main surface. */
body.mac-theme .focus-shell #main .rk-knowledge-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding: 14px 17px; margin-bottom: 18px; border: 1px solid #d8e8dd; border-radius: 12px; background: #edf5ef; }
body.mac-theme .focus-shell #main .rk-knowledge-note > span { display: inline-flex; align-items: baseline; gap: 5px; color: #527269; font-size: 12px; white-space: nowrap; }
body.mac-theme .focus-shell #main .rk-knowledge-note strong { color: #1c6556; font-size: 19px; font-variant-numeric: tabular-nums; }
body.mac-theme .focus-shell #main .rk-knowledge-note p { flex: 1; min-width: 210px; color: #58766d; font-size: 12px; line-height: 1.6; margin: 0; }
body.mac-theme .focus-shell #main .rk-knowledge-columns { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); align-items: start; gap: 16px; }
body.mac-theme .focus-shell #main .rk-knowledge-index,
body.mac-theme .focus-shell #main .rk-knowledge-reader { min-width: 0; border: 1px solid var(--rk-line); border-radius: 16px; background: var(--rk-surface); box-shadow: 0 5px 20px rgba(22,51,43,.035); }
body.mac-theme .focus-shell #main .rk-knowledge-index { padding: 18px 12px 12px; }
body.mac-theme .focus-shell #main .rk-knowledge-index .rk-panel-head { padding: 0 6px; }
body.mac-theme .focus-shell #main .rk-search { display: block; margin: 0 6px 11px; }
body.mac-theme .focus-shell #main .rk-search input { display: block; width: 100%; height: 38px; padding: 7px 12px; border: 1px solid #d7e4db; border-radius: 9px; background: #f8faf8; color: var(--rk-ink); font-size: 13px; }
body.mac-theme .focus-shell #main .rk-search input::placeholder { color: #82948c; }
body.mac-theme .focus-shell #main .rk-knowledge-list { display: flex; flex-direction: column; gap: 5px; max-height: min(780px, calc(100dvh - 255px)); overflow-y: auto; padding: 2px 3px 3px; scrollbar-color: #b9ccc0 transparent; }
body.mac-theme .focus-shell #main .rk-knowledge-row.knowledge-card { display: flex; width: 100%; flex-direction: column; gap: 5px; padding: 12px 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; box-shadow: none; text-align: left; color: var(--rk-ink); }
body.mac-theme .focus-shell #main .rk-knowledge-row.knowledge-card:hover { border-color: #d8e9de; background: #f6faf7; }
body.mac-theme .focus-shell #main .rk-knowledge-row.knowledge-card.active { border-color: #add4c1; background: #eaf5ee; box-shadow: inset 3px 0 0 #398e75; }
body.mac-theme .focus-shell #main .rk-knowledge-row .rk-row-meta,
body.mac-theme .focus-shell #main .rk-knowledge-row .rk-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; }
body.mac-theme .focus-shell #main .rk-knowledge-row .rk-row-meta > span:last-child { color: #768b82; font-size: 11px; text-align: right; overflow-wrap: anywhere; }
body.mac-theme .focus-shell #main .rk-knowledge-row strong { display: block; color: var(--rk-ink); font-size: 14px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
body.mac-theme .focus-shell #main .rk-knowledge-row small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--rk-muted); font-size: 11px; line-height: 1.55; }
body.mac-theme .focus-shell #main .rk-knowledge-row .rk-row-foot { margin-top: 2px; }
body.mac-theme .focus-shell #main .rk-knowledge-row .rk-row-foot .icon { width: 14px; color: #6e887d; }
body.mac-theme .focus-shell #main .rk-knowledge-reader.knowledge-detail { overflow: hidden; border-color: var(--rk-line); border-radius: 16px; background: #fff; box-shadow: 0 5px 20px rgba(22,51,43,.035); }
body.mac-theme .focus-shell #main .rk-reader-empty { min-height: 480px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 5vw, 70px); background: linear-gradient(150deg,#fff 60%,#f1f7f2); }
body.mac-theme .focus-shell #main .rk-reader-empty h2 { color: #28483e; font-size: clamp(21px, 2vw, 27px); margin-bottom: 9px; }
body.mac-theme .focus-shell #main .rk-reader-empty p { max-width: 360px; color: var(--rk-muted); font-size: 14px; line-height: 1.75; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .panel-heading { padding: 20px 24px; border-bottom: 1px solid var(--rk-line); background: #fff; color: var(--rk-ink); }
body.mac-theme .focus-shell #main .rk-knowledge-reader .panel-heading h2 { color: var(--rk-ink); font-size: 21px; line-height: 1.4; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-context { margin: 19px 24px 0; border: 1px solid #d7e6da; border-left: 3px solid #70ab88; border-radius: 7px; background: #f3f8f3; color: #4a6b5e; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-context :is(strong,small) { color: #547267; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-reading { max-height: 620px; overflow: auto; padding: 26px 29px; background: #fff; color: #293d38; font-size: 15px; line-height: 1.8; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-edit { border-top: 1px solid var(--rk-line); color: var(--rk-ink); }
body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-edit summary { color: var(--rk-teal); font-weight: 650; }
body.mac-theme .focus-shell #main .rk-knowledge-reader :is(.knowledge-editor,.small-editor) { border: 1px solid #ceded4; background: #fff; color: var(--rk-ink); }
body.mac-theme .focus-shell #main .rk-knowledge-reader .proposal-list { border-top: 1px solid var(--rk-line); background: #fafcfb; }
body.mac-theme .focus-shell #main .rk-knowledge-reader .proposal-list > div { background: #fff; border-color: var(--rk-line); }

/* Candidates take priority. Revisions form the supporting evidence column. */
body.mac-theme .focus-shell #main .rk-learning-orientation { display: grid; grid-template-columns: minmax(190px, 250px) minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-bottom: 24px; padding: 20px 24px; border: 1px solid #d1e4d8; border-radius: 16px; background: #eaf4ed; }
body.mac-theme .focus-shell #main .rk-learning-primary-count { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: center; padding-right: 20px; border-right: 1px solid #c9dfd0; }
body.mac-theme .focus-shell #main .rk-learning-primary-count span { font-size: 13px; color: #486a59; }
body.mac-theme .focus-shell #main .rk-learning-primary-count strong { grid-row: span 2; font-size: 35px; line-height: 1; color: #1b6c55; font-variant-numeric: tabular-nums; }
body.mac-theme .focus-shell #main .rk-learning-primary-count small { font-size: 11px; color: #719383; }
body.mac-theme .focus-shell #main .rk-learning-orientation > p { margin: 0; color: #4f705f; font-size: 13px; line-height: 1.7; }
body.mac-theme .focus-shell #main .rk-learning-secondary-count { display: flex; align-items: baseline; gap: 9px; font-size: 11px; color: #688675; white-space: nowrap; }
body.mac-theme .focus-shell #main .rk-learning-secondary-count strong { font-size: 20px; color: #315b4a; font-variant-numeric: tabular-nums; }
body.mac-theme .focus-shell #main .rk-learning-columns { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(300px, .83fr); gap: 17px; align-items: start; }
body.mac-theme .focus-shell #main :is(.rk-learning-candidates,.rk-learning-revisions) { min-width: 0; padding: 20px; border: 1px solid var(--rk-line); border-radius: 16px; background: #fff; box-shadow: 0 5px 20px rgba(22,51,43,.035); }
body.mac-theme .focus-shell #main .rk-learning-list,
body.mac-theme .focus-shell #main .rk-revision-list { display: flex; flex-direction: column; gap: 8px; }
body.mac-theme .focus-shell #main .rk-learning-card { padding: 17px 18px; border: 1px solid #dce7df; border-radius: 11px; background: #fcfdfc; }
body.mac-theme .focus-shell #main .rk-learning-card-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; color: #607c6d; font-size: 12px; }
body.mac-theme .focus-shell #main .rk-learning-card h3 { color: #25433a; font-size: 16px; line-height: 1.65; font-weight: 650; margin-bottom: 8px; overflow-wrap: anywhere; }
body.mac-theme .focus-shell #main .rk-learning-card p { color: var(--rk-muted); font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
body.mac-theme .focus-shell #main .rk-learning-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid #e8eee9; color: #799087; font-size: 11px; }
body.mac-theme .focus-shell #main .rk-learning-card footer button { font-size: 12px; white-space: nowrap; }
body.mac-theme .focus-shell #main .rk-revision-row.revision-row { display: grid; grid-template-columns: 24px minmax(0,1fr) 14px; gap: 11px; align-items: start; width: 100%; padding: 13px; border: 1px solid transparent; border-bottom-color: #e6eee8; border-radius: 8px; background: transparent; box-shadow: none; text-align: left; color: var(--rk-ink); }
body.mac-theme .focus-shell #main .rk-revision-row.revision-row:hover { border-color: #d6e8dc; background: #f6faf7; }
body.mac-theme .focus-shell #main .rk-revision-row .rk-revision-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #e9f3ed; color: #4a8a6a; }
body.mac-theme .focus-shell #main .rk-revision-row strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: #334a42; font-size: 13px; line-height: 1.6; }
body.mac-theme .focus-shell #main .rk-revision-row small { display: block; margin-top: 5px; color: #80928a; font-size: 11px; line-height: 1.5; }
body.mac-theme .focus-shell #main .rk-revision-row > .icon { width: 14px; margin-top: 5px; color: #7f9d8c; }

/* Status cards borrow the reference grid's scan order without implying unverified links. */
body.mac-theme .focus-shell #main .rk-connection-guide { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 17px; padding: 13px 17px; margin-bottom: 28px; border-left: 3px solid #6aa993; border-radius: 0 9px 9px 0; background: #eaf4ed; }
body.mac-theme .focus-shell #main .rk-connection-guide strong { color: #326953; font-size: 13px; }
body.mac-theme .focus-shell #main .rk-connection-guide p { color: #5c7769; font-size: 12px; line-height: 1.6; margin: 0; }
body.mac-theme .focus-shell #main .rk-connection-section + .rk-connection-section { margin-top: 30px; }
body.mac-theme .focus-shell #main .rk-connection-grid.connection-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
body.mac-theme .focus-shell #main .rk-connection-grid.connection-list > article { display: flex; flex-direction: column; min-width: 0; min-height: 154px; padding: 19px 20px; border: 1px solid var(--rk-line); border-top: 1px solid var(--rk-line); border-radius: 13px; background: #fff; box-shadow: 0 4px 17px rgba(22,51,43,.03); }
body.mac-theme .focus-shell #main .rk-connection-grid.connection-list > article:nth-child(4n + 1) { border-top-color: var(--rk-line); }
body.mac-theme .focus-shell #main .rk-connection-title { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 10px; }
body.mac-theme .focus-shell #main .rk-connection-grid h3,
body.mac-theme .focus-shell #main .rk-connection-grid h2 { color: #29443b; font-size: 15px; line-height: 1.5; font-weight: 700; margin: 0; }
body.mac-theme .focus-shell #main .rk-connection-grid article > .tag { align-self: flex-start; margin: 1px 0 9px; }
body.mac-theme .focus-shell #main .rk-connection-grid p,
body.mac-theme .focus-shell #main .rk-connection-grid small { color: var(--rk-muted); font-size: 12px; line-height: 1.75; margin: 0 0 8px; overflow-wrap: anywhere; word-break: keep-all; }
body.mac-theme .focus-shell #main .rk-connection-grid small { margin-top: auto; }
body.mac-theme .focus-shell #main .rk-connection-grid :is(button,.rk-connection-link) { align-self: flex-start; margin-top: auto; font-size: 12px; }
body.mac-theme .focus-shell #main .rk-connection-link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 0 0; text-decoration: none; font-weight: 650; }
body.mac-theme .focus-shell #main .rk-connection-link .icon { width: 14px; }
body.mac-theme .focus-shell #main .rk-connection-environment .test-environment-connection-card { display: flex; flex-wrap: wrap; padding: 0; border: 0; }
body.mac-theme .focus-shell #main .rk-connection-environment .test-environment-connection-card h3 { display: none; }
body.mac-theme .focus-shell #main .rk-connection-environment .test-environment-connection-card p { margin-top: 0; }
body.mac-theme .focus-shell #main .rk-connection-environment .test-environment-connection-card > button { white-space: nowrap; }

@media (max-width: 1000px) {
  body.mac-theme .focus-shell #main .rk-knowledge-columns { grid-template-columns: minmax(220px, 270px) minmax(0,1fr); }
  body.mac-theme .focus-shell #main .rk-learning-columns { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  body.mac-theme .focus-shell #main > .rk-page { padding: 20px 16px 38px; }
  body.mac-theme .focus-shell #main .rk-page-head { align-items: flex-start; margin-bottom: 20px; padding-bottom: 20px; }
  body.mac-theme .focus-shell #main .rk-head-actions { justify-content: flex-start; }
  body.mac-theme .focus-shell #main .rk-knowledge-columns { grid-template-columns: minmax(0,1fr); }
  body.mac-theme .focus-shell #main .rk-knowledge-list { max-height: 340px; }
  body.mac-theme .focus-shell #main .rk-reader-empty { min-height: 260px; }
  body.mac-theme .focus-shell #main .rk-learning-orientation { grid-template-columns: minmax(0,1fr) auto; gap: 13px; padding: 16px; }
  body.mac-theme .focus-shell #main .rk-learning-primary-count { border-right: 0; padding-right: 0; }
  body.mac-theme .focus-shell #main .rk-learning-orientation > p { grid-column: 1 / -1; grid-row: 2; }
  body.mac-theme .focus-shell #main .rk-learning-secondary-count { display: block; text-align: right; }
  body.mac-theme .focus-shell #main .rk-learning-secondary-count span,
  body.mac-theme .focus-shell #main .rk-learning-secondary-count strong { display: block; }
  body.mac-theme .focus-shell #main .rk-connection-grid.connection-list { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 430px) {
  body.mac-theme .focus-shell #main > .rk-page { padding: 16px 14px 30px; }
  body.mac-theme .focus-shell #main .rk-page-head h1 { font-size: 27px; }
  body.mac-theme .focus-shell #main .rk-head-actions button { flex: 1 1 auto; }
  body.mac-theme .focus-shell #main .rk-knowledge-note { gap: 6px 16px; }
  body.mac-theme .focus-shell #main .rk-knowledge-note p { flex-basis: 100%; }
  body.mac-theme .focus-shell #main .rk-knowledge-reader .panel-heading { padding: 17px; }
  body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-context { margin: 15px 17px 0; }
  body.mac-theme .focus-shell #main .rk-knowledge-reader .knowledge-reading { padding: 19px; }
  body.mac-theme .focus-shell #main :is(.rk-learning-candidates,.rk-learning-revisions) { padding: 16px 13px; }
}
