/* Skylar Learning: shared styles. Brand: Montserrat; lime #5be234, green #16b021, emerald #008833 on ink #1b1c1e. */
:root {
  --lime: #5be234; --green: #16b021; --emerald: #008833; --ink: #1b1c1e; --ink-2: #2b2d30;
  --steel: #5f6368; --mute: #82858a; --silver: #c9cccf; --line: #e7e8e5; --mist: #f4f5f2; --paper: #fff;
  --bear: #d93a3a; --warn-bg: #fff8e6; --warn-line: #f0d48a; --warn-text: #5b4a12; --warn-strong: #3e3208;
  /* Surfaces: panel = cards and inputs; inv = inverted buttons and tags; band = sections that stay dark in both themes. */
  --panel: #fff; --head-bg: rgba(255, 255, 255, .92); --inv-bg: #1b1c1e; --inv-fg: #fff; --band: #121313; --band-2: #1b1c1e;
  --red-text: #9b2727; --tint-red: #fdeeee; --tint-green: #e8f8e4; --tint-green-2: #f3fbef; --tint-green-3: #f6fbf3;
  --ok-bg: #effaec; --ok-line: #bfe5b5; --ok-text: #1f4d17; --ok-strong: #173d10; --hl: #fff3c4;
  --shadow-lg: 0 20px 50px rgba(27, 28, 30, .1); color-scheme: light;
  --grad: linear-gradient(135deg, var(--lime), var(--green) 48%, var(--emerald));
  --font: Montserrat, "Segoe UI", Arial, sans-serif;
  --radius: 14px; --shadow: 0 1px 2px rgba(27, 28, 30, .05), 0 8px 24px rgba(27, 28, 30, .06);
  --wrap: 1180px;
}

/* Night mode. The theme is set on <html data-theme> before the page draws (see tools/build.mjs). */
:root[data-theme="dark"] {
  --emerald: #3ccf5d; --ink: #e8ece9; --ink-2: #cbd2ce;
  --steel: #a2aca7; --mute: #7f8a85; --silver: #3a4440; --line: #252e2a; --mist: #171d1b; --paper: #0d100f;
  --panel: #131816; --head-bg: rgba(13, 16, 15, .86);
  --inv-bg: #e8ece9; --inv-fg: #0d100f; --band: #070908; --band-2: #171d1b;
  --bear: #ff6b6b; --red-text: #ff9a91; --tint-red: rgba(255, 107, 107, .13);
  --tint-green: rgba(60, 207, 93, .14); --tint-green-2: #121c16; --tint-green-3: #111a15;
  --warn-bg: rgba(240, 212, 138, .07); --warn-line: #584a1d; --warn-text: #e6d39d; --warn-strong: #f6e4b1;
  --ok-bg: rgba(60, 207, 93, .08); --ok-line: #2c5527; --ok-text: #b4e2ab; --ok-strong: #d3f1cc;
  --hl: rgba(255, 214, 0, .22);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
:root[data-theme="dark"] .logo .on-light, :root:not([data-theme="dark"]) .logo .on-dark { display: none }
* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--font); -webkit-font-smoothing: antialiased }
input:not([type=radio]):not([type=checkbox]), textarea, select { background-color: var(--panel); color: var(--ink) }
img { max-width: 100%; display: block }
a { color: inherit }
button, input, select, textarea { font: inherit; color: inherit }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em }
p { margin: 0 }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--emerald) }
.muted { color: var(--steel) }
.small { font-size: 13px }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s }
.btn:hover { transform: translateY(-1px) }
.btn-primary { background: var(--inv-bg); color: var(--inv-fg) }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(27, 28, 30, .2) }
.btn-primary .arrow { color: var(--lime) }
.btn-green { background: var(--green); color: #fff }
.btn-green:hover { background: var(--emerald) }
.btn-ghost { background: var(--panel); border-color: var(--silver); color: var(--ink) }
.btn-ghost:hover { border-color: var(--ink) }
.btn-sm { padding: 8px 14px; font-size: 13px }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--head-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 68px; max-width: 1340px }
.logo { display: block; width: 172px; flex: none; line-height: 0 }
.logo img { width: 100%; height: auto }
.nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin-left: auto; height: 100% }
/* Menu items sit on one line; the current page gets a green underline along the header's bottom edge. */
.nav a { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; white-space: nowrap; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: -.005em; text-decoration: none; color: var(--steel); transition: color .15s }
.nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--green); transform: scaleX(0); transition: transform .2s }
.nav a:hover { color: var(--ink) }
.nav a[aria-current="page"] { color: var(--ink) }
.nav a[aria-current="page"]::after { transform: scaleX(1) }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap }
.credit-pill .coin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px }
.acct { position: relative; display: flex; align-items: center; gap: 8px; flex: none }
.acct:empty { display: none }
.acct-chip { border: 0; cursor: pointer; font-family: inherit; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-fg); font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--green) }
.acct-chip.err { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px #d9a400 }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; font-weight: 700 }
@media (max-width: 1200px) {
  .menu-btn { display: block }
  /* Collapsed: a full-width dropdown list under the header. */
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; height: auto; flex-direction: column; align-items: stretch; gap: 2px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 16px 16px }
  .nav.open { display: flex }
  .nav a { height: auto; padding: 13px 14px; border-radius: 10px; font-size: 15px }
  .nav a::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; transform: scaleY(0) }
  .nav a[aria-current="page"] { background: var(--mist) }
  .nav a[aria-current="page"]::after { transform: scaleY(1) }
  .nav a:hover { background: var(--mist) }
  .site-head .credit-pill { order: 2 }
  .site-head .acct { order: 3 }
  .site-head .wrap { gap: 12px; padding: 0 16px }
  .logo { width: 140px }
}
@media (max-width: 480px) {
  .logo { width: 118px }
  .credit-pill { padding: 5px 9px 5px 5px }
  .credit-pill .lbl { display: none }
}
html, body { overflow-x: clip }

/* Footer */
.site-foot { margin-top: 96px; background: var(--band); color: #c9cccf; font-size: 13px }
.site-foot .wrap { padding-top: 56px; padding-bottom: 36px }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px }
.foot-logo { width: 200px; line-height: 0 }
.foot-logo img { width: 100%; height: auto }
.site-foot h4 { color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.site-foot a { text-decoration: none; color: #c9cccf }
.site-foot a:hover { color: var(--lime) }
.foot-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid #2b2d30; color: #82858a; font-size: 12px; line-height: 1.7; display: grid; gap: 10px }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr } .foot-grid > :first-child { grid-column: 1 / -1 } }

/* Sections and cards */
.section { padding: 88px 0 }
.section-tight { padding: 56px 0 }
.section-head { max-width: 720px; margin-bottom: 40px }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 10px 0 14px }
.section-head p { color: var(--steel); font-size: 16px }
.bg-mist { background: var(--mist) }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px }
.card-link { display: block; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s }
.card-link:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px) }
.grid { display: grid; gap: 18px }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
@media (max-width: 980px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr) } .section { padding: 64px 0 } .wrap { padding: 0 16px } }

/* Progress */
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--mist); color: var(--steel) }
.tag-green { background: var(--tint-green); color: var(--emerald) }
.tag-dark { background: var(--inv-bg); color: var(--inv-fg) }
.check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--silver); font-size: 11px; color: transparent; flex: none }
.check.done { background: var(--green); border-color: var(--green); color: #fff }

/* Notices */
.notice { border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--warn-text) }
.notice b { color: var(--warn-strong) }
.notice-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-text) }
.notice-ok b { color: var(--ok-strong) }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; background: #1b1c1e; color: #fff; border: 1px solid #2b2d30; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: .25s }
.toast.show { opacity: 1; transform: translate(-50%, 0) }
.toast b { color: var(--lime) }

/* Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--mute); margin-bottom: 14px }
.crumbs a { text-decoration: none; color: var(--steel) }
.crumbs a:hover { color: var(--emerald) }

/* Page hero (inner pages) */
.page-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--mist), var(--paper)) }
.page-hero h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; margin: 8px 0 12px }
.page-hero p { max-width: 720px; color: var(--steel); font-size: 16px }

/* Prose (legal, FAQ) */
.prose { max-width: 780px }
.prose h2 { font-size: 22px; margin: 40px 0 12px }
.prose h3 { font-size: 17px; margin: 24px 0 8px }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 12px }
.prose ul, .prose ol { padding-left: 22px }
.prose .placeholder { background: var(--hl); padding: 0 4px; border-radius: 3px }
details.faq { border-bottom: 1px solid var(--line); padding: 18px 0 }
details.faq summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px }
details.faq summary::after { content: '+'; color: var(--green); font-size: 20px; line-height: 1 }
details.faq[open] summary::after { content: '–' }
details.faq p { margin-top: 10px; color: var(--steel) }

/* Day / night toggle */
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s }
.theme-btn:hover { border-color: var(--green); transform: rotate(-12deg) }
@media (max-width: 1200px) { .site-head .theme-btn { order: 1 } }
.nav-theme { display: none }
@media (max-width: 1200px) {
  .menu-btn { display: grid; place-items: center; width: 38px; height: 36px; padding: 0; color: var(--ink) }
  .nav-theme { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--mist); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer }
}
@media (max-width: 480px) {
  .site-head .theme-btn { display: none }
  .site-head .wrap { gap: 8px }
}

/* Account menu (avatar dropdown) */
.acct-pop { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 248px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); display: grid }
.acct-pop[hidden] { display: none }
.acct-who { display: grid; gap: 2px; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line) }
.acct-who b { font-size: 14px }
.acct-who span { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.acct-who small { font-size: 11px; color: var(--emerald); font-weight: 600 }
.acct-who small.err { color: #b88600 }
.acct-pop a, .acct-pop button { display: flex; justify-content: space-between; align-items: center; gap: 10px; white-space: nowrap; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer }
.acct-pop a:hover, .acct-pop button:hover, .acct-pop a[aria-current="page"] { background: var(--mist) }
.acct-pop em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em }
.acct-pop [data-signout] { color: var(--red-text); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px }
