/**
 * Town Acquisition calculator — scoped styles.
 *
 * Deliberately a separate stylesheet rather than additions to
 * assets/css/site.css: that file is compiled Tailwind, and a class added to
 * markup after the build renders as nothing. Everything here is a plain
 * .pl-acq-* rule, enqueued only on /town-acquisition, so the global build is
 * untouched and nothing else on the site can be affected by it.
 *
 * Colours are the site's own tokens, written as literals because this file
 * sits outside the Tailwind theme.
 *   forest #173a2b · forest-dark #0f2a20 · pine #24583e · sage #708c72
 *   charcoal #252b29 · stone #666864 · cream #f4f0e6 · cream-deep #eae3d2
 *   lake #506c7c
 */

.pl-acq { --acq-forest:#173a2b; --acq-pine:#24583e; --acq-sage:#708c72;
  --acq-charcoal:#252b29; --acq-stone:#666864; --acq-cream:#f4f0e6;
  --acq-cream-deep:#eae3d2; --acq-lake:#506c7c; --acq-rust:#8a4b2a; }

/* ---------- controls ---------- */

.pl-acq-control { margin-top: 1.75rem; }

.pl-acq-label {
  display:block; font-size:.75rem; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--acq-stone); margin-bottom:.4rem;
}

.pl-acq-readout {
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 700; line-height:1.1; color:var(--acq-forest);
  font-variant-numeric: tabular-nums;
}

/* Large, touch-friendly track + thumb. 44px of vertical hit area meets the
   usual minimum target size without making the track itself look heavy. */
.pl-acq-slider {
  -webkit-appearance:none; appearance:none;
  width:100%; height:44px; margin:.5rem 0 0; padding:0;
  background:transparent; cursor:pointer; display:block;
}
.pl-acq-slider:focus { outline:none; }
.pl-acq-slider::-webkit-slider-runnable-track {
  height:10px; border-radius:999px;
  background:var(--acq-cream-deep); border:1px solid rgba(37,43,41,.14);
}
.pl-acq-slider::-moz-range-track {
  height:10px; border-radius:999px;
  background:var(--acq-cream-deep); border:1px solid rgba(37,43,41,.14);
}
.pl-acq-slider::-webkit-slider-thumb {
  -webkit-appearance:none; appearance:none;
  width:30px; height:30px; margin-top:-11px;
  border-radius:50%; background:var(--acq-pine);
  border:3px solid #fff; box-shadow:0 1px 4px rgba(15,26,20,.35);
}
.pl-acq-slider::-moz-range-thumb {
  width:30px; height:30px; border:3px solid #fff; border-radius:50%;
  background:var(--acq-pine); box-shadow:0 1px 4px rgba(15,26,20,.35);
}
.pl-acq-slider:focus-visible::-webkit-slider-thumb { outline:3px solid var(--acq-lake); outline-offset:2px; }
.pl-acq-slider:focus-visible::-moz-range-thumb { outline:3px solid var(--acq-lake); outline-offset:2px; }

.pl-acq-bounds {
  display:flex; justify-content:space-between;
  font-size:.75rem; color:var(--acq-stone); font-variant-numeric:tabular-nums;
}

.pl-acq-field {
  display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-top:.6rem;
}
.pl-acq-field label { font-size:.875rem; color:var(--acq-charcoal); }
.pl-acq-input {
  font-size:1rem; font-variant-numeric:tabular-nums;
  padding:.55rem .75rem; min-height:44px; min-width:9.5rem;
  border:1px solid rgba(37,43,41,.28); border-radius:.5rem;
  background:#fff; color:var(--acq-charcoal);
}
.pl-acq-input:focus-visible { outline:3px solid var(--acq-lake); outline-offset:1px; }

.pl-acq-presets { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.9rem; }
.pl-acq-preset {
  min-height:44px; padding:.5rem 1rem; border-radius:999px; cursor:pointer;
  border:1px solid var(--acq-pine); background:#fff; color:var(--acq-pine);
  font-size:.875rem; font-weight:700; line-height:1.2;
}
.pl-acq-preset:hover { background:var(--acq-cream-deep); }
.pl-acq-preset:focus-visible { outline:3px solid var(--acq-lake); outline-offset:2px; }
.pl-acq-preset span { display:block; font-weight:500; font-size:.7rem; color:var(--acq-stone); }

.pl-acq-modes { display:flex; flex-wrap:wrap; gap:1rem; margin-top:.5rem; }
.pl-acq-modes label { display:flex; align-items:center; gap:.5rem; font-size:.9rem; min-height:44px; cursor:pointer; }
/* A native radio renders around 13px. The label already gives a 44px click
   target, but the control itself should also be comfortably tappable. */
.pl-acq-modes input[type="radio"] { width:24px; height:24px; accent-color:#24583e; margin:0; flex:0 0 auto; }
.pl-acq-modes input[type="radio"]:focus-visible { outline:3px solid var(--acq-lake); outline-offset:2px; }

/* ---------- results ---------- */

.pl-acq-cards {
  display:grid; gap:1rem; margin-top:1.5rem;
  grid-template-columns:repeat(auto-fit, minmax(13.5rem, 1fr));
}
.pl-acq-card {
  border:1px solid rgba(37,43,41,.15); border-radius:.75rem;
  background:rgba(255,255,255,.7); padding:1.1rem;
}
.pl-acq-card--lead { border-left:4px solid var(--acq-forest); }
.pl-acq-card dt {
  font-size:.72rem; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--acq-stone);
}
.pl-acq-card dd {
  margin:.35rem 0 0;
  font-family: var(--font-serif, Georgia, "Times New Roman", serif);
  font-size:1.65rem; font-weight:700; color:var(--acq-forest);
  font-variant-numeric:tabular-nums; line-height:1.15;
}
.pl-acq-card p { margin:.3rem 0 0; font-size:.8rem; color:var(--acq-stone); }

/* The CPA line hides entirely when switched off, rather than printing a
   $0 that reads like a calculation failure. */
.pl-acq[data-cpa="false"] .pl-acq-cpa-line { display:none; }

.pl-acq-row--bench > * { background:rgba(234,227,210,.5); }
.pl-acq-bench {
  font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--acq-stone);
}
.pl-acq-modes input[type="checkbox"],
.pl-acq-field input[type="checkbox"] { width:24px; height:24px; accent-color:#24583e; margin:0 .15rem 0 0; }
.pl-acq-field label { display:flex; align-items:center; gap:.45rem; min-height:44px; cursor:pointer; }

/* The no-acquisition state: zeroes are correct but read as a bug, so say so. */
.pl-acq-zero { display:none; }
.pl-acq[data-zero="true"] .pl-acq-zero { display:block; }

/* ---------- comparison table ---------- */

.pl-acq-tablewrap { overflow-x:auto; margin-top:1rem; }
.pl-acq-table { width:100%; border-collapse:collapse; font-size:.9rem; min-width:34rem; }
.pl-acq-table caption { text-align:left; font-size:.8rem; color:var(--acq-stone); padding-bottom:.6rem; }
.pl-acq-table th, .pl-acq-table td {
  padding:.7rem .6rem; text-align:right; font-variant-numeric:tabular-nums;
  border-bottom:1px solid rgba(37,43,41,.12);
}
.pl-acq-table thead th {
  text-align:right; font-size:.72rem; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--acq-stone);
}
.pl-acq-th { text-align:left !important; font-weight:700; color:var(--acq-forest); }
.pl-acq-caption {
  display:block; font-weight:400; font-size:.72rem; color:var(--acq-stone);
  text-transform:none; letter-spacing:0;
}

/* ---------- chart ---------- */

.pl-acq-chartwrap { position:relative; height:300px; margin-top:1rem; }
.pl-acq-legend { display:flex; flex-wrap:wrap; gap:1.1rem; margin-top:.75rem; font-size:.8rem; color:var(--acq-charcoal); }
.pl-acq-key { display:inline-block; width:1.5rem; height:0; border-top-width:3px; border-top-style:solid; vertical-align:middle; margin-right:.4rem; }

/* ---------- advanced ---------- */

.pl-acq-details {
  margin-top:1.75rem; border:1px solid rgba(37,43,41,.15);
  border-radius:.75rem; background:rgba(255,255,255,.55);
}
.pl-acq-details > summary {
  cursor:pointer; padding:1rem 1.1rem; font-weight:700; color:var(--acq-forest);
  min-height:44px; list-style:revert;
}
.pl-acq-details > summary:focus-visible { outline:3px solid var(--acq-lake); outline-offset:-2px; }
.pl-acq-details-body { padding:0 1.1rem 1.2rem; }
.pl-acq-adv { display:grid; gap:1.25rem; grid-template-columns:repeat(auto-fit, minmax(14rem,1fr)); }

/* ---------- status chips ---------- */

.pl-acq-chip {
  display:inline-block; font-size:.68rem; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; padding:.18rem .5rem; border-radius:999px;
  border:1px solid currentColor; white-space:nowrap;
}
.pl-acq-chip--documented   { color:#1d5137; }
.pl-acq-chip--reported     { color:#7a5a16; }
.pl-acq-chip--hypothetical { color:#50607a; }
.pl-acq-chip--question     { color:#8a4b2a; }

@media (max-width: 640px) {
  .pl-acq-card dd { font-size:1.4rem; }
  .pl-acq-chartwrap { height:250px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-acq * { transition:none !important; animation:none !important; }
}

/* ---------- top-of-page CPA feature ---------- */

/* Deliberately the heaviest thing on the page: it is the one financial
   consequence a reader is most likely to miss. Built from the site's own
   forest/cream palette rather than an alarm red — the brief asks for
   prominence without sensationalism, and a civic record page loses more
   from looking like a warning poster than it gains from being loud. */
.pl-acq-alert {
  background:var(--acq-forest,#173a2b);
  border-bottom:4px solid var(--acq-sage,#708c72);
  color:#f4f0e6;
}
.pl-acq-alert-inner { max-width:1600px; margin:0 auto; padding:2.5rem 1.25rem 2.75rem; }
@media (min-width:640px){ .pl-acq-alert-inner{ padding-left:1.5rem; padding-right:1.5rem; } }
@media (min-width:1280px){ .pl-acq-alert-inner{ padding-left:4rem; padding-right:4rem; } }

.pl-acq-alert-eyebrow {
  display:flex; align-items:center; gap:.5rem;
  font-size:.75rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:#b9cdb4; margin:0 0 .9rem;
}
.pl-acq-alert-head {
  font-family:var(--font-serif, Georgia, serif);
  font-size:clamp(1.5rem, 4.2vw, 2.4rem); font-weight:700; line-height:1.18;
  color:#fff; margin:0; max-width:34ch; text-wrap:balance;
}
.pl-acq-alert-sub {
  margin:.9rem 0 0; max-width:62ch; font-size:1.0625rem; line-height:1.6; color:#e4ded0;
}

.pl-acq-alert-stats {
  display:grid; gap:1rem; margin:1.75rem 0 0;
  grid-template-columns:repeat(auto-fit, minmax(14rem,1fr));
}
.pl-acq-stat {
  border:1px solid rgba(244,240,230,.22); border-radius:.75rem;
  background:rgba(244,240,230,.06); padding:1rem 1.1rem;
}
.pl-acq-stat dt {
  font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#b9cdb4;
}
.pl-acq-stat dd {
  margin:.35rem 0 0; font-family:var(--font-serif, Georgia, serif);
  font-size:1.5rem; font-weight:700; color:#fff; font-variant-numeric:tabular-nums; line-height:1.15;
}
.pl-acq-stat p { margin:.4rem 0 0; font-size:.8rem; line-height:1.45; color:#d8d2c4; }

.pl-acq-alert-note {
  margin:1.75rem 0 0; max-width:70ch; font-size:.9375rem; line-height:1.65; color:#e4ded0;
  border-left:3px solid var(--acq-sage,#708c72); padding-left:1rem;
}
.pl-acq-alert-note strong { color:#fff; font-weight:700; }

.pl-acq-alert-links { display:flex; flex-wrap:wrap; gap:.6rem; margin:1.5rem 0 0; }
.pl-acq-alert-links a {
  display:inline-flex; align-items:center; min-height:44px; padding:.5rem 1.1rem;
  border-radius:999px; border:1px solid rgba(244,240,230,.45);
  font-size:.875rem; font-weight:700; color:#f4f0e6; text-decoration:none;
}
.pl-acq-alert-links a:hover { background:rgba(244,240,230,.12); }
.pl-acq-alert-links a:focus-visible { outline:3px solid #b9cdb4; outline-offset:2px; }

@media (max-width:480px){
  .pl-acq-alert-inner { padding-top:2rem; padding-bottom:2.25rem; }
  .pl-acq-stat dd { font-size:1.3rem; }
}

/* Reported attribution inside the top feature band. Set as a quotation
   because it reproduces a published sentence, with the citation carrying
   the distinction that it is the reporter's attribution rather than the
   official's own words. */
.pl-acq-alert-quote {
  margin:1.75rem 0 0; padding:1.1rem 1.25rem;
  border-left:4px solid #b9cdb4; border-radius:0 .5rem .5rem 0;
  background:rgba(244,240,230,.08);
}
.pl-acq-alert-quote p {
  margin:0; font-family:var(--font-serif, Georgia, serif);
  font-size:clamp(1.0625rem, 2.6vw, 1.3rem); line-height:1.4; color:#fff; font-weight:600;
}
.pl-acq-alert-quote cite {
  display:block; margin-top:.6rem; font-style:normal;
  font-size:.8125rem; line-height:1.5; color:#d8d2c4;
}
.pl-acq-alert-quote cite a { color:#f4f0e6; font-weight:700; }
.pl-acq-alert-quote cite a:focus-visible { outline:3px solid #b9cdb4; outline-offset:2px; }
