/* Growlyze brand colours (growlyze.com). Dark matches its dark sections: #120825 page,
   #413951 borders, white headings, #d0ced3 body text, #e3632c orange. */
:root {
  color-scheme: dark;
  --bg: #120825;
  --surface: #120825;
  --surface-hover: #170c2e;
  --border: #413951;
  --text: #ffffff;
  --text-muted: #d0ced3;
  --accent: #e3632c;
  --accent-text: #e3632c;
  --on-accent: #ffffff;
  --accent-strong: #ef7a48;
  --accent-vivid: #e3632c;
  --accent-soft: rgba(227, 99, 44, 0.12);
  --accent-glow: rgba(227, 99, 44, 0.3);
  --chip-bg: rgba(227, 99, 44, 0.12);
  --chip-text: #ef7a48;
  --ink-shadow: #e3632c;
  --logo-badge-bg: #ffffff;
  --radius: 16px;
  --shadow: none;
  --shadow-hover: 5px 5px 0 var(--ink-shadow);
}

/* Light: cream #f5f0e6, ink #140827, orange #f55809. Small orange text uses a deeper shade
   (#b8410a) so it stays readable on cream. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f0e6;
  --surface: #fffcf6;
  --surface-hover: #ffffff;
  --border: #e5dac6;
  --text: #140827;
  --text-muted: #5c5468;
  --accent: #f55809;
  --accent-text: #b8410a;
  --on-accent: #ffffff;
  --accent-strong: #d94a04;
  --accent-vivid: #f55809;
  --accent-soft: rgba(245, 88, 9, 0.1);
  --accent-glow: rgba(245, 88, 9, 0.2);
  --chip-bg: rgba(245, 88, 9, 0.1);
  --chip-text: #a83c08;
  --ink-shadow: #140827;
  --logo-badge-bg: #ffffff;
  --shadow: 0 1px 2px rgba(20, 8, 39, 0.05);
  --shadow-hover: 5px 5px 0 var(--ink-shadow);
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.admin-main { padding-top: 40px; padding-bottom: 40px; }
.admin-gate {
  max-width: 520px;
  margin: 48px auto;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.admin-gate h1 {
  margin: 0 0 12px;
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 25px;
}
.admin-gate p { margin: 0 0 20px; color: var(--text-muted); line-height: 1.6; }
.admin-page #app.container { padding-left: 0; padding-right: 0; }

a { color: inherit; text-decoration: none; }

.site-header {
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-vivid), var(--accent-strong));
  box-shadow: 0 2px 8px -2px var(--accent-glow);
  flex-shrink: 0;
}

.brand-mark span {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-nav a:hover { color: var(--accent); background: var(--accent-soft); }

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 30px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.theme-switch:hover { border-color: var(--accent); }

.theme-switch-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 5px;
}

.theme-switch-icon { font-size: 11px; line-height: 1; opacity: 0.8; }

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-vivid), var(--accent-strong));
  box-shadow: 0 2px 6px -1px var(--accent-glow);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="light"] .theme-switch-thumb { transform: translateX(24px); }

#app { padding: 48px 24px 80px; }

.category-section {
  margin-bottom: 44px;
}

.section-title {
  text-align: center;
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.grid > * {
  flex: 0 1 calc((100% - 36px) / 3);
  min-width: 0;
}

@media (max-width: 900px) {
  .grid > * { flex-basis: calc((100% - 18px) / 2); }
}

@media (max-width: 600px) {
  .grid > * { flex-basis: 100%; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 100%;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  margin-top: auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.card-cta span { transition: transform 0.15s ease; }

.card:hover .card-cta,
.card:focus-visible .card-cta {
  background: var(--accent);
  color: var(--on-accent);
}

.card:hover .card-cta span,
.card:focus-visible .card-cta span { transform: translateX(3px); }

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface-hover);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--accent-soft);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Color groups for emoji-only categories, so related sections (AI agents, PM tools,
   reporting) read as a family at a glance. No effect on tiles filled by a logo image. */
.card-icon.tint-indigo { background: rgba(99, 102, 241, 0.18); }
.card-icon.tint-violet { background: rgba(167, 139, 250, 0.2); }
.card-icon.tint-pink { background: rgba(244, 114, 182, 0.18); }
.card-icon.tint-amber { background: rgba(251, 191, 36, 0.2); }
.card-icon.tint-teal { background: rgba(45, 212, 191, 0.18); }
.card-icon.tint-orange { background: rgba(251, 146, 60, 0.2); }
.card-icon.tint-blue { background: rgba(96, 165, 250, 0.18); }

.card-icon .emoji-icon { font-size: 26px; line-height: 1; }

/* A logo that already has its own solid background is drawn edge-to-edge, no inset. */
.brand-logo-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--logo-badge-bg);
  border-radius: 10px;
}

.logo-badge img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* Multiple logos (e.g. Make & Zapier) get their own separate tiles side by side
   instead of being squeezed into one shared box. */
.card-icon-group {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.card-icon-group .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin-bottom: 0;
}

.category-header .card-icon-group .card-icon {
  width: 56px;
  height: 56px;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.logo-row .logo-badge {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.logo-row .brand-logo-fill {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.tag-pill .logo-badge {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
}

.tag-pill .brand-logo-fill {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  flex-shrink: 0;
}

.tag-pill .emoji-icon { font-size: 12px; }

.card h3 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.category-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 40px;
}

.category-header .card-icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-bottom: 0;
}

.category-header .card-icon .emoji-icon { font-size: 30px; }

.category-header h1 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 27px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.category-header p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 560px;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* keep the button from touching the tags above it */
.card > .tag-row { margin-bottom: 16px; }

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 3px 9px 3px 3px;
  border-radius: 999px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14.5px;
  flex-basis: 100%;
}

.case-detail-wrap {
  max-width: 700px;
  margin: 0 auto;
}

.case-detail-header {
  margin-bottom: 36px;
}

.case-detail-header h1 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.case-detail-header > p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 16px;
}

.case-detail-content {
  margin-bottom: 32px;
}

.content-align--center { text-align: center; }
.content-align--right { text-align: right; }
.content-align--justify { text-align: justify; }

.case-detail-content h3 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin: 52px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.case-detail-content h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* When a heading is introduced by an eyebrow label right above it, the
   eyebrow already reads as the section divider, so don't double it up. */
.case-detail-content .content-eyebrow + h3 {
  margin-top: 6px;
  padding-top: 0;
  border-top: none;
}

.case-detail-content p {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}

.case-detail-content .content-label {
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 8px;
  font-size: 17px;
}

.case-detail-content h4 {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
}

.case-detail-content .content-eyebrow {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  margin: 48px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.case-detail-content .content-eyebrow:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.case-detail-content h3 + .content-eyebrow {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content-figure {
  margin: 28px 0 32px;
}

.content-image {
  display: block;
  max-width: 100%;
  cursor: zoom-in;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.content-figure figcaption {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.55;
}

.content-list {
  margin: 0 0 18px;
  padding-left: 22px;
}

.content-list li {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 8px;
}

.content-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.stat-tile {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}

.stat-value {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.content-table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.content-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.55;
}

.content-table th {
  background: var(--surface-hover);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.content-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.content-table tr:last-child td { border-bottom: none; }

.content-quote {
  margin: 14px 0 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface-hover);
  border-radius: 0 10px 10px 0;
}

.content-quote p {
  font-size: 16px;
  font-style: italic;
  margin: 0 0 8px;
}

.content-quote cite {
  font-size: 12.5px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

/* ---- Readability and accessibility polish ---- */

.content-list li::marker { color: var(--accent); }
.content-list li strong { font-weight: 700; }

.content-table tbody tr:nth-child(even) td { background: var(--surface-hover); }
.content-table td:first-child { font-weight: 600; }

.content-image {
  box-shadow: var(--shadow);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  #app { padding: 28px 16px 56px; }
  .container { padding: 0 16px; }
  .case-detail-header h1 { font-size: 25px; }
  .case-detail-header > p { font-size: 17px; }
  .case-detail-content .content-eyebrow { font-size: 19px; margin-top: 40px; padding-top: 22px; }
  .case-detail-content h3 { font-size: 20px; margin-top: 40px; padding-top: 22px; }
  .case-detail-content h4 { font-size: 17.5px; }
  .case-detail-content p,
  .content-list li,
  .case-detail-content .content-label { font-size: 16px; }
  .content-stats { grid-template-columns: repeat(2, 1fr); }
  .content-table { font-size: 13px; }
  .category-header h1 { font-size: 23px; }
}

/* ---- Lone and paired cards fill the row instead of leaving empty space ---- */

.grid.grid--solo > * { flex-basis: 100%; }
.grid.grid--duo > * { flex-basis: calc((100% - 18px) / 2); }

@media (min-width: 701px) {
  .grid--solo > .card--row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon title cta" "icon desc cta";
    column-gap: 24px;
    row-gap: 0;
    align-items: center;
    padding: 26px 32px;
    height: auto;
  }

  .card--row > .card-icon,
  .card--row > .card-icon-group { grid-area: icon; margin: 0; }
  .card--row > h3 { grid-area: title; margin: 0 0 4px; align-self: end; font-size: 19px; }
  .card--row > p { grid-area: desc; margin: 0; align-self: start; max-width: 72ch; }
  .card--row > .card-cta { grid-area: cta; margin: 0; align-self: center; white-space: nowrap; }

  .grid--solo > .card--row.card--row-case {
    grid-template-columns: 1fr auto;
    grid-template-areas: "title cta" "desc cta" "tags cta";
  }
  .card--row-case > .tag-row { grid-area: tags; margin: 12px 0 0; }
}

@media (max-width: 600px) {
  .grid.grid--duo > * { flex-basis: 100%; }
}

/* Cards in the same row stretch to the same height. */
.grid > .card { height: auto; align-self: stretch; }

/* ---- Click-to-enlarge screenshots ---- */

.content-image:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 20px 24px;
  background: rgba(10, 12, 24, 0.88);
  cursor: zoom-out;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  cursor: default;
}

.lightbox-caption {
  max-width: 760px;
  margin: 0;
  color: #e5e7f2;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }

/* ---- "Works with" box at the top of a case study ---- */

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.quick-facts-label {
  font-family: 'Sora', 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quick-facts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.quick-facts-list li {
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

/* Screenshots narrower than the column (a phone-sized slide, for example) sit
   centred, with the caption wrapping to the image's width instead of widening it. */

.content-figure {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.content-figure figcaption {
  width: 0;
  min-width: 100%;
}

/* ---- Code snippets inside case studies ---- */

.content-code {
  margin: 18px 0 22px;
  padding: 14px 18px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  tab-size: 4;
}

.content-code code {
  font: inherit;
  white-space: pre;
}

.content-code:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Notion-style page parts: cover, icon, callout, divider, inline formatting ---------- */
.case-cover {
  position: relative;
  margin: 0 0 28px;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-hover);
}
.case-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .case-cover { height: 160px; } }

.case-icon {
  display: block;
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: none;
  font-size: 64px;
  line-height: 1.1;
}
.case-icon--over { margin-top: -66px; position: relative; z-index: 1; }

.card--cover { padding-top: 0; overflow: hidden; }
.card-cover {
  margin: 0 -22px 18px;
  height: 140px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}
.card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-case-icon { font-size: 1.15em; }

.content-olist li::marker { color: var(--accent); font-weight: 700; }

.content-callout {
  display: flex;
  gap: 12px;
  margin: 16px 0 20px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent-soft);
}
.callout-icon { flex: none; font-size: 22px; line-height: 1.5; }
.case-detail-content .callout-text { flex: 1; min-width: 0; font-size: 16.5px; line-height: 1.7; }
.callout-green { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.25); }
.callout-blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); }
.callout-yellow { background: rgba(234, 179, 8, 0.14); border-color: rgba(234, 179, 8, 0.3); }
.callout-red { background: rgba(239, 68, 68, 0.11); border-color: rgba(239, 68, 68, 0.25); }
.callout-gray { background: var(--surface-hover); border-color: var(--border); }

.content-divider { margin: 32px 0; border: none; border-top: 1px solid var(--border); }

.case-detail-content p code,
.case-detail-content li code,
.case-detail-content td code,
.callout-text code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.case-detail-content p a,
.case-detail-content li a,
.case-detail-content td a,
.callout-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Case study editor (admin only, see editor.js) ---------- */
.ed-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ed-link:hover { color: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 6px; }
.ed-login-link {
  min-height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.ed-login-link:hover { color: var(--accent); background: var(--accent-soft); }
.ed-login-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) {
  .ed-login-link { padding: 0 8px; }
  .ed-hide-sm { display: none; }
}

.ed-admin-chip {
  position: relative;
  padding: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--chip-text);
}
.ed-admin-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 12px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ed-admin-toggle:hover, .ed-admin-toggle:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ed-admin-toggle:focus-visible, .ed-admin-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-admin-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 172px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-admin-menu[hidden] { display: none; }
.ed-admin-menu button {
  padding: 9px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.ed-admin-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.ed-admin-menu button[data-act="logout"] { border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; }
.ed-admin-menu button[data-act="change-password"] + button { margin-top: 3px; }
@media (max-width: 600px) {
  .ed-admin-toggle { padding: 5px 10px; }
  .ed-admin-toggle span:first-child { display: none; }
}
@media (hover: none) {
  .ed-kbd { display: none; }
}

.ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ed-btn:hover { border-color: var(--accent); }
.ed-btn:focus-visible, .ed-tool:focus-visible, .ed-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-btn--primary { background: var(--accent-vivid); border-color: var(--accent-vivid); color: #fff; }
.ed-btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.ed-btn--ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.ed-btn--small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.ed-kbd { font-size: 11px; font-weight: 500; opacity: 0.75; }

.ed-view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.ed-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--chip-bg);
  color: var(--chip-text);
}

.ed-banner {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.ed-banner kbd {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 12px;
}

.ed-editing [contenteditable] {
  outline: none;
  border-radius: 6px;
  transition: box-shadow 0.12s ease, background 0.12s ease;
  cursor: text;
}
.ed-editing [contenteditable]:hover { background: var(--accent-soft); }
.ed-editing [contenteditable]:focus { box-shadow: 0 0 0 2px var(--accent); background: transparent; }
.ed-editing [contenteditable][data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  opacity: 0.7;
  pointer-events: none;
}
.ed-title { min-height: 1.2em; }
.ed-description { min-height: 1.5em; }

.ed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  border: none;
}
.ed-tags legend {
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ed-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
}
.ed-chip:has(input:checked) { border-color: var(--accent); background: var(--chip-bg); color: var(--chip-text); }
.ed-chip input { accent-color: var(--accent-vivid); margin: 0; }

.ed-blocks { padding-bottom: 110px; }
.ed-block {
  position: relative;
  margin: 0 -12px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px dashed transparent;
}
.ed-block:hover, .ed-block:focus-within { border-color: var(--border); }
.ed-block .ed-body > :first-child { margin-top: 0; }
.ed-block .ed-body > :last-child { margin-bottom: 0; }
.ed-tools {
  position: absolute;
  top: -15px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.ed-block:hover > .ed-tools, .ed-block:focus-within > .ed-tools { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .ed-tools { position: static; opacity: 1; pointer-events: auto; width: max-content; margin: 0 0 6px auto; box-shadow: none; }
}
.ed-type {
  height: 26px;
  padding: 0 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
select.ed-type { cursor: pointer; }
select.ed-type:hover { background: var(--accent-soft); }
.ed-type--fixed { display: inline-flex; align-items: center; color: var(--text-muted); }
.ed-tool {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.ed-tool:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.ed-tool:disabled { opacity: 0.3; cursor: default; }
.ed-tool--danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.14); }

.ed-add-end {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ed-add-end:hover { border-color: var(--accent); color: var(--accent); }

.ed-editing .content-list li { min-height: 1.5em; }
.ed-image { cursor: default; }
.ed-block--img .ed-btn { margin-top: 8px; }
.ed-tile { position: relative; }
.ed-x {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.ed-x:hover { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.ed-tile .ed-x { position: absolute; top: 4px; right: 4px; }
.ed-editing .content-table th { position: relative; }
.ed-editing .content-table th .ed-x { position: absolute; top: 4px; right: 2px; }
.ed-editing .content-table th .ed-cell { padding-right: 18px; }
.ed-cell { min-height: 1.4em; min-width: 3em; }
.ed-row-x { width: 30px; padding: 4px !important; background: transparent !important; }
.ed-inline-actions { display: flex; gap: 8px; margin-top: 8px; }

.ed-menu {
  position: absolute;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-menu-title {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ed-menu button {
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.ed-menu button:hover, .ed-menu button:focus { background: var(--accent-soft); color: var(--accent); outline: none; }

.ed-savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.25);
}
.ed-savebar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.ed-status { font-size: 14px; color: var(--text-muted); }
.ed-savebar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ed-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 10, 16, 0.6);
}
.ed-modal-box {
  width: 100%;
  max-width: 380px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-modal-box h2 { margin: 0 0 6px; font-family: 'Sora', 'Inter', sans-serif; font-size: 20px; }
.ed-modal-box > p { margin: 0 0 18px; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.ed-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.ed-field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.ed-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ed-error { margin: 10px 0 0; font-size: 13px; color: #ef4444; }
.ed-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
/* All case studies list (admin): name, category, Shown/Hidden status and a button to switch it */
.ed-case-list-box { width: min(880px, calc(100vw - 32px)); max-width: none; }
.ed-case-list-count { margin: 0 0 12px; }
.ed-case-list-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ed-case-list-filters input, .ed-case-list-filters select {
  min-height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
.ed-case-list-search { flex: 1 1 220px; }
.ed-case-list-scroll { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ed-case-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ed-case-table th {
  position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-hover); border-bottom: 1px solid var(--border);
}
.ed-case-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ed-case-table tr:last-child td { border-bottom: 0; }
.ed-case-table tr[hidden] { display: none; }
.ed-case-table a { color: var(--text); font-weight: 600; text-decoration: none; }
.ed-case-table a:hover { color: var(--accent-text, var(--accent)); text-decoration: underline; }
.ed-case-num { width: 36px; color: var(--text-muted); font-size: 12px; }
.ed-case-date { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.ed-case-cats { font-size: 13px; color: var(--text-muted); }
.ed-case-list-toggle { white-space: nowrap; }
.ed-case-list-empty { margin: 0; padding: 18px; text-align: center; color: var(--text-muted); }
.ed-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ed-status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ed-status-pill.is-shown { color: var(--tc-green); background: color-mix(in srgb, var(--tc-green) 14%, transparent); }
.ed-status-pill.is-hidden { color: var(--tc-gray); background: color-mix(in srgb, var(--tc-gray) 16%, transparent); }
.ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .ed-case-num, .ed-case-table th:first-child, .ed-case-cats, .ed-case-table th:nth-child(3) { display: none; }
}

/* Header button that opens the list */
.ed-cases-link {
  min-height: 34px; margin-right: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ed-cases-link:hover { border-color: var(--accent-vivid); color: var(--accent-text, var(--accent)); }
:root:not([data-theme="light"]) .ed-cases-link { color: #120825; border-color: rgba(18, 8, 37, 0.2); }

.ed-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 120;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-hover);
}
.ed-toast--error { background: #dc2626; color: #fff; }

/* Cover, icon and page-level actions while editing */
.ed-cover-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.ed-cover:hover .ed-cover-actions, .ed-cover:focus-within .ed-cover-actions { opacity: 1; }
@media (hover: none) { .ed-cover-actions { opacity: 1; } }
.ed-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 120px;
  margin: 0 0 24px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.ed-cover-empty strong { color: var(--text); font-size: 15px; }
.ed-cover-empty:hover, .ed-cover-empty:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.ed-cover-empty:hover strong { color: var(--accent); }
.ed-cover-empty-icon { font-size: 30px; }
.ed-icon { cursor: pointer; border-radius: 12px; }
.ed-icon:hover { background: var(--accent-soft); }
.ed-page-actions { display: flex; gap: 6px; margin: 0 0 8px; }
.ed-page-action {
  padding: 5px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.ed-page-action:hover { background: var(--accent-soft); color: var(--accent); }
.ed-callout-icon { border: none; background: none; padding: 0 2px; border-radius: 6px; cursor: pointer; }
.ed-callout-icon:hover { background: rgba(127, 127, 127, 0.15); }

/* Drag handle, drop line */
.ed-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: -2px;
  user-select: none;
}
.ed-handle:active { cursor: grabbing; }
.ed-dragging { opacity: 0.45; }
.ed-drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.ed-drop-after { box-shadow: 0 3px 0 0 var(--accent); }
.ed-tone { max-width: 84px; }

/* Block menu with filter, emoji picker, cover picker */
.ed-block-menu { width: 280px; max-height: 360px; padding: 6px; }
.ed-menu-filter {
  width: 100%;
  margin-bottom: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.ed-menu-filter:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ed-menu-list { display: flex; flex-direction: column; overflow-y: auto; max-height: 300px; }
.ed-menu-list button { display: flex; flex-direction: column; gap: 1px; }
.ed-menu-list button[hidden] { display: none; }
.ed-menu-list button.is-active { background: var(--accent-soft); color: var(--accent); }
.ed-menu-label { font-weight: 600; }
.ed-menu-desc { font-size: 12px; color: var(--text-muted); }
.ed-emoji-menu { width: 300px; gap: 8px; }
.ed-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ed-emoji-grid button { padding: 4px !important; font-size: 20px !important; text-align: center !important; }
.ed-emoji-own { display: flex; gap: 6px; }
.ed-emoji-own input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.ed-cover-menu { width: 320px; gap: 8px; }
.ed-cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 220px; overflow-y: auto; }
.ed-cover-grid button { padding: 0 !important; height: 64px; overflow: hidden; border: 1px solid var(--border) !important; }
.ed-cover-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Floating formatting bar over selected text */
.ed-format {
  position: absolute;
  z-index: 70;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-format button {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ed-format button:hover { background: var(--accent-soft); color: var(--accent); }
.ed-format button.is-on { background: var(--accent-soft); color: var(--accent); }

/* "Add a case study" card and dialog */
.card.ed-add-case {
  align-items: flex-start;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed var(--border);
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.card.ed-add-case:hover, .card.ed-add-case:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.ed-add-case-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--accent-vivid);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.ed-new-box { max-width: 560px; }
.ed-field em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.ed-new-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
@media (max-width: 560px) { .ed-new-options { grid-template-columns: 1fr; } }
.ed-new-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 2px dashed var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ed-new-option strong { color: var(--text); font-size: 15px; }
.ed-new-option:hover, .ed-new-option:focus-visible, .ed-new-option.is-over { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.ed-new-option.is-disabled { opacity: 0.5; pointer-events: none; }
.ed-new-option-icon { font-size: 24px; color: var(--accent); }
.ed-import-status { margin: 14px 0 0; font-size: 14px; color: var(--accent); font-weight: 600; }
.ed-btn--danger { color: #ef4444; }
.ed-btn--danger:hover { border-color: #ef4444; }

.ed-savebar-left { display: flex; align-items: center; gap: 4px; }
.ed-savebar-left .ed-status { margin-left: 8px; }

/* ---- Growlyze brand look: hard offset shadow on hover, orange markers, fade-up reveal ---- */

.site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand-mark { background: var(--accent-vivid); box-shadow: 2px 2px 0 var(--ink-shadow); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.header-nav a:hover { color: var(--accent-text); }
.theme-switch-thumb { background: var(--accent-vivid); box-shadow: none; }
.theme-switch:hover { border-color: var(--accent-vivid); }

/* Section titles get the orange dot marker used across growlyze.com */
.section-title { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-muted); }
.section-title::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-vivid);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.card { transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, border-color .2s ease, background .2s ease; }
.card:hover { transform: translate(-4px, -4px); border-color: var(--ink-shadow); box-shadow: var(--shadow-hover); background: var(--surface-hover); }
.card:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--ink-shadow); }
.card h3 { transition: color .2s ease; }
.card:hover h3 { color: var(--accent-text); }
.card-icon { transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card-cta { color: var(--accent-text); background: var(--accent-soft); }
.card:hover .card-cta, .card:focus-visible .card-cta { background: var(--text); color: var(--bg); }
.card:hover .card-cta span { color: var(--accent-vivid); transform: translateX(4px); }

.tag-pill { color: var(--chip-text); }

/* Dark: light frosted header with ink text, as on growlyze.com */
:root:not([data-theme="light"]) .site-header { background: rgba(236,233,242,.78); border-bottom-color: rgba(255,255,255,.4); }
:root:not([data-theme="light"]) .brand,
:root:not([data-theme="light"]) .header-nav a { color: #120825; }
:root:not([data-theme="light"]) .header-nav a:hover { color: #c24e1c; background: rgba(18,8,37,.06); }
:root:not([data-theme="light"]) .brand-mark { box-shadow: 2px 2px 0 #120825; }
:root:not([data-theme="light"]) .theme-switch { background: #120825; border-color: #120825; box-shadow: 2px 2px 0 #e3632c; }
:root:not([data-theme="light"]) .section-title { color: #a8a2b5; }
:root:not([data-theme="light"]) .card:hover { background: var(--surface-hover); }
:root:not([data-theme="light"]) .card:hover .card-cta { background: #ffffff; color: #120825; }
.back-link:hover { color: var(--accent-text); }

/* Fade-up reveal (growlyze.com: opacity 0, translateY 24px) */
.gz-motion #app .card:not(.gz-in), .gz-motion #app .section-title:not(.gz-in),
.gz-motion #app .category-header:not(.gz-in), .gz-motion #app .case-detail-header:not(.gz-in) { opacity: 0; }
.gz-in { animation: gz-up .7s cubic-bezier(.22,1,.36,1) var(--gz-delay, 0ms) backwards; }
@keyframes gz-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .card, .card-icon, .brand-mark { transition: none; }
  .card:hover { transform: none; }
}

/* ---- Text colours, bullet colours and table styles chosen in the editor ---- */
/* Each named colour has a shade that reads well on the dark page and one for the cream page. */
:root {
  --tc-orange: #ff8a4c;
  --tc-red: #f87171;
  --tc-green: #4ade80;
  --tc-blue: #60a5fa;
  --tc-purple: #c4b5fd;
  --tc-yellow: #facc15;
  --tc-gray: #a8a2b5;
  --tc-pink: #f9a8d4;
  --tc-teal: #2dd4bf;
  --tc-indigo: #a5b4fc;
  --tc-brown: #d6a77a;
  --tc-ink: #ffffff;
  --strong-on: #120825;  /* text on a strong (solid) cell fill */
  --tbl-on: #120825;
  --row-alt: #0d051c;  /* table rows between the lighter ones, a shade darker than the page */
}
:root[data-theme="light"] {
  --tc-orange: #c2410c;
  --tc-red: #c62828;
  --tc-green: #2e7d32;
  --tc-blue: #1d4ed8;
  --tc-purple: #7c3aed;
  --tc-yellow: #a16207;
  --tc-gray: #6b6475;
  --tc-pink: #be185d;
  --tc-teal: #0f766e;
  --tc-indigo: #4338ca;
  --tc-brown: #8b5a2b;
  --tc-ink: #140827;
  --strong-on: #ffffff;
  --tbl-on: #ffffff;
  --row-alt: #ece4d4;  /* a shade darker than the cream page, so the rows stand apart from it */
}
.tc-orange, .tbl-orange { --tc: var(--tc-orange); }
.tc-red, .tbl-red { --tc: var(--tc-red); }
.tc-green, .tbl-green { --tc: var(--tc-green); }
.tc-blue, .tbl-blue { --tc: var(--tc-blue); }
.tc-purple, .tbl-purple { --tc: var(--tc-purple); }
.tc-yellow, .tbl-yellow { --tc: var(--tc-yellow); }
.tc-gray, .tbl-gray { --tc: var(--tc-gray); }
.tc-pink, .tbl-pink { --tc: var(--tc-pink); }
.tc-teal, .tbl-teal { --tc: var(--tc-teal); }
.tc-indigo, .tbl-indigo { --tc: var(--tc-indigo); }
.tc-brown, .tbl-brown { --tc: var(--tc-brown); }
.tc-ink, .tbl-ink { --tc: var(--tc-ink); }
.tc { color: var(--tc); }
/* A coloured block passes its colour down to text that otherwise sets its own. */
.case-detail-content .tc :is(h3, h4, p, li, td, th, cite, .callout-text, .content-eyebrow, .content-label) { color: inherit; }
.case-detail-content .tc .tc { color: var(--tc); }

.marker-orange { --marker: var(--tc-orange); }
.marker-red { --marker: var(--tc-red); }
.marker-green { --marker: var(--tc-green); }
.marker-blue { --marker: var(--tc-blue); }
.marker-purple { --marker: var(--tc-purple); }
.marker-yellow { --marker: var(--tc-yellow); }
.marker-gray { --marker: var(--tc-gray); }
.marker-pink { --marker: var(--tc-pink); }
.marker-teal { --marker: var(--tc-teal); }
.marker-indigo { --marker: var(--tc-indigo); }
.marker-brown { --marker: var(--tc-brown); }
.marker-ink { --marker: var(--tc-ink); }
.content-list[class*="marker-"] li::marker { color: var(--marker); }

/* Every table style keeps the site's rows: white and the cream base colour in turn (the
   default stripes above), so the styles change only lines, the header and colours. */
/* Table rows alternate: a shade darker than the page, then white (light) or the lighter surface (dark). */
.content-table tbody tr:nth-child(odd) td { background: var(--row-alt); }

/* Tables: a colour tints the header text. Rows do not change colour on hover. */
.content-table-wrap.has-tbl { --tbl: var(--tc); }
.content-table-wrap.has-tbl .content-table th { color: var(--tbl); }

/* Bordered: every cell outlined, no stripes */
.table--bordered .content-table th,
.table--bordered .content-table td { border: 1px solid var(--border); }
.table--bordered .content-table tr > :first-child { border-left: 0; }
.table--bordered .content-table tr > :last-child { border-right: 0; }
.table--bordered .content-table thead th { border-top: 0; }
.table--bordered .content-table tbody tr:last-child td { border-bottom: 0; }

/* Minimal: no box, a strong line under the header, light lines between rows */
.content-table-wrap.table--minimal { border: 0; border-radius: 0; }
.table--minimal .content-table th { border-bottom: 2px solid var(--tbl, var(--text)); color: var(--tbl, var(--text)); }
.table--minimal .content-table td { padding-left: 4px; padding-right: 12px; }
.table--minimal .content-table th { padding-left: 4px; }

/* Bold header: the header row filled with the table colour (orange when none is chosen) */
.content-table-wrap.table--header { --tbl: var(--accent-vivid); }
.content-table-wrap.table--header.has-tbl { --tbl: var(--tc); }
.table--header .content-table th,
.content-table-wrap.has-tbl.table--header .content-table th { background: var(--tbl); color: var(--tbl-on); border-bottom-color: var(--tbl); }
:root[data-theme="light"] .content-table-wrap.table--header:not(.has-tbl) { --tbl-on: #ffffff; }
:root:not([data-theme="light"]) .content-table-wrap.table--header:not(.has-tbl) { --tbl-on: #ffffff; }

/* ---- Editor: ticking blocks, colour swatches, table styles ---- */
.ed-pick-wrap { display: inline-flex; align-items: center; justify-content: center; }
.ed-pick { width: 15px; height: 15px; margin: 0; accent-color: var(--accent-vivid); cursor: pointer; }
.ed-block.is-picked { border-color: var(--accent-vivid); border-style: solid; background: var(--accent-soft); }

.ed-bulkbar {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  z-index: 55;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-bulkbar .container { padding: 0; max-width: none; }
.ed-bulkbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; font-size: 14px; }
.ed-seg { display: inline-flex; gap: 2px; }

.ed-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 8px; }
.ed-menu .ed-swatch,
.ed-swatch {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--tc, var(--text));
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
.ed-menu .ed-swatch:hover, .ed-menu .ed-swatch:focus,
.ed-swatch:hover, .ed-swatch:focus-visible { background: var(--tc, var(--text)); box-shadow: 0 0 0 2px var(--accent-vivid); outline: none; }
.ed-swatch.is-on { box-shadow: 0 0 0 2px var(--text); }
/* "Default" is drawn as the plain text colour with a slash through it */
.ed-swatch--default { background: linear-gradient(135deg, var(--surface) 45%, #e53935 45%, #e53935 55%, var(--surface) 55%); }
.ed-menu .ed-swatch--default:hover, .ed-menu .ed-swatch--default:focus { background: linear-gradient(135deg, var(--surface) 45%, #e53935 45%, #e53935 55%, var(--surface) 55%); }
.ed-style-menu { min-width: 240px; max-width: 280px; }
.ed-table-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 6px 6px; }
.ed-table-styles button { border: 1px solid var(--border) !important; font-size: 13px !important; text-align: center !important; }
.ed-table-styles button.is-on { border-color: var(--accent-vivid) !important; background: var(--accent-soft); color: var(--accent-text); }

.ed-color-a { font-weight: 800; text-decoration: underline 3px var(--accent-vivid); text-underline-offset: 3px; }
.ed-format-colors {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ed-format-colors[hidden] { display: none; }
.ed-format .ed-format-colors button.ed-swatch { min-width: 0; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: var(--tc, var(--text)); }
.ed-format .ed-format-colors button.ed-swatch--default { background: linear-gradient(135deg, var(--surface) 45%, #e53935 45%, #e53935 55%, var(--surface) 55%); }
.ed-format .ed-format-colors .ed-swatch:hover { background: var(--tc, var(--text)); box-shadow: 0 0 0 2px var(--accent-vivid); }
.ed-format .ed-format-colors .ed-swatch--default:hover { background: linear-gradient(135deg, var(--surface) 45%, #e53935 45%, #e53935 55%, var(--surface) 55%); }

/* ---- Coloured table cells (text colour and fill, chosen per cell, row or column) ---- */
.cf-orange { --cf: var(--tc-orange); }
.cf-red { --cf: var(--tc-red); }
.cf-green { --cf: var(--tc-green); }
.cf-blue { --cf: var(--tc-blue); }
.cf-purple { --cf: var(--tc-purple); }
.cf-yellow { --cf: var(--tc-yellow); }
.cf-gray { --cf: var(--tc-gray); }
.cf-pink { --cf: var(--tc-pink); }
.cf-teal { --cf: var(--tc-teal); }
.cf-indigo { --cf: var(--tc-indigo); }
.cf-brown { --cf: var(--tc-brown); }
.cf-ink { --cf: var(--tc-ink); }
/* A fill is a soft tint so text stays readable; it wins over stripes and the header colour. */
.content-table :is(td, th).cf { background: color-mix(in srgb, var(--cf) 20%, var(--surface)) !important; }
.case-detail-content .content-table-wrap .content-table :is(td, th).tc { color: var(--tc); }

/* Editor: row ▸ and column ▾ handles, the picked cells and the bar that colours them */
.ed-editing .content-table th .ed-cell { padding-right: 36px; }
.ed-line-pick {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
}
.ed-line-pick:hover { background: var(--accent-soft); color: var(--accent-text); }
.ed-line-pick--col { position: absolute; top: 4px; right: 20px; }
.ed-editing .ed-row-x { width: 46px; white-space: nowrap; }
.ed-cell-picked { box-shadow: inset 0 0 0 2px var(--accent-vivid), inset 0 0 0 9999px rgba(245, 88, 9, 0.12); }
.ed-cell-dragging, .ed-cell-dragging * { user-select: none; -webkit-user-select: none; }
.ed-cell-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid var(--accent-vivid);
  border-radius: 12px;
  background: var(--surface);
  font-size: 13px;
}
.ed-cell-bar-group { display: inline-flex; align-items: center; gap: 5px; }
.ed-cell-bar-group > span { margin-right: 2px; color: var(--text-muted); font-weight: 600; }
.ed-cell-bar .ed-swatch { width: 22px; height: 22px; }

/* ---- More table options: strong fills, bold/italic/aligned cells, header and first-column weight ---- */
/* A strong fill is the solid colour; its text turns white (cream page) or ink (dark page) to stay readable. */
.content-table :is(td, th).cf.cf-strong { background: var(--cf) !important; color: var(--strong-on); }
.case-detail-content .content-table :is(td, th).cf-strong:not(.tc) { color: var(--strong-on); }
.content-table :is(td, th).cell-bold { font-weight: 700; }
.content-table :is(td, th).cell-italic { font-style: italic; }
.content-table :is(td, th).cell-left { text-align: left; }
.content-table :is(td, th).cell-center { text-align: center; }
.content-table :is(td, th).cell-right { text-align: right; }
.content-table-wrap.head-regular .content-table th:not(.cell-bold) { font-weight: 400; }
.content-table-wrap.head-bold .content-table th { font-weight: 800; }
.content-table-wrap.first-regular .content-table td:first-child:not(.cell-bold) { font-weight: 400; }
.content-table-wrap.first-bold .content-table td:first-child { font-weight: 800; }

/* ---- Text size of a block: small, large, extra large (normal has no class) ---- */
.ts-sm { zoom: 0.88; }
.ts-lg { zoom: 1.15; }
.ts-xl { zoom: 1.3; }

/* ---- Editor: cell formatting bar rows, size/weight choices ---- */
.ed-cell-bar { flex-direction: column; align-items: stretch; gap: 6px; }
.ed-cell-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ed-cell-bar-label { min-width: 78px; color: var(--text-muted); font-weight: 600; }
.ed-cell-tool {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ed-cell-tool:hover { border-color: var(--accent-vivid); }
.ed-cell-tool.is-on { border-color: var(--accent-vivid); background: var(--accent-soft); color: var(--accent-text); }
/* Light-fill swatches show the soft tint they give; strong-fill swatches are square and solid */
.ed-cell-bar [data-cell-key="fill"].ed-swatch:not(.ed-swatch--default) { background: color-mix(in srgb, var(--tc) 25%, var(--surface)); }
.ed-cell-bar .ed-swatch--solid { border-radius: 6px; }
.ed-choice-3 { grid-template-columns: repeat(3, 1fr); }
.ed-choice-4 { grid-template-columns: repeat(2, 1fr); }
.ed-style-menu { max-height: 70vh; overflow-y: auto; }
.ed-menu-note { margin: 4px 10px 6px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ---- Table backgrounds: header row and striped rows (chosen per table) ---- */
.hf-orange { --hb: var(--tc-orange); }
.st-orange { --sb: var(--tc-orange); }
.hf-red { --hb: var(--tc-red); }
.st-red { --sb: var(--tc-red); }
.hf-green { --hb: var(--tc-green); }
.st-green { --sb: var(--tc-green); }
.hf-blue { --hb: var(--tc-blue); }
.st-blue { --sb: var(--tc-blue); }
.hf-purple { --hb: var(--tc-purple); }
.st-purple { --sb: var(--tc-purple); }
.hf-yellow { --hb: var(--tc-yellow); }
.st-yellow { --sb: var(--tc-yellow); }
.hf-gray { --hb: var(--tc-gray); }
.st-gray { --sb: var(--tc-gray); }
.hf-pink { --hb: var(--tc-pink); }
.st-pink { --sb: var(--tc-pink); }
.hf-teal { --hb: var(--tc-teal); }
.st-teal { --sb: var(--tc-teal); }
.hf-indigo { --hb: var(--tc-indigo); }
.st-indigo { --sb: var(--tc-indigo); }
.hf-brown { --hb: var(--tc-brown); }
.st-brown { --sb: var(--tc-brown); }
.hf-ink { --hb: var(--tc-ink); }
.st-ink { --sb: var(--tc-ink); }
/* A soft tint of the colour; a single cell's own fill still shows over it. */
.case-detail-content .content-table-wrap.has-hf .content-table thead th { background: color-mix(in srgb, var(--hb) 18%, var(--surface-hover)); }
.content-table-wrap.has-st .content-table tbody tr:nth-child(odd) td { background: color-mix(in srgb, var(--sb) 12%, var(--surface-hover)); }
.content-table-wrap.st-none .content-table tbody tr:nth-child(odd) td { background: var(--surface-hover); }
/* On a tinted header the bold-header style's white text would vanish, so it turns dark again. */
.case-detail-content .content-table-wrap.table--header.has-hf .content-table thead th:not(.tc) { color: var(--text); }
.ed-choice-1 { grid-template-columns: 1fr; }
/* The "default" swatch keeps its slash inside menus too, so it is not mistaken for Black. */
.ed-menu .ed-swatch--default,
.ed-cell-bar .ed-swatch--default { background: linear-gradient(135deg, var(--surface) 45%, #e53935 45%, #e53935 55%, var(--surface) 55%); }
