/* COURSES — the member-facing design.
   A light ground with white cards floating on it, one red accent, and the
   progress always in sight. */

.dd-c, .dd-l {
    --red: #D9453F;
    --red-dark: #C13B35;
    --ink: #16181C;
    --mute: #6B7280;
    --line: #E6E8EC;
    --ground: #F0F2F5;
    --card: #FFFFFF;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);

    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    /* The app bar is fixed and 84px tall (64px on phones), so the page has to
       start below it or its first line sits under the logo. */
    padding: 108px 24px 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--ink);
    box-sizing: border-box;
}
.dd-c *, .dd-l * { box-sizing: border-box; }
.dd-c a, .dd-l a { text-decoration: none !important; }

/* The page's own ground, whatever the theme puts behind it. */
body.dd-course-page { background: var(--ground); }

.dd-c-back {
    display: inline-block; margin-bottom: 20px;
    color: var(--red) !important; font-size: 14.5px; font-weight: 600;
}
.dd-c-back:hover { color: var(--red-dark) !important; }

/* ── OVERVIEW ─────────────────────────────────────────────────────────── */

.dd-c-grid { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 34px; align-items: start; }

.dd-c-hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #DDE3EA; }
.dd-c-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; }

.dd-c-title { margin: 26px 0 0; font-size: 44px; line-height: 1.06; letter-spacing: -.033em; font-weight: 800; }

.dd-c-author { display: flex; align-items: center; gap: 11px; margin: 20px 0 4px; }
.dd-c-author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: block; }
.dd-c-author span { font-size: 15px; font-weight: 600; }

/* Tabs — the underline is the state, nothing else moves. */
.dd-c-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 24px 0 30px; }
.dd-c-tab {
    background: none; border: 0; padding: 0 0 13px; cursor: pointer;
    font-size: 16px; font-weight: 600; color: var(--mute);
    border-bottom: 2.5px solid transparent; margin-bottom: -1px;
    font-family: inherit;
}
.dd-c-tab.is-on { color: var(--red); border-bottom-color: var(--red); }

.dd-c-body { font-size: 17px; line-height: 1.68; color: #24272C; max-width: 68ch; }
.dd-c-body h2, .dd-c-body h3 { letter-spacing: -.02em; margin: 30px 0 10px; }
.dd-c-body p { margin: 0 0 18px; }
.dd-c-body ul { padding-left: 22px; margin: 0 0 18px; }
.dd-c-body li { margin-bottom: 9px; }

/* THE CARD THAT FOLLOWS YOU DOWN.
   Progress and the way in are the two things wanted at any moment, so they
   stay on screen rather than being scrolled past. */
.dd-c-side { position: sticky; top: 24px; display: flex; flex-direction: column; }
.dd-c-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.dd-c-cardtop { padding: 22px 22px 20px; }
.dd-c-prog { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; margin-bottom: 10px; }
.dd-c-prog .n { color: var(--mute); }
.dd-c-prog .p { font-weight: 700; }
.dd-c-bar { height: 6px; border-radius: 3px; background: #EDEFF2; overflow: hidden; margin-bottom: 20px; }
.dd-c-bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; transition: width .3s ease; }

.dd-c-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--red); color: #fff !important; border-radius: 11px;
    padding: 15px 20px; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
    transition: background .16s ease, transform .16s ease;
}
.dd-c-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

.dd-c-facts { list-style: none; margin: 0; padding: 8px 22px 20px; border-top: 1px solid var(--line); }
.dd-c-facts li { display: flex; align-items: center; gap: 13px; padding: 11px 0; font-size: 14.5px; }
.dd-c-facts .ic {
    flex: none; width: 30px; height: 30px; border-radius: 9px;
    background: #FDECEB; color: var(--red);
    display: grid; place-items: center;
}
.dd-c-facts .ic svg { width: 16px; height: 16px; display: block; }

/* Curriculum tab. */
.dd-c-mod { margin-bottom: 26px; }
.dd-c-modhead { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.dd-c-modnum {
    flex: 0 0 26px;
    width: 26px; height: 26px; aspect-ratio: 1; box-sizing: border-box;
    border-radius: 7px; background: var(--ink); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.dd-c-modtitle { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dd-c-rows { background: var(--card); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.dd-c-row { display: flex; align-items: center; gap: 13px; padding: 15px 17px; color: inherit; border-top: 1px solid var(--line); }
.dd-c-row:first-child { border-top: 0; }
.dd-c-row:hover { background: #F8F9FB; }
.dd-c-num {
    flex: 0 0 26px;
    width: 26px; height: 26px; aspect-ratio: 1; box-sizing: border-box;
    border-radius: 50%; border: 2px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--mute);
}
.dd-c-row.is-done .dd-c-num { background: var(--red); border-color: var(--red); color: #fff; }
.dd-c-row .t { flex: 1; font-size: 15.5px; font-weight: 550; }
.dd-c-row .s { font-size: 12.5px; color: var(--mute); }

/* ── LESSON ───────────────────────────────────────────────────────────── */

.dd-l-grid { display: grid; grid-template-columns: 348px minmax(0,1fr); gap: 28px; align-items: start; }
.dd-l-side { position: sticky; top: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.dd-l-prog { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.dd-l-pct { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.dd-l-pct span { font-size: 14px; font-weight: 600; color: var(--mute); margin-left: 6px; letter-spacing: 0; }
.dd-l-count { font-size: 13px; color: var(--mute); margin: 9px 0 0; }

.dd-l-lbl { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); padding: 16px 20px 6px; margin: 0; }
.dd-l-modhead { display: flex; align-items: center; gap: 12px; padding: 12px 20px 8px; }
/* The same box as the circle beside it, centred the same way. */
.dd-l-modnum {
    flex: 0 0 26px;
    width: 26px; height: 26px; aspect-ratio: 1; box-sizing: border-box;
    border-radius: 7px; background: var(--ink); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.dd-l-modname { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }

.dd-l-item { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: inherit; }
.dd-l-item:hover { background: #F8F9FB; }
/* A ROUND CIRCLE WITH THE NUMBER IN THE MIDDLE OF IT.
   Three things were stopping that. The flex basis was auto, so the box could be
   resized by its row; the border was 1.5px, which lands between device pixels
   and renders as a lumpy edge; and the line-height came from the theme, so the
   digit was centred in a line box taller than the circle and sat high. Fixed
   basis, whole-pixel border, and line-height:1 — with aspect-ratio as the
   guarantee that it stays round whatever else changes. */
.dd-l-item .n {
    flex: 0 0 26px;
    width: 26px; height: 26px; aspect-ratio: 1; box-sizing: border-box;
    border-radius: 50%; border: 2px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--mute);
}
.dd-l-item .t { font-size: 14px; line-height: 1.35; }
.dd-l-item.is-done .n { background: #EAF7EE; border-color: #34C759; color: #1B7F3B; }
/* The lesson you are in. It is the one row that is coloured, so there is never
   a question which one is playing. */
.dd-l-item.is-now { background: var(--red); }
.dd-l-item.is-now .t { color: #fff; font-weight: 600; }
.dd-l-item.is-now .n { border-color: rgba(255,255,255,.6); color: #fff; }

.dd-l-files { padding: 4px 20px 18px; }
.dd-l-nofiles { margin: 0; font-size: 13px; color: var(--mute); }
.dd-l-file {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px;
    border: 1px solid var(--line); border-radius: 10px; color: inherit; font-size: 13.5px;
}
.dd-l-file:last-child { margin-bottom: 0; }
.dd-l-file:hover { border-color: #CFD4DB; background: #F8F9FB; }
/* Sized here, because an inline SVG with no width is as big as its box. */
.dd-l-file svg { flex: none; width: 17px; height: 17px; display: block; color: var(--mute); }
.dd-l-file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-l-file .sz { flex: none; color: var(--mute); font-size: 12px; white-space: nowrap; }

.dd-l-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px 38px; }
.dd-l-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--red); }
.dd-l-title { margin: 8px 0 22px; font-size: 31px; line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.dd-l-body { font-size: 16.5px; line-height: 1.7; color: #24272C; margin-top: 26px; }
.dd-l-body h2, .dd-l-body h3 { letter-spacing: -.02em; margin: 28px 0 8px; font-size: 21px; }
.dd-l-body p { margin: 0 0 17px; }

/* THE PLAYER. */
.dd-deck { background: #1C1D20; border-radius: 14px; overflow: hidden; }
.dd-deck-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.dd-deck-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* Pinned to the picture, not to the stage, so the ink cannot drift away from
   the words it was drawn over. */
.dd-deck-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dd-mark { fill: none; }

.dd-deck-bar { display: flex; align-items: center; gap: 13px; padding: 12px 15px; background: #1C1D20; }
.dd-deck-play {
    flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--red); display: grid; place-items: center; transition: background .15s ease;
}
.dd-deck-play:hover { background: var(--red-dark); }
.dd-deck-play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.dd-deck-play.is-playing svg { margin-left: 0; }
.dd-deck-t { font-size: 12.5px; color: #C9CDD3; font-variant-numeric: tabular-nums; }

/* Segmented by slide, so the shape of the lesson is visible before it plays. */
.dd-deck-timeline { flex: 1; display: flex; gap: 3px; height: 5px; cursor: pointer; }
.dd-deck-seg { background: #3A3D42; border-radius: 3px; position: relative; overflow: hidden; }
.dd-deck-seg i { position: absolute; inset: 0; width: 0; background: var(--red); }
.dd-deck-seg.is-done i { width: 100%; }

.dd-deck-btn {
    background: #2A2C31; border: 0; color: #E6E8EC; border-radius: 7px; cursor: pointer;
    height: 28px; padding: 0 9px; font-size: 12.5px; font-weight: 600; font-family: inherit;
}
.dd-deck-btn:hover { background: #35383D; }
.dd-deck-btn svg { width: 14px; height: 14px; display: block; fill: currentColor; }
.dd-deck-noaudio { color: #9AA0A8; font-size: 13px; padding: 12px 15px; margin: 0; }
/* Advancing by tapping the slide, which is what a deck without a recording
   wants — so the frame says so. */
.dd-deck.is-manual .dd-deck-frame { cursor: pointer; }
/* THE WAY OUT OF FULL SCREEN.
   Only there in full screen: an explicit display beats the hidden attribute,
   which is why it was showing all the time — so hidden gets the last word.
   The circle is a fixed square box with aspect-ratio guarding it, and the
   cross is drawn rather than typed, because a glyph never centres in a
   circle: its own side bearings and baseline put it up and to the left. */
.dd-deck-close {
    position: absolute; top: 16px; right: 16px; z-index: 5;
    width: 44px; height: 44px; aspect-ratio: 1; box-sizing: border-box; padding: 0;
    border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(0,0,0,.55); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.dd-deck-close[hidden] { display: none !important; }
.dd-deck-close:hover { background: rgba(0,0,0,.78); }
.dd-deck-close svg { width: 18px; height: 18px; display: block; }
.dd-deck audio { display: none; }

.dd-l-video video, .dd-l-video iframe { width: 100%; aspect-ratio: 16/9; border-radius: 14px; display: block; border: 0; }

.dd-l-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.dd-l-next {
    display: inline-flex; align-items: center; gap: 9px; background: var(--red); color: #fff !important;
    padding: 13px 24px; border-radius: 11px; font-size: 15px; font-weight: 700;
}
.dd-l-next:hover { background: var(--red-dark); }
.dd-l-prev { color: var(--ink) !important; font-size: 14.5px; font-weight: 600; }
.dd-l-prev:hover { color: var(--red) !important; }
.dd-l-prev.is-off { color: #B6BBC3 !important; cursor: default; }

/* ── ARCHIVE ──────────────────────────────────────────────────────────── */

.dd-c-h1 { font-size: 40px; font-weight: 800; letter-spacing: -.033em; margin: 0 0 28px; }
.dd-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.dd-courses-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: inherit; display: block; transition: transform .18s ease, box-shadow .18s ease; }
.dd-courses-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 18px 34px rgba(16,24,40,.10); }
.dd-courses-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.dd-courses-card .b { padding: 17px 18px 20px; }
.dd-courses-card h2 { margin: 0 0 6px; font-size: 18.5px; font-weight: 700; letter-spacing: -.02em; }
.dd-courses-card p { margin: 0; font-size: 13.5px; color: var(--mute); }

.dd-course-gate { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; padding: 64px 24px; }
.dd-course-gate h1 { font-size: 28px; letter-spacing: -.025em; margin: 0 0 10px; }
.dd-course-gate p { color: var(--mute); margin: 0 0 22px; }

.dd-course-draft {
    background: #FFF8E5; border: 1px solid #F0D68A; border-radius: 12px;
    padding: 13px 17px; font-size: 14px; line-height: 1.55; margin: 0 0 22px; color: #6B5417;
}
.dd-course-draft a { color: var(--red) !important; font-weight: 700; }

@media (max-width: 782px) {
    .dd-c, .dd-l { padding-top: 84px; }
}
@media (max-width: 980px) {
    .dd-c-grid, .dd-l-grid { grid-template-columns: 1fr; }
    .dd-c-side, .dd-l-side { position: static; }
    .dd-l-side { order: 2; }
    .dd-l-main { order: 1; }
    .dd-c-title { font-size: 34px; }
    .dd-l-main { padding: 24px 20px 30px; }
}

/* ── ASSIGNMENT AND QUIZ ──────────────────────────────────────────────── */

.dd-work, .dd-quiz { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.dd-work-h { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -.022em; }
.dd-work-p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: #3A3F46; }
.dd-work-a {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
    font: inherit; font-size: 15.5px; line-height: 1.6; resize: vertical; background: #FCFCFD;
}
.dd-work-a:focus { outline: 0; border-color: var(--red); background: #fff; }
.dd-work-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.dd-work-save, .dd-quiz-go {
    background: var(--red); color: #fff; border: 0; border-radius: 10px; cursor: pointer;
    padding: 12px 22px; font-size: 15px; font-weight: 700; font-family: inherit;
}
.dd-work-save:hover, .dd-quiz-go:hover { background: var(--red-dark); }
.dd-work-save:disabled, .dd-quiz-go:disabled { opacity: .55; cursor: default; }
.dd-work-said, .dd-quiz-result { font-size: 14px; color: var(--mute); }
.dd-quiz-result.is-good { color: #1B7F3B; font-weight: 600; }

.dd-quiz-best { margin: 0 0 16px; font-size: 14px; color: var(--mute); }
.dd-q { margin-bottom: 20px; }
.dd-q-t { margin: 0 0 9px; font-size: 16px; font-weight: 600; line-height: 1.45; }
.dd-q-t span { color: var(--red); margin-right: 4px; }
.dd-q-o {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 13px; margin-bottom: 7px;
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1.45;
}
.dd-q-o:hover { background: #F8F9FB; }
.dd-q-o input { margin: 3px 0 0; accent-color: var(--red); flex: none; }
/* Marked after submitting: the answer that was right, and the one that was not. */
.dd-q-o.is-right { border-color: #34C759; background: #F1FAF3; }
.dd-q-o.is-wrong { border-color: var(--red); background: #FDF2F1; }

.dd-board-h { margin: 26px 0 10px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.dd-board { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.dd-board li {
    counter-increment: b; display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 14.5px;
}
.dd-board li::before {
    content: counter(b); flex: none; width: 24px; height: 24px; aspect-ratio: 1; box-sizing: border-box;
    border-radius: 50%; background: #F0F2F5; color: var(--mute);
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; line-height: 1;
}
.dd-board li.is-me { border-color: var(--red); background: #FDF4F3; font-weight: 600; }
.dd-board li.is-me::before { background: var(--red); color: #fff; }
.dd-board .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-board .sc { font-variant-numeric: tabular-nums; color: var(--mute); }
.dd-q-kind { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .5px;
             text-transform: uppercase; color: #2b6b3d; background: #EAF5EC;
             border-radius: 5px; padding: 3px 8px; margin-left: 8px; vertical-align: middle; }
