/* Mad Funnel Labs: page sections and components (home, work, stack, about, contact, legal). */

/* ---------- Generic section pieces ---------- */
.section-head { max-width: 46rem; margin-bottom: var(--space-6); }
.section-head p { color: var(--text-muted); font-size: var(--step-1); line-height: 1.5; margin: 0; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; gap: var(--space-6); }
.link-arrow { font-weight: 700; }
.link-arrow::after { content: " →"; text-decoration: none; display: inline-block; }

.page-head { padding-block: clamp(var(--space-7), 6vw, var(--space-8)) var(--space-5); }
.page-head h1 { max-width: 20ch; margin-bottom: var(--space-4); }
.page-head .lead { color: var(--text-muted); max-width: 40em; margin: 0; }
.page-head.wide h1 { max-width: 24ch; }
.crumbs { font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--space-4); }
.crumbs a { color: inherit; }

.proof-line { border-block: 1px solid var(--line); padding-block: var(--space-4); background: var(--surface); }
.proof-line p { margin: 0; max-width: none; }

/* wired list: bullets are small nodes joined by a wire */
.wired { list-style: none; margin: 0; padding: 0; }
.wired > li { position: relative; padding: var(--space-2) 0 var(--space-2) 2.25rem; margin: 0; }
.wired > li::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 1.05rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
  background: var(--lit);
}
.wired > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(0.3rem + 0.4rem - 1px);
  top: 1.95rem;
  bottom: -1.05rem;
  width: 2px;
  background: var(--edge);
}

/* ---------- What I build ---------- */
.build-grid { display: grid; gap: var(--space-5); }
.build-item { border-top: 2px solid var(--text); padding-top: var(--space-4); }
.build-item h3 { margin-bottom: var(--space-2); }
.build-item p { margin: 0; color: var(--text-muted); }

/* ---------- Results ---------- */
.results-grid { display: grid; gap: var(--space-5); margin: 0 0 var(--space-5); padding: 0; list-style: none; }
.results-grid li {
  border-left: 4px solid var(--accent);
  padding: var(--space-1) 0 var(--space-1) var(--space-4);
  font-size: var(--step-1);
  line-height: 1.4;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Chain diagrams (case-study rows and pages) ---------- */
.chain { list-style: none; margin: 0; padding: 0; display: flex; --cg: 0.5rem; gap: var(--cg); }
.chain-step { position: relative; display: flex; flex: 1 1 0; min-width: 0; margin: 0; }
.chain-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: calc(100% + var(--cg));
  height: 2px;
  background: var(--edge);
}
.chain-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  background: var(--lit);
  border: 2px solid var(--accent);
  border-radius: var(--radius-node);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.chain--mini .chain-node { padding: 0.625rem 0.25rem; min-height: 3.5rem; font-size: 0.8125rem; }
.chain--full { --cg: 1.5rem; flex-direction: column; align-items: center; gap: var(--cg); }
.chain--full .chain-step { flex: none; width: min(100%, 22rem); }
.chain--full .chain-step:not(:last-child)::after { top: 50%; left: calc(50% - 1px); width: 2px; height: calc(100% + var(--cg)); }
.chain--full .chain-node { padding: 0.75rem 0.75rem; }
.chain--full .chain-node strong { font-size: 1.0625rem; }
.chain--full .chain-node span { margin-top: 0.125rem; font-family: var(--font-body); font-weight: 400; font-size: 0.9375rem; color: var(--text-muted); letter-spacing: 0; }
.chain-figure { margin: 0 0 var(--space-6); padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); }

@media (min-width: 62rem) {
  .chain--full { flex-direction: row; align-items: stretch; }
  .chain--full .chain-step { flex: 1 1 0; width: auto; }
  .chain--full .chain-step:not(:last-child)::after { top: 50%; left: 50%; width: calc(100% + var(--cg)); height: 2px; }
}

/* ---------- Case study rows ---------- */
.case-rows { display: grid; border-bottom: 1px solid var(--line); }
.case-row {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}
.case-visual { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-5) var(--space-4); align-self: start; }
.case-num { margin: 0 0 var(--space-1); color: var(--text-muted); font-size: var(--step--1); }
.case-body h3 { margin-bottom: var(--space-2); max-width: 30ch; }
.case-link { color: var(--text); text-decoration: none; }
.case-link::after { content: ""; position: absolute; inset: 0; }
.case-row:hover .case-link { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.case-link:focus-visible { outline: none; }
.case-row:has(.case-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-panel); }
.case-result { color: var(--text-muted); max-width: 52ch; margin-bottom: var(--space-3); }
.case-cta { margin: var(--space-3) 0 0; font-weight: 700; color: var(--link); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip--more { border-style: dashed; color: var(--text-muted); }

@media (min-width: 48rem) {
  .case-row { grid-template-columns: minmax(15rem, 20rem) 1fr; gap: var(--space-6); align-items: start; }
}

/* ---------- Tool marquee ---------- */
.tool,
.tool-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  white-space: nowrap;
}
.tool { padding: 0.5rem 1rem; border: 1.5px solid var(--edge); border-radius: var(--radius-chip); background: var(--surface); }
.tool-icon { flex: none; color: var(--text-muted); }
.tool--text { font-family: var(--font-body); }
.marquee { overflow: hidden; margin-bottom: var(--space-4); }
.marquee-track { display: flex; width: 100%; }
.marquee-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.marquee-dup { display: none; }
.motion .marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.motion .marquee-track { width: max-content; animation: marquee 70s linear infinite; }
.motion .marquee-list { flex-wrap: nowrap; padding-right: var(--space-3); }
.motion .marquee-dup { display: flex; }
.marquee:hover .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-toggle {
  display: none;
  margin: 0 0 var(--space-4);
  padding: 0.25rem 0;
  background: none;
  border: 0;
  color: var(--link);
  font: 700 var(--step--1) var(--font-body);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.motion .marquee-toggle { display: inline-flex; }

/* ---------- Process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 46rem; }
.steps > li { position: relative; counter-increment: step; padding: var(--space-3) 0 var(--space-3) 3.5rem; margin: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: var(--space-3);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius-node);
  background: var(--lit);
  font-family: var(--font-display);
  font-weight: 700;
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.125rem - 1px);
  top: calc(var(--space-3) + 2.25rem);
  bottom: calc(-1 * var(--space-3));
  width: 2px;
  background: var(--edge);
}
.steps strong { display: block; font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.01em; margin-bottom: 0.125rem; }
.steps p { margin: 0; color: var(--text-muted); }

/* ---------- Offers ---------- */
.offers { display: grid; gap: var(--space-4); margin-bottom: var(--space-4); }
.offer { display: flex; flex-direction: column; }
.offer h3 { margin-bottom: var(--space-1); }
.offer .price { font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.02em; margin: 0 0 var(--space-3); }
.offer .price small { font-family: var(--font-body); font-weight: 400; font-size: var(--step--1); color: var(--text-muted); letter-spacing: 0; }
.offer p { color: var(--text-muted); }
.offer ul { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
.offer li { margin-bottom: var(--space-2); }
.offer dl { margin: 0 0 var(--space-4); }
.offer dt { font-weight: 700; }
.offer dd { margin: 0 0 var(--space-3); color: var(--text-muted); }
.note { color: var(--text-muted); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 46rem; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 3.5rem;
  padding: var(--space-3) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-item summary:focus-visible { outline-offset: 2px; }
.faq-item .faq-a { padding: 0 0 var(--space-4); max-width: 60ch; }
.faq-item .faq-a p { margin: 0; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(var(--space-7), 6vw, var(--space-8)); margin-top: var(--space-8); }
.cta-inner { display: grid; gap: var(--space-5); align-items: center; }
.cta-inner h2 { margin-bottom: var(--space-2); }
.cta-inner .lead { margin: 0; color: var(--text-muted); }

/* ---------- Case study pages ---------- */
.case-page { padding-bottom: var(--space-4); }
.case-lead { max-width: 44em; }
.case-section { padding-block: var(--space-5); max-width: 48rem; }
.case-section:has(.chain-figure), .case-section:has(.shot-grid) { max-width: none; }
.case-section > h2 { font-size: var(--step-2); letter-spacing: -0.02em; }
.case-quote { margin: 0 0 var(--space-4); padding: var(--space-2) 0 var(--space-2) var(--space-5); border-left: 4px solid var(--accent); font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.case-quote p { margin: 0; }
.built-list, .results-list { padding-left: 1.25rem; max-width: 48rem; }
.built-list li, .results-list li { margin-bottom: var(--space-3); }
.shot-grid { display: grid; gap: var(--space-4); }

/* placeholders Amrit still has to fill (flagged in the build output) */
.todo { background: var(--lit); outline: 1.5px dashed var(--edge); outline-offset: 2px; border-radius: 3px; padding: 0 0.25rem; }
.todo-box { border: 2px dashed var(--edge); border-radius: var(--radius-panel); background: var(--surface); padding: var(--space-5); min-height: 8rem; display: grid; align-items: center; }
.todo-box p { margin: 0; color: var(--text-muted); }

/* ---------- Work index ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.filter {
  min-height: 2.75rem;
  padding: 0.25rem 1rem;
  border: 2px solid var(--edge);
  border-radius: var(--radius-chip);
  background: var(--surface);
  color: var(--text);
  font: 700 1rem var(--font-body);
  cursor: pointer;
}
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-status { min-height: 1.5em; margin-bottom: var(--space-4); }
.more-grid { display: grid; gap: var(--space-4); }
.more-card h3 { font-size: var(--step-1); }
.more-card .chips { margin-bottom: var(--space-3); }
.more-result { margin: 0; }
[data-work-item][hidden] { display: none !important; }

/* ---------- Stack page ---------- */
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin: 0 0 var(--space-5); padding: 0; list-style: none; color: var(--text-muted); font-size: var(--step--1); }
.depth { display: inline-block; padding: 0 0.5rem; border: 1.5px solid var(--edge); border-radius: var(--radius-chip); font-size: 0.8125rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.depth--daily { background: var(--text); color: var(--bg); border-color: var(--text); }
.depth--used { background: transparent; color: var(--text-muted); }
.depth-inline { color: var(--text-muted); }
.stack-grid { display: grid; gap: var(--space-4); }
.stack-stage h2 { font-size: var(--step-2); margin-bottom: var(--space-1); }
.tool-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.tool-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--line); }
@media (min-width: 48rem) {
  .stack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack-stage:nth-child(1), .stack-stage:nth-child(4), .stack-stage:nth-child(5) { grid-column: span 2; }
  .stack-stage:nth-child(7) { grid-column: 1 / -1; }
  .stack-stage:nth-child(1) .tool-list, .stack-stage:nth-child(4) .tool-list, .stack-stage:nth-child(5) .tool-list { columns: 2; column-gap: var(--space-6); }
  .stack-stage .tool-list li { break-inside: avoid; }
}

/* about: stage table */
.stage-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.stage-table th, .stage-table td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-top: 1px solid var(--line); }
.stage-table thead th { border-top: 0; color: var(--text-muted); font-weight: 700; }
.stage-table tbody th { font-family: var(--font-display); font-size: var(--step-0); white-space: nowrap; }
@media (max-width: 47.99rem) {
  .stage-table thead { display: none; }
  .stage-table tr { display: block; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
  .stage-table th, .stage-table td { display: block; border: 0; padding: var(--space-1) 0; }
  .stage-table td::before { content: attr(data-label) ": "; font-weight: 700; color: var(--text-muted); }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: var(--space-7); }
.team { display: grid; gap: var(--space-4); }
.team-card h3 { margin-bottom: var(--space-1); }
.team-role { margin: 0 0 var(--space-3); color: var(--text-muted); font-weight: 700; }
.team-photo { aspect-ratio: 4 / 3; margin-bottom: var(--space-4); }
.how-list { padding-left: 1.25rem; max-width: 46rem; }
.how-list li { margin-bottom: var(--space-3); }

/* ---------- Forms ---------- */
.contact-grid { display: grid; gap: var(--space-6); align-items: start; }
.form { display: grid; gap: var(--space-5); }
.field label, .field legend { display: block; margin-bottom: var(--space-2); font-weight: 700; padding: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field .hint { display: block; margin-top: var(--space-1); color: var(--text-muted); font-size: var(--step--1); }
.opt { font-weight: 400; color: var(--text-muted); }
.input, .select, .textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.875rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--edge);
  border-radius: var(--radius-node);
}
.textarea { min-height: 8rem; resize: vertical; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--text); }
.checks { display: grid; gap: var(--space-2); }
.check { display: flex; align-items: flex-start; gap: var(--space-3); font-weight: 400; margin: 0; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--link); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-node); border: 2px solid var(--text); background: var(--surface); font-weight: 700; }
.form-status[hidden] { display: none; }
.form-success h2 { margin-bottom: var(--space-2); }
.form-success:focus { outline: none; }
.side-panel h2 { font-size: var(--step-1); }
.side-panel p:last-child { margin-bottom: 0; }
.booking { margin-top: var(--space-6); }
.booking iframe { width: 100%; min-height: 44rem; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.booking[hidden] { display: none; }
@media (min-width: 62rem) {
  .contact-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-7); }
  .side-panel { position: sticky; top: calc(var(--header-h) + var(--space-5)); }
}

/* ---------- Legal / long-form pages ---------- */
.legal h2 { font-size: var(--step-2); margin-top: var(--space-7); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: var(--space-2); }

/* ---------- Wider screens ---------- */
@media (min-width: 40rem) {
  .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .build-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
  .offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .more-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-inner { grid-template-columns: 1fr auto; }
}
@media (min-width: 62rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
  .about-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-8); }
}

.section-tight { padding-block: var(--space-6) var(--space-7); }

.video-frame { aspect-ratio: 16 / 9; max-width: 48rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-node); }

.quote-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.quote-list li { border-left: 4px solid var(--accent); padding: var(--space-1) 0 var(--space-1) var(--space-4); font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
@media (min-width: 40rem) { .quote-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-7); } }

/* ---------- Team photos, Preeti's page, embeds ---------- */
.team { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.team-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-node); margin-bottom: var(--space-4); }
.team-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: var(--space-4) 0 0; }
.about-media { display: grid; gap: var(--space-4); }
.about-photo { margin: 0; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-panel); border: 1px solid var(--line); }
@media (min-width: 48rem) { .about-media { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.byline { margin: var(--space-4) 0 0; color: var(--text); }
.stats-band { background: var(--surface); border-block: 1px solid var(--line); padding-block: var(--space-6); }
.stats { display: grid; gap: var(--space-5); margin: 0 0 var(--space-3); }
.stats > div { border-left: 4px solid var(--accent); padding-left: var(--space-4); }
.stats dt { color: var(--text-muted); font-size: var(--step--1); font-weight: 700; order: 2; }
.stats dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1; }
.stats > div { display: flex; flex-direction: column; }
@media (min-width: 40rem) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.build-grid.three { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 62rem) { .build-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.result-cards { display: grid; gap: var(--space-4); }
.result-cards h3 { font-size: var(--step-1); }
.result-cards ul { margin: 0; padding-left: 1.25rem; }
.result-cards li { margin-bottom: var(--space-3); }
@media (min-width: 62rem) { .result-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips-title { font-size: var(--step-1); margin: var(--space-5) 0 var(--space-3); }
.chips-title .muted { font-family: var(--font-body); font-weight: 400; font-size: var(--step--1); letter-spacing: 0; }

.embed-frame { aspect-ratio: 16 / 9; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; display: grid; }
.embed-frame iframe { width: 100%; height: 100%; border: 0; }
.embed-poster { display: grid; place-content: center; justify-items: center; gap: var(--space-3); text-align: center; padding: var(--space-5); }
.embed-poster p { margin: 0; max-width: 34ch; }
@media (max-width: 39.99rem) { .embed-frame { aspect-ratio: 4 / 5; } }
.form-for { margin: 0 0 var(--space-5); font-weight: 700; }
.form-for[hidden] { display: none; }

.person-hero { display: grid; gap: var(--space-6); align-items: center; }
.person-photo { margin: 0; max-width: 20rem; }
.person-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: var(--radius-panel); border: 1px solid var(--line); }
@media (min-width: 48rem) { .person-hero { grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--space-8); } }
@media (min-width: 62rem) { .person-hero { grid-template-columns: minmax(0, 1fr) 20rem; } }

/* ---------- n8n portfolio + workflow maps ---------- */
.n8n-stats { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-7); margin: var(--space-6) 0 0; padding: 0; }
.n8n-stats li { display: flex; flex-direction: column; }
.n8n-stats b { font-family: var(--font-display); font-size: var(--step-4); line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.n8n-stats span { color: var(--text-muted); font-weight: 700; font-size: var(--step--1); }
.n8n-list { display: grid; border-bottom: 1px solid var(--line); }
.n8n-card { display: grid; gap: var(--space-4); padding: var(--space-6) 0; border-top: 1px solid var(--line); min-width: 0; }
.n8n-mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-4); align-self: start; display: grid; place-items: center; min-height: 6.5rem; }
.n8n-mini img { display: block; width: 100%; height: auto; max-height: 10rem; }
.n8n-cat { margin: 0 0 var(--space-1); color: var(--text-muted); font-size: var(--step--1); font-weight: 700; }
.n8n-body h3 { font-size: var(--step-2); margin-bottom: var(--space-2); }
.n8n-body { min-width: 0; }
.n8n-meta { margin: var(--space-3) 0 var(--space-3); }
.status { display: inline-block; margin-left: var(--space-2); padding: 0 0.5rem; border: 1.5px solid var(--edge); border-radius: var(--radius-chip); font-size: 0.8125rem; font-weight: 700; color: var(--text-muted); }
.map-details summary { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-4); border: 2px solid var(--text); border-radius: var(--radius-node); font-weight: 700; cursor: pointer; list-style: none; }
.map-details summary::-webkit-details-marker { display: none; }
.map-details summary::after { content: ""; width: 0.55rem; height: 0.55rem; margin-left: var(--space-3); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.map-details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.map-details summary:hover { background: var(--surface); }
.map-scroll { margin-top: var(--space-4); max-width: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-2); max-height: 34rem; }
.map-scroll img { display: block; max-width: none; height: auto; }
.map-scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.case-section--wide { max-width: none; }
.case-section--wide .map-scroll { margin-top: var(--space-3); }
@media (min-width: 48rem) { .n8n-card { grid-template-columns: minmax(14rem, 18rem) 1fr; gap: var(--space-6); } }
