/* Index Point product widgets: Design Spec v3, Part B (the app), light only, tokens from /site.css.
   Every widget sits inside .ip so it can be embedded on a client's site with its own tokens (override --brand etc. on
   the .ip element). No colour here is a hex value: everything asks for a token. Motion runs only under html.motion
   (site.js adds it unless the visitor prefers reduced motion or the address has ?motion=off). */
.ip { --ip-gap: 20px; font-family: var(--body); color: var(--text); font-size: 15px; line-height: 1.55; }
.ip [hidden] { display: none !important; }   /* fields hidden by a product (their class sets display) */
.ip * { box-sizing: border-box; }
.ip p { margin: 0; }
.ip a { color: var(--brand-text, var(--brand)); text-underline-offset: 2px; }

/* Cards: the one surface recipe (spec 1d), resting at level 1 */
.ip-card { position: relative; background: var(--card-fill); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line), var(--e1); padding: 22px 24px; min-width: 0; }
.ip-stack { display: grid; gap: var(--ip-gap); align-content: start; }
.ip-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--ip-gap); align-items: start; }
.ip h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.ip h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 8px; }
.ip .lede { color: var(--text-2); font-size: 15px; margin-bottom: 18px; max-width: 62ch; }
.ip .muted { color: var(--muted); }
.ip .small { font-size: 13px; }
.ip .mono { font-family: var(--mono); font-size: 12.5px; }

/* Fields (B4): label above in 13.5px bold, 44px field, 12px radius, brand border and ring on focus */
.ip-f { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.ip-f > label { font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: 0; text-transform: none; }
.ip-f input, .ip-f select, .ip-f textarea { font: inherit; font-size: 15px; padding: 10px 14px; border: 1px solid var(--field-line, var(--line-2)); border-radius: var(--r-sm); width: 100%; min-height: var(--control-h); background: var(--field, var(--surface)); color: var(--text); min-width: 0; box-shadow: var(--field-shadow, none); transition: border-color var(--d2), box-shadow var(--d2); }
.ip-f input::placeholder, .ip-f textarea::placeholder { color: var(--muted); }
.ip-f input:focus, .ip-f select:focus, .ip-f textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring, var(--brand-line)); }
/* Dropdown chevron inset about 20px from the right edge, 44px kept clear (Lewis's rule) */
.ip-f select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2366716F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 20px center; }
.ip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }
.ip-check { display: flex; gap: 10px; align-items: center; font-size: 14.5px; margin-bottom: 10px; cursor: pointer; }
.ip-check input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; flex: none; }
/* Radio cards (B4): a short choice is a pill with a brand edge and wash when chosen */
.ip fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ip fieldset > legend { float: left; width: 100%; margin-bottom: 10px; font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; text-transform: none; color: var(--text); font-family: var(--body); }
.ip-check:has(input[type="radio"]) { margin: 0; padding: 9px 16px 9px 12px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), var(--e1); font-size: 14px; transition: box-shadow var(--d2), background-color var(--d2), color var(--d2), transform var(--d1); }
.ip-check:has(input[type="radio"]):hover { box-shadow: inset 0 0 0 1px var(--brand-line), var(--e2); }
.ip-check:has(input[type="radio"]:checked) { background: var(--brand-wash); box-shadow: inset 0 0 0 1.5px var(--brand), var(--e1); color: var(--brand-deep); font-weight: 700; }
.ip-check:has(input[type="radio"]):active { transform: scale(.97); }
.ip-check input[type="radio"] { width: 18px; height: 18px; }
/* Question flow (one question at a time): a progress bar, a stack of answer cards, back and a summary to edit */
.ip-prog { height: 6px; border-radius: var(--r-pill); background: var(--sunk, var(--line)); overflow: hidden; }
.ip-prog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-top), var(--brand)); transition: width var(--d3) var(--ease-out); }
.ip .ip-q { display: grid; gap: 10px; margin: 0; }
.ip .ip-q > legend { font-size: clamp(19px, 2vw, 22px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.25; margin-bottom: 16px; }
.ip .ip-q .ip-check { width: 100%; padding: 14px 18px 14px 14px; border-radius: var(--r-nest); font-size: 15px; }
.motion .ip-q { animation: ip-rise var(--d4) var(--ease-out) both; }
.ip-qnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ip-sum { list-style: none; margin: 0; padding: 0; display: grid; }
.ip-sum li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft, var(--line)); font-size: 14px; }
.ip-sum li:last-child { border-bottom: 0; }
.ip-sum-edit { font: inherit; font-size: 14px; font-weight: 700; color: var(--brand); background: none; border: 0; padding: 4px 8px; border-radius: var(--r-pill); cursor: pointer; text-align: right; display: inline-flex; gap: 8px; align-items: center; transition: background-color var(--d2); }
.ip-sum-edit:hover { background: var(--brand-wash); }
/* A list of options, each with a tone tag and a reason */
.ip-fits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ip-fits li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: start; padding: 12px 14px; border-radius: var(--r-nest); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; }
.ip-fits .ip-pill { justify-self: start; margin-top: 2px; }
/* Small mono labels (eyebrows, "Your debtor days") */
.ip-label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }

/* Buttons: the website's pills with thickness (1d), 800 weight */
.ip-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 800; min-height: var(--control-h); color: var(--brand-ink); background: linear-gradient(180deg, var(--brand-top), var(--brand)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 18px -12px var(--brand-glow); border: 0; border-radius: var(--r-pill); padding: 10px 22px; cursor: pointer; transition: transform var(--d2) var(--ease-out), box-shadow var(--d2); }
.ip-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 24px -12px var(--brand-glow); }
.ip-btn:active { transform: scale(.97); transition-duration: var(--d1); }
.ip-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring, var(--brand-line)); }
.ip-btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2), var(--e1); }
.ip-btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--brand), var(--e2); color: var(--brand); }
.ip-btn:disabled { opacity: .45; cursor: default; transform: none; }
.ip-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* The answer: an ink panel (spec "ink for moments"), the one thing that matters most on the screen */
.ip-result { position: relative; overflow: hidden; text-align: center; padding: 30px 22px 24px; border-radius: var(--r-lg); background: var(--ink-panel); color: var(--white); box-shadow: var(--e2); isolation: isolate; }
.ip-result::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid currentColor; opacity: .04; z-index: -1; }
.ip-result .ip-label { color: var(--brand-on-ink); }
.ip-big { font-size: clamp(34px, 5vw, 50px); font-weight: 800; letter-spacing: -0.04em; color: inherit; line-height: 1.05; margin-top: 8px; font-variant-numeric: tabular-nums; }
.ip-sub { color: var(--text-2); font-size: 15px; margin-top: 8px; }
.ip-result .ip-sub { color: var(--ink-text); }
/* Stat tiles: glass on the ink panel, white tiles elsewhere */
.ip-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.ip-kpi { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--e1); border-radius: var(--r-nest); padding: 14px 12px; text-align: center; min-width: 0; }
.ip-kpi b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ip-kpi span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.ip-result .ip-kpi { background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.08); }
.ip-result .ip-kpi span { color: var(--ink-text); }
.ip-result .ip-kpis:has(> .ip-kpi:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Comparison bar: you against the industry middle half */
.ip-bar { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--sunk, var(--line)); margin: 28px 4px 10px; }
.ip-bar i { position: absolute; top: 0; bottom: 0; background: var(--brand-line); border-radius: var(--r-pill); }
.ip-bar b { position: absolute; top: -7px; width: 4px; height: 24px; border-radius: 2px; background: var(--brand-deep); transform: translateX(-2px); box-shadow: 0 0 0 3px var(--surface); }
.ip-bar-key { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }

/* Tables (B4): mono heads on a quiet fill, rows that light up, money right aligned */
.ip-table-wrap { overflow-x: auto; border-radius: var(--r-nest); box-shadow: inset 0 0 0 1px var(--line); }
.ip table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ip th, .ip td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft, var(--line)); vertical-align: top; }
.ip th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; background: var(--head, var(--surface-2)); }
.ip tbody tr { transition: background-color var(--d2); }
.ip tbody tr:hover { background: color-mix(in oklab, var(--brand-wash) 55%, transparent); }
.ip tr:last-child td { border-bottom: 0; }
.ip td.num, .ip th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ip td a { font-weight: 700; text-decoration: none; }
.ip td a:hover { text-decoration: underline; }

/* Facts with a dot (the record's timeline) */
.ip-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ip-facts li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 14.5px; }
.ip-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--off-dot, var(--line-2)); margin-top: 7px; }
.ip-facts li.notable::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.ip-facts .d { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Tags (B4): mono, uppercase, a dot */
.ip-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); background: var(--off-wash, var(--surface-2)); color: var(--off, var(--text-2)); white-space: nowrap; }
.ip-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--off-dot, var(--muted)); flex: none; }
.ip-pill.on { background: var(--brand-wash); color: var(--brand-deep); }
.ip-pill.on::before { background: var(--brand); }

/* Company picker: a floating menu (level 3) */
.ip-pick { position: relative; }
.ip-pick ul { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line), var(--e3); max-height: 320px; overflow: auto; }
.ip-pick li button { width: 100%; text-align: left; font: inherit; font-size: 14.5px; padding: 9px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--text); transition: background-color var(--d1); }
.ip-pick li button:hover, .ip-pick li button:focus { background: var(--brand-wash); outline: none; }
.ip-pick small { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }

/* Info (i), expanders and footnotes: the rest stays behind a tap (spec 1a) */
.ip-i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brand-line); color: var(--brand); font-size: 11px; font-weight: 700; cursor: help; vertical-align: 2px; margin-left: 4px; }
.ip details { border-top: 1px solid var(--line-soft, var(--line)); padding-top: 12px; margin-top: 16px; }
.ip summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--brand); }
.ip summary::-webkit-details-marker { display: none; }
.ip summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brand-line); font-weight: 600; flex: none; transition: transform var(--d2) var(--ease-out); }
.ip details[open] > summary::before { transform: rotate(45deg); }
.ip-source { font-size: 12px; color: var(--muted); margin-top: 16px; text-align: center; }

/* Empty state (B4): centred, a brand-wash icon tile, one line */
.ip-empty { position: relative; display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--text-2); padding: 34px 16px; font-size: 15px; }
.ip-empty::before { content: ""; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-wash); box-shadow: inset 0 0 0 1px var(--brand-line); }
.ip-empty::after { content: ""; position: absolute; top: 47px; left: 50%; width: 22px; height: 22px; margin-left: -11px; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M3 19h18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M3 19h18'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Messages (B4): a line in a tone, near what it is about */
.ip-err { display: flex; gap: 10px; align-items: flex-start; justify-content: center; text-align: left; color: var(--bad); background: var(--bad-wash); border-radius: var(--r-sm); font-size: 14px; padding: 12px 14px; }
.ip-err::before { content: "!"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bad-dot); color: var(--white); font-weight: 800; font-size: 12px; flex: none; }
/* Loading (B4): stone shimmer bars where the content will be, no spinners */
.ip-loading { display: grid; gap: 10px; padding: 18px 4px; color: transparent; font-size: 0; }
.ip-loading::before, .ip-loading::after { content: ""; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--sunk, var(--line)) 0%, var(--surface-2, var(--bg)) 50%, var(--sunk, var(--line)) 100%) 0 0 / 200% 100%; }
.ip-loading::before { width: 70%; justify-self: center; height: 34px; border-radius: 12px; }
.ip-loading::after { width: 46%; justify-self: center; }
.ip-more { display: flex; justify-content: center; margin-top: 16px; }

/* Motion (1e): answers rise in, numbers count up (ip.js), bars grow, skeletons shimmer. Off for reduced motion. */
@keyframes ip-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ip-grow { from { transform: scaleX(0); } }
@keyframes ip-shimmer { to { background-position: -200% 0; } }
.motion .ip-in .ip-result, .motion .ip-in .ip-kpi, .motion .ip-in .ip-bar, .motion .ip-in .ip-table-wrap, .motion .ip-in .ip-facts, .motion .ip-in > .ip-report { animation: ip-rise var(--d4) var(--ease-out) both; }
.motion .ip-in .ip-kpi:nth-child(2) { animation-delay: calc(var(--stagger) * 2); }
.motion .ip-in .ip-kpi:nth-child(3) { animation-delay: calc(var(--stagger) * 3); }
.motion .ip-in .ip-kpi:nth-child(4) { animation-delay: calc(var(--stagger) * 4); }
.motion .ip-in .ip-bar { animation-delay: calc(var(--stagger) * 4); }
.motion .ip-in .ip-bar i { transform-origin: left; animation: ip-grow var(--d5) var(--ease-out) both; animation-delay: 200ms; }
.motion .ip-loading::before, .motion .ip-loading::after { animation: ip-shimmer 1.4s linear infinite; }

@media (max-width: 900px) { .ip-cols { grid-template-columns: 1fr; } }
/* Tables become cards under 720px: one row per card, each cell with its column name (ip.js writes data-l) */
@media (max-width: 720px) {
  .ip table.ip-stacked thead { display: none; }
  .ip table.ip-stacked, .ip table.ip-stacked tbody, .ip table.ip-stacked tr, .ip table.ip-stacked td { display: block; width: 100%; }
  .ip table.ip-stacked tr { padding: 12px 14px; border-bottom: 1px solid var(--line-soft, var(--line)); }
  .ip table.ip-stacked tr:last-child { border-bottom: 0; }
  .ip table.ip-stacked td { position: relative; border: 0; padding: 3px 0 3px 104px; display: block; text-align: left; min-height: 22px; }
  .ip table.ip-stacked td.num { text-align: left; }
  .ip table.ip-stacked td[data-l]::before { content: attr(data-l); position: absolute; left: 0; top: 6px; width: 96px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .ip table.ip-stacked td:first-child { display: block; padding-left: 0; font-size: 15px; }
  .ip table.ip-stacked td:first-child::before { content: none; }
}
@media (max-width: 520px) {
  .ip-card { padding: 18px; }
  .ip-result { padding: 24px 16px 18px; }
  .ip th, .ip td { padding: 9px 8px; }
  .ip-bar-key { flex-direction: column; gap: 4px; }
  .ip-report header > div:last-child { text-align: left !important; }
}

/* Titled cards and the summary band, shared by every tool (ip.js adds the icon tiles) */
.ip-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: inline-grid; place-items: center; background: var(--brand-wash); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-line); }
.ip-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ip h2.ip-titled { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ip h2.ip-titled + .lede, .ip h2.ip-titled + p { margin-top: 0; }
.ip-head { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(20px, 2.6vw, 28px); background: var(--ink-panel); color: var(--white); box-shadow: var(--e2); isolation: isolate; margin-bottom: 18px; }
.ip-head::after { content: ""; position: absolute; right: -50px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 32px solid currentColor; opacity: .04; z-index: -1; }
.ip-head .ip-label { color: var(--brand-on-ink); }
.ip-head-big { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; margin-top: 8px; font-variant-numeric: tabular-nums; }
.ip-head-sub { color: var(--ink-text); font-size: 14.5px; margin-top: 6px; }
.ip-head .ip-kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 18px; }
.ip-head .ip-kpi { text-align: left; padding: 12px 14px; background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.08); }
.ip-head .ip-kpi b { font-size: clamp(18px, 2vw, 22px); }
.ip-head .ip-kpi span { color: var(--ink-text); }
.motion .ip-in .ip-head { animation: ip-rise var(--d4) var(--ease-out) both; }
@media (max-width: 520px) { .ip-head .ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The company check: a record. An ink header with the company's tags and four numbers, then one card per check
   (the ones worth a look first), then the filed accounts. Prints on one A4 page, on white. */
.cc { display: grid; gap: var(--ip-gap); }
.cc-head { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); background: var(--ink-panel); color: var(--white); box-shadow: var(--e2); isolation: isolate; }
.cc-head::after { content: ""; position: absolute; right: -50px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 34px solid currentColor; opacity: .04; z-index: -1; }
.cc-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cc-head .ip-label { color: var(--brand-on-ink); }
.cc-date { font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); }
.cc-head h2 { font-size: clamp(26px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; margin: 10px 0 14px; color: inherit; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cc-head .ip-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 22px; }
.cc-head .ip-kpi { text-align: left; padding: 14px 16px; background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.08); }
.cc-head .ip-kpi b { font-size: clamp(20px, 2.2vw, 26px); }
.cc-head .ip-kpi span { color: var(--ink-text); }
.cc-layout { gap: var(--ip-gap); }   /* the layout and stickiness are site.css's .with-side and .stick */
.cc-main, .cc-aside { display: grid; gap: var(--ip-gap); min-width: 0; }
.cc-aside { container-type: inline-size; }
.cc-check { position: relative; background: var(--card-fill); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line), var(--e1); padding: 18px 20px 16px; min-width: 0; }
.cc-check.is-notable { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--info-dot) 55%, transparent), var(--e1); }
.cc-check > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cc-check h3 { margin: 0; font-size: 15.5px; }
.ip-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-line); }
.ip-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ip-pill.cc-look { margin-left: auto; background: var(--info-wash); color: var(--info); }
.ip-pill.cc-look::before { background: var(--info-dot); }
.cc-check .ip-facts { gap: 8px; }
.cc-check .ip-facts li { font-size: 14px; }
.cc-accounts .ip-table-wrap { margin-top: 2px; }
.motion .ip-in .cc-check { animation: ip-rise var(--d4) var(--ease-out) both; }
.motion .ip-in .cc-check:nth-child(2) { animation-delay: calc(var(--stagger) * 1); }
.motion .ip-in .cc-check:nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.motion .ip-in .cc-check:nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.motion .ip-in .cc-check:nth-child(n+5) { animation-delay: calc(var(--stagger) * 4); }
/* Below 1000px (one column, from .with-side) the side cards follow the main ones, two a row on tablets, one on phones. */
@media (max-width: 1000px) { .cc-aside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
/* Each check opens to its full detail. The header tiles open their check. Tables in the narrow side column stack
   like phone tables (the same rules as ip.css's 720px ones, by the column's width). */
@container (max-width: 460px) {
  .ip .cc-aside table.ip-stacked thead { display: none; }
  .ip .cc-aside table.ip-stacked, .ip .cc-aside table.ip-stacked tbody, .ip .cc-aside table.ip-stacked tr, .ip .cc-aside table.ip-stacked td { display: block; width: 100%; }
  .ip .cc-aside table.ip-stacked tr { padding: 10px 12px; border-bottom: 1px solid var(--line-soft, var(--line)); }
  .ip .cc-aside table.ip-stacked td { border: 0; padding: 2px 0; text-align: left; }
}
.cc-aside .cc-kv { grid-template-columns: 1fr; }
.cc-check { scroll-margin-top: var(--s10); }
.cc-more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.cc-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--brand-text); }
.cc-more > summary::-webkit-details-marker { display: none; }
.cc-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brand-line); font-weight: 600; transition: transform var(--d2) var(--ease-out); }
.cc-more[open] > summary::before { transform: rotate(45deg); }
.cc-more > summary:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 3px; border-radius: 6px; }
.cc-deep { display: grid; gap: 14px; margin-top: 16px; min-width: 0; }
.motion .cc-more[open] .cc-deep { animation: ip-rise var(--d4) var(--ease-out) both; }
.cc-sub { margin: 6px 0 -4px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cc-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 24px; margin: 0; }
.cc-kv div { min-width: 0; }
.cc-kv dt { font-size: 12.5px; color: var(--muted); }
.cc-kv dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.cc-stats div { padding: 12px 14px; border-radius: var(--r-nest); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.cc-stats b { display: block; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.cc-stats span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.cc-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; }
.cc-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.cc-ext { font-weight: 600; }
.cc-flag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--bad); }
.cc-up { color: var(--ok); }
.cc-down { color: var(--bad); }
.cc-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cc-chain li { position: relative; padding: 0 0 16px 28px; display: grid; gap: 2px; }
.cc-chain li::before { content: ""; position: absolute; left: 6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); }
.cc-chain li::after { content: ""; position: absolute; left: 10.5px; top: 19px; bottom: 0; width: 1.5px; background: var(--brand-line); }
.cc-chain li:last-child { padding-bottom: 0; }
.cc-chain li:last-child::after { display: none; }
.cc-chain li.here::before { background: var(--brand); }
.cc-chain b { font-size: 14.5px; }
.cc-chain span { font-size: 12.5px; color: var(--muted); }
/* The accounts against the industry (company check): one bar per figure */
.cc-bench { display: grid; gap: 18px; }
.cc-bench:empty { display: none; }
.cc-cmp h5 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.cc-cmp .ip-bar { margin: 18px 4px 8px; }
/* Practice monitor: an overdue filing in the deadlines table */
.pm-over { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--bad); margin-left: 4px; }
/* Prospect finder: the lender filters behind an expander */
.pf-more { margin: 4px 0 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.pf-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--brand-text); }
.pf-more > summary::-webkit-details-marker { display: none; }
.pf-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brand-line); font-weight: 600; transition: transform var(--d2) var(--ease-out); }
.pf-more[open] > summary::before { transform: rotate(45deg); }
.pf-more > summary:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 3px; border-radius: 6px; }
.pf-more-body { margin-top: 12px; }
/* Timeline (company check): date and event, a dot on a line, newest first; filter buttons by kind */
.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color var(--d2) var(--ease-out), color var(--d2) var(--ease-out); }
.cc-chip:hover { color: var(--brand-text); }
.cc-chip[aria-pressed="true"] { background: var(--brand-wash); color: var(--brand-text); box-shadow: inset 0 0 0 1px var(--brand-line); }
.cc-chip:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 2px; }
.cc-tl { list-style: none; margin: 0; padding: 0; display: grid; }
.cc-tl li { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; padding: 0 0 12px 22px; font-size: 14px; }
.cc-tl li[hidden] { display: none; }
.cc-tl li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); }
.cc-tl li::after { content: ""; position: absolute; left: 6.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.cc-tl li:last-child::after { display: none; }
.cc-tl li[data-k="notice"]::before { box-shadow: inset 0 0 0 2px var(--info-dot); }
.cc-tl-d { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 1px; }
.cc-tl-t { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .cc-tl li { grid-template-columns: 1fr; gap: 2px; } }
.cc.is-print #cc-timeline { display: none; }
/* Next steps (side column): the calculators filled from this company, companies like it, watching it */
.cc-next-label { margin: 6px 0 4px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cc-runs { list-style: none; margin: 0 -8px; padding: 0; display: grid; gap: 2px; }
.cc-runs a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; transition: background-color var(--d2) var(--ease-out), color var(--d2) var(--ease-out); }
.cc-runs a::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .5; }
.cc-runs a:hover { background: var(--brand-wash); color: var(--brand-text); }
.cc-runs a:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 1px; }
.cc-next .ip-actions { margin-top: 12px; }
.cc-tags .cc-group a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cc-head button.ip-kpi { font: inherit; color: inherit; border: 0; cursor: pointer; display: block; width: 100%; transition: transform var(--d2) var(--ease-out), background var(--d2) var(--ease-out); }
.cc-head button.ip-kpi:hover { transform: translateY(-2px); background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); }
.cc-head button.ip-kpi:focus-visible { outline: 2px solid var(--brand-on-ink); outline-offset: 2px; }
.cc-head button.ip-kpi { position: relative; }
.cc-head button.ip-kpi::after { content: ""; position: absolute; right: 14px; top: 16px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .45; transition: opacity var(--d2) var(--ease-out); }
.cc-head button.ip-kpi:hover::after { opacity: .9; }
.cc.is-print .cc-head button.ip-kpi::after { display: none; }
@media (max-width: 520px) { .cc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-stats b { font-size: 17px; } .cc-head .ip-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-check .ip-facts li { grid-template-columns: 14px minmax(0, 1fr); } .cc-check .ip-facts .d { grid-column: 2; } }

/* The record on paper (.is-print, set when printing): one A4 page in the brand. The ink header stays (printed
   exactly), checks flow in two columns, an Index Point footer closes it. company-check.js scales it to one page. */
.cc-foot { display: none; }
.cc.is-print { width: 182mm; gap: 8px; font-size: 11px; background: var(--surface); }
.cc.is-print, .cc.is-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
.cc.is-print .cc-head { padding: 16px 18px 14px; border-radius: 14px; box-shadow: none; }
.cc.is-print .cc-head::after { width: 150px; height: 150px; border-width: 22px; right: -30px; top: -40px; }
.cc.is-print .cc-head h2 { font-size: 24px; margin: 6px 0 8px; }
.cc.is-print .cc-date, .cc.is-print .cc-head .ip-label { font-size: 9px; }
.cc.is-print .cc-tags { gap: 4px 12px; }
.cc.is-print .cc-tags .tag { font-size: 8.5px; }
.cc.is-print .cc-head .ip-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.cc.is-print .cc-head .ip-kpi { padding: 8px 10px; border-radius: 10px; }
.cc.is-print .cc-head .ip-kpi b { font-size: 16px; }
.cc.is-print .cc-head .ip-kpi span { font-size: 9px; margin-top: 2px; }
.cc.is-print .cc-layout, .cc.is-print > .cc-main { display: block; columns: 2; column-gap: 8px; }
.cc.is-print .cc-layout > .cc-main, .cc.is-print .cc-aside { display: contents; }
.cc.is-print .stick { position: static; }
.cc.is-print .cc-check { break-inside: avoid; margin: 0 0 8px; padding: 9px 11px 8px; border-radius: 11px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.cc.is-print .cc-check.is-notable { box-shadow: inset 0 0 0 1.2px var(--info-dot); }
.cc.is-print .cc-check > header { gap: 8px; margin-bottom: 6px; }
.cc.is-print .ip-ico { width: 22px; height: 22px; border-radius: 7px; }
.cc.is-print .ip-ico svg { width: 13px; height: 13px; }
.cc.is-print .cc-check h3 { font-size: 11.5px; }
.cc.is-print .ip-pill { font-size: 7.5px; padding: 2px 6px; }
.cc.is-print .ip-facts { gap: 4px; }
.cc.is-print .ip-facts li { font-size: 9.5px; line-height: 1.35; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 6px; }
.cc.is-print .ip-facts li::before { width: 5px; height: 5px; margin-top: 4px; box-shadow: none; }
.cc.is-print .ip-facts .d { font-size: 8.5px; }
.cc.is-print .ip-facts .small { font-size: 8.5px; }
.cc.is-print .cc-accounts { margin: 0; }
.cc.is-print .cc-more { display: none; }
.cc.is-print #cc-accounts .cc-more { display: block; border: 0; margin-top: 6px; padding: 0; }
.cc.is-print #cc-accounts .cc-more > summary, .cc.is-print #cc-accounts .cc-deep > :not(.cc-keep) { display: none; }
.cc.is-print .cc-deep { margin: 0; animation: none; }
.cc.is-print .ip-table-wrap { border-radius: 8px; }
.cc.is-print table { font-size: 9.5px; }
.cc.is-print th, .cc.is-print td { padding: 4px 8px; }
.cc.is-print th { font-size: 8px; }
.cc.is-print .ip-source { font-size: 8px; margin-top: 2px; line-height: 1.4; }
.cc.is-print .cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 8.5px; color: var(--muted); }
.cc-brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 11px; letter-spacing: -0.02em; color: var(--text); }
.cc-brand svg { width: 14px; height: 14px; color: var(--brand); }

/* Product cards (admin list and the public demo list) */
.ip .p-group h2, .p-group h2 { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 16px; font-weight: 500; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.p-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; text-decoration: none; color: inherit; border-radius: var(--r-md); }
.p-card .p-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-line); transition: transform var(--d3) var(--ease-spring); }
.p-card:hover .p-ico { transform: rotate(-6deg) scale(1.06); }
.p-card .p-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p-card b { font-size: 17px; letter-spacing: -0.015em; }
.p-card p { font-size: 14px; color: var(--text-2); }
.p-plans { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.p-card .go { position: absolute; top: 22px; right: 22px; color: var(--muted); transition: transform var(--d2) var(--ease-out), color var(--d2); }
.p-card:hover .go { transform: translateX(3px); color: var(--brand); }
@media (max-width: 520px) {
  /* Product cards: icon beside the name, plans left to the product page */
  .p-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; align-items: center; padding: 18px 44px 18px 18px; }
  .p-card p { grid-column: 1 / -1; }
  .p-card .p-plans { display: none; }
  .p-card .go { top: 29px; right: 16px; }
}

/* One-pager print: A4, the report only, on white (no ink panels on paper) */
@media print {
  @page { size: A4; margin: 14mm; }
  body * { visibility: hidden; }
  .ip-print, .ip-print * { visibility: visible; animation: none !important; }
  html, body { background: var(--surface) !important; }
  .ip-print { position: absolute; top: 0; left: 0; border: 0; padding: 0; box-shadow: none; }
  .ip-print .ip-result { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .ip-print .ip-result .ip-label, .ip-print .ip-sub, .ip-print .ip-result .ip-kpi span { color: var(--text-2); }
  .ip-noprint { display: none !important; }
  /* collapse everything that is not the report, so no blank second page */
  *:has(.ip-print) > *:not(.ip-print):not(:has(.ip-print)) { display: none !important; }
}
