/* Model pages (models/<id>.html): the diagnosis card beside the scores and the profile key.
   The card itself is styled by scripts/home-structure.css (#diagnosis, .dx-*). */
body.model-page { background: #f5f7f6; }
html body main.mp { box-sizing: border-box; max-width: 1180px; margin: 0 auto; padding: 36px 32px 72px; color: #1f3a4b; }
.mp-back { display: inline-flex; gap: 6px; color: #4e7c70; font-size: 14px; font-weight: 600; text-decoration: none; }
.mp-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.mp-head { display: flex; align-items: center; gap: 18px; margin: 16px 0 28px; }
.mp-icon { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border: 1px solid #dfe5e2; border-radius: 18px; background: #fff; }
.mp-icon img { width: 52px; height: 52px; object-fit: contain; }
.mp-monogram { color: #446f86; font-size: 22px; font-weight: 700; }
html body .mp-head h1 { margin: 0 !important; color: #172c3a !important; font-size: clamp(30px, 4vw, 46px) !important; font-weight: 750 !important; letter-spacing: -.02em; line-height: 1.1 !important; }
.mp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; color: #506c7b; font-size: 15px; }
.mp-type { padding: 2px 9px; border: 1px solid #d6dfdc; border-radius: 999px; background: #fff; color: #365965; font-size: 12px; font-weight: 650; }
.mp-status { margin: 0 0 0 auto; padding: 6px 14px; border: 1px solid #b9d3cb; border-radius: 999px; background: #e8f2ee; color: #2f6657; font-size: 13px; font-weight: 650; white-space: nowrap; }
.mp-status.is-done { border-color: #c9d9f2; background: #edf3fd; color: #315fa3; }
.mp-sample-note { margin: -10px 0 24px; padding: 10px 14px; border-left: 3px solid #91793d; border-radius: 0 8px 8px 0; background: #faf6ea; color: #4f4220; font-size: 14px; line-height: 1.55; }
.mp-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.mp-side { display: grid; gap: 20px; }
.mp-panel { padding: 20px 22px; border: 1px solid #dfe5e2; border-radius: 16px; background: #fff; }
html body .mp-panel h2 { margin: 0 0 12px !important; color: #1f3a4b !important; font-size: 17px !important; font-weight: 700 !important; line-height: 1.3 !important; }
.mp-rank { margin: -4px 0 10px; color: #506c7b; font-size: 14px; }
.mp-rank b { color: #a2451f; font-size: 22px; }
.mp-scores table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mp-scores th, .mp-scores td { padding: 7px 6px; border-bottom: 1px solid #edf1ef; text-align: right; }
.mp-scores thead th { color: #5a7380; font-size: 11px; font-weight: 650; letter-spacing: .5px; text-transform: uppercase; }
.mp-scores thead tr:first-child th { border-bottom: 0; padding-bottom: 0; color: #1f3a4b; text-align: center; }
.mp-scores tbody th { color: #1f3a4b; font-weight: 600; text-align: left; }
.mp-scores td { color: #2b4757; }
.mp-note { margin: 12px 0 0; color: #5a7380; font-size: 13px; line-height: 1.55; }
.mp-key p { margin: 0 0 12px; color: #3f5a68; font-size: 14px; line-height: 1.6; }
.mp-key ul { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.mp-key li { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 8px 12px; border-radius: 10px; background: #f4f7f6; color: #2b4757; font-size: 13px; }
.mp-key li small { grid-column: 1 / -1; order: -1; color: #6b8290; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.mp-key b { margin-right: 3px; color: #1f3a4b; }
.mp-key a, .mp-ghost-note a { color: #4e7c70; font-size: 14px; font-weight: 650; text-decoration: none; }
.mp-key a:hover, .mp-ghost-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mp-ghost .dx-hero-name { color: #6b7d85; }
.mp-ghost .dx-code { color: #a3b2b9; letter-spacing: 2px; }
.mp-ghost .dx-letter { color: #a3b2b9; }
.mp-ghost .dx-bar strong { color: #a3b2b9; }
.mp-ghost-note { margin: 0; padding-top: 14px; border-top: 1px dashed #d6dfdc; color: #5a7380; font-size: 13.5px; line-height: 1.55; }
.mp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 900px) {
  html body main.mp { padding: 24px 16px 56px; }
  .mp-grid { grid-template-columns: minmax(0, 1fr); }
  .mp-head { flex-wrap: wrap; gap: 14px; }
  .mp-icon { width: 56px; height: 56px; border-radius: 14px; }
  .mp-icon img { width: 40px; height: 40px; }
  .mp-status { margin-left: 0; }
}
.mp-side { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 560px) {
  .mp-panel { padding: 16px; }
  .mp-scores table { font-size: 13px; }
  .mp-scores th, .mp-scores td { padding: 6px 3px; }
  .mp-scores thead th { font-size: 10px; letter-spacing: .2px; }
  .mp-key li { grid-template-columns: minmax(0, 1fr); }
}

/* Reading sizes match the site documentation; tables scroll instead of shrinking text. */
body.model-page .mp { color: #35353b; }
body.model-page .mp-meta { font-size: 16px; color: #454b54; }
body.model-page :is(.mp-type, .mp-status) { font-size: 14px; }
body.model-page :is(.mp-back, .mp-rank, .mp-key a, .mp-ghost-note a) { font-size: 16px; }
html body.model-page .mp-panel h2 { font-size: 22px !important; color: #111827 !important; }
body.model-page .mp-panel { min-width: 0; }
body.model-page .mp-scores { overflow-x: auto; }
body.model-page .mp-scores table { min-width: 360px; font-size: 16px; }
body.model-page .mp-scores :is(th, td) { padding: 10px 7px; }
body.model-page .mp-scores thead th { font-size: 14px; letter-spacing: 0; color: #454b54; }
body.model-page :is(.mp-note, .mp-ghost-note, .mp-sample-note) { font-size: 16px; line-height: 1.65; color: #454b54; }
body.model-page .mp-key p { font-size: 17px; line-height: 1.65; color: #35353b; }
body.model-page .mp-key li { font-size: 16px; line-height: 1.5; }
body.model-page .mp-key li small { font-size: 14px; color: #454b54; letter-spacing: .025em; }
body.model-page .mp-ghost :is(.dx-hero-name, .dx-code, .dx-letter, .dx-bar strong) { color: #52616a; }
body.model-page .dx-card :is(.dx-sub, .dx-foot) { font-size: 15px; line-height: 1.6; color: #454b54; }
body.model-page .dx-card :is(.dx-bar-label, .dx-bar span) { font-size: 14px; }

/* Scores and explanations are open sections; status remains a distinct marker. */
body.model-page { background: #fff; }
body.model-page .mp-grid { gap: 36px; }
body.model-page .mp-panel { padding: 24px 0 0; border: 0; border-top: 1px solid var(--m2a-line, #dde3e6); border-radius: 0; }
body.model-page .mp-side { gap: 36px; }
body.model-page .dg-card { margin-top: 0; padding: 24px 0 0; border: 0; border-top: 1px solid var(--m2a-line, #dde3e6); border-radius: 0; box-shadow: none; }
body.model-page .mp > .dg-card { margin-top: 32px; }
html body.model-page :is(.mp-panel h2, .dg-card-pending h3) { margin-bottom: 16px !important; color: var(--m2a-ink, #17212b) !important; font-size: 24px !important; }
body.model-page :is(.mp-back, .mp-key a, .mp-ghost-note a, .dg-more) { color: var(--m2a-link, #205fbd) !important; }
body.model-page :is(.dg-kicker, .mp-key li small, .mp-scores tbody th) { color: var(--m2a-ink, #17212b); font-weight: 650; }
body.model-page .mp-key li { padding: 12px 0; border-bottom: 1px solid var(--m2a-line, #dde3e6); border-radius: 0; background: transparent; }
body.model-page .mp-scores thead th { color: var(--m2a-ink, #17212b); background: var(--m2a-soft, #f6f8f9); }
body.model-page .mp-scores :is(th, td) { border-color: var(--m2a-line, #dde3e6); padding-block: 12px; }
body.model-page :is(.mp-note, .dg-card-pending > p) { color: var(--m2a-text, #303740); }
@media (max-width: 900px) { body.model-page .mp-grid { gap: 32px; } }

body.model-page .mp-cost { margin-top: 36px; }
body.model-page .mp-cost-scroll { overflow-x: auto; margin-top: 18px; }
body.model-page .mp-cost table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
body.model-page .mp-cost :is(th, td) { padding: 12px 16px; border-bottom: 1px solid var(--m2a-line, #dde3e6); text-align: left; }
body.model-page .mp-cost thead th { color: var(--m2a-ink, #17212b); background: var(--m2a-soft, #f6f8f9); font-size: 14px; }
body.model-page .mp-cost tbody th { color: var(--m2a-ink, #17212b); font-weight: 600; }
body.model-page .mp-cost td { color: var(--m2a-text, #303740); }
/* Model results: one reading order, shared numeric columns, clear task hierarchy. */
body.model-page .mp-outline{display:flex;flex-wrap:wrap;gap:24px;margin:0 0 28px;padding:0 0 16px;border-bottom:1px solid #dce4e8}
body.model-page .mp-outline a{color:#245eaa;text-decoration:none;font-size:17px;font-weight:550}
body.model-page .mp-outline a:hover{text-decoration:underline;text-underline-offset:5px}
body.model-page .mp-panel{scroll-margin-top:110px}
body.model-page .mp-scores{border-top:0;padding-top:0;overflow:visible}
body.model-page .mp-task-results{margin-top:40px}
body.model-page .mp-task-heading{display:flex;justify-content:space-between;align-items:baseline;gap:20px;flex-wrap:wrap}
body.model-page .mp-task-heading nav{display:flex;flex-wrap:wrap;gap:20px}
body.model-page .mp-task-heading nav a{font-size:17px;color:#245eaa;text-decoration:underline;text-underline-offset:5px;text-decoration-color:#b7cbea}
body.model-page .mp-task-key{margin:0 0 18px;color:#465560;font-size:16px;line-height:1.6}
body.model-page .mp-task-key b{font-weight:600}
body.model-page .mp-task-suite{margin-top:30px;scroll-margin-top:110px}
html body.model-page .mp-task-suite h3{font-size:23px!important;font-weight:600!important;line-height:1.4!important;color:#20343e!important;margin:0 0 16px!important}
body.model-page .mp-task-scroll{overflow-x:auto;scrollbar-width:thin}
body.model-page .mp-task-scroll table{table-layout:fixed;width:100%;min-width:850px;border-collapse:collapse;font-size:17px;line-height:1.5;font-variant-numeric:tabular-nums}
body.model-page .mp-task-scroll col.mp-task-name{width:46%}
body.model-page .mp-task-scroll :is(th,td){padding:17px 12px;border-bottom:1px solid #dde5e9;vertical-align:middle;text-align:center}
body.model-page .mp-task-scroll th:first-child{text-align:left;padding-left:16px}
body.model-page .mp-task-scroll thead th{background:#f4f7f8;color:#415563;font-size:16px;font-weight:550;text-transform:none;letter-spacing:0;padding:14px 12px;border-top:1px solid #dde5e9;border-bottom:1px solid #dde5e9}
body.model-page .mp-task-scroll tbody th{color:#243740;font-weight:450}
body.model-page .mp-task-scroll a{display:flex;align-items:baseline;gap:12px;color:#245eaa;text-decoration:none}
body.model-page .mp-task-scroll a:hover{text-decoration:underline;text-underline-offset:4px}
body.model-page .mp-task-code{display:inline-block;min-width:44px;flex:none;color:#52636d;font-size:15px;font-weight:550}
body.model-page .mp-task-category :is(th,td){background:#f5f8f7;border-top:1px solid #d7e1e4}
body.model-page .mp-task-category th{font-weight:600!important}
body.model-page .mp-task-category .mp-task-code{margin-right:12px;color:#386553}
body.model-page .mp-result-pair{display:inline-flex;gap:4px;white-space:nowrap;font-size:18px;font-weight:400;color:#253b48;font-variant-numeric:tabular-nums}
body.model-page .mp-result-pair b{font-size:inherit;font-weight:600}
body.model-page .mp-result-divider{color:#71808a}
body.model-page .mp-difficulty{margin-top:18px}
body.model-page .mp-difficulty>summary{cursor:pointer;color:#245eaa;font-size:17px;font-weight:550;padding:10px 0}
body.model-page .mp-difficulty[open]>summary{margin-bottom:12px}
body.model-page .mp-difficulty th[scope="rowgroup"]{vertical-align:top;padding-top:18px}
body.model-page .mp-difficulty .mp-task-code{margin-right:8px}
body.model-page :is(.mp-outline a,.mp-task-heading a,.mp-task-scroll,.mp-task-scroll a):focus-visible{outline:2px solid #245eaa;outline-offset:4px}
@media(max-width:760px){
 body.model-page .mp-outline{gap:20px;margin-bottom:24px}
 body.model-page .mp-task-heading{gap:0;margin-bottom:14px}
 body.model-page .mp-task-heading nav{gap:22px}
 body.model-page .mp-task-scroll table{min-width:650px}
 body.model-page .mp-task-scroll col.mp-task-name{width:28%}
 body.model-page .mp-task-key{font-size:16px}
}
