/* =====================================================================
   "START YOUR OWN BUSINESS" — slide design
   Rebuilt from the PowerPoint deck. Slide positions are in % of the
   slide; sizes use var(--pt), one PowerPoint point on a 960 × 540 pt
   slide, so the slides scale with the window like the original.
   Only styles the slideshow, so it can be loaded on any page (the home
   page loads it too). The standalone page's own look is in page.css.
   ===================================================================== */

/* ---------- Font: Barlow (SIL Open Font License, see fonts/BARLOW-LICENSE.txt)
   A free stand-in for Grandview Display. To use another font, change
   --d-font below (and these @font-face rules). */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); }

/* ---------- Colours from the deck's theme ---------- */
:root {
  --c-blue:      #1973eb;   /* accent 1 */
  --c-blue-dark: #1056b3;   /* labels, "Weeks 1–4" */
  --c-navy:      #0d1c3b;
  --c-ink:       #000;
  --c-grey:      #595959;   /* stage name next to the week number */
  --c-tint:      #e8f1fd;   /* assignment boxes, stage cards */
  --c-panel:     #f2f2f2;   /* grey title boxes, rows on slide 3 */
  --c-cell:      #a3c7f7;   /* resource cells */
  --c-cell-2:    #75abf3;   /* "Offline" cells, arrows */
  --d-font: "Barlow", "Segoe UI", Arial, sans-serif;
  --ss-ui-font: var(--d-font);
}

.ss-dialog, .ss-dialog *, .ss-trigger, .ss-trigger * { box-sizing: border-box; }

/* =====================================================================
   SLIDES — shared
   ===================================================================== */
/* Shield the slides from the host page's heading styles (font, size,
   weight, colour). :where() keeps this weaker than the rules below. */
.ss-slide :where(h2, h3) {
  font-family: inherit; font-size: inherit; font-weight: 700; line-height: inherit;
  letter-spacing: normal; text-transform: none; color: inherit;
}
.ss-slide {
  --pt: calc(100cqw / 960);
  --fs: calc(var(--pt) * 1.09);    /* text size: Barlow is about 9 % narrower than Grandview Display */
  font-family: var(--d-font);
  font-size: calc(18 * var(--fs));
  line-height: 1.32;                 /* PowerPoint 120 % line spacing (÷ 1.09, see --fs) */
  color: var(--c-ink);
  background: #fff;
  user-select: text; -webkit-user-select: text;
}
.ss-slide h2, .ss-slide h3, .ss-slide p, .ss-slide ul, .ss-slide ol, .ss-slide dl, .ss-slide dd { margin: 0; }
.ss-slide ul, .ss-slide ol { list-style: none; padding: 0; }
.ss-slide img { display: block; background: #e6ebf2; }   /* grey until the photo arrives */

.d-abs { position: absolute; }
.d-pad { padding: calc(3.6 * var(--pt)) calc(7.2 * var(--pt)); }   /* PowerPoint's default text box margins */

/* Blue accent line (6 pt) */
.d-line { position: absolute; height: calc(6 * var(--pt)); background: var(--c-blue); }
.d-line--top { left: 5.85%; top: 14.47%; width: 8.03%; }

/* Grey title box on the overview slides */
.d-boxtitle {
  position: absolute; left: 5.58%; top: 18.32%; width: 88.84%; height: 16.4%;
  padding: calc(3.6 * var(--pt)) calc(7.2 * var(--pt));
  background: var(--c-panel); border-radius: calc(8.9 * var(--pt));
  font-size: calc(40 * var(--fs)); font-weight: 700; line-height: 1.1;
}

/* Bullet lists */
.d-list li { position: relative; padding-left: calc(18 * var(--pt)); margin-top: calc(10 * var(--pt) * var(--ss-fit-line, 1)); }
.d-list li::before { content: "•"; position: absolute; left: 0; top: 0; font-family: Arial, sans-serif; transform: scale(.87); transform-origin: 0 55%; }
.d-list ul { margin-left: calc(2.88 * var(--pt)); }
.d-list ul li { margin-top: calc(5 * var(--pt) * var(--ss-fit-line, 1)); font-size: calc(16 * var(--fs) * var(--ss-fit-font, 1)); }
.d-lead { margin-top: calc(10 * var(--pt) * var(--ss-fit-line, 1)) !important; font-weight: 700; }

/* =====================================================================
   SLIDE 1 — title
   ===================================================================== */
.d-title { background: #3a1a3d; color: var(--c-navy); }   /* near-black (the deck's dark navy) for contrast on the photo */
.d-title__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-title__wash {
  position: absolute; left: -1.42%; top: 2.53%; width: 56.25%; height: 94.95%;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / .17) 26%,
                                         rgb(255 255 255 / .30) 46%, rgb(255 255 255 / .45) 100%);
}
.d-title__h, .d-title__sub {   /* soft white halo separates the dark text from the busy photo */
  text-shadow: 0 0 calc(3 * var(--pt)) rgb(255 255 255 / .95), 0 0 calc(10 * var(--pt)) rgb(255 255 255 / .85), 0 0 calc(22 * var(--pt)) rgb(255 255 255 / .6);
}
.d-title__h { left: 3.75%; top: 10.24%; width: 45.75%; font-size: calc(60 * var(--fs)); font-weight: 700; line-height: 1.1; }
.d-title .d-line { left: 4.43%; top: 70.32%; width: 8.03%; }
.d-title__sub { left: 3.84%; top: 75.14%; width: 45.75%; }
.d-title__sub p { font-size: calc(18 * var(--fs)); font-weight: 700; letter-spacing: calc(3 * var(--pt)); line-height: 1.43; text-transform: uppercase; }
.d-title__sub p + p { margin-top: calc(14 * var(--pt)); font-size: calc(14 * var(--fs)); }

/* =====================================================================
   SLIDE 2 — the journey in 15 weeks
   ===================================================================== */
.d-stage { position: absolute; top: 36.27%; width: 13.87%; height: 47.33%; background: var(--c-tint); border-radius: calc(8 * var(--pt)); }
.d-stage__img { position: absolute; left: 4.33%; top: 2.24%; width: 91.35%; height: 28.16%; object-fit: cover; border-radius: calc(6 * var(--pt)); }
.d-stage__text { position: absolute; left: 0; top: 31.82%; width: 100%; padding: calc(3.6 * var(--pt)) calc(7.2 * var(--pt)) 0 calc(8.64 * var(--pt)); font-size: calc(12 * var(--fs)); line-height: 1.1; }
.d-stage h3 { font-size: calc(14 * var(--fs)); font-weight: 700; line-height: 1.1; color: var(--c-navy); }
.d-stage h3 span { margin-right: .4em; }
.d-stage__weeks { font-weight: 700; color: var(--c-blue-dark); }
.d-stage ul { margin-top: calc(5 * var(--pt)); }
.d-stage li { position: relative; padding-left: calc(9.8 * var(--pt)); margin-top: calc(3.5 * var(--pt)); }
.d-stage li::before { content: "•"; position: absolute; left: 0; top: 0; font-family: Arial, sans-serif; }
.d-thread {
  position: absolute; left: 5.58%; top: 85.6%; width: 88.84%; height: 6.67%;
  display: flex; align-items: center;
  font-size: calc(16 * var(--fs)); font-style: italic; line-height: 1.1; color: var(--c-navy);
}

/* =====================================================================
   SLIDE 3 — how the course works
   ===================================================================== */
.d-works__title { left: 5.25%; top: 13.33%; width: 24.61%; font-size: calc(40 * var(--fs)); font-weight: 700; line-height: 1.1; }
.d-row {
  position: absolute; left: 35.3%; width: 59.19%; height: 21.29%;
  margin: 0; padding: 0; border: 0; border-radius: calc(11 * var(--pt));
  background: var(--c-panel); color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background .2s ease;
}
.d-row:hover { background: #e6e9ef; }
.d-row:focus-visible { outline: calc(3 * var(--pt)) solid var(--c-blue); outline-offset: calc(2 * var(--pt)); }
.d-row svg { position: absolute; left: 6.12%; top: 22.5%; width: 11.13%; height: 55%; }
.d-row__label {
  position: absolute; left: 23.37%; top: 0; width: 76.63%; height: 100%;
  display: flex; align-items: center; padding: calc(12.17 * var(--pt));
  font-size: calc(25 * var(--fs)); line-height: 1;
}
.d-row__go {   /* small arrow: these rows jump to slides 4–6 */
  position: absolute; right: 4%; top: 50%; width: calc(10 * var(--pt)); height: calc(10 * var(--pt));
  border-top: calc(2.5 * var(--pt)) solid #9aa3b2; border-right: calc(2.5 * var(--pt)) solid #9aa3b2;
  transform: translateY(-50%) rotate(45deg);
}
.d-works .d-line { left: 5.51%; top: 90.91%; width: 88.97%; }

/* =====================================================================
   SLIDE 4 — the weekly session
   ===================================================================== */
.d-flow__arcs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.d-flow__arcs path { fill: none; stroke: #a9c6f6; stroke-width: 3; stroke-linecap: round; }
.d-flow__arcs marker path { fill: #a9c6f6; stroke: none; }
.d-flow__box {
  position: absolute; top: 52.48%; width: 13.49%; height: 19.77%;
  padding: calc(4 * var(--pt)) calc(6 * var(--pt));
  background: rgb(255 255 255 / .9); border: calc(1 * var(--pt)) solid var(--c-blue); border-radius: calc(7 * var(--pt));
  font-size: calc(19 * var(--fs)); line-height: 1;
}
.d-flow__box--under-label { padding-top: calc(27 * var(--pt)); }
.d-flow__box li { position: relative; padding-left: calc(12 * var(--pt)); margin-top: calc(3 * var(--pt)); }
.d-flow__box li::before { content: "•"; position: absolute; left: 0; top: 0; font-family: Arial, sans-serif; }
.d-flow__label {
  position: absolute; width: 11.99%; height: 8.47%; z-index: 1;
  display: grid; place-items: center;
  background: var(--c-blue); color: #fff; border: calc(1 * var(--pt)) solid #fff; border-radius: calc(4 * var(--pt));
  font-size: calc(20 * var(--fs)); font-weight: 400; line-height: 1;
}

/* =====================================================================
   SLIDE 5 — resources
   ===================================================================== */
.d-res__head {
  position: absolute; width: 9.45%; height: 11.59%;
  background: var(--c-blue); color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 64%, 68% 64%, 50% 100%, 32% 64%, 0 64%);
  font-size: calc(24 * var(--fs)); font-weight: 700;
}
.d-res__head span { position: absolute; left: 0; right: 0; top: 0; height: 64%; display: grid; place-items: center; line-height: 1; }
.d-res__cell {
  position: absolute; width: 20.56%; height: 11.59%;
  display: flex; align-items: center;
  padding: calc(6 * var(--pt)) calc(11.2 * var(--pt)) calc(6 * var(--pt)) calc(31 * var(--pt));
  background: var(--c-cell); box-shadow: 0 calc(2 * var(--pt)) calc(5 * var(--pt)) rgb(0 0 0 / .3);
  font-size: calc(20 * var(--fs)); font-weight: 700; line-height: 1;
}
.d-res__cell--offline { background: var(--c-cell-2); }

/* =====================================================================
   SLIDE 6 — schedule & completion
   ===================================================================== */
.d-panel {
  position: absolute; top: 36.64%; height: 56.67%;
  padding: calc(10.8 * var(--pt)) calc(14.4 * var(--pt));
  background: linear-gradient(to top, #0e4da0 0%, #2077ec 48%, #75abf3 100%);
  color: #fff; font-size: calc(24 * var(--fs)); line-height: 1.1;
}
.d-panel dt, .d-panel h3 { font-size: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
.d-panel dt + dd { margin-top: 0; }
.d-panel dd { margin-left: calc(36 * var(--pt)); }
.d-panel dd + dt { margin-top: calc(12 * var(--pt)); }
.d-panel li { position: relative; padding-left: calc(27 * var(--pt)); margin-top: calc(6 * var(--pt)); }
.d-panel li::before { content: "•"; position: absolute; left: 0; top: 0; font-family: Arial, sans-serif; }

/* =====================================================================
   SLIDES 7 TO THE END — one week each
   ===================================================================== */
.d-week__kicker {
  position: absolute; left: 5.88%; top: 6%; width: 46.5%; height: 5.6%;
  display: flex; align-items: center; padding: 0 calc(7.2 * var(--pt));
  font-size: calc(14 * var(--fs)); font-weight: 700; letter-spacing: calc(1.5 * var(--pt)); line-height: 1.1;
  color: var(--c-grey); white-space: nowrap;
}
.d-week__kicker b { color: var(--c-blue); }
.d-week__kicker i { margin: 0 .95em; font-style: normal; }
.d-week .d-line { left: 5.88%; top: 14.47%; width: 8.03%; }
.d-week__title { left: 5.25%; top: 17.33%; width: 51%; font-size: calc(32 * var(--fs)); font-weight: 700; line-height: 1.1; }
/* Text box: height from the deck (inline). If the text does not fit, slideshow.js tightens it as
   PowerPoint does ("Shrink text on overflow") by setting --ss-fit-line and --ss-fit-font. */
.d-week__body { left: 5.25%; top: 34.67%; width: 51%; font-size: calc(18 * var(--fs) * var(--ss-fit-font, 1)); line-height: calc(1.32 * var(--ss-fit-line, 1)); }
.d-assign {
  position: absolute; left: 5.25%; top: 78%; width: 51%; height: 14%;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(7.2 * var(--pt)) calc(14.4 * var(--pt));
  background: var(--c-tint); border-radius: calc(9 * var(--pt));
  line-height: 1.1;
}
.d-assign__label { font-size: calc(12 * var(--fs)); font-weight: 700; letter-spacing: calc(1.2 * var(--pt)); color: var(--c-blue-dark); }
.d-assign__text { font-size: calc(16 * var(--fs)); }
.d-week__photo { position: absolute; left: 60.25%; top: 0; width: 39.75%; height: 100%; object-fit: cover; }

/* =====================================================================
   "Your Business Plan – What It Will Look Like" (Week 2): chapter cards.
   Positions come from each language's deck (inline styles).
   ===================================================================== */
.d-chap { position: absolute; background: var(--c-tint); border-radius: calc(6.2 * var(--pt)); }
.d-chap--extra { background: #fff; border: max(1px, calc(1 * var(--pt))) dashed var(--c-blue); }
.d-chap__num {
  position: absolute; display: grid; place-items: center; border-radius: 50%;
  background: var(--c-blue); color: #fff; font-size: calc(16 * var(--fs)); font-weight: 700; line-height: 1;
}
.d-chap--extra .d-chap__num { background: var(--c-cell); }
.d-chap__text {
  position: absolute; display: flex; flex-direction: column; justify-content: center;
  padding: calc(3.6 * var(--pt)) calc(3.6 * var(--pt)) calc(3.6 * var(--pt)) 0; line-height: 1.1;
}
.d-chap__head { font-size: calc(13 * var(--fs)); font-weight: 700; }
.d-chap__sub { font-size: calc(11 * var(--fs)); color: var(--c-blue-dark); }
.d-chap__note { font-size: calc(14 * var(--fs)); font-style: italic; line-height: 1.1; color: var(--c-navy); }

/* =====================================================================
   "Risk Management" (Week 12): risk matrix in place of the photo.
   Positions and the title size come from each language's deck (inline styles).
   ===================================================================== */
.d-risk__panel { position: absolute; background: #0a3978; color: #fff; }
.d-risk__panel > * { position: absolute; }
.d-risk__title { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; line-height: 1.1; }
.d-risk__h { font-weight: 700; }
.d-risk__sub { color: #dce6f2; }
.d-risk__cell {
  display: grid; place-items: center; border-radius: calc(8 * var(--pt));
  font-size: calc(28 * var(--fs)); font-weight: 700; line-height: 1; color: #fff;
}
.d-risk--red    { background: #d9534f; }
.d-risk--yellow { background: #f2c14e; color: #1f2937; }
.d-risk--green  { background: #5bae5b; }
.d-risk__axis {
  display: grid; place-items: center; text-align: center; white-space: nowrap;
  font-size: calc(12 * var(--fs)); font-weight: 700; letter-spacing: calc(1.5 * var(--pt)); line-height: 1.1;
}
.d-risk__axis--v { writing-mode: vertical-rl; transform: rotate(180deg); }   /* reads bottom to top */
.d-risk__swatch { border-radius: calc(3.2 * var(--pt)); }
.d-risk__legend { display: flex; align-items: center; font-size: calc(11 * var(--fs)); line-height: 1.1; }

/* Malagasy has longer words: slightly smaller text in three places, as in the Malagasy PowerPoint deck */
.ss-dialog:lang(mg) .d-stage h3 { font-size: calc(13 * var(--fs)); }
.ss-dialog:lang(mg) .d-flow__box { font-size: calc(16 * var(--fs)); }
.ss-dialog:lang(mg) .d-res__head { font-size: calc(18 * var(--fs)); }
