/* Look follows sleepcyclecenters.com: Montserrat, heavy uppercase headings, cream page, navy + mid-blue
   bands, square gold buttons with navy text. Palette and type only — no logo, imagery or copy. */
:root {
  --navy: #0e314c; --navy-2: #2773ba; --sky: #2ea3f2; --gold: #f8ab1f; --gold-dark: #e09610; --gold-soft: #fdf0d3;
  --ink: #181d27; --muted: #4b5563; --line: #e4e2da; --bg: #fefcf6; --card: #ffffff;
  --ok: #1f7a4d; --ok-soft: #e4f4ec; --warn: #8a5a00; --warn-soft: #fff4dc; --bad: #b3261e; --bad-soft: #fdecea;
  --radius: 2px; --shadow: 0 1px 2px rgba(14, 49, 76, .08), 0 6px 18px rgba(14, 49, 76, .07);
  font-family: Montserrat, Helvetica, Arial, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin: 0; background: var(--bg); line-height: 1.6; font-size: 17px; overflow-x: clip; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.15; color: var(--navy); margin: 0 0 .5em; font-weight: 900; }
h1 { font-size: 2.2rem; text-transform: uppercase; } h2 { font-size: 1.5rem; text-transform: uppercase; } h3 { font-size: 1.12rem; font-weight: 800; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
main:focus, main:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }

/* top bar: white, navy links, gold call to action */
header.top { background: #fff; color: var(--navy); box-shadow: 0 2px 10px rgba(14, 49, 76, .08); position: relative; z-index: 5; }
.top .bar { max-width: 1180px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { color: var(--navy); text-decoration: none; font-weight: 900; letter-spacing: .14em; font-size: 1.5rem; line-height: 1.1; }
.brand::after { content: ""; display: block; width: 34px; height: 4px; background: var(--gold); margin-top: 4px; }
.brand small { display: block; letter-spacing: .04em; font-weight: 500; font-size: .7rem; color: var(--navy-2); text-transform: uppercase; }
.top nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.top nav a, .top nav button { color: var(--navy); text-decoration: none; padding: 8px 12px; font: inherit; font-size: .9rem; font-weight: 600; text-transform: uppercase; background: none; border: 0; cursor: pointer; border-bottom: 3px solid transparent; }
.top nav a:hover, .top nav button:hover { color: var(--navy-2); }
.top nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.top nav a.btn { border-bottom: 1px solid var(--gold); margin-left: 6px; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 16px 64px; }
footer.site { text-align: center; color: #d6e2ee; background: var(--navy); font-size: .85rem; padding: 28px 16px 36px; }
footer.site a { color: #fff; }

/* hero: full-width blue band with a navy wash, centred heavy uppercase heading */
.hero { background: linear-gradient(180deg, rgba(14, 49, 76, .88) 0%, rgba(14, 49, 76, .72) 100%), var(--navy-2); color: #fff;
  margin: -28px calc(50% - 50vw) 36px; padding: 72px max(16px, calc(50vw - 590px)); text-align: center; }
.hero h1 { color: #fff; font-size: 3rem; max-width: 900px; margin: 0 auto .4em; letter-spacing: .01em; }
.hero p { color: #e6eef6; max-width: 720px; margin: 0 auto 1em; font-size: 1.1rem; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; justify-content: center; }
.band-title { text-align: center; margin: 8px 0 24px; }
.band-title::after { content: ""; display: block; width: 60px; height: 4px; background: var(--gold); margin: 12px auto 0; }

/* cards + grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.course-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; border-top: 5px solid var(--navy-2); }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(14, 49, 76, .14); border-top-color: var(--gold); }
.course-card h3 { margin: 0; }
.course-card > .pill { align-self: flex-start; }
.course-card .meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 2px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #e8f0f8; color: var(--navy); }
.pill.gold { background: var(--gold-soft); color: #6b4700; } .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); }

/* buttons: square, uppercase, gold with navy text (the primary everywhere) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 0; border: 1px solid var(--gold);
  background: var(--gold); color: var(--navy); font: inherit; font-size: .95rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  cursor: pointer; text-decoration: none; min-height: 44px; box-shadow: 0 2px 0 rgba(14, 49, 76, .25); }
.btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); } .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); box-shadow: none; } .btn.ghost:hover { background: var(--navy); color: #fff; }
.btn.light { background: transparent; color: #fff; border-color: #fff; box-shadow: none; } .btn.light:hover { background: rgba(255,255,255,.15); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); box-shadow: none; }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: .8rem; }
form.stack, .stack { display: grid; gap: 14px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
label .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #c9cfd6; border-radius: 0; background: #fff; width: 100%; min-height: 44px; }
textarea { min-height: 120px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.narrow { max-width: 460px; margin: 0 auto; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.notice { padding: 12px 14px; border-radius: 0; border-left-width: 4px !important; background: #eef3fb; border: 1px solid #d3def0; }
.notice.ok { background: var(--ok-soft); border-color: #bfe3cf; } .notice.warn { background: var(--warn-soft); border-color: #f0d9a6; }
.notice.bad { background: var(--bad-soft); border-color: #f2c4c0; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--navy); }

/* course page */
.course-head { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.outline { list-style: none; padding: 0; margin: 0; }
.outline li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.outline .sec { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 14px; border: 0; }
.kind { width: 28px; height: 28px; border-radius: 2px; background: #eef1f6; display: inline-grid; place-items: center; font-size: .9rem; flex: none; }

/* learn layout */
.learn { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.learn aside { position: sticky; top: 12px; }
.learn aside .outline a { color: inherit; text-decoration: none; display: flex; gap: 10px; align-items: center; width: 100%; padding: 4px 6px; border-radius: 2px; }
.learn aside .outline a[aria-current="page"] { background: var(--gold-soft); }
.learn aside .outline li { padding: 4px 0; }
.done-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c9d0db; flex: none; display: inline-grid; place-items: center; font-size: .7rem; }
.done-dot.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.progress { height: 8px; background: #e7ebf2; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); transition: width .3s; }
video { width: 100%; border-radius: 2px; background: #000; max-height: 70vh; }
iframe.pdf { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 2px; }
.reading { font-size: 1.05rem; max-width: 760px; }
.reading h1, .reading h2, .reading h3 { margin-top: 1.2em; }
.q { border: 1px solid var(--line); border-radius: 2px; padding: 14px; margin-bottom: 12px; background: #fff; }
.q legend { font-weight: 600; padding: 0 4px; }
.q .opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; font-weight: 400; }
.q.right { border-color: #9fd4b7; background: var(--ok-soft); } .q.wrong { border-color: #f0b7b2; background: var(--bad-soft); }
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale label { display: inline-flex; flex-direction: row; gap: 4px; align-items: center; border: 1px solid #c9d0db; padding: 6px 10px; border-radius: 2px; font-weight: 400; }

/* admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 700; text-transform: uppercase; font-size: .85rem; }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.lesson-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; margin-bottom: 8px; }
.lesson-row .grow { flex: 1 1 200px; min-width: 0; }
.qedit { border: 1px solid var(--line); border-radius: 2px; padding: 12px; margin-bottom: 10px; background: #fcfcfd; display: grid; gap: 8px; }
.qedit .choice { display: flex; gap: 8px; align-items: center; }
.stat { font-size: 1.8rem; font-weight: 800; color: var(--navy); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 2px; z-index: 100; max-width: calc(100% - 32px); }
dialog { border: 0; border-radius: 2px; padding: 0; max-width: min(760px, calc(100% - 32px)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 20, 40, .45); }
dialog .dlg { padding: 22px; max-height: 85vh; overflow-y: auto; }

@media (max-width: 860px) {
  .course-head, .learn, .two-col { grid-template-columns: 1fr; }
  .learn aside { position: static; }
  .hero { padding: 48px 16px; } .hero h1 { font-size: 2rem; }
}
