/* ============================================================
   Integrations — the directory (/integrations) and one page per product
   (/integrations/<slug>). Both are generated: tools/integrations/build.mjs
   writes the HTML from tools/integrations/data.mjs.

   Laid out like pricing.html: the document sits in the shared .os-panel
   window (panel.css) on the green desktop. No scroll engine and no
   entrance choreography beyond the window opening, so every section is
   ordinary page flow and works the same at every width.

   The one new component is the status pill. Two states, two colours,
   and the label is always written out: colour never carries it alone.
   ============================================================ */
:root {
  --pink: var(--cube-pink, #f70087); --green: var(--cube-green, #00ed71);
  --yellow: var(--cube-yellow, #ffd100);
  --ink: var(--cube-ink, #0a0a0a); --black: #000; --line: #ededed;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Anonymous Pro', ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
/* clip horizontal overflow on <html>, NOT <body> (see schoolrun.html) */
html { overflow-x: hidden; }
body {
  font-family: var(--font); color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-top: 74px;                        /* clear the fixed menubar */
  background-color: var(--green);
  background-image:
    radial-gradient(rgba(0,0,0,.09) 1.5px, transparent 0),
    radial-gradient(rgba(0,0,0,.09) 1.5px, transparent 0);
  background-position: 0 0, 20px 20px;
  background-size: 40px 40px, 40px 40px;
  background-attachment: fixed;
}
main, .site-footer { position: relative; z-index: 1; }

/* ---------- the window (pricing.html's) ---------- */
main.os-panel {
  width: 88vw; max-width: none; margin: 18px auto clamp(40px, 6vh, 80px);
  border-radius: 22px; box-shadow: var(--cube-shadow-xl, 14px 14px 0 0 #000);
  background-color: var(--cube-white, #fff);
  background-image:
    linear-gradient(var(--line) 1px, transparent 0),
    linear-gradient(90deg, var(--line) 1px, transparent 0);
  background-size: 40px 40px;
  overflow: clip;
  animation: ig-window-open .8s cubic-bezier(0.22, 1, 0.36, 1) .05s both;
}
@keyframes ig-window-open {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
main.os-panel > .os-bar { padding: 16px 22px 14px; background: var(--cube-white, #fff); border-bottom: 2px solid rgba(0,0,0,.10); border-radius: 19px 19px 0 0; }
main.os-panel > .os-bar .os-name { letter-spacing: .14em; }

.wrap { max-width: 1100px; margin-inline: auto; padding-inline: var(--sp-gutter); }
h1, h2, h3 { letter-spacing: var(--trk-head); line-height: var(--lh-head); font-weight: 700; }
/* Links take the text colour, except the PressButton: it sets its own (white
   on pink, black on white), and inheriting here turned the pink buttons' text
   black on these pages while every other page had it white. */
.ig a:not(.kos-pressbtn) { color: inherit; }

.over {
  display: block; margin-bottom: var(--sp-over-head);
  font-family: var(--mono); font-weight: 700; font-size: var(--t-label);
  text-transform: uppercase; letter-spacing: var(--trk-label); color: var(--pink);
}
.over.tag {
  display: inline-block; padding: 8px 12px; border-radius: 999px;
  background: var(--cube-gray, #e5e5e5); color: var(--ink);
  font-size: 16px; text-transform: none; letter-spacing: 0;
}
.hl {
  padding: 0.02em 0.28em; color: var(--ink);
  background-image: linear-gradient(to top, transparent .03em, var(--yellow) .03em, var(--yellow) 1.24em, transparent 1.24em);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl.pink { background-image: linear-gradient(to top, transparent .03em, var(--pink) .03em, var(--pink) 1.24em, transparent 1.24em); color: #fff; }

/* ---------- status pill ---------- */
.ig-status {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 5px 10px 5px 8px; border: 2px solid var(--black); border-radius: 999px;
  font-family: var(--mono); font-weight: 700; font-size: 13px; line-height: 1; color: var(--ink);
  background: #fff;
}
.ig-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--black); background: #fff; }
.ig-status.built { background: var(--black); color: #fff; }
.ig-status.built::before { background: var(--green); border-color: var(--green); }
.ig-status.supported { background: var(--green); }
.ig-status.supported::before { background: var(--black); }
.ig-status.lg { font-size: 15px; padding: 8px 14px 8px 11px; box-shadow: var(--cube-shadow-s, 3px 3px 0 0 #000); }

/* ---------- hero ---------- */
.ig-hero { padding-block: clamp(72px, 10vh, 112px) clamp(56px, 8vh, 88px); text-align: center; }
.ig-hero h1 { margin: 0 auto; max-width: 20ch; font-size: var(--t-hero); letter-spacing: var(--trk-hero); line-height: var(--lh-hero); }
.ig-hero .sub { margin: var(--sp-head-lead) auto 0; max-width: 56ch; font-size: var(--t-lead); line-height: var(--lh-lead); }
.ig-hero .over.tag { margin-bottom: var(--sp-over-head); }

/* the straight-talking note: where things stand, said once and plainly */
.ig-straight {
  margin: clamp(32px, 5vh, 48px) auto 0; max-width: 760px; text-align: left;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: start;
  padding: 20px 22px; background: #fff; border: 3px solid var(--black);
  box-shadow: var(--cube-shadow-l, 6px 6px 0 0 #000);
}
.ig-straight .lbl { grid-row: span 2; font-family: var(--mono); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; background: var(--black); color: #fff; padding: 7px 10px; transform: rotate(-2deg); }
.ig-straight p { font-size: var(--t-body); line-height: var(--lh-body); }
.ig-straight b { font-weight: 700; }

/* the three counts under the hero */
/* The headline number: one line under the intro, a step up from body text and
   no more. A poster-sized version was tried and was too loud for the page. */
.ig-big { margin: clamp(22px, 3.5vh, 32px) auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; }
.ig-big .n { font-weight: 800; font-size: clamp(40px, 5vw, 52px); line-height: 1; letter-spacing: -.02em; color: #f70087; }
.ig-big .t { font-weight: 600; font-size: clamp(17px, 1.8vw, 20px); }

/* ---------- sections ---------- */
.sec { padding-block: var(--sp-section-lg); }
.sec.tight { padding-block: var(--sp-section); }
.sec-h { text-align: center; margin-bottom: clamp(32px, 5vh, 52px); }
.sec-h h2 { margin-inline: auto; max-width: 22ch; font-size: var(--t-h2); }
.sec-h .lead { margin: var(--sp-head-lead) auto 0; max-width: 56ch; font-size: var(--t-lead); line-height: var(--lh-lead); }
.band-grey { position: relative; }
.band-grey > .wrap { position: relative; z-index: 1; }
.band-grey::before {
  content: ''; position: absolute; z-index: 0; inset: 0;
  background-color: var(--cube-secondary-1100, #f4f4f4);
  background-image:
    radial-gradient(var(--cube-gray-400, #ddd) 1.5px, transparent 0),
    radial-gradient(var(--cube-gray-400, #ddd) 1.5px, transparent 0);
  background-position: 0 0, 20px 20px; background-size: 40px 40px, 40px 40px;
  transform: skewY(-1.6deg);
}

/* ---------- the ways in ---------- */
.ig-routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; list-style: none; }
.ig-route {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px;
  background: #fff; border: 3px solid var(--black); border-radius: 14px;
  box-shadow: var(--cube-shadow-l, 6px 6px 0 0 #000);
}
.ig-route .num { font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--pink); }
.ig-route h3 { font-size: 19px; line-height: 1.25; }
.ig-route p { font-size: 15px; line-height: 1.55; flex: 1; }
.ig-route .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 2px dashed rgba(0,0,0,.18); font-family: var(--mono); font-size: 13px; font-weight: 700; }

/* ---------- the directory ---------- */
.ig-tools { display: grid; gap: 16px; margin-bottom: 28px; }
.ig-search { position: relative; max-width: 520px; width: 100%; margin-inline: auto; }
.ig-search input {
  width: 100%; padding: 15px 16px; background: #fff; border: 2.5px solid var(--black); border-radius: 7px;
  box-shadow: var(--cube-shadow-m, 4px 4px 0 0 #000); outline: none;
  font: 400 16px/1.4 var(--mono); color: var(--black);
}
.ig-search input::placeholder { color: #767676; }
.ig-search input:focus-visible { box-shadow: 4px 4px 0 0 var(--pink); }
.ig-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ig-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ig-chip {
  cursor: pointer; padding: 8px 13px; min-height: 40px; background: #fff; color: var(--ink);
  border: 2px solid var(--black); border-radius: 999px;
  font: 700 13px/1.2 var(--mono);
  transition: transform .12s ease, box-shadow .12s ease;
}
.ig-chip:hover { transform: translate(-1px, -1px); box-shadow: var(--cube-shadow-ss, 2px 2px 0 0 #000); }
.ig-chip[aria-pressed="true"] { background: var(--black); color: #fff; }
.ig-chip:focus-visible, .ig-card:focus-visible, .ig-back:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.ig-count { text-align: center; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--cube-gray-600, #5b5b5b); min-height: 1.4em; }

.ig-cat { margin-top: clamp(36px, 5vh, 52px); }
.ig-cat[hidden], .ig-card[hidden] { display: none; }
.ig-cat h3 { font-size: var(--t-h3); margin-bottom: 16px; display: flex; align-items: baseline; gap: 10px; }
.ig-cat h3 small { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--cube-gray-600, #5b5b5b); }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; list-style: none; }
.ig-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 18px 18px 16px;
  background: #fff; border: 2.5px solid var(--black); border-radius: 12px; text-decoration: none;
  box-shadow: var(--cube-shadow-m, 4px 4px 0 0 #000);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ig-card:hover { transform: translate(-2px, -2px); box-shadow: var(--cube-shadow-l, 6px 6px 0 0 #000); }
.ig-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ig-card .name { font-weight: 700; font-size: 18px; line-height: 1.25; }
.ig-card .what { font-size: 14.5px; line-height: 1.5; flex: 1; }
.ig-card .how { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--cube-gray-600, #5b5b5b); }
.ig-card .how::after { content: " \2192"; color: var(--ink); }
.ig-none { display: none; margin-top: 32px; padding: 26px 22px; text-align: center; background: #fff; border: 3px dashed var(--black); border-radius: 14px; }
.ig-none.on { display: block; }
.ig-none p { font-size: var(--t-lead); line-height: var(--lh-lead); max-width: 46ch; margin-inline: auto; }
.ig-none .cube-btn { margin-top: 18px; }

/* ---------- product page ---------- */
.ig-crumb { padding-top: clamp(28px, 4vh, 40px); font-family: var(--mono); font-size: 14px; font-weight: 700; }
.ig-back { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--green); }
.ig-back:hover { text-decoration-color: currentColor; }
.ig-crumb span { color: var(--cube-gray-600, #5b5b5b); }

.ig-phero { padding-block: clamp(36px, 6vh, 64px) clamp(48px, 7vh, 80px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.ig-phero h1 { font-size: var(--t-hero); letter-spacing: var(--trk-hero); line-height: var(--lh-hero); }
.ig-phero h1 .plus { color: var(--pink); }
.ig-phero .sub { margin-top: var(--sp-head-lead); font-size: var(--t-lead); line-height: var(--lh-lead); max-width: 46ch; }
.ig-phero .ig-status { margin-top: 22px; }
.ig-phero .stand { margin-top: 12px; font-size: 15px; line-height: 1.55; max-width: 46ch; }

/* at a glance: a small window of its own */
.ig-glance.os-panel { max-width: none; border-radius: 16px; box-shadow: var(--cube-shadow-xl, 8px 8px 0 0 #000); }
.ig-glance dl { display: grid; }
.ig-glance .row { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 14px 20px; border-top: 2px dashed rgba(0,0,0,.14); }
.ig-glance .row:first-child { border-top: 0; }
.ig-glance dt { font-family: var(--mono); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--cube-gray-600, #5b5b5b); padding-top: 2px; }
.ig-glance dd { font-size: 15.5px; line-height: 1.45; font-weight: 500; }

.ig-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); align-items: start; text-align: left; }
.ig-block h2 { font-size: var(--t-h3); margin-bottom: 14px; }
.ig-block p { font-size: var(--t-body); line-height: var(--lh-body); }
.ig-block p + p { margin-top: 12px; }

.ig-steps { list-style: none; counter-reset: s; display: grid; gap: 14px; }
.ig-steps li { counter-increment: s; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px 18px; background: #fff; border: 2.5px solid var(--black); border-radius: 12px; box-shadow: var(--cube-shadow-m, 4px 4px 0 0 #000); font-size: var(--t-body); line-height: var(--lh-body); }
.ig-steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--black); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 14px; }

.ig-moves { list-style: none; display: grid; gap: 10px; }
.ig-moves li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: var(--t-body); line-height: 1.5; }
.ig-moves li::before { content: ""; width: 12px; height: 12px; margin-top: .3em; background: var(--green); border: 2px solid var(--black); }

.ig-honest { text-align: left; padding: 24px 24px 22px; background: #fff; border: 3px solid var(--black); box-shadow: var(--cube-shadow-l, 6px 6px 0 0 #000); max-width: 820px; margin-inline: auto; }
.ig-honest h2 { font-size: var(--t-h3); margin-bottom: 12px; }
.ig-honest ul { list-style: none; display: grid; gap: 10px; }
.ig-honest li { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: var(--t-body); line-height: var(--lh-body); }
.ig-honest li::before { content: "\2192"; font-family: var(--mono); font-weight: 700; color: var(--pink); }

.ig-cta { text-align: center; }
.ig-cta h2 { margin-inline: auto; max-width: 20ch; font-size: var(--t-h2); }
.ig-cta p { margin: var(--sp-head-lead) auto 0; max-width: 50ch; font-size: var(--t-lead); line-height: var(--lh-lead); }
/* The gap above the button lives on the paragraph, not the button: the
   PressButton island replaces the link at load and its margin goes with it,
   which left the button touching the text. */
.ig-cta h2 + p { margin-bottom: clamp(28px, 4.5vh, 40px); }
.ig-cta .note { margin-top: 16px; font-family: var(--mono); font-size: 14px; font-weight: 700; }

.ig-legal { position: relative; z-index: 1; padding: clamp(40px, 6vh, 56px) 0 clamp(32px, 5vh, 48px); text-align: center; }
.ig-legal p { max-width: 70ch; margin-inline: auto; font-size: 13px; line-height: 1.55; color: var(--cube-gray-600, #5b5b5b); }

/* ---------- supplier logos ----------
   A white tile with the kit's black outline, so every mark sits on the same
   ground whatever its own colours. .none is a product we have no icon for:
   its initials, on grey. */
.ig-logo { flex: none; display: grid; place-items: center; width: 48px; height: 48px; background: #fff; border: 2.5px solid var(--black); border-radius: 11px; overflow: hidden; font: 800 15px/1 var(--font); color: var(--ink); }
.ig-logo img { width: 30px; height: 30px; object-fit: contain; }
.ig-logo.none { background: var(--cube-gray, #e5e5e5); }
.ig-card .top { justify-content: flex-start; align-items: center; gap: 12px; }
.ig-card .top .txt { display: grid; gap: 6px; justify-items: start; min-width: 0; }

/* the wall under the hero */
.ig-wall { margin: clamp(36px, 5vh, 52px) auto 0; max-width: 880px; }
.ig-wall p { font: 700 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--cube-gray-600, #5b5b5b); margin-bottom: 18px; }
.ig-wall ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ig-wall a { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; background: #fff; border: 2.5px solid var(--black); border-radius: 999px; box-shadow: var(--cube-shadow-s, 3px 3px 0 0 #000); text-decoration: none; font-weight: 700; font-size: 15px; transition: transform .15s ease, box-shadow .15s ease; }
.ig-wall a:hover { transform: translate(-2px, -2px); box-shadow: var(--cube-shadow-l, 6px 6px 0 0 #000); }
.ig-wall a:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.ig-wall .ig-logo { width: 36px; height: 36px; border-radius: 50%; border-width: 2px; font-size: 12px; }
.ig-wall .ig-logo img { width: 22px; height: 22px; }
.ig-wall li:nth-child(3n) a { rotate: -1.2deg; }
.ig-wall li:nth-child(4n) a { rotate: 1.4deg; }

/* product page: the two marks joined, above the headline */
.ig-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.ig-lockup .ig-logo { width: 76px; height: 76px; border-width: 3px; border-radius: 18px; box-shadow: var(--cube-shadow-m, 4px 4px 0 0 #000); font-size: 24px; }
.ig-lockup .ig-logo img { width: 46px; height: 46px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  main.os-panel { width: 100%; margin-inline: 0; margin-top: 0; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  main.os-panel > .os-bar { border-radius: 0; }
  .ig-phero, .ig-two { grid-template-columns: minmax(0, 1fr); }
  .ig-straight { grid-template-columns: minmax(0, 1fr); }
  .ig-straight .lbl { grid-row: auto; justify-self: start; }
  .ig-chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--sp-gutter) * -1); padding: 4px var(--sp-gutter) 8px; scrollbar-width: none; }
  .ig-chips::-webkit-scrollbar { display: none; }
  .ig-chip { flex: none; }
  .ig-glance .row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
