/* ==========================================================================
   app.css — layout and per-screen styles for OfferNext AI.
   Depends on brand.css tokens. Editorial, whitespace-heavy, one blue accent
   per viewport.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Clear the fixed top bar (72px) for every in-flow element below it,
     including the stepper. */
  padding-top: 72px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 48px;
  padding-right: 48px;
}

.main { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   Top bar (fixed)
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--athera-off-white);
  border-bottom: 1px solid var(--athera-line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.topbar__brand { display: flex; align-items: baseline; }

.topbar__product {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__divider {
  width: 1px;
  height: 20px;
  background: var(--athera-line);
}

.topbar__spacer { flex: 1 1 auto; }

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topnav__link {
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--athera-grey);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.topnav__link:hover { color: var(--athera-charcoal); text-decoration: none; }

.topnav__link.is-active {
  color: var(--athera-blue-deep);
  border-bottom: 1px solid var(--athera-blue-deep);
  padding-bottom: 5px; /* offset 6px from baseline */
}

/* --------------------------------------------------------------------------
   Stepper (screens 2–5)
   -------------------------------------------------------------------------- */
.stepper {
  border-bottom: 1px solid var(--athera-line);
  background: var(--athera-off-white);
}

.stepper__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}

.stepper__step {
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey-light);
}

.stepper__step.is-current { color: var(--athera-charcoal); }

.stepper__arrow {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
}

/* --------------------------------------------------------------------------
   Section header (editorial pattern, shared)
   -------------------------------------------------------------------------- */
.section { padding-top: 80px; padding-bottom: 80px; }

.section__number {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
  margin-bottom: 20px;
}

.section__eyebrow { margin-bottom: 18px; }

.section__title { color: var(--athera-charcoal); margin-bottom: 20px; }

.section__intro {
  max-width: 520px;
  margin-bottom: 24px;
}

.section__rule { margin: 28px 0 0; }

/* --------------------------------------------------------------------------
   Error strip (only permitted amber this session)
   -------------------------------------------------------------------------- */
.error-strip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 80;
  max-width: 520px;
  width: calc(100% - 48px);
  background: var(--athera-surface);
  border: 1px solid var(--athera-line);
  border-left: 1px solid var(--athera-amber);
  border-radius: 2px;
  padding: 14px 18px;
}

.error-strip__text {
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--athera-charcoal);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  flex-shrink: 0;
  border-top: 1px solid var(--athera-line);
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer__line {
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey-light);
}

/* --------------------------------------------------------------------------
   Screen visibility (router toggles [hidden])
   -------------------------------------------------------------------------- */
.screen[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */
.hero {
  background: var(--athera-navy);
  border-radius: 4px;
  padding: clamp(48px, 8vw, 104px) clamp(32px, 6vw, 88px);
  margin-top: 24px;
}

.hero__eyebrow {
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 28px;
}

.hero__rule { margin-bottom: 32px; }

.hero__headline {
  color: var(--athera-white);
  max-width: 900px;
  margin-bottom: 32px;
}

.hero__lead {
  font-family: var(--athera-sans);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Home — principle cards
   -------------------------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle__title {
  color: var(--athera-charcoal);
  margin-bottom: 16px;
}

.principle__body { margin: 0; }

/* --------------------------------------------------------------------------
   Home — data strip
   -------------------------------------------------------------------------- */
.datastrip {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--athera-line);
}

.datastrip__line {
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey-light);
}

/* --------------------------------------------------------------------------
   Placeholder screens (2–5)
   -------------------------------------------------------------------------- */
.placeholder-note {
  margin-top: 8px;
  padding: 28px 0 0;
  border-top: 1px solid var(--athera-line);
  max-width: 520px;
}

.placeholder-note__text {
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--athera-grey);
}

/* ==========================================================================
   Screen 2 — Customer or Segment Input (#/input)
   Two-column editorial layout (7/5), audience on the left, objective and
   constraints on the right. Reuses brand tokens only.
   ========================================================================== */

/* Shared tab toggle (also used on Screen 3). Two secondary buttons acting as
   tabs; active state = blue-deep text with a 1px underline. */
.tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--athera-line);
}

.tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0 0 10px;
  margin-bottom: -1px;
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--athera-grey);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}

.tab:hover { color: var(--athera-charcoal); }

.tab.is-active {
  color: var(--athera-blue-deep);
  border-bottom-color: var(--athera-blue-deep);
}

/* Two-column grid */
.input-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 56px;
  align-items: start;
}

.input-col__eyebrow { margin-bottom: 14px; }
.input-col__title { color: var(--athera-charcoal); margin-bottom: 24px; }

/* Right column stays in view while the audience list scrolls. */
.input-col--objective { position: sticky; top: 96px; }

/* --- Audience selection list -------------------------------------------- */
.audience-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--athera-line-light);
}

.audience-row {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--athera-line-light);
  border-left: 2px solid transparent;
  padding: 16px 16px 16px 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.audience-row:hover { background: var(--athera-off-white); }

.audience-row.is-selected {
  border-left: 2px solid var(--athera-blue);
  background: var(--athera-surface);
}

.audience-row__top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}

.audience-row__name {
  font-family: var(--athera-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--athera-charcoal);
}

.audience-row__tier {
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 1px 6px;
  color: var(--athera-grey);
}

.audience-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
}

.audience-row__loc { color: var(--athera-grey); }
.audience-row__sep { color: var(--athera-grey-light); }

/* --- Profile panel (fades in on selection; opacity only) ---------------- */
.profile-panel {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--athera-line);
  animation: profile-fade 0.3s ease both;
}

@keyframes profile-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.profile-panel__group { margin-bottom: 22px; }
.profile-panel__group:last-child { margin-bottom: 0; }
.profile-panel__heading { margin-bottom: 10px; }

.profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-list__empty { color: var(--athera-grey-light); }

/* Category affinity bars: charcoal fill on a line-light track, mono labels. */
.affinity-row {
  display: grid;
  grid-template-columns: 132px 1fr 40px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.affinity-row__label { color: var(--athera-charcoal-light); }

.affinity-track {
  height: 6px;
  background: var(--athera-line-light);
  border-radius: 2px;
  overflow: hidden;
}

.affinity-fill {
  height: 100%;
  background: var(--athera-charcoal);
  border-radius: 2px;
}

.affinity-row__value {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey);
  text-align: right;
}

/* Definition-style facts (price sensitivity, installments, etc.) */
.profile-facts {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 6px 12px;
  margin: 0;
}

.profile-facts dt { color: var(--athera-grey); }
.profile-facts dd { margin: 0; color: var(--athera-charcoal); }
.profile-facts .is-mono { font-family: var(--athera-mono); font-size: 12px; color: var(--athera-charcoal-light); }

/* Consent notices */
.consent-line {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--athera-line-light);
}

.consent-notice {
  margin-top: 20px;
  background: var(--athera-surface);
  border: 1px solid var(--athera-line);
  border-left: 1px solid var(--athera-amber);
  border-radius: 2px;
  padding: 14px 18px;
}

.consent-notice__text {
  font-family: var(--athera-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--athera-charcoal);
}

/* --- Objective radio list ----------------------------------------------- */
.objective-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--athera-line-light);
  margin-bottom: 28px;
}

.objective-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 6px;
  border-bottom: 1px solid var(--athera-line-light);
  cursor: pointer;
}

.objective-row:hover { background: var(--athera-off-white); }

/* Custom radio mark, brand-compliant (no native accent colour). */
.objective-row__mark {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid var(--athera-grey-light);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s ease;
}

.objective-row.is-selected .objective-row__mark { border-color: var(--athera-blue-deep); }

.objective-row.is-selected .objective-row__mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--athera-blue-deep);
}

.objective-row__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.objective-row__label {
  font-family: var(--athera-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--athera-charcoal);
  display: block;
  margin-bottom: 2px;
}

.objective-row.is-selected .objective-row__label { color: var(--athera-blue-deep); }

.objective-row__desc { margin: 0; }

/* Keyboard focus on the whole row when its hidden input is focused. */
.objective-row__input:focus-visible + .objective-row__mark {
  outline: 2px solid var(--athera-blue-deep);
  outline-offset: 2px;
}

/* --- Constraints (collapsible) ------------------------------------------ */
.constraints { margin-bottom: 28px; }

.constraints__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  border-top: 1px solid var(--athera-line);
  border-bottom: 1px solid var(--athera-line);
  padding: 14px 0;
  cursor: pointer;
  color: var(--athera-charcoal);
}

.constraints__toggle-label {
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--athera-charcoal);
}

.constraints__sign {
  margin-left: auto;
  font-family: var(--athera-mono);
  font-size: 13px;
  color: var(--athera-grey);
}

.constraints__body { padding: 20px 0 4px; }
.constraints__body[hidden] { display: none; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--athera-sans);
  font-size: 12px;
  color: var(--athera-grey);
}

.field__input,
.field__select {
  width: 100%;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
  background: var(--athera-off-white);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 9px 12px;
}

.field__input:focus-visible,
.field__select:focus-visible {
  outline: 2px solid var(--athera-blue-deep);
  outline-offset: 0;
  border-color: var(--athera-blue-deep);
}

/* --- Analyze button + loading state ------------------------------------- */
.analyze-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 24px;
  background: var(--athera-blue);
  color: var(--athera-navy);
  font-family: var(--athera-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.analyze-button:hover:not(:disabled) { background: var(--athera-blue-deep); color: var(--athera-white); }

.analyze-button:disabled {
  background: var(--athera-grey-light);
  color: var(--athera-white);
  cursor: not-allowed;
}

.analyze-loading {
  margin-top: 18px;
  animation: profile-fade 0.3s ease both;
}
.analyze-loading[hidden] { display: none; }

.analyze-loading__text {
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey);
  margin-bottom: 10px;
}

/* Indeterminate 1px progress line in blue — no spinner. */
.analyze-progress {
  height: 1px;
  width: 100%;
  background: var(--athera-line);
  overflow: hidden;
  position: relative;
}

.analyze-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 40%;
  background: var(--athera-blue);
  animation: analyze-slide 1.1s ease-in-out infinite;
}

@keyframes analyze-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ==========================================================================
   Screen 3 — Product & Offer Library (#/library)
   ========================================================================== */

.library-intro { margin-bottom: 8px; }

/* Category filter chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 24px;
}

.chip {
  appearance: none;
  background: transparent;
  border: none;
  padding: 4px 2px;
  font-family: var(--athera-sans);
  font-size: 12px;
  color: var(--athera-grey);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}

.chip:hover { color: var(--athera-charcoal); }
.chip.is-active { color: var(--athera-blue-deep); border-bottom-color: var(--athera-blue-deep); }

/* Table wrapper: horizontal scroll inside the container, never the page. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.athera-table td.is-num,
.athera-table th.is-num { text-align: right; font-family: var(--athera-mono); }

.product-row { cursor: pointer; }
.product-row:hover { background: var(--athera-off-white); }
.product-row.is-out td { color: var(--athera-grey); opacity: 0.45; }
/* Keep the expand affordance readable even on de-emphasised rows. */
.product-row.is-out:hover td { opacity: 0.6; }

/* Stock status word + swatch */
.stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.stock__swatch {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex: none;
}

.stock--in .stock__swatch { background: var(--athera-charcoal); }
.stock--low .stock__swatch { background: var(--athera-amber); }
.stock--out .stock__swatch { background: var(--athera-grey-light); }

/* Relationship mono tags */
.rel-tags {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rel-tag {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey);
  white-space: nowrap;
}

.rel-tags__more { font-family: var(--athera-mono); font-size: 11px; color: var(--athera-grey-light); }

/* Inline product detail band */
.product-detail td { background: var(--athera-surface); }
.product-detail[hidden] { display: none; }

.product-detail__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 8px 2px 12px;
}

.detail-block__heading { margin-bottom: 8px; }
.detail-block__text { margin: 0 0 6px; }

.detail-rels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

/* --- Offers tab --------------------------------------------------------- */
.offer-list { display: flex; flex-direction: column; gap: 16px; }

.offer-card { padding: 24px; }

.offer-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.offer-card__name { color: var(--athera-charcoal); }

/* One chip style for all offer types — grey, no rainbow coding. */
.offer-type-chip {
  flex: none;
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 3px 8px;
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

.offer-card__incentive { margin-bottom: 14px; }

.offer-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  padding-top: 16px;
  border-top: 1px solid var(--athera-line-light);
}

.offer-field__heading { margin-bottom: 8px; }
.offer-field__text { margin: 0; }

.offer-components { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }

.offer-dates { font-family: var(--athera-mono); font-size: 12px; color: var(--athera-charcoal-light); }

.offer-rules { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.offer-rules dt { color: var(--athera-grey); }
.offer-rules dd { margin: 0; color: var(--athera-charcoal); }

.offer-card__exclusions { margin-top: 14px; }

.offer-constrained {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--athera-surface);
  border-left: 1px solid var(--athera-amber);
  border-radius: 2px;
  font-family: var(--athera-sans);
  font-size: 13px;
  color: var(--athera-charcoal);
}

/* Closing strip */
.library-close {
  margin-top: 48px;
  background: var(--athera-surface);
  border-radius: 4px;
  padding: 20px 28px;
}

.library-close__text {
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey);
}

/* ==========================================================================
   Screen 4 — Recommendation Results (#/results)
   Ranked recommendation cards with legible reasoning and an unmistakable
   approval step. The single blue accent among the ranked cards is rank 01's
   score bar; amber appears only in warn flags. Reuses brand tokens only.
   ========================================================================== */

/* Leave room for the sticky decision bar at the foot of the page. */
.results { padding-bottom: 120px; }

/* --- Header band: editorial lead on the left, mono meta on the right ----- */
.results-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.results-meta {
  text-align: right;
  max-width: 320px;
  padding-top: 6px;
}

.results-meta__list {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  gap: 4px 14px;
  margin: 0 0 16px;
}

.results-meta__list dt {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
  text-align: right;
}

.results-meta__list dd {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-charcoal-light);
  text-align: right;
}

.results-meta__disclaimer { margin: 0; }

/* --- Empty and blocked states ------------------------------------------- */
.results-empty {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--athera-line);
  max-width: 520px;
}

.results-empty__text { margin: 0 0 20px; }

.results-block { margin-top: 8px; max-width: 640px; }

.results-block__eyebrow {
  color: var(--athera-grey-light);
  margin-bottom: 16px;
}

.results-block__message {
  font-family: var(--athera-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--athera-white);
  margin-bottom: 20px;
}

.results-block__flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--athera-line-dark);
  border-radius: 2px;
  margin-bottom: 20px;
}

.results-block__code {
  font-family: var(--athera-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.results-block__note {
  font-family: var(--athera-sans);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* --- Customer summary strip --------------------------------------------- */
.customer-strip {
  margin-top: 40px;
  background: var(--athera-surface);
  border-radius: 4px;
  padding: 22px 28px;
}

.customer-strip__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-bottom: 12px;
}

.cs-fact { display: flex; flex-direction: column; gap: 3px; }

.cs-fact__label {
  font-family: var(--athera-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

.cs-fact__value {
  font-family: var(--athera-sans);
  font-size: 15px;
  color: var(--athera-charcoal);
}

.customer-strip__behavior {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--athera-line-light);
  color: var(--athera-charcoal-light);
}

/* --- Recommendation cards ----------------------------------------------- */
.rec-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.rec-card {
  padding: 32px;
  border-left: 2px solid transparent;   /* reserved for the approved accent */
  transition: opacity 0.25s ease, border-color 0.2s ease;
}

.rec-card.is-approved { border-left: 2px solid var(--athera-blue); }
.rec-card.is-rejected { opacity: 0.45; }

.rec-card__grid {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
}

/* min-width:0 lets the 1fr body shrink below its content's min-content so long
   offer names and copy wrap instead of forcing the page to scroll sideways. */
.rec-card__body { min-width: 0; }

.rec-card__rank {
  font-family: var(--athera-mono);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--athera-grey-light);
}

.rec-card__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.rec-card__name { color: var(--athera-charcoal); }

/* Score: mono number + a thin 120px bar. Charcoal fill; rank 01 fill is blue. */
.rec-score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.rec-score__num {
  font-family: var(--athera-mono);
  font-size: 15px;
  color: var(--athera-charcoal);
}

.score-bar {
  display: inline-block;
  width: 120px;
  height: 4px;
  background: var(--athera-line-light);
  border-radius: 2px;
  overflow: hidden;
}

.score-bar__fill {
  display: block;
  height: 100%;
  background: var(--athera-charcoal);
  border-radius: 2px;
}

.score-bar__fill--lead { background: var(--athera-blue); }

.rec-score__of {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
}

/* Shared block spacing inside a card */
.rec-block { margin-bottom: 24px; min-width: 0; }
.rec-block:last-child { margin-bottom: 0; }
.rec-block__eyebrow { margin-bottom: 10px; }

.rec-why { margin: 0; max-width: 640px; overflow-wrap: break-word; }

.rec-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  margin-bottom: 24px;
}

/* Score breakdown disclosure */
.breakdown { margin-top: 14px; }

.breakdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--athera-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--athera-charcoal);
}

.breakdown__sign {
  font-family: var(--athera-mono);
  font-size: 13px;
  color: var(--athera-grey);
}

.breakdown__panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.breakdown.is-open .breakdown__panel {
  max-height: 320px;
  opacity: 1;
  margin-top: 14px;
}

.breakdown__list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 20px;
  margin: 0;
  padding: 14px 16px;
  background: var(--athera-surface);
  border-radius: 2px;
  max-width: 420px;
}

.breakdown__list dt {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey);
}

.breakdown__list dd {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-charcoal);
  text-align: right;
}

/* Expected impact — the estimate label stays grey so it reads as an estimate. */
.rec-impact {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.rec-impact__metric {
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal-light);
}

.rec-impact__value {
  font-family: var(--athera-mono);
  font-size: 16px;
  color: var(--athera-charcoal);
}

.rec-impact__tag {
  font-family: var(--athera-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--athera-grey-light);
}

.rec-timing {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 12px;
  color: var(--athera-charcoal-light);
}

/* --- Messaging block ----------------------------------------------------- */
.rec-msg__internal { color: var(--athera-grey); }

.msg-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--athera-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.msg-tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0 0 9px;
  margin-bottom: -1px;
  white-space: nowrap;
  font-family: var(--athera-sans);
  font-size: 12px;
  color: var(--athera-grey);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}

.msg-tab:hover { color: var(--athera-charcoal); }

.msg-tab.is-active {
  color: var(--athera-blue-deep);
  border-bottom-color: var(--athera-blue-deep);
}

.msg-inset {
  background: var(--athera-off-white);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 16px 18px;
}

.msg-inset__text {
  margin: 0;
  font-family: var(--athera-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--athera-charcoal);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.msg-copy {
  appearance: none;
  margin-top: 12px;
  padding: 7px 14px;
  background: transparent;
  color: var(--athera-charcoal);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  font-family: var(--athera-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.msg-copy:hover { background: var(--athera-surface); }
.msg-copy.is-copied { color: var(--athera-grey); border-color: var(--athera-line); }

/* --- Governance flags ---------------------------------------------------- */
.flags {
  list-style: none;
  margin: 0 0 24px;
  padding: 18px 0 0;
  border-top: 1px solid var(--athera-line-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flag { display: flex; align-items: flex-start; gap: 10px; }

.flag__swatch {
  width: 10px;
  height: 10px;
  border-radius: 1px;
  margin-top: 4px;
  flex: none;
}

.flag__swatch--warn { background: var(--athera-amber); }
.flag__swatch--info { background: var(--athera-steel); }
.flag__swatch--block { background: var(--athera-grey-light); }

.flag__text { margin: 0; }
.flag__level {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--athera-charcoal);
}

/* --- Decision footer ----------------------------------------------------- */
.rec-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--athera-line-light);
}

.rec-footer--rejecting { flex-wrap: wrap; }
.rec-footer__actions { display: flex; gap: 12px; }

.rec-btn {
  appearance: none;
  padding: 11px 22px;
  border-radius: 2px;
  font-family: var(--athera-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Approve is the emphasised action, rendered solid charcoal so the only blue
   among the ranked cards stays rank 01's score bar. */
.rec-btn--approve {
  background: var(--athera-charcoal);
  color: var(--athera-white);
  border: 1px solid var(--athera-charcoal);
}
.rec-btn--approve:hover { background: var(--athera-navy); border-color: var(--athera-navy); }

.rec-btn--ghost {
  background: transparent;
  color: var(--athera-charcoal);
  border: 1px solid var(--athera-line);
}
.rec-btn--ghost:hover { background: var(--athera-off-white); }

.rec-btn--reject {
  background: transparent;
  color: var(--athera-charcoal);
  border: 1px solid var(--athera-charcoal-light);
}
.rec-btn--reject:hover { background: var(--athera-surface); }

.reject-reason {
  flex: 1 1 220px;
  min-width: 180px;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
  background: var(--athera-off-white);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 10px 12px;
}

.reject-reason:focus-visible {
  outline: 2px solid var(--athera-blue-deep);
  outline-offset: 0;
  border-color: var(--athera-blue-deep);
}

.rec-footer--decided { justify-content: flex-end; gap: 16px; }

.rec-decided {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 12px;
  color: var(--athera-charcoal-light);
}

.rec-decided--rejected { color: var(--athera-grey); }

.link-btn {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: var(--athera-sans);
  font-size: 12px;
  color: var(--athera-blue-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Alternatives -------------------------------------------------------- */
.alts { margin-top: 56px; }

.alts__eyebrow {
  margin-bottom: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--athera-line);
}

.alts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.alt-card {
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alt-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.alt-card__name {
  font-family: var(--athera-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--athera-charcoal);
  margin: 0;
}

.alt-score { display: flex; align-items: center; gap: 10px; }

.alt-score__num {
  font-family: var(--athera-mono);
  font-size: 13px;
  color: var(--athera-charcoal);
}

.alt-card__rationale { margin: 0; }

.alt-card__condition {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--athera-grey);
}

.alt-card__promote { align-self: flex-start; margin-top: 4px; }

/* --- Sticky decision bar ------------------------------------------------- */
.results-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--athera-off-white);
  border-top: 1px solid var(--athera-line);
}

.results-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.results-bar__count {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 12px;
  color: var(--athera-charcoal);
}

.results-bar__actions { display: flex; align-items: center; gap: 14px; }

.results-bar__continue:disabled {
  background: var(--athera-grey-light);
  color: var(--athera-white);
  cursor: not-allowed;
}
.results-bar__continue:disabled:hover { background: var(--athera-grey-light); color: var(--athera-white); }

/* ==========================================================================
   Screen 5 — Campaign / Sales Brief Export (#/brief)
   A centred, print-worthy document card on the off-white page, followed by the
   learning-loop panel and a sticky export bar. Reuses brand tokens only. The
   single blue accent in the document is the title rule; the single permitted
   amber is the best-performing bar in the learning-loop chart.
   ========================================================================== */

.brief-page { padding-bottom: 96px; }

/* --- Empty state --------------------------------------------------------- */
.brief-empty {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--athera-line);
  max-width: 520px;
}
.brief-empty__text { margin: 0 0 20px; }

/* --- The document card --------------------------------------------------- */
.brief-doc {
  max-width: 820px;
  margin: 0 auto;
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 4px;
  padding: 64px;
  overflow: hidden;   /* lets the full-bleed disclaimer keep the rounded corners */
}

.brief-doc__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.brief-doc__mark { font-size: 18px; }

.brief-doc__meta { margin: 0; text-align: right; }
.brief-doc__meta div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.brief-doc__meta dt {
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
}
.brief-doc__meta dd {
  margin: 0;
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-charcoal-light);
}

.brief-doc__eyebrow { margin-bottom: 16px; }
.brief-doc__title { color: var(--athera-charcoal); margin-bottom: 0; }
.brief-doc__rule { margin: 24px 0 0; }

/* --- Sections ------------------------------------------------------------ */
.brief-section { margin-top: 44px; }

.brief-section__eyebrow {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--athera-line-light);
}

.brief-summary { display: flex; flex-direction: column; gap: 12px; }
.brief-summary__p { margin: 0; max-width: 64ch; }

/* Audience two-column definition list */
.brief-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin: 0;
}

.brief-dl__row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--athera-line-light);
}

.brief-dl__term {
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

.brief-dl__desc {
  margin: 0;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
}

/* Approved offers */
.brief-offers { display: flex; flex-direction: column; }

.brief-offer:not(:first-child) {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--athera-line-light);
}

.brief-offer__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brief-offer__index {
  font-family: var(--athera-mono);
  font-size: 13px;
  color: var(--athera-grey-light);
}

.brief-offer__name { color: var(--athera-charcoal); }

.brief-offer__block { margin-bottom: 20px; }
.brief-offer__label { margin-bottom: 8px; }
.brief-offer__text { margin: 0; max-width: 64ch; overflow-wrap: break-word; }

.brief-offer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  margin-bottom: 20px;
}
.brief-offer__cols .brief-offer__block { margin-bottom: 0; }

.brief-offer__impact { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brief-offer__impact-value { font-family: var(--athera-mono); font-size: 16px; color: var(--athera-charcoal); }
.brief-offer__impact-tag {
  font-family: var(--athera-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--athera-grey-light);
}

.brief-offer__timing { margin: 0; font-family: var(--athera-mono); font-size: 12px; color: var(--athera-charcoal-light); }

.brief-offer__msg { margin-top: 4px; }
.brief-offer__msg-eyebrow { margin-bottom: 10px; }

/* Channel-plan and success-metrics tables: editable inline inputs */
.brief-table { margin-top: 4px; }

.brief-owner-input,
.brief-target-input {
  width: 100%;
  max-width: 220px;
  font-family: var(--athera-sans);
  font-size: 13px;
  color: var(--athera-charcoal);
  background: var(--athera-off-white);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  padding: 6px 10px;
}

.brief-owner-input:focus-visible,
.brief-target-input:focus-visible {
  outline: 2px solid var(--athera-blue-deep);
  outline-offset: 0;
  border-color: var(--athera-blue-deep);
}

/* Approval checklist — custom checkboxes */
.brief-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 48px;
}

.brief-check { display: flex; align-items: center; gap: 12px; }

.brief-check__box {
  width: 20px;
  height: 20px;
  flex: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--athera-charcoal-light);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.brief-check__box.is-checked {
  background: var(--athera-charcoal);
  border-color: var(--athera-charcoal);
}

/* The checkmark, drawn in CSS (off-white tick on the charcoal fill). */
.brief-check__mark { position: absolute; inset: 0; display: block; }
.brief-check__box.is-checked .brief-check__mark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--athera-off-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.brief-check__label { font-family: var(--athera-sans); font-size: 14px; color: var(--athera-charcoal); }
.brief-check__note { margin-top: 18px; }

/* Learning questions — mono numbers */
.brief-questions { list-style: none; margin: 0; padding: 0; }

.brief-question {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--athera-line-light);
}
.brief-question:last-child { border-bottom: none; }

.brief-question__num { font-family: var(--athera-mono); font-size: 12px; color: var(--athera-grey-light); flex: none; }
.brief-question__text { margin: 0; }

/* Disclaimer band — full-bleed strip at the foot of the card */
.brief-disclaimer {
  margin: 48px -64px -64px;
  padding: 24px 64px;
  background: var(--athera-surface);
  border-top: 1px solid var(--athera-line);
}
.brief-disclaimer__text { margin: 0; }

/* --- Learning-loop panel ------------------------------------------------- */
.learning-loop { max-width: 820px; margin: 56px auto 0; }

.learning-loop__eyebrow { margin-bottom: 14px; }
.learning-loop__title { color: var(--athera-charcoal); margin-bottom: 28px; }

.learning-loop__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.ll-chart { animation: ll-fade 0.3s ease both; }
@keyframes ll-fade { from { opacity: 0; } to { opacity: 1; } }

.ll-chart__axis {
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--athera-grey);
  margin-bottom: 18px;
}

.ll-bar {
  display: grid;
  grid-template-columns: 116px 1fr 40px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ll-bar__label {
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

/* Track sits at 6% opacity — well under the 12% gridline ceiling. */
.ll-bar__track {
  height: 8px;
  background: var(--athera-line-light);
  border-radius: 2px;
  overflow: hidden;
}

.ll-bar__fill { display: block; height: 100%; background: var(--athera-charcoal); border-radius: 2px; }
.ll-bar__fill--best { background: var(--athera-amber); }

.ll-bar__value { font-family: var(--athera-mono); font-size: 11px; color: var(--athera-charcoal); text-align: right; }

.ll-side { display: flex; flex-direction: column; gap: 14px; }

.ll-stat {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--athera-line-light);
}

.ll-stat__label {
  font-family: var(--athera-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

.ll-stat__value { font-family: var(--athera-mono); font-size: 13px; color: var(--athera-charcoal); }

.ll-side__note { margin-top: 6px; }

.ll-footnote {
  margin-top: 24px;
  font-family: var(--athera-mono);
  font-size: 11px;
  color: var(--athera-grey-light);
}

/* --- Sticky export bar --------------------------------------------------- */
.brief-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--athera-off-white);
  border-top: 1px solid var(--athera-line);
}

.brief-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brief-bar__actions { display: flex; align-items: center; gap: 16px; }

.brief-download:disabled {
  background: var(--athera-grey-light);
  color: var(--athera-white);
  cursor: not-allowed;
}
.brief-download:disabled:hover { background: var(--athera-grey-light); color: var(--athera-white); }

.brief-copy:disabled {
  color: var(--athera-grey-light);
  border-color: var(--athera-line);
  cursor: not-allowed;
}
.brief-copy:disabled:hover { background: transparent; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; gap: 20px; }

  .input-grid { grid-template-columns: 1fr; gap: 48px; }
  .input-col--objective { position: static; }
  .product-detail__inner { grid-template-columns: 1fr; gap: 20px; }
  .offer-card__grid { grid-template-columns: 1fr; gap: 16px; }

  .results-head { grid-template-columns: 1fr; gap: 24px; }
  .results-meta { text-align: left; max-width: none; }
  .results-meta__list { justify-content: start; }
  .results-meta__list dt, .results-meta__list dd { text-align: left; }
  .alts-grid { grid-template-columns: 1fr; }

  .learning-loop__grid { grid-template-columns: 1fr; gap: 32px; }
  .brief-doc { padding: 44px; }
  .brief-disclaimer { margin: 44px -44px -44px; padding: 24px 44px; }
  .brief-offer__cols { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 720px) {
  .container { padding-left: 24px; padding-right: 24px; }

  .topbar__inner {
    height: auto;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topbar__spacer { display: none; }

  .topnav {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  /* The top bar joins the flow on narrow screens, so drop the fixed-bar clearance. */
  .shell { padding-top: 0; }

  .topbar { position: static; }
}

@media (max-width: 640px) {
  /* Cards stack their internal columns; the rank sits above the body. */
  .rec-card__grid { grid-template-columns: 1fr; gap: 8px; }
  .rec-card__rank { font-size: 22px; }
  .rec-cols { grid-template-columns: 1fr; gap: 18px; }
  .rec-score { flex-wrap: wrap; }
  .rec-footer { flex-wrap: wrap; justify-content: flex-start; }
  .rec-footer--decided { justify-content: flex-start; }
  .results-bar__inner { flex-wrap: wrap; gap: 12px; }
  .results-bar__actions { width: 100%; justify-content: space-between; }

  .brief-dl { grid-template-columns: 1fr; }
  .brief-checklist { grid-template-columns: 1fr; }
  .brief-bar__inner { flex-wrap: wrap; gap: 12px; }
  .brief-bar__actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 420px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .hero { padding: 40px 24px; }
  .section { padding-top: 56px; padding-bottom: 56px; }

  /* Affinity and fact grids reflow to keep labels legible on narrow screens. */
  .affinity-row { grid-template-columns: 96px 1fr 36px; gap: 8px; }
  .profile-facts { grid-template-columns: 104px 1fr; }
  .offer-card { padding: 20px; }

  .rec-card { padding: 20px; }
  .customer-strip { padding: 18px 20px; }
  .customer-strip__facts { gap: 12px 24px; }

  .brief-doc { padding: 28px; }
  .brief-disclaimer { margin: 32px -28px -28px; padding: 20px 28px; }
  .brief-doc__head { flex-wrap: wrap; gap: 16px; }
  .brief-doc__meta, .brief-doc__meta div { text-align: left; justify-content: flex-start; }
  .ll-bar { grid-template-columns: 88px 1fr 36px; gap: 8px; }
}

/* --------------------------------------------------------------------------
   Print — the brief document only, black-on-white-safe, 1in page margins.
   Hide the chrome (nav, stepper, export bar, footer) and the learning loop.
   -------------------------------------------------------------------------- */
@media print {
  @page { margin: 1in; }

  .topbar,
  .stepper,
  .footer,
  .brief-bar,
  .error-strip,
  .learning-loop { display: none !important; }

  /* --athera-navy (#0F172A) is near-black and prints crisp; --athera-white is
     pure white. Both keep the print rules on the brand palette. */
  body { background: var(--athera-white); color: var(--athera-navy); }
  .shell { padding-top: 0; min-height: 0; }
  .section { padding: 0; }
  .container { max-width: none; padding-left: 0; padding-right: 0; }

  .brief-page { padding: 0; }
  .brief-doc {
    max-width: none;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }

  .brief-doc__mark,
  .brief-doc__meta dd,
  .brief-doc__title,
  .brief-offer__name,
  .brief-check__label,
  .brief-offer__text,
  .brief-summary__p,
  .brief-question__text { color: var(--athera-navy); }

  .athera-blue-rule { background: var(--athera-navy); }
  .msg-inset { background: var(--athera-white); border-color: var(--athera-grey-light); }

  .brief-disclaimer {
    margin: 32px 0 0;
    padding: 16px 0 0;
    background: var(--athera-white);
    border-top: 1px solid var(--athera-grey-light);
  }

  .brief-offer,
  .brief-section { break-inside: avoid; }

  .brief-check__box { border-color: var(--athera-navy); }
  .brief-check__box.is-checked { background: var(--athera-navy); }

  /* Inputs render as plain text values on paper. */
  .brief-owner-input,
  .brief-target-input {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--athera-navy);
  }
}
