/* ============================================================
   Elev8d — Interactive tools (shared UI)
   loaded after styles.css
   ============================================================ */

/* ---------- Tool page hero (compact, dark) ---------- */
.tool-hero { position: relative; background: var(--black); padding-top: clamp(132px, 17vh, 188px); padding-bottom: clamp(34px, 4vw, 56px); overflow: hidden; }
.tool-hero__glow { position: absolute; top: -22%; right: -6%; width: 60vw; max-width: 720px; height: 60vw; max-height: 720px; background: radial-gradient(circle at 60% 40%, rgba(244,160,0,.24), transparent 62%); pointer-events: none; }
.tool-hero .wrap { position: relative; z-index: 1; max-width: 880px; }
.tool-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); margin-bottom: 20px; }
.tool-hero__intro { color: var(--grey-mid-2); font-size: 1.12rem; line-height: 1.65; max-width: 64ch; }
.tool-breadcrumb { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: .74rem; color: var(--grey-mid); margin-bottom: 24px; flex-wrap: wrap; }
.tool-breadcrumb a { color: var(--grey-mid-2); transition: color .2s; }
.tool-breadcrumb a:hover { color: var(--accent); }
.tool-breadcrumb .sep { color: #444; }
.tool-breadcrumb .current { color: var(--accent); }

/* ---------- Tool shell ---------- */
.tool-wrap { background: var(--grey-light); }
.tool-shell { max-width: 980px; margin: 0 auto; padding: clamp(40px, 5vw, 72px) var(--gutter); }
.tool-card {
  background: var(--white); border: 1px solid var(--line-light); border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06); overflow: hidden;
}
.tool-card__head { padding: clamp(22px, 2.6vw, 30px) clamp(22px, 3vw, 38px); border-bottom: 1px solid var(--line-light); background: #fff; }
.tool-card__head h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); color: var(--black); }
.tool-card__head p { color: #666; font-size: .98rem; margin-top: 8px; }
.tool-card__body { padding: clamp(22px, 3vw, 38px); }

/* ---------- Form controls ---------- */
.tfield { margin-bottom: 22px; }
.tfield > label, .tlabel { display: block; font-family: var(--font-head); font-weight: 600; font-size: .96rem; color: var(--black); margin-bottom: 10px; }
.tfield .hint { font-weight: 400; color: #888; font-size: .85rem; }
.tinput, .tselect {
  width: 100%; height: 52px; padding: 0 16px; font-family: var(--font-body); font-size: 1rem; color: var(--black);
  background: #fff; border: 1px solid #dcdcdc; border-radius: 8px; transition: border-color .2s, box-shadow .2s;
}
textarea.tinput { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; min-height: 90px; }
.tinput:focus, .tselect:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,160,0,.16); }
.tinput::placeholder { color: #aaa; }
.tselect { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
.tselect:invalid { color: #aaa; }
.tinput-money { position: relative; }
.tinput-money::before { content: "$"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #888; font-size: 1rem; pointer-events: none; z-index: 1; }
.tinput-money .tinput { padding-left: 28px; }

/* radio chips (inline) */
.tradios { display: flex; gap: 10px; flex-wrap: wrap; }
.tradio { position: relative; flex: 1; min-width: 120px; }
.tradio input { position: absolute; opacity: 0; pointer-events: none; }
.tradio span { display: block; text-align: center; padding: 14px 12px; border: 1px solid #dcdcdc; border-radius: 8px; font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: #444; cursor: pointer; transition: all .2s; background: #fff; }
.tradio input:checked + span { border-color: var(--accent); background: #FFF8EA; color: var(--accent-dark); box-shadow: 0 0 0 1px var(--accent); }
.tradio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(244,160,0,.3); }

/* big radio cards (wizard) */
.tcards { display: grid; gap: 14px; }
.tcards--2 { grid-template-columns: repeat(2, 1fr); }
.tcard-opt { position: relative; }
.tcard-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tcard-opt label { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border: 1px solid #dcdcdc; border-radius: 10px; cursor: pointer; transition: all .2s; background: #fff; height: 100%; }
.tcard-opt label:hover { border-color: var(--accent-light); }
.tcard-opt input:checked + label { border-color: var(--accent); background: #FFF8EA; box-shadow: 0 0 0 1px var(--accent); }
.tcard-opt input:focus-visible + label { box-shadow: 0 0 0 3px rgba(244,160,0,.3); }
.tcard-opt__ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: #FFF3DA; border: 1px solid #FBE3B3; display: grid; place-items: center; }
.tcard-opt__ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-dark); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tcard-opt input:checked + label .tcard-opt__ic { background: var(--accent); }
.tcard-opt input:checked + label .tcard-opt__ic svg { stroke: #000; }
.tcard-opt__t { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--black); }
.tcard-opt__s { font-size: .9rem; color: #777; margin-top: 3px; line-height: 1.45; }

/* checkboxes (features) */
.tcheck-group + .tcheck-group { margin-top: 26px; }
.tcheck-group__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 14px; }
.tcheck { position: relative; display: block; margin-bottom: 10px; }
.tcheck input { position: absolute; opacity: 0; pointer-events: none; }
.tcheck label { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #e2e2e2; border-radius: 8px; cursor: pointer; transition: all .2s; background: #fff; }
.tcheck label:hover { border-color: var(--accent-light); }
.tcheck input:checked + label { border-color: var(--accent); background: #FFFBF3; }
.tcheck input:focus-visible + label { box-shadow: 0 0 0 3px rgba(244,160,0,.3); }
.tcheck__box { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #cbb88c; display: grid; place-items: center; transition: all .2s; }
.tcheck__box svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; }
.tcheck input:checked + label .tcheck__box { background: var(--accent); border-color: var(--accent); }
.tcheck input:checked + label .tcheck__box svg { opacity: 1; }
.tcheck__t { flex: 1; }
.tcheck__t b { display: block; font-family: var(--font-head); font-weight: 600; font-size: .98rem; color: var(--black); }
.tcheck__t span { font-size: .86rem; color: #888; }
.tcheck__cost { font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--accent-dark); white-space: nowrap; }

/* primary action button */
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: #000; background: var(--accent); border-radius: 8px; cursor: pointer; transition: background .2s, transform .2s; }
.tbtn:hover { background: var(--accent-light); transform: translateY(-1px); }
.tbtn:active { background: var(--accent-dark); transform: none; }
.tbtn--ghost { background: transparent; color: #555; border: 1px solid #dcdcdc; }
.tbtn--ghost:hover { background: #f3f3f3; border-color: #c5c5c5; color: #222; }
.tbtn--sm { width: auto; padding: 0 24px; height: 46px; font-size: .96rem; }

/* ---------- Results ---------- */
.tresults { margin-top: 30px; opacity: 0; transform: translateY(14px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.tresults.show { opacity: 1; transform: none; }
.tresults[hidden] { display: none; }
.tresult-hero { background: linear-gradient(180deg, #111, #0a0a0a); border-radius: 12px; padding: clamp(26px, 3.4vw, 40px); text-align: center; color: #fff; position: relative; overflow: hidden; }
.tresult-hero__glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(244,160,0,.2), transparent 60%); pointer-events: none; }
.tresult-hero__label { position: relative; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey-mid-2); margin-bottom: 14px; }
.tresult-hero__big { position: relative; font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.tresult-hero__sub { position: relative; color: var(--grey-mid-2); font-size: .98rem; margin-top: 14px; }

.tgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.tmetric { background: #fff; border: 1px solid var(--line-light); border-left: 4px solid var(--accent); border-radius: 8px; padding: 20px; }
.tmetric__k { font-size: .82rem; color: #777; margin-bottom: 8px; }
.tmetric__v { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--black); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .tgrid { grid-template-columns: repeat(2, 1fr); } }

.tbadge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: .82rem; padding: 7px 14px; border-radius: 100px; }
.tbadge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tbadge--good { background: #E8F5E9; color: #2E7D32; }
.tbadge--mod { background: #FFF8E1; color: #B7791F; }
.tbadge--warn { background: #FFF3E0; color: #E65100; }
.tbadge--crit { background: #FFEBEE; color: #C62828; }

/* contextual message note */
.tnote { display: flex; gap: 13px; padding: 16px 18px; border-radius: 8px; margin-top: 16px; font-size: .95rem; line-height: 1.55; border-left: 4px solid; }
.tnote svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.tnote--info { background: #FFF8EA; border-color: var(--accent); color: #6a5320; }
.tnote--info svg { stroke: var(--accent-dark); }
.tnote--warn { background: #FFF3E0; border-color: #E65100; color: #7a3b06; }
.tnote--warn svg { stroke: #E65100; }

/* itemised breakdown list */
.tbreak { margin-top: 16px; border: 1px solid var(--line-light); border-radius: 8px; overflow: hidden; background: #fff; }
.tbreak__row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-light); }
.tbreak__row:last-child { border-bottom: none; }
.tbreak__row.is-total { background: #FBFAF8; font-family: var(--font-head); font-weight: 700; }
.tbreak__n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #FFF3DA; color: var(--accent-dark); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: .8rem; }
.tbreak__t { flex: 1; min-width: 0; }
.tbreak__t b { font-family: var(--font-head); font-weight: 600; color: var(--black); font-size: .96rem; display: block; }
.tbreak__t span { font-size: .85rem; color: #888; }
.tbreak__v { font-family: var(--font-head); font-weight: 700; color: var(--black); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbreak__v.neg { color: #C62828; }

/* ---------- Circular gauge ---------- */
.tgauge { display: grid; place-items: center; position: relative; width: 180px; height: 180px; margin: 0 auto; }
.tgauge svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.tgauge__track { fill: none; stroke: #eee; stroke-width: 14; }
.tgauge__fill { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease), stroke .3s; }
.tgauge__num { position: absolute; text-align: center; }
.tgauge__num b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; line-height: 1; letter-spacing: -.03em; }
.tgauge__num span { font-size: .78rem; color: #888; letter-spacing: .04em; }

/* ---------- Wizard ---------- */
.wizard__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wizard__steps { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-mid); }
.wizard__track { height: 6px; background: #ececec; border-radius: 4px; overflow: hidden; margin: 14px 0 30px; }
.wizard__track span { display: block; height: 100%; background: var(--accent); border-radius: 4px; width: 25%; transition: width .4s var(--ease); }
.wizard__step { display: none; animation: wizIn .35s var(--ease); }
.wizard__step.active { display: block; }
@keyframes wizIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.wizard__q { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--black); margin-bottom: 20px; }
.wizard__nav { display: flex; gap: 12px; margin-top: 28px; }
.wizard__nav .tbtn { flex: 1 1 0; width: auto; }
.wizard__nav .tbtn--ghost { flex: 1 1 0; }
.tool-build-note { font-size: 14px; color: #666666; line-height: 1.6; padding-top: 16px; }
@media (max-width: 560px) { .wizard__nav { flex-direction: column; } .wizard__nav .tbtn { width: 100%; } }
@media (max-width: 560px) { .tcards--2 { grid-template-columns: 1fr; } }

/* ---------- Waste tool: question toggles ---------- */
.wq { border: 1px solid var(--line-light); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; background: #fff; display: flex; align-items: center; gap: 16px; transition: border-color .2s; }
.wq.answered-no { border-color: #F3C7C2; background: #FEF6F5; }
.wq.answered-yes { border-color: #C7E6CB; background: #F6FBF6; }
.wq__t { flex: 1; min-width: 0; }
.wq__t b { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--black); }
.wq__t span { display: block; font-size: .86rem; color: #888; margin-top: 3px; line-height: 1.4; }
.wq__toggle { flex: 0 0 auto; display: inline-flex; border: 1px solid #dcdcdc; border-radius: 8px; overflow: hidden; }
.wq__toggle button { width: 56px; height: 40px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; background: #fff; color: #999; cursor: pointer; transition: all .15s; }
.wq__toggle button + button { border-left: 1px solid #dcdcdc; }
.wq__toggle button.sel-yes { background: #2E7D32; color: #fff; }
.wq__toggle button.sel-no { background: #C62828; color: #fff; }
.wq__num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0; color: #999; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: .82rem; }
.waste-anchor { font-family: var(--font-head); font-weight: 700; color: #C62828; font-variant-numeric: tabular-nums; }

/* ---------- Meta checker: SERP preview ---------- */
.serp-toolbar { display: flex; gap: 8px; margin-bottom: 14px; }
.serp-toggle { font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: 8px 16px; border: 1px solid #dcdcdc; border-radius: 100px; background: #fff; color: #666; cursor: pointer; transition: all .2s; }
.serp-toggle.active { background: #111; color: #fff; border-color: #111; }
.serp { background: #fff; border: 1px solid var(--line-light); border-radius: 10px; padding: 22px 24px; }
.serp--mobile { max-width: 420px; }
.serp__crumb { font-family: Arial, sans-serif; font-size: 14px; color: #202124; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.serp__crumb .dots { color: #5f6368; }
.serp__title { font-family: Arial, sans-serif; font-size: 20px; line-height: 1.3; color: #1a0dab; margin-bottom: 4px; cursor: pointer; }
.serp__title:hover { text-decoration: underline; }
.serp--mobile .serp__title { font-size: 18px; }
.serp__desc { font-family: Arial, sans-serif; font-size: 14px; line-height: 1.57; color: #4d5156; }
.serp__desc .date { color: #70757a; }
.serp em, .serp b.kw { font-style: normal; font-weight: 700; }
.serp__empty { color: #9aa0a6; font-style: italic; }

/* score bars */
.tbar { margin-bottom: 16px; }
.tbar__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.tbar__head b { font-family: var(--font-head); font-size: .92rem; color: var(--black); }
.tbar__head span { font-family: var(--font-mono); font-size: .8rem; color: #888; }
.tbar__track { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.tbar__fill { height: 100%; border-radius: 4px; transition: width .4s var(--ease), background .3s; }

/* check list (meta) */
.tchecks { display: flex; flex-direction: column; gap: 8px; }
.tchecks__group + .tchecks__group { margin-top: 18px; }
.tchecks__label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #999; margin-bottom: 10px; }
.tci { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; font-size: .92rem; line-height: 1.45; }
.tci__ic { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.tci__ic svg { width: 12px; height: 12px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tci--pass { background: #F1F8F1; } .tci--pass .tci__ic { background: #2E7D32; } .tci--pass .tci__ic svg { stroke: #fff; }
.tci--warn { background: #FFF8E8; } .tci--warn .tci__ic { background: var(--accent); } .tci--warn .tci__ic svg { stroke: #000; }
.tci--fail { background: #FDF0EF; } .tci--fail .tci__ic { background: #C62828; } .tci--fail .tci__ic svg { stroke: #fff; }
.tci--info { background: #F2F5FB; } .tci--info .tci__ic { background: #5B7FC7; } .tci--info .tci__ic svg { stroke: #fff; }
.tci b { font-family: var(--font-head); font-weight: 600; color: var(--black); }
.tci span { color: #666; }

/* ---------- Tool CTA band ---------- */
.tool-cta { background: var(--off-black); color: #fff; text-align: center; position: relative; overflow: hidden; }
.tool-cta .hero__glow { top: auto; bottom: -40%; left: 50%; transform: translateX(-50%); width: 90%; }
.tool-cta__inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.tool-cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 16px; }
.tool-cta p { color: var(--grey-mid-2); font-size: 1.06rem; margin-bottom: 30px; }

/* ---------- Other tools grid (cross-promo) ---------- */
.tools-other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-promo { display: flex; flex-direction: column; gap: 12px; padding: 26px; border: 1px solid var(--line-light); border-radius: 12px; background: #fff; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.tool-promo:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 40px -26px rgba(0,0,0,.25); }
.tool-promo__ic { width: 44px; height: 44px; border-radius: 10px; background: #FFF3DA; border: 1px solid #FBE3B3; display: grid; place-items: center; }
.tool-promo__ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-dark); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tool-promo h3 { font-size: 1.1rem; color: var(--black); }
.tool-promo p { font-size: .92rem; color: #666; flex: 1; }
.tool-promo .txtlink { font-size: .9rem; color: var(--accent-dark); }
@media (max-width: 820px) { .tools-other { grid-template-columns: 1fr; } }

/* methodology + how-to + faq reuse .section styles; small helpers */
.tool-prose { max-width: 780px; }
.tool-prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--black); margin-bottom: 16px; }
.tool-prose h2:not(:first-child) { margin-top: 44px; }
.tool-prose p { color: #4a4a4a; font-size: 1.05rem; line-height: 1.75; margin-bottom: 16px; }
.tool-prose ol, .tool-prose ul { margin: 0 0 18px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tool-prose li { position: relative; padding-left: 38px; color: #4a4a4a; font-size: 1.04rem; line-height: 1.6; }
.tool-prose ol { counter-reset: tli; }
.tool-prose ol li { counter-increment: tli; }
.tool-prose ol li::before { content: counter(tli); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #000; font-family: var(--font-head); font-weight: 700; font-size: .82rem; display: grid; place-items: center; }
.tool-prose ul li::before { content: ""; position: absolute; left: 7px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tool-disclaimer { margin-top: 22px; font-size: .86rem; color: #999; font-style: italic; line-height: 1.6; }
