/* SAMUNDAR Phase 2 — candidate only. No Gurbani or source-data changes. */
:root{--sx-back:#102637;--sx-panel:#193545;--sx-text:#f2eadb;--sx-heading:#efd19a;--sx-muted:#cbd6d5;--sx-border:rgba(219,191,138,.38);--sx-roman:#a8e8d5;--sx-punjabi:#e4c5ff;--sx-english:#f4d28f;--sx-gurbani:#ffe2a2;--sx-g-scale:1;--sx-aux-scale:1;--sx-line-scale:1}
html[data-samundar-theme="light"]{color-scheme:light;--sx-back:#faf5eb;--sx-panel:#fffcf5;--sx-text:#27333a;--sx-heading:#694c22;--sx-muted:#46545c;--sx-border:#c5b69c;--sx-roman:#155b52;--sx-punjabi:#513977;--sx-english:#744d1c;--sx-gurbani:#513d20}
html[data-samundar-theme="dark"]{color-scheme:dark;--sx-back:#171b21;--sx-panel:#242932;--sx-text:#e5e5e8;--sx-heading:#dfcba0;--sx-muted:#c4c8cf;--sx-border:#5d6271;--sx-roman:#a6d9ce;--sx-punjabi:#dcc7ee;--sx-english:#ebc993;--sx-gurbani:#f0dfb6}
/* Hybrid header: keep desktop's four primary destinations; avoid multirow mobile links. */
.web-nav.sx-nav{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:clamp(8px,1.2vw,24px)!important;position:relative!important;width:100%;box-sizing:border-box;min-height:63px;padding:9px clamp(12px,2.5vw,30px)!important;z-index:40}
.sx-nav .web-brand{flex:0 0 auto;white-space:nowrap}
.sx-nav .sx-primary-links{display:flex;align-items:center;flex:1 1 auto;justify-content:center!important;gap:clamp(8px,1.7vw,27px)!important;flex-wrap:nowrap!important;min-width:0}
.sx-nav .sx-primary-links a{font-size:clamp(.72rem,.9vw,.88rem)!important;white-space:nowrap;text-decoration:none}
.sx-nav .sx-primary-links a[aria-current="page"]{color:#f5d79f!important;text-decoration:underline;text-underline-offset:5px}
.sx-nav .sx-header-actions{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;gap:clamp(7px,1vw,13px);flex-wrap:nowrap!important}
.sx-nav .sx-search{font-size:1.8rem!important;line-height:1!important;padding:3px 6px;min-width:26px;min-height:32px;text-align:center;display:inline-flex;align-items:center;justify-content:center}
.sx-nav .language-switch{white-space:nowrap;margin:0!important}.sx-nav .language-switch select{max-width:105px;font-size:.77rem}
.sx-menu-button{background:transparent;border:1px solid rgba(223,193,138,.48);color:#f2dcac;border-radius:9px;cursor:pointer;min-height:39px;padding:5px 10px;font:600 .83rem system-ui,sans-serif;display:inline-flex;gap:7px;align-items:center;justify-content:center}
.sx-menu-button:hover,.sx-menu-button:focus-visible{background:rgba(234,199,143,.14);outline-offset:3px}
@media(max-width:1040px){.sx-nav .sx-primary-links{gap:10px!important}.sx-nav .sx-primary-links a{font-size:.75rem!important}}
@media(max-width:800px){.sx-nav{position:relative!important}.sx-nav .sx-primary-links{display:none!important}.sx-nav .sx-menu-word{display:none}.sx-nav .sx-menu-button{font-size:1.27rem;min-width:42px}.sx-nav .language-switch select{max-width:88px}}
@media(max-width:380px){.sx-nav .web-brand{font-size:.75rem;letter-spacing:.06em}.sx-nav .sx-header-actions{gap:5px}.sx-nav .language-switch select{max-width:79px}}
/* Drawer does not occupy the Reading page until opened; accessible and keyboard navigable. */
.sx-menu-layer[hidden],.sx-reader-panel[hidden],.sx-reader-tools[hidden],.sx-settings[hidden]{display:none!important}
.sx-menu-layer{position:fixed;inset:0;z-index:1005;display:flex;justify-content:flex-start;align-items:stretch}
.sx-menu-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.57);border:0;padding:0;cursor:pointer;width:100%;height:100%}
.sx-drawer{position:relative;z-index:1;width:min(350px,92vw);max-height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:#152c3b;color:#f4ebd9;padding:20px 21px 36px;box-sizing:border-box;box-shadow:12px 0 48px rgba(0,0,0,.35);border-right:1px solid #92754a;font:400 1rem/1.5 system-ui,sans-serif}
.sx-drawer h2{font:500 1.6rem Georgia,serif;color:#f2d095;margin:0}.sx-drawer-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.sx-drawer-close,.sx-settings-toggle{background:transparent;color:#f3e8d6;border:1px solid #706248;border-radius:9px;padding:8px 12px;cursor:pointer;font:inherit}
.sx-drawer-close{font-size:1.2rem;min-width:42px;min-height:42px}
.sx-drawer-nav{display:flex;flex-direction:column;gap:2px}
.sx-drawer-nav a{display:block;padding:10px 12px;border-radius:8px;color:#f1e5cf;text-decoration:none;font-size:.96rem;min-height:40px;box-sizing:border-box}
.sx-drawer-nav a[aria-current="page"]{background:#34495a;color:#ffdf9e;font-weight:700}
.sx-drawer-nav a:hover,.sx-drawer-nav a:focus-visible{background:rgba(231,197,135,.18);outline-offset:2px}
.sx-drawer-separator{border:0;border-top:1px solid rgba(229,195,141,.25);margin:17px 0}
.sx-settings-toggle{width:100%;text-align:left;font-weight:700;min-height:45px}
.sx-settings{margin-top:13px;padding:10px 1px 20px;color:#f0e5d3}
.sx-settings fieldset{border:1px solid #6b705f;border-radius:10px;padding:10px 12px 12px;margin:0 0 15px;min-width:0}
.sx-settings legend{font-weight:600;color:#efd6a7;padding:0 6px}
.sx-theme-picks{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px}
.sx-theme-picks label{font-size:.78rem;text-align:center;display:flex;flex-direction:column;gap:8px;align-items:center;padding:7px 0;border:1px solid #777;border-radius:8px;cursor:pointer}
.sx-settings label.sx-range-label{display:block;margin:14px 0;color:#e6dcc7;font-size:.93rem}
.sx-settings input[type="range"]{width:100%;accent-color:#dfc186;min-height:26px;margin:7px 0}
.sx-settings .sx-check-line{display:flex;align-items:center;gap:10px;margin:8px 0;font-size:.88rem}
.sx-settings input[type="checkbox"],.sx-settings input[type="radio"]{width:17px;height:17px;accent-color:#e9c889}
.sx-reset{border-radius:8px;background:#e4ca94;border:0;color:#243441;min-height:39px;padding:8px 12px;font-weight:700;cursor:pointer}
.sx-menu-button:focus-visible,.sx-drawer button:focus-visible,.sx-reader-tools button:focus-visible,.sx-reader-tools a:focus-visible{outline:3px solid #f4d48e;outline-offset:3px}
body.sx-menu-open{overflow:hidden}
/* Reader tools: one small button, panel opens only by request. Does not cover scripture as a permanent bar. */
.sx-reader-tools{position:fixed;left:clamp(10px,2vw,20px);bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:850;display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:calc(100vw - 24px);font-family:system-ui,sans-serif}
.sx-reader-toggle{border:1px solid rgba(234,201,147,.75);box-shadow:0 4px 18px rgba(0,0,0,.25);border-radius:999px;padding:11px 15px;min-height:44px;background:#213b4b;color:#f5deb3;font-size:.85rem;font-weight:700;cursor:pointer}
.sx-reader-panel{display:flex;flex-direction:column;gap:7px;min-width:min(260px,calc(100vw - 24px));padding:15px;background:#1c3747;border:1px solid rgba(233,196,132,.75);box-shadow:0 12px 35px rgba(0,0,0,.32);border-radius:13px}
.sx-reader-panel button,.sx-reader-panel a{display:block;padding:10px 12px;min-height:42px;border-radius:8px;background:#304b5b;color:#f7ebd2;border:1px solid #64717a;cursor:pointer;text-decoration:none;text-align:left;font:600 .91rem system-ui,sans-serif}
.sx-reader-note{font-size:.72rem;color:#bcd1cc;margin:5px 2px 0;max-width:245px}
body:has(>.smart-reader-dock:not([hidden])) .sx-reader-tools{bottom:calc(88px + env(safe-area-inset-bottom,0px))}
body:has(>.smart-reader-dock:not([hidden])){padding-bottom:calc(168px + env(safe-area-inset-bottom,0px))}
/* Long Reader pages reserve breathing room for fixed tools. */
body.sx-reader-page main{padding-bottom:clamp(100px,10vw,130px)!important}
/* Theme overrides are applied only in user-selected Light/Dark. Normal is visually unchanged. */
html[data-samundar-theme="light"] body,html[data-samundar-theme="dark"] body{background:var(--sx-back)!important;color:var(--sx-text)!important}
html[data-samundar-theme="light"] .web-nav,html[data-samundar-theme="dark"] .web-nav{background:var(--sx-panel)!important;border-bottom-color:var(--sx-border)!important}
html[data-samundar-theme="light"] .web-nav a,html[data-samundar-theme="dark"] .web-nav a{color:var(--sx-heading)!important}
html[data-samundar-theme="light"] :is(.panel,.paath-item,.reader-local-actions,.sehaj-card,.pargaas-feature,.pargaas-primary,.pargaas-sehaj-hero,.sv1-feature,.hukam-reading-panel,.card),html[data-samundar-theme="dark"] :is(.panel,.paath-item,.reader-local-actions,.sehaj-card,.pargaas-feature,.pargaas-primary,.pargaas-sehaj-hero,.sv1-feature,.hukam-reading-panel,.card){background:var(--sx-panel)!important;color:var(--sx-text)!important;border-color:var(--sx-border)!important}
html[data-samundar-theme="light"] :is(h1,h2,h3,.sv1-blessing,.sv1-feature h2,.hukam-hero h1,.pargaas-heading h1,.paath-shell h1),html[data-samundar-theme="dark"] :is(h1,h2,h3,.sv1-blessing,.sv1-feature h2,.hukam-hero h1,.pargaas-heading h1,.paath-shell h1){color:var(--sx-heading)!important}
html[data-samundar-theme="light"] :is(p,.meta,.subtle,.paath-sub,.pargaas-intro,.sv1-page-lead),html[data-samundar-theme="dark"] :is(p,.meta,.subtle,.paath-sub,.pargaas-intro,.sv1-page-lead){color:var(--sx-text)}
html[data-samundar-theme="light"] :is(.sv1-footer,.sv1-discover,.sv1-discover-hero,.info-page,.pargaas-page),html[data-samundar-theme="dark"] :is(.sv1-footer,.sv1-discover,.sv1-discover-hero,.info-page,.pargaas-page){color:var(--sx-text)!important}
html[data-samundar-theme="light"] .hukam-lines :is(.g,.roman,.punjabi,.english),html[data-samundar-theme="dark"] .hukam-lines :is(.g,.roman,.punjabi,.english){color:var(--sx-text)!important}
html[data-samundar-theme="light"] .hukam-lines .g,html[data-samundar-theme="dark"] .hukam-lines .g{color:var(--sx-gurbani)!important}
html[data-samundar-theme="light"] .hukam-lines .roman,html[data-samundar-theme="dark"] .hukam-lines .roman{color:var(--sx-roman)!important}
html[data-samundar-theme="light"] .hukam-lines .punjabi,html[data-samundar-theme="dark"] .hukam-lines .punjabi{color:var(--sx-punjabi)!important}
html[data-samundar-theme="light"] .hukam-lines .english,html[data-samundar-theme="dark"] .hukam-lines .english{color:var(--sx-english)!important}
html[data-samundar-theme="light"] :is(.gurbani-line,.paath-verse .gurbani-line),html[data-samundar-theme="dark"] :is(.gurbani-line,.paath-verse .gurbani-line){color:var(--sx-gurbani)!important}
html[data-samundar-theme="light"] :is(.roman-line,.paath-verse .roman-line),html[data-samundar-theme="dark"] :is(.roman-line,.paath-verse .roman-line){color:var(--sx-roman)!important}
html[data-samundar-theme="light"] :is(.punjabi-line,.paath-verse .punjabi-line),html[data-samundar-theme="dark"] :is(.punjabi-line,.paath-verse .punjabi-line){color:var(--sx-punjabi)!important}
html[data-samundar-theme="light"] :is(.english-line,.paath-verse .english-line),html[data-samundar-theme="dark"] :is(.english-line,.paath-verse .english-line){color:var(--sx-english)!important}
html[data-samundar-theme="light"] :is(.line-main,.sv1-scripture-body),html[data-samundar-theme="dark"] :is(.line-main,.sv1-scripture-body){color:var(--sx-gurbani)!important}
html[data-samundar-theme="light"] .sx-menu-button,html[data-samundar-theme="dark"] .sx-menu-button{color:var(--sx-heading)!important;border-color:var(--sx-border)!important}
html[data-samundar-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),html[data-samundar-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]){background:var(--sx-panel);color:var(--sx-text);border-color:var(--sx-border)}
/* Reader-only typographic scale; original Unicode remains exactly what the source supplied. */
html[data-sx-gcustom="1"] :is(.verse-block,.paath-verse) .gurbani-line,html[data-sx-gcustom="1"] .hukam-lines .g{font-size:calc(clamp(1.35rem,2.8vw,1.85rem) * var(--sx-g-scale))!important;line-height:calc(1.8 * var(--sx-line-scale))!important;overflow-wrap:anywhere}
html[data-sx-acustom="1"] :is(.verse-block,.paath-verse) :is(.roman-line,.punjabi-line,.english-line),html[data-sx-acustom="1"] .hukam-lines :is(.roman,.punjabi,.english){font-size:calc(1rem * var(--sx-aux-scale))!important;overflow-wrap:anywhere}
html[data-sx-spcustom="1"] :is(.verse-block,.paath-verse) :is(.gurbani-line,.roman-line,.punjabi-line,.english-line),html[data-sx-spcustom="1"] .hukam-lines :is(.g,.roman,.punjabi,.english){line-height:calc(1.8 * var(--sx-line-scale))!important;}
/* Selected Boond Shabad only: understated identity marker in full Ang, never altering Gurmukhi. */
.boond-identified-verse{border-left:3px solid rgba(225,189,106,.8);padding-left:12px;border-radius:0 8px 8px 0;background:rgba(225,189,106,.05)}
.boond-read-ang{background:#e7c88f;color:#152c38;border:1px solid #e7c88f;border-radius:9px;padding:11px 20px;min-height:44px;cursor:pointer;font-weight:700}
.boond-return-wrap{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin:32px 0 75px}
/* Honor user's manual font zoom and accessibility preference */
@media(prefers-reduced-motion:reduce){.sx-menu-layer,.sx-reader-panel{animation:none!important;transition:none!important}}

/* Day theme must not create unreadable dark text inside remaining navy Home cards. */
html[data-samundar-theme="light"] body::before,html[data-samundar-theme="light"] body::after{opacity:.08}
html[data-samundar-theme="light"] :is(.line-button,#selection,#wordPanel,.search,.web-card,.notice){background:#fffcf5!important;border-color:#b9a47b!important;color:#27333a!important}
html[data-samundar-theme="light"] #query{color:#253039!important}
html[data-samundar-theme="light"] :is(.line-button .line-main,.line-ref,.search-language-note,.group-label){color:#5b421b!important}
html[data-samundar-theme="light"] :is(.line-button .line-sub,.info-page p,.sv1-feature p,.sv1-page-lead){color:#3f4c54!important}
html[data-samundar-theme="light"] :is(.mool,.waheguru,.sv1-scripture-body,.sv1-discover .discover-scripture-lines){color:#70572a!important}
html[data-samundar-theme="light"] main a:not(.action):not(.paath-link):not(.boond-return-link){text-decoration-thickness:1px;text-underline-offset:3px}
html[data-samundar-theme="light"] .sx-drawer{background:#f8f1e4;color:#29323b;border-color:#b8a27e}
html[data-samundar-theme="light"] .sx-drawer :is(h2,.sx-settings legend,.sx-settings-toggle,.sx-drawer-close),html[data-samundar-theme="light"] .sx-settings label{color:#332c25!important}
html[data-samundar-theme="light"] .sx-drawer :is(.sx-drawer-close,.sx-settings-toggle){border-color:#a58d62;color:#332c25!important}
html[data-samundar-theme="light"] .sx-drawer-nav a{color:#2c353d!important}
html[data-samundar-theme="light"] .sx-drawer-nav a[aria-current="page"]{background:#e7ddc8;color:#48330e!important}
html[data-samundar-theme="light"] .sx-reader-panel{background:#f9f2e6;color:#29323b}
html[data-samundar-theme="light"] .sx-reader-panel :is(button,a){background:#fffaf0;color:#393125;border-color:#b09b78}
html[data-samundar-theme="light"] .sx-reader-note{color:#3b4b50}
html[data-samundar-theme="light"] .sx-reader-toggle{background:#f1e3c7;color:#292e32;border-color:#97774a}
html[data-samundar-theme="dark"] .sx-reader-toggle{background:#252932}

/* Owner-approved Nov 15: menu trigger and menu drawer on the same LEFT side. */
.sx-nav > .sx-menu-button{order:0;flex:0 0 auto;margin-right:clamp(5px,1vw,13px)}
.sx-nav > .web-brand{order:1;flex:0 0 auto}
.sx-nav > .sx-primary-links{order:2}
.sx-nav > .sx-header-actions{order:3;margin-left:auto}
@media(max-width:800px){.sx-nav > .sx-menu-button{min-width:42px}.sx-nav .sx-header-actions{gap:7px}}
/* One-tap Stop / Back / Home visible without scrolling to the top of a long Ang. */
.sx-reader-quickbar{display:flex;flex-wrap:nowrap;align-items:center;gap:5px;max-width:calc(100vw - 20px);padding:5px 6px;border-radius:15px;background:#153344;border:1px solid rgba(231,197,141,.8);box-shadow:0 6px 21px rgba(0,0,0,.35)}
.sx-reader-quickbar button{white-space:nowrap;padding:10px 12px;min-height:44px;border-radius:10px;border:1px solid rgba(225,193,137,.52);background:#284656;color:#ffdfab;font:700 .78rem system-ui,sans-serif;cursor:pointer}
.sx-reader-quickbar button:focus-visible{outline:3px solid #ffdba0;outline-offset:2px}
.sx-reader-tools{gap:6px}
.sx-reader-toggle{align-self:flex-start;padding:7px 12px;min-height:38px}
body:has(>.smart-reader-dock:not([hidden])) .sx-reader-tools{bottom:calc(96px + env(safe-area-inset-bottom,0px))}
body:has(>.smart-reader-dock:not([hidden])){padding-bottom:calc(205px + env(safe-area-inset-bottom,0px))}
@media(max-width:500px){.sx-reader-tools{left:8px;bottom:calc(12px + env(safe-area-inset-bottom,0px))}.sx-reader-quickbar button{font-size:.75rem;padding:8px 10px}}
/* Legal/contact footer belongs AFTER copyright & Privacy, not mid-Shabad. */
.sv1-footer .sx-legal-tail{max-width:740px;margin:23px auto 4px;padding:17px 10px 4px;border-top:1px solid rgba(228,194,132,.3);color:#adc1cc;font:400 .75rem/1.75 system-ui,sans-serif;text-align:center}
.sv1-footer .sx-legal-tail p{margin:4px 0;color:inherit}
.sv1-footer .sx-legal-tail a{color:#ddc391;text-underline-offset:3px}

/* Approved always-on Reader navigation: desktop lower-right, mobile bottom-centre.
   The controls are independent of the automatic-scroller's Start/Stop state. */
@media (min-width:701px){body.sx-reader-page .sx-reader-tools{left:auto;right:clamp(10px,1.25vw,20px);align-items:flex-end;bottom:calc(14px + env(safe-area-inset-bottom,0px))}
body.sx-reader-page:has(>.smart-reader-dock:not([hidden])) .sx-reader-tools{bottom:calc(95px + env(safe-area-inset-bottom,0px))}}
@media (max-width:700px){body.sx-reader-page .sx-reader-tools{left:50%;right:auto;transform:translateX(-50%);align-items:center;bottom:calc(9px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 14px)}
body.sx-reader-page .sx-reader-quickbar{width:max-content;max-width:calc(100vw - 14px);justify-content:center}
body.sx-reader-page .sx-reader-panel{max-height:45vh;overflow:auto}
body.sx-reader-page:has(>.smart-reader-dock:not([hidden])) .sx-reader-tools{bottom:calc(95px + env(safe-area-inset-bottom,0px))}}
body.sx-reader-page main{padding-bottom:calc(180px + env(safe-area-inset-bottom,0px))!important;scroll-padding-bottom:200px}
body.sx-reader-page :is(.verse-block,.paath-verse){scroll-margin-bottom:200px}
@media (max-width:390px){.sx-reader-quickbar button{padding:8px 8px!important;font-size:.69rem!important}}
