/* editorial.css
   Copyright © 2026 LexPro. All rights reserved.

   The editorial kit (app/lib/web/site/sections/directions/a/ed_kit.dart):
   bands, the measure, the twelve-column row, rules, kickers, onward links,
   outlined numerals and the marker stroke. ui/editorial.dart writes the
   markup. Sizes written clamp(min, vw, max) are Flutter's context.fluid. */

:root {
  --ed-gutter: clamp(20px, 4.2vw, 56px);
  --ed-band-pad: clamp(96px, 10vw, 152px);
  --ed-col-gap: 24px;
}
@media (max-width: 600px) { :root { --ed-band-pad: 72px; } }

.ed-measure { max-width: 1320px; margin: 0 auto; padding: 0 var(--ed-gutter); }

.ed-band { padding: var(--ed-band-pad) 0; color: var(--ed-text); }
/* Headings share their words across lines rather than leaving one alone on
   the last ("for your car / line."). */
h1, h2, h3 { text-wrap: balance; }
.ed-band--paper { background: var(--ed-paper); --ed-ground: var(--ed-paper); }
.ed-band--bone { background: var(--ed-bone); --ed-ground: var(--ed-bone); }
.ed-band--navy { background: var(--ed-navy); --ed-ground: var(--ed-navy); }
.ed-band--navy-deep { background: var(--ed-navy-deep); --ed-ground: var(--ed-navy-deep); }
.ed-band--coral { background: var(--ed-coral); --ed-ground: var(--ed-coral); }

/* EdRow: stacked below 901px, a twelve-column grid above. */
.ed-row { display: flex; flex-direction: column; gap: var(--stack-gap, 32px); }
@media (min-width: 901px) {
  .ed-row {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--ed-col-gap); row-gap: 0; align-items: start;
  }
  .ed-row--bottom { align-items: end; }
  .ed-cell { grid-column: var(--start) / span var(--span); min-width: 0; }
}

.ed-rule { display: block; height: 1px; margin: 0; border: 0; background: var(--ed-rule); }
.ed-rule--thick { height: 2px; }
.ed-rule--navy { background: var(--ed-navy); }
.ed-rule--navy-deep { background: var(--ed-navy-deep); }
.ed-rule--on-dark { background: var(--ed-rule-on-dark); }

/* EdKicker */
.ed-kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
}
.ed-kicker__bar { flex: none; width: 28px; height: 3px; background: var(--ed-coral); }
.ed-kicker--bar-navy-deep .ed-kicker__bar { background: var(--ed-navy-deep); }
.ed-kicker--bar-ink .ed-kicker__bar { background: var(--ed-ink); }
/* The kicker's type without the bar (a label over a stat). */
.ed-kicker-text { font-size: 13px; line-height: 1.3; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; }

/* EdType */
.ed-headline {
  font-size: clamp(36px, 5.2vw, 76px); line-height: 1; font-weight: 800; letter-spacing: -0.045em; color: var(--ed-ink);
}
.ed-standfirst {
  font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; font-weight: 500; letter-spacing: -0.2px; color: var(--ed-text);
}
.ed-body { font-size: 17px; line-height: 1.6; font-weight: 400; }

/* EdLink */
.ed-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: var(--ed-navy);
  text-decoration: none; border-radius: 4px;
}
.ed-link__label {
  padding-bottom: 3px; border-bottom: 2px solid var(--ed-coral);
  font-size: 17px; line-height: 1.3; font-weight: 700; transition: border-color .16s ease;
}
.ed-link--rule-navy-deep .ed-link__label { border-bottom-color: var(--ed-navy-deep); }
.ed-link__arrow { transition: transform .16s ease; }
.ed-link:hover .ed-link__label { border-bottom-color: currentColor; }
.ed-link:hover .ed-link__arrow { transform: translateX(5px); }

/* Tones last, so a tone class beats a type class's own colour. */
.ed-tone--ink { color: var(--ed-ink); }
.ed-tone--navy { color: var(--ed-navy); }
.ed-tone--navy-deep { color: var(--ed-navy-deep); }
.ed-tone--on-dark { color: var(--ed-on-dark); }
.ed-tone--paper { color: var(--ed-paper); }
.ed-tone--muted { color: var(--ed-muted); }

/* EdOutlineNumeral: a 4px stroke under a fill in the band's own colour
   leaves the outer 2px ring, as the Flutter painter's dstOut does. */
.ed-outline-numeral {
  display: inline-block; padding: 2px;
  font-family: var(--font-numeral); font-weight: 800; line-height: .9; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; color: var(--ed-ground);
  -webkit-text-stroke: 4px var(--ed-coral); paint-order: stroke fill;
}

/* EdMarkedLines: a stroke of the product colour under the lower part of the words. */
.ed-marked { position: relative; z-index: 0; display: inline-block; line-height: 1; }
.ed-marked::after {
  content: ""; position: absolute; z-index: -1; left: -0.04em; right: -0.05em; bottom: .05em; height: .29em;
  background: var(--ed-coral);
}

@media (prefers-reduced-motion: reduce) {
  .ed-link__label, .ed-link__arrow { transition: none; }
}
