/* Shared calculator base — scoped under .tcalc, on site tokens.
   Used by seo-loss / ai-savings / seo-vs-direct (visually identical widgets). */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Generic (not scoped to .tcalc) — breadcrumbs + tool cards, shared with the hub */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); margin: 1.5rem 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--text-4); }
.breadcrumbs a:hover { color: var(--text); }
.tool-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-1); transition: border-color var(--t-fast); height: 100%; }
a.tool-card:hover { border-color: var(--text-3); }
.tool-card__title { font-weight: 600; }
.tool-card__desc { color: var(--text-3); font-size: var(--fs-sm); }
.tool-card__arr { color: var(--green-bright); margin-top: auto; }

.tcalc { --tc-radius: 14px; }
.tcalc__head { margin-bottom: 2.5rem; }
.tcalc__head h1 { font-size: var(--fs-display); line-height: 1.05; margin: 0 0 1rem; }
.tcalc__year { color: var(--green-bright); }
.tcalc__lede { font-size: var(--fs-lede); color: var(--text-2); max-width: 62ch; }
.tcalc__badges { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.25rem; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); }
.tcalc__badges a { color: var(--text-2); border-bottom: 1px solid var(--line-2); }

.tcalc__toc { border: 1px solid var(--line); border-radius: var(--tc-radius); background: var(--ink-1); padding: 1rem 1.25rem; margin-bottom: 2.5rem; }
.tcalc__toc summary { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); cursor: pointer; }
.tcalc__toc ol { margin-top: .75rem; display: grid; gap: .4rem; }
.tcalc__toc a { color: var(--text-2); font-size: var(--fs-sm); }
.tcalc__toc a:hover { color: var(--green-bright); }

.tcalc section { scroll-margin-top: 90px; margin-bottom: 3.5rem; }
.tcalc h2 { font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 1rem; }
.tcalc h3 { font-size: var(--fs-h3); margin: 1.5rem 0 .5rem; }
.tcalc p { color: var(--text-2); line-height: 1.6; }
.tcalc a[href^="http"]:not(.btn) { color: var(--text); border-bottom: 1px solid var(--line-2); }
.tcalc a[href^="http"]:not(.btn):hover { border-color: var(--green-bright); }

/* Calculator widget */
.tcalc__calc { border: 1px solid var(--line); border-radius: var(--tc-radius); background: var(--ink-1); padding: clamp(1.25rem, 4vw, 2rem); }
.tform { display: grid; gap: 1.25rem; }
.tgrid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .tgrid { grid-template-columns: 1fr 1fr; } }
.tfield { display: grid; gap: .35rem; }
.tfield label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.tfield .hint { font-size: var(--fs-xs); color: var(--text-3); }
.tinput { position: relative; display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--ink); padding: .65rem .8rem; transition: border-color var(--t-fast); }
.tinput:focus-within { border-color: var(--green); }
.tinput input, .tinput select { width: 100%; background: none; border: 0; color: var(--text); font: inherit; min-width: 0; }
.tinput input:focus, .tinput select:focus { outline: none; }
.tinput input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.tinput input[type="number"]::-webkit-outer-spin-button,
.tinput input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tinput select { background: var(--ink); color: var(--text); cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 1.25rem; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: right .35rem center, right .1rem center; background-size: .35rem .35rem, .35rem .35rem; background-repeat: no-repeat; }
.tinput select option { background: var(--ink-2); color: var(--text); }
.tinput .unit { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.tinput.is-invalid { border-color: #e0533d; }
.terror { color: #e0533d; font-size: var(--fs-xs); }

.tdisclosure { border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.tdisclosure summary { padding: .85rem 1rem; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; font-weight: 500; }
.tdisclosure[open] summary { border-bottom: 1px solid var(--line); }
.tdisclosure__body { padding: 1rem; display: grid; gap: 1rem; }

/* Results */
.tresult { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
.tkpis { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .tkpis { grid-template-columns: repeat(3, 1fr); } }
.tkpi { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; background: var(--ink-2); }
.tkpi__label { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.tkpi__value { font-size: clamp(1.5rem, 4.5vw, 2.5rem); font-weight: 700; line-height: 1.1; margin-top: .35rem; }
.tkpi__sub { font-size: var(--fs-xs); color: var(--text-3); margin-top: .25rem; }
.tkpi--accent .tkpi__value { color: var(--green-bright); }
.tkpi__value.is-negative { color: #e0533d; }

.tresult__text { border-left: 2px solid var(--green); padding: .5rem 0 .5rem 1rem; color: var(--text-2); font-size: var(--fs-body); }

.twarn { border: 1px solid var(--line-2); border-left: 3px solid var(--text-4); border-radius: 8px; background: var(--ink-2); padding: .8rem 1rem; color: var(--text-2); font-size: var(--fs-sm); }
.twarn--risk { border-left-color: #e0a23d; }

.tactions { display: flex; flex-wrap: wrap; gap: .75rem; }

.tchart { border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); padding: 1rem; margin: 0; }
.tchart svg { width: 100%; height: auto; }
.tchart figcaption { color: var(--text-3); font-size: var(--fs-sm); margin-top: .75rem; }
.tchart__legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .65rem; font-size: var(--fs-xs); color: var(--text-3); font-family: var(--mono); }
.tchart__legend span { display: inline-flex; align-items: center; gap: .4rem; }
.tchart__legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }

.ttable-d summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); padding: .5rem 0; }
.ttable-wrap { overflow-x: auto; }
.ttable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.ttable th, .ttable td { padding: .55rem .65rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ttable th:first-child, .ttable td:first-child { text-align: left; }
.ttable thead th { color: var(--text-3); font-weight: 600; font-family: var(--mono); font-size: var(--fs-xs); }
.ttable tbody tr.is-mark td { color: var(--green-bright); }

.tsummary { font-size: var(--fs-sm); color: var(--text-2); display: grid; gap: .35rem; }
.tsummary div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .35rem; }
.tsummary dt { color: var(--text-3); margin: 0; }
.tsummary dd { margin: 0; }

/* Content blocks */
.tbox { border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 10px; background: var(--ink-1); padding: 1.25rem 1.5rem; }
.tbox h2, .tbox h3 { margin-top: 0; }
.ttakeaways { display: grid; gap: .6rem; margin-top: .75rem; }
.ttakeaways li { padding-left: 1.4rem; position: relative; color: var(--text-2); }
.ttakeaways li::before { content: "\25B8"; position: absolute; left: 0; color: var(--green-bright); }

.tsteps { counter-reset: s; display: grid; gap: .85rem; margin: 1rem 0; }
.tsteps li { counter-increment: s; padding-left: 2.2rem; position: relative; color: var(--text-2); }
.tsteps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-bright); font-family: var(--mono); font-size: var(--fs-xs); }

.tformula { font-family: var(--mono); font-size: var(--fs-sm); background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; overflow-x: auto; color: var(--text-2); line-height: 1.7; }

.tfaq details { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.tfaq summary { padding: .9rem 0; font-weight: 500; cursor: pointer; font-size: var(--fs-body); }
.tfaq details[open] summary { color: var(--green-bright); }
.tfaq p { padding: 0 0 1rem; }

.tauthor { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; border: 1px solid var(--line); border-radius: var(--tc-radius); background: var(--ink-1); padding: 1.5rem; }
.tauthor img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.tauthor__name { font-weight: 600; font-size: var(--fs-h3); }
.tauthor__role { color: var(--text-3); font-size: var(--fs-sm); max-width: 60ch; }
.tauthor__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; font-family: var(--mono); font-size: var(--fs-xs); }

.trelated { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 600px) { .trelated { grid-template-columns: 1fr 1fr; } }

.tdisclaimer { border: 1px dashed var(--line-2); border-radius: 10px; padding: 1.1rem 1.25rem; color: var(--text-3); font-size: var(--fs-sm); margin-top: 2.5rem; margin-bottom: 3.5rem; }
.tupdated { color: var(--text-3); font-size: var(--fs-sm); }
