/* Section types some trade pages use. Shapes only; colors come from the look. */

/* Drawing with numbered pins; the list beside it uses the same numbers. */
/* Stacked: the pins need the whole drawing, so it keeps its shape. */
.t-plate {
  --photo-ratio-phone: 4 / 5;
  margin: 0;
}

.t-plate img {
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / 45%);
}

.t-pin,
.t-signs li::before {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: var(--t-14);
  font-weight: 700;
  line-height: 1;
}

.t-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 16px -6px rgb(0 0 0 / 55%);
}

.t-signs {
  display: grid;
  padding: 0;
  list-style: none;
  counter-reset: sign;
}

.t-signs li {
  counter-increment: sign;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: var(--s-16);
  padding: var(--s-24) 0;
  border-top: 1px solid var(--border);
}

.t-signs li::before {
  content: counter(sign);
  grid-row: span 2;
}

.t-signs h3 {
  font-size: var(--t-20);
}

.t-signs p {
  color: var(--fg-muted);
}

.t-after-list {
  margin-top: var(--s-32);
}

.t-after-list > * + * {
  margin-top: var(--s-16);
}

/* Wide before-and-after with the heading above it. */
.t-wide-ba .ba {
  aspect-ratio: 16 / 9;
}

@media (max-width: 720px) {
  .t-wide-ba .ba {
    aspect-ratio: 4 / 3;
  }
}

/* Four columns, one per season. */
.t-seasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-32);
}

.t-seasons > div {
  padding-top: var(--s-24);
  border-top: 1px solid var(--ink-border);
}

.t-seasons h3 {
  margin-bottom: var(--s-16);
  font-family: var(--font-display);
  font-size: var(--t-36);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking);
  color: var(--ink-fg);
}

.t-seasons ul {
  display: grid;
  gap: var(--s-8);
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
}

@media (max-width: 960px) {
  .t-seasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-32) var(--s-24);
  }
}

/* Tick-box choices in a form, shown as toggles. */
.t-checks {
  margin: 0;
  padding: 0;
  border: 0;
}

.t-checks legend {
  margin-bottom: var(--s-8);
  padding: 0;
  font-size: var(--t-14);
  font-weight: 600;
}

.t-checks > div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}

.t-checks label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  min-height: 44px;
  padding: var(--s-8) var(--s-16);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: var(--t-14);
  cursor: pointer;
}

.t-checks input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--fg);
}

.t-checks label:has(input:checked) {
  border-color: var(--fg);
  background: var(--surface-2);
}

/* Problem cards: each one is a link that pre-fills the booking form. */
.t-problems {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-16);
  padding: 0;
  list-style: none;
}

.t-problems a {
  display: grid;
  align-content: start;
  gap: var(--s-8);
  height: 100%;
  padding: var(--s-24);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  transition:
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.t-problems a:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}

.t-problems svg {
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-8);
}

.t-problems h3 {
  font-size: var(--t-20);
}

.t-problems p {
  color: var(--fg-muted);
}

.t-problems .t-go {
  margin-top: var(--s-8);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.t-alert {
  margin-top: var(--s-32);
  padding: var(--s-16) var(--s-24);
  border-left: 4px solid var(--danger);
  border-radius: var(--r-card);
  background: var(--surface);
}

@media (max-width: 900px) {
  .t-problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* One column: icon beside the text keeps six cards to a short scroll. */
@media (max-width: 560px) {
  .t-problems {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-12);
  }

  .t-problems a {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: var(--s-16);
    padding: var(--s-16);
  }

  .t-problems svg {
    grid-row: span 3;
    margin-bottom: 0;
  }
}

/* Price list beside a plan card, on the dark band. */
.t-price-split {
  --cols: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.t-prices {
  padding: 0;
  list-style: none;
}

.t-prices li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--s-24);
  padding: var(--s-16) 0;
  border-top: 1px solid var(--ink-border);
}

.t-prices b {
  font-family: var(--font-display);
  font-size: var(--t-20);
  font-weight: var(--weight-display);
  color: var(--ink-fg);
}

.t-prices small {
  grid-column: 1 / -1;
  font-size: var(--t-14);
  color: var(--ink-muted);
}

.t-plan {
  overflow: hidden;
  border: 1px solid var(--ink-border);
  border-radius: var(--r-panel);
  background: var(--ink-2);
}

.t-plan img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.t-plan-body {
  display: grid;
  gap: var(--s-16);
  padding: var(--s-32);
}

.t-plan-price {
  font-family: var(--font-display);
  font-size: var(--t-48);
  font-weight: var(--weight-display);
  line-height: 1;
  letter-spacing: var(--tracking);
  color: var(--ink-fg);
}

.t-plan-price small {
  font-family: var(--font-body);
  font-size: var(--t-16);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-muted);
}

.t-plan .list li {
  color: var(--ink-fg);
}

.t-plan .btn {
  justify-self: start;
}

/* Three steps with a line drawing above each. */
.t-seq-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.t-step-art {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: var(--s-24);
  fill: none;
  stroke: var(--detail);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* One column: drawing beside the text keeps all three steps near one screen. */
@media (max-width: 720px) {
  .t-seq-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-24);
  }

  .t-seq-3 li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    column-gap: var(--s-16);
    align-content: start;
  }

  .t-seq-3 li::before {
    grid-column: 2;
    margin-bottom: var(--s-8);
    font-size: var(--t-24);
  }

  .t-seq-3 :is(h3, p) {
    grid-column: 2;
  }

  .t-step-art {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }
}

.t-leak-call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-24);
  margin-top: var(--s-48);
  padding: var(--s-24) var(--s-32);
  border: 1px solid var(--ink-border);
  border-radius: var(--r-panel);
  background: var(--ink-2);
}

.t-leak-call p {
  max-width: 34rem;
  font-size: var(--t-18);
  color: var(--ink-fg);
}

.t-rows .t-from {
  margin-top: var(--s-4);
  font-weight: 700;
  color: var(--fg);
}

/* Short promises under a picture; not a sequence, so no numbers. */
.t-promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-24);
  margin-top: var(--s-48);
  padding: 0;
  list-style: none;
}

/* biome-ignore lint/style/noDescendingSpecificity: promises never sit inside a plan card. */
.t-promises li {
  padding-top: var(--s-16);
  border-top: 2px solid var(--fg);
}

.t-promises h3 {
  margin-bottom: var(--s-4);
  font-size: var(--t-18);
}

.t-promises p {
  color: var(--fg-muted);
}

@media (max-width: 900px) {
  .t-promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Price picker: style cards on the left, length, gates and the live ballpark on the right. */
.t-est {
  --cols: minmax(0, 1.45fr) minmax(0, 1fr);
  --split-gap: clamp(var(--s-24), 4vw, var(--s-48));
}

.t-styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-12);
  margin: 0;
  padding: 0;
  border: 0;
}

.t-style {
  position: relative;
  display: grid;
  align-content: start;
  gap: var(--s-4);
  padding: var(--s-16);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}

.t-style:hover {
  border-color: var(--fg-muted);
}

:is(.t-style, .t-seg, .t-swatches) input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.t-style svg {
  width: 100%;
  height: auto;
  margin-bottom: var(--s-8);
  fill: none;
  stroke: var(--detail);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t-style b {
  font-size: var(--t-16);
}

.t-style span {
  font-size: var(--t-14);
  color: var(--fg-muted);
}

.t-style:has(input:checked) {
  border-color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--fg);
}

/* Survey-flag tick on the chosen card. */
.t-style:has(input:checked)::after {
  content: "";
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}

.t-est-panel {
  position: sticky;
  top: calc(var(--bar-h) + var(--s-24));
  display: grid;
  gap: var(--s-24);
  padding: clamp(var(--s-24), 3vw, var(--s-32));
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.t-est-total {
  padding-top: var(--s-24);
  border-top: 1px solid var(--border);
}

.t-est-total span {
  display: block;
  font-size: var(--t-14);
  color: var(--fg-muted);
}

.t-est-total output {
  display: block;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: clamp(var(--t-30), 3.2vw, var(--t-36));
  font-weight: var(--weight-display);
  line-height: 1.1;
  letter-spacing: var(--tracking);
}

@media (max-width: 900px) {
  .t-est-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .t-styles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .t-style {
    padding: var(--s-12);
  }
}

/* Segmented choice: a few short options side by side, the chosen one filled. */
.t-seg > div {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}

.t-seg label {
  position: relative;
  justify-content: center;
  padding-inline: var(--s-8);
}

.t-seg label:has(input:checked) {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

:is(.t-style, .t-seg label):has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Color tool: a house drawing on the left, swatches and the chosen scheme on the right. */
.t-paint {
  --cols: minmax(0, 1.45fr) minmax(0, 1fr);
  --split-gap: clamp(var(--s-24), 4vw, var(--s-48));
}

.t-house {
  --siding: #9fae94;
  --trim: #fbfbf8;
  --door: #9e2a2b;
  margin: 0;
  padding-top: clamp(var(--s-16), 3vw, var(--s-32));
  overflow: hidden;
  border-radius: var(--r-panel);
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 80%);
}

.t-house svg {
  display: block;
  width: 100%;
  height: auto;
}

.t-house :is(.h-siding, .h-trim, .h-door) {
  transition: fill var(--dur) var(--ease);
}

.h-siding {
  fill: var(--siding);
}

.h-trim {
  fill: var(--trim);
}

.h-door {
  fill: var(--door);
}

.h-bars {
  fill: none;
  stroke: var(--trim);
  stroke-width: 1.6;
  transition: stroke var(--dur) var(--ease);
}

.t-swatches {
  margin: 0;
  padding: 0;
  border: 0;
}

.t-swatches legend {
  margin-bottom: var(--s-12);
  padding: 0;
  font-weight: 600;
}

.t-swatches legend span {
  margin-left: var(--s-8);
  font-weight: 400;
  color: var(--fg-muted);
}

/* Six tracks so every row stays on one line, shrinking on the narrowest phones. */
.t-swatches > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 40px));
  gap: var(--s-12);
}

.t-swatches label {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 16%);
  cursor: pointer;
}

.t-swatches label:has(input:checked) {
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 16%),
    0 0 0 3px var(--surface),
    0 0 0 5px var(--fg);
}

.t-swatches label:has(input:focus-visible) {
  outline: 2px solid var(--ring);
  outline-offset: 7px;
}

.t-paint-caption {
  padding-top: var(--s-24);
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--t-24);
  font-weight: var(--weight-display);
  line-height: 1.2;
  letter-spacing: var(--tracking-sm);
}

/* Tall phones only: the house stays in view while the swatches scroll under it. */
@media (max-width: 900px) and (max-aspect-ratio: 3 / 5) {
  .t-house {
    position: sticky;
    top: calc(var(--bar-h) + var(--s-8));
    z-index: 1;
    box-shadow: 0 16px 30px -24px rgb(0 0 0 / 45%);
  }
}

@media (max-width: 420px) {
  .t-swatches > div {
    gap: var(--s-8);
  }
}
