/* Square Vize platform stylesheet.
   System: white, graphite ink, one decisive cobalt accent, hairline rules, 12-column grid,
   mono eyebrows, square corners, dense spec tables. Geist (SIL OFL) + system mono.
   This is a fixed light identity: it does not repaint itself dark for system preference. */

@font-face {
  font-family: "Geist";
  src: url("/assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-2: #f3f4f6;
  --ink: #15181d;
  --ink-2: #3c4147;
  /* #585d63, not the lighter #6b7178 this token used before: that value measured ~4.83:1 on
     white, right at the WCAG AA edge for the small eyebrow/label/hint text it is used for
     throughout the site. This gives a safer ~6.3:1 margin at the same visual "muted grey" role. */
  --ink-3: #585d63;
  --rule: #e2e4e8;
  --rule-strong: #b7bbc2;
  --cobalt: #1f3fe0;
  --cobalt-dark: #15299e;
  --cobalt-ink: #ffffff;
  --signal: var(--cobalt);
  --signal-ink: var(--cobalt-ink);
  --plate: #15181d;
  --plate-2: #20242b;
  --plate-ink: #ffffff;
  --plate-ink-2: #b2b6bd;
  --plate-rule: #343941;
  --woro: #7ea0ff;
  --ok: #1a7a42;
  --warn: #9a6400;
  --error: #b3261e;
  --measure: 68ch;
  --gutter: clamp(16px, 3vw, 32px);
  --max: 1240px;
  --radius: 0;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light only;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font: 400 1rem/1.55 var(--font); color: var(--ink); background: var(--paper); font-feature-settings: "ss01", "cv11"; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 0.15em; }
a:hover { text-decoration-color: var(--cobalt); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.018em; line-height: 1.08; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.1rem + 4.4vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, table { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--paper-2); padding: 12px; border: 1px solid var(--rule); }
.small { font-size: 0.875rem; }
.muted { color: var(--ink-3); }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.75em; }
.eyebrow a { text-decoration: none; }
.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: var(--ink-2); max-width: var(--measure); }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(48px, 7vw, 104px); border-top: 1px solid var(--rule); }
.section.narrow { max-width: 780px; }
.narrow { max-width: 780px; }
.row { display: flex; align-items: center; gap: 16px; }
.between { justify-content: space-between; flex-wrap: wrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Restrained entrance motion: a short, one-time settle. No scroll-jacking, no looping shimmer. */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: settle 0.5s cubic-bezier(.2,.7,.2,1) both; }
  .hero-figure.reveal { animation-delay: 0.08s; }
}
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-head .row { justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand-name b { font-weight: 650; color: var(--cobalt); }
.mark { color: var(--ink); }
.mark-accent-line { stroke: var(--cobalt); }
.mark-accent-fill { fill: var(--cobalt); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(8px, 2vw, 28px); align-items: center; }
.site-nav a { text-decoration: none; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--cobalt); }
.site-nav a.nav-cta { border: 1px solid var(--ink); padding: 8px 14px; background: var(--ink); color: var(--paper); }
.site-nav a.nav-cta:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.site-nav a.nav-adviser { border: 1px solid var(--cobalt); color: var(--cobalt-dark); padding: 6px 12px; font-weight: 600; }
.site-nav a.nav-adviser:hover { background: var(--cobalt); color: var(--cobalt-ink); }
/* Desktop default: the toggle never renders, regardless of its `hidden` attribute state —
   fixes the toggle showing above the full desktop nav once app.js unhides it. */
.nav-toggle { display: none; font: inherit; background: none; border: 1px solid var(--ink); padding: 6px 12px; color: inherit; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav ul { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; gap: 4px; }
  .site-nav ul.open { display: flex; }
  .site-nav a { display: block; padding: 10px 0; }
  .site-nav a.nav-cta { display: inline-block; }
}

/* Hero */
.hero { padding-block: clamp(32px, 5vw, 72px); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: center; margin-bottom: clamp(28px, 5vw, 56px); }
.hero-copy { grid-column: 1 / span 7; }
.hero-figure { position: relative; grid-column: 8 / span 5; margin: 0; border: 1px solid var(--rule); aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.hero-figure figcaption { position: absolute; bottom: 10px; right: 10px; padding: 3px 7px; font-size: 0.7rem; background: white; }
.hero-figure figcaption a { color: var(--ink); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy, .hero-figure { position: relative; grid-column: 1 / -1; }
  .hero-figure { aspect-ratio: 16 / 8; }
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5em 0; }
.fork-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 1000px) { .fork-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .fork-grid { grid-template-columns: 1fr; } }
.fork-card { display: block; border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 18px; text-decoration: none; color: inherit; transition: border-color 0.15s ease, background-color 0.15s ease; }
.fork-card:hover { border-color: var(--cobalt); border-top-color: var(--cobalt); background: var(--paper-2); }
.fork-card h3 { font-size: 1.05rem; margin: 0 0 0.35em; }
.fork-card p.small { margin: 0; color: var(--ink-2); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); align-items: start; }

/* Buttons */
.btn { display: inline-block; background: var(--cobalt); color: var(--cobalt-ink); border: 1px solid var(--cobalt); padding: 12px 22px; font: 600 0.95rem/1 var(--font); text-decoration: none; cursor: pointer; border-radius: var(--radius); transition: background-color 0.15s ease, border-color 0.15s ease; }
.btn:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); color: var(--cobalt-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.block { display: block; text-align: center; width: 100%; margin: 1em 0 0.5em; }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.link { font-weight: 600; color: var(--cobalt-dark); }
.nav-adviser-cta { border-color: var(--cobalt); color: var(--cobalt-dark); font-weight: 700; }
.nav-adviser-cta:hover { background: var(--cobalt); color: var(--cobalt-ink); border-color: var(--cobalt); }
.link.block { display: block; text-align: center; }

/* Sections */
.sec-head { max-width: 820px; margin-bottom: clamp(24px, 4vw, 48px); }
.page-head { margin-bottom: clamp(24px, 4vw, 48px); }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gutter); }
.group { border-top: 2px solid var(--ink); padding-top: 16px; }
.group h3 .mono { color: var(--cobalt-dark); margin-right: 6px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.spec th, table.spec td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); }
table.spec th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
table.spec td .muted { display: block; font-size: 0.85rem; }
table.spec td.mono { white-space: nowrap; }
.plate { background: var(--plate); color: var(--plate-ink); }
.plate .section { border-top-color: var(--plate-rule); }
.plate .eyebrow, .plate .muted { color: var(--plate-ink-2); }
.plate .lede { color: var(--plate-ink); opacity: 0.85; }
.plate a { text-decoration-color: var(--plate-rule); }
.plate .btn.ghost { color: var(--plate-ink); border-color: var(--plate-ink); }
.plate .btn.ghost:hover { background: var(--plate-ink); color: var(--plate); }
.plate .btn { background: var(--cobalt); color: var(--cobalt-ink); border-color: var(--cobalt); }
.plate .btn:hover { background: var(--woro); color: var(--plate); border-color: var(--woro); }
.plate .panel { border-color: var(--plate-rule); background: var(--plate-2); }
.plate .ticks li::before { color: var(--woro); }
.plate .exclusions { border-color: var(--plate-rule); }
.method { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); }
.method li { counter-increment: step; border-top: 1px solid var(--plate-rule); padding-top: 16px; }
.method li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); color: var(--plate-ink-2); display: block; margin-bottom: 8px; }
.method h3 { font-size: 1.1rem; }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gutter); }
.zone { border: 1px solid var(--rule); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.zone h3 { font-size: 1.05rem; margin: 0; }
.zone .link { margin-top: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.kv dt { color: var(--ink-3); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.note { border: 1px solid var(--rule); border-left: 3px solid var(--cobalt); padding: 16px 18px; background: var(--paper-2); }
.note-inline { border-left: 3px solid var(--cobalt); padding: 8px 12px; background: var(--paper-2); }
.cta-band { text-align: left; }
.cta-band .btn { margin-top: 0.5em; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 4px 0; border-bottom: 1px solid var(--rule); }
.plain li:last-child { border-bottom: 0; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding: 6px 0 6px 22px; border-bottom: 1px solid var(--rule); }
.ticks li::before { content: "■"; position: absolute; left: 0; top: 9px; font-size: 0.6rem; color: var(--cobalt); }
.numbered { padding-left: 1.4em; }
.numbered li { padding: 4px 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 30px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 7px; width: 20px; height: 20px; border: 1px solid currentColor; font: 500 0.7rem/20px var(--mono); text-align: center; }

/* Services */
.service-group { padding: 32px 0; border-top: 1px solid var(--rule); }
.service-group h2 .mono { color: var(--cobalt-dark); margin-right: 8px; }
.service-list { display: grid; gap: 0; }
.service-row { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; padding: 18px 0; border-top: 1px solid var(--rule); align-items: start; }
.service-row h3 { margin: 0 0 4px; }
.service-row h3 a { text-decoration: none; }
.service-row h3 a:hover { text-decoration: underline; }
.service-row .index { color: var(--ink-3); padding-top: 4px; }
.row-actions { display: flex; flex-direction: column; gap: 6px; text-align: right; }
@media (max-width: 700px) { .service-row { grid-template-columns: 50px 1fr; } .row-actions { grid-column: 2; flex-direction: row; text-align: left; } }
.service-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr; } }
.service-main section { padding: 20px 0; border-top: 1px solid var(--rule); }
.service-main h2 { font-size: 1.25rem; }
.exclusions { border-left: 3px solid var(--warn); padding-left: 16px !important; }
.service-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.panel { border: 1px solid var(--rule); padding: 20px; background: var(--paper-2); }
.panel .eyebrow { margin-bottom: 0.5em; }

/* Setup explorer */
.setup-grid { display: grid; grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr); gap: var(--gutter); align-items: start; }
/* Grid items default to min-width: auto, so a wide child (the results table below) can force
   this track past the viewport instead of shrinking into its own scrollbar. */
.setup-grid > * { min-width: 0; }
@media (max-width: 900px) { .setup-grid { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.85rem; font-weight: 500; margin: 12px 0 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea { width: 100%; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--rule-strong); padding: 10px 12px; border-radius: var(--radius); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cobalt); outline: 2px solid var(--cobalt); outline-offset: 0; }
/* Explicit instead of each browser's own default (some ship a lighter placeholder grey that
   does not clear 4.5:1 on white), so every field's placeholder hint has a known-passing contrast. */
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > div { min-width: 0; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.explorer-form .btn { margin-top: 16px; }
/* Keeps a wide results table (five columns, some zone/activity names run long) scrolling inside
   itself at narrow widths instead of forcing the whole page to scroll horizontally. */
.table-scroll { overflow-x: auto; max-width: 100%; }
.results-table tr.conflict td { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.flag { display: block; font-size: 0.78rem; color: var(--warn); font-family: var(--mono); }
.adviser { margin-top: clamp(40px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--rule); }
.ask-row { grid-template-columns: 1fr auto; align-items: end; }
.ask-row input { min-width: 0; }
@media (max-width: 480px) { .ask-row { grid-template-columns: 1fr; } }
.adviser-thread { margin-top: 20px; display: grid; gap: 12px; }
.turn { border: 1px solid var(--rule); padding: 14px 16px; }
.turn.user { background: var(--paper-2); }
.turn p { margin-bottom: 0.6em; }
.turn p:last-child { margin-bottom: 0; }
.zone-notes { margin-top: clamp(40px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--rule); overflow-x: auto; }
.docs-details { margin-top: 20px; }
.docs-details summary { cursor: pointer; font-weight: 500; padding: 8px 0; }

/* Enquiry */
.enquiry-form .field { margin-bottom: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { border: 1px solid var(--rule); padding: 14px 16px; margin: 20px 0; }
.consent legend { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 0 6px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: 0.92rem; margin: 10px 0; }
.check input { margin-top: 4px; width: 18px; height: 18px; }
.error { color: var(--error); font-size: 0.85rem; margin: 4px 0 0; }
.alert { border: 1px solid var(--error); border-left-width: 4px; padding: 10px 14px; margin-bottom: 16px; }
.alert.ok { border-color: var(--ok); }
.alert p { margin: 0; }
.context-box { border: 1px dashed var(--rule-strong); padding: 12px 14px; margin: 12px 0; }
[aria-invalid="true"] { border-color: var(--error); }

/* Console */
.console-body .site-nav { display: none; }
.console .counts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.console .counts a { text-decoration: none; border: 1px solid var(--rule); padding: 4px 10px; }
.console .counts a.current { border-color: var(--ink); background: var(--paper-2); }
.console .counts b { font-weight: 600; margin-left: 4px; }
.console-table a { text-decoration: none; font-weight: 600; color: var(--cobalt-dark); }
.status { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--rule-strong); }
.s-new { border-color: var(--cobalt); color: var(--cobalt-dark); }
.s-won { border-color: var(--ok); color: var(--ok); }
.s-spam, .s-closed { color: var(--ink-3); }
.timeline { list-style: none; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.inline { display: inline-flex; gap: 10px; align-items: center; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: 48px; padding: 48px 0 24px; background: var(--paper-2); }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(5, 1fr); gap: var(--gutter); }
@media (max-width: 1080px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col .plain li { border: 0; padding: 2px 0; }
.foot-col a { text-decoration: none; font-size: 0.92rem; }
.foot-col a:hover { text-decoration: underline; }
.foot-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 16px; color: var(--ink-3); }
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { text-decoration: underline; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* Audience journeys (/operations /technology /finance /founders) */
.journey-page section { padding: 20px 0; border-top: 1px solid var(--rule); }
.journey-page .journey-head { border-top: 0; padding-top: 0; }
.journey-page h2 { font-size: 1.2rem; }
.journey-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gutter); margin: 24px 0; }
.journey-service { border: 1px solid var(--rule); border-top: 2px solid var(--cobalt); padding: 16px; }
.journey-service h3 { font-size: 1rem; margin-bottom: 0.4em; }
.journey-service h3 a { text-decoration: none; }
.journey-service h3 a:hover { text-decoration: underline; }
.journey-zones { margin: 16px 0; }
.journey-cta { border-top: 2px solid var(--ink); padding-top: 20px; margin-top: 32px; }
.journey-cta .btn { margin-bottom: 0.5em; }

@media print { .site-head, .site-foot, .nav-toggle, .btn { display: none !important; } body { background: #fff; color: #000; } }
