/* The app (dashboard, study, account, owner pages) in the public site's look: same full-width header and nav,
   same deep green background, DM Sans for text, Playfair Display for headings, mint primary buttons.
   Loaded last in index.html, so it wins over the app's older boxed-frame styles. The white "daylight" option
   in Account settings still works; only the default dark look is matched to the public pages. */

/* ---- Fonts: same as the public pages ---- */
:root{--f-ui:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;--f-card:'Playfair Display',Georgia,serif}
body{font-family:var(--f-ui);-webkit-font-smoothing:antialiased}
.welcome, .brand .welcome{font-family:'Playfair Display',Georgia,serif;font-weight:700;letter-spacing:-1px}
.welcome .nm{font-style:italic;font-weight:500;color:#f0adbd}

/* ---- Layout: full width like the public pages (no boxed frame) ---- */
body{padding:0}
.wrap{max-width:none;width:100%;margin:0;padding:0 0 60px;background:transparent;border:0;border-radius:0;box-shadow:none}
.pagehead{width:100%;max-width:1160px;margin:0 auto;padding:34px 28px 4px;box-sizing:border-box}
.wrap > .screen, .wrap > .notice{max-width:760px}
#study{padding:0 20px;box-sizing:border-box}

/* ---- Header: same bar, logo and links as the public pages ---- */
.topbar{position:sticky;top:0;z-index:40;margin:0;min-height:69px;box-sizing:border-box;
  padding:0 max(1.25rem, calc((100% - 90rem) / 2)); /* same width as the public header (.s26-bar-row) */border-bottom:1px solid #ffffff18;gap:22px}
:root[data-bg="dark"] .topbar{background:#0a1713ed;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
.logo .logo-img{height:123px;margin:2px 0}
.topnav{gap:18px}
.sitelinks{display:flex;align-items:center;gap:25px;margin-right:6px;font:400 13px var(--f-ui);color:#d6dfd7}
:root:not([data-bg="dark"]) .sitelinks{color:var(--on-page)}
.sitelinks > a, .sl-top{color:inherit;text-decoration:none;white-space:nowrap;background:none;border:0;padding:6px 0;font:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.sitelinks > a:hover, .sl-top:hover, .sl-drop:focus-within > .sl-top, .sl-top[aria-expanded="true"]{color:#f0adbd;text-decoration:none}
.sl-top span{font-size:9px}
.sl-drop{position:relative}
.sl-menu{position:absolute;left:-14px;top:100%;margin-top:10px;min-width:230px;background:#13241c;border:1px solid #2f4a3a;border-radius:12px;padding:6px;z-index:70;box-shadow:0 18px 40px #0007}
.sl-menu[hidden]{display:none}
.sl-menu::before{content:'';position:absolute;left:-20px;right:-20px;top:-16px;height:16px}   /* bridge over the gap under the button */
.sl-menu a{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:8px;color:#f8f6ef;text-decoration:none;font:600 14px var(--f-ui)}
.sl-menu a:hover{background:#1c3428;color:#f0adbd}
.sl-menu b{font:700 15px var(--f-ui)}.sl-menu small{font:500 12px var(--f-ui);color:#9fb3a6}
.sl-menu .soon{display:block;padding:8px 12px 10px;font:500 12px var(--f-ui);color:#7f958a;border-top:1px solid #2f4a3a;margin-top:4px}
.sl-top:focus-visible, .sitelinks > a:focus-visible{outline:2px solid #f0adbd;outline-offset:3px;border-radius:4px}
/* Signed out (log in / sign up): Log in + Sign up free, as on the public pages */
.topbar .sitelinks a.sl-login{color:#f0adbd;font-weight:700}
.topbar .sitelinks a.sl-signup{display:inline-flex;background:#a7dcb4;color:#143123;border-radius:12px;padding:14px 22px;font-weight:750;font-size:14px;line-height:1.3;opacity:1;filter:none}
.topbar .sitelinks a.sl-signup:hover{background:#c4eacb;color:#143123}
html.signed-out .topbar .mode{display:none}
html:not(.signed-out) .topbar .sitelinks a.sl-login{display:none}
/* Room for the study tools in the header: the site links step aside on narrower screens (they're in the ☰ / account menu) */
@media (max-width:1240px){html:not(.signed-out) .sitelinks{display:none}}
@media (max-width:1000px){.sitelinks{display:none}}
/* Phones and tablets: as on the public pages, ☰ at the right; signed out keeps Courses ▾ and Log in in the bar */
@media (max-width:1000px){
  .iconbtn{display:inline-flex;order:9;margin:0 0 0 4px;width:46px;height:46px;border:1px solid #ffffff33;border-radius:10px}
  .iconbtn::before{width:22px;height:22px}
  html.signed-out .sitelinks{display:flex;gap:14px;margin-right:0}
  html.signed-out .sitelinks > a:not(.sl-login):not(.sl-signup), html.signed-out .sl-drop[data-drop="about"]{display:none}
  .sl-menu{left:auto;right:-10px;max-width:calc(100vw - 24px)}   /* opens leftward so it stays on screen */
  .logo{margin:0 auto 0 0;flex-shrink:1;min-width:0}
  .logo .logo-img{max-width:100%;object-fit:contain;object-position:left center}
}
@media (max-width:760px){
  body{padding:0}
  .wrap{padding:0 10px 40px;gap:16px}
  .topbar{padding:0 12px;min-height:65px;gap:10px;margin:0 -10px}
  .logo .logo-img{height:91px;margin:2px 0}
  html:not(.signed-out) .logo .logo-img{height:70px}
  .pagehead{padding:16px 6px 0}
  #study{padding:0}
}
@media (max-width:600px){.topbar .sitelinks a.sl-signup{display:none}}
@media (max-width:420px){.logo .logo-img{height:70px}html:not(.signed-out) .logo .logo-img{height:58px}.iconbtn{width:42px;height:42px}}

/* ---- Colors: the public pages' deep green, cream, pink and mint ---- */
:root[data-bg="dark"]{
  --page:#0a1713;--frame:#0a1713;--frame-line:#2f4a3a;--hair:#ffffff18;--pill-line:#ffffff33;
  --on-page:#f8f6ef;--on-page-head:#f8f6ef;
  --bg:#10241e;--surface:#10241e;--ink:#f8f6ef;--forest:#f8f6ef;--muted:#b8c6bd;--line:#2f4a3a;
  --accent:#f0adbd;--rose-ink:#f0adbd;--accent-ink:#3a1f29;--accent-soft:#1c3428;
  --primary:#a7dcb4;--primary-edge:#a7dcb4;--primary-ink:#143123;
  --sage:#6a8a79;--sage-mid:#4a6b56;--sage-soft:transparent;--sage-edge:#6a8a79;--sage-hover:#ffffff0a;
  --field:#0d1f19;--quote:#10241e}
:root[data-bg="dark"] body{background:radial-gradient(ellipse at 84% 0%, #274836 0, transparent 44%) #0a1713 fixed;color:#f8f6ef}
:root[data-bg="dark"] .screen{background:#10241e;border-color:#2f4a3a}
/* Buttons: mint primary, outlined secondary (public .btn / .btn.secondary) */
:root[data-bg="dark"] .btn:not(#study *){border-radius:12px;font-weight:750}
:root[data-bg="dark"] .btn:not(.primary):not(#study *){background:transparent;border-color:#6a8a79;color:#eff7ee}
:root[data-bg="dark"] .btn:not(.primary):not(#study *):hover{border-color:#f0adbd;background:#ffffff0a}
:root[data-bg="dark"] .btn.primary:not(#study *){background:#a7dcb4;border-color:#a7dcb4;color:#143123}
:root[data-bg="dark"] .btn.primary:not(#study *):hover{background:#c4eacb;filter:none}
:root[data-bg="dark"] .screen h2, :root[data-bg="dark"] .screen h3{font-family:'Playfair Display',Georgia,serif}

.menu-site a[hidden]{display:none!important}
