/* ==========================================================================
   A!thera — Client Propensity Ranking
   A!thera Partners brand stylesheet
   Tokens are pulled verbatim from the A!thera visual system. One accent
   (A! Blue) per surface, generous whitespace, Cormorant Garamond display /
   DM Sans body / DM Mono metadata.
   ========================================================================== */

:root {
  /* Primary palette */
  --athera-blue: #5FB8D6;
  --athera-blue-light: #A8D9EC;
  --athera-blue-deep: #2A8FB0;
  --athera-charcoal: #374151;
  --athera-charcoal-light: #4B5563;
  --athera-grey: #6B7280;
  --athera-grey-light: #9CA3AF;
  --athera-navy: #0F172A;
  --athera-navy-mid: #1E2B42;

  /* Surfaces */
  --athera-white: #FFFFFF;
  --athera-off-white: #F8F7F4;
  --athera-surface: #F1EEE8;

  /* Extended palette */
  --athera-amber: #C8955A;
  --athera-amber-light: #E8C49A;
  --athera-steel: #8AA5BE;
  --athera-mist: #D4DFE8;

  /* Lines */
  --athera-line: rgba(55, 65, 81, 0.12);
  --athera-line-light: rgba(55, 65, 81, 0.06);
  --athera-line-dark: rgba(255, 255, 255, 0.08);
  --athera-line-dark-light: rgba(255, 255, 255, 0.06);

  /* Typography */
  --athera-display: 'Cormorant Garamond', Georgia, serif;
  --athera-sans: 'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --athera-mono: 'DM Mono', 'Consolas', 'Monaco', monospace;

  /* Layout */
  --page-max: 1440px;
  --page-pad: clamp(24px, 5vw, 64px);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--athera-off-white);
  color: var(--athera-charcoal);
  font-family: var(--athera-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--athera-blue-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Type scale (A!thera system)
   -------------------------------------------------------------------------- */

.athera-display-lg { font-family: var(--athera-display); font-size: clamp(40px, 6vw, 72px); font-weight: 300; line-height: 1; letter-spacing: -0.015em; }
.athera-display-md { font-family: var(--athera-display); font-size: clamp(28px, 4vw, 48px); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
.athera-display-sm { font-family: var(--athera-display); font-size: clamp(22px, 3vw, 30px); font-weight: 400; line-height: 1.2; }

.athera-body-lg { font-family: var(--athera-sans); font-size: 18px; font-weight: 300; line-height: 1.7; color: var(--athera-charcoal-light); }
.athera-body    { font-family: var(--athera-sans); font-size: 15px; font-weight: 400; line-height: 1.65; color: var(--athera-charcoal); }
.athera-body-sm { font-family: var(--athera-sans); font-size: 13px; font-weight: 400; line-height: 1.55; color: var(--athera-grey); }

.athera-label {
  font-family: var(--athera-sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--athera-grey);
}
.athera-label-blue { color: var(--athera-blue-deep); }

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

/* Signature thin blue rule */
.athera-blue-rule {
  width: 48px;
  height: 1px;
  background: var(--athera-blue);
  border: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.shell {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--page-pad);
}

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

.site-header {
  border-bottom: 1px solid var(--athera-line);
  background: var(--athera-off-white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.brand-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */

.intro {
  padding-block: clamp(56px, 8vw, 104px);
}

.intro__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.intro__title {
  margin: 0;
  max-width: 16ch;
  color: var(--athera-charcoal);
}

.intro__subtitle {
  margin: 18px 0 0;
  max-width: 40ch;
  color: var(--athera-charcoal-light);
}

.intro__rule {
  margin: 36px 0;
}

.intro__lede {
  margin: 0;
  max-width: 62ch;
}

/* Stat strip */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--athera-line);
}

.stat__value {
  font-family: var(--athera-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--athera-charcoal);
}

.stat__label {
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Workspace (two placeholder regions)
   -------------------------------------------------------------------------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: clamp(64px, 9vw, 120px);
  align-items: start;
}

.panel {
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 4px;
  padding: clamp(28px, 3vw, 40px);
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

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

.panel__title {
  margin: 0;
  color: var(--athera-charcoal);
}

.panel__rule {
  margin: 22px 0;
}

.panel__body {
  margin: 0;
  max-width: 54ch;
}

/* Elegant empty state for the placeholder regions */
.empty-zone {
  margin-top: 30px;
  border: 1px dashed var(--athera-line);
  border-radius: 4px;
  padding: clamp(40px, 6vw, 72px) 32px;
  text-align: center;
  background: var(--athera-off-white);
}

.empty-zone__title {
  margin: 0;
  color: var(--athera-charcoal-light);
}

.empty-zone__note {
  margin: 14px 0 0;
}

.ranked-panel {
  min-height: 420px;
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--athera-line);
  background: var(--athera-off-white);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 30px;
}

.signature {
  font-family: var(--athera-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--athera-charcoal);
  letter-spacing: -0.01em;
}

.signature__built {
  font-family: var(--athera-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--athera-grey);
  margin-right: 12px;
}

.signature__bang { color: var(--athera-blue); }

.signature__partners {
  font-family: var(--athera-sans);
  font-size: 0.5em;
  font-weight: 400;
  color: var(--athera-grey);
  letter-spacing: 0.08em;
  margin-left: 5px;
  vertical-align: super;
}

.site-footer__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--athera-grey-light);
}

/* --------------------------------------------------------------------------
   Buttons (brand system — ready for the project form in Prompt 2)
   -------------------------------------------------------------------------- */

.athera-button-primary {
  display: inline-block;
  padding: 12px 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;
}
.athera-button-primary:hover { background: var(--athera-blue-deep); }

.athera-button-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: var(--athera-charcoal);
  border: 1px solid var(--athera-line);
  border-radius: 2px;
  font-family: var(--athera-sans);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.athera-button-secondary:hover { background: var(--athera-off-white); }

.athera-button-primary:disabled,
.athera-button-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Project definition form
   -------------------------------------------------------------------------- */

/* Presets */
.presets {
  margin-top: 28px;
}

.presets__label {
  display: block;
  margin-bottom: 12px;
}

.presets__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-chip {
  text-align: left;
  padding: 11px 14px;
  background: var(--athera-off-white);
  border: 1px solid var(--athera-line);
  border-radius: 3px;
  font-family: var(--athera-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--athera-charcoal);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.preset-chip:hover {
  border-color: var(--athera-blue);
  background: var(--athera-white);
  color: var(--athera-blue-deep);
}

.preset-chip::before {
  content: "→";
  color: var(--athera-blue);
  margin-right: 10px;
  font-size: 12px;
}

/* Form layout */
.project-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.field__optional {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--athera-grey-light);
}

.field__control {
  width: 100%;
  padding: 11px 13px;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 3px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
}

select.field__control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}

.field__control:focus {
  outline: none;
  border-color: var(--athera-blue);
  box-shadow: 0 0 0 3px rgba(95, 184, 214, 0.16);
}

.field__control--area {
  resize: vertical;
  min-height: 72px;
  line-height: 1.55;
}

.field__control::placeholder {
  color: var(--athera-grey-light);
}

.project-form__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.project-form__hint {
  color: var(--athera-grey-light);
}

/* --------------------------------------------------------------------------
   Ranked results — progress / error states
   -------------------------------------------------------------------------- */

.ranking-progress {
  margin-top: 30px;
  border: 1px solid var(--athera-line);
  border-radius: 4px;
  padding: clamp(48px, 7vw, 88px) 32px;
  text-align: center;
  background: var(--athera-off-white);
}

.ranking-progress__spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 24px;
  border: 2px solid var(--athera-mist);
  border-top-color: var(--athera-blue);
  border-radius: 50%;
  animation: athera-spin 0.9s linear infinite;
}

.ranking-progress__title {
  margin: 0;
  color: var(--athera-charcoal);
}

.ranking-progress__note {
  margin: 12px 0 0;
}

.ranking-progress__bar {
  position: relative;
  margin: 28px auto 0;
  max-width: 340px;
  height: 3px;
  background: var(--athera-mist);
  border-radius: 3px;
  overflow: hidden;
}

/* Determinate fill — width is driven from JS as the run progresses. */
.ranking-progress__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--athera-blue-deep), var(--athera-blue));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* A soft travelling sheen over the fill keeps it feeling alive between updates. */
.ranking-progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: athera-sheen 1.6s ease-in-out infinite;
}

.ranking-progress__count {
  margin: 14px 0 0;
  color: var(--athera-grey);
  font-variant-numeric: tabular-nums;
}

@keyframes athera-spin { to { transform: rotate(360deg); } }

@keyframes athera-sheen {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.ranking-error {
  margin-top: 30px;
  border: 1px solid var(--athera-line);
  border-left: 2px solid var(--athera-amber);
  border-radius: 4px;
  padding: 32px;
  background: var(--athera-off-white);
}

.ranking-error__title { margin: 0; color: var(--athera-charcoal); font-weight: 500; }
.ranking-error__note  { margin: 10px 0 20px; color: var(--athera-grey); }

/* --------------------------------------------------------------------------
   Ranked results — summary strip
   -------------------------------------------------------------------------- */

.summary {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--athera-line);
}

.summary__primary {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
}

.summary__value {
  font-family: var(--athera-display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--athera-charcoal);
}

.summary__label { margin-top: 10px; }

.summary__tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tier-chip {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 3px;
  border: 1px solid var(--athera-line);
  background: var(--athera-white);
  cursor: pointer;
  font-family: var(--athera-sans);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tier-chip:hover { transform: translateY(-1px); }

.tier-chip.is-active {
  border-color: var(--athera-blue);
  box-shadow: 0 0 0 3px rgba(95, 184, 214, 0.14);
}

.tier-chip__count {
  font-size: 17px;
  font-weight: 500;
  color: var(--athera-charcoal);
}

.tier-chip__name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--athera-grey);
}

/* A dot of tier colour ahead of the count */
.tier-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  align-self: center;
}
.tier-chip--hot::before  { background: var(--athera-blue-deep); }
.tier-chip--warm::before { background: var(--athera-blue); }
.tier-chip--cool::before { background: var(--athera-grey-light); }
.tier-chip--cold::before { background: var(--athera-mist); }

.summary__context {
  margin-top: 18px;
  font-family: var(--athera-sans);
  font-size: 13px;
  color: var(--athera-grey);
}

.summary__context strong {
  color: var(--athera-charcoal);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Ranked results — controls
   -------------------------------------------------------------------------- */

.results-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.results-search {
  flex: 1 1 260px;
  padding: 10px 13px;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
  background: var(--athera-white);
  border: 1px solid var(--athera-line);
  border-radius: 3px;
}

.results-search:focus {
  outline: none;
  border-color: var(--athera-blue);
  box-shadow: 0 0 0 3px rgba(95, 184, 214, 0.16);
}

.results-filter {
  padding: 10px 36px 10px 13px;
  font-family: var(--athera-sans);
  font-size: 14px;
  color: var(--athera-charcoal);
  background: var(--athera-white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 13px center;
  border: 1px solid var(--athera-line);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
}

.results-filter:focus {
  outline: none;
  border-color: var(--athera-blue);
}

/* --------------------------------------------------------------------------
   Ranked results — table
   -------------------------------------------------------------------------- */

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--athera-line);
  border-radius: 4px;
}

.ranked-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ranked-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 13px 14px;
  background: var(--athera-off-white);
  border-bottom: 1px solid var(--athera-line);
  font-family: var(--athera-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--athera-grey);
  white-space: nowrap;
}

.ranked-table th.th-num { text-align: right; }

.ranked-table th.sortable { cursor: pointer; -webkit-user-select: none; user-select: none; }
.ranked-table th.sortable:hover { color: var(--athera-blue-deep); }

.ranked-table th.sortable[aria-sort="ascending"]::after  { content: " ↑"; color: var(--athera-blue-deep); }
.ranked-table th.sortable[aria-sort="descending"]::after { content: " ↓"; color: var(--athera-blue-deep); }

.ranked-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--athera-line-light);
  vertical-align: top;
  color: var(--athera-charcoal);
}

.ranked-table tbody tr:last-child td { border-bottom: 0; }
.ranked-table tbody tr:hover { background: var(--athera-off-white); }

.cell-rank {
  font-family: var(--athera-mono);
  font-size: 12px;
  color: var(--athera-grey);
  white-space: nowrap;
}

.cell-client__name {
  font-weight: 500;
  color: var(--athera-charcoal);
}

.cell-client__segment {
  margin-top: 3px;
  font-size: 11px;
  color: var(--athera-grey);
}

/* Propensity: number + thin bar */
.cell-propensity { min-width: 116px; }

.cell-propensity__num {
  font-family: var(--athera-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--athera-charcoal);
  text-align: right;
}

.cell-propensity__bar {
  margin-top: 6px;
  height: 3px;
  background: var(--athera-mist);
  border-radius: 2px;
  overflow: hidden;
}

.cell-propensity__fill {
  display: block;
  height: 100%;
  background: var(--athera-blue);
  border-radius: 2px;
}

/* Tier chip in-row */
.tier-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier-tag--hot  { background: var(--athera-blue-deep); color: var(--athera-white); }
.tier-tag--warm { background: var(--athera-blue-light); color: var(--athera-navy); }
.tier-tag--cool { background: var(--athera-surface); color: var(--athera-grey); }
.tier-tag--cold { background: transparent; color: var(--athera-grey-light); border: 1px solid var(--athera-line); }

.cell-owns__project { font-weight: 500; color: var(--athera-charcoal); }
.cell-owns__unit { margin-top: 3px; font-size: 11px; color: var(--athera-grey); }

.cell-pct { text-align: right; font-family: var(--athera-mono); font-size: 12px; white-space: nowrap; }

.cell-status { white-space: nowrap; }

.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.status-dot--fully { background: var(--athera-blue-deep); }
.status-dot--ontrack { background: var(--athera-blue); }
.status-dot--late { background: var(--athera-amber); }
.status-dot--default { background: #C0564B; }

.cell-reasons {
  max-width: 320px;
  color: var(--athera-charcoal-light);
  font-size: 12px;
  line-height: 1.5;
}

.cell-reasons__list { margin: 0; padding-left: 16px; }
.cell-reasons__list li { margin: 0 0 2px; }

.cell-flags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }

.flag-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(200, 86, 75, 0.1);
  color: #A8463C;
}

.cell-phone { font-family: var(--athera-mono); font-size: 12px; white-space: nowrap; color: var(--athera-charcoal-light); }

.ranked-table__empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--athera-grey);
}

/* Results footer */
.results-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.results-foot__count { color: var(--athera-grey-light); }

/* --------------------------------------------------------------------------
   Motion — calm, intentional only
   -------------------------------------------------------------------------- */

@keyframes athera-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rise {
  opacity: 0;
  animation: athera-rise 0.5s ease forwards;
}

.rise-1 { animation-delay: 0.04s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.20s; }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Accessible focus state */
:focus-visible {
  outline: 2px solid var(--athera-blue-deep);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Configuration banner — only shown when the scoring key is missing
   -------------------------------------------------------------------------- */

.config-banner {
  background: #FBF3EA;
  border-bottom: 1px solid rgba(200, 149, 90, 0.4);
}

.config-banner__inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
}

.config-banner__dot {
  flex: none;
  margin-top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--athera-amber);
  box-shadow: 0 0 0 4px rgba(200, 149, 90, 0.18);
}

.config-banner__text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--athera-charcoal);
}

.config-banner__text strong { font-weight: 500; }

.config-banner code {
  font-family: var(--athera-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(200, 149, 90, 0.14);
  color: #946432;
}

/* --------------------------------------------------------------------------
   "Why this ranking?" explainer
   -------------------------------------------------------------------------- */

.explainer {
  position: relative;
  margin-top: 22px;
  padding: 20px 44px 20px 22px;
  background: linear-gradient(180deg, rgba(95, 184, 214, 0.07), rgba(95, 184, 214, 0.02));
  border: 1px solid rgba(95, 184, 214, 0.28);
  border-left: 2px solid var(--athera-blue);
  border-radius: 4px;
}

.explainer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.explainer__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--athera-blue);
  color: var(--athera-navy);
  font-family: var(--athera-display);
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.explainer__body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--athera-charcoal-light);
  max-width: 88ch;
}

.explainer__body strong { color: var(--athera-charcoal); font-weight: 500; }
.explainer__body em { font-style: italic; color: var(--athera-blue-deep); }

.explainer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--athera-grey);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.explainer__close:hover { background: rgba(95, 184, 214, 0.16); color: var(--athera-charcoal); }

/* --------------------------------------------------------------------------
   Export button (sits in the results controls row)
   -------------------------------------------------------------------------- */

.results-export {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.results-export__icon {
  font-size: 13px;
  color: var(--athera-blue-deep);
}

.results-export:hover .results-export__icon { color: var(--athera-blue-deep); }

/* --------------------------------------------------------------------------
   Tabular figures + clickable rows (micro-polish)
   -------------------------------------------------------------------------- */

.cell-propensity__num,
.cell-pct,
.cell-rank,
.cell-phone,
.summary__value,
.tier-chip__count {
  font-variant-numeric: tabular-nums;
}

.ranked-row { cursor: pointer; transition: background 0.16s ease, box-shadow 0.16s ease; }

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

.ranked-row:focus-visible {
  outline: none;
  background: rgba(95, 184, 214, 0.08);
  box-shadow: inset 2px 0 0 var(--athera-blue-deep);
}

/* A faint chevron hint on hover so rows clearly read as openable. */
.ranked-row .cell-phone { position: relative; }
.ranked-row .cell-phone::after {
  content: "›";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  color: var(--athera-blue-deep);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.ranked-row:hover .cell-phone::after,
.ranked-row:focus-visible .cell-phone::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* --------------------------------------------------------------------------
   Client detail drawer
   -------------------------------------------------------------------------- */

body.drawer-open { overflow: hidden; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.drawer-overlay.is-open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  width: min(520px, 94vw);
  height: 100vh;
  background: var(--athera-white);
  border-left: 1px solid var(--athera-line);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.16);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}
.drawer.is-open { transform: translateX(0); }

.drawer__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--athera-line);
}

.drawer__head-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.drawer__rank {
  font-size: 13px;
  color: var(--athera-blue-deep);
  font-variant-numeric: tabular-nums;
}

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

.drawer__close {
  flex: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--athera-line);
  border-radius: 50%;
  background: var(--athera-white);
  color: var(--athera-grey);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.drawer__close:hover { border-color: var(--athera-blue); color: var(--athera-charcoal); background: var(--athera-off-white); }

.drawer__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 34px);
}

/* Score hero */
.drawer__hero {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 30px);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--athera-line);
}

.score-ring {
  position: relative;
  flex: none;
  width: 120px;
  height: 120px;
}

.score-ring__svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.score-ring__track {
  fill: none;
  stroke: var(--athera-mist);
  stroke-width: 8;
}

.score-ring__value {
  fill: none;
  stroke: var(--athera-blue);
  stroke-width: 8;
  stroke-linecap: round;
}
.score-ring__value[data-tier="hot"]  { stroke: var(--athera-blue-deep); }
.score-ring__value[data-tier="warm"] { stroke: var(--athera-blue); }
.score-ring__value[data-tier="cool"] { stroke: var(--athera-steel); }
.score-ring__value[data-tier="cold"] { stroke: var(--athera-grey-light); }

.score-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.score-ring__num {
  font-family: var(--athera-display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  color: var(--athera-charcoal);
  font-variant-numeric: tabular-nums;
}

.score-ring__unit {
  font-family: var(--athera-mono);
  font-size: 10px;
  color: var(--athera-grey-light);
}

.drawer__hero-text { min-width: 0; }

.drawer__name { margin: 0; color: var(--athera-charcoal); }

.drawer__segment {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--athera-grey);
}

.drawer__tier { vertical-align: middle; }

.drawer__hero-note {
  margin: 14px 0 0;
  color: var(--athera-grey);
}

/* Recommended approach */
.drawer__approach {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(95, 184, 214, 0.1), rgba(95, 184, 214, 0.03));
  border: 1px solid rgba(95, 184, 214, 0.3);
}

.drawer__approach-label { display: block; color: var(--athera-blue-deep); }

.drawer__approach-text {
  margin: 10px 0 0;
  font-family: var(--athera-display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--athera-charcoal);
}

/* Blocks */
.drawer__block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--athera-line);
}

.drawer__block-label { display: block; margin-bottom: 14px; }

.drawer__reasons {
  margin: 0;
  padding-left: 18px;
  color: var(--athera-charcoal-light);
  font-size: 14px;
  line-height: 1.6;
}
.drawer__reasons li { margin-bottom: 6px; }
.drawer__reasons li::marker { color: var(--athera-blue); }
.drawer__reasons-empty { color: var(--athera-grey-light); list-style: none; margin-left: -18px; }

.drawer__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

/* Facts grid */
.drawer__facts {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 1.2fr;
  gap: 0;
  margin: 0;
}

.drawer__facts dt {
  padding: 9px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--athera-grey);
  border-bottom: 1px solid var(--athera-line-light);
}

.drawer__facts dd {
  padding: 9px 0;
  margin: 0;
  font-size: 13.5px;
  color: var(--athera-charcoal);
  text-align: right;
  border-bottom: 1px solid var(--athera-line-light);
  font-variant-numeric: tabular-nums;
}

.drawer__facts dt.drawer__facts-section {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-bottom: 6px;
  font-family: var(--athera-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--athera-blue-deep);
  border-bottom: 1px solid var(--athera-blue-light);
}
.drawer__facts-section-sp { display: none; }

/* Footer actions */
.drawer__foot {
  flex: none;
  display: flex;
  gap: 12px;
  padding: 18px clamp(22px, 3vw, 34px);
  border-top: 1px solid var(--athera-line);
  background: var(--athera-off-white);
}

.drawer__call { flex: 1 1 auto; text-align: center; }
.drawer__email { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer-overlay,
  .score-ring__value,
  .ranking-progress__bar span { transition: none; }
  .ranking-progress__bar::after,
  .ranking-progress__spinner { animation: none; }
}

/* --------------------------------------------------------------------------
   Responsive — desktop big-screen is the priority; this keeps it usable below
   -------------------------------------------------------------------------- */

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .stats { gap: 28px; }
}
