/*
 * stellarpk.com: Stellar company site. Endfield v2 (mahoraga/DESIGN_SYSTEM.md), tokens and button/panel
 * rules copied from Clinic Desk's CAP-ui-kit (src/web/index.css). Plain CSS, no build step.
 */
@font-face {
  font-family: "Figtree Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
}

/* Urdu tagline only: Noto Nastaliq Urdu (OFL), subset to the tagline's letters (brand v1). */
@font-face {
  font-family: "Noto Nastaliq Urdu Tagline";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/noto-nastaliq-urdu-tagline.woff2") format("woff2");
}

:root {
  --ef-ink: #3a3a3a;
  --ef-yellow: #fce900;
  --ef-char-0: #181818;
  --ef-char-1: #1e1e1e;
  --ef-char-2: #252525;
  --ef-char-3: #2d2d2d;
  --ef-char-4: #393939;
  --ef-char-5: #4a4a4a;
  --ef-concrete: #dcdcdc;
  --ef-panel: #ececec;
  --ef-row: #e3e3e3;
  --ef-row-hover: #d9d9d9;
  --ef-paper: #e4e4e4;
  --ef-paper-muted: #9c9c9c;
  --ef-halo: #f4f4f4;
  --ef-hairline: #a8a8a8;
  --ef-orange: #ff6a13;
  --ef-cyan: #1fc3f2;
  --ef-rail-tile: #444343;
  --ef-rail-line: color-mix(in srgb, var(--ef-ink) 12%, transparent);
  --muted: #5e5e5e;
  --border: #d0d0d0;
  --shadow-card: 0 1px 0 rgb(255 255 255 / 0.7) inset, 0 2px 6px rgb(0 0 0 / 0.11);
  --ef-contour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Cdefs%3E%3Cpath id='b' vector-effect='non-scaling-stroke' d='M0-200C90-205 170-150 190-60S170 120 90 180-80 220-160 150-215 0-170-110-90-196 0-200Z'/%3E%3Cg id='r'%3E%3Cuse href='%23b'/%3E%3Cuse href='%23b' transform='scale(.84)'/%3E%3Cuse href='%23b' transform='scale(.68)'/%3E%3Cuse href='%23b' transform='scale(.53)'/%3E%3Cuse href='%23b' transform='scale(.39)'/%3E%3Cuse href='%23b' transform='scale(.26)'/%3E%3Cuse href='%23b' transform='scale(.14)'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='none' stroke='%23000' stroke-opacity='.06'%3E%3Cuse href='%23r' transform='translate(300 300) scale(1.25)'/%3E%3Cuse href='%23r' transform='translate(650 640) rotate(70) scale(.9)'/%3E%3C/g%3E%3C/svg%3E");
  --ef-contour-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Cdefs%3E%3Cpath id='b' vector-effect='non-scaling-stroke' d='M0-200C90-205 170-150 190-60S170 120 90 180-80 220-160 150-215 0-170-110-90-196 0-200Z'/%3E%3Cg id='r'%3E%3Cuse href='%23b'/%3E%3Cuse href='%23b' transform='scale(.84)'/%3E%3Cuse href='%23b' transform='scale(.68)'/%3E%3Cuse href='%23b' transform='scale(.53)'/%3E%3Cuse href='%23b' transform='scale(.39)'/%3E%3Cuse href='%23b' transform='scale(.26)'/%3E%3Cuse href='%23b' transform='scale(.14)'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.055'%3E%3Cuse href='%23r' transform='translate(300 300) scale(1.25)'/%3E%3Cuse href='%23r' transform='translate(650 640) rotate(70) scale(.9)'/%3E%3C/g%3E%3C/svg%3E");
  --ef-hatch: repeating-linear-gradient(135deg, rgb(0 0 0 / 0.08) 0 1px, transparent 1px 5px);
  --ef-hatch-dark: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.035) 0 1px, transparent 1px 6px);
  --wrap: 72rem;
  --bar-h: 3.75rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: "Figtree Variable", system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ef-ink);
  background-color: var(--ef-concrete);
  overflow-x: hidden;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
svg.i {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--ef-yellow);
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}
:focus-visible {
  outline: 2px solid var(--ef-ink);
  outline-offset: 3px;
}
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .wrap {
    padding-inline: 1.5rem;
  }
}

/* ---------- Surfaces ---------- */
.ef-frame {
  background-color: var(--ef-concrete);
  background-image:
    var(--ef-contour), var(--ef-contour), radial-gradient(rgb(0 0 0 / 0.08) 1px, transparent 1.3px),
    linear-gradient(180deg, #e3e3e3, #d3d3d3 60%, #cfcfcf);
  background-size: 980px auto, 1100px auto, 24px 24px, 100% 100%;
  background-position: right -220px top -260px, left -420px bottom -520px, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
}
.ef-char {
  background-color: var(--ef-char-1);
  background-image: var(--ef-contour-light), var(--ef-hatch-dark);
  background-size: 700px auto, auto;
  background-position: right -260px top -240px, 0 0;
  background-repeat: no-repeat, repeat;
  color: var(--ef-paper);
}

/* ---------- Micro type ---------- */
.ef-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ef-crumb > :last-child {
  color: var(--ef-ink);
}
.ef-char .ef-crumb {
  color: var(--ef-paper-muted);
}
.ef-char .ef-crumb > :last-child {
  color: var(--ef-paper);
}
.ef-tagbar {
  display: inline-flex;
  align-items: center;
  width: 9rem;
  height: 0.75rem;
  padding-inline: 0.3rem;
  background: var(--ef-ink);
  color: var(--ef-paper);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.ef-char .ef-tagbar {
  background: var(--ef-paper);
  color: var(--ef-ink);
}

/* ---------- Buttons (Endfield capsule, CAP-ui-kit) ---------- */
.ef-btn {
  --b-bg: var(--ef-halo);
  --b-fg: var(--ef-ink);
  --b-edge: var(--ef-char-3);
  --b-halo: var(--ef-halo);
  --b-halo-2: rgb(0 0 0 / 0.2);
  --b-disc: var(--ef-char-3);
  --b-disc-fg: var(--ef-paper);
  --b-tex: var(--ef-contour);
  --b-edge-w: 1.5px;
  --b-gap: 2px;
  --b-ring: 1px;
  --b-drop: 0 3px 6px -1px rgb(0 0 0 / 0.2);
  --b-tex-mask: none;
  --b-rail-o: 0.55;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border: var(--b-edge-w) solid var(--b-edge);
  border-radius: 999px;
  background-color: var(--b-bg);
  color: var(--b-fg);
  box-shadow:
    0 0 0 var(--b-gap) var(--b-halo),
    0 0 0 calc(var(--b-gap) + var(--b-ring)) var(--b-halo-2),
    var(--b-drop);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: 0.005em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}
.ef-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--b-tex) right -70px center / 220px auto no-repeat;
  -webkit-mask-image: var(--b-tex-mask);
  mask-image: var(--b-tex-mask);
  pointer-events: none;
}
.ef-btn[data-size="lg"] {
  min-height: 3rem;
  font-size: 1rem;
}
.ef-btn[data-variant="outline"] {
  --b-bg: #eeeeee;
  --b-fg: var(--ef-char-5);
  --b-edge: #5a5a5a;
  --b-halo: var(--b-bg);
  --b-ring-c: rgb(0 0 0 / 0.38);
  --b-halo-2: var(--b-ring-c);
  --b-disc: var(--ef-char-5);
  --b-disc-fg: var(--b-bg);
  --b-edge-w: 1px;
  --b-gap: 1.5px;
  --b-drop: 0 2px 4px -1px rgb(0 0 0 / 0.14);
  --b-tex-mask: linear-gradient(to left, #000 15%, transparent 65%);
  --b-rail-o: 0.35;
}
.ef-btn[data-variant="default"] {
  --b-yellow: var(--ef-yellow);
  --b-bg: var(--b-yellow);
  --b-fg: var(--ef-ink);
  --b-edge: color-mix(in oklab, var(--ef-yellow), var(--ef-ink) 62%);
  --b-halo: var(--b-bg);
  --b-ring-c: rgb(0 0 0 / 0.26);
  --b-halo-2: var(--b-ring-c);
  --b-disc: var(--ef-char-5);
  --b-disc-fg: var(--b-bg);
  --b-edge-w: 1px;
  --b-gap: 1.5px;
  --b-drop: 0 2px 4px -1px rgb(0 0 0 / 0.14);
  --b-tex-mask: linear-gradient(to left, #000 15%, transparent 65%);
  --b-rail-o: 0.4;
}
.ef-btn[data-variant="secondary"] {
  --b-base: var(--ef-char-5);
  --b-bg: var(--b-base);
  --b-fg: var(--ef-paper);
  --b-edge: color-mix(in oklab, var(--b-base), #000 35%);
  --b-halo: var(--b-bg);
  --b-halo-2: rgb(255 255 255 / 0.1);
  --b-disc: var(--ef-paper);
  --b-disc-fg: var(--b-bg);
  --b-tex: var(--ef-contour-light);
  --b-edge-w: 1px;
  --b-gap: 1.5px;
  --b-drop: 0 2px 4px -1px rgb(0 0 0 / 0.14);
  --b-tex-mask: linear-gradient(to left, #000 15%, transparent 65%);
  --b-rail-o: 0.4;
}
.ef-char .ef-btn[data-variant="outline"] {
  --b-ring-c: rgb(0 0 0 / 0.55);
}
@media (hover: hover) {
  .ef-btn[data-variant="secondary"]:hover {
    --b-bg: color-mix(in oklab, var(--b-base), #fff 10%);
  }
  .ef-btn[data-variant="outline"]:hover {
    --b-bg: #999999;
    --b-fg: var(--ef-halo);
    --b-disc: var(--ef-halo);
    --b-tex: var(--ef-contour-light);
    --b-rail-o: 0.6;
  }
  .ef-btn[data-variant="default"]:hover {
    --b-bg: color-mix(in srgb, var(--b-yellow), #ffff00 45%);
  }
}
.ef-btn:active {
  transform: scale(0.97);
}
.ef-btn:focus-visible {
  outline: 2px solid var(--ef-ink);
  outline-offset: 5px;
}
.ef-char .ef-btn:focus-visible {
  outline-color: var(--ef-paper);
}
/* Icon moves to the end, cut out of a disc. */
.ef-btn:not([data-size="icon"]) > svg {
  order: 9;
  box-sizing: content-box;
  width: 0.875rem;
  height: 0.875rem;
  padding: 0.3125rem;
  margin-inline: 0.125rem -0.125rem;
  border-radius: 999px;
  background-color: var(--b-disc);
  color: var(--b-disc-fg);
  stroke-width: 2.5;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ef-btn:not([data-size="icon"]):has(> svg) {
  padding-right: 0.4375rem;
}
.ef-btn[data-size="icon"] {
  width: 2.75rem;
  padding: 0;
}
.ef-btn[data-size="icon"] > svg {
  width: 1.125rem;
  height: 1.125rem;
}
/* The "o———o" rail on main actions. */
.ef-btn[data-rail]::before {
  content: "";
  flex: 0 1 4.25rem;
  min-width: 0;
  height: 5px;
  margin-right: auto;
  opacity: var(--b-rail-o);
  background:
    radial-gradient(circle, currentColor 1.6px, transparent 2.1px) left center / 5px 5px no-repeat,
    radial-gradient(circle, currentColor 1.6px, transparent 2.1px) right center / 5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) center / calc(100% - 4px) 1px no-repeat;
}
.ef-btn[data-rail] {
  justify-content: flex-end;
  padding-left: 1.125rem;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-h);
  box-shadow: 0 1px 0 var(--ef-char-4), 0 4px 14px rgb(0 0 0 / 0.18);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--ef-paper);
  font-weight: 650;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
}
/* Brand v1 logo file, placed as-is (never retyped). Badge = 120/180 of the file height, kept >= 24 px. */
.brand-logo {
  display: block;
  width: auto;
  height: 3.5rem;
  margin-left: -0.875rem;
}
.nav {
  display: none;
  gap: 0.25rem;
  margin-left: auto;
}
.nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--ef-paper-muted);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
@media (hover: hover) {
  .nav a:hover {
    color: var(--ef-paper);
    background: rgb(255 255 255 / 0.06);
  }
}
.topbar .cta {
  margin-left: auto;
}
.topbar .cta .label-long {
  display: none;
}
@media (min-width: 400px) {
  .topbar .cta .label-long {
    display: inline;
  }
  .topbar .cta .label-short {
    display: none;
  }
}
@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .topbar .cta {
    margin-left: 0.5rem;
  }
}

/* ---------- Hero ---------- */
.tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  color: var(--muted);
  font-size: 1.0625rem;
  font-weight: 600;
}
.tagline .ur {
  font-family: "Noto Nastaliq Urdu Tagline", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0;
}
.hero {
  padding: 2.5rem 0 3rem;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-copy {
  display: grid;
  gap: 1rem;
  justify-items: start;
}
.hero h1 {
  font-size: clamp(2.125rem, 7.4vw, 3.5rem);
  font-weight: 560;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero .lead {
  font-size: clamp(1.0625rem, 2.6vw, 1.25rem);
  color: #4a4a4a;
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 0.5rem;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--muted);
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-facts svg.i {
  width: 1rem;
  height: 1rem;
}
@media (min-width: 960px) {
  .hero {
    padding: 4.5rem 0 5rem;
  }
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 3.5rem;
  }
}

/* Chat example (Endfield comms panel: charcoal, cyan header edge). */
.chat {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--ef-char-2);
  background-image: var(--ef-contour-light);
  background-size: 900px auto;
  background-position: right -300px top -200px;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px var(--ef-char-4) inset, 0 10px 30px rgb(0 0 0 / 0.28);
  color: var(--ef-paper);
}
.chat::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background:
    linear-gradient(var(--ef-hairline), var(--ef-hairline)) center / 1px 100% no-repeat,
    linear-gradient(var(--ef-hairline), var(--ef-hairline)) center / 100% 1px no-repeat;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--ef-cyan);
  background: linear-gradient(90deg, var(--ef-char-3), var(--ef-char-3) calc(100% - 3rem), var(--ef-cyan) calc(100% - 3rem));
}
.chat-head strong {
  font-weight: 600;
  font-size: 0.9375rem;
}
.chat-head span {
  display: block;
  font-size: 0.75rem;
  color: var(--ef-paper-muted);
}
.chat-body {
  display: grid;
  gap: 0.625rem;
  padding: 1.25rem 1rem 1.5rem;
}
.bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.bubble small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  opacity: 0.7;
}
.bubble.them {
  justify-self: start;
  background: var(--ef-char-4);
  border-bottom-left-radius: 4px;
}
.bubble.us {
  justify-self: end;
  background: var(--ef-halo);
  color: var(--ef-ink);
  border-bottom-right-radius: 4px;
}
.chat-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
  margin-top: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-left: 3px solid var(--ef-yellow);
  background: var(--ef-char-3);
  font-size: 0.8125rem;
  color: var(--ef-paper);
}
.chat-note svg.i {
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--ef-yellow);
}
.chat-foot {
  padding: 0.625rem 1rem;
  border-top: 1px dashed var(--ef-char-5);
  font-size: 0.75rem;
  color: var(--ef-paper-muted);
}

/* ---------- Sections ---------- */
.section {
  padding: 3.5rem 0;
}
@media (min-width: 960px) {
  .section {
    padding: 5rem 0;
  }
}
.section-head {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
  max-width: 44rem;
}
.section-head h2 {
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.section-head p {
  font-size: 1.0625rem;
  color: #4a4a4a;
}
.ef-char .section-head p {
  color: var(--ef-paper-muted);
}

/* Panel (SectionCard): slab, light header tab + hatched rail, "+" corner. */
.panel {
  position: relative;
  border-radius: 4px;
  background-color: var(--ef-panel);
  box-shadow: var(--shadow-card);
}
.panel::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background:
    linear-gradient(var(--ef-hairline), var(--ef-hairline)) center / 1px 100% no-repeat,
    linear-gradient(var(--ef-hairline), var(--ef-hairline)) center / 100% 1px no-repeat;
  pointer-events: none;
}
.panel-head {
  display: flex;
  align-items: stretch;
  min-height: 2.75rem;
  background: var(--ef-hatch), #dedede;
  border-radius: 4px 4px 0 0;
}
.panel-tab {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 100%;
  padding: 0.5rem 1.25rem 0.5rem 1rem;
  background: #dedede;
  border-radius: 4px 0 0 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.panel-tab h3 {
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.2;
}
.panel-index {
  margin-left: auto;
  align-self: center;
  padding-right: 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.panel-body {
  padding: 1rem 1.25rem 1.25rem;
  color: #4a4a4a;
}
.panel-desc::before {
  content: "//";
  margin-right: 0.5em;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Pains strip: rows like Endfield list tiles. */
.pains {
  display: grid;
  gap: 0.5rem;
}
.pains li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  background: var(--ef-row);
  border-radius: 3px;
}
.pains li svg.i {
  margin-top: 0.15rem;
  color: var(--muted);
}
.pains strong {
  display: block;
  font-weight: 600;
}
.pains span {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Process rail (Endfield shop menu rail). */
.rail {
  position: relative;
  display: grid;
  gap: 0;
}
.rail li {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1rem;
  padding-bottom: 1.5rem;
}
.rail li:last-child {
  padding-bottom: 0;
}
.rail li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(1.375rem - 1px);
  top: 2.75rem;
  bottom: 0;
  width: 2px;
  background: var(--ef-rail-line);
}
.rail-tile {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 3px;
  background: var(--ef-rail-tile);
  color: var(--ef-halo);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
}
.rail-tile svg.i {
  width: 1.25rem;
  height: 1.25rem;
}
.rail h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  padding-top: 0.6rem;
}
.rail h3 small {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail p {
  margin-top: 0.375rem;
  color: #4a4a4a;
  max-width: 38rem;
}
.how-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 960px) {
  .how-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

/* Case: patient-banner style yellow band. */
.case-banner {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(90deg, var(--ef-yellow), rgb(252 233 0 / 0.55) 45%, rgb(252 233 0 / 0) 85%), var(--ef-panel);
  border-radius: 4px 4px 0 0;
}
.case-banner h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.case-banner p {
  font-weight: 550;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  background: #d4d4d4;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag.ink {
  background: var(--ef-ink);
  color: var(--ef-paper);
}
.case-body {
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem;
}
@media (min-width: 800px) {
  .case-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}
.case-body h4 {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticks {
  display: grid;
  gap: 0.5rem;
}
.ticks li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}
.ticks li::before {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.5rem;
  background: var(--ef-ink);
  transform: rotate(45deg);
}

/* Who we work with: chips. */
.trades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.trades li {
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.05);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.045), inset 0 1px 2px rgb(0 0 0 / 0.06);
  font-size: 0.9375rem;
  font-weight: 550;
}

/* Principles on charcoal. */
.ef-char .panel {
  background-color: var(--ef-char-2);
  box-shadow: 0 0 0 1px var(--ef-char-4) inset, 0 4px 14px rgb(0 0 0 / 0.22);
}
.ef-char .panel-head {
  background: var(--ef-hatch-dark), var(--ef-char-3);
}
.ef-char .panel-tab {
  background: var(--ef-char-4);
  color: var(--ef-paper);
}
.ef-char .panel-tab svg.i {
  color: var(--ef-yellow);
}
.ef-char .panel-body {
  color: var(--ef-paper-muted);
}
.ef-char .panel-index {
  color: var(--ef-paper-muted);
}

/* Team. */
.person {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  background: var(--ef-char-3);
  color: var(--ef-paper);
  font-size: 1.375rem;
  font-weight: 650;
  box-shadow: 0 0 0 3px var(--ef-halo), 0 0 0 4px var(--ef-ink);
}
.person h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}
.person .role {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.person p {
  margin-top: 0.375rem;
  color: #4a4a4a;
  font-size: 0.9375rem;
}

/* FAQ. */
.faq {
  display: grid;
  gap: 0.5rem;
}
.faq details {
  border-radius: 3px;
  background: var(--ef-panel);
  box-shadow: var(--shadow-card);
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-left: 4px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary svg.i {
  margin-left: auto;
  transition: transform 0.2s ease;
}
.faq details[open] summary svg.i {
  transform: rotate(180deg);
}
@media (hover: hover) {
  .faq summary:hover {
    background: var(--ef-row-hover);
    border-left-color: var(--ef-ink);
  }
}
.faq details > div {
  padding: 0 1.25rem 1.25rem;
  color: #4a4a4a;
}

/* Contact band. */
.contact .wrap {
  display: grid;
  gap: 1.5rem;
}
.contact-card {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}
.contact-list {
  display: grid;
  gap: 0.75rem;
}
.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.contact-list a {
  font-weight: 600;
}
.contact-list .k {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ef-paper-muted);
}
.contact-list svg.i {
  color: var(--ef-yellow);
}
.tbd {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--ef-orange);
  background: rgb(255 106 19 / 0.12);
  font-size: 0.875rem;
}
@media (min-width: 900px) {
  .contact .wrap {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 3rem;
  }
}

/* Footer. */
.footer {
  padding: 1.75rem 0 2rem;
  border-top: 1px dashed var(--ef-char-5);
  font-size: 0.875rem;
  color: var(--ef-paper-muted);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.foot-brand img {
  display: block;
  height: 2.25rem;
  width: auto;
  margin-left: -0.5rem;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-left: auto;
}
.footer a {
  color: var(--ef-paper);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* Prose pages (privacy, 404). */
.prose {
  max-width: 46rem;
  padding: 3rem 0 4rem;
}
.prose h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0.75rem 0 0.5rem;
}
.prose h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.prose p,
.prose ul {
  margin-top: 0.75rem;
  color: #4a4a4a;
}
.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.prose li + li {
  margin-top: 0.375rem;
}

/* Very narrow screens (< 360 px): grid columns may shrink, long button labels wrap instead of spilling. */
.hero-grid > *,
.how-grid > *,
.grid > *,
.contact .wrap > * {
  min-width: 0;
}
@media (max-width: 359px) {
  .ef-btn {
    white-space: normal;
    text-align: center;
  }
  .ef-btn[data-rail]::before {
    display: none;
  }
}

/* Motion (Endfield ef-reveal): slide in from the left + fade. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.26s ease, transform 0.26s ease;
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ef-btn,
  .faq summary svg.i {
    transition: none;
  }
}
