/* Home8 public website: page layout and the screen illustrations. Colours, spacing, radii and type come from the App8 design system tokens. */

/* page layout */
.h8-wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--space-5); padding-right: var(--space-5); box-sizing: border-box; }
.h8-narrow { max-width: 820px; }
.h8-sec { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.h8-soft { background: var(--surface-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h8-h2 { margin: 0 0 var(--space-6); }
.h8-c { text-align: center; }
.h8-lead { font-size: 18px; line-height: 30px; color: var(--ink-muted); margin: 0 0 var(--space-6); max-width: 620px; }
.h8-lead.h8-c { margin-left: auto; margin-right: auto; }
.h8-small { font-size: 13px; color: var(--ink-muted); margin-top: var(--space-6); }
.h8-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-12); align-items: center; }
@media (max-width: 860px) { .h8-split { grid-template-columns: 1fr; } }

/* devices */
.h8-dev { position: relative; }
.h8-bezel { background: #11151B; border-radius: var(--radius-lg); padding: 8px; box-shadow: 0 18px 40px rgba(28,36,48,.18); }
.h8-tv { width: 420px; }
.h8-tv .h8-bezel { border-radius: 10px; padding: 7px; }
.h8-tv .h8-screen { aspect-ratio: 16 / 9; }
.h8-foot { width: 120px; height: 10px; margin: 0 auto; background: #11151B; border-radius: 0 0 8px 8px; }
.h8-tablet { width: 300px; }
.h8-tablet .h8-screen { aspect-ratio: 16 / 10; }
.h8-wall { width: 210px; }
.h8-wall .h8-bezel { border-radius: var(--radius-xl); padding: 10px; background: #E4E7EB; }
.h8-wall .h8-screen { aspect-ratio: 1 / 1; border-radius: var(--radius-md); }
.h8-phone { width: 150px; }
.h8-phone .h8-bezel { border-radius: 26px; padding: 7px; }
.h8-phone .h8-screen { aspect-ratio: 9 / 18; border-radius: 20px; }

/* screen content */
.h8-screen { background: var(--surface); color: var(--ink); border-radius: 6px; padding: 10px; box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; font-size: 10px; line-height: 13px; }
.h8-screen[data-theme="dark"] { background: #1C2430; }
.h8-sh { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.h8-sh b { font-size: 13px; line-height: 16px; } .h8-sh span { color: var(--ink-muted); font-size: 9px; }
.h8-grid { display: grid; gap: 6px; flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.h8-grid-2 { grid-template-columns: repeat(2, 1fr); }
.h8-grid-3 { grid-template-columns: repeat(3, 1fr); }
.h8-grid-tv { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: minmax(0,1fr) minmax(0,1fr); }
.h8-grid-tv .h8-agenda { grid-row: span 2; }
.h8-tile, .h8-agenda { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 8px; padding: 6px 7px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; min-height: 0; overflow: hidden; }
.h8-screen[data-theme="dark"] .h8-tile, .h8-screen[data-theme="dark"] .h8-agenda { background: #2A3245; border-color: transparent; }
.h8-tile-ic { color: var(--accent-brand); margin-bottom: auto; }
.h8-tile-l { color: var(--ink-muted); font-size: 9px; }
.h8-tile b { font-size: 11px; }
.h8-tile.h8-on { background: var(--home8-fill); color: var(--home8-on-fill); border-color: transparent; }
.h8-tile.h8-on .h8-tile-ic, .h8-tile.h8-on .h8-tile-l { color: var(--home8-on-fill); }
.h8-agenda { justify-content: flex-start; gap: 5px; }
.h8-ev { border-left: 3px solid var(--home8); padding-left: 6px; display: flex; flex-direction: column; }
.h8-ev small { color: var(--ink-muted); font-size: 8px; line-height: 10px; } .h8-ev b { font-size: 11px; }
.h8-ev-2 { border-color: #F5C400; } .h8-ev-3 { border-color: #12A8E0; }
.h8-big { font-size: 28px; line-height: 30px; font-weight: 700; }

/* six designs */
.h8-designs { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-3); }
.h8-split > .h8-designs { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .h8-designs { grid-template-columns: repeat(3, 1fr); } }
.h8-mini { aspect-ratio: 1 / 1; border-radius: var(--radius-lg); padding: 10px; box-sizing: border-box; overflow: hidden; border: 6px solid #11151B;
  display: flex; flex-direction: column; gap: 6px; font-size: 9px; line-height: 12px; background: var(--surface-raised); color: var(--ink); }
.h8-mini .h8-sh b { font-size: 11px; }
.h8-mini-b { background: #F4EBDD; } .h8-mini-c { background: #13424A; color: #fff; } .h8-mini-c .h8-sh span { color: #BFD4D7; }
.h8-mini-d { background: #FDF6EE; } .h8-mini-d .h8-tile.h8-on { background: #F2A99A; color: #1C2430; } .h8-mini-d .h8-tile.h8-on .h8-tile-ic, .h8-mini-d .h8-tile.h8-on .h8-tile-l { color: #1C2430; }
.h8-mini-f { background: #0F1115; color: #fff; }
.h8-clock { font-size: 30px; line-height: 34px; font-weight: 700; }
.h8-list { display: flex; flex-direction: column; gap: 3px; margin-top: auto; } .h8-list span::before { content: "•"; color: var(--home8); margin-right: 4px; }
.h8-ring { width: 54%; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; border: 9px solid #F5C400; border-right-color: #12A8E0; border-bottom-color: #3FB37F; }
.h8-bars { display: flex; align-items: flex-end; gap: 4px; flex: 1; } .h8-bars i { flex: 1; background: var(--line); border-radius: 3px; height: 45%; }
.h8-bars i:nth-child(2) { height: 60%; } .h8-bars i:nth-child(4) { height: 55%; } .h8-bars i:nth-child(5) { height: 35%; } .h8-bars i.h8-hi { height: 90%; background: var(--home8); }
.h8-kwh { font-size: 12px; }
@media (max-width: 600px) { .h8-designs, .h8-split > .h8-designs { grid-template-columns: repeat(2, 1fr); } }

/* homepage */
.h8-stage { background: linear-gradient(to bottom, var(--surface) 0 35%, var(--home8-soft) 35% 100%); padding-bottom: var(--space-12); }
.h8-stage-in { display: flex; justify-content: center; align-items: flex-end; gap: var(--space-6); }
.h8-stage .h8-tv { width: 560px; } .h8-stage .h8-tablet { width: 280px; } .h8-stage .h8-phone { width: 130px; }
@media (max-width: 860px) { .h8-stage .h8-tablet, .h8-stage .h8-phone { display: none; } .h8-stage .h8-tv { width: 100%; } }
.h8-day { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
@media (max-width: 1100px) { .h8-day { grid-template-columns: repeat(2, 1fr); } }
.h8-day-i { display: flex; flex-direction: column; align-items: center; text-align: center; }
.h8-day-t { display: inline-flex; gap: var(--space-2); align-items: center; font-weight: 700; color: var(--accent); margin-bottom: var(--space-4); }
.h8-day-i .h8-dev { max-width: 100%; } .h8-day-i .h8-tablet { width: 220px; } .h8-day-i .h8-tv { width: 230px; } .h8-day-i { justify-content: flex-start; } .h8-day-i h3 { margin-top: auto; padding-top: var(--space-5); } .h8-day-i .h8-wall { width: 170px; } .h8-day-i .h8-phone { width: 110px; }
.h8-day-i h3 { margin: var(--space-5) 0 var(--space-2); font-size: 18px; line-height: 26px; }
.h8-day-i p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
@media (max-width: 860px) { .h8-day { grid-template-columns: 1fr; } }
.h8-paths { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); max-width: 900px; margin: 0 auto; }
@media (max-width: 760px) { .h8-paths { grid-template-columns: 1fr; } }

.h8-grid-1 { grid-template-columns: 1fr; }
.h8-phone .h8-sh { flex-direction: column; gap: 0; }
.h8-phone .h8-tile-ic { display: none; }
.h8-day-dev { height: 220px; display: flex; align-items: center; justify-content: center; width: 100%; }
.h8-day-i h3 { margin-top: var(--space-4); padding-top: 0; }
.h8-form { display: flex; flex-direction: column; gap: var(--space-4); }
.h8-dlg-lead { margin: 0 0 var(--space-4); color: var(--ink-muted); }
.h8-yes { color: var(--success); display: inline-flex; } .h8-no { color: var(--ink-disabled); font-weight: 700; }
.h8-yes, .h8-no { position: relative; }
.h8-tech { margin: 0 auto; }
.h8-compare th:not(:first-child), .h8-compare td:not(:first-child) { text-align: center; width: 28%; }

.h8-badge-row { margin-bottom: var(--space-4); }

/* devices page */
.h8-devgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.h8-devgrid-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: var(--space-8); }
@media (max-width: 1100px) { .h8-devgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .h8-devgrid, .h8-devgrid-wall { grid-template-columns: 1fr; } }
.h8-dev-card { display: flex; flex-direction: column; gap: var(--space-3); }
.h8-dev-card > p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.h8-dev-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.h8-dev-head h3 { margin: 0; font-size: 18px; line-height: 26px; }
.h8-dev-pic { height: 200px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.h8-dev-pic .h8-tv { width: 230px; } .h8-dev-pic .h8-tablet { width: 200px; } .h8-dev-pic .h8-wall { width: 150px; }
.h8-dev-pair .h8-tablet { width: 170px; } .h8-dev-pair .h8-phone { width: 70px; }
.h8-dev-pic .h8-wall-wide { width: 220px; } .h8-dev-pic .h8-wall-tall { width: 120px; } .h8-dev-pic .h8-wall-round { width: 150px; }
.h8-wall-wide .h8-screen { aspect-ratio: 5 / 3; }
.h8-wall-tall .h8-screen { aspect-ratio: 10 / 16; }
.h8-wall-round .h8-bezel { border-radius: 50%; } .h8-wall-round .h8-screen { aspect-ratio: 1; border-radius: 50%; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.h8-round-screen small { color: var(--ink-muted); font-size: 10px; } .h8-round-set { color: var(--accent-brand); font-size: 10px; }
.h8-browser { width: 230px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-raised); box-shadow: 0 12px 30px rgba(28,36,48,.12); }
.h8-browser-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--surface-sunken); font-size: 9px; color: var(--ink-muted); }
.h8-browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); } .h8-browser-bar span { margin-left: 8px; }
.h8-browser .h8-screen { aspect-ratio: 16 / 10; border-radius: 0; }
.h8-dev-pic > * { max-width: 88%; } .h8-dev-pair > .h8-tablet { max-width: 62%; } .h8-dev-pair > .h8-phone { max-width: 28%; width: 84px; }
.h8-wall-tall .h8-phone-like, .h8-wall-tall .h8-sh { flex-direction: column; gap: 0; }

/* ===== varied designs: everything in cqw so it scales with the screen ===== */
.h8-bezel, .h8-browser { container-type: inline-size; }
.h8-screen.d { padding: 5cqw; gap: 3cqw; font-size: 4.2cqw; line-height: 1.25; position: relative; }
.d small { font-size: .8em; opacity: .75; } .d b { font-weight: 700; }
.d svg { width: 1.1em; height: 1.1em; }
.d-head { display: flex; justify-content: space-between; align-items: baseline; } .d-head b { font-size: 1.15em; }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 4cqw; }
.d-clock { font-size: 2.6em; line-height: 1; letter-spacing: -.02em; display: block; }
.d .d-arc { width: 100%; height: auto; display: block; }
/* TV: photo + clock + agenda */
.d-tv { background: #2A2340 !important; color: #fff; flex-direction: row; justify-content: space-between; align-items: flex-end; overflow: hidden; }
.d-photo { position: absolute; inset: 0; background:
  radial-gradient(circle at 78% 22%, #FFD9A0 0 6%, transparent 7%),
  linear-gradient(to bottom, #F2A65A 0%, #E0735A 35%, #7D4C7A 60%, transparent 61%),
  linear-gradient(170deg, transparent 58%, #3D2F4F 59%, #2A2340 100%); }
.d-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 60%); }
.d-tv-left, .d-tv-agenda { position: relative; display: flex; flex-direction: column; gap: 1cqw; }
.d-tv-left .d-clock { font-size: 3.4em; } .d-tv-left span { font-size: .85em; } .d-wx { display: inline-flex; gap: .4em; align-items: center; }
.d-tv-agenda { background: rgba(20,16,36,.55); backdrop-filter: blur(4px); border-radius: 2.5cqw; padding: 2.5cqw 3cqw; font-size: .7em; white-space: nowrap; }
.d-tv-agenda p { margin: 0; display: flex; gap: .5em; align-items: center; } .d-tv-agenda span { opacity: .7; }
.d-tv-agenda i { width: .5em; height: .5em; border-radius: 50%; } .c1 { background: #FF8A4C; } .c2 { background: #F5C400; } .c3 { background: #5BE3A4; }
/* kitchen */
.d-kitchen { background: #F4EBDD; color: #3B2A20; }
.d-kitchen .d-row > div:first-child span { font-size: .9em; }
.d-timer { position: relative; width: 26cqw; text-align: center; } .d-timer b { position: absolute; left: 0; right: 0; top: 34%; font-size: 1.1em; } .d-timer small { position: absolute; left: 0; right: 0; bottom: 6%; font-size: .7em; }
.d-chips { display: flex; gap: 2cqw; flex-wrap: wrap; } .d-chips span { display: inline-flex; gap: .3em; align-items: center; padding: 1.2cqw 2.4cqw; border-radius: 99px; background: #fff; font-size: .8em; font-weight: 600; }
.d-chips .on { background: #C2553A; color: #fff; } .d-chips .on2 { background: #F5C400; color: #3B2A20; }
.d-list { margin-top: auto; background: #fff; border-radius: 2.5cqw; padding: 2cqw 3cqw; display: flex; flex-direction: column; font-size: .85em; }
/* energy */
.d-energy { background: #13424A; color: #fff; }
.d-ring { position: relative; width: 36cqw; flex: none; } .d-ring svg { width: 100%; height: auto; } .d-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.3em; } .d-ring b small { display: block; font-size: .5em; margin-top: -1.8em; }
.d-stats { display: flex; flex-direction: column; gap: 1.6cqw; font-size: .85em; flex: 1; } .d-stats p { margin: 0; display: flex; align-items: center; gap: .45em; } .d-stats b { margin-left: auto; }
.d-stats i { width: .65em; height: .65em; border-radius: 3px; flex: none; }
.d-line { width: 100% !important; height: 12cqw !important; margin-top: auto; }
/* status (phone) */
.d-status { background: #F6F7F9; color: #1C2430; gap: 2.4cqw; }
.d-status p { margin: 0; display: flex; align-items: center; gap: .5em; background: #fff; border-radius: 3cqw; padding: 2.6cqw 3cqw; font-size: .95em; position: relative; flex-wrap: wrap; }
.d-status p b { margin-left: auto; } .d-status .ok svg { color: #1E7D46; } .d-status .warn { background: #FDECEA; } .d-status .warn svg, .d-status .warn b { color: #C0392B; }
.d-status .bar svg { color: #12A8E0; } .d-status .bar i { flex-basis: 100%; height: 1.6cqw; background: #E3F4FB; border-radius: 9px; } .d-status .bar em { display: block; width: 72%; height: 100%; background: #12A8E0; border-radius: 9px; }
/* week graph (browser) */
.d-week { background: #fff; color: #1C2430; }
.d-bars { flex: 1; display: flex; align-items: flex-end; gap: 2.4cqw; } .d-bars i { flex: 1; background: #C9D7F2; border-radius: 1.4cqw 1.4cqw 0 0; } .d-bars .hi { background: #3B6FD8; } .d-bars .lo { background: #E6ECF7; }
.d-days { display: flex; gap: 2.4cqw; font-size: .7em; color: #5B6573; } .d-days span { flex: 1; text-align: center; }
/* climate (4") */
.d-climate { background: #1B2A4A; color: #fff; align-items: center; }
.d-climate .d-head { width: 100%; } .d-climate .d-head small { color: #FF8A4C; opacity: 1; }
.d-dial { position: relative; width: 62cqw; margin-top: -2cqw; } .d-dial b { position: absolute; left: 0; right: 0; top: 36%; text-align: center; font-size: 2.2em; } .d-dial small { position: absolute; left: 0; right: 0; top: 64%; text-align: center; }
.d-pm { display: flex; gap: 3cqw; margin-top: -8cqw; } .d-pm span { width: 13cqw; height: 13cqw; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 1.4em; } .d-pm .m { width: auto; padding: 0 4cqw; border-radius: 99px; font-size: .85em; background: #FF8A4C; color: #1B2A4A; font-weight: 700; }
/* kids (4.3") */
.d-kids { background: #FFF6EC; color: #2E2A3A; }
.d-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4cqw; flex: 1; }
.d-tiles p { margin: 0; border-radius: 3cqw; padding: 2.4cqw; display: flex; flex-direction: column; justify-content: space-between; font-size: .8em; font-weight: 600; }
.d-tiles svg { width: 1.6em; height: 1.6em; }
.d-tiles .p1 { background: #CDB8F5; } .d-tiles .p2 { background: #A9E4D3; } .d-tiles .p3 { background: #FFD08A; } .d-tiles .p4 { background: #F7B2C4; }
.d-slider { display: flex; align-items: center; gap: 2cqw; } .d-slider i { flex: 1; height: 2.4cqw; background: rgba(0,0,0,.08); border-radius: 9px; } .d-slider em { display: block; width: 40%; height: 100%; background: #8E6CEB; border-radius: 9px; }
/* agenda (10" tall) */
.d-agenda { background: #F5F3FF; color: #2A2440; gap: 4cqw; }
.d-wxbig { display: flex; align-items: center; gap: 3cqw; color: #2A2440; } .d-wxbig svg { width: 2.2em; height: 2.2em; color: #F5A623; } .d-wxbig b { font-size: 2.4em; } .d-wxbig small { line-height: 1.2; }
.d-month small { font-weight: 700; opacity: 1; } .d-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1cqw; margin-top: 2cqw; font-size: .7em; text-align: center; }
.d-cal span { padding: 1cqw 0; border-radius: 99px; } .d-cal .today { background: #6C5CE7; color: #fff; font-weight: 700; } .d-cal .ev { box-shadow: inset 0 -.25em 0 #FF8A4C; }
.d-evs { display: flex; flex-direction: column; gap: 2cqw; } .d-evs p { margin: 0; background: #fff; border-radius: 3cqw; padding: 2.4cqw 3cqw; display: flex; align-items: center; gap: .6em; font-size: .85em; }
.d-evs i { width: 1.2cqw; align-self: stretch; border-radius: 9px; }
/* round thermostat */
.d-round { background: #0F3D2E; color: #fff; display: grid !important; place-items: center; padding: 7cqw !important; }
.d-round .d-arc { position: absolute; inset: 7cqw; width: calc(100% - 14cqw); }
.d-round-in { display: flex; flex-direction: column; align-items: center; } .d-round-in b { font-size: 3.6em; line-height: 1; } .d-round-in .g { color: #5BE3A4; opacity: 1; }
/* media (7") */
.d-media { background: linear-gradient(135deg, #2B1B3F, #4A2A5E); color: #fff; flex-direction: row; align-items: center; gap: 5cqw; }
.d-album { width: 34cqw; aspect-ratio: 1; flex: none; border-radius: 3cqw; background: radial-gradient(circle at 30% 30%, #FFB86B, #E0567A 45%, #6C3AA8 80%); box-shadow: 0 2cqw 6cqw rgba(0,0,0,.35); }
.d-np { display: flex; flex-direction: column; gap: 1.2cqw; flex: 1; } .d-np b { font-size: 1.4em; } .d-np span { opacity: .75; font-size: .9em; }
.d-ctrl { display: flex; gap: 3cqw; margin: 2cqw 0; } .d-ctrl span { width: 10cqw; height: 10cqw; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); } .d-ctrl .play { background: #fff; color: #4A2A5E; }
.d-media .d-slider em { background: #FFB86B; width: 60%; } .d-media .d-slider i { background: rgba(255,255,255,.2); }
.d-remind { margin-top: auto; display: flex; gap: .5em; align-items: center; background: #6C5CE7; color: #fff; border-radius: 3cqw; padding: 3cqw; font-size: .85em; font-weight: 600; }
.d-chips-agenda .on { background: #6C5CE7; color: #fff; }

/* pricing page */
.h8-split-even { grid-template-columns: 1.2fr 1fr; }
.h8-price-card { display: flex; flex-direction: column; gap: var(--space-4); }
.h8-price { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-4) 0; }
.h8-price b { font-size: 64px; line-height: 72px; color: var(--accent-brand); }
.h8-full { width: 100%; justify-content: center; }
@media (max-width: 860px) { .h8-split-even { grid-template-columns: 1fr; } }

/* getting started page */
.h8-start-choice { margin-top: calc(-1 * var(--space-6)); padding-bottom: var(--space-12); }
.h8-split-top { align-items: start; }
.h8-how-col { grid-template-columns: 1fr; gap: var(--space-5); }
.h8-how-col li { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-4); align-items: start; }
.h8-how-col li h3 { margin-top: 6px; } .h8-how-col li p { grid-column: 2; }
.h8-how-col .a8-how-n { grid-row: span 2; }
.h8-start-side { display: flex; flex-direction: column; gap: var(--space-5); }
.h8-where-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.h8-where-list li { display: flex; gap: var(--space-3); align-items: flex-start; } .h8-where-list svg { color: var(--accent-brand); flex: none; margin-top: 2px; }
.h8-where-list span { display: flex; flex-direction: column; color: var(--ink-muted); font-size: 15px; line-height: 22px; } .h8-where-list b { color: var(--ink); }
.h8-start-pic { height: 240px; }
.h8-start-choice { margin-top: calc(-1 * var(--space-8)); padding-bottom: var(--space-8); }
.h8-flow-switch { max-width: 100%; }
@media (max-width: 640px) { .h8-flow-switch { display: flex; } .h8-flow-switch button { flex: 1; white-space: normal; } }
/* faq page */
.h8-faqgroup + .h8-faqgroup { margin-top: var(--space-8); }
.h8-h3 { margin: 0 0 var(--space-4); font-size: 20px; line-height: 28px; }
.h8-faq-switch { max-width: 100%; overflow-x: auto; }
@media (max-width: 640px) { .h8-faq-switch { display: flex; flex-wrap: wrap; justify-content: center; } }
/* legal pages */
.h8-hero-sm h1 { font-size: 48px; line-height: 56px; }
.h8-legal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.h8-legal-toc { position: sticky; top: var(--space-6); }
@media (max-width: 900px) { .h8-legal { grid-template-columns: minmax(0, 1fr); } .h8-legal-toc { position: static; } }
/* prose: long text (DS has no component for it yet) */
.h8-prose { max-width: 760px; font-size: 16px; line-height: 27px; }
.h8-prose h2 { font-size: 22px; line-height: 30px; margin: var(--space-12) 0 var(--space-4); scroll-margin-top: var(--space-6); }
.h8-prose p { margin: 0 0 var(--space-4); } .h8-prose ul { margin: 0 0 var(--space-4); padding-left: 1.3em; } .h8-prose li { margin-bottom: var(--space-2); }
.h8-prose a { color: var(--link); } .h8-prose code { font-family: var(--font-mono); font-size: 14px; background: var(--surface-sunken); padding: 1px 6px; border-radius: 4px; }
.h8-prose .a8-table-wrap { margin: 0 0 var(--space-4); }
.h8-prose .a8-alert p { margin: 0 0 var(--space-2); } .h8-prose .a8-alert p:last-child { margin: 0; }
.h8-legal-toc .a8-sidenav { min-width: 0; } .h8-legal-toc .a8-sidenav-link, .h8-legal-toc .a8-sidenav-link span { white-space: normal; min-width: 0; }

/* long words (e.g. "Toegankelijkheidsverklaring") never push the page wider on a phone */
.a8-hero h1, .h8-prose h2 { overflow-wrap: break-word; }
.h8-hero-sm h1 { hyphens: auto; }
@media (max-width: 640px) { .h8-hero-sm h1 { font-size: 32px; line-height: 40px; } }
.h8-full { box-sizing: border-box; }

/* two columns side by side: long text never pushes past the screen edge on a narrow screen */
.h8-split > *, .h8-how-col li > * { min-width: 0; }
.h8-how-col li h3, .h8-how-col li p { overflow-wrap: break-word; }

/* "Toevoegen aan Home Assistant": Home Assistant's button style (their blue, pill shape) with our translated text,
   and their "MY" + logo chip taken unchanged from their official badge (assets/img/ha-my-chip.svg) */
.h8-ha-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 22px; box-sizing: border-box; border-radius: 999px;
  background: #18BCF2; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.h8-ha-btn img { display: block; height: 32px; width: auto; }
.h8-ha-btn:hover { background: #0FA8DB; color: #fff; }
.h8-ha-btn:focus-visible { outline: 3px solid #18BCF2; outline-offset: 3px; }
.h8-add .h8-ha-btn { width: 100%; justify-content: center; }
.h8-add { margin: var(--space-2) 0 0; }
.h8-addr { margin: var(--space-2) 0 0; overflow-wrap: anywhere; }
.h8-addr code { font-family: var(--font-mono); font-size: 14px; background: var(--surface-sunken); padding: 2px 8px; border-radius: 4px; }

/* /agent: home → Home8 → screens */
.h8-flow3 { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: var(--space-4); align-items: center; }
.h8-flow-node { height: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.h8-flow-node h3 { margin: var(--space-3) 0 var(--space-2); font-size: 18px; line-height: 26px; }
.h8-flow-node p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.h8-flow-ic { width: 52px; height: 52px; border-radius: var(--radius-icon); display: grid; place-items: center; background: var(--home8-fill); color: var(--home8-on-fill); }
.h8-flow-arrow { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); color: var(--accent-brand); }
.h8-flow-arrow small { color: var(--ink-muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 860px) { .h8-flow3 { grid-template-columns: minmax(0,1fr); } .h8-flow-arrow { flex-direction: row; justify-content: center; } .h8-flow-arrow svg { transform: rotate(90deg); } }
.h8-features-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .h8-features-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .h8-features-3 { grid-template-columns: minmax(0, 1fr); } }
.h8-stage .h8-wall { width: 230px; }

/* ===== homepage screens v2: sizes in em, the em in cqw of the screen, so they fill and scale ===== */
.h8-screen.s { position: relative; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; line-height: 1.2; }
.s svg { width: 1.25em; height: 1.25em; flex: none; }
.s b { font-weight: 700; }
.s-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5em; }
.s-head b { font-size: 1.25em; } .s-head span { display: inline-flex; align-items: center; gap: .3em; opacity: .7; font-size: .85em; }
.s-head span svg { width: 1.1em; height: 1.1em; }
.s-tile { border-radius: .7em; padding: .6em .7em; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; min-width: 0; background: var(--surface-raised); border: 1px solid var(--line); }
.s-tile .s-ic { color: var(--accent-brand); } .s-tile .s-ic svg { width: 1.6em; height: 1.6em; } .s-tile .s-l { font-size: .8em; opacity: .7; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-tile b { font-size: 1.45em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-tile.on { background: var(--home8-fill); color: var(--home8-on-fill); border-color: transparent; } .s-tile.on .s-ic { color: inherit; } .s-tile.on .s-l { opacity: .85; }
.s-tile.ok .s-ic { color: #1E7D46; }
.s-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: .5em; flex: 1; min-height: 0; }
.s-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* TV 16:9: now · agenda · tiles */
.s-tv { font-size: 2.3cqw; padding: 3cqw; display: grid !important; grid-template-columns: 1fr 1.15fr 1.35fr; gap: 2cqw; background: #1C2430 !important; color: #fff; aspect-ratio: 16 / 9; }
.s-tv .s-tile { background: #2A3245; border-color: transparent; color: #fff; }
.s-tv .s-tile.on { background: var(--home8-fill); }
.s-tv .s-tile.ok .s-ic { color: #5BE3A4; }
.s-tv .s-tile.bar { position: relative; } .s-tv .s-tile.bar::after { content: ""; position: absolute; left: .7em; right: .7em; bottom: .45em; height: .25em; border-radius: 9px; background: linear-gradient(to right, #12A8E0 72%, rgba(255,255,255,.15) 72%); }
.s-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.s-now .s-room { font-size: .8em; opacity: .6; text-transform: uppercase; letter-spacing: .08em; }
.s-clock { font-size: 3.4em; line-height: 1; letter-spacing: -.02em; margin: .1em 0; }
.s-date { font-size: .85em; opacity: .75; } .s-wx { display: flex; align-items: center; gap: .4em; margin-top: .5em; font-size: .9em; } .s-wx svg { color: #BFD4D7; }
.s-sun { margin-top: auto; background: #2A3245; border-radius: .7em; padding: .6em .7em; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3em; }
.s-sun span { display: inline-flex; align-items: center; gap: .35em; font-size: .8em; opacity: .8; } .s-sun svg { color: #F5C400; }
.s-sun i { flex-basis: 100%; height: .3em; border-radius: 9px; background: rgba(255,255,255,.15); } .s-sun em { display: block; width: 64%; height: 100%; border-radius: 9px; background: #F5C400; }
.s-agenda { background: #2A3245; border-radius: .7em; padding: .7em .8em; gap: .55em; }
.s-agenda small { font-size: .8em; opacity: .6; text-transform: uppercase; letter-spacing: .08em; }
.s-ev { margin: 0; border-left: .25em solid #FF8A4C; padding-left: .5em; display: flex; flex-direction: column; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-ev span { font-size: .75em; font-weight: 400; opacity: .65; }
.s-ev.e2 { border-color: #F5C400; } .s-ev.e3 { border-color: #12A8E0; } .s-ev.e4 { border-color: #5BE3A4; }
/* tablet 16:10 */
.s-tab { font-size: 3.6cqw; padding: 3.5cqw; gap: 2.5cqw; aspect-ratio: 16 / 10; background: var(--surface) !important; color: var(--ink); }
/* phone */
.s-ph { font-size: 7.5cqw; padding: 7cqw 6cqw; gap: 3.2cqw; aspect-ratio: 9 / 18; background: #F6F7F9 !important; color: #1C2430; }
.s-ph .s-head { flex-direction: column; gap: 0; }
.s-row { display: flex; align-items: center; gap: .5em; background: #fff; border-radius: .6em; padding: .7em .6em; flex-wrap: wrap; font-size: .95em; }
.s-row span { font-size: .85em; opacity: .7; } .s-row b { margin-left: auto; } .s-row svg { color: var(--accent-brand); }
.s-row.ok svg { color: #1E7D46; }
.s-row-bar i { flex-basis: 100%; height: .3em; background: #E3F4FB; border-radius: 9px; } .s-row-bar em { display: block; width: 72%; height: 100%; background: #12A8E0; border-radius: 9px; }
/* wall 1:1: scenes */
.s-wall { font-size: 5.2cqw; padding: 6cqw; gap: 4cqw; aspect-ratio: 1; background: #1B2A4A !important; color: #fff; }
.s-scenes { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .5em; min-height: 0; }
.s-scenes span { border-radius: .7em; background: rgba(255,255,255,.1); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3em; font-weight: 600; font-size: .9em; }
.s-scenes svg { width: 1.6em; height: 1.6em; } .s-scenes .on { background: #FF8A4C; color: #1B2A4A; }
.s-foot { display: flex; justify-content: space-between; font-size: .75em; opacity: .8; } .s-foot span { display: inline-flex; align-items: center; gap: .25em; } .s-foot svg { width: 1.2em; height: 1.2em; }
.h8-tv .s-tv, .h8-tablet .s-tab, .h8-phone .s-ph, .h8-wall .s-wall { border-radius: 6px; }
.h8-phone .s-ph { border-radius: 20px; } .h8-wall .s-wall { border-radius: var(--radius-md); }
.s-row.warn { background: #FDECEA; } .s-row.warn svg, .s-row.warn b { color: #C0392B; }
.s-btn { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: .4em; border-radius: .6em; padding: .7em; background: var(--home8-fill); color: var(--home8-on-fill); font-weight: 700; font-size: .9em; }

/* Prices page: the plan comparison table (gift icon = what the trial adds to the free plan) */
.h8-pt-wrap { overflow-x: auto; margin: var(--space-8) 0 var(--space-4); border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); }
.h8-pt { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 620px; font-size: 15px; }
.h8-pt th, .h8-pt td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.h8-pt .h8-pt-f { text-align: left; font-weight: 400; color: var(--ink); position: sticky; left: 0; background: var(--surface-raised); z-index: 1; width: 34%; }
.h8-pt thead th { vertical-align: top; padding: 20px 12px; border-bottom: 1px solid var(--line-strong); }
.h8-pt-name { font-weight: 700; font-size: 17px; }
.h8-pt-price { font-size: 24px; font-weight: 700; margin-top: 6px; color: var(--ink); }
.h8-pt-per { font-size: 13px; color: var(--ink-muted); margin: 2px 0 12px; }
.h8-pt-yr { display: block; color: var(--ink); font-weight: 600; margin-top: 4px; }
.h8-pt-btn { width: 100%; box-sizing: border-box; justify-content: center; }
.h8-pt .hi { background: color-mix(in srgb, var(--accent-brand) 5%, var(--surface-raised)); }
.h8-pt thead th.hi { border-top: 3px solid var(--accent-brand); }
.h8-pt-g th { text-align: left; background: var(--surface-sunken); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); padding: 10px 16px; }
.h8-pt-yes { color: var(--success, #16a34a); display: inline-flex; }
.h8-pt-no { color: var(--ink-faint, #9aa0a6); }
.h8-pt tbody tr:last-child th, .h8-pt tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) {
  .h8-pt { font-size: 13px; min-width: 0; table-layout: fixed; }
  .h8-pt th, .h8-pt td { padding: 9px 4px; }
  .h8-pt .h8-pt-f { width: 40%; padding-left: 10px; }
  .h8-pt td { font-size: 12px; }
  .h8-pt thead th { padding: 14px 4px; }
  .h8-pt-name { font-size: 12px; hyphens: auto; overflow-wrap: anywhere; }
  .h8-pt-price { font-size: 15px; }
  .h8-pt-per { font-size: 11px; line-height: 1.3; }
  .h8-pt-btn { font-size: 11px; padding: 4px 2px; min-height: 0; min-width: 0; white-space: normal; line-height: 1.2; height: auto; }
  .h8-pt-g th { padding: 8px 10px; font-size: 11px; }
  .h8-pt-yes svg { width: 16px; height: 16px; }
}

.h8-pt-tag { display: inline-block; background: var(--accent-brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.h8-pt-legend { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--accent-brand) 10%, transparent); color: #9A3E27; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; margin: 0 0 10px; line-height: 1.3; }
.h8-pt-legend .h8-pt-gift { flex: none; }
.h8-pt-plus { display: inline-flex; align-items: center; gap: 2px; color: #A8452C; font-weight: 700; vertical-align: middle; }
.h8-pt-gl { position: sticky; left: 10px; }
@media (max-width: 600px) {
  .h8-pt-tag { font-size: 9px; padding: 1px 6px; }
  .h8-pt-legend { font-size: 10px; padding: 3px 4px; display: block; }
  .h8-pt.h8-pt-4, .h8-pt.h8-pt-5 { min-width: 640px; table-layout: auto; font-size: 14px; }
  .h8-pt-4 .h8-pt-f, .h8-pt-5 .h8-pt-f { width: 150px; min-width: 150px; box-shadow: 2px 0 4px rgba(0,0,0,.06); }
}

/* "Een dag met Home8": each card opens with a real-life scene around the screen (public-screens.php h8s_scene) */
.h8-day-i { overflow: hidden; }
.h8-day-sc { margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-4); width: calc(100% + 2 * var(--space-6)); }
.h8-day-sc + .h8-day-t { margin-bottom: var(--space-2); }
.h8-day-i .h8-day-sc ~ h3 { margin-top: var(--space-2); }
.sc { position: relative; width: 100%; aspect-ratio: 260 / 230; overflow: hidden; }
.sc-in { position: absolute; left: 0; top: 0; width: 260px; height: 230px; transform-origin: top left; }
.sc-in > svg { position: absolute; inset: 0; width: 260px; height: 230px; }
.sc-dev { position: absolute; z-index: 1; transform-origin: top left; }
.sc-dev .h8-dev { width: 100% !important; max-width: none; }
.sc-flush .h8-bezel { padding: 4px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sc-mounted .h8-foot { display: none; }
.sc-mounted .h8-bezel { box-shadow: 0 10px 18px rgba(30,40,55,.25); }
.sc-inwall .h8-bezel { box-shadow: 0 0 0 3px rgba(0,0,0,.18), 0 0 24px rgba(255,201,131,.25); }
.sc-float .h8-bezel { box-shadow: 0 14px 26px rgba(30,40,55,.35); }

/* ── Wall-screen pages: which screen, from Home8 or yourself, USB, Home Assistant (v0.21.0) ── */
.h8-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
@media (max-width: 820px) { .h8-two { grid-template-columns: 1fr; } }
.h8-choice { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; position: relative; }
.h8-choice.is-hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.h8-choice .h8-dev-pic { align-self: stretch; }
.h8-choice .h8-h3 { margin: 0; }
.h8-card-p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.h8-card-act { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: auto; padding-top: var(--space-2); }
.h8-anchor { position: absolute; top: -96px; }
.h8-marks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.h8-marks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 22px; }
.h8-marks li > svg { flex: none; margin-top: 2px; color: var(--success); }
.h8-marks li.is-self { color: var(--ink-muted); }
.h8-marks li.is-wait > svg { color: var(--ink-muted); }
.h8-marks-dash { flex: none; width: 18px; text-align: center; font-weight: 700; color: var(--ink-muted); }
.h8-boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
@media (max-width: 900px) { .h8-boards { grid-template-columns: 1fr; } }
.h8-board { display: flex; gap: var(--space-4); align-items: center; }
.h8-board > div { display: grid; gap: 2px; min-width: 0; }
.h8-board code { font-size: 13px; overflow-wrap: break-word; }
.h8-board small { color: var(--ink-muted); }
.h8-board-pic { flex: none; border-radius: 6px; background: #1d2230; box-shadow: inset 0 0 0 3px #3a4150; }
.h8-board-pic.is-round { border-radius: 50%; }
.h8-wsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.h8-wsteps > li.a8-card { display: flex; flex-direction: row; gap: var(--space-4); align-items: flex-start; }
.h8-wsteps > li > div { display: grid; gap: var(--space-2); min-width: 0; justify-items: start; }
.h8-wsteps h3 { margin: 0; font-size: 18px; line-height: 26px; }
.h8-wsteps p { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.h8-wsteps-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.h8-small { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.h8-boot { margin-top: var(--space-2); }
.h8-wsteps .a8-alert, .h8-narrow > div > .a8-alert, .h8-ha-way > .a8-alert { width: 100%; }
.h8-narrow > [data-h8-serial-ok], .h8-narrow > [data-h8-serial-no] { margin-bottom: var(--space-4); }
.h8-ha-way { display: grid; gap: var(--space-4); }
.h8-ha-way[hidden] { display: none; }
.h8-ha-status .h8-h3 { margin: 0 0 var(--space-3); }
.h8-key { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.h8-key code { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-sunken); overflow-wrap: anywhere; }
/* Drawn browser / Home Assistant windows (examples, not screenshots) */
.h8-fake-dlg { width: 100%; max-width: 440px; border-radius: 12px; background: #fff; color: #1f2937; border: 1px solid #ddd; box-shadow: 0 8px 28px rgba(0,0,0,.16); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; overflow: hidden; }
.h8-fake-dlg-t { padding: 14px 16px 10px; font-weight: 600; }
.h8-fake-list { margin: 0 16px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.h8-fake-list > div { padding: 9px 12px; color: #555; }
.h8-fake-list > div + div { border-top: 1px solid #eee; }
.h8-fake-list > .is-on { background: #e8f0fe; color: #1a56db; font-weight: 600; }
.h8-fake-dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; }
.h8-fake-dlg-f > span { padding: 7px 14px; border-radius: 16px; border: 1px solid #ccc; color: #1a56db; }
.h8-fake-dlg-f > span.is-pri { background: #1a56db; border-color: #1a56db; color: #fff; }
.h8-fake-dlg-f > span.is-ha { border: 0; color: #03a9f4; font-weight: 600; }
.h8-fake-ha .h8-fake-dlg-t { font-size: 18px; font-weight: 400; padding-bottom: 6px; }
.h8-fake-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #eee; margin-top: 8px; }
.h8-fake-row > span:first-child { flex: 1; }
.h8-fake-sw { flex: none; width: 40px; height: 22px; border-radius: 999px; background: #03a9f4; position: relative; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); }
.h8-fake-sw::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.h8-note { color: var(--ink-muted); font-size: 14px; }
.h8-faq-more { display: inline-block; margin-top: var(--space-2); }
