/* ProductTrio course shell. Standalone: does not depend on the Webflow CSS.
   Brand tokens match the site: canvas, ink, indigo, gold. */

:root {
  --canvas: #fdfaf0;
  --surface: #ffffff;
  --surface-2: #f6f1e4;
  --ink: #1d1d1d;
  --ink-soft: #546681;
  --line: #e2dbc9;
  --indigo: #4d53c4;
  --indigo-soft: #eeeefa;
  --gold: #b8932e;
  --gold-soft: #fbf3dc;
  --green: #2f6b4f;
  --green-soft: #e9f2ed;
  --danger: #b3452f;
  --shadow: 0 1px 2px rgba(29, 29, 29, .05), 0 8px 24px -12px rgba(29, 29, 29, .16);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--indigo); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 16px; }
button { font: inherit; }

/* ---------- top bar ---------- */
.co-top { position: sticky; top: 0; z-index: 20; background: rgba(253, 250, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.co-top-in { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.co-logo img { display: block; height: 32px; width: auto; }
.co-course-name { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15px; }
.co-top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.co-progress { display: flex; align-items: center; gap: 10px; }
.co-progress-bar { width: 120px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.co-progress-bar span { display: block; height: 100%; width: 0; background: var(--indigo); transition: width .3s; }
.co-progress-label { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

/* ---------- buttons ---------- */
.co-btn, .co-btn-ghost, .co-btn-danger { display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; line-height: 1.2; }
.co-btn { background: var(--indigo); color: #fff; }
.co-btn:hover { background: #3f45b0; }
.co-btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.co-btn-ghost:hover { background: var(--ink); color: var(--canvas); }
.co-btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.co-btn-danger:hover { background: var(--danger); color: #fff; }
.co-btn:focus-visible, .co-btn-ghost:focus-visible, .co-btn-danger:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.co-top .co-btn-ghost { padding: 8px 14px; font-size: 13px; }

/* ---------- layout ---------- */
.co-shell { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 32px 24px 80px; }
.co-side { position: sticky; top: 76px; align-self: start; }
.co-side-k, .co-k { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.co-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.co-side-list a { display: grid; grid-template-columns: 26px 1fr 18px; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35; }
.co-side-list a:hover { background: var(--surface-2); }
.co-side-list li.active a { background: var(--indigo-soft); color: var(--indigo); font-weight: 600; }
.co-num { font-family: var(--mono); font-size: 12px; font-weight: 600; width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
li.active .co-num { border-color: var(--indigo); color: var(--indigo); }
.co-side-check { width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--line); justify-self: end; }
[data-done="1"] .co-side-check, .co-card[data-done="1"] .co-side-check { background: var(--green); border-color: var(--green); position: relative; }
[data-done="1"] .co-side-check::after, .co-card[data-done="1"] .co-side-check::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.co-side-foot { margin-top: 18px; font-size: 13px; color: var(--ink-soft); }

.co-main { min-width: 0; }
.co-article { max-width: 72ch; }
.co-eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--indigo); margin: 0 0 14px; }
.co-article h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-bottom: 18px; }
.co-outcome { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 0 0 36px; font-size: 15.5px; }
.co-outcome-k { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }

.co-lesson h2 { font-size: 23px; font-weight: 700; margin: 34px 0 12px; }
.co-lesson h2:first-child { margin-top: 0; }
.co-lesson p { font-size: 17px; }
.co-lesson ul { margin: 0 0 16px; padding-left: 22px; }
.co-lesson li { margin-bottom: 8px; font-size: 16.5px; }
.co-callout { background: var(--indigo-soft); border-left: 3px solid var(--indigo); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 18px 0 22px; font-size: 16.5px; font-weight: 600; }

.co-example { margin: 40px 0; background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 22px 24px; }
.co-example h3, .co-exercise h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.co-example p { color: var(--ink-soft); margin-bottom: 12px; }
.co-example p:last-child { margin-bottom: 0; }

.co-exercise { margin: 40px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.co-ex-intro { color: var(--ink-soft); }
.co-autosave { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-bottom: 14px; }
.co-autosave.saving { color: var(--indigo); }
.co-field { margin-bottom: 20px; }
.co-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.co-help { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 8px; }
.co-input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--canvas); font: inherit; font-size: 15px; color: var(--ink); }
.co-input:focus { outline: none; border-color: var(--indigo); background: #fff; }
.co-textarea { min-height: 84px; resize: vertical; }
.co-select { appearance: auto; }
.co-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.co-table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; }
.co-table th { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-2); padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.co-table td { padding: 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.co-table tr:last-child td { border-bottom: 0; }
.co-rown { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); width: 26px; text-align: center; padding-top: 12px !important; }
.co-cell { width: 100%; min-width: 150px; padding: 8px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; font-size: 14px; }
.co-cell:focus { outline: none; border-color: var(--indigo); background: #fff; }
.co-deck { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 12px; }
.co-deck b { color: var(--ink); }

.co-checkpoint { margin: 40px 0; padding: 22px 24px; background: var(--green-soft); border-radius: 12px; }
.co-checks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.co-checks label { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; cursor: pointer; }
.co-check { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); }
.co-complete-note { margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--green); }

.co-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.co-nav a { text-decoration: none; font-weight: 600; }
.co-nav-next { text-align: right; margin-left: auto; }

/* ---------- landing ---------- */
.co-landing { padding-bottom: 80px; }
.co-hero { background: linear-gradient(180deg, var(--surface-2), var(--canvas)); border-bottom: 1px solid var(--line); }
.co-hero-in, .co-modules-in, .co-who-in, .wb-head-in, .wb-body { max-width: 1000px; margin: 0 auto; padding: 56px 24px; }
.co-hero h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 18px; }
.co-lead { font-size: 18px; color: var(--ink-soft); max-width: 68ch; }
.co-lead strong { color: var(--ink); }
.co-hero-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 26px 0; }
.co-hero-facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.co-fact-k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.co-fact-v { font-size: 14.5px; line-height: 1.5; }
.co-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.co-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; }
.co-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.co-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.co-card:hover { transform: translateY(-2px); border-color: var(--indigo); }
.co-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.co-card-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.co-card .co-side-check { margin-left: auto; }
.co-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.co-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.co-who { background: var(--surface-2); border-top: 1px solid var(--line); }
.co-who h2 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.co-who p { max-width: 70ch; }

/* ---------- workbook ---------- */
.wb-head { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.wb-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 12px; }
.wb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.wb-import-label { cursor: pointer; }
.wb-module { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.wb-module h2 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.wb-module h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 10px; }
.wb-status { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 8px; border-radius: 4px; vertical-align: middle; margin-left: 8px; }
.wb-status.done { background: var(--green-soft); color: var(--green); }
.wb-status.todo { background: var(--surface-2); color: var(--ink-soft); }
.wb-field { margin-bottom: 14px; }
.wb-label { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.wb-value { white-space: pre-wrap; font-size: 15px; min-height: 22px; color: var(--ink); }
.wb-value:empty::before { content: "Not filled in yet"; color: var(--ink-soft); font-style: italic; }
.wb-table td { padding: 8px 10px; font-size: 14px; }
.wb-checks { padding-left: 20px; margin: 0; }
.wb-checks li { margin-bottom: 4px; color: var(--ink-soft); }
.wb-checks li.on { color: var(--ink); }
.wb-checks li.on::marker { color: var(--green); }
.wb-edit { margin: 12px 0 0; font-size: 13px; }

/* ---------- footer ---------- */
.co-foot { border-top: 1px solid var(--line); background: var(--surface-2); }
.co-foot-in { max-width: 1000px; margin: 0 auto; padding: 28px 24px; font-size: 13px; color: var(--ink-soft); }
.co-foot p { margin-bottom: 8px; max-width: 80ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .co-shell { grid-template-columns: 1fr; gap: 24px; }
  .co-side { position: static; }
  .co-side-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .co-course-name { display: none; }
  .co-progress-bar { width: 70px; }
}
@media (max-width: 600px) {
  .co-top .co-btn-ghost { display: none; }
  .co-nav { flex-direction: column; }
  .co-nav-next { text-align: left; margin-left: 0; }
}

/* ---------- print (workbook) ---------- */
@media print {
  .co-top, .co-foot, .wb-actions, .wb-edit, .co-note { display: none !important; }
  body { background: #fff; }
  .wb-module { break-inside: avoid; box-shadow: none; }
  .co-tablewrap { overflow: visible; }
  .co-table { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }
