/* Homepage (scoped to body.page-home). Loads after site.css and theme.css. */

.page-home {
  --ink: #0b1b3f;
  --signal: #1f5eff;
  --signal-deep: #1446d6;
  --paper: #f5f7fb;
  --white: #ffffff;
  --rule: #dce2ee;
  --slate: #5a6480;
  --highlighter: #ffe36e;

  /* status colours used by the sample systems */
  --green: #0f7a55;  --green-bg: #dcf5ea;
  --blue: #1446d6;   --blue-bg: #e6edff;
  --amber: #9a5b00;  --amber-bg: #fff1cc;
  --red: #b42318;    --red-bg: #fde8e7;

  --display: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);

  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.page-home ::selection { background: var(--highlighter); color: var(--ink); }
.page-home a:focus-visible,
.page-home button:focus-visible,
.page-home input:focus-visible,
.page-home select:focus-visible,
.page-home textarea:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* site.css and theme.css pad every <section>; the homepage sets its own rhythm */
.page-home section { padding: 0; }

.hx-wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.hx-wrap-wide { max-width: 1400px; }
.hx-nowrap { white-space: nowrap; }
.hx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* low-specificity resets so component padding wins */
:where(.page-home) fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:where(.page-home) legend { padding: 0; }

/* ── Type ── */
.hx-title, .hx-h2 { font-family: var(--display); color: inherit; text-wrap: balance; }
.hx-h2 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.hx-lede { color: var(--slate); font-size: 1.125rem; max-width: 52ch; line-height: 1.6; }
.page-home h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.hx-fine { color: var(--slate); font-size: .875rem; line-height: 1.5; }

.hx-textlink, .hx-linkbutton {
  color: var(--signal); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1.5px; text-underline-offset: .28em;
  text-decoration-color: color-mix(in srgb, var(--signal) 35%, transparent);
  transition: text-decoration-color .2s;
}
.hx-textlink:hover, .hx-linkbutton:hover { text-decoration-color: var(--signal); }
.hx-linkbutton { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }

.h-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.6rem; border-radius: 10px;
  font-family: var(--body); font-size: 1rem; font-weight: 600; text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.h-btn:active { transform: translateY(1px); }
.h-btn-solid { background: var(--signal); color: #fff; }
.h-btn-solid:hover { background: var(--signal-deep); }
.h-btn-line { border-color: color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); background: transparent; }
.h-btn-line:hover { border-color: var(--ink); }
.h-btn-light { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.h-btn-light:hover { border-color: #fff; }
.hx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }

/* Nav sits on the paper hero here; everything else about it comes from theme.css */
.page-home #navbar { background: color-mix(in srgb, var(--paper) 96%, transparent); }

/* Changed values get a brief highlighter mark */
.hx-flash { animation: hx-flash 1.8s ease-out; }
tr.hx-flash { animation: none; }
tr.hx-flash > td { animation: hx-flash 1.8s ease-out; }
@keyframes hx-flash {
  0%, 35% { background-color: var(--highlighter); }
  100% { background-color: transparent; }
}

/* ── Hero ── */
.page-home .hx-hero { padding-top: clamp(7rem, 12vw, 9.5rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.hx-title {
  font-size: clamp(2.4rem, 5.2vw, 4.75rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 19ch;
}
/* The part of the headline that follows the business picked below */
.hx-slot {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: .075em;
  text-underline-offset: .14em;
  border-radius: .08em;
}
.hx-slot.is-new { animation: hx-flash 1.6s ease-out; }
.hx-hero-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.75rem 3rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.hx-hero-row .hx-lede { font-size: clamp(1.08rem, 1.3vw, 1.22rem); max-width: 50ch; line-height: 1.55; }

/* The builder: controls on the left, a running sample system on a drafting grid */
.hx-bench {
  display: grid;
  grid-template-columns: minmax(18rem, 23rem) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "industry stage"
    "modules stage"
    "summary stage";
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(11,27,63,.04), 0 40px 90px -45px rgba(11,27,63,.4);
  scroll-margin-top: 96px;
}
.hx-step-industry { grid-area: industry; }
.hx-step-modules { grid-area: modules; }
.hx-summary { grid-area: summary; }
.hx-stage { grid-area: stage; }

.hx-step { padding: 1.5rem 1.75rem; }
.hx-step-modules, .hx-summary { border-top: 1px solid var(--rule); }
.hx-step legend {
  float: left; width: 100%;
  display: flex; align-items: center; gap: .65rem;
  font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: .9rem;
}
.hx-step legend + * { clear: both; }
.hx-step-n {
  flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; line-height: 1;
}

.hx-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.hx-chip { position: relative; cursor: pointer; }
.hx-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.hx-chip span {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--white);
  font-size: .94rem; font-weight: 500; color: var(--ink); white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.hx-chip:hover span { border-color: var(--ink); }
.hx-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.hx-chip input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }

.hx-modules { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.hx-module {
  position: relative; display: flex; align-items: center; gap: .75rem;
  min-height: 2.6rem; padding: .35rem .5rem; margin-inline: -.5rem;
  border-radius: 8px; cursor: pointer; font-size: .97rem; line-height: 1.35;
}
.hx-module:hover { background: var(--paper); }
.hx-module input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.hx-check {
  flex: none; display: grid; place-items: center; width: 1.25rem; height: 1.25rem;
  border: 1.5px solid #97a3bf; border-radius: 5px; background: var(--white);
  transition: background .15s, border-color .15s;
}
.hx-module input:checked + .hx-check { background: var(--signal); border-color: var(--signal); }
.hx-module input:checked + .hx-check::after {
  content: ''; width: .34rem; height: .64rem; margin-top: -.12rem;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.hx-module input:focus-visible + .hx-check { outline: 2px solid var(--signal); outline-offset: 2px; }

.hx-summary { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.hx-summary p { font-size: .98rem; line-height: 1.5; }

.hx-stage {
  position: relative; container-type: inline-size; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border-left: 1px solid var(--rule);
  background-color: #eef2fb;
  background-image:
    linear-gradient(rgba(31,94,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,94,255,.075) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}

/* The sample system */
.hx-app {
  position: relative; overflow: hidden;
  background: var(--white); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(11,27,63,.08), 0 28px 60px -30px rgba(11,27,63,.5);
  font-size: .875rem; line-height: 1.4; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hx-app-bar { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; border-bottom: 1px solid var(--rule); }
.hx-app-mark { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 6px; background: var(--signal); }
.hx-app-bar strong { font-weight: 600; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-app-live { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--green); font-size: .78rem; font-weight: 600; }
.hx-app-live::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: #1fb57a; }
.hx-app-sample { flex: none; padding: .1rem .55rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--slate); font-size: .74rem; }

.hx-app-body { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); min-height: 25rem; }
.hx-app-nav {
  list-style: none; margin: 0; padding: .9rem .6rem;
  display: flex; flex-direction: column; gap: .15rem;
  background: var(--ink); color: rgba(255,255,255,.68);
}
.hx-app-nav li { padding: .45rem .65rem; border-radius: 7px; font-size: .82rem; line-height: 1.3; }
.hx-app-nav li.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.hx-app-nav li.hx-flash { animation: hx-nav-in 1.6s ease-out; }
@keyframes hx-nav-in {
  0%, 35% { background: rgba(255,227,110,.95); color: var(--ink); }
  100% { background: transparent; }
}

.hx-app-main { min-width: 0; display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 1.25rem 1.4rem; }
.hx-app-head small { color: var(--slate); font-size: .78rem; }
.hx-app-head strong { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.hx-app-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.hx-app-kpis > div { border: 1px solid var(--rule); border-radius: 10px; padding: .7rem .8rem; }
.hx-app-kpis b { display: block; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.hx-app-kpis span { display: block; margin-top: .15rem; color: var(--slate); font-size: .76rem; line-height: 1.3; }

.hx-app-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .82rem; }
.hx-app-table th {
  padding: .45rem .6rem; background: #f5f7fb; color: var(--slate);
  font-size: .74rem; font-weight: 500; text-align: left; white-space: nowrap;
}
.hx-app-table th:first-child { border-radius: 8px 0 0 8px; }
.hx-app-table th:last-child { border-radius: 0 8px 8px 0; width: 30%; }
.hx-app-table td {
  padding: .55rem .6rem; border-top: 1px solid #edf0f6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hx-app-table tr:first-child td { border-top: 0; }
.hx-pill { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.hx-pill.g { background: var(--green-bg); color: var(--green); }
.hx-pill.b { background: var(--blue-bg); color: var(--blue); }
.hx-pill.a { background: var(--amber-bg); color: var(--amber); }
.hx-pill.r { background: var(--red-bg); color: var(--red); }

.hx-app-toasts {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
  display: grid; justify-items: end; gap: .5rem;
  max-width: min(21rem, calc(100% - 2rem)); pointer-events: none;
}
.hx-toast {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .7rem .9rem; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: .82rem; line-height: 1.35;
  box-shadow: 0 14px 30px -12px rgba(11,27,63,.55);
  animation: hx-toast-in .35s ease-out;
  transition: opacity .3s, transform .3s;
}
.hx-toast::before {
  content: ''; flex: none; width: .95rem; height: .95rem; margin-top: .1rem; border-radius: 50%;
  background: #2fd18a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='%230b1b3f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.hx-toast.is-leaving { opacity: 0; transform: translateY(6px); }
@keyframes hx-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hx-stage-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.hx-stage-foot p { color: var(--slate); font-size: .875rem; line-height: 1.45; max-width: 44ch; }
.hx-simulate {
  min-height: 2.6rem; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); background: var(--white);
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: border-color .2s;
}
.hx-simulate:hover { border-color: var(--ink); }

/* Narrow stages: the menu becomes a strip and the least useful column goes */
@container (max-width: 600px) {
  .hx-app-body { grid-template-columns: 1fr; min-height: 0; }
  .hx-app-nav {
    flex-direction: row; gap: .25rem; padding: .45rem .5rem; overflow: hidden; white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .hx-app-nav li { flex: none; padding: .35rem .6rem; font-size: .78rem; }
  .hx-app-main { padding: .9rem .9rem 1.1rem; gap: .8rem; }
  .hx-app-kpis { gap: .45rem; }
  .hx-app-kpis > div { padding: .55rem .6rem; }
  .hx-app-kpis b { font-size: 1.05rem; }
  .hx-app-kpis span { font-size: .7rem; }
  .hx-app-table th:nth-child(3), .hx-app-table td:nth-child(3) { display: none; }
  .hx-app-table th:last-child { width: 38%; }
  .hx-app-sample { display: none; }
  .hx-app-toasts { left: .75rem; right: .75rem; bottom: .75rem; max-width: none; }
}

/* ── Proof strip ── */
.hx-proof { border-block: 1px solid var(--rule); }
.hx-proof-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; padding-block: 1.6rem; }
.hx-proof p { color: var(--slate); font-size: .95rem; }
.hx-proof ul { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; list-style: none; margin: 0; padding: 0; }
.hx-proof li { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.hx-proof .hx-proof-sec { margin-left: auto; }

/* ── Section rhythm ── */
.page-home .hx-section { padding-block: clamp(5rem, 10vw, 8.5rem); }
.hx-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.25rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.hx-head .hx-lede { max-width: 46ch; }
.hx-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.hx-split-copy { position: sticky; top: 110px; display: grid; gap: 1.25rem; justify-items: start; }

/* Shared form fields */
.hx-play-form label, .hx-site-name, .hx-form label { display: grid; gap: .4rem; font-size: .92rem; font-weight: 600; color: var(--ink); }
.hx-play-form input, .hx-play-form select, .hx-site-name input,
.hx-form input:not([type="checkbox"]), .hx-form select, .hx-form textarea {
  width: 100%; min-height: 3.1rem; padding: .8rem .95rem;
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--rule); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.hx-play-form input:focus, .hx-play-form select:focus, .hx-site-name input:focus,
.hx-form input:focus, .hx-form select:focus, .hx-form textarea:focus {
  outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(31,94,255,.16);
}

/* ── Automation playground ── */
.hx-play { background: var(--white); }
.hx-play-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hx-play-form {
  position: sticky; top: 100px;
  display: grid; gap: 1.1rem; padding: clamp(1.4rem, 3vw, 1.9rem);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 18px;
}
.hx-play-form .h-btn { width: 100%; }

.hx-play-steps { list-style: none; margin: 0; padding: 0 0 0 2.25rem; position: relative; }
.hx-play-steps::before { content: ''; position: absolute; left: .55rem; top: .7rem; bottom: 1.4rem; width: 2px; background: var(--rule); }
.hx-play-step { position: relative; padding-bottom: 1.75rem; }
.hx-play-step:last-child { padding-bottom: 0; }
.hx-play-step::before {
  content: ''; position: absolute; left: -2.25rem; top: .3rem; width: 1.2rem; height: 1.2rem;
  border-radius: 50%; background: var(--white); border: 2px solid #b6c0d6;
  transition: background .3s, border-color .3s;
}
.hx-play-step.is-done::before {
  background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
  border-color: var(--signal);
}
.hx-play-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--slate); font-size: .84rem; }
.hx-play-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.hx-play-step h3 { font-size: 1.12rem; line-height: 1.3; color: var(--slate); transition: color .3s; }
.hx-play-step.is-done h3 { color: var(--ink); }
.hx-play-body:empty { display: none; }
.hx-play-body { margin-top: .7rem; max-width: 34rem; animation: hx-rise .35s ease-out; }
@keyframes hx-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hx-bubble { display: grid; gap: .3rem; justify-items: start; }
.hx-bubble p { padding: .7rem 1rem; border-radius: 16px 16px 16px 4px; background: #eef1f6; font-size: .97rem; line-height: 1.45; }
.hx-bubble small { color: var(--slate); font-size: .8rem; }
.hx-bubble.is-reply { justify-items: end; }
.hx-bubble.is-reply p { border-radius: 16px 16px 4px 16px; background: var(--signal); color: #fff; }

.hx-crm { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); gap: .3rem 1.5rem; margin: 0; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 12px; font-size: .9rem; }
.hx-crm dt { color: var(--slate); font-size: .78rem; }
.hx-crm dd { margin: 0; font-weight: 600; }

.hx-quote { border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; font-size: .92rem; font-variant-numeric: tabular-nums; }
.hx-quote-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: .7rem 1rem; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hx-quote-head span { color: var(--slate); }
.hx-quote table { width: 100%; border-collapse: collapse; }
.hx-quote td { padding: .5rem 1rem; border-top: 1px solid #edf0f6; vertical-align: top; }
.hx-quote tr:first-child td { border-top: 0; }
.hx-quote td:last-child { text-align: right; white-space: nowrap; }
.hx-quote .hx-quote-total td { font-weight: 600; border-top: 1px solid var(--rule); }

.hx-approve {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
  padding: .85rem 1rem; border-radius: 14px; background: var(--ink); color: #fff; font-size: .92rem;
}
.hx-approve small { display: block; color: rgba(255,255,255,.65); font-size: .78rem; }
.hx-approve-btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px;
  background: #2fd18a; color: var(--ink); font-weight: 600; font-size: .85rem;
}
.hx-sent { font-size: .97rem; line-height: 1.55; }

.hx-play-result { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px solid var(--rule); display: grid; gap: 1.75rem; }
.hx-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; margin: 0; }
.hx-compare dt { font-weight: 600; margin-bottom: .35rem; }
.hx-compare dd { margin: 0; color: var(--slate); font-size: 1rem; }
.hx-compare div:last-child dt { color: var(--signal-deep); }

/* ── Website preview ── */
.hx-site { background: var(--paper); }
.hx-site-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "name preview" "options preview";
  gap: 1.75rem clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.hx-site-name { grid-area: name; }
.hx-site-options { grid-area: options; display: grid; gap: 1.6rem; justify-items: start; }
.hx-site-options legend { float: left; width: 100%; margin-bottom: .6rem; font-size: .92rem; font-weight: 600; color: var(--ink); }
.hx-site-options legend + * { clear: both; }
.hx-site-options .hx-chip span { min-height: 2.4rem; padding: 0 .9rem; font-size: .9rem; }
.hx-site-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }

.hx-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.hx-swatch {
  position: relative; display: inline-flex; align-items: center; gap: .55rem;
  min-height: 2.6rem; padding: .3rem .95rem .3rem .35rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--white);
  font-size: .92rem; font-weight: 500; cursor: pointer;
}
.hx-swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.hx-swatch-dot {
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-accent) 50%);
  box-shadow: inset 0 0 0 1px rgba(11,27,63,.18);
}
.hx-swatch:hover { border-color: var(--ink); }
.hx-swatch:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hx-swatch:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }

.hx-segment { display: inline-flex; padding: .25rem; border-radius: 999px; background: #e4e9f3; }
.hx-segment label { position: relative; cursor: pointer; }
.hx-segment input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.hx-segment span { display: block; padding: .45rem 1.15rem; border-radius: 999px; font-size: .9rem; font-weight: 500; color: var(--slate); transition: background .2s, color .2s; }
.hx-segment input:checked + span { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(11,27,63,.16); }
.hx-segment input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }

.hx-browser {
  grid-area: preview; justify-self: center; width: 100%; max-width: 100%; overflow: hidden;
  background: var(--white); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(11,27,63,.1), 0 30px 70px -32px rgba(11,27,63,.45);
  transition: max-width .45s ease, border-radius .45s ease;
}
.hx-browser[data-device="phone"] { max-width: 23rem; border-radius: 36px; box-shadow: 0 0 0 10px var(--ink), 0 30px 70px -20px rgba(11,27,63,.5); }
.hx-browser-bar { display: flex; align-items: center; gap: .9rem; padding: .6rem .9rem; background: #eef1f6; border-bottom: 1px solid var(--rule); }
.hx-browser-dots { display: flex; gap: .35rem; }
.hx-browser-dots i { width: .62rem; height: .62rem; border-radius: 50%; background: #cfd6e4; }
.hx-browser-url {
  flex: 1; min-width: 0; max-width: 22rem; margin-inline: auto; padding: .22rem .9rem;
  border-radius: 999px; background: var(--white); color: var(--slate);
  font-size: .8rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hx-browser[data-device="phone"] .hx-browser-bar { padding-top: .8rem; }
.hx-browser[data-device="phone"] .hx-browser-dots { display: none; }
.hx-browser[data-device="phone"] .hx-mini { height: 34rem; overflow-y: auto; scrollbar-width: none; }

/* The mini website takes its colours from the picked look */
.hx-mini {
  container-type: inline-size;
  background: var(--m-bg); color: var(--m-ink);
  font-size: .9rem; line-height: 1.45;
  transition: background-color .35s, color .35s;
}
.hx-mini-nav {
  display: flex; align-items: center; gap: 1.25rem; padding: .95rem 1.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--m-ink) 10%, transparent);
}
.hx-mini-nav strong { margin-right: auto; min-width: 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-mini-links { display: flex; gap: 1.1rem; color: var(--m-muted); font-size: .82rem; white-space: nowrap; }
.hx-mini-navcta { flex: none; padding: .38rem .85rem; border-radius: 999px; background: var(--m-accent); color: var(--m-on-accent); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.hx-mini-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.75rem; align-items: center; padding: 2.6rem 1.5rem 2.2rem; }
.hx-mini-h { display: block; font-size: clamp(1.45rem, 4.6cqi, 2.35rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.hx-mini-copy p { margin: .8rem 0 1.2rem; color: var(--m-muted); font-size: .88rem; }
.hx-mini-btn { display: inline-block; padding: .62rem 1.15rem; border-radius: 9px; background: var(--m-accent); color: var(--m-on-accent); font-size: .85rem; font-weight: 600; text-align: center; }
.hx-mini-form { display: grid; gap: .5rem; padding: 1.1rem; border-radius: 14px; background: var(--m-surface); }
.hx-mini-form b { margin-bottom: .2rem; font-size: .92rem; }
.hx-mini-form > span:not(.hx-mini-btn) {
  padding: .5rem .65rem; border-radius: 8px; background: var(--m-bg); color: var(--m-muted); font-size: .76rem;
  border: 1px solid color-mix(in srgb, var(--m-ink) 12%, transparent);
}
.hx-mini-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 0 1.5rem 1.75rem; }
.hx-mini-features > div { display: grid; gap: .6rem; align-content: start; padding: 1rem; border-radius: 12px; background: var(--m-surface); }
.hx-mini-features i {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background-color: var(--m-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 0a12 12 0 110 24 12 12 0 010-24zm5.3 7.3a1 1 0 00-1.4 0L10.5 12.7 8.1 10.3a1 1 0 10-1.4 1.4l3.1 3.1a1 1 0 001.4 0l6.1-6.1a1 1 0 000-1.4z'/%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'%3E%3Cpath fill-rule='evenodd' d='M12 0a12 12 0 110 24 12 12 0 010-24zm5.3 7.3a1 1 0 00-1.4 0L10.5 12.7 8.1 10.3a1 1 0 10-1.4 1.4l3.1 3.1a1 1 0 001.4 0l6.1-6.1a1 1 0 000-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hx-mini-features b { font-size: .86rem; line-height: 1.3; }
.hx-mini-foot { padding: .85rem 1.5rem; color: var(--m-muted); font-size: .74rem; border-top: 1px solid color-mix(in srgb, var(--m-ink) 10%, transparent); }
@container (max-width: 560px) {
  .hx-mini-nav { gap: .75rem; padding: .8rem 1rem; }
  .hx-mini-links { display: none; }
  .hx-mini-hero { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.6rem 1rem 1.4rem; }
  .hx-mini-h { font-size: 1.55rem; }
  .hx-mini-features { grid-template-columns: 1fr; padding: 0 1rem 1.25rem; }
  .hx-mini-features > div { grid-template-columns: auto 1fr; align-items: center; padding: .75rem .85rem; }
  .hx-mini-features i { width: 1.4rem; height: 1.4rem; }
  .hx-mini-foot { padding: .75rem 1rem; }
}

/* ── Work ── */
.hx-work { background: var(--white); }
.hx-case { display: grid; gap: 1.5rem; align-content: start; }
.hx-case-lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hx-case-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem); margin-top: clamp(4rem, 8vw, 6.5rem); }
.hx-shot {
  display: block; overflow: hidden; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(11,27,63,.08), 0 24px 60px -30px rgba(11,27,63,.4);
  transition: transform .35s ease, box-shadow .35s ease;
}
.hx-shot img { display: block; width: 100%; height: auto; }
.hx-shot:hover { transform: translateY(-3px); }
.hx-case-body { display: grid; gap: 1rem; justify-items: start; align-content: start; }
.hx-case h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.12; letter-spacing: -0.02em; }
.hx-case-body > p:not(.hx-result) { color: var(--slate); max-width: 46ch; }
.hx-result { font-size: 1.08rem; line-height: 1.4; padding-left: .9rem; border-left: 3px solid var(--highlighter); }
.hx-result strong { font-weight: 600; }
.hx-case blockquote { margin: .25rem 0 .2rem; }
.hx-case blockquote p { font-size: 1.08rem; line-height: 1.55; color: var(--ink); max-width: 48ch; }
.hx-case blockquote footer { all: unset; display: block; margin-top: .7rem; color: var(--slate); font-size: .95rem; }
.hx-case blockquote footer strong { display: block; color: var(--ink); font-weight: 600; }

.hx-built {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 1rem 3rem;
  margin-top: clamp(4rem, 7vw, 5.5rem); padding-top: 2rem; border-top: 1px solid var(--rule);
}
.hx-built h3 { font-size: 1rem; }
.hx-built ul { list-style: none; margin: 0; padding: 0; columns: 3 13rem; column-gap: 2.5rem; }
.hx-built li { break-inside: avoid; padding: .3rem 0; }
.hx-built a { color: var(--slate); text-decoration: none; transition: color .2s; }
.hx-built a:hover { color: var(--signal); text-decoration: underline; text-underline-offset: .25em; }

/* ── Full demos ── */
.page-home .hx-demos { background: var(--ink); color: #fff; padding-block: clamp(5rem, 10vw, 8rem); }
.hx-demos .hx-lede { color: rgba(255,255,255,.72); }
.hx-demo-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.22); }
.hx-demo-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: .25rem 2rem; align-items: baseline;
  padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,.14);
  color: #fff; text-decoration: none;
}
.hx-demo-list span { font-weight: 600; font-size: 1.05rem; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: text-decoration-color .2s; }
.hx-demo-list small { color: rgba(255,255,255,.64); font-size: .94rem; }
.hx-demo-list a:hover span { text-decoration-color: currentColor; }
.hx-demo-list li:first-child span { color: #a9c1ff; }

/* ── How we work ── */
.hx-how { background: var(--paper); }
.hx-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; position: relative; }
.hx-steps::before { content: ''; position: absolute; left: 0; right: 0; top: 1.25rem; height: 1px; background: var(--rule); }
.hx-steps li { position: relative; display: grid; gap: .6rem; align-content: start; padding-right: 1rem; }
.hx-steps .hx-step-n {
  width: 2.5rem; height: 2.5rem; margin-bottom: .75rem; position: relative;
  background: var(--paper); border: 1.5px solid var(--ink); color: var(--ink); font-size: 1rem;
}
.hx-steps li:first-child .hx-step-n { background: var(--signal); border-color: var(--signal); color: #fff; }
.hx-steps h3 { font-size: 1.2rem; }
.hx-steps p { color: var(--slate); font-size: 1rem; }
.hx-why {
  list-style: none; margin: clamp(3.5rem, 6vw, 5rem) 0 0; padding: 2rem 0 0; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 4rem;
}
.hx-why li { color: var(--slate); max-width: 56ch; }
.hx-why strong { color: var(--ink); font-weight: 600; }

/* ── Voices ── */
.hx-voices-sec { background: var(--white); }
.hx-voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 4rem; margin-top: clamp(2.5rem, 5vw, 3.75rem); }
.hx-voices figure { margin: 0; display: grid; gap: 1rem; align-content: start; }
.hx-voices blockquote { margin: 0; font-size: clamp(1.12rem, 1.55vw, 1.3rem); line-height: 1.5; text-wrap: pretty; }
.hx-voices figcaption { color: var(--slate); font-size: .95rem; }
.hx-voices figcaption strong { display: block; color: var(--ink); font-weight: 600; }

/* ── Verify ── */
.hx-verify { background: var(--paper); border-top: 1px solid var(--rule); }
.hx-facts { display: grid; margin: 0; border-top: 1px solid var(--ink); }
.hx-facts > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: .5rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.hx-facts dt { font-weight: 600; }
.hx-facts dd { margin: 0; color: var(--slate); }
.hx-facts dd .hx-textlink { display: inline-block; margin-top: .5rem; }

/* ── Start ── */
.page-home .hx-start { background: var(--ink); color: #fff; padding-block: clamp(5rem, 10vw, 8rem); }
.hx-start-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.hx-start-copy { display: grid; gap: 1.4rem; scroll-margin-top: 100px; }
.hx-form-anchor { scroll-margin-top: 96px; }
.page-home #inquiry { background: transparent; }
.hx-start .hx-h2 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); max-width: 12ch; }
.hx-start .hx-lede { color: rgba(255,255,255,.72); }
.hx-routes { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.hx-routes a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.05rem 0; border-bottom: 1px solid rgba(255,255,255,.18);
  color: #fff; text-decoration: none; font-weight: 500; transition: color .2s;
}
.hx-routes a:hover { color: #a9c1ff; }
.hx-routes small { color: rgba(255,255,255,.55); font-size: .88rem; font-weight: 400; white-space: nowrap; }

.hx-form {
  position: relative; display: grid; gap: 1.1rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--white); color: var(--ink); border-radius: 20px;
}
.hx-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.hx-opt { color: var(--slate); font-weight: 400; }
.hx-form input:not([type="checkbox"]), .hx-form select, .hx-form textarea { background: var(--paper); }
.hx-form input:focus, .hx-form select:focus, .hx-form textarea:focus { background: var(--white); }
.hx-form textarea { resize: vertical; min-height: 7.5rem; }
.hx-form .hx-consent { display: flex; align-items: flex-start; gap: .7rem; font-weight: 400; color: var(--slate); font-size: .9rem; }
.hx-consent input { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .25rem; accent-color: var(--signal); }
.hx-consent a { color: var(--ink); }
.hx-form .h-btn { justify-self: start; }
.hx-form .form-status:empty { display: none; }
.hx-picked {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.25rem;
  padding: .85rem 1rem; border-radius: 12px; background: #fff8d6; border: 1px solid #f2dc7c; font-size: .93rem; line-height: 1.45;
}
.hx-picked strong { font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .hx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .hx-steps::before { display: none; }
}
@media (max-width: 960px) {
  .hx-bench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "industry" "stage" "modules" "summary";
    border-radius: 20px;
  }
  .hx-stage { border-left: 0; border-top: 1px solid var(--rule); }
  .hx-step-modules { border-top: 1px solid var(--rule); }
  .hx-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .hx-play-grid, .hx-split, .hx-start-grid, .hx-case-lead { grid-template-columns: minmax(0, 1fr); }
  .hx-play-form, .hx-split-copy { position: static; }
  .hx-site-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "name" "preview" "options"; }
  .hx-built { grid-template-columns: minmax(0, 1fr); }
  .hx-proof .hx-proof-sec { margin-left: 0; }
}
@media (max-width: 720px) {
  .hx-hero-row .hx-actions, .hx-hero-row .hx-actions .h-btn { width: 100%; }
  .hx-step { padding: 1.25rem; }
  .hx-modules { grid-template-columns: minmax(0, 1fr); }
  .hx-stage { padding: 1rem; }
  .hx-stage-foot { flex-direction: column; align-items: stretch; }
  .hx-simulate { width: 100%; }
  .hx-summary .h-btn { width: 100%; }
  .hx-case-pair, .hx-compare, .hx-why, .hx-voices { grid-template-columns: minmax(0, 1fr); }
  .hx-voices { gap: 2.5rem; }
  .hx-crm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-demo-list a { grid-template-columns: minmax(0, 1fr); }
  .hx-steps { grid-template-columns: minmax(0, 1fr); }
  .hx-facts > div { grid-template-columns: minmax(0, 1fr); }
  .hx-form-row { grid-template-columns: minmax(0, 1fr); }
  .hx-form .h-btn { justify-self: stretch; }
  .hx-proof ul { gap: .35rem 1.5rem; }
  .hx-site-cta, .hx-site-cta .h-btn { width: 100%; }
  /* leave room for the fixed quick-contact bar */
  .page-home .hx-start { padding-bottom: 7rem; }
}

/* Colour marks stay (they show what changed); movement goes */
@media (prefers-reduced-motion: reduce) {
  .hx-toast, .hx-play-body { animation: none; }
  .hx-shot, .hx-browser, .hx-toast { transition: none; }
  .hx-shot:hover { transform: none; }
}
