/* =====================================================================
   Live-site adjustments to the owner's design (mockup t12-data) — 2026-10-22, merge step 6.
   t12.css is generated from the mockup (scripts/build-t12-css.py); what the live app needs on top goes here:
   the app's sticky 65px header replaces the mockup's fixed nav, so first screens start under it.
   ===================================================================== */
.t12{font-family:var(--font,"Onest",system-ui,sans-serif);color:var(--ink);background:#fff;overflow-x:clip}
.t12 .pjh{min-height:max(560px,calc(100svh - 65px))}
.t12 .pjh.short{min-height:max(520px,calc(78svh - 65px))}
.t12 .sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* handwritten compare sections */
.t12 .prose.hw h3.h3s{margin:26px 0 10px}
.t12 .prose.hw .cmtw{margin:12px 0 18px}
.t12 section[id],.t12 [id].sec{scroll-margin-top:72px}
/* old live bodies set in the design (api/t12/transform.ts): text keeps a reading width, tables get the full width */
.t12 .prose.t12-old{max-width:none}
.t12 .t12-old>p,.t12 .t12-old>ul,.t12 .t12-old>.t12-lead{max-width:80ch}
.t12 .t12-old p{font-size:16px;line-height:1.65;color:var(--body);margin:0 0 14px}
.t12 .t12-old h3{margin:22px 0 8px;font:700 18px/1.3 var(--ff);color:var(--ink)}
.t12 .t12-old .blist{margin:6px 0 18px}
.t12 .sec__head h2 .h2s{display:block;font-size:clamp(30px,4.2vw,64px);line-height:1;letter-spacing:-.035em}
.t12 .t12-lead{position:relative;margin:4px 0 18px;padding:16px 18px 16px 22px;background:var(--bg2,#F8FAFC);border-radius:var(--r,6px);font-size:17px;line-height:1.6;color:var(--ink)}
.t12 .t12-lead::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:4px 0 0 4px;background:var(--sygrad)}
.t12 .t12-lead p{margin:0;font-size:inherit;color:inherit}
.t12 .t12-lead strong{color:var(--ac)}
/* plain data tables (the live tables) in the mockup's table language (.cmt) */
.t12 .sx-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:8px 0 14px;border-top:1px solid var(--ink)}
.t12 table.sx-list{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums lining-nums}
.t12 table.sx-list thead th{text-align:left;font:600 11px/1.3 var(--ff);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:12px 14px 10px 0;border-bottom:1px solid var(--line3,#CBD5E1);white-space:nowrap;vertical-align:bottom}
.t12 table.sx-list td,.t12 table.sx-list tbody th{padding:13px 14px 13px 0;border-bottom:1px solid var(--line);vertical-align:top;text-align:left;color:var(--body);font-weight:400}
.t12 table.sx-list tbody th{color:var(--ink);font-weight:600}
.t12 table.sx-list a{color:var(--ink);font-weight:600;text-decoration:underline;text-decoration-color:rgba(var(--acrgb),.45);text-underline-offset:3px}
.t12 table.sx-list a:hover{color:var(--ac)}
.t12 table.sx-list tbody tr:hover td,.t12 table.sx-list tbody tr:hover th{background:var(--bg2,#F8FAFC)}
/* project lines with a cover photo */
.t12 .blist li.pl{display:flex;align-items:center;gap:14px;padding-left:0}
.t12 .blist li.pl::before{display:none}
.t12 .blist li.pl .pl-th{flex:none;width:96px;height:64px;object-fit:cover;border-radius:6px;background:var(--bg3,#F1F5F9)}
.t12 .blist li.pl a{color:var(--ink);font-weight:700;text-decoration:none}
.t12 .blist li.pl a:hover{color:var(--ac)}
/* value map on area pages: the panel carries the page title and summary */
.t12 .t12-areamap .vm-panel h1{font-size:clamp(22px,2.2vw,28px)}
.t12 .t12-areamap .t12-intro{font-size:14px;line-height:1.55;color:var(--sub,#475569)}
.t12 .t12-areamap .t12-intro p{margin:0 0 8px;font-size:inherit}
.t12 .t12-areamap .t12-intro .t12-lead{font-size:14px;padding:10px 12px 10px 14px;margin:0 0 10px}
.t12 .t12-areabody{background:#fff}
.t12 .t12-adhead{padding:clamp(48px,7vw,96px) 0 0}
.t12 .t12-adhead .ad-lede{max-width:70ch;color:var(--body);font-size:17px;line-height:1.6}
.t12 .vm .lb-row a{color:inherit;text-decoration:none}
.t12 .vm .lb-row a:hover{color:var(--ac)}
/* station rank table: link to the station page */
.t12 .sx-pg{display:inline-block;margin-top:4px;font-size:12px;font-weight:600;color:var(--muted)}
.t12 .sd-static{padding:0}
.t12[lang="zh-Hans"] .nz{display:none}
/* project directory of the old app pages, in two columns */
.t12 .t12-dir .h3s{margin:28px 0 10px}
.t12 .t12-dir .blist{columns:2 360px;column-gap:40px;max-width:none}
.t12 .t12-dir .blist li{break-inside:avoid}
.t12[lang="zh-Hans"] .qmap small:empty, .t12[lang="zh-Hans"] .qmap a small{display:none}
/* project map (/map, components/InteractiveMap.tsx): MapLibre with the mockup's pins */
.t12pin{position:relative;display:block;width:16px;height:36px;padding:0;border:0;background:none;cursor:pointer}
.t12pin__beam{position:absolute;left:50%;bottom:0;width:1.5px;height:28px;margin-left:-.75px;background:linear-gradient(180deg,rgba(220,39,67,.55),rgba(220,39,67,0))}
.t12pin__dot{position:absolute;left:50%;top:2px;width:9px;height:9px;margin-left:-4.5px;border-radius:50%;background:#E8455E;box-shadow:0 0 0 1.5px #fff,0 1px 3px rgba(20,20,20,.25);transition:transform .2s cubic-bezier(.23,1,.32,1),background .2s}
.t12pin:hover .t12pin__dot,.t12pin:focus-visible .t12pin__dot,.t12pin.on .t12pin__dot{background:#DC2743;transform:scale(1.45)}
.t12pin__tag{position:absolute;left:50%;bottom:calc(100% + 4px);transform:translateX(-50%) translateY(4px);display:flex;flex-direction:column;gap:2px;padding:6px 10px;border-radius:6px;background:#fff;box-shadow:0 0 0 1px #E2E8F0,0 8px 22px rgba(15,23,42,.14);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s cubic-bezier(.23,1,.32,1);text-align:left}
.t12pin__tag b{font:700 12.5px/1.2 "Onest",system-ui,sans-serif;color:#0F172A}
.t12pin__tag i{font:500 11.5px/1.2 "Onest",system-ui,sans-serif;font-style:normal;color:#64748B}
.t12pin:hover .t12pin__tag,.t12pin:focus-visible .t12pin__tag,.t12pin.on .t12pin__tag{opacity:1;transform:translateX(-50%) translateY(0)}
.t12pin.on{z-index:5}
#map-sidebar-control{background:#fff!important}
#map-sidebar-control h2{font:800 18px/1.2 "Onest",system-ui,sans-serif!important;text-transform:none!important;letter-spacing:-.01em!important;color:#0F172A!important}
#map-sidebar-control [id^="sidebar-project-card-"]{border-radius:8px!important;box-shadow:none!important;border:1px solid #E2E8F0!important}
#map-sidebar-control [id^="sidebar-project-card-"]:hover{border-color:#0F172A!important;transform:none!important}
#map-canvas-container .maplibregl-ctrl-attrib{font:400 11px "Onest",system-ui,sans-serif}
/* /compare: the live compare tool inside the design */
.t12 .t12-cmptool #comparison-deck-main{max-width:none;padding:0;margin:0}
.t12 .t12-cmptool #comparison-deck-main > div:first-child{justify-content:flex-end;margin-bottom:12px}
.t12 .t12-cmptool #comparison-deck-main > div:first-child > div:first-child{display:none}
.t12 .t12-cmptool table{border-top:1px solid var(--ink);font-variant-numeric:tabular-nums}
.t12 .t12-cmptool table th,.t12 .t12-cmptool table td{border-color:var(--line)!important}
.t12 .t12-cmptool #empty-comparison-placeholder{border-radius:6px;border-style:solid;background:var(--bg2,#F8FAFC)}
.t12 .t12-cmptool select{min-height:46px;border:1px solid var(--line3,#CBD5E1);border-radius:6px;font-family:inherit}
.t12 #short .sec__head h2{font-size:clamp(24px,3vw,40px);line-height:1.1}

/* ===== 2026-10-22 review fixes (hand-written; t12.css stays as generated) ===== */
/* C1: compare tables on phones. Two projects: both columns fit at 390px beside a narrow fact column. Three or more:
   the table scrolls sideways with the fact column held on the left and the edge shadow as the hint. */
@media (max-width:560px){
  .t12 .cmt{font-size:14px}
  .t12 .cmt th,.t12 .cmt td{padding:12px 10px 12px 0;overflow-wrap:anywhere}
  .t12 .cmt thead th{font-size:16px}
  .t12 .cmt tbody th{font-size:10.5px;letter-spacing:.08em}
  .t12 .cmt:not(:has(thead th:nth-child(4))){min-width:0}
  .t12 .cmt:not(:has(thead th:nth-child(4))) thead th:first-child{width:30%}
  .t12 .cmtw:has(thead th:nth-child(4)){background:linear-gradient(90deg,#fff 30%,rgba(255,255,255,0)) left/40px 100% no-repeat local,linear-gradient(270deg,#fff 30%,rgba(255,255,255,0)) right/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgba(15,23,42,.18),transparent) left/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgba(15,23,42,.18),transparent) right/14px 100% no-repeat scroll}
  .t12 .cmt:has(thead th:nth-child(4)) thead th:first-child,.t12 .cmt:has(thead th:nth-child(4)) tbody th{position:sticky;left:0;z-index:1;background:#fff;box-shadow:1px 0 0 var(--line)}
}
/* C2: compare heroes on phones: a darker wash over the photo behind the breadcrumb and title (photo only) */
@media (max-width:767px){
  .t12 .pjh:has(h1 .vs):not(.plain)::after{background:linear-gradient(180deg,rgba(12,12,12,.78) 0,rgba(12,12,12,.62) 26%,rgba(12,12,12,.7) 46%,rgba(12,12,12,.92) 78%)}
}
/* A2: project tables (area, station and list pages) on phones: headers kept, the project column held on the left,
   figures on one line, and the table scrolls sideways with an edge shadow as the hint */
@media (max-width:560px){
  .t12 .sx-wrap{background:linear-gradient(90deg,#fff 30%,rgba(255,255,255,0)) left/40px 100% no-repeat local,linear-gradient(270deg,#fff 30%,rgba(255,255,255,0)) right/40px 100% no-repeat local,radial-gradient(farthest-side at 0 50%,rgba(15,23,42,.18),transparent) left/14px 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,rgba(15,23,42,.18),transparent) right/14px 100% no-repeat scroll}
  .t12 table.sx-list{min-width:620px}
  .t12 table.sx-list thead th:first-child,.t12 table.sx-list tbody tr > :first-child{position:sticky;left:0;z-index:1;width:132px;min-width:132px;max-width:132px;background:#fff;box-shadow:1px 0 0 var(--line);padding-left:0}
  .t12 table.sx-list tbody tr > :first-child{padding-right:12px}
  .t12 table.sx-list td{white-space:nowrap}
  .t12 table.sx-list td:nth-child(2){white-space:normal;min-width:120px}
  .t12 table.sx-list tbody tr > :first-child{white-space:normal;overflow-wrap:anywhere}
}
/* A3 + V1: phones and small tablets: the map is never covered. The panel (title, legend, area figures, the "Compare areas"
   leaderboard) sits under the map in the page instead of a bottom sheet over it; the title shows again on area pages. */
@media (max-width:899px){
  .t12.t12 .vm.full{height:auto;min-height:0}
  .t12.t12 .vm.full .vm-map{position:relative;inset:auto;height:62vh;height:62svh;min-height:340px;max-height:620px}
  .t12.t12 .vm.full .vm-panel{position:static;height:auto;overflow:visible;border-radius:0;box-shadow:none;border-top:1px solid var(--ln);padding:18px 16px 28px}
  .t12.t12 .vm.full.sheet-max .vm-panel{height:auto}
  .t12.t12 .vm.full .vm-grab{display:none}
  .t12.t12 .vm.full.has-sel .vm-lede,.t12.t12 .vm.full.has-sel .vm-legend{display:block}
  .t12.t12 .vm.full.has-sel .vm-panel h1{display:block}
  .t12.t12 .vm.full .vm-crumb{display:flex;flex-wrap:wrap}
}
/* V2: colour-scale legend: each label sits under its own segment, 12px, #475569, and wraps inside its segment instead of
   running into the next one ("850–1,4991,500+") */
.t12.t12 .vm-ramp span{font-size:12px;line-height:1.3;color:#475569;white-space:normal;overflow-wrap:anywhere;text-align:center}
/* V4: the area directory flows through balanced columns; each state heading stays with its first areas */
.t12 .t12-dirbal .xlinks{display:block;columns:3 220px;column-gap:clamp(24px,3vw,40px)}
.t12 .t12-dirbal .xlinks>div{display:contents}
.t12 .t12-dirbal .xlinks ul{display:block;margin:0 0 14px}
.t12 .t12-dirbal .xlinks h3{break-after:avoid;break-inside:avoid}
.t12 .t12-dirbal .xlinks li{display:block;break-inside:avoid}
/* K1: calculators on phones: the four rate tiles sit in a compact 2 x 2 so "Start from a project's price" shows on the first screen */
@media (max-width:767px){
  .t12 .pjh:has(#pick) .facts{grid-template-columns:1fr 1fr;gap:0;margin-top:14px}
  .t12 .pjh:has(#pick) .facts>div{padding:8px 10px 8px 0;border-top:1px solid rgba(255,255,255,.18)}
  .t12:not(#_) .pjh:has(#pick) .facts dt{font-size:10.5px}
  .t12:not(#_) .pjh:has(#pick) .facts dd{font-size:15px;line-height:1.25;margin-top:2px}
  .t12 .pjh:has(#pick) .pjh__act{margin-top:16px}
  .t12 .pjh:has(#pick) .pjh__tx{padding-top:28px}
}
/* K2: "Stamp duty" beside the project picker is a secondary pill, as tall as the picker and aligned to it */
.t12 .pjh__act:has(#pick){align-items:flex-end}
.t12 .pjh__act .pick+.lnk{min-height:48px;padding:0 18px;border:1px solid rgba(255,255,255,.45);border-radius:999px;color:#fff;font-weight:600;text-decoration:none}
.t12 .pjh__act .pick+.lnk:hover{background:rgba(255,255,255,.1);border-color:#fff;color:#fff}
/* K3: instalment card: the hints sit as muted helper text under their inputs, so the inputs line up */
.t12 .cgrid{align-items:start}
.t12 .cgrid label small.hint{margin-top:-1px}
.t12 .pjh__act .pick+.lnk::after,.t12 .pjh__act .pick+.lnk::before{display:none}

/* ---------------------------------------------------------------------
   2026-10-25 — fixes from the Gemini review, checked against the live pages
   --------------------------------------------------------------------- */
/* Developer page: each registered company name as its own tag */
.t12 .dv-ents{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:6px 0 0;padding:0}
.t12 .dv-ents li{padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:var(--bg2,#F8FAFC);font-size:13px;line-height:1.35;color:var(--ink)}

/* Open-data preview table on phones: say it scrolls sideways, and shade the edge that has more */
@media (max-width:760px){
  .t12 .odprev{position:relative;background:
    linear-gradient(90deg,#fff 30%,rgba(255,255,255,0)) left/36px 100% no-repeat local,
    linear-gradient(270deg,#fff 30%,rgba(255,255,255,0)) right/36px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%,rgba(15,23,42,.22),transparent) left/14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%,rgba(15,23,42,.22),transparent) right/14px 100% no-repeat scroll}
  .t12 .odprev table, .t12 .odprev tr, .t12 .odprev td, .t12 .odprev th{background:transparent}
  .t12 .odprev::before{content:"Swipe sideways for all columns \2192";position:sticky;left:0;display:block;padding:10px 0 6px;font-size:12.5px;font-weight:600;color:var(--muted)}
  html[lang^="zh"] .t12 .odprev::before{content:"左右滑动看全部栏位 \2192"}
}

/* Station map: four figures as a 2 × 2 grid on phones (was 3 + 1) */
@media (max-width:560px){
  body .t12 dl.sm-facts{display:grid;grid-template-columns:1fr 1fr;gap:14px 0}
  body .t12 dl.sm-facts > div{margin-right:0;padding-right:12px;border-right:0}
  body .t12 dl.sm-facts > div:nth-child(odd){border-right:1px solid var(--line);margin-right:14px}
}

/* Guides index: card title on its own line, the description under it */
.t12 .t12-cards a > span > small{display:block;margin-top:6px}

/* 2026-10-26 brochure request page (replaces open data) */
.t12 .bro{display:grid;gap:16px;max-width:560px;margin:8px 0 0}
.t12 .bro__f{display:grid;gap:6px}
.t12 .bro__f span{font-size:13px;font-weight:600;color:var(--muted)}
.t12 .bro__f select,.t12 .bro__f input{min-height:48px;padding:0 14px;border:1px solid var(--line3,#CBD5E1);border-radius:10px;background:#fff;font:500 16px/1.2 var(--ff);color:var(--ink);width:100%;box-sizing:border-box}
.t12 .bro__f select:focus,.t12 .bro__f input:focus{outline:2px solid var(--ac,#DC2743);outline-offset:1px;border-color:transparent}
.t12 .bro__err{margin:0;color:#B91C1C;font-size:14px;font-weight:600}
.t12 .bro__go{justify-self:start;border:0;cursor:pointer;font:700 16px var(--ff)}
.t12 .bro__note{margin:0;font-size:13.5px;color:var(--muted);max-width:52ch}
@media (max-width:560px){.t12 .bro__go{justify-self:stretch;justify-content:center}}
