/* dataflu shared UI: one look across hub pages, Excel and SQL practice, Learn and Tools.
   Tokens: navy #111827, yellow #facc15, Poppins (headings) + Inter (text). Light theme only. */
:root{--df-navy:#111827;--df-navy-2:#1e293b;--df-yellow:#facc15;--df-yellow-d:#ca8a04;--df-bg:#f3f4f6;--df-line:#e5e7eb;--df-muted:#6b7280;--df-ok:#166534;--df-ok-soft:#dcfce7;--df-ok-line:#16a34a}

/* ---------- Excel + SQL practice apps ---------- */
html.df-app{--bg:#f3f4f6;--surface:#fff;--bar:#111827;--bar-tx:#e5e7eb;--tx:#111827;--mute:#6b7280;--line:#e5e7eb;--head:#eef0f3;--acc:#facc15;--btn:#facc15;--on-btn:#111827;--acc-soft:#fef9c3;--ok:#166534;--ok-soft:#dcfce7;--display:'Poppins','Inter',system-ui,sans-serif;--body:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif}
html.df-app body{background:var(--bg)}
html.df-app :focus-visible{outline:3px solid var(--df-yellow-d)}
html.df-app .topbar{padding:0 20px;height:64px;display:flex;align-items:center;border-bottom:2px solid var(--df-yellow)}
html.df-app .topbar .in{width:100%;max-width:1180px;margin:0 auto;gap:14px;flex-wrap:nowrap}
html.df-app .brand{font-family:'Poppins','Inter',sans-serif;font-weight:800;font-size:22px;letter-spacing:-.5px;color:#fff}
html.df-app .brand .mark{display:none}
html.df-app .crumbs{margin-left:auto;font-size:13px;color:#cbd5e1}
html.df-app .crumbs a{color:#fff}
html.df-app .btn.pri{background:var(--df-yellow);border-color:var(--df-yellow);color:var(--df-navy)}
html.df-app .btn.pri:hover{background:#e5b800;border-color:#e5b800;filter:none}
html.df-app .runrow button{background:var(--df-yellow);border-color:var(--df-yellow);color:var(--df-navy)}
html.df-app .btn:hover{border-color:var(--df-navy)}
html.df-app .chip.done{background:var(--df-ok-soft);color:var(--df-ok)}
html.df-app .chip.go{background:#fef9c3;color:#854d0e}
html.df-app .fb.good{background:var(--df-ok-soft);border-color:var(--df-ok-line)}
html.df-app .grid td.ok{background:var(--df-ok-soft)}
html.df-app .grid td.sel{box-shadow:inset 0 0 0 2px var(--df-navy)}
html.df-app .cellinp{border-color:var(--df-navy)}
html.df-app .namebox{border-color:var(--line)}
html.df-app .bar>i{background:var(--df-yellow-d)}
html.df-app .card:hover{border-color:var(--df-yellow-d);box-shadow:0 10px 26px rgba(17,24,39,.08)}
html.df-app h1,html.df-app h2,html.df-app .card h3,html.df-app .module h2{font-family:'Poppins','Inter',sans-serif}
html.df-app .embedbar a,html.df-app .linkbtn{color:#92660a}
html.df-app.embed .topbar{display:none}
@media(max-width:700px){html.df-app .crumbs{display:none}}

/* shared footer (injected by nav.js on df-app pages) */
.dfxf{background:#111827;color:#cbd5e1;margin-top:48px;border-top:2px solid #facc15;font:14px/1.5 'Inter',system-ui,sans-serif}
.dfxf-in{max-width:1180px;margin:0 auto;padding:22px 20px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}
.dfxf a,.dfxf button{color:#e5e7eb;text-decoration:none;margin-left:18px;background:none;border:0;font:inherit;cursor:pointer;padding:0}
.dfxf a:first-child{margin-left:0}.dfxf a:hover,.dfxf button:hover{color:#facc15}
html.embed .dfxf{display:none}

/* ---------- Learn ---------- */
html.df-learn{--font-display:'Poppins','Inter',sans-serif}
html.df-learn .topbar,html.df-learn .home-header{background:#111827!important;border-bottom:2px solid #facc15!important;color:#fff;backdrop-filter:none}
html.df-learn .topbar .brand,html.df-learn .home-header .brand{color:#fff;font-family:'Poppins','Inter',sans-serif;font-weight:800;font-size:20px;letter-spacing:-.4px}
html.df-learn .brand-mark{display:none}
html.df-learn .brand-sec{background:#facc15;color:#111827}
html.df-learn .theme-toggle{display:none}
html.df-learn .topbar .menu-toggle,html.df-learn .home-header .menu-toggle{color:#fff}
html.df-learn .topbar .divider-v{background:rgba(255,255,255,.2)}
html.df-learn,html.df-learn[data-theme="light"]{--grad:linear-gradient(135deg,#facc15,#eab308);--on-grad:#111827}
html.df-learn .grad-text{background:none;-webkit-background-clip:border-box;background-clip:border-box;color:#ca8a04}
html.df-learn :focus-visible{outline-color:#ca8a04}
html.df-app body{min-height:100vh;display:flex;flex-direction:column}
html.df-app main{flex:1;width:100%;max-width:1040px}
html.df-app .dfxf{margin-top:auto}
html.df-app main+script~.dfxf{margin-top:auto}
html.df-app.embed body{min-height:0;display:block}
html.df-app.embed main{max-width:none}
html.df-app body.embed{min-height:0;display:block}
html.df-app body.embed main{max-width:none}
body.embed .dfxf{display:none}

/* ---------- practice layout: sidebar + content ---------- */
html.df-app .pl{display:grid;grid-template-columns:auto minmax(0,1fr);width:100%;flex:1;align-items:start}
html.df-app .pside{display:flex;position:sticky;top:0;height:100vh;align-self:start;border-right:1px solid var(--df-line);background:#fff}
html.df-app .ps-a{width:236px;background:#f1f2f8;padding:16px 12px;overflow:auto;border-right:1px solid var(--df-line);display:flex;flex-direction:column}
html.df-app .ps-b{width:268px;overflow:auto;padding:14px 8px 40px;background:#fff}
html.df-app .pl main{margin:0;max-width:980px;width:auto;padding:30px 40px 64px;min-width:0}
html.df-app .ps-open{display:none}
html.df-app .topbar .in{max-width:none}
html.df-app .topbar .brand .mark{display:none}
html.df-app .topbar .in{padding:0 4px}
html.df-app .topbar{padding:0 20px}
html.df-app .topbar .dfx-menu{margin-left:auto}
html.df-app .topbar .crumbs{display:none}
.ps-switch{position:relative;margin-bottom:12px}
.ps-cur{width:100%;display:flex;align-items:center;gap:10px;text-align:left;background:#fff;border:1px solid var(--df-line);border-radius:12px;padding:11px 12px;cursor:pointer;color:#111827;font:inherit}
.ps-cur>span:nth-of-type(1){flex:1;min-width:0}
.ps-cur:hover{border-color:#111827}.ps-cur b{display:block;font-family:'Poppins','Inter',sans-serif;font-size:15px}
.ps-cur small{display:block;color:var(--df-muted);font-size:12px}.ps-cur .car{font-size:11px;color:var(--df-muted)}
.ps-dot{width:12px;height:12px;border-radius:50%;flex:none;box-shadow:0 0 0 5px rgba(127,127,127,.14)}
.ps-menu{display:none;position:absolute;left:0;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--df-line);border-radius:12px;box-shadow:0 14px 36px rgba(17,24,39,.2);padding:6px;z-index:60}
.ps-switch.open .ps-menu{display:block}
.ps-menu a{display:block;padding:9px 10px;border-radius:8px;text-decoration:none;color:#111827;font-size:14px;font-weight:600}
.ps-menu a:hover{background:#f3f4f6}.ps-menu a[aria-current=true]{background:#fef9c3}
.ps-sec{font:600 11px/1 'JetBrains Mono',ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--df-muted);margin:16px 6px 8px}
.ps-nav{display:flex;justify-content:space-between;align-items:center;padding:9px 10px;border-radius:9px;text-decoration:none;color:#374151;font-size:14px;font-weight:500}
.ps-nav:hover{background:#e7e9f3}.ps-nav.on{background:#fff;color:#111827;font-weight:600;box-shadow:inset 3px 0 0 #facc15,0 1px 2px rgba(17,24,39,.06)}
.ps-nav em{font-style:normal;font-size:12px;color:var(--df-muted)}
.ps-track{margin-top:auto;padding-top:16px;border-top:1px solid var(--df-line);font-size:13px}
.ps-track b{display:block;font-family:'Poppins','Inter',sans-serif;margin-bottom:8px}.ps-track small{display:block;margin-top:6px;color:var(--df-muted)}
.bar{height:6px;border-radius:99px;background:#e5e7eb;overflow:hidden}.bar i{display:block;height:100%;background:#facc15;border-radius:99px}
.ps-bh{padding:4px 8px 10px;border-bottom:1px solid var(--df-line);margin-bottom:4px}.ps-bh b{display:block;font-family:'Poppins','Inter',sans-serif;font-size:16px}.ps-bh small{color:var(--df-muted);font-size:12px}
.ps-g{font:600 11px/1.3 'JetBrains Mono',ui-monospace,monospace;letter-spacing:.07em;text-transform:uppercase;color:var(--df-muted);margin:16px 8px 6px}
.ps-i{display:flex;align-items:baseline;gap:8px;padding:8px 8px;border-radius:8px;text-decoration:none;color:#374151;font-size:14px;line-height:1.3}
.ps-i:hover{background:#f3f4f6;color:#111827}
.ps-i.active{background:#fef9c3;color:#111827;font-weight:600;box-shadow:inset 3px 0 0 #facc15}
.ps-no{font:500 11px/1 'JetBrains Mono',ui-monospace,monospace;color:var(--df-muted);flex:none;width:18px}
.ps-t{flex:1;min-width:0}
.ps-n{font-size:12px;color:var(--df-muted);flex:none;font-variant-numeric:tabular-nums}.ps-i.full .ps-n{color:var(--df-ok);font-weight:700}
@media(max-width:900px){
  html.df-app .pl{grid-template-columns:1fr}
  html.df-app .ps-open{display:block;margin:12px 16px 0;padding:9px 14px;border:1px solid var(--line);background:#fff;border-radius:9px;font-weight:600;text-align:left}
  html.df-app .pside{display:none;position:static;height:auto;flex-direction:column;border-right:0;border-bottom:1px solid var(--line)}
  html.df-app .pl.open .pside{display:flex}
  html.df-app .ps-a,html.df-app .ps-b{width:auto;border-right:0}
  html.df-app .ps-b{max-height:50vh}
  html.df-app .pl main{padding:18px 16px 40px}
}
@media(max-width:1000px){}
html.df-app.embed .pside,html.df-app.embed .ps-open,html.df-app body.embed .pside,html.df-app body.embed .ps-open{display:none}
html.df-app.embed .pl,html.df-app body.embed .pl{display:block}

/* ---------- Learn sidebar course switcher ---------- */
.sb-switch{position:relative;margin-bottom:16px}
.sb-switch-btn{width:100%;text-align:left;cursor:pointer;font:inherit;color:inherit;margin-bottom:0!important;border:1px solid var(--border,#e5e7eb);background:var(--bg-2,#fff);border-radius:12px}
.sb-switch-btn .sb-chev{margin-left:auto;opacity:.6;transition:transform .15s}
.sb-switch.open .sb-chev{transform:rotate(180deg)}
.sb-switch-menu{display:none;position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:60;background:#fff;color:#111827;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 16px 40px rgba(17,24,39,.2);padding:6px}
.sb-switch.open .sb-switch-menu{display:block}
.sb-switch-menu .tool-option{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;color:#111827;text-decoration:none;font-size:14px}
.sb-switch-menu .tool-option:hover{background:#f3f4f6}
.sb-switch-menu .tool-option .count{display:none}
html.df-learn .dfx-callout{border:1px solid #facc15;border-left:5px solid #facc15;background:#fef9c3;color:#111827}
html.df-learn .dfx-callout a{background:#facc15;color:#111827}

/* ---------- tools hub: hero spans the full width ---------- */
html:has(.hub-hero){overflow-x:clip}
.hub-hero{margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;padding-left:calc(50vw - 50% + 16px)!important;padding-right:calc(50vw - 50% + 16px)!important}
