/* Compact sound-library / instrument-atlas entries, using the existing card grid. */
.portal .portal-learning-grid > :is(#sounds,#instrument-atlas) {
  width:100%;min-width:0;max-width:none;margin:0;padding:0;
}
.portal .portal-learning-card.portal-sound-library-card {
  --learning-accent:#d3a3b7;--learning-line:#d3a3b73d;--learning-tint:#d3a3b711;background:#241f24;
}
.portal .portal-learning-card.portal-instrument-card {
  --learning-accent:#a5b9d7;--learning-line:#a5b9d73d;--learning-tint:#a5b9d711;background:#1d232d;
}
.portal .portal-module-preview.sound-home-preview {display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--learning-accent);background:#19161b;}
.portal .sound-home-search {display:flex;align-items:center;gap:8px;min-height:31px;padding:6px 9px;border:1px solid var(--learning-line);border-radius:6px;background:var(--learning-tint);font-size:11px;line-height:1.4;}
.portal .sound-home-search > span {flex:1;min-width:0;}
.portal .sound-home-search svg {flex-shrink:0;width:16px;height:16px;margin:0;}
.portal .sound-home-categories {display:flex;justify-content:space-between;gap:6px;font-size:10px;color:#beb0bb;}
.portal .sound-home-categories > span {padding:1px 3px;}
.portal .portal-module-preview.instrument-home-preview {background:#131a24;color:var(--learning-accent);}
.portal .instrument-home-preview > div > span {flex:1;text-align:center;}
.portal .instrument-home-preview svg {height:62px;margin-top:1px;}
.portal .sound-home-footer > span {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.portal .sound-home-footer > a,.portal .instrument-home-footer > a {flex-shrink:0;}
/* Distinct but subdued: harmony is purple-grey; music styles retain olive green. */
.portal .portal-learning-card.portal-chord-card {--learning-accent:#c2b2d4;--learning-line:#c2b2d440;--learning-tint:#c2b2d412;background:#24202a;}
.portal .chord-home-preview {background:#18151e;}
.portal .chord-home-preview > div > span:last-child {color:#aa9cb9;}
.portal .chord-home-preview li {border-color:#c2b2d42b;background:#c2b2d406;}
.portal .chord-home-preview li:first-child {border-color:#c2b2d480;background:#c2b2d412;}
.portal .chord-home-preview strong {color:#e3d9ed;}
.portal .chord-home-preview li > span {color:#c2b2d4;}
.portal .chord-home-preview li > svg {color:#b5a2c8;}
/* All tool entries carry their own module colour in both desktop and menu. */
.site-header :is(.site-nav-link,.site-mobile-link)[href="/sound-news"] {--nav-tool-accent:#d7bb7b;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/sounds"] {--nav-tool-accent:#d3a3b7;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/synth"] {--nav-tool-accent:#8fbfca;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/cubase"] {--nav-tool-accent:#e4a090;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/groove-room/"] {--nav-tool-accent:#d7c298;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/chord-map/"] {--nav-tool-accent:#c2b2d4;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/music-map/"] {--nav-tool-accent:#b6c69c;}
.site-header :is(.site-nav-link,.site-mobile-link)[href="/instrument-atlas/"] {--nav-tool-accent:#a5b9d7;}
.site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link) {color:var(--nav-tool-accent,#d8d5dc);}
.site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link) > .site-nav-button-icon {color:inherit;}
.site-header .site-nav-link {border-color:color-mix(in srgb,var(--nav-tool-accent,#d8d5dc) 28%,transparent);background:color-mix(in srgb,var(--nav-tool-accent,#d8d5dc) 4%,transparent);}
.site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link):hover {color:var(--nav-tool-accent,#d8d5dc);border-color:color-mix(in srgb,var(--nav-tool-accent,#d8d5dc) 60%,transparent);background:color-mix(in srgb,var(--nav-tool-accent,#d8d5dc) 9%,transparent);}
.site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link):focus-visible {outline-color:var(--nav-tool-accent);}
:root[data-theme="light"] .portal .portal-learning-card.portal-sound-library-card {--learning-accent:#894363;--learning-line:#8943633d;--learning-tint:#8943630e;background:#fffafb;}
:root[data-theme="light"] .portal .portal-learning-card.portal-instrument-card {--learning-accent:#4a658b;--learning-line:#4a658b3d;--learning-tint:#4a658b0e;background:#f8faff;}
:root[data-theme="light"] .portal .portal-module-preview.sound-home-preview {background:#fff;}
:root[data-theme="light"] .portal .sound-home-categories {color:#765b6c;}
:root[data-theme="light"] .portal .portal-module-preview.instrument-home-preview {background:#fff;}
:root[data-theme="light"] .portal .portal-learning-card.portal-chord-card {--learning-accent:#715484;--learning-line:#71548440;--learning-tint:#71548410;background:#faf8fc;}
:root[data-theme="light"] .portal .chord-home-preview {background:#fff;}
:root[data-theme="light"] .portal .chord-home-preview > div > span:last-child {color:#766580;}
:root[data-theme="light"] .portal .chord-home-preview li {border-color:#7154842b;background:#71548406;}
:root[data-theme="light"] .portal .chord-home-preview li:first-child {border-color:#71548480;background:#71548412;}
:root[data-theme="light"] .portal .chord-home-preview strong,:root[data-theme="light"] .portal .chord-home-preview li > span,:root[data-theme="light"] .portal .chord-home-preview li > svg {color:#715484;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/sound-news"] {--nav-tool-accent:#8e651f;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/sounds"] {--nav-tool-accent:#894363;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/synth"] {--nav-tool-accent:#286875;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/cubase"] {--nav-tool-accent:#914a3c;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/groove-room/"] {--nav-tool-accent:#806836;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/chord-map/"] {--nav-tool-accent:#715484;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/music-map/"] {--nav-tool-accent:#4d663c;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-link)[href="/instrument-atlas/"] {--nav-tool-accent:#4a658b;}
:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link),:root[data-theme="light"] .site-header :is(.site-nav-link,.site-mobile-tools .site-mobile-link):hover {color:var(--nav-tool-accent,#434e5c);}
:root[data-theme="light"] .site-header .site-nav-link .site-nav-button-icon {color:inherit;}
@media (max-width:767px) {.portal .sound-home-footer {min-height:50px;}}

/* Course headings use the same restrained accent as their panel icons. */
:root[data-theme] .site-header .site-course-group h2{color:var(--nav-accent)}

/* Real product photos and actual site screenshots; every preview is an entrance. */
.portal .portal-learning-grid :is(.instrument-home-photo-preview,.sound-home-photo-preview,.music-atlas-photo-preview) {
  display:block;position:relative;flex-shrink:0;width:100%;height:184px;min-height:184px;margin-top:14px;padding:0;overflow:hidden;border:1px solid var(--learning-line,#91a4ba40);border-radius:9px;text-decoration:none;
}
.portal .portal-learning-grid .instrument-home-photo-preview {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;align-items:stretch;padding:12px 8px 23px;background:#fff;color:#45566c;
}
.portal .instrument-home-photo-preview figure {display:flex;flex-direction:column;justify-content:center;min-width:0;margin:0;}
.portal .instrument-home-photo-preview img {display:block;width:100%;height:118px;object-fit:contain;object-position:center;}
.portal .instrument-home-photo-preview figcaption {margin-top:0;padding:0 3px;text-align:center;font:9px/1.5 var(--font-mono,ui-monospace,SFMono-Regular,Consolas,monospace);letter-spacing:.06em;color:#64758a;white-space:nowrap;}
.portal .instrument-home-photo-credit {position:absolute;left:0;right:0;bottom:7px;text-align:center;color:#758296;font-size:9px;line-height:1.5;}
.portal .portal-learning-grid .sound-home-photo-preview {background:#151720;}
.portal .sound-home-photo-preview img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;}
.portal .portal-learning-grid .music-atlas-photo-preview {align-self:center;background:#0f151a;}
.portal .music-atlas-photo-preview img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;}
.portal .portal-learning-grid :is(.instrument-home-photo-preview,.sound-home-photo-preview,.music-atlas-photo-preview):hover {border-color:var(--learning-accent,#a5b9d7);}
.portal .portal-learning-grid :is(.instrument-home-photo-preview,.sound-home-photo-preview,.music-atlas-photo-preview):focus-visible {outline:2px solid var(--learning-accent,#a5b9d7);outline-offset:3px;}
:root[data-theme="light"] .portal .portal-learning-grid .instrument-home-photo-preview {background:#fff;}
:root[data-theme="light"] .portal .portal-learning-grid .sound-home-photo-preview {background:#e9edf2;}
:root[data-theme="light"] .portal .portal-learning-grid .music-atlas-photo-preview {background:#e9edf2;}
@media(max-width:767px){.portal .portal-learning-grid :is(.instrument-home-photo-preview,.sound-home-photo-preview,.music-atlas-photo-preview){height:180px;min-height:180px;}}
@media(max-width:359px){.portal .portal-learning-grid :is(.instrument-home-photo-preview,.sound-home-photo-preview,.music-atlas-photo-preview){height:164px;min-height:164px;}.portal .instrument-home-photo-preview img{height:104px;}.portal .instrument-home-photo-preview figcaption{font-size:8px;letter-spacing:0;}}
/* Five real translated interface sheets, each linked to the corresponding sheet. */
.portal .portal-learning-grid .sound-home-mosaic {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:5px;padding:7px;background:#151720;}
.portal .sound-home-mosaic .sound-home-tile {position:relative;display:block;min-width:0;min-height:0;overflow:hidden;border:1px solid #ffffff25;border-radius:4px;background:#1b1d26;}
.portal .sound-home-tile-1 {grid-column:1 / span 3;grid-row:1;}
.portal .sound-home-tile-2 {grid-column:4 / span 3;grid-row:1;}
.portal .sound-home-tile-3 {grid-column:1 / span 2;grid-row:2;}
.portal .sound-home-tile-4 {grid-column:3 / span 2;grid-row:2;}
.portal .sound-home-tile-5 {grid-column:5 / span 2;grid-row:2;}
.portal .sound-home-mosaic .sound-home-tile img {width:100%;height:100%;object-fit:cover;object-position:center 25%;transition:transform .2s;}
.portal .sound-home-mosaic .sound-home-tile > span {position:absolute;left:0;right:0;bottom:0;padding:4px 5px;background:linear-gradient(transparent,#10131bea);font-size:8px;line-height:1.4;color:#f1f0f4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.portal .sound-home-mosaic .sound-home-tile:hover img {transform:scale(1.025);}
.portal .sound-home-mosaic .sound-home-tile:focus-visible {outline:2px solid #d3a3b7;outline-offset:-3px;}
.portal .music-cloud-home {position:relative;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none;}
.portal .music-cloud-home > :is(canvas,img) {position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;}
.portal .music-cloud-home canvas {inset:auto;left:50%;top:50%;max-width:none;max-height:none;transform-origin:center;opacity:0;transition:opacity .15s;}
.portal .music-cloud-home.is-ready canvas {opacity:1;}
.portal .music-cloud-home.is-ready .music-cloud-home-fallback {opacity:0;}
@media(prefers-reduced-motion:reduce){.portal .sound-home-mosaic .sound-home-tile img,.portal .music-cloud-home canvas{transition:none;}.portal .sound-home-mosaic .sound-home-tile:hover img{transform:none;}}
/* Reuse the exact supplied real double-Fender composition, preserving its pixels. */
.portal .portal-learning-grid .instrument-home-photo-preview {--home-preview-height:184px;display:block;padding:0;background:#edf2f8;}
.portal .instrument-home-photo-preview img.instrument-home-reference-img {position:absolute;left:50%;top:50%;display:block;width:min(100%,calc(var(--home-preview-height) * 2.7));max-width:none;height:auto;max-height:none;transform:translate(-50%,-50%);object-fit:initial;}
.portal .instrument-home-photo-preview .instrument-home-photo-credit {left:8px;right:auto;bottom:5px;padding:1px 4px;border-radius:3px;background:#edf2f8dc;color:#586d88;font-size:8px;}
:root[data-theme="light"] .portal .portal-learning-grid .instrument-home-photo-preview {background:#edf2f8;}
@media(max-width:767px){.portal .portal-learning-grid .instrument-home-photo-preview{--home-preview-height:180px;}}
@media(max-width:359px){.portal .portal-learning-grid .instrument-home-photo-preview{--home-preview-height:164px;}}
/* Give the real map enough vertical room for its complete 29-family matrix. */
.portal .portal-learning-grid .music-atlas-photo-preview {height:260px;min-height:260px;}
@media(max-width:767px){.portal .portal-learning-grid .music-atlas-photo-preview{height:220px;min-height:220px;}}
@media(max-width:359px){.portal .portal-learning-grid .music-atlas-photo-preview{height:200px;min-height:200px;}}

/* Four course blocks, in reading order. The two theory routes are peers. */
.portal .home-course-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.portal .home-course-grid .home-theory-mining {
  display:flex;flex-direction:column;justify-content:center;gap:12px;
  color:#493a28;background:#f1e3bd;text-decoration:none;padding:22px;
}
.home-mining-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;color:#765b3d;font-size:11px;line-height:1.6; }
.home-mining-heading>span:first-child { font-weight:650;color:#635333; }
.home-mining-heading>span:last-child { text-align:right; }
.home-mining-beats { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:min(100%,460px);margin:auto; }
.home-mining-beats>div { display:flex;flex-direction:column;align-items:center;min-width:0; }
.home-mining-beats .tp-mining-scene { display:block;width:100%;max-width:90px;height:auto;overflow:visible; }
.home-mining-beats strong { font-size:19px;line-height:1.3;font-weight:700;color:#684a2c; }
.home-mining-beats small { margin-top:4px;font-size:10px;color:#907452; }
.home-mining-beats>div:first-child strong { color:#a85032; }
.home-mining-caption { display:flex;align-items:center;justify-content:center;gap:8px;width:100%;font-size:11px;line-height:1.6;color:#805f3a; }
.home-mining-caption>svg { flex-shrink:0; }
.home-theory-paths { display:grid;gap:12px; }
.home-theory-path { min-width:0;padding:17px;border:1px solid #8bd5af50;border-radius:12px;background:#8bd5af08; }
.home-theory-path-heading { display:flex;align-items:center;gap:8px;color:#9dd6bb;font-size:10px;line-height:1.5; }
.home-theory-path-heading>svg { width:19px;height:19px;flex-shrink:0; }
.portal .home-course-grid .home-theory-path>h4 { margin:7px 0 8px;color:#e7eee8;font-size:20px;line-height:1.45;font-weight:650;letter-spacing:-.02em; }
.home-theory-path>p { font-size:12px;line-height:1.8;color:#b3c4ba;margin:0 0 12px; }
.home-theory-path-entry { display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:46px;padding:10px 12px;border:1px solid #8bd5af66;border-radius:8px;background:#8bd5af13;color:#c3e8d3;font-size:13px;line-height:1.5;font-weight:600; }
.home-theory-path-entry>svg { flex-shrink:0; }
.home-theory-episodes { margin-top:14px; }
.home-theory-episodes>summary { display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:35px;cursor:pointer;font-size:11px;line-height:1.5;color:#b8ccc0; }
.home-theory-episodes>summary>span { font-size:10px;color:#91a99b;white-space:nowrap; }
.home-theory-episodes .hcg-episode-grid { margin-top:7px;gap:12px 10px; }
.home-theory-episodes .hcg-episode-play strong { font-size:12px; }
.home-theory-episodes .hcg-episode-thumb { width:56px; }
.home-theory-episodes .hcg-episode-practice { font-size:12px; }
@media(hover:hover) {
  .home-theory-mining:hover .home-mining-caption { color:#aa5134; }
  .home-theory-path-entry:hover { border-color:#8bd5af;background:#8bd5af23; }
}
@media(min-width:1760px) { .portal .home-course-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(min-width:1760px) and (max-width:1999px),(min-width:768px) and (max-width:1023px) {
  .home-theory-path { padding:13px; }
  .portal .home-course-grid .home-theory-path>h4 { font-size:18px; }
  .home-theory-episodes .hcg-episode-thumb { width:44px; }
  .home-mining-beats { gap:6px; }
}
@media(max-width:767px) {
  .portal .home-course-grid { grid-template-columns:minmax(0,1fr); }
  .portal .home-course-grid .home-theory-mining { height:290px;padding:22px; }
}
@media(max-width:389px) {
  .home-theory-path { padding:13px; }
  .portal .home-course-grid .home-theory-path>h4 { font-size:18px; }
  .home-theory-episodes .hcg-episode-thumb { width:38px; }
  .home-mining-heading { font-size:10px;gap:8px; }
  .home-mining-caption { font-size:10px;gap:5px; }
}
:root[data-theme="light"] .home-theory-path { background:#f5faf6;border-color:#aac5b4; }
:root[data-theme="light"] .home-theory-path-heading { color:#41705a; }
:root[data-theme="light"] .portal .home-course-grid .home-theory-path>h4 { color:#253d30; }
:root[data-theme="light"] .home-theory-path>p { color:#5a6e60; }
:root[data-theme="light"] .home-theory-path-entry { color:#2e6747;border-color:#9abda6;background:#e5f0e8; }
:root[data-theme="light"] .home-theory-episodes>summary { color:#41674d; }
:root[data-theme="light"] .home-theory-episodes>summary>span { color:#6f8172; }
