/* Hallmark · v2.0.0
 * critique: Utilitarian/trustworthy, sellers-first. A retiring owner is making the
 * largest decision of their working life and is scared of being cheated; the page
 * earns trust by showing the machinery (disclosure flags, handoff milestones,
 * readiness scores) rather than promising outcomes. No invented metrics, no logos.
 * waive: 47b (a document-ruled table treatment is the subject matter here, not a reflex)
 * theme: none (custom utility direction, by request: "just build it")
 */

/* ===========================================================================
   Tokens — every colour and font resolves through here
   =========================================================================== */

:root {
  /* Surfaces */
  --surface:          #FBFAF7;
  --surface-raised:   #FFFFFF;
  --surface-sunken:   #F2F0EA;
  --surface-inverse:  #14171A;

  /* Ink */
  --ink:              #14171A;
  --ink-muted:        #5A6068;
  --ink-faint:        #8A9099;
  --ink-inverse:      #FBFAF7;

  /* Rules */
  --rule:             #DCD8CE;
  --rule-strong:      #B9B4A7;
  --rule-inverse:     #2E3439;

  /* Signal */
  --accent:           #1F5F4B;
  --accent-hover:     #174536;
  --accent-wash:      #E6EFEB;

  --good:             #1F5F4B;
  --good-wash:        #E6EFEB;
  --warn:             #8A5A12;
  --warn-wash:        #F7EEDC;
  --low:              #8C3A2E;
  --low-wash:         #F7E7E3;

  /* Type */
  --font-body:        "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-ui:          ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:        ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Scale */
  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.1875rem;
  --step-2:  1.4375rem;
  --step-3:  1.875rem;
  --step-4:  2.5rem;
  --step-5:  3.375rem;

  /* Space */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --measure: 68ch;
  --container: 1180px;
  --radius: 3px;
  --radius-lg: 5px;
}

/* ===========================================================================
   Base
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  overflow-wrap: break-word;
  min-width: 0;
  color: var(--ink);
}

p { margin: 0 0 var(--s-4); max-width: var(--measure); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

img { max-width: 100%; display: block; }

/* ===========================================================================
   Layout
   =========================================================================== */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}

@media (min-width: 1400px) {
  .container { padding-inline: var(--s-7); }
}

.section { padding-block: var(--s-8); border-top: 1px solid var(--rule); }
.section--tight { padding-block: var(--s-7); }
.section--plain { border-top: 0; }

.stack > * + * { margin-top: var(--s-5); }

/* ===========================================================================
   Masthead
   =========================================================================== */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  min-height: 62px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wordmark span { color: var(--accent); }

.masthead__nav {
  display: flex;
  gap: var(--s-5);
  margin-inline-start: auto;
  align-items: center;
  flex-wrap: wrap;
}

.masthead__nav a:not(.btn) {
  color: var(--ink-muted);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  text-decoration: none;
  white-space: nowrap;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ===========================================================================
   Buttons
   =========================================================================== */

.btn {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1;
  padding: 0.72em 1.15em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn--primary { background: var(--accent); color: var(--ink-inverse); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink-inverse); }
.btn--primary:active { background: var(--accent-hover); }
.btn--primary:disabled { background: var(--rule-strong); border-color: var(--rule-strong); color: var(--surface); cursor: not-allowed; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface-raised); }
.btn--ghost:disabled { color: var(--ink-faint); border-color: var(--rule); cursor: not-allowed; }

.btn--quiet { background: transparent; color: var(--accent); border-color: transparent; padding-inline: 0; }
.btn--quiet:hover { color: var(--accent-hover); text-decoration: underline; }

.btn--block { width: 100%; }

/* ===========================================================================
   Hero
   =========================================================================== */

.hero { padding-block: var(--s-8) var(--s-7); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}

@media (min-width: 940px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-8); }
}

.hero h1 {
  font-size: var(--step-5);
  letter-spacing: -0.028em;
  margin-bottom: var(--s-4);
}

@media (max-width: 720px) {
  .hero h1 { font-size: var(--step-4); }
}

.hero__lede {
  font-size: var(--step-1);
  color: var(--ink-muted);
  margin-bottom: var(--s-5);
  max-width: 46ch;
}

.hero__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

/* Evidence card in hero */
.evidence {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.evidence__head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunken);
}

.evidence__head h2 {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-muted);
  margin: 0;
}

.evidence__body { padding: var(--s-5); }

.evidence__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: var(--step--1);
}
.evidence__row:last-child { border-bottom: 0; }
.evidence__row dt { color: var(--ink-muted); margin: 0; }
.evidence__row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* Milestone track */
.track { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }

.track li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding-block: var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  position: relative;
}

.track li::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: var(--surface-raised);
  justify-self: center;
}

.track li[data-state="done"]::before { background: var(--good); border-color: var(--good); }
.track li[data-state="in_progress"]::before { background: var(--warn); border-color: var(--warn); }
.track li[data-state="blocked"]::before { background: var(--low); border-color: var(--low); }

.track li[data-state="done"] .track__label { color: var(--ink-muted); }
.track li[data-state="pending"] .track__label { color: var(--ink-faint); }

.track__state {
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-transform: none;
}

/* ===========================================================================
   Filters
   =========================================================================== */

.filters {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
  align-items: flex-end;
  padding-block: var(--s-5);
}

.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field label {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-muted);
  font-weight: 500;
}

select, input[type="text"], input[type="number"], input[type="search"], textarea {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  padding: 0.62em 0.7em;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--ink);
  min-width: 0;
  transition: border-color 140ms ease;
}
select:hover, input:hover, textarea:hover { border-color: var(--ink-muted); }
select:disabled, input:disabled, textarea:disabled { background: var(--surface-sunken); color: var(--ink-faint); cursor: not-allowed; }
select[aria-invalid="true"], input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--low); }

textarea { resize: vertical; min-height: 7rem; width: 100%; }

.field__hint { font-family: var(--font-ui); font-size: 0.75rem; color: var(--ink-faint); }
.field__error { font-family: var(--font-ui); font-size: 0.75rem; color: var(--low); font-weight: 600; }

/* ===========================================================================
   Listing grid
   =========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  background: var(--surface-raised);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.card:hover { background: var(--surface-sunken); }
.card:hover .card__name { text-decoration: underline; }

.card__meta {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.card__name {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  min-width: 0;
}

.card__tagline {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-muted);
  line-height: 1.5;
}

.card__figures {
  display: flex;
  gap: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
  margin-top: auto;
  flex-wrap: wrap;
}

.figure { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figure dt { font-family: var(--font-ui); font-size: 0.75rem; color: var(--ink-faint); }
.figure dd {
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 600;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ===========================================================================
   Tags
   =========================================================================== */

.tags { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.tag {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  padding: 0.2em 0.55em;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink-muted);
  background: var(--surface);
  white-space: nowrap;
}
.tag--good { border-color: var(--good); color: var(--good); background: var(--good-wash); }
.tag--warn { border-color: var(--warn); color: var(--warn); background: var(--warn-wash); }
.tag--low  { border-color: var(--low);  color: var(--low);  background: var(--low-wash); }

/* ===========================================================================
   Disclosure / notice blocks
   =========================================================================== */

.notice {
  border: 1px solid var(--rule-strong);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-raised);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  line-height: 1.6;
}
.notice--warn { border-left-color: var(--warn); background: var(--warn-wash); }
.notice--info { border-left-color: var(--accent); background: var(--accent-wash); }
.notice h3 { font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; margin-bottom: var(--s-2); }
.notice p { margin-bottom: var(--s-2); max-width: none; }
.notice p:last-child { margin-bottom: 0; }
.notice ul { margin: var(--s-2) 0 0; padding-left: 1.1em; }
.notice li { margin-bottom: var(--s-1); }

/* ===========================================================================
   Definition table (listing detail)
   =========================================================================== */

.deftable { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: var(--step--1); }
.deftable th, .deftable td {
  text-align: left;
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.deftable th { color: var(--ink-muted); font-weight: 500; width: 45%; }
.deftable td { font-weight: 600; font-variant-numeric: tabular-nums; }
.deftable tr:last-child th, .deftable tr:last-child td { border-bottom: 0; }

/* ===========================================================================
   Detail layout
   =========================================================================== */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}

@media (min-width: 1000px) {
  .detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-8); }
}

.detail__aside { position: sticky; top: 84px; }

@media (max-width: 999px) { .detail__aside { position: static; } }

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
}
.panel + .panel { margin-top: var(--s-5); }

.panel h2 {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: var(--s-4);
}

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: var(--s-6); margin-bottom: var(--s-3); }
.prose h2:first-child { margin-top: 0; }
.prose ul { max-width: var(--measure); padding-left: 1.15em; }
.prose li { margin-bottom: var(--s-2); }

/* ===========================================================================
   Section headings
   =========================================================================== */

.sec-head { margin-bottom: var(--s-6); max-width: 60ch; }
.sec-head h2 {
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.sec-head p { color: var(--ink-muted); font-size: var(--step-1); margin: 0; max-width: 56ch; }

/* ===========================================================================
   Steps (how it works)
   =========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  counter-reset: step;
}

.step { background: var(--surface-raised); padding: var(--s-5); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
  display: block;
  margin-bottom: var(--s-3);
}
.step h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.step p { font-size: var(--step--1); font-family: var(--font-ui); color: var(--ink-muted); margin: 0; max-width: none; }

/* ===========================================================================
   Form
   =========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
}

@media (min-width: 720px) {
  .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.span-2 { grid-column: 1 / -1; }

fieldset {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin: 0;
  background: var(--surface-raised);
}
fieldset + fieldset { margin-top: var(--s-5); }

legend {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  padding-inline: var(--s-2);
}

.check {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  padding-block: var(--s-2);
  cursor: pointer;
}
.check input { margin-top: 3px; flex-shrink: 0; }
.check span { min-width: 0; }
.check--locked { color: var(--ink-muted); cursor: default; }

/* ===========================================================================
   Footer
   =========================================================================== */

.footer {
  border-top: 1px solid var(--rule);
  background: var(--surface-sunken);
  padding-block: var(--s-7);
  margin-top: var(--s-8);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}

.footer h3 {
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--s-3);
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: var(--s-2); }
.footer a { color: var(--ink-muted); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }

.footer__legal {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
  font-size: 0.75rem;
  line-height: 1.7;
  max-width: 85ch;
}
.footer__legal p { margin-bottom: var(--s-3); max-width: none; }

/* ===========================================================================
   Utility
   =========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ink-inverse);
  padding: var(--s-3) var(--s-4);
  z-index: 100;
  font-family: var(--font-ui);
  font-size: var(--step--1);
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); color: var(--ink-inverse); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--ink-muted); }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.empty {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  font-family: var(--font-ui);
  color: var(--ink-muted);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}

/* Reveal — one only, restrained, visible by default without JS */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 400ms ease, transform 400ms ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ===========================================================================
   Deal tracker (handoff plan, interactive)
   =========================================================================== */

.deal__progress {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
  font-family: var(--font-ui);
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.deal__progress strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.deal__bar {
  height: 6px;
  background: var(--surface-sunken);
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--s-5);
}
.deal__bar span {
  display: block;
  height: 100%;
  background: var(--good);
  transition: width 240ms ease;
}

.deal__row {
  border: 1px solid var(--rule);
  border-left-width: 3px;
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-5);
  background: var(--surface-raised);
}
.deal__row + .deal__row { margin-top: var(--s-3); }
.deal__row[data-state="done"] { border-left-color: var(--good); }
.deal__row[data-state="in_progress"] { border-left-color: var(--warn); }
.deal__row[data-state="blocked"] { border-left-color: var(--low); }
.deal__row[data-state="pending"] { border-left-color: var(--rule); }

.deal__top {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.deal__label { font-family: var(--font-ui); font-size: var(--step--1); font-weight: 600; min-width: 0; }
.deal__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 2px;
}

.deal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-4);
}
.deal__field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deal__field > span { font-family: var(--font-ui); font-size: 0.7rem; color: var(--ink-faint); }
.deal__field input {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  padding: 0.4em 0.55em;
}
.deal__field--wide { grid-column: 1 / -1; }

.deal__sign {
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}
.deal__sign label {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  cursor: pointer;
}
.deal__sign input { flex-shrink: 0; }

.deal__status {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
}
.deal__status--done { color: var(--good); }
.deal__status--blocked { color: var(--low); }
.deal__status--in_progress { color: var(--warn); }
.deal__status--pending { color: var(--ink-faint); }

.deal__hint {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--warn);
  margin-top: var(--s-3);
}
.deal__complete {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--good);
  font-weight: 600;
  margin-top: var(--s-3);
}

.deal__actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--s-5);
}

/* ===========================================================================
   Hero — full-bleed, one message, the search is the page
   =========================================================================== */

.hero--band {
  background: var(--surface-inverse);
  color: var(--ink-inverse);
  padding-block: var(--s-9) var(--s-8);
  position: relative;
  overflow: hidden;
}
.hero--band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.05) 100%), radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: auto, 22px 22px;
  pointer-events: none;
}
.hero--band .container { position: relative; z-index: 1; }
.hero--band h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: var(--s-5);
  max-width: 22ch;
  color: var(--ink-inverse);
}
.hero--band .hero__lede {
  font-size: var(--step-2);
  color: rgba(251,250,247,0.9);
  max-width: 52ch;
  margin-bottom: var(--s-6);
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.hero__kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #7db8a3;
  margin-bottom: var(--s-4);
}
.hero--band .btn--ghost {
  color: var(--ink-inverse);
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
}
.hero--band .btn--ghost:hover {
  border-color: var(--ink-inverse);
  background: rgba(255,255,255,0.12);
  color: var(--ink-inverse);
}

/* The search bar is the focal point */
.hero__search {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 1px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 780px;
  margin-bottom: var(--s-5);
}
.hero__search input,
.hero__search select {
  background: var(--surface-raised);
  border: 0;
  border-radius: 0;
  padding: 1em 1.1em;
  font-size: var(--step-0);
  color: var(--ink);
}
.hero__search input::placeholder { color: var(--ink-faint); }
.hero__search .btn {
  border-radius: 0;
  padding-inline: var(--s-6);
}
@media (max-width: 720px) {
  .hero__search { grid-template-columns: minmax(0, 1fr); }
}

.hero__stats {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
  align-items: baseline;
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.14);
  max-width: 780px;
}
.hero__stat { display: flex; flex-direction: column; gap: 2px; }
.hero__stat b {
  font-family: var(--font-ui);
  font-size: var(--step-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-inverse);
}
.hero__stat span {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(251,250,247,0.78);
}

/* ===========================================================================
   Section headers — larger, quieter
   =========================================================================== */

.sec-head h2 { font-size: clamp(1.75rem, 3.4vw, var(--step-4)); }
.sec-head p { font-size: var(--step-1); }

/* ===========================================================================
   Listing covers — visual rhythm until real photos exist
   =========================================================================== */

.cover {
  height: 132px;
  margin: calc(var(--s-5) * -1) calc(var(--s-5) * -1) var(--s-4);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: flex-end;
  padding: var(--s-4);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.16) 1px, transparent 0);
  background-size: 16px 16px;
}
.cover svg { position: relative; z-index: 1; opacity: 0.95; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover--photo::after { background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.45) 100%); }
.cover__label {
  position: absolute;
  z-index: 2;
  bottom: var(--s-4);
  left: var(--s-5);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}
.cover--fbd  { background: linear-gradient(135deg, #1F5F4B, #2E7A5E); }
.cover--svc  { background: linear-gradient(135deg, #2A5C8A, #3C7AB5); }
.cover--hlt  { background: linear-gradient(135deg, #8A5A12, #B07C2A); }
.cover--ret  { background: linear-gradient(135deg, #6B3A5E, #93597F); }
.cover--ecom { background: linear-gradient(135deg, #2E3439, #4A555C); }
.cover--pro  { background: linear-gradient(135deg, #4A4A8A, #6B6BB0); }
.cover--trd  { background: linear-gradient(135deg, #5A4A2E, #82683F); }
.cover--other{ background: linear-gradient(135deg, #4A4A4A, #6E6E6E); }

/* ===========================================================================
   Footer — quiet
   =========================================================================== */

/* ===========================================================================
   Role switch (mock — no sign-in)
   =========================================================================== */

.role-switch {
  display: inline-flex;
  gap: var(--s-2);
  align-items: center;
  border-left: 1px solid var(--rule);
  padding-left: var(--s-4);
  margin-left: var(--s-2);
}
.role-switch__label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.role-switch .btn { padding: 0.45em 0.8em; font-size: 0.75rem; }
@media (max-width: 720px) {
  .role-switch { border-left: 0; padding-left: 0; margin-left: 0; }
}

/* ===========================================================================
   Dashboard
   =========================================================================== */

.dash__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
.dash__num {
  font-family: var(--font-ui);
  font-size: var(--step-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.dash__denominator { font-size: var(--step-1); color: var(--ink-faint); font-weight: 400; }
.dash__label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: var(--s-1);
}
.dash__score {
  display: flex;
  gap: var(--s-6);
  align-items: center;
  flex-wrap: wrap;
}
.dash__score > div:first-child { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }

/* ===========================================================================
   Hero v2 — succession marketplace (editorial, photographic, motion-safe)
   =========================================================================== */
.hero--v2 {
  --hv2-forest:#123D31; --hv2-deep:#0B2A21; --hv2-cream:#FBFAF7;
  --hv2-mint:#A8DCC6; --hv2-line:#DCD8CE; --hv2-strong:#B9B4A7;
  position:relative; background:var(--hv2-forest); color:var(--hv2-cream);
  padding:0; min-height:600px; overflow:hidden; isolation:isolate;
}
.hero--v2.hero--band::after { display:none; }
.hero--v2::before {
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:58px 58px;
  -webkit-mask-image:linear-gradient(90deg,#000 0%,transparent 62%);
  mask-image:linear-gradient(90deg,#000 0%,transparent 62%);
}
.hv2-photo { position:absolute; right:0; top:0; bottom:0; width:47%; z-index:0; overflow:hidden; background:var(--hv2-deep); }
.hv2-photo img { width:100%; height:100%; object-fit:cover; object-position:50% 20%; filter:saturate(.96) contrast(1.04); animation:hv2Zoom 26s ease-in-out infinite alternate; }
.hv2-photo::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,var(--hv2-forest) 0%,rgba(18,61,49,.72) 16%,rgba(18,61,49,.08) 48%,rgba(11,42,33,.2) 100%); }
.hv2-photo__tag { position:absolute; z-index:3; left:32px; top:28px; font-family:var(--font-ui); font-size:0.62rem; letter-spacing:.1em; text-transform:uppercase; color:rgba(255,255,255,.9); border-left:2px solid var(--hv2-mint); padding-left:10px; }
.hv2-copy { position:relative; z-index:2; max-width:700px; padding:40px 0 36px; }
.hv2-eyebrow { display:flex; align-items:center; gap:12px; margin:0 0 20px; font-family:var(--font-mono); font-size:0.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--hv2-mint); }
.hv2-eyebrow::before { content:""; width:34px; height:1px; background:var(--hv2-mint); }
.hero--v2 h1 { font-family:var(--font-body); font-size:clamp(50px,5.4vw,78px); font-weight:500; line-height:1.01; letter-spacing:-.045em; margin:0 0 18px; color:var(--hv2-cream); }
.hero--v2 h1 em { display:block; font-style:italic; font-weight:400; color:var(--hv2-mint); }
.hv2-lede { font-size:1.0625rem; line-height:1.55; color:rgba(251,250,247,.82); max-width:50ch; margin:0 0 24px; }
.hv2-lede strong { color:#fff; font-weight:600; }
.hv2-finder { background:#fff; border-radius:6px; padding:5px; box-shadow:0 26px 60px -28px rgba(0,0,0,.65); max-width:700px; }
.hv2-roles { display:flex; gap:4px; padding:5px 5px 8px; }
.hv2-roles button { flex:1; border:0; background:transparent; color:var(--ink-muted); padding:9px; border-radius:5px; font-family:var(--font-ui); font-size:0.8125rem; font-weight:600; cursor:pointer; }
.hv2-roles button[aria-pressed="true"] { background:var(--hv2-forest); color:#fff; }
.hv2-search { display:grid; grid-template-columns:minmax(0,1fr) 140px 140px auto; gap:7px; padding:0 5px 5px; }
.hv2-search input, .hv2-search select { min-width:0; width:100%; height:48px; border:1px solid var(--hv2-line); border-radius:5px; padding:0 13px; background:var(--hv2-cream); color:var(--ink); font-family:var(--font-ui); font-size:0.875rem; }
.hv2-search input::placeholder { color:#6B716F; }
.hv2-search select { cursor:pointer; appearance:none; padding-right:28px; background-image:linear-gradient(45deg,transparent 50%,#5A6068 50%),linear-gradient(135deg,#5A6068 50%,transparent 50%); background-position:calc(100% - 17px) 21px,calc(100% - 12px) 21px; background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
.hv2-search .btn { min-height:48px; padding-inline:18px; white-space:nowrap; }
.hv2-actions { display:flex; align-items:center; gap:24px; margin-top:24px; flex-wrap:wrap; }
.hv2-actions .btn--ghost { color:var(--hv2-cream); border-color:rgba(255,255,255,.55); background:rgba(255,255,255,.06); }
.hv2-actions .btn--ghost:hover { background:rgba(255,255,255,.14); }
.hv2-link { font-family:var(--font-ui); font-size:0.875rem; font-weight:600; color:var(--hv2-mint); border-bottom:1px solid rgba(168,220,198,.55); padding-bottom:3px; }
.hv2-link:hover { color:#fff; }
.hv2-facts { display:flex; gap:0; margin-top:26px; padding-top:16px; border-top:1px solid rgba(255,255,255,.22); flex-wrap:wrap; max-width:700px; }
.hv2-fact { padding-right:22px; margin-right:22px; border-right:1px solid rgba(255,255,255,.2); }
.hv2-fact:last-child { border:0; margin:0; padding:0; }
.hv2-fact b { display:block; font-family:var(--font-body); font-size:1.625rem; font-weight:500; line-height:1; color:#fff; }
.hv2-fact small { display:block; font-family:var(--font-mono); font-size:0.6rem; letter-spacing:.1em; text-transform:uppercase; color:rgba(251,250,247,.62); margin-top:7px; }
.hv2-card { position:absolute; z-index:3; background:#fff; color:var(--ink); border:1px solid var(--hv2-strong); border-radius:6px; box-shadow:0 26px 54px -24px rgba(0,0,0,.55); }
.hv2-card--buyer { left:32px; bottom:28px; width:250px; padding:15px 16px 14px; animation:hv2FloatIn .75s cubic-bezier(.2,.7,.2,1) .45s both, hv2Hover 7s ease-in-out 1.3s infinite; }
.hv2-card--handoff { right:32px; bottom:28px; width:216px; padding:13px 15px; animation:hv2FloatIn .75s cubic-bezier(.2,.7,.2,1) .6s both, hv2Hover 8s ease-in-out 2s infinite; }
.hv2-card__tag { display:flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:0.58rem; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); }
.hv2-card--handoff .hv2-card__tag { color:var(--ink-muted); }
.hv2-dot { width:7px; height:7px; border-radius:50%; background:#2E8B6B; box-shadow:0 0 0 3px #E6EFEB; animation:hv2Pulse 2.6s ease-in-out infinite; }
.hv2-card__name { font-family:var(--font-body); font-size:1.625rem; font-weight:500; margin:9px 0 1px; line-height:1.1; }
.hv2-card__step { font-family:var(--font-body); font-size:1.375rem; font-weight:500; margin:5px 0 0; }
.hv2-card__meta { font-size:0.75rem; color:var(--ink-muted); margin:0 0 11px; }
.hv2-card__note { display:flex; flex-wrap:wrap; gap:4px 10px; align-items:center; border-top:1px solid var(--hv2-line); padding-top:10px; font-size:0.6875rem; color:var(--ink-muted); }
.hv2-card__note b { color:var(--accent); font-weight:600; }
.hv2-track { height:5px; background:#EDEAE3; border-radius:99px; margin:11px 0 8px; overflow:hidden; }
.hv2-track i { display:block; width:67%; height:100%; background:var(--accent); border-radius:99px; }
.hv2-card--handoff p { margin:0; font-size:0.6875rem; color:var(--ink-muted); }
.hv2-markets { background:var(--hv2-deep); color:rgba(251,250,247,.75); }
.hv2-markets .container { display:flex; align-items:center; gap:0; min-height:62px; overflow-x:auto; }
.hv2-markets__label { font-family:var(--font-mono); font-size:0.62rem; letter-spacing:.12em; text-transform:uppercase; color:var(--hv2-mint); white-space:nowrap; padding-right:24px; margin-right:24px; border-right:1px solid rgba(255,255,255,.2); }
.hv2-markets span:not(.hv2-markets__label) { font-family:var(--font-ui); font-size:0.8125rem; white-space:nowrap; padding-right:22px; margin-right:22px; border-right:1px solid rgba(255,255,255,.16); }
.hv2-markets span:last-child { border:0; }

@keyframes hv2Rise { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:none} }
@keyframes hv2FloatIn { from{opacity:0;transform:translateY(20px) scale(.97)} to{opacity:1;transform:none} }
@keyframes hv2Hover { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes hv2Zoom { from{transform:scale(1.02)} to{transform:scale(1.09)} }
@keyframes hv2Pulse { 0%,100%{box-shadow:0 0 0 3px #E6EFEB} 50%{box-shadow:0 0 0 6px rgba(46,139,107,.18)} }
.hv2-copy > * { animation:hv2Rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hv2-copy > *:nth-child(1){animation-delay:.05s} .hv2-copy > *:nth-child(2){animation-delay:.12s}
.hv2-copy > *:nth-child(3){animation-delay:.19s} .hv2-copy > *:nth-child(4){animation-delay:.26s}
.hv2-copy > *:nth-child(5){animation-delay:.33s} .hv2-copy > *:nth-child(6){animation-delay:.4s}

@media(max-width:1100px){
  .hv2-photo{width:52%}
  .hv2-copy{max-width:560px;padding:56px 0 52px}
  .hv2-search{grid-template-columns:minmax(0,1fr) 132px auto}
  .hv2-search select:last-of-type{display:none}
}
@media(max-width:900px){
  .hero--v2{display:flex;flex-direction:column}
  .hv2-photo{position:relative;width:100%;height:420px;order:2}
  .hv2-photo::after{background:linear-gradient(180deg,rgba(18,61,49,.35),rgba(11,42,33,.7))}
  .hv2-copy{max-width:none;padding:56px 0 48px;order:1}
  .hv2-card--buyer{left:24px;bottom:58px}
  .hv2-card--handoff{right:24px;bottom:20px}
}
@media(max-width:640px){
  .hv2-photo{height:380px}
  .hv2-search{grid-template-columns:1fr 1fr}
  .hv2-search input,.hv2-search .btn{grid-column:1 / -1}
  .hv2-fact{padding-right:12px;margin-right:12px}
  .hv2-fact b{font-size:1.375rem}
  .hv2-card--buyer{width:min(250px,calc(100% - 32px));left:16px;bottom:16px;padding:12px 14px}
  .hv2-card--handoff{left:16px;right:auto;bottom:176px;width:min(250px,calc(100% - 32px));padding:10px 12px}
  .hv2-card--handoff .hv2-card__step{font-size:1.125rem}
  .hv2-track{width:100%}
}
@media(prefers-reduced-motion:reduce){ .hv2-copy>*,.hv2-card,.hv2-dot,.hv2-photo img{animation:none!important} }
