/* =============================================================================
   G PEN UNIVERSITY — STYLES  (mobile-first, black / white / gold, Archivo)
   ========================================================================== */
:root {
  --ink: #111111;
  --ink-2: #2a2a2a;
  --paper: #ffffff;
  --cream: #faf9f5;
  --stone: #6e6e66;
  --line: #e7e6e0;
  --gold: #c8952f;          /* accessible gold for text on white */
  --gold-bright: #FEC870;   /* brand gold for fills/accents */
  --ember: #D75D43;
  --ok: #2f8f5b;
  --bad: #cf4634;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(17,17,17,.05), 0 12px 34px rgba(17,17,17,.07);
  --shadow-lg: 0 20px 60px rgba(17,17,17,.16);
  --maxw: 1120px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.02em; }
.gold { color: var(--gold); }
.noscroll { overflow: hidden; }

/* ---- buttons ---- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg); color: var(--fg); border: 2px solid var(--bg);
  font-family: var(--font); font-weight: 800; font-size: 15px; letter-spacing: -.01em;
  padding: 12px 20px; border-radius: 999px; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(17,17,17,.18); }
.btn:active { transform: translateY(0); }
.btn.xl { font-size: 16px; padding: 15px 26px; }
.btn.sm { font-size: 13px; padding: 8px 14px; }
.btn.full { width: 100%; }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line); background: #fff; }
.btn.ghost:hover { border-color: var(--ink); }
.btn .ic { display: inline-flex; }
.ic svg { width: 1.15em; height: 1.15em; display: block; fill: currentColor; }
.ic { display: inline-flex; align-items: center; }
.linklike { background: none; border: 0; color: var(--stone); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---- header ---- */
.hdr {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px clamp(16px, 4vw, 40px); background: rgba(250,249,245,.86);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.hdr-brand { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: -.02em; }
.hdr-logo { width: 26px; height: 26px; object-fit: contain; }
.hdr-logo.dark { display: none; }
.hdr-name { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.hdr-name::before { content: "· "; color: var(--gold); }
.hdr-user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.hdr-u-name { font-weight: 800; font-size: 14px; }
.hdr-u-store { font-size: 11.5px; color: var(--stone); }

/* ---- generic panes ---- */
.pane { max-width: var(--maxw); margin: 0 auto; padding: clamp(20px, 5vw, 44px) clamp(16px, 4vw, 40px) 60px; }
.pane.narrow { max-width: 520px; }
.pane-h { font-size: clamp(26px, 6vw, 38px); margin-top: 8px; }
.pane-sub { color: var(--stone); margin: 10px 0 24px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--stone); margin-bottom: 12px; }
.back:hover { color: var(--ink); }
.lead { color: var(--stone); font-size: 15px; margin: 0 0 16px; }
.center-btn { display: inline-flex; margin: 26px auto 0; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =============================== LANDING ================================= */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(254,200,112,.22), transparent 55%),
    radial-gradient(90% 90% at -10% 110%, rgba(215,93,67,.18), transparent 50%),
    #0e0e0e;
  padding: clamp(48px, 9vw, 110px) clamp(16px, 4vw, 40px) clamp(56px, 8vw, 90px);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .14em; color: var(--gold-bright);
  border: 1px solid rgba(254,200,112,.4); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 8.5vw, 74px); font-weight: 900; letter-spacing: -.035em; }
.hero h1 .gold { color: var(--gold-bright); }
.hero-sub { max-width: 620px; margin: 20px auto 0; color: #d7d6cf; font-size: clamp(15px, 2.4vw, 19px); }
.hero-cta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-cta .btn { --bg: var(--gold-bright); --fg: #1a1509; border-color: var(--gold-bright); }
.hero-note { color: #a3a29a; font-size: 13px; font-weight: 600; }
.hero-badges { max-width: var(--maxw); margin: 44px auto 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-chip {
  display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); padding: 8px 14px 8px 8px; border-radius: 999px;
  font-weight: 700; font-size: 13px; color: #fff;
}
.hero-chip img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }

.why { max-width: var(--maxw); margin: 0 auto; padding: clamp(44px, 7vw, 80px) clamp(16px, 4vw, 40px) 0; }
.why-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.why-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.why-ic { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; background: var(--ink); color: var(--gold-bright); border-radius: 12px; margin-bottom: 14px; }
.why-ic svg { width: 24px; height: 24px; }
.why-card h3 { font-size: 18px; margin-bottom: 6px; }
.why-card p { margin: 0; color: var(--stone); font-size: 14.5px; }

.steps { max-width: 760px; margin: 0 auto; padding: clamp(44px, 7vw, 80px) clamp(16px, 4vw, 40px) 40px; text-align: center; }
.steps h2 { font-size: clamp(24px, 5vw, 34px); margin-bottom: 26px; }
.steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; text-align: left; }
.step { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.step-n { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--gold-bright); color: #1a1509; font-weight: 900; border-radius: 50%; font-size: 18px; }
.step h4 { font-size: 17px; }
.step p { margin: 4px 0 0; color: var(--stone); font-size: 14.5px; }

.foot { max-width: var(--maxw); margin: 40px auto 0; padding: 34px clamp(16px,4vw,40px) 46px; border-top: 1px solid var(--line); text-align: center; color: var(--stone); font-size: 13px; }
.foot-g { width: 34px; height: 34px; object-fit: contain; margin: 0 auto 12px; opacity: .8; }
.foot-g.dark { display: none; }
.foot a { text-decoration: underline; }

/* =============================== ENROLL ================================== */
.enroll-badge { width: 62px; height: 62px; display: grid; place-items: center; background: var(--ink); color: var(--gold-bright); border-radius: 16px; margin-bottom: 8px; }
.enroll-badge svg { width: 32px; height: 32px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 700; font-size: 13.5px; }
.field input {
  font-family: var(--font); font-size: 16px; padding: 13px 15px; border: 2px solid var(--line);
  border-radius: 12px; background: #fff; transition: border-color .15s; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--ink); }
.form-fine { color: var(--stone); font-size: 12px; text-align: center; margin: 2px 0 0; }

/* =============================== DASHBOARD =============================== */
.dash { max-width: var(--maxw); margin: 0 auto; padding: clamp(20px,4vw,40px) clamp(16px,4vw,40px) 60px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dash-hello { color: var(--stone); font-weight: 700; font-size: 14px; }
.dash-hi h1 { font-size: clamp(30px, 7vw, 46px); font-weight: 900; margin: 2px 0; }
.dash-store { color: var(--gold); font-weight: 700; font-size: 14px; }
.ring { position: relative; width: 128px; height: 128px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 128px; height: 128px; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--gold-bright); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.3,.8,.3,1); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt strong { font-size: 30px; font-weight: 900; }
.ring-txt strong span { font-size: 16px; color: var(--stone); }
.ring-txt em { display: block; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--stone); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px; text-align: center; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 24px; font-weight: 900; }
.stat span { font-size: 12px; color: var(--stone); font-weight: 600; }
.st-fire { display: inline-flex; align-items: center; gap: 4px; }
.st-fire svg { width: 20px; height: 20px; color: var(--ember); }

.master-b { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 26px; }
.master-b .master-ic, .master-b > .ic { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; color: var(--stone); }
.master-b svg { width: 24px; height: 24px; }
.master-b strong { display: block; font-size: 16px; }
.master-b span { font-size: 13.5px; color: var(--stone); }
.master-b.done { background: var(--ink); border-color: var(--ink); color: #fff; }
.master-b.done .ic { background: rgba(254,200,112,.16); border-color: transparent; color: var(--gold-bright); }
.master-b.done span { color: var(--gold-bright); }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.sec-h h2 { font-size: 22px; }
.sec-h span { font-size: 13px; color: var(--stone); font-weight: 700; }
.sec-h.big { align-items: center; margin: 42px 0 16px; }
.sec-h.big .sec-n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: var(--gold-bright); color: #1a1509; border-radius: 50%; font-weight: 900; font-size: 15px; }
.sec-h.big h2 { font-size: clamp(22px, 4vw, 30px); }

.course-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.course-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .14s ease, box-shadow .2s ease, border-color .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.cc-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(160deg, var(--cream), #f0efe8); display: grid; place-items: center; }
.cc-media img { width: 72%; height: 82%; object-fit: contain; }
.cc-min, .cc-badge { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.9); }
.cc-badge { background: var(--ink); color: var(--gold-bright); display: inline-flex; align-items: center; gap: 5px; }
.cc-badge svg { width: 13px; height: 13px; }
.course-card.done .cc-media { background: linear-gradient(160deg, #fff, #fbf6ea); }
.cc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.cc-cat { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--gold); }
.cc-body h3 { font-size: 20px; margin: 4px 0 4px; }
.cc-body p { margin: 0 0 14px; color: var(--stone); font-size: 14px; flex: 1; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; }
.cc-price { font-weight: 900; font-size: 16px; }
.cc-go { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; color: var(--ink); }
.cc-go svg { width: 16px; height: 16px; transition: transform .16s; }
.course-card:hover .cc-go svg { transform: translateX(3px); }
.reset { display: block; margin: 34px auto 0; font-size: 13px; }

/* =============================== COURSE ================================= */
.course { max-width: 860px; margin: 0 auto; padding: clamp(18px,4vw,36px) clamp(16px,4vw,40px) 70px; }
.course-hero { display: flex; gap: 20px; align-items: center; background: var(--ink); border-radius: 20px; padding: 22px; color: #fff; margin-bottom: 8px; box-shadow: var(--shadow); }
.ch-img { width: 96px; height: 96px; flex: none; object-fit: contain; background: #fff; border-radius: 14px; padding: 8px; }
.ch-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-bright); }
.ch-eyebrow svg { width: 16px; height: 16px; }
.ch-done { color: #fff; display: inline-flex; align-items: center; gap: 3px; }
.ch-done svg { width: 13px; height: 13px; }
.ch-txt h1 { font-size: clamp(26px, 5.5vw, 40px); font-weight: 900; margin: 6px 0 4px; }
.ch-txt p { margin: 0 0 8px; color: #d7d6cf; font-size: 15px; }
.ch-meta { font-size: 12.5px; color: #a3a29a; font-weight: 600; }

.vid-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.vid { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; padding: 0; font: inherit; box-shadow: var(--shadow); transition: transform .14s, box-shadow .2s; }
.vid:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.vid-thumb { position: relative; display: block; aspect-ratio: 16/9; background: #000; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid-play { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; display: grid; place-items: center; background: rgba(254,200,112,.95); color: #1a1509; border-radius: 50%; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.vid-play svg { width: 26px; height: 26px; margin-left: 3px; }
.vid-title { display: block; padding: 13px 16px; font-weight: 800; font-size: 15px; }

.mods { display: grid; gap: 10px; }
.mod { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.mod-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.mod-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: 50%; font-weight: 900; font-size: 13px; }
.mod-h h3 { flex: 1; font-size: 16px; }
.mod-chk { flex: none; width: 22px; height: 22px; display: none; place-items: center; background: var(--ok); color: #fff; border-radius: 50%; }
.mod-chk svg { width: 13px; height: 13px; }
.mod-caret { flex: none; font-size: 22px; font-weight: 400; color: var(--stone); line-height: 1; transition: transform .18s; }
.mod.open .mod-caret { transform: rotate(45deg); }
.mod.read .mod-n { background: var(--ok); color: #fff; border-color: var(--ok); }
.mod.read .mod-chk { display: grid; }
.mod.read .mod-caret { display: none; }
.mod-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.mod.open .mod-body { max-height: 900px; }
.mod-body ul { margin: 0; padding: 0 20px 6px 40px; }
.mod-body li { margin: 0 0 9px; font-size: 14.5px; color: var(--ink-2); }
.mod-body li strong { color: var(--ink); }
.mod-read { margin: 4px 20px 18px; }

.sell { background: linear-gradient(160deg, #fff, #fbf6ea); border: 1px solid var(--line); border-left: 4px solid var(--gold-bright); border-radius: 14px; padding: 20px 22px; margin-top: 18px; box-shadow: var(--shadow); }
.sell h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 10px; }
.sell h3 svg { width: 20px; height: 20px; color: var(--gold); }
.sell ul { margin: 0; padding-left: 20px; }
.sell li { margin: 0 0 8px; font-size: 14.5px; }

/* quiz */
.quiz-intro { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.quiz-intro .lead { margin-bottom: 16px; }
.already { display: inline-flex; align-items: center; gap: 6px; background: #f0f7f1; color: var(--ok); font-weight: 700; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; margin-bottom: 16px; }
.already svg { width: 15px; height: 15px; }
.quiz { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.quiz-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.quiz-bar-fill { height: 100%; background: var(--gold-bright); border-radius: 999px; transition: width .35s ease; }
.quiz-count { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.quiz-q { font-size: clamp(19px, 3.6vw, 24px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 18px; }
.quiz-choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; transition: border-color .14s, background .14s, transform .1s; }
.choice:hover:not(:disabled) { border-color: var(--ink); }
.choice:active:not(:disabled) { transform: scale(.99); }
.ch-key { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: 8px; font-weight: 900; font-size: 13px; }
.choice.correct { border-color: var(--ok); background: #f0f7f1; }
.choice.correct .ch-key { background: var(--ok); color: #fff; border-color: var(--ok); }
.choice.wrong { border-color: var(--bad); background: #fbf0ee; }
.choice.wrong .ch-key { background: var(--bad); color: #fff; border-color: var(--bad); }
.choice:disabled { cursor: default; }
.quiz-why { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; }
.quiz-why.ok { background: #f0f7f1; }
.quiz-why.no { background: #fbf0ee; }
.quiz-why strong { display: inline-flex; align-items: center; gap: 5px; }
.quiz-why svg { width: 15px; height: 15px; }
.next { margin-top: 18px; width: 100%; }

.result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align: center; box-shadow: var(--shadow); }
.result-score { font-size: 54px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.result-score span { display: block; font-size: 15px; color: var(--stone); font-weight: 700; margin-top: 2px; }
.result h3 { font-size: 24px; margin: 12px 0 6px; display: inline-flex; align-items: center; gap: 6px; }
.result h3 svg { width: 22px; height: 22px; color: var(--ok); }
.result p { color: var(--stone); margin: 0 auto 18px; max-width: 420px; }
.result.pass .result-score { color: var(--ok); }
.result.fail .result-score { color: var(--bad); }
.backdash { margin-top: 20px; width: 100%; }
.master-unlock { display: flex; align-items: center; gap: 12px; margin-top: 20px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 20px; font-size: 14.5px; box-shadow: var(--shadow); }
.master-unlock svg { width: 26px; height: 26px; flex: none; color: var(--gold-bright); }
.master-unlock strong { color: var(--gold-bright); }

/* reward */
.reward-wrap { margin-top: 18px; }
.reward { background: linear-gradient(165deg, #151510, #0e0e0e); color: #fff; border-radius: 20px; padding: 30px 24px; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.reward::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% -10%, rgba(254,200,112,.22), transparent 60%); }
.reward > * { position: relative; }
.reward-ic { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 12px; background: rgba(254,200,112,.16); color: var(--gold-bright); border-radius: 14px; }
.reward-ic svg { width: 26px; height: 26px; }
.reward-eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-bright); }
.reward h3 { font-size: 22px; margin: 6px 0 16px; }
.code { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; background: #fff; color: var(--ink); border: 0; border-radius: 12px; padding: 14px 26px; cursor: pointer; font: inherit; border: 2px dashed var(--gold); }
.code span { font-size: 26px; font-weight: 900; letter-spacing: .04em; }
.code em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--stone); }
.reward p { color: #c9c8c1; font-size: 13.5px; max-width: 380px; margin: 14px auto 20px; }
.reward .btn { --bg: var(--gold-bright); --fg: #1a1509; border-color: var(--gold-bright); }

/* =============================== CERTIFICATE ============================ */
.master-hero { text-align: center; padding: 20px 0 8px; }
.master-hero > .ic { display: inline-grid; place-items: center; width: 74px; height: 74px; background: var(--ink); color: var(--gold-bright); border-radius: 20px; margin-bottom: 14px; }
.master-hero svg { width: 40px; height: 40px; }
.master-hero h1 { font-size: clamp(28px, 6vw, 46px); font-weight: 900; }
.master-hero p { color: var(--stone); max-width: 520px; margin: 12px auto 0; }

.cert { background: #fbf9f2; border: 2px solid var(--ink); border-radius: 6px; padding: clamp(20px, 5vw, 40px); margin: 18px 0 0; position: relative; box-shadow: var(--shadow-lg); }
.cert-inner { border: 1.5px solid var(--gold); border-radius: 3px; padding: clamp(22px, 5vw, 40px) clamp(16px, 4vw, 34px); text-align: center; }
.cert-logo img { width: 54px; height: 54px; object-fit: contain; margin: 0 auto 14px; }
.cert-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); }
.cert-award { font-size: clamp(22px, 5vw, 34px); font-weight: 900; margin: 8px 0 16px; }
.cert-presented { color: var(--stone); font-size: 14px; }
.cert-name { font-size: clamp(28px, 7vw, 46px); font-weight: 900; letter-spacing: -.02em; margin: 6px 0; position: relative; display: inline-block; padding-bottom: 10px; }
.cert-name::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(280px, 70%); height: 2px; background: var(--gold); }
.cert-desc { color: var(--stone); font-size: 13.5px; max-width: 440px; margin: 12px auto 4px; }
.cert-product { font-size: clamp(20px, 4.5vw, 30px); font-weight: 900; margin: 4px 0 10px; }
.cert-seal { width: 118px; height: 118px; margin: 8px auto 14px; }
.cert-seal svg { width: 100%; height: 100%; }
.cs-ring { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.cs-ring2 { stroke-width: 1; }
.cs-arc { fill: var(--gold); font-size: 9.4px; font-weight: 800; letter-spacing: 1.4px; }
.cs-star { fill: var(--gold); font-size: 20px; text-anchor: middle; }
.cs-score { fill: var(--ink); font-size: 26px; font-weight: 900; text-anchor: middle; }
.cs-sub { fill: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 2px; text-anchor: middle; }
.cert-foot { display: flex; justify-content: center; gap: clamp(14px, 5vw, 60px); flex-wrap: wrap; margin-top: 8px; }
.cert-fcol { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 1px solid var(--gold); min-width: 100px; }
.cert-fv { font-weight: 800; font-size: 14px; }
.cert-fv.cert-sig { font-family: 'Archivo', cursive; font-style: italic; }
.cert-fl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--stone); font-weight: 700; }
.cert.master { background: #0e0e0e; border-color: var(--gold-bright); }
.cert.master .cert-inner { border-color: var(--gold-bright); }
.cert.master .cert-award, .cert.master .cert-name, .cert.master .cert-product, .cert.master .cs-score { color: #fff; fill: #fff; }
.cert.master .cert-presented, .cert.master .cert-desc, .cert.master .cert-fl { color: #b9b8b0; }
.cert.master .cert-fv { color: #fff; }
.cert.master .cert-logo img { filter: invert(1) brightness(1.4); }
.cert-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; justify-content: center; }

/* =============================== MODAL ================================== */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(10,10,10,.86); display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-in { width: 100%; max-width: 860px; }
.modal-x { position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }
.modal-frame { aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }
.modal-t { color: #fff; font-weight: 700; text-align: center; margin-top: 12px; }

/* =============================== TOAST / CONFETTI ======================= */
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 120; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; inset: 0; z-index: 110; pointer-events: none; }

/* =============================== RESPONSIVE ============================= */
@media (min-width: 680px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .vid-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .course-hero { flex-direction: column; text-align: center; }
  .ch-img { width: 110px; height: 110px; }
  .stat strong { font-size: 20px; }
}

/* =============================== PRINT ================================== */
@media print {
  .hdr, .foot, .back, .cert-actions, .vid-grid, .mods, .sell, .reward-wrap, .quiz, .quiz-intro, .result, .sec-h, .course-hero, .master-hero, .master-unlock, .backdash, .lead { display: none !important; }
  body { background: #fff; }
  .cert { border-color: #000; box-shadow: none; margin: 0; }
  .cert.master { background: #fff; border-color: #000; }
  .cert.master .cert-award, .cert.master .cert-name, .cert.master .cert-product, .cert.master .cs-score { color: #000; fill: #000; }
  .cert.master .cert-logo img { filter: none; }
  .cert.master .cert-presented, .cert.master .cert-desc, .cert.master .cert-fl { color: #555; }
  .cert.master .cert-fv { color: #000; }
}
