/*
 * pitch.css: the short parts of a market study, wherever they appear: the pitch, one card per use with
 * its price, the SDG chips, the checklist, and the study panel on a project page.
 * Used by present.html (the client's page), report.html (the full study) and admin.html (the staff panel).
 * Colours and sizes come from tokens.css.
 */

/* A short line under a block's title. */
.block__lead {
  margin: calc(-1 * var(--space-1)) 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------ The pitch */

.pitch__headline {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.pitch__bullets { margin: var(--space-3) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pitch__bullets li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  text-wrap: pretty;
}
/* A small survey-flag diamond for each point. */
.pitch__bullets li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: calc(var(--space-2) + 0.45em);
  width: 0.42rem;
  height: 0.42rem;
  background: var(--flag);
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------ One card per use */

.use-cards { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.use-card {
  padding: var(--space-3) var(--space-4) var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  break-inside: avoid;
}
.use-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: var(--space-3); }
.use-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-base);
  line-height: 1.25;
}
/* The price is what a reader looks for first: large, dark, never wrapped. */
.use-card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.use-card__total { margin-top: 1px; font-size: var(--text-sm); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.use-card__summary { margin-top: var(--space-2); font-size: var(--text-sm); text-wrap: pretty; }
.use-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

/* Impact on people and nature: a dot beside the words (never the colour alone). */
.impact-dot { flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--impact-low); }
.impact-dot[data-state="high"] { background: var(--impact-high); }
.impact-dot[data-state="medium"] { background: var(--impact-medium); }

/* UN Sustainable Development Goals: "SDG 7 Affordable and clean energy". */
.sdg-chips { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.sdg-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  padding: 1px var(--space-2) 2px;
  border-radius: var(--radius-pill);
  background: var(--sdg-chip-bg);
  color: var(--sdg-chip-text);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.sdg-chip__number { font-weight: 700; white-space: nowrap; }

/* The notary and listings lines under the cards. */
.price-note { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-muted); }
.price-note + .price-note { margin-top: var(--space-1); }

/* ------------------------------------------------------------------ Checklist */

.checklist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.checklist li {
  position: relative;
  padding: var(--space-2) 0 var(--space-2) 1.6rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  text-wrap: pretty;
}
/* An empty tick box: these are things for the reader to do. */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: calc(var(--space-2) + 0.2em);
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--ink-muted);
  border-radius: var(--radius-small);
}

/* ------------------------------------------------------------------ The full study's links (present.html) */

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cta-row .control { flex: 1 1 9rem; }

/* ------------------------------------------------------------------ The staff panel (admin.html, a project) */

.report-panel .pitch__headline { font-size: var(--text-base); }
.report-panel__price { margin-top: var(--space-2); font-size: var(--text-sm); }
.report-panel__price strong { font-weight: 650; }
.report-panel__uses { margin: var(--space-2) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.report-panel__uses li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.report-panel__range { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-panel__public { margin-top: var(--space-3); }
.report-panel .control:disabled { opacity: 0.45; cursor: not-allowed; } /* "Generate" while Claude is writing */
.report-panel .group-actions { margin-top: var(--space-3); }
.report-panel .field textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--sheet-raised);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
  resize: vertical;
}
.report-panel .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
/* While Claude is writing: a slow pulse on the message, so it doesn't look stuck. */
.report-panel[data-state="running"] [data-report-message] { position: relative; padding-left: calc(var(--space-3) + 0.9rem); }
.report-panel[data-state="running"] [data-report-message]::before {
  content: "";
  position: absolute;
  left: var(--space-3);
  top: calc(var(--space-3) + 0.45em);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--flag);
  animation: report-pulse 1.6s var(--ease) infinite;
}
@keyframes report-pulse { 50% { opacity: 0.25; } }

/* The study's quality checklist on the staff panel (src/study-quality.js): a dot per item, green, flag pink or red. */
.report-quality { margin-top: var(--space-3); }
.report-quality[data-level="thin"] > summary { color: var(--warn); }
.report-quality__items { margin: var(--space-2) 0; padding: 0; list-style: none; }
.report-quality__item { position: relative; padding: var(--space-1) 0 var(--space-1) var(--space-4); font-size: var(--text-sm); }
.report-quality__item::before {
  content: ""; position: absolute; left: 2px; top: calc(var(--space-1) + 0.45em);
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
}
.report-quality__item[data-state="check"]::before { background: var(--flag); }
.report-quality__item[data-state="thin"]::before { background: var(--warn); }

/* The commune file in the study panel (src/commune-file.js): a head per commune, then its facts, each with its topic and link. */
.report-communes { margin-top: var(--space-3); }
.report-communes__heads, .report-communes__facts { margin: var(--space-2) 0; padding: 0; list-style: none; }
.report-communes__head { padding-bottom: var(--space-2); }
.report-communes__head p { margin: 0 0 var(--space-1); }
.report-communes__fact { padding: var(--space-1) 0; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.report-communes__topic { display: block; font-size: var(--text-xs); font-weight: 600; }
.report-communes__fact a { margin-left: var(--space-1); }

/* "Price estimates" on a project's page (src/project-pricing.js): a row per plot, its price, then a short note. */
.project-pricing__list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.project-pricing__row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-2); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line); border-radius: var(--radius-card); color: inherit; text-decoration: none;
}
.project-pricing__row:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; }
.project-pricing__name { font-weight: 600; }
.project-pricing__price { font-variant-numeric: tabular-nums; }
.project-pricing__note { grid-column: 1 / -1; color: var(--ink-muted); font-size: var(--text-sm); }
.project-pricing__row[data-state="running"] .project-pricing__note,
.project-pricing__row[data-state="waiting"] .project-pricing__note { color: var(--flag); }
.project-pricing__which { display: grid; gap: var(--space-1); margin: 0 0 var(--space-2); padding: 0; border: 0; }

/* "See it on the land": the use drawn in 3D in "What could stand here" (src/designs.js). */
.use-card__see { margin-top: var(--space-3); }

/* ------------------------------------------------------------------ "What could stand here": the uses and designs */

.build-choices { margin-bottom: var(--space-5); }
.build-choices__label { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--ink-muted); }
/* The uses as one grouped list: a row each, the one shown ringed in ink. */
.build-uses { display: grid; gap: var(--space-2); margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.build-use {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  color: var(--ink);
  cursor: pointer;
}
.build-use:hover { background: var(--fill-hover); }
.build-use[aria-pressed="true"] { background: var(--paper); border-color: var(--ink); }
.build-use__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); }
.build-use__title { font-family: var(--font-display); font-weight: 650; font-size: var(--text-base); line-height: 1.25; }
.build-use__badge {
  padding: 1px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--flag);
  color: var(--label-accent-text);
  font-size: var(--text-xs);
  font-weight: 650;
}
.build-use__badge:empty { display: none; }
.build-use__tag {
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-size: var(--text-xs);
}
.build-use__tag:empty { display: none; }
.build-mode { margin-bottom: var(--space-3); }
.build-use__price { font-size: var(--text-sm); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.build-use__price:empty { display: none; }
.build-designs { margin-bottom: var(--space-3); }
.build-design__about { margin: 0 0 var(--space-2); font-size: var(--text-sm); text-wrap: pretty; }
/* Each quality line opens where to check it (qualityTarget in src/study-quality.js): reads as the line, underlined. */
.report-quality__link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.report-quality__link:hover { color: var(--flag); }
