/* RWMATH1 rail and header parity (lane SG). Colours only through var(--dk-*) from dash_theme.css; no raw hex. */

/* Rail: width 232px, cream card, mauve line (mockup Option D). Page background is the paper tone. */
.look-plum { --rail-w: 232px; background: var(--bg); }
.look-plum .rail { background: var(--card); border-right: 1px solid var(--line); padding: 14px 10px 20px; box-sizing: border-box; }
.look-plum .rail-head { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); margin: 12px 10px 4px; padding: 0; }
.look-plum .rail-item { min-height: 40px; padding: 6px 10px; gap: 10px; box-sizing: border-box; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--ink); }
.look-plum .rail-item:hover { background: var(--brand-soft); }
/* Active row: ink fill, cream text, cream chevron (replaces the orange ring). */
.look-plum .rail .rail-item.active { background: var(--brand); color: var(--brand-ink); box-shadow: none; font-weight: 700; }
.look-plum .rail .rail-item.active .rail-chev, .look-plum .rail .rail-item.active .chev { color: var(--brand-ink); }
.look-plum .rail .rail-item.active:hover { background: var(--brand); }
.look-plum .rail-chev, .look-plum .rail-item .chev { color: var(--muted); margin-left: auto; transition: transform .12s ease; }
.look-plum .rail-item.expandable.open .rail-chev, .look-plum .rail-item.expandable.open > .chev { transform: rotate(90deg); }
.look-plum .rail-sub .rail-item { min-height: 36px; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .look-plum .rail-chev, .look-plum .rail-item .chev { transition: none; } }

/* Header (outside .shell, so keyed off body:has): Hi, name / streak pill / Log out as a plain link. */
body:has(.look-plum) .hdr-hi { font-size: 14px; font-weight: 600; flex: 0 1 auto; text-align: left; color: var(--nav-ink); }
body:has(.look-plum) .hdr-chips .chip { background: transparent; border: 1px solid var(--nav-soft); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; color: var(--nav-ink); }
body:has(.look-plum) .hdr-chips .chip.streak.on { background: transparent; color: var(--nav-ink); }
body:has(.look-plum) .topbar .brand span { color: var(--amp); }
body:has(.look-plum) #logoutBtn { background: transparent; border: 0; color: var(--nav-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; font-size: 14px; padding: 0; min-height: 44px; cursor: pointer; }

/* Phone touch targets (Fable 9): menu button and Super Guru launcher at least 44px. Both live outside .shell, so keyed off body:has. */
@media (max-width: 720px) {
  body:has(.look-plum) .rail-toggle, body:has(.look-plum) #sguruLauncher { min-height: 44px; min-width: 44px; box-sizing: border-box; }
  /* The header wraps to a height that varies (136px at 360), so no top offset can clear Log out: dock the launcher bottom-right above the Guru launcher instead, and open its panel upwards. */
  body:has(.look-plum) .sguru-root { top: auto; bottom: 64px; right: 8px; }
  body:has(.look-plum) .sguru-panel { top: auto; bottom: 52px; }
}

/* Stage 14c3: the Guru and Super Guru pill launchers shrink to a circle at phone width but kept their padding and label, so the label spilled off-screen and covered Next. Icon-only 44px circle on phones; the label stays for screen readers. */
@media (max-width: 720px) {
  body:has(.look-plum) .guru-launcher, body:has(.look-plum) .sguru-launcher { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; }
  body:has(.look-plum) .guru-launcher .launcher-label, body:has(.look-plum) .sguru-launcher .launcher-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* DASH3-F1 (lane D3-F1): header, rail and page parity with Option D (Combined.dc.html). CSS only. Markup and JS gaps are listed in the build report. */

/* Header: 60px bar, 8px 16px padding at every width (overrides the phone wrap at styles.css 515). */
body:has(.look-plum) .topbar { background: var(--nav); color: var(--nav-ink); min-height: 60px; padding: 8px 16px; box-sizing: border-box; gap: 6px 16px; }
body:has(.look-plum) .topbar .brand { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; color: var(--nav-ink); }
body:has(.look-plum) .topbar :focus-visible { outline: 3px solid var(--nav-ink); outline-offset: 2px; }
body:has(.look-plum) .rail-toggle { width: 44px; height: 44px; padding: 0; border-radius: 10px; }
@media (min-width: 1025px) { body:has(.look-plum) .rail-toggle { display: none; } }

/* Rail: divider between groups (the element is emitted by the app.js rail, see report). */
.look-plum .rail-divider { height: 1px; background: var(--line); margin: 6px 10px; }

/* D3-R1: Option D type stack. Same Inter file as DK Inter, declared 400-800 under the family name the design uses. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/inter-latin-wght.woff2') format('woff2'); }
body:has(.look-plum) { font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; }
body:has(.look-plum) button, body:has(.look-plum) input, body:has(.look-plum) select, body:has(.look-plum) textarea { font-family: inherit; }
body:has(.look-plum) #logoutBtn { line-height: 1.55; text-align: start; border-radius: 0; }
.look-plum .rail-head { text-transform: none; line-height: normal; display: block; margin: 12px 10px 4px; }
.look-plum .rail-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 0; line-height: 0; }
.look-plum .rail-chev { padding: 0; margin: 0; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.55; }
.look-plum .rail-item.active .rail-chev { font-weight: 700; }
body:has(.look-plum) .look-plum, body:has(.look-plum) .look-plum :is(h1, h2, h3, .btn, input, select, textarea) { font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }
body:has(.look-plum) .rail-scroll { display: flex; flex-direction: column; gap: 2px; padding: 0; overflow: visible; flex: 0 1 auto; min-height: auto; }
body:has(.look-plum) .rail-scroll .rail-group { display: contents; }
/* Header: Option D has no bottom border; wrap with 6px 16px gaps; chips and greeting are plain text. */
body:has(.look-plum) .topbar { border-bottom: 0; flex-wrap: wrap; gap: 6px 16px; }
body:has(.look-plum) .topbar .chip { display: block; white-space: normal; gap: normal; align-items: normal; }
body:has(.look-plum) .hdr-hi { text-align: start; overflow: visible; white-space: normal; }
body:has(.look-plum) .topbar .brand span { margin: 0; }
/* Log out: plain link height as in the design; the 44px touch target is kept by an invisible hit area. */
body:has(.look-plum) #logoutBtn { position: relative; min-height: 0; padding: 0; }
body:has(.look-plum) #logoutBtn::before { content: ""; position: absolute; inset: -11px -8px; }

/* Focus ring: 3px brand outline on every button and link inside the app. */
.look-plum button:focus-visible, .look-plum a:focus-visible, .look-plum .skl-domain-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Page head and summary chips. */
.look-plum .skl-eyebrow { font-family: var(--dk-font-text); font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: normal; color: var(--muted); }
.look-plum .skl-title { font-family: var(--dk-font-text); font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0; }
.look-plum .skl-sub { font-size: 15px; line-height: 1.5; max-width: none; color: var(--muted); }
.look-plum .skl-chip { padding: 4px 12px; border-width: 1px; }
.look-plum .skl-chip-notstarted { border-style: solid; }

/* Work on next cards. */
.look-plum .skl-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.look-plum .skl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; padding: 20px; gap: 10px; }
.look-plum .skl-card-plan { border: 2px solid var(--brand); }
.look-plum .skl-card-estimate { border-style: solid; }
.look-plum .skl-badge { font-family: var(--dk-font-text); }
.look-plum .skl-card .skl-badge { text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.look-plum .skl-card-plan .skl-badge { background: var(--brand); color: var(--brand-ink); }
.look-plum .skl-card-meta { font-size: 14px; }
.look-plum .skl-card-pct { font-family: var(--dk-font-text); font-size: 14px; font-weight: 700; }
.look-plum .skl-card-bar { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.look-plum .skl-card-bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.look-plum .skl-btn.skl-btn-primary, .look-plum .skl-btn.skl-primary { min-height: 46px; border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.look-plum .skl-btn.skl-btn-primary:hover, .look-plum .skl-btn.skl-primary:hover { background: var(--brand); text-decoration: none; filter: brightness(1.15); }

/* All skills: heading, filter pills, areas. */
.look-plum .skl-h2 { font-family: var(--dk-font-text); font-size: 18px; font-weight: 800; }
.look-plum .skl-pill { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; }
.look-plum .skl-pill-on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.look-plum .skl-domain { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; margin: 0; padding: 14px; gap: 10px; }
.look-plum .skl-domain-toggle { min-height: 48px; padding: 4px 6px; gap: 10px; }
.look-plum .skl-domain-h { font-family: var(--dk-font-text); font-size: 17px; font-weight: 800; }
.look-plum .skl-domain-sum { font-family: var(--dk-font-text); font-size: 13px; font-weight: 600; color: var(--muted); }
.look-plum .skl-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 10px; align-items: start; padding: 0 14px 14px; }

/* Skill tiles. */
.look-plum .skl-tile { background: #FAF9FC; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; gap: 12px; box-sizing: border-box; }
.look-plum .skl-tile-name { font-family: var(--dk-font-text); font-size: 15px; font-weight: 800; line-height: 1.3; }
.look-plum .skl-tile-src { font-size: 13px; font-weight: 500; }
.look-plum .skl-pct { font-family: var(--dk-font-text); font-size: 20px; font-weight: 800; min-width: 44px; flex: none; }
.look-plum .skl-bar { flex: 1 1 auto; min-width: 40px; height: 8px; background: var(--brand-soft); }
.look-plum .skl-tile[data-tier] .skl-bar > span { background: var(--brand); }
.look-plum .skl-tile .skl-badge { font-family: var(--dk-font-text); padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.look-plum .skl-tile[data-tier="Strong"] .skl-badge { background: var(--good-tint); color: var(--good); }
.look-plum .skl-tile[data-tier="Getting there"] .skl-badge { background: var(--brand-soft); color: var(--brand); }
.look-plum .skl-tile[data-tier="Needs work"] .skl-badge { background: #FBEDE5; color: #8A3A12; }
.look-plum .skl-tile[data-tier="Not started"] .skl-badge { background: transparent; color: var(--muted); border: 1px solid #D5CFDD; }

/* Action tiles under each skill. */
.look-plum .skl-secondary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.look-plum .skl-sec { min-height: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 700; text-align: left; }
.look-plum .skl-sec .skl-btn-s { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.look-plum .skl-btn[aria-disabled="true"], .look-plum .skl-sec[disabled], .look-plum .skl-sec[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; border-style: solid; background: var(--card); }
.look-plum .skl-guru { font-size: 14px; font-weight: 700; color: var(--brand); text-decoration: none; }
body:has(.look-plum) .review-all a { font-size: 15px; font-weight: 700; color: var(--brand); text-decoration: none; text-underline-offset: 3px; padding: 6px 2px; align-self: flex-start; }

/* Reduced motion: no transition on the area chevron or the primary button. */
@media (prefers-reduced-motion: reduce) { .look-plum .skl-domain-toggle::after, .look-plum .skl-btn-primary { transition: none; } }

/* R1b ruling: the design has no sticky header or rail (signed-in look only; signed-out Home bar untouched). */
body:has(.look-plum) .topbar { position: static; z-index: auto; }
.look-plum .rail { position: static; z-index: auto; height: auto; }

/* D3-P1 shell: Option D structure. Header right group is one wrapper (greeting, pills, log out share one flex-wrap row,
   gap 6px 14px); the three app containers dissolve into it. The rail has no collapsed state, is a block aside, and the
   dropdown arrow is a plain span pinned to the row's right edge (no float, no rotation, as in the drawing). */
body:has(.look-plum) .topbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; font-weight: 600; }
body:has(.look-plum) .topbar-right > .hdr-hi, body:has(.look-plum) .topbar-right > .hdr-chips, body:has(.look-plum) .topbar-right > .userbox { display: contents; }
.look-plum .rail { display: block; flex-direction: row; flex-wrap: nowrap; align-self: auto; align-items: normal; }
.look-plum .rail-item.expandable { position: static; }
.look-plum .rail-item.expandable > .chev { position: static; margin: 0; transform: none; }
.look-plum .rail-item.expandable.open > .chev { transform: none; }
