/* PlanWatch "Site Plan" interactive property calculators (/build-costs, /build-costs/region/london,
   /residual-land-value-calculator). Uses only tokens from /site/css/tokens.css. Max font-weight: 600. */

.page-property-tools {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.pt-hero {
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: clamp(96px, 11vw, 132px) 0 clamp(40px, 5vw, 60px);
}

.pt-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: var(--s-4);
}
.pt-crumbs a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.pt-crumbs a:hover { color: var(--ink); text-decoration-color: var(--amber); }

.pt-hero-inner {
  display: grid;
  gap: var(--s-4);
  max-width: 920px;
}

.pt-h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  font-weight: var(--w-h1);
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.pt-h1 em {
  font-style: normal;
  font-weight: var(--w-h1);
  background: linear-gradient(transparent 60%, var(--amber-field) 60%, var(--amber-field) 92%, transparent 92%);
  padding: 0 0.05em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.pt-lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 64ch;
}

.pt-trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--sheet);
  border: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-2);
}
.pt-trust-strip strong {
  font-weight: 600;
  color: var(--ink);
}
.pt-trust-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- Calculator Workbench ---------- */
.pt-calc-section {
  padding: clamp(32px, 4vw, 56px) 0 clamp(44px, 5vw, 72px);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.pt-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.pt-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.5vw, 30px);
  box-shadow: var(--sh-1);
}

.pt-card--result {
  position: sticky;
  top: 88px;
  background: var(--paper-2);
  box-shadow: var(--sh-2);
}

.pt-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 14px;
  padding-bottom: var(--s-4);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.pt-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pt-card-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

.pt-form-stack {
  display: grid;
  gap: var(--s-4);
}
.pt-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.pt-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}

.pt-field {
  display: grid;
  gap: 6px;
}
.pt-field label,
.pt-field .pt-field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.pt-field-hint {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

.pt-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pt-input-prefix,
.pt-input-suffix {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-3);
  pointer-events: none;
}
.pt-input-prefix { left: 13px; }
.pt-input-suffix { right: 13px; }
.pt-input-wrap .input.has-prefix { padding-left: 28px; }
.pt-input-wrap .input.has-suffix { padding-right: 42px; }
.pt-input-wrap .input.has-suffix-wide { padding-right: 68px; }

/* Segmented toggle buttons */
.pt-seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.pt-seg-btn {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  transition: background-color var(--dur-instant) var(--ease-out), color var(--dur-instant) var(--ease-out);
}
.pt-seg-btn:hover { color: var(--ink); }
.pt-seg-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

/* Quick preset pills */
.pt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pt-pill {
  padding: 7px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--rule-2);
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color var(--dur-instant), background-color var(--dur-instant), color var(--dur-instant);
}
.pt-pill:hover {
  border-color: var(--amber-deep);
  background: var(--amber-wash);
  color: var(--ink);
}
.pt-pill[aria-pressed="true"] {
  border-color: var(--amber-deep);
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-weight: 600;
}

.pt-source-note {
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--amber-wash);
  border: 1px solid var(--amber-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.pt-source-note strong { font-weight: 600; color: var(--amber-ink); }

.pt-divider {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s-2) 0;
}

/* ---------- Live Output Panel ---------- */
.pt-headline-box {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: var(--s-4);
}
.pt-headline-box--viable {
  border-color: var(--amber);
  box-shadow: inset 4px 0 0 var(--amber);
}
.pt-headline-box--unviable {
  border-color: var(--rule-2);
  box-shadow: inset 4px 0 0 var(--ink-3);
}

.pt-headline-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.pt-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
}
.pt-status-badge--ok {
  background: var(--green-wash);
  color: var(--green-ink);
}
.pt-status-badge--warn {
  background: var(--amber-soft);
  color: var(--amber-ink);
}
.pt-status-badge--neutral {
  background: var(--paper-3);
  color: var(--ink-2);
}

.pt-big-num {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: var(--w-num);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pt-headline-sub {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.pt-headline-sub strong { font-weight: 600; color: var(--ink); }

/* Visual cost stack bar */
.pt-stack-wrap {
  margin-bottom: var(--s-4);
}
.pt-stack-bar {
  display: flex;
  height: 12px;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--rule);
}
.pt-stack-seg { height: 100%; transition: width var(--dur-quick) var(--ease-out); }
.pt-stack-seg--build { background: var(--ink); }
.pt-stack-seg--fees { background: var(--amber); }
.pt-stack-seg--levies { background: var(--blue); }
.pt-stack-seg--land { background: var(--green); }
.pt-stack-seg--other { background: var(--ink-3); }

.pt-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
}
.pt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pt-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Breakdown ledger table */
.pt-ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.pt-ledger tr {
  border-bottom: 1px solid var(--rule);
}
.pt-ledger tr:last-child { border-bottom: 0; }
.pt-ledger th {
  text-align: left;
  font-weight: 400;
  color: var(--ink-2);
  padding: 9px 8px 9px 0;
}
.pt-ledger td {
  text-align: right;
  font-weight: 500;
  color: var(--ink);
  padding: 9px 0 9px 8px;
  white-space: nowrap;
}
.pt-ledger tr.pt-ledger-sub th,
.pt-ledger tr.pt-ledger-sub td {
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--rule-2);
  padding-top: 11px;
}
.pt-ledger tr.pt-ledger-total th,
.pt-ledger tr.pt-ledger-total td {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}

.pt-result-actions {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pt-copy-status {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--green-ink);
  min-height: 18px;
}
.pt-result-disclaimer {
  margin-top: var(--s-3);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ---------- Sensitivity Matrix ---------- */
.pt-matrix-section {
  padding: clamp(32px, 4vw, 52px) 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.pt-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--sheet);
}
.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.pt-table th,
.pt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.pt-table thead th {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pt-table tbody tr:last-child th,
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table td.num,
.pt-table th.num { text-align: right; white-space: nowrap; }

.pt-cell-base {
  background: var(--amber-wash);
  font-weight: 600;
}
.pt-cell-viable {
  color: var(--green-ink);
  font-weight: 600;
}
.pt-cell-unviable {
  color: var(--ink-3);
  font-weight: 500;
}
.pt-cell-meta {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ---------- Single-Source Regional Benchmark Cards ---------- */
.pt-benchmarks-section {
  padding: clamp(44px, 5.5vw, 76px) 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.pt-section-head {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.pt-section-h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  font-weight: var(--w-h2);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.pt-study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.pt-study-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.pt-study-card--stale {
  border-color: var(--amber);
}
.pt-study-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pt-study-area {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pt-study-cite {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.pt-study-cite a {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pt-study-rows {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.pt-study-rows th,
.pt-study-rows td {
  padding: 8px 6px;
  border-top: 1px solid var(--rule-soft);
  text-align: left;
}
.pt-study-rows th { font-weight: 500; color: var(--ink-2); }
.pt-study-rows td { text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pt-study-rows .pt-rebased-col { font-weight: 500; color: var(--ink-3); font-size: 12.5px; }
.pt-study-foot {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}

/* ---------- Editorial Guide & FAQs (.ar-flow.tree-content) ---------- */
.pt-editorial-section {
  padding: clamp(48px, 6vw, 84px) 0;
  background: var(--paper);
}
.pt-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.pt-article {
  display: grid;
  gap: 20px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}
.pt-article h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.12;
  font-weight: var(--w-h2);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-top: 22px;
}
.pt-article h2:first-child { margin-top: 0; }
.pt-article h3 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  font-weight: var(--w-h3);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 10px;
}
.pt-article strong { font-weight: 600; color: var(--ink); }
.pt-article a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.pt-article a:hover { color: var(--amber-ink); }
.pt-article ul,
.pt-article ol {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  list-style: disc;
}
.pt-article ol { list-style: decimal; }

.pt-callout {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--amber);
  display: grid;
  gap: 8px;
  font-size: 15.5px;
  line-height: 1.6;
}
.pt-callout-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 15.5px;
}

.pt-formula-box {
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  overflow-x: auto;
}

/* Sidebar */
.pt-sidebar {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 88px;
}
.pt-side-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 20px;
  display: grid;
  gap: 12px;
}
.pt-side-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.pt-side-links {
  display: grid;
  gap: 8px;
  font-size: 14.5px;
}
.pt-side-links a {
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.pt-side-links a:last-child { border-bottom: 0; }
.pt-side-links a:hover { color: var(--ink); }

/* FAQs */
.pt-faq-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.pt-faq {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 0;
  overflow: hidden;
}
.pt-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.pt-faq summary::-webkit-details-marker { display: none; }
.pt-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--amber-ink);
  flex-shrink: 0;
}
.pt-faq[open] summary::after { content: "−"; }
.pt-faq-body {
  padding: 0 18px 16px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  border-top: 1px solid var(--rule-soft);
  padding-top: 12px;
}

/* Attribution & Sources */
.pt-sources-box {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  display: grid;
  gap: 10px;
}
.pt-sources-box h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.pt-sources-box ul {
  padding-left: 18px;
  gap: 6px;
}

/* Closing amber CTA band */
.pt-close-band {
  padding: clamp(44px, 5vw, 68px) 0;
  border-top: 1px solid var(--rule);
}
.pt-close-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.pt-close-copy {
  max-width: 620px;
  display: grid;
  gap: 8px;
}

/* Responsive */
@media (max-width: 980px) {
  .pt-calc-grid,
  .pt-study-grid,
  .pt-editorial-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pt-card--result,
  .pt-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .pt-row-2,
  .pt-row-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
