/* ==========================================================================
   Southeastern Portal Systems — public portfolio landing page
   Light theme by default, dark theme via system preference or data-theme.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg: #f5f4f0;
  --surface: #fffdf9;
  --surface-2: #eeece5;
  --surface-3: #e5e1d7;
  --ink: #101828;
  --ink-soft: #263248;
  --muted: #596273;
  --muted-soft: #626a76;
  --line: #dcd7cc;
  --line-strong: #c6c0b2;

  --accent: #165dff;
  --accent-text: #0c46c7;
  --accent-hover: #0c46c7;
  --accent-soft: #e7efff;
  --accent-ink: #ffffff;

  --live: #0b7a55;
  --live-soft: #ddf5ea;
  --amber: #8a5a0a;
  --amber-soft: #fbf0d9;
  --blue: #1859b8;
  --blue-soft: #e5efff;

  --intake-bg: #0d1726;
  --intake-ink: #f7f9fc;
  --header-bg: rgba(245, 244, 240, 0.88);

  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-card: 0 18px 40px rgba(16, 24, 40, 0.1);

  --sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --shell: min(1160px, calc(100% - 40px));
  --radius-sm: 9px;
  --radius: 16px;
  --radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f14;
    --surface: #111821;
    --surface-2: #0f151d;
    --surface-3: #18212c;
    --ink: #f0f4f9;
    --ink-soft: #d6dee9;
    --muted: #9aa6b6;
    --muted-soft: #7f8b9b;
    --line: #25303c;
    --line-strong: #354252;

    --accent: #7aa7ff;
    --accent-text: #a4c2ff;
    --accent-hover: #a4c2ff;
    --accent-soft: #17243b;
    --accent-ink: #08101f;

    --live: #6fe0b4;
    --live-soft: #102a22;
    --amber: #f0c37a;
    --amber-soft: #2a2110;
    --blue: #8db7ff;
    --blue-soft: #14233a;

    --intake-bg: #0a111c;
    --intake-ink: #f7f9fc;
    --header-bg: rgba(11, 15, 20, 0.88);

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.45);
  }
}

html[data-theme="dark"] {
  --bg: #0b0f14;
  --surface: #111821;
  --surface-2: #0f151d;
  --surface-3: #18212c;
  --ink: #f0f4f9;
  --ink-soft: #d6dee9;
  --muted: #9aa6b6;
  --muted-soft: #7f8b9b;
  --line: #25303c;
  --line-strong: #354252;

  --accent: #7aa7ff;
  --accent-text: #a4c2ff;
  --accent-hover: #a4c2ff;
  --accent-soft: #17243b;
  --accent-ink: #08101f;

  --live: #6fe0b4;
  --live-soft: #102a22;
  --amber: #f0c37a;
  --amber-soft: #2a2110;
  --blue: #8db7ff;
  --blue-soft: #14233a;

  --intake-bg: #0a111c;
  --intake-ink: #f7f9fc;
  --header-bg: rgba(11, 15, 20, 0.88);

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

button,
input,
select,
textarea {
  font: inherit;
}

svg {
  display: block;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-card);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(150%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--accent-text);
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-sub {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav .nav-cta {
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  transition: background-color 140ms ease, transform 140ms ease;
}

.site-nav .nav-cta:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.site-nav .nav-cta[aria-current="page"] {
  color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Buttons, links, eyebrows
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease,
    color 150ms ease;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button--primary:hover {
  background: var(--accent-hover);
}

.button--primary:focus-visible {
  outline-color: var(--ink);
}

.button--ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--ink-soft);
  background: var(--surface-2);
}

.button--block {
  width: 100%;
}

.button--light {
  background: #ffffff;
  color: #0d1726;
}

.button--light:hover {
  background: #e9eff8;
}

.button--outline-light {
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.button--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.text-link {
  color: var(--accent-text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.eyebrow--light {
  color: #91b6ff;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(52px, 8vw, 92px) clamp(44px, 7vw, 80px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  align-items: center;
  gap: clamp(34px, 5vw, 64px);
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--live);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.availability-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.35rem, 5vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.01;
  text-wrap: balance;
}

.hero-lede {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 26px;
}

.hero-note {
  margin: 14px 0 0;
  color: var(--muted-soft);
  font-size: 0.875rem;
}

.hero-panel {
  min-width: 0;
  padding: clamp(20px, 2.6vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-kicker {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Hero proof module: a labelled example of the product, not agency furniture. */

.proof-module__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.proof-module__badge {
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

.proof-block {
  padding-top: 14px;
}

.proof-block + .proof-block {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.proof-block__title {
  margin: 0 0 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.proof-status,
.proof-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof-status__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name state"
    "time state";
  align-items: start;
  column-gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.proof-status__row:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.proof-status__name {
  grid-area: name;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.proof-status__time {
  grid-area: time;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.proof-status__state {
  grid-area: state;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.proof-status__state--current {
  color: var(--live);
}

.proof-status__state--stale {
  color: var(--amber);
}

.proof-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.proof-item:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.proof-item__label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}

.proof-item__value {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.proof-item__source {
  grid-column: 1 / -1;
  color: var(--muted-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

.proof-module__note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 7vw, 84px);
  scroll-margin-top: 84px;
}

.section--alt {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}

.section-head {
  max-width: 730px;
  margin-bottom: 30px;
}

.section-head h2,
.section-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.9rem, 3.3vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.section-lede {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Proof-of-work cards
   -------------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(305px, 1fr));
  gap: clamp(16px, 2vw, 20px);
}

/* Short route cards on the page index: each links to one real section page. */
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 2vw, 20px);
}

.path-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.path-card__kicker {
  margin: 0 0 10px;
  color: var(--accent-text);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.path-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.28rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.path-card__copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.path-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.anchor-target {
  display: block;
  height: 0;
  scroll-margin-top: 84px;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 170ms ease;
}

.project-card:hover {
  border-color: var(--line-strong);
}

.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge--live {
  background: var(--live-soft);
  color: var(--live);
}

.status-badge--beta,
.status-badge--in_development {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-badge--archived {
  background: var(--surface-3);
  color: var(--muted);
}

.project-card__index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-card__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.project-card__problem {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.project-card__meta {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-card__meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.56;
  text-wrap: pretty;
}

.project-card__highlights {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card__highlights li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.project-card__highlights li::before {
  content: "";
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}

.project-card__actions .button {
  flex: 1 1 150px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Tech receipts (native details / summary)
   -------------------------------------------------------------------------- */

.tech-receipt {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.tech-receipt > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 44px;
  padding: 11px 2px;
  overflow-wrap: anywhere;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  text-align: left;
}

.tech-receipt > summary:hover {
  color: var(--accent-text);
}

.tech-receipt > summary::-webkit-details-marker {
  display: none;
}

.tech-receipt > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.tech-receipt[open] > summary::after {
  transform: rotate(225deg);
}

.tech-receipt > summary:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tech-receipt__body {
  margin: 2px 0 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.tech-receipt__rows {
  margin: 0;
}

.tech-receipt__rows > div {
  display: grid;
  gap: 2px;
  padding-block: 9px;
  border-top: 1px solid var(--line);
}

.tech-receipt__rows > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.tech-receipt__rows dt {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.tech-receipt__rows dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tech-receipt__list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.tech-receipt__list li {
  position: relative;
  padding-left: 14px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.tech-receipt__list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
}

.tech-receipt-stack {
  display: grid;
  gap: 4px;
  max-width: 820px;
}

.tech-receipt-stack > .tech-receipt:first-child {
  border-top: 0;
}

.tech-receipt-stack > .tech-receipt:first-child > summary {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   Before / after
   -------------------------------------------------------------------------- */

.before-after-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.before-after-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.before-after-card--after {
  border-color: color-mix(in srgb, var(--live) 38%, var(--line));
  background: var(--live-soft);
}

.before-after-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.before-after-card--after .before-after-label {
  color: var(--live);
}

.before-after-card p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Service tiers
   -------------------------------------------------------------------------- */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tier-card--featured {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow-soft);
}

.tier-model {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.tier-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.tier-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.62;
}

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tier-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.tier-list li::before {
  content: "";
  position: absolute;
  top: 0.28em;
  left: 0;
  width: 11px;
  height: 7px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.tier-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tier-foot > span {
  color: var(--muted-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pricing-key {
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.pricing-key p {
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.pricing-key strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Async terms
   -------------------------------------------------------------------------- */

.terms-summary {
  max-width: 70ch;
  margin: 18px 0 0;
  padding-left: 17px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.6;
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.channel-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.channel-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
}

.channel-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.channel-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Intentional: the 4px accent rule marks the terms aside; it is not a
   decorative side tab and should stay in the flat surface language. */
.terms-rule {
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.terms-rule p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.terms-rule strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Async intake
   -------------------------------------------------------------------------- */

.section--intake {
  padding-block: clamp(56px, 7vw, 84px);
}

.intake-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 48px);
  width: 100%;
  max-width: 960px;
  min-width: 0;
  margin-inline: auto;
  padding: clamp(24px, 4.8vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: var(--intake-bg);
  color: var(--intake-ink);
}

.intake-copy,
.intake-note {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.intake-copy h2,
.intake-copy h1 {
  max-width: 24ch;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.intake-copy > p:not(.eyebrow):not(.intake-note__foot) {
  max-width: 56ch;
  margin: 14px 0 0;
  color: #c3ccda;
  font-size: 0.96rem;
  line-height: 1.62;
}

.intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.intake-note {
  align-self: start;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
}

.intake-note__title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
}

.intake-note ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intake-note li {
  position: relative;
  padding-left: 14px;
  color: #c3ccda;
  font-size: 0.875rem;
  line-height: 1.5;
}

.intake-note li::before {
  content: "";
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: #91b6ff;
}

.intake-note__foot {
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: #9daabb;
  font-size: 0.875rem;
  line-height: 1.5;
}

.intake-form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.intake-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}

.intake-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.intake-form__field--full {
  grid-column: 1 / -1;
}

.intake-form label {
  color: #e9eef6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.intake-form__optional {
  color: #9daabb;
  font-weight: 500;
}

.intake-form input,
.intake-form select,
.intake-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.intake-form input::placeholder,
.intake-form textarea::placeholder {
  color: #a4b2c4;
}

.intake-form input:focus-visible,
.intake-form select:focus-visible,
.intake-form textarea:focus-visible {
  outline: 2px solid #91b6ff;
  outline-offset: 1px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.09);
}

.intake-form textarea {
  min-height: 144px;
  resize: vertical;
  line-height: 1.55;
}

.intake-form select option {
  color: #101828;
  background: #ffffff;
}

.intake-form__hint {
  margin: 0;
  color: #a6b3c4;
  font-size: 0.875rem;
  line-height: 1.45;
}

.intake-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 1px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.intake-form__window {
  margin: 0;
  color: #c3ccda;
  font-size: 0.875rem;
  line-height: 1.45;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  padding: 13px 15px;
  border: 1px solid rgba(255, 138, 128, 0.55);
  border-radius: var(--radius);
  background: rgba(255, 99, 88, 0.12);
  color: #ffd9d6;
}

.form-alert p {
  margin: 0 0 6px;
  font-weight: 700;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.form-alert li {
  margin: 2px 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.intake-result {
  padding-block: clamp(48px, 7vw, 88px);
}

.intake-result__inner {
  max-width: 820px;
}

.intake-result h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.intake-result__message {
  max-width: 60ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.intake-result__panel {
  margin-top: 24px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: var(--intake-bg);
  color: var(--intake-ink);
}

.intake-result__panel .intake-form {
  margin-top: 0;
}

.intake-result__note {
  margin: 0 0 16px;
  color: #c3ccda;
  font-size: 0.9rem;
  line-height: 1.55;
}

.intake-steps {
  margin: 0;
  padding-left: 20px;
  color: #d7dee9;
}

.intake-steps li {
  margin: 7px 0;
  line-height: 1.55;
}

.intake-result__back {
  margin: 22px 0 0;
}

.intake-result__back a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 640px) {
  .intake-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 26px 44px;
  padding-block: 38px;
}

.footer-brand .brand-name {
  display: inline-block;
  white-space: normal;
}

.footer-brand p {
  max-width: 54ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.58;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 8px 20px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-soft);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Error pages (404 / 500)
   -------------------------------------------------------------------------- */

.error-main {
  padding-block: clamp(56px, 9vw, 110px);
}

.error-panel {
  max-width: 760px;
  padding: clamp(28px, 4.5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.error-code {
  margin: 0 0 4px;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.error-panel .eyebrow {
  margin-top: 20px;
}

.error-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.4vw, 2.65rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

.error-copy {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.error-hint {
  max-width: 58ch;
  margin: 12px 0 0;
  color: var(--muted-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   Case study detail
   -------------------------------------------------------------------------- */

.breadcrumb {
  padding-block: 18px 0;
  font-size: 0.8rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--muted-soft);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-hero {
  padding-block: clamp(34px, 5vw, 58px) clamp(48px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
}

.case-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: clamp(30px, 5vw, 58px);
}

.case-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.case-hero__slug {
  color: var(--muted-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.case-hero h1 {
  max-width: 24ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-wrap: balance;
}

.case-hero__lede {
  max-width: 62ch;
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.66;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.case-back:hover {
  color: var(--ink);
}

.case-specs {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.case-specs .panel-kicker {
  margin: 0 0 16px;
}

.spec-grid {
  display: grid;
  gap: 0;
  margin: 0;
}

.spec {
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.spec:first-child {
  padding-top: 0;
  border-top: 0;
}

.spec dt {
  color: var(--muted-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.case-problem {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.68;
}

/* Key metrics */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-card__value {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.metric-card__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Core stack chips */

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.architecture-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -19px;
  width: 20px;
  height: 2px;
  background: var(--line-strong);
}

.flow-step__index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.flow-step__kicker {
  margin: 0;
  color: var(--muted-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-step h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.flow-step p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.architecture-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 48px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.architecture-detail h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.architecture-highlights {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.architecture-highlights li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.architecture-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.tradeoff-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tradeoff-card__index {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.tradeoff-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.tradeoff-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Brief helper
   -------------------------------------------------------------------------- */

.intake-form__helper-link {
  color: #91b6ff;
  font-weight: 700;
  text-underline-offset: 0.16em;
}

.intake-form__helper-link:focus-visible {
  outline: 2px solid #91b6ff;
  outline-offset: 2px;
}

.intake-form__counter {
  margin: 2px 0 0;
  color: #9daabb;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.intake-form__counter.is-near-limit {
  color: #f0c37a;
}

.intake-form__counter.is-over-limit {
  color: #ff8a80;
  font-weight: 700;
}

.intake-form__prompts-title {
  margin: 0;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.intake-form__prompts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
  color: #c3ccda;
  font-size: 0.875rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.intake-form__privacy {
  margin: 0;
  color: #9daabb;
  font-size: 0.875rem;
  line-height: 1.45;
}

.intake-form__draft {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  color: #9daabb;
  font-size: 0.75rem;
  line-height: 1.45;
}

.intake-form__draft[hidden] {
  display: none;
}

.intake-form__draft-clear {
  padding: 0;
  border: 0;
  background: none;
  color: #c3ccda;
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.intake-form__draft-clear:hover {
  color: #ffffff;
}

.intake-form__draft-clear:focus-visible {
  outline: 2px solid var(--accent, #165dff);
  outline-offset: 2px;
}

.intake-form__draft-clear[hidden] {
  display: none;
}

.intake-form__more {
  padding-top: 2px;
}

.intake-form__more summary {
  color: #c3ccda;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.intake-form__more summary:focus-visible {
  outline: 2px solid #91b6ff;
  outline-offset: 3px;
}

.intake-form__more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 14px;
}

.brief-helper__launcher {
  position: fixed;
  right: 18px;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #0d1726;
  color: #f7f9fc;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(8, 15, 28, 0.24);
  transition: opacity 140ms ease, visibility 140ms ease;
}

.brief-helper__launcher.is-suppressed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.brief-helper__launcher:hover {
  background: #142238;
}

.brief-helper__launcher:focus-visible {
  outline: 2px solid #91b6ff;
  outline-offset: 3px;
}

.brief-helper__launcher-label {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.brief-helper__panel {
  position: fixed;
  right: 18px;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 62px);
  z-index: 80;
  width: min(560px, calc(100vw - 36px));
  max-height: min(76vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(8, 15, 28, 0.3);
}

.brief-helper__panel[hidden],
.brief-helper__draft[hidden] {
  display: none;
}

.brief-helper__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brief-helper__head h3 {
  margin: 3px 0 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brief-helper__close {
  flex: none;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.brief-helper__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brief-helper__intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.brief-helper__qa {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.brief-helper__qa-head {
  display: grid;
  gap: 6px;
}

.brief-helper__qa-heading,
.brief-helper__questions-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.brief-helper__qa-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.brief-helper__qa-log {
  display: grid;
  gap: 10px;
  max-height: 260px;
  margin-top: 12px;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.brief-helper__qa-message {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.brief-helper__qa-message--visitor {
  margin-left: clamp(18px, 8%, 48px);
  background: var(--surface-2);
}

.brief-helper__qa-message--answer {
  margin-right: clamp(18px, 8%, 48px);
}

.brief-helper__qa-role {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brief-helper__qa-question {
  margin: 0;
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.brief-helper__qa-title {
  margin: 0;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
}

.brief-helper__qa-register {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.brief-helper__qa-body {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.brief-helper__qa-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.brief-helper__qa-followup {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.brief-helper__qa-followup:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.brief-helper__qa-followup:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brief-helper__qa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.brief-helper__qa-actions .button {
  min-height: 38px;
}

.brief-helper__qa-brief-link {
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-underline-offset: 3px;
}

.brief-helper__qa-brief-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brief-helper__qa-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.brief-helper__qa-topic {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}

.brief-helper__qa-topic:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.brief-helper__qa-topic:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brief-helper__qa-form {
  margin-top: 12px;
}

.brief-helper__qa-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.brief-helper__qa-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brief-helper__qa-input {
  flex: 1 1 190px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}

.brief-helper__qa-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.brief-helper__qa-submit {
  flex: 0 0 auto;
}

.brief-helper__qa-status {
  min-height: 1.2em;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.brief-helper__qa-status.is-error {
  color: var(--amber);
  font-weight: 700;
}

.brief-helper__qa-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.brief-helper__qa-brief-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.brief-helper__qa-data[hidden],
.brief-helper__qa-message[hidden] {
  display: none;
}

.brief-helper__questions {
  margin-top: 14px;
}

.brief-helper__questions-title {
  margin: 0;
}

.brief-helper__ask {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.brief-helper__ask-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}

.brief-helper__ask-row::-webkit-details-marker {
  display: none;
}

.brief-helper__ask-row::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  rotate: 45deg;
  transition: rotate 140ms ease, border-color 140ms ease;
}

.brief-helper__ask[open] > .brief-helper__ask-row::after {
  rotate: -135deg;
}

.brief-helper__ask-row:hover::after,
.brief-helper__ask-row:focus-visible::after {
  border-color: var(--ink);
}

.brief-helper__ask-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brief-helper__ask-label {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.brief-helper__ask-note {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.brief-helper__ask-body {
  padding-top: 2px;
}

.brief-helper__ask .brief-helper__qa {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.brief-helper__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.brief-helper__field > label,
.brief-helper__field > legend {
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.brief-helper__field > input,
.brief-helper__field > textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
}

.brief-helper__field > textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}

.brief-helper__field > input:focus-visible,
.brief-helper__field > textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.brief-helper__optional {
  color: var(--muted);
  font-weight: 500;
}

.brief-helper__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brief-helper__chip {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  margin: 0;
}

.brief-helper__chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.brief-helper__chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.brief-helper__chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.brief-helper__chip:focus-within span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brief-helper__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.brief-helper__panel .button {
  min-height: 44px;
}

.brief-helper__panel .button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.brief-helper__draft {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.brief-helper__draft-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.brief-helper__draft-head h4 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.brief-helper__count {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.brief-helper__count.is-over-limit {
  color: var(--amber);
  font-weight: 700;
}

.brief-helper__preview {
  max-height: 220px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.brief-helper__status {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.brief-helper__status.is-error {
  color: var(--amber);
  font-weight: 700;
}

@media (max-width: 760px) {
  .brief-helper__launcher {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 9px 12px;
  }

  .brief-helper__panel {
    top: calc(var(--mobile-header-height, 60px) + 8px);
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: none;
    padding: 16px;
    border-radius: 18px;
  }

  .brief-helper__head {
    gap: 10px;
  }

  .brief-helper__head h3 {
    font-size: 1.05rem;
  }

  .brief-helper__ask-row {
    flex-wrap: nowrap;
  }

  .brief-helper__ask-note {
    display: none;
  }

  .intake-form__more-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    max-width: 620px;
  }

  .case-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-specs {
    max-width: 620px;
  }

  .architecture-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }

  .architecture-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .intake-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .intake-note {
    max-width: 560px;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-header-height: 58px;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 12px;
    min-height: 0;
    padding-block: 8px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .brand-name {
    font-size: 0.96rem;
  }

  .brand-sub {
    display: none;
  }

  .site-nav {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-top: 0;
  }

  .site-nav a:not(.nav-cta) {
    display: none;
  }

  .site-nav .nav-cta {
    margin-left: 0;
    min-height: 38px;
    padding: 8px 13px;
  }

  .section {
    scroll-margin-top: calc(var(--mobile-header-height) + 10px);
  }

  .hero h1 {
    max-width: none;
  }

  .section-head {
    margin-bottom: 26px;
  }

  .case-hero h1 {
    max-width: none;
  }

  .architecture-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .before-after-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  :root {
    --shell: min(1160px, calc(100% - 28px));
  }

  .brand-sub {
    display: none;
  }

  .site-nav {
    gap: 8px 12px;
  }

  .site-nav a:not(.nav-cta) {
    font-size: 0.8rem;
  }

  .hero {
    padding-block: 40px 36px;
  }

  .hero-panel {
    padding: 18px;
    border-radius: var(--radius);
  }

  .proof-module__head {
    padding-bottom: 12px;
  }

  .hero-actions .button,
  .intake-actions .button {
    width: 100%;
  }

  .project-grid {
    gap: 14px;
  }

  .project-card,
  .tier-card,
  .channel-card,
  .path-card {
    padding: 19px;
  }

  .project-card__top {
    gap: 10px;
  }

  .project-card__actions {
    gap: 8px;
  }

  .project-card__actions .button {
    flex: 1 1 100%;
  }

  .path-card__actions .button,
  .page-actions .button {
    flex: 1 1 100%;
  }

  .tech-receipt > summary {
    font-size: 0.8rem;
  }

  .intake-card {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .intake-form {
    margin-top: 20px;
  }

  .intake-form__actions .button {
    width: 100%;
  }

  .intake-form__window {
    font-size: 0.875rem;
  }

  .case-specs,
  .tradeoff-card,
  .architecture-detail {
    padding: 21px;
  }

  .tech-receipt__body {
    padding: 14px 14px;
  }

  .before-after-card {
    padding: 21px;
  }

  .error-actions .button {
    width: 100%;
  }
}

@media print {
  .tech-receipt__body {
    display: block !important;
  }

  .tech-receipt > summary::after {
    display: none;
  }

  .site-header,
  .site-nav,
  .hero-actions,
  .intake-actions {
    display: none !important;
  }

  .brief-helper__launcher,
  .brief-helper__panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
