/* SEO ROI calculator — scoped under .roi, on site tokens */
.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; }

.roi { --roi-radius: 14px; }
/* Breadcrumbs — shared by the tool page and the /tools hub (not scoped to .roi) */
.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 cards / grid — shared with the hub */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 2rem; }
.tool-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--roi-radius); 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; }
.tool-card--soon { opacity: .5; }

.roi__head { margin-bottom: 2.5rem; }
.roi__head h1 { font-size: var(--fs-display); line-height: 1.05; margin: 0 0 1rem; }
.roi__year { color: var(--green-bright); }
.roi__lede { font-size: var(--fs-lede); color: var(--text-2); max-width: 62ch; }
.roi__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); }
.roi__badges a { color: var(--text-2); border-bottom: 1px solid var(--line-2); }

.roi__toc { border: 1px solid var(--line); border-radius: var(--roi-radius); background: var(--ink-1); padding: 1rem 1.25rem; margin-bottom: 2.5rem; }
.roi__toc summary { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); cursor: pointer; }
.roi__toc ol { margin-top: .75rem; display: grid; gap: .4rem; }
.roi__toc a { color: var(--text-2); font-size: var(--fs-sm); }
.roi__toc a:hover { color: var(--green-bright); }

.roi section { scroll-margin-top: 90px; margin-bottom: 3.5rem; }
.roi h2 { font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 1rem; }
.roi h3 { font-size: var(--fs-h3); margin: 1.5rem 0 .5rem; }
.roi p { color: var(--text-2); line-height: 1.6; }
.roi a[href^="http"]:not(.btn) { color: var(--text); border-bottom: 1px solid var(--line-2); }
.roi a[href^="http"]:not(.btn):hover { border-color: var(--green-bright); }

/* Calculator widget */
.roi__calc { border: 1px solid var(--line); border-radius: var(--roi-radius); background: var(--ink-1); padding: clamp(1.25rem, 4vw, 2rem); }
.roi-form { display: grid; gap: 1.25rem; }
.roi-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .roi-grid { grid-template-columns: 1fr 1fr; } }
.roi-field { display: grid; gap: .35rem; }
.roi-field label { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.roi-field .hint { font-size: var(--fs-xs); color: var(--text-3); }
.roi-input { 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); }
.roi-input:focus-within { border-color: var(--green); }
.roi-input input, .roi-input select { width: 100%; background: none; border: 0; color: var(--text); font: inherit; min-width: 0; }
.roi-input input:focus, .roi-input select:focus { outline: none; }
/* Hide native number spinners (cleaner on dark theme) */
.roi-input input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.roi-input input[type="number"]::-webkit-outer-spin-button,
.roi-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Native select needs an explicit dark background so the option popup isn't white-on-white */
.roi-input 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; }
.roi-input select option { background: var(--ink-2); color: var(--text); }
.roi-input .unit { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.roi-input.is-invalid { border-color: #e0533d; }
.roi-error { color: #e0533d; font-size: var(--fs-xs); }

.roi-disclosure { border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.roi-disclosure summary { padding: .85rem 1rem; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; font-weight: 500; }
.roi-disclosure[open] summary { border-bottom: 1px solid var(--line); }
.roi-disclosure__body { padding: 1rem; display: grid; gap: 1rem; }
.roi-cost-row { display: grid; gap: .5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 768px) { .roi-cost-row { grid-template-columns: 1.4fr 1fr 1fr; } }
.roi-cost-row .roi-input input:disabled { color: var(--text-5); }

/* Results */
.roi-result { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
.roi-kpis { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .roi-kpis { grid-template-columns: repeat(3, 1fr); } }
.roi-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; background: var(--ink-2); }
.roi-kpi__label { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.roi-kpi__value { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; line-height: 1.1; margin-top: .35rem; }
.roi-kpi--accent .roi-kpi__value { color: var(--green-bright); }
.roi-kpi__value.is-negative { color: #e0533d; }

.roi-result__text { border-left: 2px solid var(--green); padding: .5rem 0 .5rem 1rem; color: var(--text-2); font-size: var(--fs-body); }

.roi-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.roi-chart { border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); padding: 1rem; margin: 0; }
.roi-chart svg { width: 100%; height: auto; }
.roi-chart figcaption { color: var(--text-3); font-size: var(--fs-sm); margin-top: .75rem; }

.roi-table-d summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); padding: .5rem 0; }
.roi-table-wrap { overflow-x: auto; }
.roi-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.roi-table th, .roi-table td { padding: .55rem .65rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.roi-table th:first-child, .roi-table td:first-child { text-align: left; }
.roi-table thead th { color: var(--text-3); font-weight: 600; font-family: var(--mono); font-size: var(--fs-xs); }
.roi-table tbody tr.is-payback td { color: var(--green-bright); }

.roi-summary-costs { font-size: var(--fs-sm); color: var(--text-2); display: grid; gap: .35rem; }
.roi-summary-costs div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .35rem; }
.roi-summary-costs dt { color: var(--text-3); margin: 0; }
.roi-summary-costs dd { margin: 0; }

/* Info boxes / content */
.roi-box { border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 10px; background: var(--ink-1); padding: 1.25rem 1.5rem; }
.roi-box h2, .roi-box h3 { margin-top: 0; }
.roi-takeaways { display: grid; gap: .6rem; margin-top: .75rem; }
.roi-takeaways li { padding-left: 1.4rem; position: relative; color: var(--text-2); }
.roi-takeaways li::before { content: "▸"; position: absolute; left: 0; color: var(--green-bright); }

.roi-steps { counter-reset: s; display: grid; gap: .85rem; margin: 1rem 0; }
.roi-steps li { counter-increment: s; padding-left: 2.2rem; position: relative; color: var(--text-2); }
.roi-steps 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); }

.roi-formula { 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; }

.roi-faq details { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.roi-faq summary { padding: .9rem 0; font-weight: 500; cursor: pointer; font-size: var(--fs-body); }
.roi-faq details[open] summary { color: var(--green-bright); }
.roi-faq p { padding: 0 0 1rem; }

.roi-author { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; border: 1px solid var(--line); border-radius: var(--roi-radius); background: var(--ink-1); padding: 1.5rem; }
.roi-author img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.roi-author__name { font-weight: 600; font-size: var(--fs-h3); }
.roi-author__role { color: var(--text-3); font-size: var(--fs-sm); max-width: 60ch; }
.roi-author__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; font-family: var(--mono); font-size: var(--fs-xs); }

.roi-disclaimer { border: 1px dashed var(--line-2); border-radius: 10px; padding: 1.1rem 1.25rem; color: var(--text-3); font-size: var(--fs-sm); }
.roi-updated { color: var(--text-3); font-size: var(--fs-sm); }

.roi-related { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 600px) { .roi-related { grid-template-columns: 1fr 1fr; } }
.roi-disclaimer { margin-top: 2.5rem; margin-bottom: 3.5rem; }
