/* ------------------------------------------------------------------
   Rise-style responsive course shell
   Mirrors Rise 360's layout: collapsible lesson sidebar with progress,
   a cover page, and lessons built from stacked "blocks" (text,
   statement, labeled graphic, process, accordion, tabs, flashcards,
   knowledge check, scenario, checklist) gated by Continue dividers.
   ------------------------------------------------------------------ */
:root {
  --ink: #16202e; --muted: #5d6879; --line: #e4e7ec; --bg: #ffffff; --soft: #f5f6f8;
  --brand: #0f6e66; --brand-2: #e2a33b; --brand-soft: #e6f2f0; --bad: #c2412d; --good: #2e7d55;
  --side: 300px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 17px; line-height: 1.65; }
button { font: inherit; cursor: pointer; }
a { color: var(--brand); }

/* sidebar */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; transition: transform .3s ease; }
.side-head { padding: 26px 24px 20px; border-bottom: 1px solid var(--line); }
.side-head .back { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 14px; }
.side-head h1 { font-family: Fraunces, serif; font-size: 22px; line-height: 1.2; margin: 0 0 16px; }
.prog { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.prog-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.prog-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .5s ease; }
.lessons { list-style: none; margin: 0; padding: 10px 0; overflow-y: auto; flex: 1; }
.lessons button { width: 100%; text-align: left; background: none; border: 0; padding: 14px 24px; display: flex; gap: 14px; align-items: center; font-size: 15px; color: var(--ink); line-height: 1.35; }
.lessons button:hover { background: var(--soft); }
.lessons li.cur button { background: var(--brand-soft); box-shadow: inset 4px 0 0 var(--brand); font-weight: 600; }
.ring { width: 22px; height: 22px; flex: none; }
.ring circle { fill: none; stroke-width: 3; }
.ring .bgc { stroke: var(--line); }
.ring .fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .5s ease; transform: rotate(-90deg); transform-origin: center; }
.lessons li.done .ring .fg { stroke: var(--brand); }
.lessons small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 30; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.08); }

main { margin-left: var(--side); min-height: 100vh; }

/* cover */
.cover { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; }
.cover-hero { position: relative; padding: 90px 8vw 70px; color: #fff; background: var(--hero, #0f3d3a); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 62vh; }
.cover-hero svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-hero > * { position: relative; }
.cover-hero .eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #f6c86b; }
.cover-hero h2 { font-family: Fraunces, serif; font-size: clamp(40px, 6vw, 76px); line-height: 1; margin: 14px 0 18px; max-width: 760px; }
.cover-hero p { font-size: 19px; max-width: 580px; margin: 0 0 30px; color: #d8e8e5; }
.start { align-self: flex-start; background: var(--brand-2); color: #241a05; border: 0; border-radius: 99px; padding: 15px 30px; font-weight: 700; font-size: 16px; }
.start:hover { filter: brightness(1.05); }
.cover-body { padding: 50px 8vw 70px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; max-width: 1200px; }
.cover-body h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.cover-body ol { margin: 0; padding: 0; list-style: none; }
.cover-body ol li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.cover-body ol li b { color: var(--brand); font-family: Fraunces, serif; }
.meta div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta span { color: var(--muted); }

/* lesson */
.lesson-head { background: var(--soft); padding: 80px 24px 56px; text-align: center; }
.lesson-head .num { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.lesson-head h2 { font-family: Fraunces, serif; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; margin: 12px auto 0; max-width: 780px; }
.blocks { padding: 30px 0 60px; }
.block { max-width: 760px; margin: 0 auto; padding: 34px 24px; animation: blockIn .5s ease both; }
.block.wide { max-width: 1000px; }
@keyframes blockIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.block h3 { font-family: Fraunces, serif; font-size: 28px; line-height: 1.2; margin: 0 0 14px; }
.block p { margin: 0 0 14px; }
.statement { border-top: 3px solid var(--brand); border-bottom: 3px solid var(--brand); padding: 34px 0; font-family: Fraunces, serif; font-size: 28px; line-height: 1.35; text-align: center; }
.statement cite { display: block; margin-top: 16px; font-family: Inter, sans-serif; font-style: normal; font-size: 14px; color: var(--muted); }
.note { background: var(--brand-soft); border-radius: 12px; padding: 20px 24px; display: flex; gap: 16px; }
.note .ic { font-size: 22px; }

/* continue gate */
.gate { max-width: 760px; margin: 0 auto; padding: 30px 24px; display: flex; align-items: center; gap: 18px; }
.gate::before, .gate::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gate button { background: var(--brand); color: #fff; border: 0; border-radius: 99px; padding: 12px 28px; font-weight: 600; }
.gate button:disabled { background: #b9c2cc; cursor: not-allowed; }
.gate .why { position: absolute; }

/* labeled graphic */
.lg { position: relative; border-radius: 14px; overflow: hidden; background: #eef1ec; }
.lg svg { display: block; width: 100%; height: auto; }
.pin { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid #fff; background: var(--brand); color: #fff; font-weight: 700; font-size: 18px; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .2s; padding: 0; }
.pin:hover { transform: scale(1.12); }
.pin.seen { background: #6c7a89; }
.pin.open { background: var(--brand-2); color: #241a05; transform: rotate(45deg); }
.pop { position: absolute; width: 270px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 16px 40px rgba(0,0,0,.2); font-size: 14.5px; line-height: 1.5; z-index: 3; animation: blockIn .25s ease both; }
.pop b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.lg-count { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* process */
.process { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.process-stage { padding: 40px 48px; min-height: 230px; }
.process-stage .stepnum { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.process-stage h4 { font-family: Fraunces, serif; font-size: 26px; margin: 8px 0 10px; }
.process-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--soft); }
.process-nav button { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 8px 18px; font-weight: 600; font-size: 14px; }
.process-nav button:disabled { opacity: .4; cursor: not-allowed; }
.pdots { display: flex; gap: 8px; }
.pdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.pdots i.on { background: var(--brand); }

/* accordion */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; padding: 18px 4px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--brand); transition: transform .2s; }
.acc details[open] summary::after { transform: rotate(45deg); }
.acc details div { padding: 0 4px 18px; color: var(--muted); }

/* tabs */
.tabs-nav { display: flex; border-bottom: 2px solid var(--line); gap: 6px; flex-wrap: wrap; }
.tabs-nav button { background: none; border: 0; padding: 12px 18px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs-nav button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs-panel { padding: 24px 4px 4px; }
.tabs-panel ul { margin: 0; padding-left: 20px; }
.tabs-panel li { margin-bottom: 8px; }

/* flashcards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.fc { perspective: 1000px; height: 200px; background: none; border: 0; padding: 0; }
.fc-in { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.fc.flip .fc-in { transform: rotateY(180deg); }
.fc-f, .fc-b { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; display: grid; place-items: center; padding: 20px; text-align: center; }
.fc-f { background: var(--brand); color: #fff; font-family: Fraunces, serif; font-size: 24px; font-weight: 600; }
.fc-f small { position: absolute; bottom: 14px; font-family: Inter, sans-serif; font-size: 12px; font-weight: 500; opacity: .7; }
.fc-b { background: #fff; border: 1px solid var(--line); transform: rotateY(180deg); font-size: 15px; line-height: 1.5; color: var(--ink); }

/* knowledge check */
.kc { border: 1px solid var(--line); border-radius: 14px; padding: 30px 32px; }
.kc .q-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.kc h4 { font-size: 20px; line-height: 1.45; margin: 10px 0 18px; }
.opt { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; line-height: 1.45; }
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b9c2cc; flex: none; margin-top: 2px; }
.opt.sel i { border: 6px solid var(--brand); }
.opt.right { border-color: var(--good); background: #eef8f2; }
.opt.wrong { border-color: var(--bad); background: #fdf0ed; }
.kc .submit { margin-top: 10px; background: var(--brand); color: #fff; border: 0; border-radius: 99px; padding: 11px 26px; font-weight: 600; }
.kc .submit:disabled { background: #b9c2cc; cursor: not-allowed; }
.kc-fb { margin-top: 18px; padding: 16px 18px; border-radius: 10px; font-size: 15.5px; animation: blockIn .3s ease both; }
.kc-fb.good { background: #eef8f2; } .kc-fb.bad { background: #fdf0ed; }

/* scenario block */
.scn { border-radius: 16px; background: var(--scn, #13302d); color: #fff; padding: 34px; }
.scn-row { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.char { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font-family: Fraunces, serif; font-size: 26px; flex: none; }
.scn-say { background: rgba(255,255,255,.1); border-radius: 4px 16px 16px 16px; padding: 16px 20px; line-height: 1.5; }
.scn-say small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.scn-opts { display: grid; gap: 10px; }
.scn-opts button { text-align: left; background: #fff; color: var(--ink); border: 0; border-radius: 10px; padding: 14px 18px; line-height: 1.45; }
.scn-opts button:hover { background: #fdf6e7; }
.scn-fb { margin-top: 6px; }
.scn-fb .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.scn-fb .tag.good { background: #2e7d55; } .scn-fb .tag.bad { background: #c2412d; }
.scn-fb button { margin-top: 12px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 99px; padding: 8px 18px; }

/* checklist + timeline */
.check { list-style: none; margin: 0; padding: 0; }
.check li label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 3px; flex: none; }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }
.phase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.phase > div { border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.phase h4 { font-family: Fraunces, serif; font-size: 22px; margin: 0 0 4px; color: var(--brand); }
.phase h4 + small { color: var(--muted); font-size: 13.5px; }
.path { position: relative; padding-left: 34px; }
.path::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.path > div { position: relative; padding: 4px 0 22px; }
.path > div::before { content: ""; position: absolute; left: -29px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.path > div.here::before { background: var(--brand-2); border-color: var(--brand-2); box-shadow: 0 0 0 5px rgba(226,163,59,.25); }
.path b { display: block; }
.path span { color: var(--muted); font-size: 15px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); margin-left: 6px; vertical-align: 2px; }

.lesson-foot { max-width: 760px; margin: 0 auto; padding: 20px 24px 90px; display: flex; justify-content: center; }
.next-lesson { display: flex; align-items: center; gap: 16px; text-align: left; background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: 18px 26px; width: 100%; max-width: 520px; }
.next-lesson small { display: block; opacity: .7; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.next-lesson span { font-weight: 600; font-size: 17px; }
.next-lesson em { margin-left: auto; font-style: normal; font-size: 22px; }
.complete { text-align: center; padding: 50px 24px; }
.complete .big { font-size: 64px; }

/* sequence (sorting) activity */
.seq { border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; }
.seq ol { list-style: none; margin: 0 0 16px; padding: 0; counter-reset: q; }
.seq li { counter-increment: q; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .2s, background .2s; }
.seq li::before { content: counter(q); width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--brand); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.seq li span { flex: 1; line-height: 1.4; }
.seq li button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 15px; padding: 0; }
.seq li button:disabled { opacity: .3; cursor: not-allowed; }
.seq li.right { border-color: var(--good); background: #eef8f2; }
.seq li.wrong { border-color: var(--bad); background: #fdf0ed; }
.seq .submit { background: var(--brand); color: #fff; border: 0; border-radius: 99px; padding: 11px 26px; font-weight: 600; }
.seq-fb { margin-top: 14px; padding: 14px 16px; border-radius: 10px; font-size: 15.5px; }
.seq-fb.good { background: #eef8f2; } .seq-fb.bad { background: #fdf0ed; }

/* resource link card */
.res-card { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.res-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.res-card .ic { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 24px; flex: none; }
.res-card b { display: block; }
.res-card span { color: var(--muted); font-size: 15px; }
.res-card em { margin-left: auto; font-style: normal; color: var(--brand); font-weight: 600; white-space: nowrap; }

@media (max-width: 900px) {
  .side { transform: translateX(-100%); box-shadow: 0 0 60px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: grid; place-items: center; }
  main { margin-left: 0; }
  .cover-body { grid-template-columns: 1fr; gap: 30px; }
  .phase { grid-template-columns: 1fr; }
  .process-stage { padding: 28px 24px; }
  .kc, .scn { padding: 24px 20px; }
  .pop { width: 220px; }
  .statement { font-size: 23px; }
}
