/* ==========================================================================
   Desistor Network — Base / reset / typography / layout primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: var(--fw-reg);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* Headings carry their own trailing space so the gap under a heading is a
   property of its level, not of whichever utility class the page happened
   to use. Measured across the site it was running at 8/12/16/20/32px for
   the same relationship. Explicit component rules (.sec-head h2,
   .card-head h3, .card__title, .dash__head h1 …) still win. */
h1,h2,h3,h4,h5,h6 { margin: 0 0 var(--s-4); line-height: var(--lh-tight); font-weight: var(--fw-bold); color: var(--text); }
h3,h4,h5,h6 { margin-bottom: var(--s-3); }
h1:last-child, h2:last-child, h3:last-child,
h4:last-child, h5:last-child, h6:last-child { margin-bottom: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-bold); }
/* A comfortable measure by default — full-column intro paragraphs were
   running to 120-190 characters a line, which is roughly twice readable. */
p  { margin: 0 0 var(--s-4); /*max-width: 74ch;*/ }
p:last-child { margin-bottom: 0; }
/* The measure is for running text only. Anything laid out — a cell, a
   flex/grid child — or anything centred sets its own width. */
td p, th p, .row p, .grid > p, .dl p, .card__meta p, .filelist p { max-width: none; }
/* .ctaband, .pband, .sbanner__box and .hero__panel set their own measure in
   layout.css, so they are deliberately absent from this list. */
.t-center p, p.t-center, .authcard__head p,
.authcard__foot p, .empty p, .dropzone p, .dash__who p,
.idle-warn p, .ftr__bot p { max-width: none; }

a { color: var(--teal); text-decoration: none; transition: color var(--t); }
/* Buttons manage their own colours — a plain a:hover rule would out-rank .btn
   and repaint the label in the hover background colour (F001). */
a:hover:not(.btn):not(.tag) { color: var(--teal-700); text-decoration: underline; }
a.btn, a.btn:hover, a.btn:focus { color: var(--btn-fg); text-decoration: none; }

ul, ol { margin: 0 0 var(--s-4); padding-left: var(--s-5); }
li { margin-bottom: var(--s-2); }

hr { border: 0; border-top: 1px solid var(--border-soft); margin: var(--s-8) 0; }

small { font-size: var(--fs-sm); }
strong, b { font-weight: var(--fw-bold); }

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--teal-100); color: var(--teal-900); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
  background: var(--teal); color: #fff; padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--r-sm) 0; font-weight: var(--fw-bold);
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap, .wrap-narrow, .wrap-xl, .wrap-full, .wrap-full-lg, .wrap-contain { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: var(--maxw-narrow); }
.wrap-full, .wrap-full-lg { max-width: var(--maxw-full); }
.wrap-full-lg { padding-left: 120px; padding-right: 120px; }
@media (max-width: 1699px) {
  .wrap-full-lg { padding-left: 80px; padding-right: 80px; }
}
@media (max-width: 1199px) {
  .wrap-full-lg { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 991px) {
  .wrap-full-lg { padding-left: 15px; padding-right: 15px; }
}
.wrap-xl { max-width: var(--maxw-xl); }
.wrap-contain { max-width: 1666px; }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.section--dark { background: var(--teal); color: var(--text-invert); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--tight { margin-bottom: -230px; }
@media (max-width: 1499px) {
  .section--tight { margin-bottom: -200px; }
}
@media (max-width: 1199px) {
  .section--tight { margin-bottom: -130px; }
}
@media (max-width: 991px) {
  .section--tight { margin-bottom: -100px; }
}

/* Two plain sections back to back stack both their paddings and leave a
   dead band (142px on the homepage). One section's worth of space is the
   separation; a change of background is what earns the second. */
/* A section that paints its own background earns its padding, so
   .section--photo is excluded here alongside the other tinted variants —
   without it the homepage enquiry block lost its top padding and the CTA
   band above it sat on top of the first row of the form. */
.section:not(.section--soft):not(.section--warm):not(.section--dark):not(.section--photo)
  + .section:not(.section--soft):not(.section--warm):not(.section--dark):not(.section--photo) { padding-top: 0; }

.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-8); }

.row { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.row--center { justify-content: center; }
.row--top { align-items: flex-start; }
.row--nowrap { flex-wrap: nowrap; }
/* Compact pairing — an icon beside its label, or two controls that read as one
   thing. Replaces 21 inline gap:4/6/8px overrides that sat off the 4px scale. */
.row--tight { gap: var(--s-2); }

.grid { display: grid; gap: var(--s-6); }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.gtype-1 .card__media {
   aspect-ratio: 4/2.4;
}
.gtype-1 p.t-muted { overflow: hidden;
   display: -webkit-box;
   -webkit-line-clamp: 3;
           line-clamp: 3; 
   -webkit-box-orient: vertical;
	text-overflow: ellipsis; }

@media (max-width: 1499px) {
  .grid-2xl { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.t-center { text-align: center; }
.t-right  { text-align: right; }
.t-muted  { color: var(--text-muted); }
.t-faint  { color: var(--text-faint); }
.t-teal   { color: var(--teal); }
.t-amber  { color: var(--amber); }
/* Rejection reasons and other inline warnings use this; --coral reads
   3.14 : 1 on white, so the text utility takes the darker step. The badge
   and button fills still use --coral itself. */
.t-coral  { color: var(--coral-700); }
.t-sm     { font-size: var(--fs-sm); }
.t-xs     { font-size: var(--fs-xs); }
.t-2xs    { font-size: var(--fs-2xs); }
.t-bold   { font-weight: var(--fw-bold); }
.t-x      { font-weight: var(--fw-x); }
.t-upper  { text-transform: uppercase; letter-spacing: .08em; }
.lead     { font-size: var(--fs-lg); color: var(--text-muted); }
/* Size utilities — let a heading sit at the right level in the document
   outline while keeping the size the design calls for. */
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
.h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.h5 { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: var(--lh-snug); }

/* The full 4px scale. mt-3/mt-5/mt-10/mb-3/mb-5/mb-12 were used 168 times
   across the markup but never existed, so every one of them was rendering as
   zero — that is what was collapsing the gaps between stacked buttons, under
   headings and around card CTAs throughout the project. */
.mt-0{margin-top:0}          .mb-0{margin-bottom:0}
.mt-1{margin-top:var(--s-1)} .mb-1{margin-bottom:var(--s-1)}
.mt-2{margin-top:var(--s-2)} .mb-2{margin-bottom:var(--s-2)}
.mt-3{margin-top:var(--s-3)} .mb-3{margin-bottom:var(--s-3)}
.mt-4{margin-top:var(--s-4)} .mb-4{margin-bottom:var(--s-4)}
.mt-5{margin-top:var(--s-5)} .mb-5{margin-bottom:var(--s-5)}
.mt-6{margin-top:var(--s-6)} .mb-6{margin-bottom:var(--s-6)}
.mt-8{margin-top:var(--s-8)} .mb-8{margin-bottom:var(--s-8)}
.mt-10{margin-top:var(--s-10)} .mb-10{margin-bottom:var(--s-10)}
.mt-12{margin-top:var(--s-12)} .mb-12{margin-bottom:var(--s-12)}
.mt-16{margin-top:var(--s-16)} .mb-16{margin-bottom:var(--s-16)}

.pt-1{padding-top:24px;}

.w-full{width:100%}
.hidden{display:none !important}
.sr-only{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.nowrap{white-space:nowrap}
.flex-1{flex:1 1 auto;min-width:0}

/* ---------- Section heading block ---------- */
/* Centre, not flex-end: aligning to the bottom edge lines the action up
   with the descender line of the copy rather than with the block, which
   reads as a few pixels low. */
.sec-head { display:flex; justify-content:space-between; align-items:center; gap:var(--s-6); margin-bottom:var(--s-8); flex-wrap:wrap; }
.sec-head h2 { margin:0; font-weight: var(--fw-x); }
.sec-head > :first-child { flex: 1 1 320px; min-width: 0; }
.sec-head > :last-child:not(:first-child) { flex: 0 1 auto; min-width: 0; }
.sec-head--center > :first-child, .sec-head--center > :last-child { flex: 0 1 auto; }
.sec-head__sub { margin-top: var(--s-2); max-width: 94ch; }
.sec-head--center { flex-direction:column; align-items:center; text-align:center; }
.sec-head--center .sec-head__sub { margin-inline:auto; }

/* ---------- Responsive split layouts (replace inline grid-template-columns) ---------- */
.split      { display:grid; gap: var(--s-6); align-items:start; grid-template-columns: minmax(0,1fr) 300px; }
.split > *, .split--half > *, .split--left > *, .split--media > *, .radio-cards > * { min-width: 0; }
.split--wide{ grid-template-columns: 1fr 580px; }
.split--sm{ grid-template-columns: 1fr 440px; }
.split--sx{ grid-template-columns: 1fr 360px; }
.split--left{ grid-template-columns: 330px 1fr; }
.split--half{ grid-template-columns: 1fr 1fr; }
.split--media { grid-template-columns: 220px 1fr; gap:0; }
@media (max-width: 1699px) {
  .split--wide{ grid-template-columns: 1fr 480px; }
}
@media (max-width: 1499px) {
  .split--wide{ grid-template-columns: 1fr 380px; }
}
@media (max-width: 1080px) {
  .split, .split--wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .split--left { grid-template-columns: 1fr; }
  .split--half { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .split--media { grid-template-columns: 1fr; }
  .split--media .card__media { aspect-ratio: 16/9; }
}

/* Media always fills its box rather than using its intrinsic size — photos
   and generated artwork alike. */
.card__media > svg, .card--flush > svg, .hero__media > svg, .qr > svg,
.card__media > img, .card--flush > img, .hero__media > img,
.feat__media > img { width:100%; height:100%; display:block; object-fit:cover; }
