/* ==========================================================================
   Renascend — instrumente interactive
   ========================================================================== */

/* ---------- Structură comună ---------- */
.tool-hero { padding: clamp(32px, 6vh, 64px) 0 clamp(20px, 3vh, 32px); text-align: center; }
.tool-hero .lead { margin: 14px auto 0; text-align: center; }
.tool-back { display: inline-block; margin-bottom: 24px; font-size: 14px; color: var(--link); }
.tool-back:hover { text-decoration: underline; }
.tool-hero__icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; background: var(--mist); color: var(--sun-2); }
.tool-body { padding: 16px 0 112px; }
.tool { display: grid; gap: 20px; }
.tool__loading { text-align: center; color: var(--muted); }
.tool-panel { padding: 24px; border-radius: var(--radius); background: var(--mist); }
.tool-panel .subtitle { margin-bottom: 14px; }
.tool-note { font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 760px; }
.rtiles--3 { grid-template-columns: repeat(3, 1fr) !important; }
.field--range input { width: 100%; accent-color: var(--ink); border: 0 !important; padding: 0 !important; background: none !important; box-shadow: none !important; height: 28px; }
.field__unit { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.field__unit input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; }
.field__unit em { font-style: normal; font-size: 13px; color: var(--muted); padding: 0 12px; white-space: nowrap; }
.lg--soc { height: 3px; width: 16px; background: repeating-linear-gradient(90deg, #1f9d55 0 5px, transparent 5px 9px); }
.lg--gen { background: #e8590c; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pagina Instrumente ---------- */
.tool-feature { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 36px; border-radius: var(--radius); background: var(--ink); color: #f5f5f7; transition: transform 0.5s var(--ease); }
.tool-feature:hover { transform: translateY(-3px); }
.tool-feature .lead { color: rgba(245, 245, 247, 0.8); margin: 12px 0 18px; }
.tool-feature .link-arrow { color: #2997ff; }
.tool-feature__icon { color: var(--sun); opacity: 0.9; }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--mist); transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.2); }
.tool-card__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); color: var(--sun-2); margin-bottom: 8px; }
.tool-card h3 { font-size: 17px; letter-spacing: -0.012em; }
.tool-card p { font-size: 14px; color: var(--ink-2); line-height: 1.43; }
.tool-card .link-arrow { margin-top: auto; padding-top: 8px; font-size: 14px; }

/* ---------- Simulator ---------- */
.sim-controls { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr auto; gap: 16px; align-items: end; }
.sim-controls .seg { display: grid; }
.sim-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--mist); }
.sim-months button { padding: 8px 0; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.sim-months button:hover { background: var(--mist-2); }
.sim-months button.is-on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); }
.sim-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #15181c; aspect-ratio: 16 / 9; min-height: 440px; }
.sim-stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.sim-stage canvas:active { cursor: grabbing; }
.sim-stage__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #8e8e93; font-size: 14px; padding: 24px; text-align: center; }
.s3-overlay { position: absolute; inset: 0; pointer-events: none; opacity: 0; font-family: var(--font); }
.s3-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.s3-lines path { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; fill: none; }
.s3-lines circle { fill: #5fe0c4; }
.s3-call { position: absolute; display: grid; gap: 2px; min-width: 150px; transition: left 0.15s linear; }
.s3-call b { font-size: clamp(26px, 3.2vw, 38px); font-weight: 300; color: #f5f5f7; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.s3-call b small { font-size: 0.6em; color: #c7c7cc; }
.s3-call span { font-size: 14px; color: #8e8e93; }
.s3-call em { font-style: normal; font-size: 14px; color: #5fe0c4; min-height: 1.2em; }
.s3-status { position: absolute; top: 20px; left: 22px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: #34c759; }
.s3-status i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.s3-time { position: absolute; top: 20px; right: 22px; font-size: 14px; color: #8e8e93; }
.s3-hint { position: absolute; bottom: 16px; right: 22px; font-size: 12px; color: rgba(255, 255, 255, 0.35); }
@media (max-width: 640px) {
	.sim-stage { aspect-ratio: 3 / 4; min-height: 0; }
	.s3-call { min-width: 120px; }
	.s3-call span, .s3-call em { font-size: 12px; }
	.s3-hint { display: none; }
}
.sim-panel { fill: #1c2433; stroke: #3d4656; stroke-width: 0.8; }
.sim-warm { mix-blend-mode: screen; transition: opacity 0.6s; }
.sim-svg [data-callout] text { transition: fill 0.3s; }
.sim-svg { display: block; width: 100%; height: auto; }
.sim-svg text { font-family: var(--font); }
.sim-flow { animation: flow 1s linear infinite; transition: opacity 0.4s, stroke-width 0.4s; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.sim-svg [data-label] { transition: opacity 0.4s; }
.sim-time { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.sim-time input { width: 100%; accent-color: var(--ink); }
.sim-clock { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.sim-play { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); position: relative; }
.sim-play::before { content: ""; position: absolute; left: 17px; top: 14px; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.is-playing .sim-play::before { left: 15px; top: 14px; width: 4px; height: 16px; border: 0; background: #fff; box-shadow: 9px 0 0 #fff; }
.sim-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sim-stats .rtile, .map-out .rtile, .roof .rtile, .cost .rtile { background: var(--mist); }
.sim-chart__svg { width: 100%; height: auto; display: block; }
.sim-chart__svg text { font-family: var(--font); }

/* ---------- Harta solară ---------- */
.map-wrap { position: relative; }
.map { height: clamp(380px, 60vh, 560px); border-radius: var(--radius); overflow: hidden; background: var(--mist); z-index: 0; }
.map-search { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 500; width: min(480px, calc(100% - 32px)); }
.map-search input { width: 100%; padding: 13px 18px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); font-size: 15px; outline: none; }
.map-results { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); }
.map-results button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.35; }
.map-results button:hover { background: var(--mist); }
.map-results .is-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.map-hint { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.map-pin span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--sun-2); border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); animation: pin 0.5s var(--ease); }
@keyframes pin { from { transform: translateY(-20px) scale(0.6); opacity: 0; } }
.map-out { display: grid; gap: 16px; margin-top: 24px; }
.map-head .title { margin-top: 4px; }
.map-loading { display: flex; align-items: center; font-size: 15px; color: var(--ink-2); }
.map-chart .mchart__plot { height: 200px; }
.leaflet-container { font-family: var(--font); }
/* Harta în tonuri neutre, ca să iasă în evidență doar punctul ales. */
.map .leaflet-tile-pane { filter: grayscale(1) contrast(0.85) brightness(1.08); }

/* ---------- Constructorul de kit ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.builder__main { display: grid; gap: 8px; }
.bsec { padding: 24px 0; border-bottom: 1px solid var(--line); }
.bsec header { display: flex; gap: 14px; margin-bottom: 16px; }
.bsec__n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.bsec h2 { font-size: 21px; letter-spacing: -0.016em; }
.bsec header p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.bsec .seg { display: inline-grid; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.bcard { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; background: var(--mist); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.2s, background-color 0.2s; }
.bcard:hover { background: var(--mist-2); }
.bcard.is-on { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.bcard img { grid-row: span 2; width: 56px; height: 56px; border-radius: 10px; }
.bcard__body { display: grid; gap: 2px; min-width: 0; }
.bcard__body strong { font-size: 13px; font-weight: 600; line-height: 1.3; }
.bcard__body span { font-size: 12px; color: var(--muted); }
.bcard > b { grid-column: 2; font-size: 13px; }
.bcard--none { grid-template-columns: 1fr; min-height: 80px; }
.brow { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.brow__info { font-size: 14px; color: var(--ink-2); }
.stepper--lg button { width: 40px; height: 40px; font-size: 19px; }
.stepper--lg span { min-width: 72px; }
.stepper--lg b { font-size: 17px; }
.bacc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bacc__item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--mist); font-size: 14px; cursor: pointer; }
.bacc__item input { width: 18px; height: 18px; accent-color: var(--ink); }
.bacc__item b { font-size: 13px; font-weight: 500; color: var(--muted); }
.builder__side { position: sticky; top: calc(var(--header-h) + 20px); }
.bsum { padding: 24px; border-radius: var(--radius); background: var(--mist); }
.bsum__total { font-size: 36px; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.bsum__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bchecks { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }
.bchecks li { position: relative; padding: 10px 12px 10px 34px; border-radius: 10px; background: var(--paper); font-size: 12px; line-height: 1.45; }
.bchecks li::before { position: absolute; left: 12px; top: 9px; font-weight: 700; font-size: 13px; }
.bchecks .is-ok::before { content: "✓"; color: var(--ok); }
.bchecks .is-warn::before { content: "!"; color: var(--sun-2); left: 15px; }
.bchecks .is-bad { background: #fde8e4; }
.bchecks .is-bad::before { content: "×"; color: #c0392b; font-size: 16px; top: 7px; }
.bparts { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.bparts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.bparts b { white-space: nowrap; font-weight: 500; }
.bsum__btn { width: 100%; margin-top: 8px; }
.bsum__status { margin-top: 10px; font-size: 13px; color: var(--ink-2); min-height: 1.4em; }

/* ---------- Ce pot alimenta ---------- */
.runtime__intro { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.runtime__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.runtime__list li { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr 90px; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.runtime__name { font-size: 14px; font-weight: 500; display: grid; }
.runtime__name small { font-size: 11px; color: var(--muted); font-weight: 400; }
.runtime__bar { height: 8px; border-radius: 8px; background: var(--mist-2); overflow: hidden; }
.tool-panel .runtime__bar { background: var(--paper); }
.runtime__bar i { display: block; height: 100%; width: var(--w); border-radius: 8px; background: linear-gradient(90deg, #34c759, #1f9d55); transition: width 0.8s var(--ease); }
.runtime__list b { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.runtime__list .is-off { opacity: 0.45; }
.runtime__note { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.runtime-pick { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.runtime-pick img { width: 72px; height: 72px; border-radius: 12px; }
.runtime-pick div { display: grid; gap: 2px; font-size: 14px; }
.runtime-pick span { color: var(--muted); font-size: 13px; }

/* ---------- Comparator ---------- */
.compare-btn { margin-top: 8px; font-size: 12px; font-weight: 500; color: var(--link); align-self: flex-start; }
.compare-btn:hover { text-decoration: underline; }
.compare-btn.is-on { color: var(--ok); }
.compare-btn--single { display: block; margin: -8px 0 20px; font-size: 13px; }
.cmp-tray { position: fixed; left: 50%; bottom: 16px; z-index: 80; transform: translate(-50%, 140%); transition: transform 0.5s var(--ease); width: min(560px, calc(100% - 32px)); }
.cmp-tray.is-visible { transform: translate(-50%, 0); }
.cmp-tray__inner { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 20px; border-radius: 999px; background: rgba(29, 29, 31, 0.9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }
.cmp-tray__text { flex: 1; font-size: 13px; }
.cmp-tray .btn--text { color: rgba(255, 255, 255, 0.7); }
.cmp-tray .btn--dark { background: #fff; color: var(--ink); }
.cmp-tray .is-disabled { opacity: 0.4; pointer-events: none; }
.cmp { --cols: 3; }
.cmp__row { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 24px; }
.cmp__row--head { position: sticky; top: var(--header-h); z-index: 5; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); padding: 16px 0; }
.cmp__cell { position: relative; font-size: 14px; line-height: 1.45; }
.cmp__row--head .cmp__cell { display: grid; gap: 6px; justify-items: start; }
.cmp__img img { width: 100%; max-width: 220px; border-radius: 16px; background: var(--mist); }
.cmp__row--head h2 { font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; }
.cmp__price { font-size: 14px; color: var(--ink-2); }
.cmp__remove { position: absolute; top: 0; right: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--mist); font-size: 18px; line-height: 1; z-index: 2; }
.cmp__group { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.cmp__group h3 { font-size: 21px; letter-spacing: -0.016em; }
.cmp__toggle { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.cmp__label { margin-top: 16px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cmp__label + .cmp__row { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.cmp__row:not(.is-same) .cmp__cell { font-weight: 500; }
.cmp.is-diff .is-same { display: none; }
.cmp__text { color: var(--ink-2); padding-top: 12px; }
.feats--compact { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px 6px; }
.feats--compact .feat svg { width: 44px; height: 44px; }
.feats--compact .feat__label { font-size: 11px; }
.cmp-empty { padding: 40px 0; }

/* ---------- Cost ---------- */
.cost { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.cost__inputs { display: grid; gap: 12px; }
.cost__inputs .subtitle { font-size: 17px; margin: 10px 0 0; }
.cost__inputs .subtitle:first-child { margin-top: 0; }
.cost__out { display: grid; gap: 16px; }
.cost__chart svg, .roof__draw svg { width: 100%; height: auto; display: block; }
.cost__chart text, .roof__draw text { font-family: var(--font); }

/* ---------- Acoperiș ---------- */
.roof { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.roof__inputs { display: grid; gap: 12px; }
.roof__inputs .subtitle { font-size: 17px; margin: 10px 0 0; }
.roof__inputs .subtitle:first-child { margin-top: 0; }
.roof__inputs .seg { display: grid; }
.roof__out { display: grid; gap: 16px; }
.roof__draw { background: linear-gradient(180deg, #eaf3ff, #f5f5f7); }
.roof__panel { animation: panelIn 0.5s var(--ease) both; animation-delay: var(--d); }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px); } }
.roof .rtiles { grid-template-columns: repeat(4, 1fr); }

/* ---------- Testul rapid ---------- */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz__bar { height: 4px; border-radius: 4px; background: var(--mist-2); overflow: hidden; margin-bottom: 36px; }
.quiz__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--sun-2)); transition: width 0.6s var(--ease); }
.quiz__step { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), filter 0.35s var(--ease); }
.quiz__step.is-out, .quiz__step.is-in-back { opacity: 0; transform: translateX(-40px); filter: blur(4px); }
.quiz__step.is-out-back, .quiz__step.is-in-next { opacity: 0; transform: translateX(40px); filter: blur(4px); }
.quiz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 16px; }
.quiz__opts .opt { min-height: 96px; justify-content: center; }
.quiz__kit { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: center; margin-top: 12px; }
.quiz__kit img { width: 100%; border-radius: var(--radius); background: var(--mist); }
.quiz__kit .lead { margin-top: 10px; }
.quiz__price { margin: 14px 0 20px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.quiz__warn { padding: 12px 14px; border-radius: 12px; background: #fff4e5; font-size: 13px; margin-bottom: 16px; }
.quiz__alt { margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.quiz__alt a { color: var(--link); }
.quiz__result > .btn--text { margin-top: 24px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1060px) {
	.tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sim-controls { grid-template-columns: 1fr 1fr; }
	.builder, .cost, .roof { grid-template-columns: minmax(0, 1fr); }
	.builder__side { position: static; }
	.sim-stats, .roof .rtiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.tool-grid { grid-template-columns: 1fr; }
	.tool-feature { grid-template-columns: 1fr; padding: 28px; }
	.tool-feature__icon { display: none; }
	.sim-controls { grid-template-columns: 1fr; }
	.sim-months { grid-template-columns: repeat(6, 1fr); }
	.sim-clock { font-size: 20px; min-width: 64px; }
	.rtiles--3 { grid-template-columns: 1fr !important; }
	.bacc { grid-template-columns: 1fr; }
	.runtime__list li { grid-template-columns: 1fr 80px; }
	.runtime__bar { grid-column: 1 / -1; grid-row: 2; }
	.cmp__row { gap: 12px; }
	.cmp__cell { font-size: 12px; }
	.quiz__opts { grid-template-columns: 1fr; }
	.quiz__kit { grid-template-columns: 1fr; }
	.cmp-tray__text { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.sim-flow, .roof__panel, .map-pin span { animation: none; }
}
/* Muchii fine pe casa din simulator */
.sim-svg polygon { stroke: rgba(255, 255, 255, 0.07); stroke-width: 0.8; stroke-linejoin: round; }
