.tp-lead { font-size: var(--text-md); color: var(--ink-soft); max-width: var(--measure); }
.tp-form { margin: var(--space-md) 0 var(--space-lg); padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); max-width: 760px; font-family: var(--font-ui); }
.tp-form .field-label { margin-top: 0; }
.tp-form .field-label, .cf-made .field-label { font-weight: 600; }
.tp-form .control, .cf-made .control { padding: .7em .85em; border-radius: var(--radius-sm); }
.tp-form .file-input { border-radius: var(--radius-sm); }
@supports (field-sizing: content) and (min-height: calc(attr(rows type(<number>), 2) * 1lh)) {
  .tp-form textarea.control, .cf-made textarea.control { min-height: calc(attr(rows type(<number>), 2) * 1lh + 1.4em + 2px); }
}
.tp-row { display: flex; gap: var(--space-3); align-items: stretch; }
.tp-row .control { flex: 1 1 auto; min-width: 0; }
.tp-row .btn { flex: none; }
.tp-form .field-error { margin-bottom: 0; }
.tp-form .control[aria-invalid="true"] { border-color: var(--color-danger); }
.tp-form .control[aria-invalid="true"]:focus { outline-color: var(--color-danger); }
.tp-form[aria-busy="true"] .btn { cursor: progress; }
.tp-form select.control { -webkit-appearance: none; appearance: none; line-height: 1.6; padding-right: 2.6em; background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5l5.5 5.5 5.5-5.5' fill='none' stroke='%2324533F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .9em center / .85em auto; cursor: pointer; }
.tp-form .check { gap: .75em; }
.tp-form .check input { -webkit-appearance: none; appearance: none; flex: none; width: 1rem; height: 1rem; margin: calc((1.6em - 1rem) / 2) 0 0 4px; border: 1.5px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface) center / 100% 100% no-repeat; cursor: pointer; transition: border-color .12s ease, background-color .12s ease; }
.tp-form .check input[type="radio"] { border-radius: 50%; }
@media (hover: hover) { .tp-form .check input:hover { border-color: var(--color-primary); } }
.tp-form .check input:checked { background-color: var(--color-primary); border-color: var(--color-primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tp-form .check input[type="radio"]:checked { background-image: radial-gradient(circle, var(--color-surface) 0 27%, transparent 32%); }
.tp-form .check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tp-form .check input[aria-invalid="true"] { border-color: var(--color-danger); }
.tp-form .check input[aria-invalid="true"]:focus-visible { outline-color: var(--color-danger); }
@media (forced-colors: active) { .tp-form select.control, .tp-form .check input { -webkit-appearance: auto; appearance: auto; } }
.btn.is-busy::after { content: ""; width: .9em; height: .9em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tp-spin .8s linear infinite; }
@keyframes tp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::after { animation-duration: 2.4s; } }
.tp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }

.tp-calc { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md) var(--space-lg); }
.tp-calc[data-calc] { grid-template-columns: minmax(0, 1fr); }
.tp-calc .tp-field { display: flex; flex-direction: column; }
.tp-calc .tp-field .control { margin-top: auto; }
@supports (grid-template-rows: subgrid) {
  .tp-calc .tp-field:not(.tp-wide) { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .tp-calc .tp-field:not(.tp-wide) .control, .tp-calc .tp-field:not(.tp-wide) .tp-money { margin-top: 0; }
  .tp-calc .tp-extras { grid-row: span 3; }
}
.tp-calc .btn { grid-column: 1 / -1; justify-self: start; }
.tp-calc .field-label { margin: 0; }
.tp-calc .tp-wide { grid-column: 1 / -1; }
.tp-extras { border: 0; margin: 0; padding: 0; min-width: 0; }
.tp-extras .check { margin-top: var(--space-2); }
.tp-tools { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: var(--space-md) 0 var(--space-lg); }
.tp-tool { position: relative; margin: 0; padding: var(--space-4) var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.tp-tool h3 { margin: 0 0 var(--space-2); font-size: var(--text-md); }
.tp-tool h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tp-tool p { margin: 0; color: var(--ink-soft); font-size: var(--text-sm); }
.tp-tool:hover { border-color: var(--color-border-strong); }
.tp-tool:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tp-tool h3 a:focus-visible { outline: none; }
.legal .tp-tool { max-width: none; }
.tp-hint { margin: var(--space-1) 0 var(--space-2); font-size: var(--text-sm); color: var(--color-muted); }
.tp-money { display: flex; gap: var(--space-2); margin-top: auto; }
.tp-money .control:first-child { flex: 1 1 auto; min-width: 0; }
.tp-money select.control { flex: none; width: auto; }
.tp-calc input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.tp-calc input[type="number"]::-webkit-outer-spin-button, .tp-calc input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tp-result { margin: var(--space-lg) 0 var(--space-xl); max-width: 760px; }
.tp-result > h2 { margin-top: 0; }
.tp-meta { color: var(--color-muted); font-family: var(--font-ui); font-size: var(--text-sm); }
.legal .tp-meta { max-width: none; }
.tp-addr { overflow-wrap: anywhere; color: var(--color-ink); font-weight: 600; }
.tp-note { padding: var(--space-3) var(--space-4); background: var(--color-surface-sunk); border-radius: var(--radius-md); font-family: var(--font-ui); font-size: var(--text-sm); color: var(--ink-soft); }
.tp-sub { margin-top: var(--space-lg); }

.tp-item { position: relative; margin: var(--space-4) 0; padding: var(--space-4) var(--space-5) var(--space-4) calc(var(--space-5) + 4px); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.tp-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--color-border-strong); }
.tp-item.tp-high::before { background: var(--color-danger); }
.tp-item.tp-medium::before { background: var(--cloudberry-deep); }
.tp-item h3, .tp-item h4 { margin: var(--space-1) 0 var(--space-2); font-size: var(--text-md); }
.tp-item p { margin: 0 0 var(--space-2); }
.tp-level { display: inline-block; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700; padding: .15em .65em; border-radius: var(--radius-pill); background: var(--color-surface-sunk); color: var(--ink-soft); }
.tp-high .tp-level { background: #F9E3E1; color: var(--color-danger); }
.tp-medium .tp-level { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.tp-rule { font-family: var(--font-ui); font-size: var(--text-sm); color: var(--color-muted); }
.tp-ex { margin: var(--space-2) 0; padding-left: 1.1em; font-size: var(--text-sm); }
.tp-ex li { margin: .2em 0; overflow-wrap: anywhere; }
.tp-ex code { font-size: .92em; background: var(--color-surface-sunk); padding: .05em .35em; border-radius: 4px; }
.tp-more { color: var(--color-muted); list-style: none; }

.tp-pass { list-style: none; padding: 0; }
.tp-pass li { position: relative; padding-left: 1.6em; margin: .4em 0; }
.tp-pass li::before { content: ""; position: absolute; left: .3em; top: .3em; width: .38em; height: .72em; border-right: 2.5px solid var(--color-success); border-bottom: 2.5px solid var(--color-success); transform: rotate(45deg); }

.tp-cta { margin: var(--space-lg) 0 0; padding: var(--space-md) var(--space-lg); background: var(--pine); color: var(--on-pine); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.tp-cta p { margin: 0; max-width: 30em; color: var(--on-pine); }
.tp-cta .btn:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 3px; }

.tp-sums { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-4) 0; }
.tp-sum { margin: 0; padding: var(--space-4) var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-family: var(--font-ui); }
.tp-sum-n { display: block; font-size: var(--text-2xl); font-weight: 800; letter-spacing: -.02em; color: var(--pine); line-height: 1.15; overflow-wrap: anywhere; }
.tp-sum-l { display: block; margin-top: var(--space-1); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.45; }
.tp-sum-more { display: block; margin-top: var(--space-1); font-size: var(--text-base); font-weight: 600; letter-spacing: 0; line-height: 1.45; }
.legal-table td { font-family: var(--font-ui); }
.tp-calc-out .legal-table td { text-align: right; white-space: nowrap; }

.tp-names { list-style: none; padding: 0; margin: var(--space-4) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.tp-name { display: grid; grid-template-columns: 1fr auto; gap: .2em var(--space-4); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); font-family: var(--font-ui); }
.tp-name:first-child { border-top: 0; }
.tp-domain { font-weight: 700; overflow-wrap: anywhere; }
.tp-state { justify-self: end; font-size: var(--text-sm); font-weight: 700; padding: .1em .7em; border-radius: var(--radius-pill); background: var(--color-surface-sunk); color: var(--ink-soft); align-self: start; }
.tp-included .tp-state, .tp-free .tp-state, .tp-own_free .tp-state, .tp-premium .tp-state { background: var(--pine-soft); color: var(--pine-strong); }
.tp-why { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-muted); }
.legal .tp-name, .legal .tp-note { max-width: none; }

@media (max-width: 620px) {
  .tp-row { flex-direction: column; }
  .tp-row .btn { width: 100%; }
  .tp-calc { grid-template-columns: 1fr; }
  .tp-sums { grid-template-columns: 1fr; }
  .tp-tools { grid-template-columns: 1fr; }
  .tp-cta { padding: var(--space-md); }
  .tp-cta .btn { width: 100%; }
}
