/* ════════════════════════════════════════════════════════════════
   AI Boss Academy
   Stand-alone app stylesheet for ai-for-executive-assistants.html.

   This page is an application, not an article, so it deliberately
   does not inherit css/style.css. The visual language is Apple's:
   system typography, generous rounding, hairline separators, soft
   elevation, frosted chrome, and motion with a single easing curve.
   Light and dark are both supported through prefers-color-scheme.
   ════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light dark;

  /* Surfaces */
  --bg:            #f5f5f7;
  --bg-elevated:   #ffffff;
  --bg-sunken:     #ececef;
  --card:          #ffffff;
  --card-2:        #fbfbfd;
  --chrome:        rgba(251, 251, 253, 0.82);

  /* Ink */
  --ink:           #1d1d1f;
  --ink-2:         #424245;
  --ink-3:         #6e6e73;
  --ink-4:         #8e8e93;

  /* Lines */
  --line:          rgba(0, 0, 0, 0.10);
  --line-strong:   rgba(0, 0, 0, 0.16);

  /* Accents (Apple system palette) */
  --blue:          #0071e3;
  --blue-ink:      #0060c0;
  --blue-soft:     rgba(0, 113, 227, 0.10);
  --green:         #248a3d;
  --green-soft:    rgba(36, 138, 61, 0.10);
  --amber:         #b25000;
  --amber-soft:    rgba(178, 80, 0, 0.10);
  --red:           #c9252d;
  --red-soft:      rgba(201, 37, 45, 0.10);
  --purple:        #8944ab;
  --purple-soft:   rgba(137, 68, 171, 0.10);
  --teal:          #0c7a7a;

  /* Elevation */
  --shadow-1:      0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-2:      0 4px 12px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.07);
  --shadow-3:      0 8px 24px rgba(0,0,0,0.10), 0 24px 64px rgba(0,0,0,0.12);

  /* Geometry */
  --r-sm:          10px;
  --r-md:          14px;
  --r-lg:          20px;
  --r-xl:          28px;

  /* Motion: one curve everywhere. */
  --ease:          cubic-bezier(0.32, 0.72, 0, 1);
  --fast:          180ms;
  --slow:          520ms;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #000000;
    --bg-elevated: #1c1c1e;
    --bg-sunken:   #0a0a0b;
    --card:        #1c1c1e;
    --card-2:      #232325;
    --chrome:      rgba(28, 28, 30, 0.76);
    --ink:         #f5f5f7;
    --ink-2:       #d8d8dc;
    --ink-3:       #9a9aa0;
    --ink-4:       #77777d;
    --line:        rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.20);
    --blue:        #0a84ff;
    --blue-ink:    #57adff;
    --blue-soft:   rgba(10, 132, 255, 0.16);
    --green:       #30d158;
    --green-soft:  rgba(48, 209, 88, 0.16);
    --amber:       #ff9f0a;
    --amber-soft:  rgba(255, 159, 10, 0.16);
    --red:         #ff453a;
    --red-soft:    rgba(255, 69, 58, 0.16);
    --purple:      #bf5af2;
    --purple-soft: rgba(191, 90, 242, 0.16);
    --shadow-1:    0 1px 2px rgba(0,0,0,0.4);
    --shadow-2:    0 4px 16px rgba(0,0,0,0.5);
    --shadow-3:    0 12px 40px rgba(0,0,0,0.6);
  }
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { letter-spacing: -0.022em; line-height: 1.12; font-weight: 650; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.8rem 1.2rem;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: 1060px; margin: 0 auto; padding-inline: 20px; }
.wrap--tight { max-width: 780px; }

/* ─── App chrome ─────────────────────────────────────────────── */

.appbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.appbar__inner {
  display: flex; align-items: center; gap: 14px;
  height: 56px;
}
.appbar__back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.86rem; color: var(--ink-3); white-space: nowrap;
}
.appbar__back:hover { color: var(--blue); text-decoration: none; }
.appbar__title {
  font-size: 0.95rem; font-weight: 650; letter-spacing: -0.015em;
  margin-inline: auto; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar__right { display: flex; align-items: center; gap: 10px; }

.ring { width: 34px; height: 34px; flex: none; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--line-strong); stroke-width: 3.5; }
.ring__value {
  fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-linecap: round;
  transition: stroke-dashoffset var(--slow) var(--ease);
}
.ring-label {
  font-size: 0.74rem; font-weight: 650; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ─── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 0.94rem; font-weight: 600; letter-spacing: -0.01em;
  padding: 0.72rem 1.35rem; border-radius: 980px;
  border: 1px solid transparent; background: var(--blue); color: #fff;
  cursor: pointer;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.btn:hover { background: var(--blue-ink); text-decoration: none; color: #fff; }
.btn:active { transform: scale(0.97); }
.btn--ghost {
  background: transparent; color: var(--blue); border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue); }
.btn--quiet {
  background: var(--bg-sunken); color: var(--ink-2); border-color: transparent;
}
.btn--quiet:hover { background: var(--line); color: var(--ink); }
.btn--sm { font-size: 0.83rem; padding: 0.48rem 0.95rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--done { background: var(--green); }
.btn--done:hover { background: var(--green); }

/* ─── Hero ───────────────────────────────────────────────────── */

.hero { padding: 72px 0 28px; text-align: center; }
.hero__eyebrow {
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 6.4vw, 3.65rem);
  font-weight: 700; letter-spacing: -0.035em; margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub {
  font-size: clamp(1.04rem, 2.4vw, 1.26rem); color: var(--ink-3);
  max-width: 620px; margin: 0 auto 26px; line-height: 1.45;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.statstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; margin-top: 42px;
}
.statstrip div { background: var(--card); padding: 18px 12px; }
.statstrip b {
  display: block; font-size: 1.5rem; font-weight: 680; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.statstrip span { font-size: 0.76rem; color: var(--ink-3); letter-spacing: 0.01em; }

/* ─── Progress panel ─────────────────────────────────────────── */

.progress-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-1);
  margin-top: 34px; text-align: left;
}
.progress-card__top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.progress-card__top h2 { font-size: 1.05rem; }
.progress-card__count { font-size: 0.86rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 980px; background: var(--bg-sunken); overflow: hidden; }
.bar__fill {
  height: 100%; width: 0%; border-radius: 980px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition: width var(--slow) var(--ease);
}
.progress-card__hint { font-size: 0.85rem; color: var(--ink-3); margin-top: 12px; }

/* ─── Section shell ──────────────────────────────────────────── */

.section { padding: 56px 0 8px; }
.section__head { margin-bottom: 22px; }
.eyebrow {
  font-size: 0.74rem; font-weight: 650; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px;
}
.section__head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.03em; }
.section__head p { color: var(--ink-3); margin-top: 10px; max-width: 640px; }

/* ─── Module rail ────────────────────────────────────────────── */

.rail-shell {
  position: sticky; top: 56px; z-index: 90;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.rail {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 20px;
  scrollbar-width: none; -ms-overflow-style: none;
  max-width: 1060px; margin: 0 auto;
}
.rail::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 550; white-space: nowrap;
  padding: 0.42rem 0.9rem; border-radius: 980px;
  background: var(--bg-sunken); color: var(--ink-2);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover { background: var(--line); text-decoration: none; color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: var(--bg); }
.chip__tick { color: var(--green); font-weight: 700; }
.chip--tool { background: transparent; border-color: var(--line-strong); color: var(--ink-3); }
.chip--tool:hover { background: var(--blue-soft); color: var(--blue); }
.chip[aria-current="true"] .chip__tick { color: #fff; }

/* ─── Module card ────────────────────────────────────────────── */

.module {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-1);
  padding: 30px; margin-bottom: 22px;
  scroll-margin-top: 118px;
  transition: box-shadow var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.module.is-done { border-color: var(--green-soft); }
.module__meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 640; letter-spacing: 0.02em;
  padding: 0.28rem 0.66rem; border-radius: 980px;
  background: var(--bg-sunken); color: var(--ink-3);
}
.pill--blue   { background: var(--blue-soft);   color: var(--blue); }
.pill--green  { background: var(--green-soft);  color: var(--green); }
.pill--amber  { background: var(--amber-soft);  color: var(--amber); }
.pill--red    { background: var(--red-soft);    color: var(--red); }
.pill--purple { background: var(--purple-soft); color: var(--purple); }

.module h3 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); margin-bottom: 10px; }
.module__lede { font-size: 1.06rem; color: var(--ink-2); margin-bottom: 20px; }
.module p { margin-bottom: 14px; color: var(--ink-2); }
.module h4 {
  font-size: 1.02rem; font-weight: 650; margin: 26px 0 10px; color: var(--ink);
}
.module ul, .module ol { margin: 0 0 16px 1.15rem; color: var(--ink-2); }
.module li { margin-bottom: 8px; }
.module li > strong { color: var(--ink); font-weight: 620; }
.module a { text-decoration: underline; text-underline-offset: 2px; }

.callout {
  border-radius: var(--r-md); padding: 16px 18px; margin: 18px 0;
  background: var(--bg-sunken); border: 1px solid var(--line);
}
.callout__title {
  font-size: 0.78rem; font-weight: 680; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 7px; color: var(--ink-3);
}
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout--blue  { background: var(--blue-soft);  border-color: transparent; }
.callout--blue  .callout__title { color: var(--blue); }
.callout--green { background: var(--green-soft); border-color: transparent; }
.callout--green .callout__title { color: var(--green); }
.callout--amber { background: var(--amber-soft); border-color: transparent; }
.callout--amber .callout__title { color: var(--amber); }
.callout--red   { background: var(--red-soft);   border-color: transparent; }
.callout--red   .callout__title { color: var(--red); }

.do-dont { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.do-dont > div {
  border-radius: var(--r-md); padding: 15px 16px; border: 1px solid var(--line);
  background: var(--card-2);
}
.do-dont h5 {
  font-size: 0.78rem; font-weight: 680; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 8px;
}
.do-dont .yes h5 { color: var(--green); }
.do-dont .no h5  { color: var(--red); }
.do-dont ul { margin: 0 0 0 1rem; font-size: 0.92rem; }

.steps { counter-reset: step; list-style: none; margin: 18px 0 !important; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding-left: 42px; margin-bottom: 14px; color: var(--ink-2);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-size: 0.8rem; font-weight: 680;
}
.steps li strong { color: var(--ink); }

.kv {
  width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.93rem;
}
.kv th, .kv td {
  text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.kv th {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-4); font-weight: 650;
}
.kv td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── Copy blocks ────────────────────────────────────────────── */

.snippet {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card-2); overflow: hidden; margin: 16px 0;
}
.snippet__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}
.snippet__name { font-size: 0.8rem; font-weight: 640; color: var(--ink-2); }
.snippet pre {
  margin: 0; padding: 14px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6;
  color: var(--ink-2); white-space: pre-wrap; word-break: break-word;
}
.copy {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 620; cursor: pointer;
  padding: 0.34rem 0.75rem; border-radius: 980px;
  background: var(--card); border: 1px solid var(--line-strong); color: var(--ink-2);
  transition: all var(--fast) var(--ease);
}
.copy:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.copy.is-copied { background: var(--green); border-color: var(--green); color: #fff; }

/* ─── Session complete footer ────────────────────────────────── */

.module__end {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}
.module__end p { margin: 0; font-size: 0.88rem; color: var(--ink-3); }

/* ─── Quadrant plot ──────────────────────────────────────────── */

.plot-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-1);
}
.plot-frame { display: flex; gap: 12px; }
.plot-yaxis {
  writing-mode: vertical-rl; transform: rotate(180deg);
  text-align: center; font-size: 0.74rem; font-weight: 650;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4);
  padding-block: 18px;
}
.plot {
  position: relative; flex: 1; aspect-ratio: 1 / 0.82; min-height: 300px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background:
    linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat,
    var(--card-2);
}
.quad-label {
  position: absolute; font-size: 0.68rem; font-weight: 680;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-4);
  pointer-events: none; max-width: 44%;
}
.quad-label.tl { top: 10px; left: 12px; }
.quad-label.tr { top: 10px; right: 12px; text-align: right; }
.quad-label.bl { bottom: 10px; left: 12px; }
.quad-label.br { bottom: 10px; right: 12px; text-align: right; }
.quad-label.tl { color: var(--green); }
.quad-label.tr { color: var(--blue); }
.quad-label.br { color: var(--ink-4); }

.dot {
  position: absolute; width: 26px; height: 26px; padding: 0;
  transform: translate(-50%, 50%); border-radius: 50%;
  border: 2px solid var(--card); cursor: pointer;
  font-size: 0.64rem; font-weight: 700; color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-1);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.dot:hover, .dot:focus-visible { transform: translate(-50%, 50%) scale(1.28); z-index: 5; }
.dot.is-active { transform: translate(-50%, 50%) scale(1.35); box-shadow: 0 0 0 4px var(--blue-soft), var(--shadow-2); z-index: 6; }
.dot--inbox    { background: var(--blue); }
.dot--calendar { background: var(--green); }
.dot--meetings { background: var(--purple); }
.dot--exec     { background: var(--amber); }
.dot--travel   { background: var(--teal); }
.dot--risk     { background: var(--red); }

.plot-xaxis {
  text-align: center; font-size: 0.74rem; font-weight: 650;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4);
  margin-top: 10px;
}
.plot-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; }
.plot-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ink-3); }
.plot-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.plot-detail {
  margin-top: 16px; border-radius: var(--r-md); padding: 16px 18px;
  background: var(--bg-sunken); border: 1px solid var(--line);
  min-height: 96px;
}
.plot-detail h4 { font-size: 1.02rem; margin-bottom: 6px; }
.plot-detail p { font-size: 0.91rem; color: var(--ink-2); margin-bottom: 10px; }
.plot-detail__meta { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Filterable libraries ───────────────────────────────────── */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
  font-size: 0.82rem; font-weight: 560; cursor: pointer;
  padding: 0.4rem 0.88rem; border-radius: 980px;
  background: var(--card); border: 1px solid var(--line-strong); color: var(--ink-2);
  transition: all var(--fast) var(--ease);
}
.filter:hover { border-color: var(--ink-4); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }

.usecase {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 9px;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.usecase:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
/* display:flex above would otherwise beat the user-agent [hidden] rule. */
.usecase[hidden] { display: none; }
.usecase h4 { font-size: 1rem; }
.usecase p { font-size: 0.89rem; color: var(--ink-3); flex: 1; }
.usecase__meta { display: flex; flex-wrap: wrap; gap: 6px; }

.prompt-group { margin-bottom: 34px; }
.prompt-group__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.prompt-group__head h3 { font-size: 1.22rem; }
.prompt-group > p { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 14px; }

.prompt {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-1);
}
.prompt__head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; background: none; border: 0; cursor: pointer; text-align: left;
}
.prompt__head:hover { background: var(--card-2); }
.prompt__title { flex: 1; font-size: 0.97rem; font-weight: 620; }
.prompt__use { font-size: 0.8rem; color: var(--ink-4); display: block; font-weight: 450; margin-top: 2px; }
.prompt__caret {
  flex: none; color: var(--ink-4); font-size: 0.8rem;
  transition: transform var(--fast) var(--ease);
}
.prompt[open] .prompt__caret { transform: rotate(90deg); }
.prompt__body { padding: 0 18px 18px; }
.prompt__body pre {
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.62;
  white-space: pre-wrap; word-break: break-word; color: var(--ink-2);
  background: var(--bg-sunken); border-radius: var(--r-sm);
  padding: 14px; margin-bottom: 12px; overflow-x: auto;
}
.prompt__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.prompt__foot small { color: var(--ink-4); font-size: 0.78rem; max-width: 62%; }

.skill-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); box-shadow: var(--shadow-1); margin-bottom: 14px;
  overflow: hidden;
}
.skill-card__head { padding: 18px 18px 0; }
.skill-card__head h4 { font-size: 1.06rem; margin-bottom: 6px; }
.skill-card__head p { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 12px; }
.skill-card .snippet { margin: 0 18px 18px; }

/* ─── Quiz ───────────────────────────────────────────────────── */

.quiz-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-1);
  scroll-margin-top: 118px;
}
.q { padding: 20px 0; border-bottom: 1px solid var(--line); }
.q:last-of-type { border-bottom: 0; }
.q__num {
  font-size: 0.72rem; font-weight: 680; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-4); margin-bottom: 8px;
}
.q__stem { font-size: 1.02rem; font-weight: 560; margin-bottom: 14px; color: var(--ink); }
.q__stem em { font-style: normal; color: var(--ink-3); display: block; font-size: 0.92rem; font-weight: 420; margin-top: 6px; }
.opt {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid var(--line); background: var(--card-2); margin-bottom: 8px;
  font-size: 0.93rem; color: var(--ink-2);
  transition: all var(--fast) var(--ease);
}
.opt:hover { border-color: var(--ink-4); }
.opt input { margin-top: 3px; accent-color: var(--blue); flex: none; }
.opt.is-right { background: var(--green-soft); border-color: var(--green); color: var(--ink); }
.opt.is-wrong { background: var(--red-soft); border-color: var(--red); color: var(--ink); }
.opt.is-locked { cursor: default; }
.q__feedback {
  margin-top: 10px; font-size: 0.89rem; border-radius: var(--r-md);
  padding: 12px 14px; background: var(--bg-sunken); color: var(--ink-2);
  display: none;
}
.q.is-answered .q__feedback { display: block; }
.q__feedback b { color: var(--ink); }

.quiz-score {
  position: sticky; bottom: 12px; z-index: 40;
  margin-top: 22px; display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap; justify-content: space-between;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 18px; box-shadow: var(--shadow-2);
}
.quiz-score__num { font-size: 1.25rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.quiz-score__label { font-size: 0.84rem; color: var(--ink-3); }

/* ─── Certificate ────────────────────────────────────────────── */

.cert-gate {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 28px; box-shadow: var(--shadow-1);
  scroll-margin-top: 118px;
}
.checklist { list-style: none; margin: 18px 0 !important; padding: 0; }
.checklist li {
  display: flex; align-items: center; gap: 11px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 0.94rem; color: var(--ink-2);
}
.checklist li:last-child { border-bottom: 0; }
.checklist .tick {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  background: var(--bg-sunken); color: var(--ink-4);
  transition: all var(--fast) var(--ease);
}
.checklist li.is-met .tick { background: var(--green); color: #fff; }
.checklist li.is-met { color: var(--ink); }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 0.8rem; font-weight: 640;
  color: var(--ink-3); margin-bottom: 6px;
}
.field input {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 0.72rem 0.9rem; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--card-2);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-hp { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: 0.8rem; color: var(--ink-4); margin-top: 10px; }
.form-status { font-size: 0.88rem; margin-top: 12px; min-height: 1.2em; }
.form-status.ok  { color: var(--green); }
.form-status.err { color: var(--red); }

.certificate {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0b1b3a 0%, #14264f 45%, #241a4a 100%);
  color: #fff; border-radius: var(--r-xl); padding: 40px 34px;
  margin-top: 24px; text-align: center; box-shadow: var(--shadow-3);
}
.certificate::after {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(255,255,255,0.22); border-radius: var(--r-lg);
  pointer-events: none;
}
.certificate__seal {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(140deg, #ffd75e, #d99b1a);
  box-shadow: 0 6px 20px rgba(217,155,26,0.4);
}
.certificate__kicker {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.66); margin-bottom: 14px;
}
.certificate__name {
  font-size: clamp(1.7rem, 5.4vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.025em; margin-bottom: 8px; word-break: break-word;
}
.certificate__role { font-size: 0.96rem; color: rgba(255,255,255,0.78); margin-bottom: 20px; }
.certificate__body {
  font-size: 0.95rem; color: rgba(255,255,255,0.88); max-width: 480px;
  margin: 0 auto 24px; line-height: 1.6;
}
.certificate__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px;
  max-width: 520px; margin: 0 auto;
}
.certificate__grid b {
  display: block; font-size: 0.95rem; font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.certificate__grid span {
  font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.cert-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

/* ─── Congratulations layer ──────────────────────────────────── */

#confetti {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 150; display: none;
}
.toast-wrap {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 160; display: flex; flex-direction: column; gap: 10px;
  align-items: center; pointer-events: none; width: calc(100% - 32px);
  max-width: 420px;
}
.toast {
  display: flex; align-items: center; gap: 13px;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--line); border-radius: 980px;
  padding: 11px 20px 11px 12px; box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(18px) scale(0.94);
  animation: toast-in 480ms var(--ease) forwards;
  width: 100%;
}
.toast.is-out { animation: toast-out 320ms var(--ease) forwards; }
.toast__badge {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 1rem;
  background: var(--green); color: #fff;
  animation: pop 520ms var(--ease) 90ms both;
}
.toast__text b { display: block; font-size: 0.92rem; }
.toast__text span { font-size: 0.8rem; color: var(--ink-3); }

@keyframes toast-in  { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes pop {
  0%   { transform: scale(0.2); opacity: 0; }
  62%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes rise {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 560ms var(--ease) both; }

/* ─── Footer ─────────────────────────────────────────────────── */

.app-footer {
  margin-top: 70px; padding: 34px 0 46px;
  border-top: 1px solid var(--line); color: var(--ink-4); font-size: 0.85rem;
}
.app-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: space-between; }
.app-footer a { color: var(--ink-3); }

noscript .callout { margin: 20px 0; }

/* ─── Canvases ───────────────────────────────────────────────── */

.canvas {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-1);
  padding: 26px; margin-bottom: 22px; scroll-margin-top: 118px;
}
.canvas.is-full { border-color: var(--green); }
.canvas__head { margin-bottom: 18px; }
.canvas__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.canvas__head h3 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); margin-bottom: 8px; }
.canvas__lede { color: var(--ink-2); font-size: 0.99rem; }

.canvas__grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.canvas__grid.is-nine { grid-template-columns: repeat(3, 1fr); }

.cblock {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card-2); padding: 13px 14px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.cblock.is-filled { border-color: var(--green); background: var(--green-soft); }
.cblock__title {
  font-size: 0.86rem; font-weight: 650; margin-bottom: 3px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.cblock__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--line-strong); transform: translateY(-1px);
}
.cblock.is-filled .cblock__dot { background: var(--green); }
.cblock__hint { font-size: 0.76rem; color: var(--ink-4); margin-bottom: 8px; line-height: 1.42; }
.cblock textarea {
  font: inherit; font-size: 0.86rem; line-height: 1.5; color: var(--ink);
  width: 100%; flex: 1; min-height: 104px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); padding: 9px 10px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.cblock textarea::placeholder { color: var(--ink-4); opacity: 0.75; }
.cblock textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft);
}
.cblock__print { display: none; }

.canvas__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.canvas__close { font-size: 0.88rem; color: var(--ink-3); max-width: 60%; margin: 0; }
.canvas__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.canvas__fill {
  font-size: 0.78rem; font-weight: 640; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.canvas-ladder {
  display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
}
.canvas-ladder a {
  display: block; padding: 13px 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.canvas-ladder a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.canvas-ladder b { display: block; font-size: 0.92rem; font-weight: 640; margin: 5px 0 2px; }
.canvas-ladder span { font-size: 0.76rem; color: var(--ink-4); }

/* ─── Coverage checklist ─────────────────────────────────────── */

.coverage-head {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-1);
  padding: 24px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.coverage-dial { position: relative; width: 118px; height: 118px; flex: none; }
.coverage-dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.coverage-dial__track { fill: none; stroke: var(--bg-sunken); stroke-width: 10; }
.coverage-dial__value {
  fill: none; stroke: url(#coverGrad); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset var(--slow) var(--ease);
}
.coverage-dial__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.coverage-head__text { flex: 1; min-width: 240px; }
.coverage-head__band { font-size: 1.2rem; font-weight: 680; margin-bottom: 4px; }
.coverage-head__say { font-size: 0.92rem; color: var(--ink-3); margin-bottom: 10px; }
.coverage-head__count { font-size: 0.82rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }

.cov-group {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  margin-bottom: 12px; overflow: hidden;
}
.cov-group__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--card-2);
}
.cov-group__head h4 { font-size: 1rem; flex: 1; }
.cov-group__bar { width: 76px; height: 6px; border-radius: 980px; background: var(--bg-sunken); overflow: hidden; }
.cov-group__bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 980px; transition: width var(--slow) var(--ease); }
.cov-group__n { font-size: 0.78rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.cov-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.cov-item:last-child { border-bottom: 0; }
.cov-item:hover { background: var(--card-2); }
.cov-item input { margin-top: 3px; accent-color: var(--green); width: 17px; height: 17px; flex: none; }
.cov-item b { display: block; font-size: 0.92rem; font-weight: 570; }
.cov-item span { display: block; font-size: 0.8rem; color: var(--ink-4); margin-top: 2px; }
.cov-item.is-on b { color: var(--green); }

@media (max-width: 860px) {
  .canvas-ladder { grid-template-columns: repeat(2, 1fr); }
  .canvas__grid.is-nine { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .canvas { padding: 18px; border-radius: var(--r-lg); }
  .canvas__grid, .canvas__grid.is-nine { grid-template-columns: 1fr; }
  .canvas__close { max-width: 100%; }
  .coverage-head { gap: 16px; padding: 18px; }
  .coverage-dial { width: 92px; height: 92px; }
  .coverage-dial__num { font-size: 1.3rem; }
}

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 46px 0 20px; }
  .statstrip { grid-template-columns: repeat(2, 1fr); }
  .module { padding: 22px 18px; border-radius: var(--r-lg); }
  .do-dont, .field-row, .certificate__grid { grid-template-columns: 1fr; }
  .plot-card, .quiz-card, .cert-gate { padding: 18px; }
  .plot { min-height: 260px; aspect-ratio: 1 / 1.05; }
  .quad-label { font-size: 0.6rem; }
  .prompt__foot small { max-width: 100%; }
  .appbar__title { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* ─── Print ──────────────────────────────────────────────────────
   Two print modes, chosen by a data-print attribute the script sets
   on <body> just before window.print():
     "cert"   the certificate on its own
     "canvas" the single canvas marked .is-printing
   With no attribute set, printing falls back to the certificate,
   which is what a reader pressing Ctrl+P on this page expects.
   ─────────────────────────────────────────────────────────────── */

@media print {
  @page { margin: 14mm; }

  body { background: #fff; }
  .appbar, .rail-shell, .hero, .app-footer,
  .toast-wrap, #confetti { display: none !important; }

  /* Certificate mode, and the default. */
  body:not([data-print="canvas"]) .section { display: none !important; }
  body:not([data-print="canvas"]) #certificate-section { display: block !important; }
  body:not([data-print="canvas"]) .section__head,
  body:not([data-print="canvas"]) .cert-actions,
  body:not([data-print="canvas"]) .cert-form,
  body:not([data-print="canvas"]) .checklist,
  body:not([data-print="canvas"]) #cert-locked { display: none !important; }
  body:not([data-print="canvas"]) .cert-gate { border: 0; box-shadow: none; padding: 0; }
  body:not([data-print="canvas"]) .certificate {
    display: block !important; box-shadow: none; margin: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* Canvas mode: one canvas, filled in, on its own sheet. */
  body[data-print="canvas"] .section { display: none !important; }
  body[data-print="canvas"] #canvases { display: block !important; }
  body[data-print="canvas"] #canvases > .wrap > *:not(#canvas-list),
  body[data-print="canvas"] #canvas-list > .canvas:not(.is-printing) { display: none !important; }

  body[data-print="canvas"] .canvas.is-printing {
    display: block !important;
    border: 0; box-shadow: none; padding: 0; margin: 0;
  }
  body[data-print="canvas"] .canvas.is-printing .canvas__meta,
  body[data-print="canvas"] .canvas.is-printing .canvas__actions,
  body[data-print="canvas"] .canvas.is-printing .canvas__fill { display: none !important; }
  body[data-print="canvas"] .canvas.is-printing .canvas__head h3 { font-size: 20pt; margin-bottom: 4pt; }
  body[data-print="canvas"] .canvas.is-printing .canvas__lede { font-size: 9pt; color: #444; }
  body[data-print="canvas"] .canvas.is-printing .canvas__grid,
  body[data-print="canvas"] .canvas.is-printing .canvas__grid.is-nine {
    grid-template-columns: repeat(2, 1fr); gap: 8pt;
  }
  body[data-print="canvas"] .cblock {
    background: #fff; border: 1pt solid #999; border-radius: 3pt; padding: 7pt 8pt;
    break-inside: avoid; page-break-inside: avoid;
  }
  body[data-print="canvas"] .cblock.is-filled { background: #fff; border-color: #999; }
  body[data-print="canvas"] .cblock__dot { display: none; }
  body[data-print="canvas"] .cblock__title { font-size: 9.5pt; color: #000; }
  body[data-print="canvas"] .cblock__hint { font-size: 7.5pt; color: #666; }
  body[data-print="canvas"] .cblock textarea { display: none; }
  body[data-print="canvas"] .cblock__print {
    display: block; font-size: 9pt; line-height: 1.4; color: #000;
    white-space: pre-wrap; word-break: break-word; min-height: 46pt;
    border-top: 0.5pt solid #ddd; padding-top: 5pt;
  }
  body[data-print="canvas"] .cblock__print:empty::before {
    content: ""; display: block; min-height: 40pt;
  }
  body[data-print="canvas"] .canvas__foot { border-top: 0.5pt solid #999; margin-top: 10pt; padding-top: 6pt; }
  body[data-print="canvas"] .canvas__close { font-size: 8.5pt; color: #444; max-width: 100%; }
}
