/* وفرها صح — styles */
:root {
  --teal: #0B4F6C; --teal-2: #0f6a8f; --yellow: #F9C80E; --green: #3BB273; --red: #E4572E;
  --bg: #F6F8F7; --bg-2: #EAF2F1; --card: #FFFFFF; --ink: #10222B; --muted: #5B6B73;
  --line: #E1E8EA; --line-strong: #C9D4D8; --shadow: 0 10px 30px rgba(11, 79, 108, .10);
  --radius: 18px; --plan-floor: #FBF7EF; --plan-wall: #23343C; --furn: #E9E2D3; --furn-line: #CFC5B1;
  --yard: #DDEFD9; --yard-dot: #C4E2BE;
}
[data-theme="dark"] {
  --bg: #0B151A; --bg-2: #0F1F26; --card: #13242C; --ink: #E8F1F3; --muted: #9DB0B7;
  --line: #22363F; --line-strong: #31505c; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --plan-floor: #1B2A31; --plan-wall: #D7E4E8; --furn: #2A3B43; --furn-line: #3A4F58;
  --yard: #163024; --yard-dot: #1E3F2F;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--teal-2); }
[data-theme="dark"] a { color: #7fd3f0; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
html[lang="ar"] .t-en, html[lang="en"] .t-ar { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 1.15rem; }
.brand small { color: var(--muted); font-size: .75rem; }
.links { display: flex; gap: 4px; margin-inline-start: auto; }
.links a { text-decoration: none; color: var(--ink); padding: 8px 11px; border-radius: 10px; font-weight: 500; font-size: .93rem; }
.links a:hover { background: var(--bg-2); color: var(--teal); }
.nav-tools { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.icon-btn:hover { border-color: var(--teal); }
.menu-btn { display: none; }
.lang-switch { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.lang-switch button { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: .85rem; padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.lang-switch button.active { background: var(--teal); color: #fff; }
[data-theme="dark"] .lang-switch button.active { background: var(--yellow); color: #10222B; }
.member b.t-en { font-size: .95rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 14px; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(11, 79, 108, .25); }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: .88rem; border-radius: 11px; }
[data-theme="dark"] .btn.primary { background: var(--yellow); color: #10222B; }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(249, 200, 14, .18), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(59, 178, 115, .14), transparent 60%); padding: 56px 0 40px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.pill { display: inline-flex; gap: 6px; background: var(--card); border: 1px solid var(--line); padding: 6px 14px; border-radius: 99px; font-size: .88rem; font-weight: 500; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 18px 0 14px; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--teal); background: linear-gradient(transparent 62%, rgba(249, 200, 14, .55) 0); }
[data-theme="dark"] .hero h1 em { color: var(--yellow); background: none; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 58ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.hero-stats b { font-size: 1.9rem; color: var(--teal); font-weight: 700; }
[data-theme="dark"] .hero-stats b { color: var(--yellow); }
.hero-stats span { display: block; font-size: .85rem; color: var(--muted); }
.hero-art { position: relative; }
.hero-art img { border-radius: 28px; box-shadow: 0 30px 60px rgba(11, 79, 108, .25); aspect-ratio: 1; object-fit: cover; width: 100%; }
.float-card { position: absolute; background: var(--card); border: 1px solid var(--line); padding: 10px 16px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); animation: bob 4s ease-in-out infinite; }
.fc1 { top: 8%; inset-inline-start: -18px; }
.fc2 { bottom: 10%; inset-inline-end: -14px; animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* sections */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-2); }
.section.dark { background: linear-gradient(160deg, #0B4F6C, #083a50); color: #fff; }
.sec-head { max-width: 760px; margin-bottom: 30px; }
.sec-head h2, .section h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.sec-head p { color: var(--muted); font-size: 1.05rem; }
.sec-head.light p { color: rgba(255, 255, 255, .8); }
.kicker { display: inline-block; font-weight: 700; color: var(--green); font-size: .9rem; letter-spacing: .02em; margin-bottom: 6px; }
.section.dark .kicker { color: var(--yellow); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* house controls */
.house-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 18px; }
.seg-group { display: flex; align-items: center; gap: 10px; }
.seg-label { font-weight: 600; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; box-shadow: var(--shadow); }
.seg button { min-width: 44px; height: 38px; padding: 0 12px; border: 0; background: transparent; border-radius: 10px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.seg button.active { background: var(--teal); color: #fff; }
[data-theme="dark"] .seg button.active { background: var(--yellow); color: #10222B; }

/* meter */
.meter { display: grid; grid-template-columns: 1.1fr 1.3fr .8fr .8fr; gap: 12px; margin-bottom: 12px; }
.m-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.m-label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.m-val b { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.m-card.big .m-val b { font-size: 2.5rem; }
.m-card.accent { background: linear-gradient(135deg, var(--teal), #0d6b8f); color: #fff; border: 0; }
.m-card.accent .m-label, .m-card.accent .m-sub { color: rgba(255, 255, 255, .8); }
.m-card.accent .m-val b { color: var(--yellow); }
.m-sub { font-size: .85rem; }
.tier { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.tier p { margin: 0; font-size: .9rem; color: var(--muted); }
.tier-bar { position: relative; flex: 0 0 min(420px, 45%); height: 12px; border-radius: 99px; background: var(--line); }
.tier-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--green), var(--yellow)); transition: width .4s; }
html[dir="rtl"] .tier-bar i { background: linear-gradient(270deg, var(--green), var(--yellow)); }
.tier.over .tier-bar i { background: var(--red); }
.tier-mark { position: absolute; inset-inline-end: -4px; top: -20px; font-size: .72rem; color: var(--muted); }
.saving { padding: 12px 18px; border-radius: 14px; font-weight: 500; margin-bottom: 12px; animation: pop .35s; }
.saving.good { background: rgba(59, 178, 115, .14); border: 1px solid rgba(59, 178, 115, .4); }
.saving.bad { background: rgba(228, 87, 46, .1); border: 1px solid rgba(228, 87, 46, .35); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }

/* plan */
.house-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.house-grid > * { min-width: 0; }
.plan-card, .side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan-card { padding: 14px; }
.plan-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.caption { margin: 0; font-weight: 600; color: var(--teal); }
[data-theme="dark"] .caption { color: var(--yellow); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-wrap { border-radius: 14px; overflow: hidden; }
.house-svg { width: 100%; height: auto; display: block; user-select: none; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; color: var(--muted); margin-top: 10px; }
.plan-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.lg.on { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.lg.off { background: var(--line-strong); }
.lg.cool { background: rgba(43, 123, 228, .35); border-radius: 4px; }
.lg.lit { background: rgba(249, 200, 14, .4); border-radius: 4px; }

/* svg house */
.yard-bg { fill: var(--yard); }
.yard-dot { fill: var(--yard-dot); }
.tile-bg { fill: var(--plan-floor); }
.tile-line { fill: none; stroke: var(--furn); stroke-width: 1; }
.yard-label { fill: var(--green); font-weight: 700; font-size: 18px; font-family: inherit; }
.yard-label.small { font-size: 13px; fill: var(--muted); }
.drive { fill: #cfd6d8; opacity: .6; }
[data-theme="dark"] .drive { fill: #2b3b42; }
.floor { fill: var(--plan-floor); }
.room .floor:not([fill^="url"]) { fill: var(--plan-floor); }
.room-hall .floor { fill: color-mix(in srgb, var(--plan-floor) 85%, #c9b99a); }
.wall { fill: none; stroke: var(--plan-wall); stroke-width: 7; stroke-linejoin: round; }
.lit { fill: rgba(249, 200, 14, 0); transition: fill .35s; pointer-events: none; }
.lit.on { fill: rgba(249, 200, 14, .13); }
.room.cool .lit { fill: rgba(43, 123, 228, .07); }
.room.cool .lit.on { fill: rgba(249, 200, 14, .13); }
.room.cold .floor { filter: saturate(.85); }
.room { cursor: pointer; }
.room:hover .floor { filter: brightness(.97); }
.room.selected .wall { stroke: var(--green); stroke-width: 9; }
.door-gap { stroke: var(--plan-floor); stroke-width: 9; }
.door-arc { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.door-arc.main { stroke: var(--teal); stroke-width: 2.2; stroke-dasharray: none; }
.window { stroke: #6cc3e8; stroke-width: 7; stroke-linecap: round; }
.furn, .bed, .pillow, .blanket, .wardrobe, .shower, .toilet, .sink, .counter, .sofa, .table, .tvunit, .rug { fill: var(--furn); stroke: var(--furn-line); stroke-width: 1.2; pointer-events: none; }
.pillow { fill: var(--card); }
.blanket { fill: rgba(11, 79, 108, .16); }
.shower { fill: rgba(108, 195, 232, .2); }
.sink-bowl, .hob { fill: none; stroke: var(--furn-line); stroke-width: 1.5; pointer-events: none; }
.furn-line { stroke: var(--furn-line); pointer-events: none; }
.sofa { fill: rgba(59, 178, 115, .22); }
.rug { fill: rgba(249, 200, 14, .16); }
.rug-in { fill: none; stroke: rgba(228, 87, 46, .35); stroke-width: 2; stroke-dasharray: 6 4; pointer-events: none; }
.counter { fill: color-mix(in srgb, var(--furn) 80%, #a0b5bd); }
.room-label { fill: var(--ink); font-weight: 700; font-family: inherit; paint-order: stroke; stroke: var(--plan-floor); stroke-width: 5px; pointer-events: none; }
.dev { cursor: pointer; outline: none; }
.dev .dbtn { fill: var(--card); stroke: var(--line-strong); stroke-width: 2; transition: fill .2s, stroke .2s; }
.dev .halo { fill: transparent; transition: fill .25s; }
.dev .ico { font-size: 17px; pointer-events: none; filter: grayscale(1) opacity(.55); transition: filter .2s; }
.dev.on .ico { filter: none; }
.dev.on .dbtn { stroke: var(--yellow); stroke-width: 3; }
.dev.on .halo { fill: rgba(249, 200, 14, .35); animation: pulse 2.4s ease-in-out infinite; }
.dev-ac.on .dbtn { stroke: #2B7BE4; }
.dev-ac.on .halo { fill: rgba(43, 123, 228, .3); }
.dev.sel .dbtn { stroke: var(--green); stroke-width: 4; }
.dev:hover .dbtn, .dev:focus .dbtn { stroke: var(--teal); }
.ac-temp { font-size: 13px; font-weight: 700; fill: #2B7BE4; font-family: inherit; paint-order: stroke; stroke: var(--plan-floor); stroke-width: 4px; pointer-events: none; }
@keyframes pulse { 50% { opacity: .45; } }

/* side panel */
.side { display: grid; gap: 16px; position: sticky; top: 84px; }
.side-card { padding: 18px; }
.side-card h4 { font-size: 1.05rem; margin-bottom: 6px; }
.dc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dc-head h4 { margin: 0; }
.dc-head p { margin: 0; font-size: .85rem; }
.dc-ico { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); }
.dc-head .switch { margin-inline-start: auto; }
.switch { position: relative; width: 52px; height: 30px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; top: 3px; inset-inline-start: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--green); }
html[dir="ltr"] .switch input:checked + span::before { transform: translateX(22px); }
html[dir="rtl"] .switch input:checked + span::before { transform: translateX(-22px); }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin: 12px 0; font-size: .9rem; font-weight: 500; }
.slider-row input { grid-column: 1 / -1; grid-row: 2; }
.slider-row output { grid-row: 1; grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums; }
.slider-row.big output { font-size: 1.5rem; color: var(--teal); }
[data-theme="dark"] .slider-row.big output { color: var(--yellow); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(to left, var(--teal) var(--p, 50%), var(--line) 0); outline: none; }
html[dir="ltr"] input[type=range] { background: linear-gradient(to right, var(--teal) var(--p, 50%), var(--line) 0); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); cursor: pointer; }
#hs-temp { background: linear-gradient(to left, #E4A72E, #3BB273 45%, #2AB7CA 70%, #2B7BE4); }
html[dir="ltr"] #hs-temp { background: linear-gradient(to right, #2B7BE4, #2AB7CA 30%, #3BB273 55%, #E4A72E); }
.temp-out { font-size: 1.6rem; color: var(--tc); }
.temp-note { font-size: .88rem; padding: 6px 10px; border-radius: 10px; margin: 0 0 6px; }
.temp-note.bad { background: rgba(228, 87, 46, .1); color: #c2410c; }
.temp-note.good { background: rgba(59, 178, 115, .12); color: #1f7a4c; }
[data-theme="dark"] .temp-note.bad { color: #ffab8f; }
[data-theme="dark"] .temp-note.good { color: #8fe0b3; }
.dc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.dc-stats div { background: var(--bg-2); border-radius: 12px; padding: 8px; text-align: center; }
.dc-stats b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.dc-stats span { font-size: .72rem; color: var(--muted); }
.tip { background: rgba(249, 200, 14, .14); border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin: 0; }
.room-devs { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.room-devs li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; }
.chip { border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; opacity: .6; }
.chip.on { opacity: 1; border-color: var(--yellow); background: rgba(249, 200, 14, .15); }
.room-sum { margin: 0; font-size: .9rem; }
.donut-wrap { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; }
.donut circle { transition: stroke-dasharray .45s, stroke-dashoffset .45s; }
.d-big { font-size: 22px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.d-small { font-size: 12px; fill: var(--muted); font-family: inherit; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .82rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.legend.inline { display: flex; gap: 18px; justify-content: center; margin-top: 14px; }
.sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.fine { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* calculator */
.calc-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 22px; box-shadow: var(--shadow); }
.receipt { background: var(--card); border-radius: 22px; padding: 26px; box-shadow: 0 24px 50px rgba(11, 79, 108, .16); border: 1px solid var(--line); position: relative; }
.receipt::after { content: ""; position: absolute; inset-inline: 18px; bottom: -10px; height: 20px; background: radial-gradient(circle at 10px 0, transparent 9px, var(--card) 10px) repeat-x; background-size: 20px 20px; }
.r-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 2px dashed var(--line); margin-bottom: 8px; font-size: 1.1rem; }
.r-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.r-row b { font-variant-numeric: tabular-nums; }
.r-row.total { border-bottom: 0; font-size: 1.25rem; font-weight: 700; }
.r-row.total b { color: var(--teal); }
[data-theme="dark"] .r-row.total b { color: var(--yellow); }
.r-save { margin-top: 12px; background: linear-gradient(135deg, rgba(59, 178, 115, .16), rgba(249, 200, 14, .16)); border-radius: 16px; padding: 16px; text-align: center; }
.r-save b { display: block; font-size: 1.9rem; color: var(--green); }
.r-save small { color: var(--muted); }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { border-radius: 20px; padding: 22px; color: #fff; position: relative; overflow: hidden; }
.stat b { font-size: 2.3rem; display: inline-block; font-variant-numeric: tabular-nums; }
.stat small { margin-inline-start: 6px; opacity: .85; }
.stat p { margin: 6px 0 0; opacity: .92; }
.stat cite { position: absolute; top: 12px; inset-inline-end: 14px; font-size: .7rem; font-style: normal; background: rgba(255, 255, 255, .2); padding: 2px 8px; border-radius: 99px; }
.s1 { background: linear-gradient(135deg, #0B4F6C, #12709a); }
.s2 { background: linear-gradient(135deg, #2B7BE4, #2AB7CA); }
.s3 { background: linear-gradient(135deg, #3BB273, #2a8f5a); }
.s4 { background: linear-gradient(135deg, #f0a500, #F9C80E); color: #10222B; }
.s4 cite { background: rgba(0, 0, 0, .1); }
.info-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 14px; margin-bottom: 18px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.info-card h3 { font-size: 1.1rem; }
.big-donut { width: 190px; aspect-ratio: 1; border-radius: 50%; margin: 10px auto 0; background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--line-strong) 0); display: grid; place-items: center; }
.big-donut > div { width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.big-donut b { font-size: 2rem; color: var(--teal); line-height: 1; }
[data-theme="dark"] .big-donut b { color: var(--yellow); }
.bars { display: grid; gap: 12px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: 1fr 110px 78px; gap: 10px; align-items: center; font-size: .88rem; }
.bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--green), #6ad69b); border-radius: 99px; }
.bar.warn i { background: linear-gradient(90deg, #f0a500, var(--red)); }
.bar-row b { text-align: end; font-variant-numeric: tabular-nums; }
.thermo .t-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0; }
.t-scale span { background: var(--c); color: #fff; border-radius: 12px; padding: 10px 4px; text-align: center; font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; }
.t-scale em { font-style: normal; font-size: .75rem; opacity: .9; font-weight: 500; }
.t-scale .best { outline: 3px solid var(--yellow); outline-offset: 2px; }
.thermo p { font-size: .9rem; color: var(--muted); margin: 0; }
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tip-card { display: grid; grid-template-columns: 110px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); align-items: center; }
.tip-card img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.tip-card h4 { margin: 0 0 4px; }
.tip-card p { margin: 0; font-size: .88rem; color: var(--muted); }

/* vision */
.vision-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; }
.mix-card { display: flex; flex-direction: column; justify-content: center; }
.mix-card, .proj { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; padding: 22px; }
.mix-bar { display: flex; height: 54px; border-radius: 14px; overflow: hidden; margin: 14px 0 18px; font-weight: 700; font-size: .9rem; }
.mix-bar i { font-style: normal; width: var(--w); display: grid; place-items: center; }
.mix-bar .ren { background: linear-gradient(90deg, var(--green), var(--yellow)); color: #10222B; }
.mix-bar .gas { background: rgba(255, 255, 255, .18); }
.mix-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.mix-split b { display: block; font-size: 2rem; color: var(--yellow); line-height: 1.1; }
.mix-split small { opacity: .8; }
.proj { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
.proj img { border-radius: 16px; aspect-ratio: 1; object-fit: cover; }
.proj-list { display: grid; gap: 10px; }
.p-item { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .08); padding: 10px 14px; border-radius: 14px; }
.p-ico { font-size: 1.5rem; }
.p-item b { display: block; }
.p-item small { opacity: .8; }

/* challenge */
.challenge { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.day h5 { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.task { display: block; width: 100%; border: 1px dashed var(--line-strong); background: transparent; border-radius: 10px; padding: 8px 0; margin-bottom: 6px; font-size: 1.3rem; cursor: pointer; filter: grayscale(1) opacity(.5); transition: .2s; }
.task.done { filter: none; background: rgba(59, 178, 115, .15); border: 1px solid var(--green); }
.day.full { border-color: var(--green); }
.ring-wrap { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.ring { --p: 0; width: 110px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; position: relative; transition: background .3s; }
.ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--bg); }
.ring b { position: relative; font-size: 1.4rem; }
.ch-legend { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.pledge { margin-top: 36px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; background: linear-gradient(135deg, rgba(59, 178, 115, .14), rgba(249, 200, 14, .18)); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.pledge h3 { font-size: 1.5rem; }
.pledge p { margin: 0; }
.pledge-act { text-align: center; display: grid; gap: 10px; justify-items: center; }
.pledge-count b { font-size: 2rem; color: var(--green); }

/* campaign */
.camp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.camp-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.camp-stats b { display: block; font-size: 2rem; color: var(--teal); line-height: 1.1; }
[data-theme="dark"] .camp-stats b { color: var(--yellow); }
.camp-stats span { color: var(--muted); font-size: .9rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.g-item { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.g-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.g-item:hover img { transform: scale(1.04); }
.g-item p { margin: 0; padding: 10px 12px; font-size: .88rem; font-weight: 500; }
.follow { display: flex; gap: 22px; align-items: center; margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); width: fit-content; margin-inline: auto; }
.follow img { border-radius: 12px; background: #fff; }

/* sources */
.sources { display: grid; gap: 10px; padding-inline-start: 22px; }
.sources li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: .93rem; }

/* team */
.team { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.member { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 10px; text-align: center; box-shadow: var(--shadow); }
.av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; font-size: 1.6rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--teal), var(--green)); }
.member:nth-child(2n) .av { background: linear-gradient(135deg, var(--green), var(--yellow)); }
.member:nth-child(3n) .av { background: linear-gradient(135deg, #2B7BE4, var(--teal)); }

.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-in p { margin: 0; color: var(--muted); }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 1100px) {
  .links { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .links.open { display: flex; }
  .menu-btn { display: block; }
  .nav-tools { margin-inline-start: auto; }
  .house-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-grid .info-card:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .team { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero-in, .two, .vision-grid, .pledge { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin-inline: auto; }
  .meter { grid-template-columns: 1fr 1fr; }
  .stat-grid, .camp-stats { grid-template-columns: 1fr 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr; }
  .challenge { grid-template-columns: repeat(4, 1fr); }
  .proj { grid-template-columns: 1fr; }
  .tier { flex-direction: column; align-items: stretch; }
  .tier-bar { flex-basis: auto; }
}
@media (max-width: 700px) {
  .plan-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .house-svg { min-width: 680px; }
  .plan-wrap::after { content: "↔"; display: block; text-align: center; color: var(--muted); font-size: .8rem; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 1fr 70px; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .follow { flex-direction: column; text-align: center; }
  .m-card.big .m-val b { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

html, body { overflow-x: clip; }
@media (max-width: 520px) {
  .brand small { display: none; }
  .brand b { white-space: nowrap; font-size: 1.05rem; }
  .lang-switch button { padding: 6px 8px; }
}
