/* Paretify design system, rebuilt from the Figma file's own styles and components.
   Used live on the Paretify project page and in its case study (no screenshots). */

.pf, .pf-case {
  --pf-green: #bdcac1;        /* Our green */
  --pf-dark: #737e6d;         /* Dark green */
  --pf-graphic: #a8cdb3;      /* Graphic green */
  --pf-brown: #cc9b70;        /* Light brown */
  --pf-text: #534f4c;         /* Black text */
  --pf-white: #ffffff;        /* Text and background */
  --pf-hover: #d8c4b1;        /* Hover button */
  --pf-hover-survey: #efe8e8; /* Hover survey button */
  --pf-bg: #f0e7df;           /* Background */
  --pf-shadow: #d8d0c9;       /* Shadow background */
  --pf-serif: "Merriweather", Georgia, serif;
  --pf-sans: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --pf-ui: "Inter", "Helvetica Neue", Arial, sans-serif;
}
.pf { color: var(--pf-text); }

/* Live components inside the project page's panels */
.pj-panel.pf-live { background: var(--pf-bg); }
.pj-panel.pf-live .pf-comp { width: min(280px, 100%); box-shadow: 0 2px 0 var(--pf-shadow); }

/* The board every live piece sits on: Paretify's own warm background */
.pf-board { background: var(--pf-bg); border-radius: 8px; padding: clamp(20px, 4vw, 48px); color: var(--pf-text); }
.pf-board + .pf-board { margin-top: 16px; }
.pf-board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.pf-board-head h3 { font-family: var(--pf-serif); font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--pf-text); }
.pf-board-head span { font-family: var(--pf-sans); font-size: 13px; color: #6b6560; }

/* Colour tokens */
.pf-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pf-swatch { background: var(--pf-white); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 0 var(--pf-shadow); }
.pf-swatch i { display: block; height: 78px; }
.pf-swatch div { padding: 10px 12px 12px; font-family: var(--pf-sans); }
.pf-swatch b { display: block; font-weight: 600; font-size: 14px; color: var(--pf-text); }
.pf-swatch code { display: block; margin-top: 2px; font-family: var(--pf-ui); font-size: 12px; color: #6b6560; }
.pf-swatch small { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; color: #6b6560; }

/* Type scale */
.pf-type { display: grid; gap: 2px; }
.pf-type-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: baseline; gap: 20px; padding: 14px 0; box-shadow: inset 0 -1px 0 var(--pf-shadow); }
.pf-type-row:last-child { box-shadow: none; }
.pf-type-meta { font-family: var(--pf-ui); font-size: 12px; line-height: 1.5; color: #6b6560; }
.pf-type-meta b { display: block; font-weight: 600; color: var(--pf-text); font-size: 13px; }
.pf-h1 { font-family: var(--pf-serif); font-weight: 700; font-size: clamp(32px, 4vw, 48px); line-height: 1; }
.pf-h2 { font-family: var(--pf-serif); font-weight: 700; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; }
.pf-h3 { font-family: var(--pf-sans); font-size: 25px; line-height: 1.28; }
.pf-lead { font-family: var(--pf-sans); font-size: 20px; line-height: 1.4; }
.pf-p { font-family: var(--pf-sans); font-size: 16px; line-height: 1.25; }
.pf-small { font-family: var(--pf-sans); font-size: 12px; line-height: 1.33; }
.pf-menu { font-family: var(--pf-ui); font-size: 20px; }

/* Components */
.pf-components { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pf-comp { background: var(--pf-white); border-radius: 6px; padding: 22px; display: grid; gap: 14px; align-content: start; }
.pf-comp-label { font-family: var(--pf-ui); font-size: 12px; color: #6b6560; }
.pf-comp.is-wide { grid-column: 1 / -1; }

.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 140px; height: 44px; padding: 0 24px;
  border: 0; border-radius: 17px; background: var(--pf-green); color: var(--pf-text);
  font-family: var(--pf-sans); font-weight: 700; font-size: 16px; cursor: pointer; transition: background-color 0.2s;
}
.pf-btn:hover { background: var(--pf-hover); }
.pf-btn.is-dark { background: var(--pf-dark); color: var(--pf-white); }
.pf-btn.is-dark:hover { background: #626b5d; }
.pf-btn.is-brown { background: var(--pf-brown); color: var(--pf-white); }
.pf-btn.is-brown:hover { background: #b9875d; }
.pf-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-link { font-family: var(--pf-sans); font-weight: 600; font-size: 16px; color: var(--pf-text); background: none; border: 0; padding: 0; cursor: pointer; }
.pf-link:hover { color: var(--pf-dark); }

/* 1 to 10 survey scale (Importance: green, Availability: brown) */
.pf-scale { display: grid; gap: 8px; }
.pf-scale-q { font-family: var(--pf-sans); font-size: 15px; }
.pf-scale-q b { font-family: var(--pf-serif); }
.pf-scale-dots { display: flex; align-items: center; gap: 0; }
.pf-scale-dots button {
  position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0;
  background: var(--pf-green); color: var(--pf-text); font-family: var(--pf-sans); font-size: 13px; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.pf-scale-dots button + button { margin-left: clamp(4px, 1.4vw, 14px); }
.pf-scale-dots button:hover { background: var(--pf-hover-survey); }
.pf-scale-dots button[aria-pressed="true"] { background: var(--pf-dark); color: var(--pf-white); transform: scale(1.08); }
.pf-scale.is-brown .pf-scale-dots button { background: #e6cdb6; }
.pf-scale.is-brown .pf-scale-dots button:hover { background: var(--pf-hover-survey); }
.pf-scale.is-brown .pf-scale-dots button[aria-pressed="true"] { background: var(--pf-brown); color: var(--pf-white); }
.pf-scale-ends { display: flex; justify-content: space-between; font-family: var(--pf-sans); font-size: 12px; color: #6b6560; max-width: 430px; }

/* Questionnaire list item */
.pf-item { background: var(--pf-white); border-radius: 6px; padding: 18px 20px; display: grid; gap: 8px; border: 1px solid var(--pf-shadow); box-shadow: 0 2px 0 var(--pf-shadow); }
.pf-item h4 { font-family: var(--pf-serif); font-weight: 700; font-size: 20px; line-height: 1.2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pf-badge { font-family: var(--pf-sans); font-weight: 700; font-size: 12px; line-height: 1.4; padding: 2px 8px; border-radius: 4px; background: var(--pf-brown); color: var(--pf-white); }
.pf-item p { font-family: var(--pf-sans); font-size: 14px; line-height: 1.45; color: #6b6560; }
.pf-item-meta { font-family: var(--pf-sans); font-size: 12px; color: #6b6560; }
.pf-item .pf-btn-row { margin-top: 6px; }
.pf-item .pf-btn { height: 34px; min-width: 0; padding: 0 16px; font-size: 13px; }

/* Category navigation */
.pf-nav { font-family: var(--pf-ui); display: grid; gap: 4px; }
.pf-nav-cat { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--pf-text); background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; }
.pf-nav-cat svg { width: 20px; height: 20px; color: var(--pf-brown); }
.pf-nav-sub { display: grid; gap: 2px; padding-left: 30px; }
.pf-nav-sub button { font-family: var(--pf-ui); font-size: 15px; color: #a19a94; background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; transition: color 0.15s; }
.pf-nav-sub button:hover { color: var(--pf-text); }
.pf-nav-sub button[aria-current="true"] { color: var(--pf-text); font-weight: 600; }

/* One question at a time: live demo */
.pf-q { background: var(--pf-white); border-radius: 6px; padding: clamp(18px, 3vw, 32px); display: grid; gap: 18px; box-shadow: 0 2px 0 var(--pf-shadow); }
.pf-q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.pf-q-top h4 { font-family: var(--pf-serif); font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); }
.pf-q-count { font-family: var(--pf-sans); font-size: 14px; color: #6b6560; white-space: nowrap; }
.pf-q-progress { height: 6px; border-radius: 3px; background: var(--pf-bg); overflow: hidden; }
.pf-q-progress i { display: block; height: 100%; background: var(--pf-dark); border-radius: 3px; transition: width 0.4s var(--ease-out, ease); }
.pf-q-body h5 { font-family: var(--pf-serif); font-weight: 700; font-size: 18px; }
.pf-q-body p { margin-top: 6px; font-family: var(--pf-sans); font-size: 15px; line-height: 1.5; color: #6b6560; }
.pf-q-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

@media (max-width: 760px) {
  .pf-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pf-swatch i { height: 52px; }
  .pf-components { grid-template-columns: 1fr; }
  .pf-type-row { grid-template-columns: 1fr; gap: 6px; }
  .pf-scale-dots button { width: 26px; height: 26px; font-size: 12px; }
  .pf-scale-dots button + button { margin-left: 3px; }
}

/* ======================================================================
   Paretify case study: its own look, built from the design system above.
   Every lesson is a warm Paretify board, counted like a questionnaire.
   ====================================================================== */
.pf-case { --pf-text-2: #6b6560; --pf-ink-brown: #8f6a45; }

/* Hero */
.pfc-top h1 { font-family: var(--pf-serif); font-weight: 700; font-size: clamp(2rem, 1.35rem + 2.4vw, 3.25rem); line-height: 1.15; letter-spacing: 0; max-width: 18ch; text-wrap: balance; }
.pfc-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.pfc-hero .case-logo { margin-bottom: 28px; }
.pfc-lede { margin-top: 22px; font-family: var(--pf-sans); font-size: 1.0625rem; line-height: 1.65; color: var(--fg-2); }
.pfc-facts { display: grid; font-family: var(--pf-sans); }
.pfc-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); font-size: 14px; }
.pfc-facts div:last-child { border-bottom: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); }
.pfc-facts dt { color: var(--fg-3); }
.pfc-facts dd { color: var(--fg); text-align: right; }
.pfc-index { margin-top: clamp(36px, 5vw, 56px); }
.pfc-index ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pfc-index a { display: grid; gap: 10px; align-content: start; height: 100%; padding: 16px 18px 18px; border-radius: 12px; background: var(--pf-bg); color: var(--pf-text); font-family: var(--pf-sans); font-size: 14px; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color 0.2s, transform 0.2s var(--ease-out, ease); }
.pfc-index a span { font-family: var(--pf-ui); font-weight: 400; font-size: 12px; color: var(--pf-ink-brown); }
.pfc-index a:hover { background: var(--pf-hover); transform: translateY(-2px); }

/* Lesson boards */
.pfc-body { padding-bottom: clamp(48px, 7vw, 96px); }
.pfc-lesson { background: var(--pf-bg); color: var(--pf-text); border-radius: 16px; padding: clamp(22px, 5vw, 72px); display: grid; gap: 28px; scroll-margin-top: 90px; }
.pfc-lesson + .pfc-lesson { margin-top: 20px; }
.pfc-head { display: grid; gap: 14px; }
.pfc-count { display: flex; align-items: center; gap: 14px; font-family: var(--pf-ui); font-size: 13px; color: var(--pf-text-2); }
.pfc-prog { width: 140px; height: 6px; border-radius: 3px; background: var(--pf-shadow); overflow: hidden; }
.pfc-prog i { display: block; height: 100%; border-radius: 3px; background: var(--pf-dark); }
.pfc-head h2 { font-family: var(--pf-serif); font-weight: 700; font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.375rem); line-height: 1.2; letter-spacing: 0; max-width: 24ch; color: var(--pf-text); text-wrap: balance; }
.pfc-head p { font-family: var(--pf-sans); font-size: 15px; color: var(--pf-text-2); }
.pfc-text { }
.pfc-text p { font-family: var(--pf-sans); font-size: 1.0625rem; line-height: 1.7; color: var(--pf-text); }
.pfc-text p + p { margin-top: 1em; }
.pfc-cap { margin-top: -14px; font-family: var(--pf-sans); font-size: 13px; line-height: 1.5; color: var(--pf-text-2); }
.pfc-card { background: var(--pf-white); border-radius: 10px; padding: clamp(14px, 2.4vw, 24px); box-shadow: 0 2px 0 var(--pf-shadow); }
.pfc-card img { width: 100%; height: auto; border-radius: 6px; }
.pfc-card figcaption { margin-top: 12px; font-family: var(--pf-sans); font-size: 13px; line-height: 1.5; color: var(--pf-text-2); }
.pfc-tag { display: inline-block; justify-self: start; margin-bottom: 12px; padding: 3px 10px; border-radius: 999px; background: var(--pf-bg); font-family: var(--pf-ui); font-size: 12px; font-weight: 600; color: var(--pf-text); }
.pfc-more .arrow-link { color: var(--pf-text); font-family: var(--pf-sans); font-weight: 600; }

/* Semester strip */
.pf-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.pf-strip li { background: var(--pf-white); border-radius: 10px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.pf-strip .wk { font-family: var(--pf-ui); font-size: 12px; color: var(--pf-text-2); }
.pf-strip b { font-family: var(--pf-serif); font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--pf-text); }
.pf-strip span:not(.wk) { font-family: var(--pf-sans); font-size: 13px; line-height: 1.45; color: var(--pf-text-2); }
.pf-strip li.is-turn { background: #5b6556; }
.pf-strip li.is-turn b, .pf-strip li.is-turn span { color: #fff; }

/* Annotated problems */
.pf-annot { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(18px, 3vw, 36px); align-items: center; }
.pf-annot img { border: 1px solid var(--pf-shadow); }
.pf-annot ol { display: grid; gap: 16px; counter-reset: n var(--start, 0); }
.pf-annot ol[start="3"] { --start: 2; }
.pf-annot li { position: relative; padding-left: 38px; font-family: var(--pf-sans); font-size: 14px; line-height: 1.55; color: var(--pf-text-2); counter-increment: n; }
.pf-annot li::before { content: counter(n); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--pf-ink-brown); color: #fff; font-family: var(--pf-ui); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.pf-annot li b { display: block; margin-bottom: 2px; font-weight: 700; color: var(--pf-text); }

/* Live before/after type specimen */
.pfc-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pfc-spec > div { border-radius: 10px; padding: clamp(16px, 2.4vw, 24px); display: grid; align-content: start; }
.pfc-spec-before { background: #fcfcfd; border: 1px solid #e3e3e6; }
.pfc-spec-before p { font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.4; color: #000; }
.pfc-spec-after { background: var(--pf-white); box-shadow: 0 2px 0 var(--pf-shadow); }
.pfc-spec-after p { font-family: var(--pf-sans); font-size: 16px; line-height: 1.5; color: var(--pf-text); }
.pfc-spec small { margin-top: 14px; font-family: var(--pf-sans); font-size: 12px; line-height: 1.5; color: var(--pf-text-2); }

/* Pull quotes */
.pfc-quote { position: relative; max-width: 760px; padding-left: clamp(36px, 4vw, 52px); }
.pfc-quote::before { content: "\201C"; position: absolute; left: 0; top: -0.18em; font-family: var(--pf-serif); font-weight: 700; font-size: clamp(3rem, 2.4rem + 2vw, 4.5rem); line-height: 1; color: var(--pf-brown); }
.pfc-quote p { font-family: var(--pf-serif); font-weight: 400; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.45; color: var(--pf-text); }
.pfc-quote cite { display: block; margin-top: 12px; font-family: var(--pf-sans); font-style: normal; font-size: 13px; color: var(--pf-text-2); }

/* Before / after screenshots */
.pfc-ba { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pfc-ba figure { display: grid; }

/* Palette comparison and type pairing */
.pf-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pf-compare > div, .pf-pairing > div { background: var(--pf-white); border-radius: 10px; padding: 20px; display: grid; gap: 12px; align-content: start; box-shadow: 0 2px 0 var(--pf-shadow); }
.pf-compare b, .pf-pairing b { font-family: var(--pf-serif); font-weight: 700; font-size: 16px; color: var(--pf-text); }
.pf-compare p, .pf-pairing p { font-family: var(--pf-sans); font-size: 14px; line-height: 1.55; color: var(--pf-text-2); }
.pf-chips { display: flex; height: 64px; border-radius: 6px; overflow: hidden; border: 1px solid var(--pf-shadow); }
.pf-chips i { flex: 1; }
.pf-pairing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pf-pairing > div { gap: 6px; }
.pf-pairing .big { font-size: 48px; line-height: 1.1; color: var(--pf-text); }

/* Test notes */
.pf-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pf-notes li { background: var(--pf-white); border-radius: 10px; padding: 20px; display: grid; gap: 10px; align-content: start; box-shadow: 0 2px 0 var(--pf-shadow); }
.pf-notes b { font-family: var(--pf-ui); font-weight: 600; font-size: 13px; color: var(--pf-text-2); }
.pf-notes q { font-family: var(--pf-serif); font-size: 16px; line-height: 1.55; color: var(--pf-text); quotes: "\201C" "\201D"; }
.pf-notes span { padding-top: 12px; border-top: 1px solid var(--pf-shadow); font-family: var(--pf-sans); font-size: 14px; line-height: 1.5; color: var(--pf-text); }
.pf-notes em { display: block; margin-bottom: 2px; font-style: normal; font-family: var(--pf-ui); font-size: 12px; font-weight: 600; color: var(--pf-ink-brown); }

/* Reflection and contrast ledger */
.pfc-reflect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pfc-reflect > div { background: var(--pf-white); border-radius: 10px; padding: 20px; box-shadow: 0 2px 0 var(--pf-shadow); }
.pfc-reflect b { font-family: var(--pf-serif); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--pf-text); }
.pfc-reflect p { margin-top: 8px; font-family: var(--pf-sans); font-size: 14px; line-height: 1.6; color: var(--pf-text-2); }
.pfc-ledger { display: grid; }
.pfc-ledger li { display: grid; grid-template-columns: 56px minmax(0, 1.2fr) 64px minmax(0, 0.9fr) minmax(0, 1.5fr); align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--pf-shadow); font-family: var(--pf-sans); font-size: 14px; color: var(--pf-text); }
.pfc-ledger li:first-child { padding-top: 0; }
.pfc-ledger li:last-child { border-bottom: 0; padding-bottom: 0; }
.pfc-sample { display: grid; place-items: center; height: 40px; border-radius: 8px; font-style: normal; font-weight: 700; font-size: 16px; border: 1px solid var(--pf-shadow); }
.pfc-ratio { font-family: var(--pf-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.pfc-status { justify-self: start; padding: 3px 10px; border-radius: 999px; font-family: var(--pf-ui); font-size: 12px; font-weight: 600; }
.pfc-status.is-pass { background: #e1eae3; color: #3d4a3f; }
.pfc-status.is-warn { background: #f3e6d6; color: #6e4b28; }
.pfc-status.is-fail { background: #f6dcd6; color: #87301e; }
.pfc-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 0; white-space: pre; color: var(--pf-text-2); font-size: 13px; }
.pfc-fix i { display: grid; place-items: center; width: 40px; height: 28px; border-radius: 6px; color: #fff; font-style: normal; font-weight: 700; font-size: 13px; flex: none; margin-right: 10px; }
.pfc-fix code { font-family: var(--pf-ui); color: var(--pf-text); }

.pf-case .case-end { margin-top: clamp(32px, 5vw, 56px); }

@media (max-width: 1000px) {
  .pfc-index ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pfc-hero, .pf-annot, .pfc-spec, .pfc-ba, .pf-compare, .pf-pairing, .pf-notes, .pfc-reflect { grid-template-columns: 1fr; }
  .pfc-index ol { grid-template-columns: 1fr; }
  .pfc-index a { grid-template-columns: 28px 1fr; gap: 8px; padding: 12px 14px; }
  .pf-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pfc-lesson { border-radius: 12px; gap: 24px; }
  .pfc-ledger li { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px 12px; }
  .pfc-status { grid-column: 2; }
  .pfc-fix { grid-column: 1 / -1; }
}

