/* ---------------------------------------------------------------
   Ceibal case study. Ceibal teal: --teal for text and borders,
   --teal-fill for fills only (it is too light for text on white).
   --------------------------------------------------------------- */
:root {
  --teal: #00635d;
  --teal-fill: #00a096;
  --card: rgba(30, 30, 30, 0.05);
  --lvl-1: #f2b01e;
  --lvl-2: #f48a2a;
  --lvl-3: #2f5bea;
}

.cb-fig { margin: var(--space-xl) 0 0; }
.cb-fig figcaption,
.cb-cap {
  max-width: 620px;
  margin-top: var(--space-sm);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.cb-vis { margin: var(--space-xl) 0 0; }
.cb-vis .cb-cap { margin-top: var(--space-sm); }

/* Cards: soft fill, no stroke. Scoped paragraphs beat the 17px body rule. */
.cb-row {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.cb-card {
  min-width: 0;
  padding: var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-lg);
}
.case-section .cb-card p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.cb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}
.cb-card h3 { margin-top: var(--space-xs); font-size: 19px; line-height: 1.3; }
.cb-big {
  display: block;
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.case-section .cb-card .cb-stat { margin-top: var(--space-xs); color: var(--ink); }
.case-section .cb-card .cb-stat > span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-muted); }
.case-section .cb-card .cb-stat .cb-big { margin: 0; font-size: 44px; color: var(--teal); }
.cb-card--num .cb-label { margin-bottom: var(--space-xs); }

/* Levels: three bands that narrow. */
.cb-levels { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-lvl { padding: 14px 18px; border-radius: var(--radius-sm); text-align: center; color: #1a1a14; }
.cb-lvl h3 { font-size: 17px; line-height: 1.3; font-family: var(--font-sans); font-weight: 600; }
.case-section .cb-lvl p { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: inherit; }
.cb-lvl--1 { width: 100%; background: var(--lvl-1); }
.cb-lvl--2 { width: 86%; background: var(--lvl-2); }
.cb-lvl--3 { width: 72%; background: var(--lvl-3); color: #fff; }
@media (max-width: 480px) { .cb-lvl--2 { width: 94%; } .cb-lvl--3 { width: 88%; } }

/* Full meetings vs small workshop. */
.cb-compare { display: grid; gap: var(--space-md); grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .cb-compare { grid-template-columns: 1fr; } }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-sm) 0 0; padding: 0; list-style: none; }
.cb-chips li { padding: 5px 12px; border-radius: var(--radius-pill); background: rgba(30, 30, 30, 0.08); font-size: 14px; line-height: 1.4; }
.cb-result {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 160, 150, 0.12);
  border: 2px solid var(--teal);
  border-radius: var(--radius-sm);
}
.case-section .cb-result p { margin: 0; color: var(--ink); }
.cb-result b { display: block; margin: 2px 0; font-family: var(--font-serif); font-size: 19px; line-height: 1.3; }

/* Images */
.cb-map { display: flex; justify-content: center; background: #f9f9f9; border-radius: var(--radius-lg); overflow: hidden; }
.cb-map img { width: 100%; max-width: 460px; height: auto; border-radius: 0; }
.cb-photo img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.cb-shot {
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  background: #fff;
}

/* Five areas */
.cb-areas {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}
.cb-area h3 span { display: block; }
.cb-area h3 .en,
.cb-area li .en { margin-top: 2px; font-family: var(--font-sans); font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--ink-muted); }
.cb-area ul { margin: var(--space-sm) 0 0; padding: 0; list-style: none; }
.cb-area li { margin-bottom: var(--space-sm); font-size: 15px; line-height: 1.4; }
.cb-area li .es { display: block; font-weight: 600; }
.case-section .cb-card .more { margin-top: var(--space-xs); font-size: 14px; font-weight: 600; color: var(--ink); }

/* Level 1 website: tabs over scroll windows (desktop), plain list (mobile). */
.cb-desk { display: none; }
.cb-mob { display: block; }
@media (min-width: 820px) { .cb-desk { display: block; } .cb-mob { display: none; } }

.cb-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--space-md); border-bottom: 2px solid var(--rule); }
.cb-tabs button {
  min-height: 44px;
  padding: 0 16px;
  margin-bottom: -2px;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
}
.cb-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--teal); }
.cb-tabs button:focus-visible,
.cb-vport:focus-visible,
.cb-hot:focus-visible,
.cb-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.cb-vport {
  height: clamp(360px, 70vh, 620px);
  overflow: auto;
  margin-top: var(--space-md);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
  background: #fff;
  overscroll-behavior: contain;
}
.cb-vport img { display: block; width: 100%; max-width: none; height: auto; border-radius: 0; }

.cb-flow { margin: var(--space-md) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-xs); }
.cb-flow li {
  padding: var(--space-sm) var(--space-md);
  background: var(--card);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--teal);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.cb-flow b { color: var(--ink); font-weight: 600; }

/* Level 2 click-through (desktop only). */
.cb-proto { display: none; }
@media (min-width: 820px) { .cb-proto { display: block; } .cb-simple { display: none; } }
.cb-pframe { position: relative; margin-top: var(--space-md); }
.cb-pframe img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14); }
.cb-hot {
  position: absolute;
  padding: 0;
  background: transparent;
  border: 3px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--teal);
  cursor: pointer;
}
.cb-hot[hidden] { display: none; }
.cb-hot:hover { background: rgba(0, 160, 150, 0.15); }
.cb-hot:focus-visible { outline-offset: 8px; }
.case-section .cb-pcap { margin-top: var(--space-sm); font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.cb-link {
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: underline;
}
.cb-link[hidden] { display: none; }
.case-section h3.cb-h3 { margin-top: var(--space-xl); font-size: 22px; line-height: 1.3; }
@media (prefers-reduced-motion: no-preference) { .cb-pframe img { transition: opacity 150ms; } }

/* The quote under the hero sat between 80px of padding above and below plus
   80px more on the body, a gulf. Keep a clear but modest gap. */
.pullquote--hero { padding-block: var(--space-2xl) 0; }
.pullquote--hero + .case-body { padding-top: var(--space-2xl); }
@media (max-width: 760px) {
  .pullquote--hero { padding-block: var(--space-xl) 0; }
  .pullquote--hero + .case-body { padding-top: var(--space-xl); }
}

/* Caption on the left, "Restart the flow" on the right, on one line. */
.cb-prow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-sm); }
.case-section .cb-prow .cb-pcap { margin: 0; }
.cb-prow .cb-link { flex: none; margin-left: auto; }

/* One rhythm for the whole page: 16px from a heading or a paragraph to what
   follows, 32px around every visual (above and below), 64px between sections. */
.cb-row.cb-vis { margin-top: var(--space-xl); }
.case-section :is(figure, .cb-row, .cb-compare, .cb-areas, .cb-proto, .cb-simple, .cb-flow) + p { margin-top: var(--space-xl); }
.case-section :is(.cb-desk, .cb-mob) + :is(p, h3) { margin-top: var(--space-xl); }
