/* The shared hero's lower row; controls are created only when requested. */
.cctv-calc { margin: 0; border: 0; border-top: 1px solid var(--brand-border); border-radius: 0 0 27px 27px; background: #fff; color: var(--ink); }
.cctv-calc [hidden] { display: none !important; }
.cctv-calc summary { list-style: none; cursor: pointer; }
.cctv-calc summary::-webkit-details-marker { display: none; }
.cctv-calc__summary { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 24px; border-radius: 0 0 27px 27px; background: #fffbf6; }
.cctv-calc__summary:hover { background: #fff3e5; }
.cctv-calc__icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: #fff2e4; color: var(--link); }
.cctv-calc__intro { min-width: 0; display: grid; gap: 4px; }
.cctv-calc__intro strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.35; }
.cctv-calc__intro > span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.cctv-calc__action { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; color: var(--link); font-size: 14px; font-weight: 600; }
.cctv-calc__open-copy, .cctv-calc[open] .cctv-calc__closed-copy { display: none; }
.cctv-calc[open] .cctv-calc__open-copy { display: inline; }
.cctv-calc[open] .cctv-calc__action svg { transform: rotate(180deg); }
.cctv-calc[open] > .cctv-calc__summary { border-radius: 0; border-bottom: 1px solid #eee8e1; }
.cctv-calc__body { padding: 20px 24px 24px; }
.cctv-calc__simple { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.8fr); gap: 16px; align-items: start; }
.cctv-calc__field { position: relative; min-width: 0; }
.cctv-calc__field > label { display: block; margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; line-height: 1.45; font-weight: 500; }
.cctv-shop .cctv-calc input { min-height: 46px; font-size: 16px; font-variant-numeric: tabular-nums; }
.cctv-calc__select { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #dcd8d3; border-radius: 10px; background: white; color: var(--ink); font: 400 14px/1.5 var(--font-body); text-align: left; cursor: pointer; }
.cctv-calc__select > span { min-width: 0; overflow-wrap: anywhere; }
.cctv-calc__select:hover, .cctv-calc__select[aria-expanded="true"] { border-color: var(--action); background: #fffaf4; }
.cctv-calc :is(button, input, summary, [tabindex="0"]):focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.cctv-calc__options { position: absolute; left: 0; right: 0; z-index: 26; overflow: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid #e8d4bf; border-radius: 12px; background: white; box-shadow: 0 12px 32px #4423011c; scrollbar-color: var(--action) #f7f2ec; }
.cctv-calc__options button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 10px; border: 0; border-radius: 7px; background: white; color: var(--ink); font: 400 14px/1.5 var(--font-body); text-align: left; cursor: pointer; }
.cctv-calc__options button:hover, .cctv-calc__options button:focus, .cctv-calc__options [aria-selected="true"] { outline: none; background: #fff0df; color: var(--link); }
.cctv-calc__options [aria-selected="true"] { font-weight: 600; }
.cctv-calc__profile-hint { margin: 14px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.cctv-calc__advanced { margin-top: 22px; border-top: 1px solid #eee8e1; border-bottom: 1px solid #eee8e1; }
.cctv-calc__advanced > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 58px; padding: 12px 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.cctv-calc__advanced > summary > small { color: var(--muted); font-size: 13px; font-weight: 400; }
.cctv-calc__advanced > summary > svg { margin-left: auto; color: var(--link); }
.cctv-calc__advanced[open] > summary > svg { transform: rotate(180deg); }
.cctv-calc__advanced-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; padding: 8px 0 24px; }
.cctv-calc__field--expanded { grid-column: 1 / -1; }
.cctv-calc__special { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-top: 14px; padding: 20px; border: 1px solid #f0e4d7; border-radius: 14px; background: #fffbf6; }
.cctv-calc__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.cctv-calc__controls .button { min-height: 46px; padding: 12px 24px; font-size: 14px; }
.cctv-calc__reset { min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; text-underline-offset: 4px; }
.cctv-calc__reset:hover { color: var(--link); text-decoration: underline; }
.cctv-calc__notice { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.cctv-calc__feedback { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: #fff4e7; color: var(--link); font-size: 14px; line-height: 1.6; }
.cctv-calc__field-error { display: block; margin-top: 6px; color: #b23419; font-size: 12px; line-height: 1.5; }
.cctv-calc input[aria-invalid="true"] { border-color: #b23419; }
.cctv-calc__estimate { margin-top: 24px; padding-top: 24px; border-top: 1px solid #eee8e1; }
.cctv-calc__estimate-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cctv-calc__eyebrow { color: var(--link); font-size: 12px; font-weight: 600; }
.cctv-calc__estimate-heading h3 { margin: 8px 0 0; font-size: 20px; font-weight: 700; line-height: 1.35; }
.cctv-calc__preliminary { padding: 5px 10px; border-radius: 7px; background: #f6f5f3; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cctv-calc__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.cctv-calc__totals > div { min-width: 0; padding: 18px 20px; border: 1px solid #eee8e1; border-radius: 14px; background: #faf9f7; }
.cctv-calc__totals dt { color: var(--muted); font-size: 13px; }
.cctv-calc__totals dd { margin: 8px 0 0; color: var(--ink); font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cctv-calc__totals .cctv-calc__total { background: #fff2e4; border-color: #f5d7b6; }
.cctv-calc__total dd { color: var(--link); }
.cctv-calc__breakdown { border-bottom: 1px solid #eee8e1; }
.cctv-calc__breakdown > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 0; font-size: 14px; font-weight: 600; }
.cctv-calc__breakdown > summary > span { color: var(--muted); font-size: 12px; font-weight: 400; }
.cctv-calc__breakdown > summary > svg { margin-left: auto; color: var(--link); }
.cctv-calc__breakdown[open] > summary > svg { transform: rotate(180deg); }
.cctv-calc__table-scroll { overflow-x: auto; margin-bottom: 16px; }
.cctv-calc table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: left; font-size: 13px; line-height: 1.5; }
.cctv-calc :is(th,td) { padding: 12px; border-bottom: 1px solid #eee8e1; vertical-align: top; }
.cctv-calc thead { background: #faf9f7; color: var(--muted); }
.cctv-calc th { font-weight: 500; }
.cctv-calc td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cctv-calc__estimate > .cctv-calc__notice { margin-top: 16px; max-width: 900px; }
@media (max-width: 900px) {
  .cctv-calc__simple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cctv-calc__profile { grid-column: 1 / -1; }
  .cctv-calc__advanced > summary > small { display: none; }
}
@media (max-width: 600px) {
  .cctv-calc, .cctv-calc__summary { border-radius: 0 0 23px 23px; }
  .cctv-calc__summary { gap: 12px; padding: 16px; }
  .cctv-calc__intro strong { font-size: 15px; }
  .cctv-calc__intro > span { font-size: 12px; }
  .cctv-calc__action > span { display: none !important; }
  .cctv-calc__body { padding: 18px 16px; }
  .cctv-calc__simple, .cctv-calc__advanced-fields, .cctv-calc__special { grid-template-columns: minmax(0, 1fr); }
  .cctv-calc__special { padding: 14px; }
  .cctv-calc__select { font-size: 16px; }
  .cctv-calc__estimate-heading { flex-wrap: wrap; }
  .cctv-calc__totals { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cctv-calc__totals > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px; }
  .cctv-calc__totals dd { margin: 0; font-size: 22px; }
}
