/* /iot-tribe/ — the IoT Tribe partner page (scripts/build-iot-tribe-page.mjs).
   Sits on top of company-profile.css + entity-profile.css (hero, sections,
   TOC, statline) and adds the page's own islands: programme bars, the market
   map embed, the per-vertical cards, the headquarters bubble map, the profile
   bars, the funding chart, the founder cards, the segment scoreboard and the
   small-multiple VC charts. Colours are theme tokens only. */

.itp-island {
    background: var(--surface-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}
.itp-island + .itp-island { margin-top: 16px; }
.itp-island-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.itp-island-foot img { height: 26px; width: auto; }
.itp-note { margin: 10px 0 0; font-size: 0.8125rem; color: var(--text-faint); }
.itp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.itp-scroll > div, .itp-scroll > svg, .itp-scroll > table { min-width: 100%; }
.itp-scroll svg { display: block; }

/* Five equal stat cards: entity-profile.css ends with a flex-wrap
   .hero-statline variant (inline text stats) that beats the grid rule, so the
   grid is restated here with equal tracks (1fr tracks grow with a long label). */
.itp-stats .hero-statline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0; padding-top: 0; border-top: 0; }
.itp-stats .hero-stat-label { white-space: normal; }
@media (max-width: 900px) { .itp-stats .hero-statline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .itp-stats .hero-statline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Prose under the overview statline. */
.itp-prose { max-width: 760px; margin-top: 1.5rem; }
.itp-prose p { margin: 0 0 1em; font-size: 1rem; line-height: 1.6; }
.itp-prose p:last-child { margin-bottom: 0; }
.itp-prose a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Body text a shade darker than the shared --text-light (Yoram, 2026-09-10):
   the ink token at 84%, so it stays a token in both themes. */
.itp-prose p, .section-sub, .itp-vc-sub, .itp-note, .itp-sb td, .itp-fbar,
.itp-prog-meta, .itp-founder-co, .itp-founder-meta, .itp-hqmap-panel-head { color: var(--white); opacity: 0.84; }

/* Logo tile — a light tile on the light page. */
.itp-logo {
    --s: 30px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--s);
    height: var(--s);
    flex: none;
    border-radius: calc(var(--s) * 0.24);
    background: var(--logo-tile-bg);
    box-shadow: inset 0 0 0 1px var(--logo-tile-border);
    overflow: hidden;
}
.itp-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.itp-logo b { display: none; font-size: calc(var(--s) * 0.42); font-weight: 600; color: var(--text-light); }
.itp-logo.is-fallback img { display: none; }
.itp-logo.is-fallback b { display: block; }

/* 1.2 Programmes — three compact columns; a programme's note is a hover /
   focus card read from data-note, flagged by the ⓘ after the name. */
.itp-progs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 28px; }
.itp-prog { position: relative; padding: 8px 0 7px; border-bottom: 1px solid var(--border-light); outline: none; }
.itp-prog[data-note] { cursor: help; }
.itp-prog-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; min-width: 0; }
.itp-prog-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; line-height: 1.25; color: var(--white); }
.itp-prog-i { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--border-mid); font-family: var(--font-sans); font-size: 0.625rem; font-weight: 700; line-height: 1; color: var(--text-faint); }
.itp-prog[data-note]:hover .itp-prog-i, .itp-prog[data-note]:focus .itp-prog-i { border-color: var(--blue); color: var(--blue); }
.itp-prog-meta { font-size: 0.75rem; color: var(--text-faint); white-space: nowrap; }
.itp-prog-bar { display: grid; grid-template-columns: 1fr 2.4em; align-items: center; gap: 8px; margin-top: 5px; }
.itp-prog-track { display: block; height: 8px; border-radius: 3px; background: var(--border-light); overflow: hidden; }
.itp-prog-track i { display: block; height: 100%; border-radius: 3px; background: var(--blue); }
.itp-prog-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--white); font-size: 0.8125rem; }
/* Ink card, light text (Yoram, 2026-09-10): --white is the ink token on the light page, --surface-card its paper. */
.itp-prog[data-note]::after { content: attr(data-note); position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; box-sizing: border-box; width: min(340px, 100%); padding: 10px 12px; border-radius: 10px; background: var(--white); box-shadow: var(--shadow-md); font-family: var(--font-sans); font-size: 0.8125rem; font-weight: 400; line-height: 1.45; color: var(--surface-card); white-space: normal; opacity: 0; visibility: hidden; transition: opacity 0.12s ease; pointer-events: none; }
.itp-prog[data-note]:hover::after, .itp-prog[data-note]:focus::after { opacity: 1; visibility: visible; }
.itp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2.1 The market map embed: the map is the same one /market-maps/<slug>/ shows,
   measured to its content by js/iot-tribe-page.js. Starts tall enough that the
   map does not take itself for a card thumbnail (landscape-app.js treats an
   iframe under 760px as a preview and hides its toolbar). */
/* The embeds run bare (?bare=…): the map's treemap island and value-chart
   cards bring their own card frames, so the wrap adds none. */
/* On a phone the embeds keep a 900px layout and the wrap scrolls sideways
   (the treemap and the charts are unreadable squeezed to 350px); the iframe
   itself never scrolls, so a vertical swipe over it still moves the page. */
.itp-map-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.itp-map-frame { display: block; width: 100%; height: 900px; border: 0; }

/* 3.1 Headquarters map (the founders-map pattern from /yc-batches/) */
.itp-hqmap { position: relative; min-height: 320px; }
.itp-hqmap-svg { display: block; }
.itp-hqmap-land { fill: var(--border-light); stroke: var(--border-mid); stroke-width: 0.5; }
.itp-hqmap-lead { stroke: var(--border-mid); stroke-width: 1; }
.itp-hqmap-bub { cursor: pointer; outline: none; }
.itp-hqmap-bub circle { fill: var(--blue); fill-opacity: 0.78; stroke: var(--surface-card); stroke-width: 1.5; }
.itp-hqmap-bub text { font-family: var(--font-sans); font-weight: 700; fill: var(--surface-card); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.itp-hqmap-bub.is-hot circle, .itp-hqmap-bub:focus-visible circle { fill-opacity: 1; stroke: var(--blue-ink); }
.itp-hqmap-panel { position: absolute; z-index: 61; box-sizing: border-box; max-width: 360px; padding: 10px 12px 8px; overflow-y: auto; background: var(--surface-card); border: 1px solid var(--border-mid); border-radius: 10px; box-shadow: var(--shadow-md); }
.itp-hqmap-panel-head { margin: 0 0 8px; font-size: 0.8125rem; line-height: 1.4; color: var(--text-light); }
.itp-hqmap-panel-head strong { color: var(--white); font-weight: 600; }
.itp-hqmap-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 330px; }
.itp-hqmap-co { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 999px; border: 1px solid var(--border-light); font-size: 0.75rem; color: var(--text-light); text-decoration: none; max-width: 100%; }
.itp-hqmap-co span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.itp-hqmap-co:hover { border-color: var(--blue); color: var(--white); }
.itp-hqmap-loading { margin: 0; padding: 140px 0; text-align: center; font-size: 0.84375rem; color: var(--text-faint); }
.itp-hqmap-more { font-size: 0.75rem; color: var(--text-faint); align-self: center; padding-left: 4px; }

/* 3.2 Profile bars (four lists, the call to action in a tinted panel) */
.itp-fbars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 28px; }
.itp-fbar-cta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 80px; padding: 18px; border-radius: 12px; background: var(--blue-light); }
.itp-fbar-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--white); }
.itp-fbar { display: grid; grid-template-columns: minmax(0, 8.5em) 1fr 2.5em; align-items: center; gap: 8px; padding: 3px 0; font-size: 0.78125rem; color: var(--text-light); }
.itp-fbar-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.itp-fbar-track { display: block; height: 10px; border-radius: 3px; background: var(--border-light); overflow: hidden; }
.itp-fbar-track i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.itp-fbar-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--white); }
.itp-cta-pill { display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; max-width: 100%; padding: 12px 22px; border-radius: 999px; text-align: center; white-space: normal; font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.itp-cta-pill::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }

/* The small-multiple VC charts share the axis rule. */
.itp-fc-axis { stroke: var(--chart-axis); stroke-width: 1; }

/* 2.2 Value over time — two stacked-bar charts drawn on the page (server-side
   SVG), the first with a CSS-only Geography / Segment toggle: the two radios
   sit first in the island so the checked one can hide the other chart. */
.itp-vc { position: relative; }
.itp-vc + .itp-vc { margin-top: 16px; }
.itp-vc > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.itp-vc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.itp-vc-title { margin: 0; font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--white); }
.itp-vc-sub { margin: 3px 0 0; font-size: 0.8125rem; color: var(--text-light); }
.itp-vc-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--border-light); border-radius: 999px; background: var(--surface-card); }
.itp-vc-toggle-label { margin: 0 8px 0 10px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.itp-vc-toggle label { padding: 5px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--text-light); cursor: pointer; }
#itp-ev-geo:checked ~ .itp-vc-head label[for="itp-ev-geo"],
#itp-ev-seg:checked ~ .itp-vc-head label[for="itp-ev-seg"] { background: var(--blue-light); color: var(--eyebrow); }
#itp-ev-geo:checked ~ .itp-vc-seg, #itp-ev-seg:checked ~ .itp-vc-geo { display: none; }
.itp-scroll > svg.itp-vcs { width: 100%; height: auto; min-width: 720px; }
.itp-vcs-grid { stroke: var(--chart-grid); stroke-width: 1; }
.itp-vcs-axis { stroke: var(--chart-axis); stroke-width: 1; }
.itp-vcs-y, .itp-vcs-x { font-family: var(--font-sans); font-size: 12px; fill: var(--text-light); }
.itp-vcs-total { font-family: var(--font-sans); font-size: 13px; font-weight: 700; fill: var(--white); }
.itp-vcs-lab { font-family: var(--font-sans); font-size: 12.5px; }
.itp-vcs-name { font-weight: 700; fill: var(--white); }
.itp-vcs-val { fill: var(--text-light); }
/* Series fills: the funding bands in the VC investment dashboard's round-size
   ramp (js/location-vc-investment.js SIZE_TIERS / TIERS: green → blue →
   purple), the country / segment stacks in the market map's series colours,
   so every surface reads alike. */
.itp-f0 { fill: #34D399; } /* theme-guardrail-allow: VC dashboard round-size ramp, under $15M */
.itp-f1 { fill: #3B82F6; } /* theme-guardrail-allow: VC dashboard round-size ramp, $15–100M */
.itp-f2 { fill: #7C3AED; } /* theme-guardrail-allow: VC dashboard round-size ramp, $100M and over */
.itp-c0 { fill: #8B5CF6; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c1 { fill: #14B8A6; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c2 { fill: #3B82F6; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c3 { fill: #F59E0B; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c4 { fill: #EF4444; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c5 { fill: #EC4899; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */
.itp-c6 { fill: #94A3B8; } /* theme-guardrail-allow: categorical chart palette, the market map's series colours */

/* 3.3 Founder cards */
.itp-founder-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.itp-founder { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 14px; background: var(--surface-card); border: 1px solid var(--border-light); border-radius: 14px; text-decoration: none; }
a.itp-founder:hover { border-color: var(--border-mid); }
.itp-founder-photo { position: relative; width: 60px; height: 60px; margin-bottom: 4px; border-radius: 50%; background: var(--navy-lighter); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.itp-founder-photo b { font-size: 1.25rem; font-weight: 600; color: var(--text-light); }
.itp-founder-photo img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.itp-founder-name { font-weight: 600; font-size: 0.9375rem; color: var(--white); line-height: 1.3; }
.itp-founder-co { font-size: 0.78125rem; color: var(--text-light); line-height: 1.35; }
.itp-founder-meta { font-size: 0.75rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* 4.1 Scoreboard */
.itp-sb { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.itp-sb th, .itp-sb td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
.itp-sb th { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.itp-sb-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--white); }
.itp-sb th.itp-sb-num { white-space: normal; max-width: 7.5em; color: var(--text-faint); }
.itp-sb-name a { font-weight: 600; color: var(--white); text-decoration: none; white-space: nowrap; }
.itp-sb-name a:hover { text-decoration: underline; }
.itp-sb-sub { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--text-faint); }
/* A subtle bar under each number, sized against the column's largest. */
.itp-sb-bars td.itp-sb-num { vertical-align: top; }
.itp-sb-v { display: block; }
.itp-sb-bar { display: block; width: 100%; max-width: 104px; height: 4px; margin: 5px 0 0 auto; border-radius: 2px; background: var(--border-light); overflow: hidden; }
.itp-sb-bar i { display: block; height: 100%; border-radius: 2px; background: var(--blue); opacity: 0.55; }

/* 4.2 Small multiples */
.itp-sms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 22px; }
.itp-sm-head { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.itp-sm-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--white); text-decoration: none; }
a.itp-sm-title:hover { text-decoration: underline; }
.itp-sm-sub { font-size: 0.75rem; color: var(--text-faint); }
.itp-sm-chart { width: 100%; height: auto; display: block; }
.itp-sm-bar { fill: var(--blue); }
.itp-sm-bar.is-partial { fill: var(--blue); fill-opacity: 0.35; }
.itp-sm-val { font-family: var(--font-sans); font-size: 12px; font-weight: 600; fill: var(--white); }
.itp-sm-x { font-family: var(--font-sans); font-size: 11px; fill: var(--text-faint); }

/* Responsive */
@media (max-width: 1040px) {
    .itp-progs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .itp-founder-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .itp-fbars { grid-template-columns: repeat(2, 1fr); }
    .itp-sms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .itp-island { padding: 14px; }
    .itp-progs { grid-template-columns: 1fr; }
    .itp-founder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .itp-fbars { grid-template-columns: 1fr; gap: 20px; }
    .itp-sms { grid-template-columns: 1fr; }
    .itp-map-frame { width: 900px; min-width: 900px; height: 820px; }
    .itp-cta-pill { padding: 11px 18px; font-size: 0.875rem; }
}
