@font-face { font-family: "Nunito Sans"; src: url("/assets/v/f934d7142fb4784bf828da485b7dcbd9/nunito-sans.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { font: 16px/1.5 "Avenir Next", "Nunito Sans", system-ui, sans-serif; color: #12243b; background: #f4f7f8; color-scheme: light; }
/* The one focus ring and the one field outline: a mark that carries meaning needs 3:1 on whatever is behind it
   (US-PLATFORM-PARITY-001-24, web/tests/control-contrast.test.mjs). The input line is iOS and Android's secondary text
   colour. The ring is deeper than iOS `signal` (#bf811b), which is 2.7:1 on the segmented control's track and 2.97:1 on
   a Today card; the brand yellow is 2:1 on white, so it stays for dark mode only. */
:root { --focus-ring: #b77712; --input-line: #58698f; }
@media (prefers-color-scheme: dark) { :root { --focus-ring: #f5a623; --input-line: #aab7d1; } }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: #124b72; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.skip-link { position: absolute; z-index: 20; transform: translateY(-200%); background: #fff; padding: .6rem 1rem; }
.skip-link:focus { transform: none; }
.shell { max-width: 1440px; margin: auto; min-height: 100dvh; display: grid; grid-template-columns: 240px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: #0d2b46; color: #fff; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.4rem; }
.brand { font-size: 1.55rem; font-weight: 750; letter-spacing: -.04em; color: inherit; text-decoration: none; padding: .15rem .7rem; }
.nav { display: grid; gap: .45rem; }
.nav button { color: inherit; border: 0; border-radius: 12px; background: transparent; padding: .75rem .8rem; text-align: left; min-height: 44px; }
.nav button[aria-current="page"] { background: #f8d980; color: #102740; font-weight: 700; }
.nav button:hover:not([aria-current]) { background: #21435e; }
.sidebar-foot { margin-top: auto; font-size: .82rem; opacity: .82; padding: .7rem; }
.mobile-nav { display: none; }
.main-wrap { min-width: 0; padding: clamp(1rem, 3vw, 2.4rem); }
.content { max-width: 1060px; margin: auto; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.035em; margin: 0; }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; margin: 0 0 .9rem; }
h3 { font-size: 1.08rem; margin: 0 0 .45rem; }
/* Headings have no top margin, so one that follows a control would sit against it. */
:is(button, a, select, textarea, input, .form-actions, .card-actions, .full-width-actions, .switch-row, .tick-row) + :is(h2, h3, h4) { margin-top: 1.25rem; }
p { margin: .35rem 0 .8rem; }
.muted { color: #536373; }
.eyebrow { font-size: .83rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #526374; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 1rem; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; }
.card { background: #fff; border: 1px solid #dbe4e8; border-radius: 18px; box-shadow: 0 1px 5px #14324a0a; padding: clamp(1rem, 2vw, 1.4rem); min-width: 0; }
.card.tint { background: #fff8df; border-color: #f4dfa2; }
.value { font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.metric-label { color: #4a5d6d; margin: 0 0 .4rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .85rem 0; border-top: 1px solid #e6ecef; }
.list li:first-child { border-top: 0; padding-top: 0; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
/* The one action button (US-PLATFORM-PARITY-001-11, -12, -14; button() and fullWidthActions() in app.js), as iOS
   WiggleActionButtonStyle and Android's full-width button: 48 px tall, 15 px corners, 16 px semibold words, the full
   width of its column but at most 480 px, so a wide desktop page gets no very wide bar. Primary is the accent fill;
   secondary and destructive a 6% tint of their colour with a 1 px line at 60% and words in that colour, so destructive
   is never a filled red button. Text (a quiet action, such as Skip for now) is the accent's words with no box, as wide
   as its words; a destructive text action has danger words. Pressed, a button fades to 75%; disabled, to 45%. A card's
   buttons are capsules instead (cardActions()), and a link to another page or site stays a link (button.link).
   The danger words are #ad2636 (#cb3e36 is 4.3:1 on the page), as the card capsule's. web/tests/action-buttons.test.mjs
   fails another rule that restyles these kinds. */
:is(button, a):is(.primary, .secondary, .destructive):not(:where(.card-button, .text)) { display: flex; align-items: center;
  justify-content: center; gap: 8px; width: 100%; max-width: 480px; min-height: 48px; padding: 14px 18px;
  border: 1px solid #102d7599; border-radius: 15px; background: #102d750f; color: #102d75; font-size: 1rem; font-weight: 600;
  line-height: 1.25; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
:is(button, a).primary:not(:where(.card-button, .text)) { background: #102d75; border-color: #102d75; color: #fff; }
:is(button, a).destructive:not(:where(.card-button, .text)),
:is(button, a).destructive:not(:where(.card-button, .text)):hover:not(:disabled) { background: #ad26360f; border-color: #ad263699; color: #ad2636; }
button.text { display: inline-flex; align-items: center; align-self: flex-start; min-width: 44px; min-height: 48px; padding: 14px 0;
  border: 0; background: none; color: #102d75; font-size: 1rem; font-weight: 600; line-height: 1.25; text-align: left;
  text-decoration: none; overflow-wrap: anywhere; }
button.text.destructive { color: #ad2636; }
:is(button, a):is(.primary, .secondary, .destructive, .text):not(:where(.card-button)):active:not(:disabled) { opacity: .75; }
:is(button, a):is(.primary, .secondary, .destructive, .text):disabled { opacity: .45; }
:is(button, a):is(.primary, .secondary, .destructive, .text):not(:where(.card-button)) .card-button-icon { flex: none; width: 1.1em; height: 1.1em; }
:is(button, a):is(.primary, .secondary, .destructive, .text):not(:where(.card-button)):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
/* The one pill (US-PLATFORM-PARITY-001-11, -19), as iOS WigglePill: one or two semibold words in a capsule, the tone's
   theme colour at 12 % over the surface as the fill and its words colour, at least 4.5:1 on that fill, light and dark.
   Regular is 13 px with 8 x 3 px padding (lists, cards and sheets); compact is 10 px with 6 x 3 px (inside a chart).
   Only pill() in app.js draws one (web/tests/pills.test.mjs); a pill that opens something sits in a 44 px .pill-button. */
.pill { --pill-base: #102d75; --pill-words: #102d75; --pill-surface: #fff; display: inline-flex; align-items: center; gap: 4px;
  justify-self: start; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--pill-base) 12%, var(--pill-surface));
  color: var(--pill-words); font-size: .8125rem; font-weight: 600; line-height: 1.25; letter-spacing: normal; text-transform: none;
  overflow-wrap: anywhere; }
.pill-accent { --pill-base: #102d75; --pill-words: #102d75; }
.pill-positive { --pill-base: #277e60; --pill-words: #237357; }
.pill-warning { --pill-base: #a75f13; --pill-words: #985611; }
.pill-problem { --pill-base: #cb3e36; --pill-words: #b73831; }
/* Its symbol is the bright brand orange, as the design lab's actor badge: a decorative mark beside 4.5:1 words. */
.pill-wiggle { --pill-base: #f5a623; --pill-words: #ad4a00; --pill-symbol: #f5a623; }
.pill-compact { gap: 3px; padding: 3px 6px; font-size: .625rem; }
.pill-symbol { flex: none; width: 13px; height: 13px; color: var(--pill-symbol, var(--pill-words)); }
.pill-compact .pill-symbol { width: 10px; height: 10px; }
.pill-button { display: inline-flex; align-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 0;
  background: none; font: inherit; cursor: pointer; }
.pill-button:hover .pill { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
  .pill { --pill-base: #eaf0ff; --pill-words: #eaf0ff; --pill-surface: #151d30; }
  .pill-accent { --pill-base: #5f88e8; --pill-words: #7d9fec; }
  .pill-positive { --pill-base: #4fc79a; --pill-words: #4fc79a; }
  .pill-warning { --pill-base: #ffad42; --pill-words: #ffad42; }
  .pill-problem { --pill-base: #ff746c; --pill-words: #ff776f; }
  .pill-wiggle { --pill-base: #ffb743; --pill-words: #ffb743; --pill-symbol: #ffb743; }
}
/* The one closed chooser (US-PLATFORM-PARITY-001-11, -20), as iOS WiggleChooser: a native <select> drawn as the iOS menu
   picker, the chosen value in 15 px accent words with the drop-down arrow after it and no box. Only chooser() in app.js
   builds one (web/tests/chooser.test.mjs); the list that opens is the browser's own. In a form row (.chooser-row) it sits
   at the trailing edge after the label; on its own it is as wide as its column. */
.chooser { appearance: none; -webkit-appearance: none; width: 100%; max-width: 100%; min-height: 44px; margin: 0; padding: 0 26px 0 0;
  border: 0; border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23102d75'/%3E%3C/svg%3E") right center / 24px 24px no-repeat; color: #102d75;
  font-size: 1.0625rem; font-weight: 400; line-height: 1.35; text-overflow: ellipsis; cursor: pointer; }
.chooser:disabled { opacity: .4; cursor: default; }
.chooser:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.form-field.chooser-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; }
.chooser-row .chooser { width: auto; flex: 0 1 auto; min-width: 0; text-align: end; }
@media (prefers-color-scheme: dark) {
  .chooser { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%235f88e8'/%3E%3C/svg%3E"); color: #5f88e8; }
}
/* The one segmented control (US-PLATFORM-PARITY-001-11), as iOS WiggleSegmentedControl: `segmentedControl()` in app.js.
   Equal-width parts in a 44 px target: a pill track with the chosen part a filled navy pill. Nick chose this capsule over
   the system look on 27 October 2026 because its chosen part is clear (about 11:1, where a system thumb is about 1.2:1). */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; max-width: 480px;
  padding: 0 2px; border-radius: 999px; background: #102d7512; }
.segmented-option { display: flex; align-items: stretch; min-width: 44px; min-height: 44px; margin: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.segmented .segmented-option { padding: 4px 2px; color: #58698f; font-size: .875rem; font-weight: 600; }
.segmented-label { display: flex; flex: 1; align-items: center; justify-content: center; min-width: 0; padding: 10px 8px; border-radius: 999px; overflow-wrap: anywhere; text-align: center; }
.segmented-option:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -2px; }
.segmented .segmented-option[aria-pressed="true"] { color: #fff; }
.segmented-option[aria-pressed="true"] .segmented-label { background: #102d75; }
/* Compact (for a card's heading): a smaller pill, still a 44 px target. */
.segmented.segmented-compact { width: auto; padding: 0 3px; }
.segmented-compact .segmented-option { padding: 7px 0; font-size: .8125rem; }
.segmented-compact .segmented-label { padding: 0 10px; }
/* Four or more words do not fit in one row at the largest text sizes, such as the Timeline's Day, 7 days, Month and
   Year: two rows of two keep each word whole (US-TIMELINE-017-01), as iOS lays them out. An em query grows with the
   browser's text size, so it holds at 320 px wide for normal text and at 640 px for text twice as large. */
@media (max-width: 20em) {
  .segmented:not(.segmented-compact):has(> .segmented-option:nth-child(4)) { grid-auto-flow: row; grid-template-columns: 1fr 1fr;
    padding: 6px; border-radius: 28px; }
}
/* The one compact stepper (US-PLATFORM-PARITY-001-11), as iOS WiggleCompactStepper: `compactStepper()` in app.js. − value +
   small enough for a card's heading, such as the Timeline zoom (US-TIMELINE-018-02), on the compact segmented control's
   faint navy capsule so the two read as one family. Each button is still a 44 px target. */
.compact-stepper { display: inline-flex; align-items: center; padding: 0 3px; border-radius: 999px; background: #102d7512; color: #102d75; }
.compact-stepper-value { min-width: 32px; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.compact-stepper-step { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; cursor: pointer; }
.compact-stepper-step .generic-symbol { width: 15px; height: 15px; }
.compact-stepper-step[aria-disabled="true"] { opacity: .3; cursor: default; }
.compact-stepper-step:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -4px; }
@media (prefers-color-scheme: dark) { .compact-stepper { background: #eaf0ff12; color: #aab7d1; } }
@media (forced-colors: active) { .compact-stepper { border: 1px solid ButtonText; } }
@media (prefers-color-scheme: dark) {
  .segmented { background: #eaf0ff12; }
  .segmented .segmented-option { color: #aab7d1; }
  .segmented .segmented-option[aria-pressed="true"] { color: #0b1020; }
  .segmented-option[aria-pressed="true"] .segmented-label { background: #5f88e8; }
}
@media (prefers-color-scheme: dark) {
  :is(button, a):is(.primary, .secondary, .destructive):not(:where(.card-button, .text)) { background: #a9c1ff0f; border-color: #a9c1ff99; color: #a9c1ff; }
  :is(button, a).primary:not(:where(.card-button, .text)) { background: #5f88e8; border-color: #5f88e8; color: #0b1020; }
  :is(button, a).destructive:not(:where(.card-button, .text)),
  :is(button, a).destructive:not(:where(.card-button, .text)):hover:not(:disabled) { background: #ff746c0f; border-color: #ff746c99; color: #ff746c; }
  button.text { color: #a9c1ff; }
  button.text.destructive { color: #ff746c; }
}
button.link { border: 0; background: none; color: #0c456d; padding: .35rem 0; text-decoration: underline; text-underline-offset: 3px; }
input, textarea { max-width: 100%; border: 1px solid var(--input-line); background: #fff; color: #142d42; }
.form-field { display: grid; gap: .35rem; margin: .9rem 0; min-width: 0; }
#octopus-key-source { width: 100%; min-width: 0; }
.form-field textarea { width: 100%; padding: .65rem .75rem; border-radius: 9px; resize: vertical; }
.form-field input { padding: .65rem .75rem; border-radius: 9px; min-height: 44px; width: 100%; }
.form-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 1.2rem; }
.form-actions > .maintenance-gated { display: contents; }
/* The one inline notice (US-PLATFORM-PARITY-001-11, -13), as iOS WiggleNotice: the kind's filled symbol beside
   the words in the main text colour, on the kind's colour at 8 % over the surface, with no stripe. Only notice()
   in app.js draws one. Information is blue, success green, warning amber and error red, each with its own symbol,
   so the colour is never the only signal; every pair keeps the words above 11:1 and the symbol above 4.3:1. */
.notice { --notice-tint: #3170c9; --notice-fill: #eff4fb; display: flex; align-items: flex-start; gap: 10px; padding: 13px;
  margin-bottom: 1rem; border-radius: 12px; background: var(--notice-fill); color: #102d75; font-size: .875rem; font-weight: 500; line-height: 1.4; }
.notice.success { --notice-tint: #277e60; --notice-fill: #eef5f2; }
.notice.warning { --notice-tint: #a75f13; --notice-fill: #f8f2ec; }
.notice.error { --notice-tint: #cb3e36; --notice-fill: #fbf0ef; }
.notice > .notice-symbol { flex: none; width: 1.15em; height: 1.15em; margin-top: .05em; color: var(--notice-tint); }
.notice-glyph { stroke: var(--notice-fill); }
.notice-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice-title { display: block; margin-bottom: 4px; font-size: .9375rem; font-weight: 600; }
.notice-body p { margin: 0; }
.notice-body p + p, .notice-body .form-actions { margin-top: .5rem; }
@media (prefers-color-scheme: dark) {
  .notice { --notice-tint: #78a7ff; --notice-fill: #1d2841; color: #eaf0ff; }
  .notice.success { --notice-tint: #4fc79a; --notice-fill: #1a2b38; }
  .notice.warning { --notice-tint: #ffad42; --notice-fill: #282931; }
  .notice.error { --notice-tint: #ff746c; --notice-fill: #282435; } }
.auth-layout { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-layout > .card { min-width: 0; width: min(100%, 440px); }
.auth-layout input { min-width: 0; }
.auth-card { width: min(100%, 440px); }
.auth-brand { color: #0d2b46; display: block; margin-bottom: 1.3rem; }
/* Opening, unreachable and upgrade screens, as iOS OpeningUnreachableView and MaintenanceUnavailableView. */
.auth-layout > .entry-status { width: min(100%, 380px); display: grid; justify-items: center; gap: .6rem; text-align: center; }
.entry-status h1 { margin: 0; font-size: 1.4rem; }
.entry-status p { margin: 0; }
.entry-status > button { margin-top: .4rem; }
.entry-symbol { color: #f5a623; }
/* Sign in and invitation, as iOS AuthenticationScreen: subtitle, a two-segment switch, "or" and the trial note. */
.auth-subtitle { margin: -.2rem 0 1rem; }
.auth-layout input[readonly] { background: #f6f8fc; color: #5b6b8c; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 .4rem; color: #5b6b8c; font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid #dde3ef; }
.auth-divider[hidden] { display: none; }
.auth-trial-note { margin: 1.2rem 0 0; font-size: .82rem; text-align: center; }
/* Email-first sign-in (US-AUTH-SEC-017, -019): the address as text, with Change beside it on the method step. */
.sign-in-address { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: 0 0 1rem; overflow-wrap: anywhere; }
.auth-layout .card > button.text, .sign-in-code > button.text { display: flex; width: fit-content; }
/* The password a password manager fills beside the email (US-AUTH-SEC-021-03): present for the manager, out of sight. */
.sign-in-email .filled-password { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.sign-in-email { position: relative; }
.field-hint { margin: .3rem 0 .6rem; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .auth-layout input[readonly] { background: #202a40; color: #aab7d1; } .auth-divider { color: #aab7d1; } .auth-divider::before, .auth-divider::after { border-color: #34425d; } }
.set-up-home-account { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #dde3ef; }
.set-up-home-account p { margin-top: 0; }
@media (prefers-color-scheme: dark) { .set-up-home-account { border-color: #34425d; } }
.details { white-space: pre-wrap; }
.insights-card { margin-top: 1rem; }
.chart-card svg { width: 100%; height: auto; display: block; }
.table-scroll { overflow-x: auto; max-height: 30rem; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; min-width: 430px; }
th,td { text-align: left; padding: .55rem; border-bottom: 1px solid #dbe4e8; }
summary { cursor: pointer; font-weight: 650; }
/* One legal document per step, as iOS LegalDocumentScreen (US-LEGAL-001-02): the title, the summary and the
   row that shows the full text scroll as one page, and the approval stays below it, at the bottom of the
   screen when it is tall enough to hold them. */
.legal-step-layout { min-height: 100dvh; display: flex; justify-content: center; background: #fff; color: #102d75; }
.legal-step { width: min(100%, 720px); min-width: 0; display: flex; flex-direction: column; gap: 1rem; padding: .75rem 1rem 0; }
.legal-step-top { display: flex; align-items: center; gap: .75rem; }
.legal-document { min-width: 0; padding: .25rem 0 1rem; }
.legal-document:focus { outline: none; }
.legal-document:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.legal-document h1 { margin: 0 0 .35rem; font-size: 1.875rem; line-height: 1.2; font-weight: 600; color: inherit; overflow-wrap: anywhere; }
.legal-version { margin: 0 0 1.25rem; color: #58698f; font-size: .8125rem; }
.legal-document-body p { white-space: pre-wrap; margin: 0 0 1rem; font-size: .9375rem; overflow-wrap: anywhere; }
.legal-document-body .legal-heading { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
.legal-document-body > :first-child { margin-top: 0; }
/* The forum terms behind the one-line agreement (US-FORUM-003-01): the text scrolls inside the card. */
.forum-terms > .legal-document-body { max-height: 40dvh; overflow-y: auto; margin-top: .75rem; padding-right: .25rem; }
.legal-review-summary { margin-bottom: 1.25rem; }
.legal-review-summary > .section-title { margin: 0 0 .75rem; }
.legal-summary p { font-size: .875rem; margin: 0 0 .5rem; overflow-wrap: anywhere; }
.legal-summary .legal-heading { font-size: 1.0625rem; font-weight: 600; margin: .5rem 0; }
.disclosure-details > .legal-document-body { margin-top: 1.25rem; }
.legal-approval { display: grid; gap: 1rem; margin: 0 -1rem; padding: 1.25rem 1rem; background: #fff; border-top: 1px solid #dde3ef; }
.legal-approval .notice { margin: 0; }
.legal-step-feedback:empty { display: none; }
.legal-account-menu { position: relative; margin-left: auto; }
.legal-account-menu > summary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 .85rem; border: 1px solid #aab7d1; border-radius: 10px; color: #102d75; list-style: none; }
.legal-account-menu > summary::-webkit-details-marker { display: none; }
.legal-account-actions { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 5; display: grid; min-width: 12rem; padding: .35rem .9rem; background: #fff; border: 1px solid #dde3ef; border-radius: 12px; box-shadow: 0 8px 24px #102d7520; }
.legal-account-actions button.link { text-align: left; text-decoration: none; }
@media (min-height: 34rem) {
  .legal-step-layout { height: 100dvh; }
  .legal-step { height: 100%; }
  .legal-document { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .legal-approval { margin-top: auto; flex: none; }
}
@media (prefers-color-scheme: dark) {
  .legal-step-layout { background: #0b1020; color: #eaf0ff; }
  .legal-approval, .legal-account-actions { background: #151d30; }
  .legal-version { color: #aab7d1; }
  .legal-approval, .legal-account-actions { border-color: #34425d; }
  .legal-account-menu > summary { color: #eaf0ff; border-color: #6b7a99; }
}
.legal-body { border: 1px solid var(--input-line); border-radius: 8px; padding: .8rem; max-height: 18rem; overflow: auto; }
.legal-body p, .legal-summary p { white-space: pre-wrap; margin: 0 0 .8rem; }
.legal-body .legal-heading, .legal-summary .legal-heading { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.legal-body > :first-child, .legal-summary > :first-child { margin-top: 0; }
.legal-summary .legal-heading { font-size: .98rem; }
@media (max-width: 800px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .mobile-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(4,1fr); background: white; border-top: 1px solid #dbe4e8; z-index: 10; } .mobile-nav button { border: 0; background: transparent; color: #23445b; min-height: 60px; padding: .5rem .15rem; font-size: .8rem; } .mobile-nav button[aria-current="page"] { color: #0c456d; font-weight: 750; box-shadow: inset 0 3px #d49a22; } .main-wrap { padding: 1rem 1rem 1.8rem; } .span-8,.span-6,.span-4 { grid-column: span 12; } }
@media (min-width: 620px) and (max-width: 800px) { .span-6,.span-4 { grid-column: span 6; } }
@media (prefers-reduced-motion: no-preference) { button, a { transition: background-color .15s, color .15s; } }
/* Shared Wiggle visual language from WiggleTheme.swift. */
:root { font-family: "Avenir Next", "Nunito Sans", system-ui, sans-serif; color: #102d75; background: #f6f8fc; }
a,button.link { color: #102d75; }
.shell { max-width: none; grid-template-columns: 252px minmax(0,1fr); }
.sidebar { background: #102d75; padding: 1.8rem 1.15rem; gap: 2.2rem; }
.brand { padding: .3rem .65rem; display: block; }
.brand-logo { width: 132px; height: auto; display: block; }
.sidebar .brand-logo { width: 144px; }
/* The sidebar logo's motion (US-XPLAT-008-08): a drawing of the symbol over the image, shown only while it plays. The sun goes above the drawing's frame. */
.sidebar .brand { position: relative; }
.brand-motion { position: absolute; left: .65rem; top: .3rem; width: 144px; height: auto; overflow: visible; display: none; pointer-events: none; }
.brand-motion .launch-line { fill: none; stroke: #eaf0ff; stroke-width: 32; stroke-linecap: round; stroke-linejoin: round; }
.brand-motion .launch-sun { fill: #ffb743; }
.brand-playing .brand-motion { display: block; }
.brand-playing .brand-logo { clip-path: inset(0 0 0 36%); }
.nav { gap: .35rem; }
.nav button { border-radius: 14px; font-size: 1rem; font-weight: 600; padding: .84rem 1rem; }
.nav button[aria-current="page"] { background: #fff; color: #102d75; }
.nav button:hover:not([aria-current]) { background: #25458c; }
.main-wrap { padding: clamp(1.2rem, 3vw, 3rem); }
.content { max-width: 1120px; }
h1 { color: #102d75; font-weight: 750; }
h2,h3 { color: #102d75; }
.muted,.metric-label { color: #58698f; }
.eyebrow { color: #58698f; letter-spacing: .09em; font-size: .72rem; }
.card { border-color: #dde3ef; border-radius: 14px; box-shadow: 0 8px 24px #102d7510; }
.card.tint { background: #fff8e9; border-color: #f5a62388; }
.page-head { margin-bottom: 1.65rem; align-items: center; }
.page-head h1 { font-size: clamp(1.9rem,3vw,2.65rem); }
.page-head p { margin-bottom: 0; }
/* The subtitle takes a line of its own, so a long one never pushes the actions below it. */
.page-head > .page-subtitle { flex: 1 0 100%; margin: -.6rem 0 0; }
.today-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.today-grid .card { min-height: 194px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.today-card,.savings-hero { background: linear-gradient(125deg,#fff4d8 0%,#fffaf0 50%,#f6f8fc 100%); border-color: #f1dfb6; }
.hero-value { display: block; font-size: clamp(2.45rem,5vw,4rem); line-height: 1.08; font-weight: 750; letter-spacing: -.055em; margin: .4rem 0; color: #102d75; }
.hero-sub { font-size: 1rem; font-weight: 600; color: #102d75; }
.today-card .muted { margin-top: .5rem; font-size: .86rem; }
.actions-card .row { width: 100%; margin-bottom: .6rem; }
.action-title { font-size: 1.48rem; line-height: 1.2; }
.actions-card p { margin: .6rem 0; }
.home-refresh-notice button.link, .timeline-refresh-notice button.link, .savings-refresh-notice button.link { margin-left: .5rem; }
.home-section { margin-top: 2rem; }
/* The one section heading (US-PLATFORM-PARITY-001-22, -11; sectionTitle() in app.js), as iOS's section titles: 20 px
   semibold words of the main text colour at the leading edge, an optional control at the trailing edge on its line.
   A screen may place it, never restyle its words. */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.section-title h2 { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.25; letter-spacing: 0; color: #102d75; }
.section-title-lead { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
@media (prefers-color-scheme: dark) { .section-title h2 { color: #eaf0ff; } }
/* Home's Coming up row (US-HOME-025; homeComingUpSection() in app.js), as iOS HomeComingUpRow: one row of compact cards
   that scrolls sideways, each 138 px of words wide so the next one shows at the edge, growing with the text size; every
   card as tall as the tallest, and the words wrap rather than being cut (US-HOME-025-07). The row's padding keeps room
   for the cards' shadow and focus ring, which the scrolling row would otherwise cut, and its margin takes it back so
   the cards line up with the heading; the shadow is a tighter one than a card's elsewhere, so it fits that room
   rather than ending in a hard edge. A provisional card takes the Timeline's dashed outline (below). */
.home-coming-up-row { display: flex; align-items: stretch; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px; padding: 6px 6px 8px; margin: -6px -6px -8px; scrollbar-width: none; }
.home-coming-up-row::-webkit-scrollbar { display: none; }
.home-coming-up-card.card { flex: none; display: flex; width: calc(8.625rem + 24px); padding: 0; box-shadow: 0 2px 5px #102d7512;
  scroll-snap-align: start; }
.home-coming-up-open { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; padding: 10px 12px;
  border: 0; border-radius: inherit; background: none; color: #102d75; font: inherit; text-align: left; cursor: pointer; }
.home-coming-up-head { display: flex; align-items: center; gap: 7px; }
.home-coming-up-icon { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #f6f8fc; }
.home-coming-up-icon .energy-icon, .home-coming-up-icon > svg { width: 1.0625rem; height: 1.0625rem; }
.home-coming-up-when { display: flex; align-items: center; gap: 5px; min-width: 0; }
.home-coming-up-time { font-size: .875rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.home-coming-up-title { min-height: 2lh; font-size: .875rem; line-height: 1.3; overflow-wrap: anywhere; }
.home-coming-up-state { color: #6e45af; font-size: .8125rem; font-weight: 500; line-height: 1.25; }
@media (prefers-color-scheme: dark) { .home-coming-up-card.card { box-shadow: none; } .home-coming-up-open { color: #eaf0ff; }
  .home-coming-up-icon { background: #202a40; }
  .home-coming-up-state { color: #b99aff; } }
.home-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.home-tile { position: relative; min-width: 0; min-height: 154px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid #dde3ef; border-radius: 14px; background: #fff; padding: 1rem; box-shadow: 0 8px 24px #102d750a; color: #102d75; }
/* Touch screens keep a hover after a tap, so only a real pointer lifts a card on hover. */
@media (hover: hover) { button.home-tile:hover { border-color: #5f88e8; transform: translateY(-2px); } }
.tile-icon { font-size: 1.22rem; font-weight: 700; color: #f5a623; line-height: 1; margin-bottom: auto; }
.tile-label { color: #58698f; font-size: .89rem; margin-top: .55rem; }
.tile-value { font-size: 1.35rem; line-height: 1.2; margin: .2rem 0; overflow-wrap: anywhere; }
.tile-foot { color: #58698f; font-size: .74rem; line-height: 1.25; padding-right: 1rem; }
.tile-arrow { position: absolute; right: 1rem; bottom: .8rem; font-size: 1.45rem; color: #5f88e8; }
.insight-list { border: 1px solid #dde3ef; border-radius: 14px; overflow: hidden; background: #fff; }
.insight-row { width: 100%; min-height: 72px; display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 1rem; border: 0; border-bottom: 1px solid #dde3ef; background: #fff; padding: 1rem; color: #102d75; }
.insight-row:last-child { border-bottom: 0; }
.insight-row:hover { background: #f6f8fc; }
.insight-row div { display: grid; gap: .15rem; }
.insight-row span.muted { font-size: .85rem; }
.chevron { color: #5f88e8; font-size: 1.5rem; }
/* The generic control symbols (US-PLATFORM-PARITY-001-08): one drawing, sized by the text around it unless a rule below says otherwise. */
.generic-symbol { flex: none; vertical-align: middle; }
.household-switcher .generic-symbol { width: 14px; height: 14px; }
.urgent-insight { margin-top: 1rem; border: 1px solid #f5a623; border-radius: 14px; overflow: hidden; }
.savings-page > .segmented { margin-bottom: 1rem; }
.savings-hero { min-height: 220px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.savings-page .notice { margin-top: 1rem; }
.section-value { font-size: 1.65rem; }
.detail-dialog { width: min(520px,calc(100vw - 2rem)); max-height: min(85dvh,800px); overflow: auto; border: 1px solid #dde3ef; border-radius: 18px; padding: 1.4rem; color: #102d75; box-shadow: 0 24px 80px #102d7540; }
.detail-dialog::backdrop { background: #0b1020a8; }
/* The whole screen while an account deletion runs (US-DELETE-001-07). */
.deleting-dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; padding: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; color: #102d75; background: #f4f7f8; }
.deleting-dialog:not([open]) { display: none; }
.deleting-dialog::backdrop { background: #f4f7f8; }
.deleting-dialog .loading-spinner { width: 2rem; height: 2rem; }
/* The one sheet, dialog and detail header (US-PLATFORM-PARITY-001-18, -11; sheetHeader() in app.js), as the iOS inline
   navigation bar: the title centred on one line in 17 px semibold words of the main text colour, cut with an ellipsis;
   Cancel or Back at the leading edge, the close cross or one accent word at the trailing edge. The side columns share
   what the title leaves, so a short title sits in the centre. */
.sheet-header { display: grid; grid-template-columns: 1fr minmax(0, max-content) 1fr; align-items: center; gap: 8px;
  min-height: 44px; margin: -8px 0 .9rem; }
/* The side columns keep their controls' width, so a long title is cut rather than drawn over them. */
.sheet-header-leading { display: flex; align-items: center; justify-content: flex-start; gap: 4px; }
.sheet-header-trailing { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.sheet-header-title { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: #102d75;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) { .sheet-header-title { color: #eaf0ff; } }
.detail-reading { display: flex; justify-content: space-between; align-items: center; margin: 1rem 0; }
.detail-reading strong { font-size: 2rem; }
.device-facts { border-top: 1px solid #dde3ef; }
.device-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #dde3ef; }
.device-facts dt { color: #58698f; }.device-facts dd { margin: 0; text-align: right; }
.rename-form { margin: .4rem 0 1rem; }
.detail-title { display: flex; align-items: center; justify-content: center; gap: .35rem; min-width: 0; }
.rename-pencil { flex: none; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: none; color: #102d75; }
.rename-pencil:hover:not(:disabled) { background: #eef2f9; }
.device-reading { margin: 1rem 0; }.device-reading p { margin: .3rem 0; }
.device-reading-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 .4rem; font-size: 1.1rem; }
.device-reading-symbol { flex: none; display: inline-grid; width: 1.9rem; height: 1.9rem; }.device-reading-symbol svg { width: 100%; height: 100%; }
.device-reading-value { display: block; font-size: 2rem; }
.maintenance-gated { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.rename-form .maintenance-gated { display: contents; }
.maintenance-action-notice { font-size: .85rem; }
@media(prefers-color-scheme:dark) { .rename-pencil { color: #eaf0ff; } .rename-pencil:hover:not(:disabled) { background: #202a40; } }
.auth-brand .brand-logo { width: 160px; }
.flow-composite svg{display:block;width:100%;height:auto;margin:.8rem 0}.flow-legend{display:flex;flex-wrap:wrap;gap:.4rem .9rem;font-size:.78rem;color:#58698f}.flow-legend span{display:inline-flex;align-items:center;gap:.35rem}.flow-legend i{width:.72rem;height:.72rem;border-radius:3px;display:inline-block}.flow-composite details{margin-top:.7rem}@media(prefers-color-scheme:dark){.flow-legend{color:#aab7d1}}
.timeline-layer-section .chart-card svg{cursor:crosshair;touch-action:pan-y}
.chart-card svg { color: #102d75; }
@media(max-width:800px) { .shell { grid-template-columns: 1fr; } .main-wrap { padding: 1.1rem 1rem 2rem; } .mobile-nav { border-color: #dde3ef; } .mobile-nav button { color: #58698f; } .mobile-nav button[aria-current="page"] { color: #102d75; box-shadow: inset 0 3px #f5a623; } .home-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .today-grid { grid-template-columns: 1fr; } .today-grid .card { min-height: 166px; } .home-tile { min-height: 145px; padding: .85rem; } .tile-value { font-size: 1.18rem; } .section-title { align-items: flex-start; } }
.home-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.attention-list { display: grid; gap: .7rem; margin: 1rem 0; }
.attention-item { padding: .9rem; border: 1px solid #dde3ef; border-radius: 12px; background: #f6f8fc; }
.attention-item p { margin-bottom: 0; font-size: .88rem; }
@media(prefers-color-scheme:dark) { .attention-item { background: #202a40; border-color: #34425d; } }
/* Compact, as native `listSectionSpacing(.compact)`: Device, Action and the target sit close together, with only Timing headed (US-CONTROL-010-13). */
.action-composer h3 { margin: .9rem 0 .15rem; }.action-composer .form-field { margin: .35rem 0; }
.action-composer input[type="time"] { width: 100%; min-height: 44px; border-radius: 9px; padding: .55rem .7rem; }
.action-composer .target-field { min-height: 0; }
.action-composer p { margin: .3rem 0; }
.action-composer .field-label { font-weight: 600; }
.action-summary { margin-top: .8rem; display: flex; align-items: center; gap: .6rem; font-weight: 650; }
.action-device, .action-fixed-choice { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; }
.action-device-label { color: #58698f; }.action-device-name { display: inline-flex; align-items: center; gap: .6rem; }
.device-symbol { flex: none; display: inline-grid; width: 1.6rem; height: 1.6rem; }.device-symbol svg { width: 100%; height: 100%; }
.action-withdraw { margin: 1.2rem 0 .7rem; }.action-withdraw p { margin: .45rem 0 0; }
@media(prefers-color-scheme:dark) { .action-device-label { color: #aab7d1; } }.action-composer .form-actions { margin-bottom: .7rem; }
.device-actions { margin-top: 1.3rem; border-top: 1px solid #dde3ef; padding-top: 1.1rem; }
.device-actions-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.device-actions-head h3 { margin: 0; }
.device-actions-head .card-actions { flex: none; margin: 0; }
.device-actions .list { margin-top: .75rem; }
.device-actions .list li button { margin-right: .6rem; }.page-actions { margin-top: 0; }
@media(prefers-color-scheme:dark) { .device-actions { border-color: #34425d; } }

[hidden] { display: none !important; }
.device-choice-list { display: grid; gap: .7rem; }
.metric-history { margin: 1.2rem 0; }
/* A Home detail's chart, as iOS MetricHistoryChartCard: a readout of each line's value, a chart per
   unit on one time axis with its values down the left, and a footnote. Dragging across the charts
   inspects a time; an upright drag still scrolls the sheet. */
.metric-chart-card { display: grid; gap: .6rem; margin: 0; padding: 1rem; }
.metric-chart-card h3 { margin: 0; color: #102d75; font-size: 1.1rem; }
.metric-chart-empty { margin: 0; min-height: 7rem; }
.metric-readout { display: grid; gap: 6px; }
.metric-readout-title { margin: 0; color: #58698f; font-size: .8rem; font-weight: 650; }
.metric-chart { display: grid; gap: 2px; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; border-radius: 6px; }
.metric-chart:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.metric-chart-unit { margin: 0; color: #58698f; font-size: .66rem; font-weight: 500; }
.metric-chart-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 4px; margin-bottom: .4rem; }
.metric-chart-row:last-of-type { margin-bottom: 0; }
.metric-chart-values { position: relative; color: #58698f; font-size: .62rem; font-variant-numeric: tabular-nums; }
.metric-chart-values > span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; line-height: 1; }
.metric-chart-plot { position: relative; height: 120px; }
.metric-chart-plot.is-power { height: 180px; }
.metric-chart-plot > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.metric-chart-rule { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed #58698f; pointer-events: none; }
.metric-chart-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--series); box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.metric-chart-times { position: relative; height: 1rem; margin-left: calc(2.4rem + 4px); color: #58698f; font-size: .66rem; }
.metric-chart-times > span { position: absolute; top: 0; white-space: nowrap; }
.metric-chart-times > span.is-end { transform: translateX(-100%); }
.metric-chart-times > span.is-centred { transform: translateX(-50%); }
.metric-chart-note { margin: 0; color: #58698f; font-size: .74rem; }
@media (prefers-color-scheme: dark) {
  .metric-chart-card h3 { color: #eaf0ff; }
  .metric-readout-title, .metric-chart-unit, .metric-chart-values, .metric-chart-times, .metric-chart-note { color: #aab7d1; }
  .metric-chart-rule { border-color: #aab7d1; }
  .metric-chart-dot { box-shadow: 0 0 0 1.5px #151d30; }
}
.timeline-layer-section { margin: 1.1rem 0; }

/* Savings detail follows the iOS comparison content while fitting narrow browsers. */
/* As iOS: the supplier that controls the charging, in its colour, and the EV note in the warning colour; words, not pills. */
.supplier-control-note { color: #6e45af; font-size: .72rem; font-weight: 500; }
.ev-modelled-note { color: #985611; font-size: .75rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .supplier-control-note { color: #b99aff; } .ev-modelled-note { color: #ffad42; } }
.heat-pump-detail > p { line-height: 1.45; }
.comparison { border: 1px solid #dde3ef; border-radius: 14px; padding: 1rem; margin: 1.1rem 0; }
.comparison h3 { margin-top: 0; }
.comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.comparison-row { background: #f6f8fc; border-radius: 12px; padding: .85rem; min-width: 0; }
.comparison-row h4 { margin: 0; }
.comparison-row p { font-size: .8rem; line-height: 1.4; }
.comparison-values { display: grid; gap: .65rem; }
.comparison-values div { display: flex; flex-direction: column; gap: .1rem; }
.comparison-values span { font-size: .78rem; }
.comparison-values strong { color: #102d75; }
@media(max-width:560px) { .comparison-grid { grid-template-columns: 1fr; } }
@media(prefers-color-scheme:dark) { .comparison { border-color: #34425d; } .comparison-row { background: #202a40; } .comparison-values strong { color: #eaf0ff; } }

.cheap-window-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
@media(max-width:450px) { .cheap-window-fields { grid-template-columns: 1fr; } }

.device-controls { border-top: 1px solid #dde3ef; margin-top: 1.1rem; padding-top: 1rem; }
.device-controls h3 { margin-top: 0; }
/* A car's Octopus smart charging (US-OCTOPUS-EV-001-02, US-OCTOPUS-EV-002). */
.octopus-charging-status { font-weight: 700; }
.octopus-schedule p { margin: .15rem 0; }
.octopus-charging > .maintenance-gated { margin: .6rem 0; }
.octopus-schedule-day { border: 0; margin: .6rem 0; padding: 0; min-width: 0; }
.octopus-schedule-day legend { padding: 0; font-weight: 700; }
.octopus-schedule-day .form-field { margin: .4rem 0; }
.battery-mode-list { display: grid; gap: .65rem; }
.battery-mode-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; border: 1px solid #dde3ef; border-radius: 12px; }
.battery-mode-row p { margin: .2rem 0; font-size: .82rem; }
.battery-mode-row button { flex: none; width: auto; }
@media(max-width:450px) { .battery-mode-row { align-items: flex-start; flex-direction: column; } }
@media(prefers-color-scheme:dark) { .device-controls,.battery-mode-row { border-color: #34425d; } }
/* A battery's or a car's Capacity section (US-AUTO-064), as iOS BatteryCapacitySection. */
.device-capacity { border-top: 1px solid #dde3ef; margin-top: 1.1rem; padding-top: 1rem; }
/* What only the household can say about a device (US-DEVICE-013): a chooser row whose question, which can be long, wraps beside the answer. */
.device-climate { border-top: 1px solid #dde3ef; margin-top: 1.1rem; padding-top: 1rem; }
.device-climate label { flex: 1 1 12rem; }
.device-capacity h3 { margin-top: 0; }
.capacity-rows { margin: 0; }
.capacity-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem 0; }
.capacity-row dt { color: #58698f; }
.capacity-row dd { margin: 0; text-align: right; display: grid; gap: .15rem; min-width: 0; }
.capacity-value { font-weight: 700; }
.capacity-note { font-size: .85rem; }
.capacity-retained { margin: .2rem 0; font-size: .9rem; }
.capacity-trend { margin: .8rem 0; }
.capacity-trend-title { font-weight: 700; margin-bottom: .4rem; }
.capacity-trend-chart { position: relative; }
.capacity-trend-plot { display: block; width: 100%; height: 8rem; overflow: visible; }
.capacity-trend-line { stroke: #102d75; stroke-width: 2.5; }
.capacity-trend-point { stroke: #102d75; stroke-width: 9; }
.capacity-trend-baseline { stroke: #58698f; stroke-width: 1.5; }
.capacity-trend-baseline-label { position: absolute; right: 0; transform: translateY(-120%); font-size: .75rem; color: #58698f; background: inherit; }
.capacity-trend-points { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .85rem; color: #58698f; }
.capacity-actions .maintenance-gated { display: flex; flex-direction: column; gap: 10px; margin: .6rem 0; }
.capacity-form { margin: .4rem 0 1rem; }
.capacity-form h4 { margin: .6rem 0 .3rem; }
.capacity-form p.muted { margin: .3rem 0 0; font-size: .85rem; }
.capacity-form .maintenance-gated { display: contents; }
@media(max-width:450px) { .capacity-row { flex-direction: column; gap: .15rem; } .capacity-row dd { text-align: left; } }
@media(prefers-color-scheme:dark) { .device-capacity, .device-climate { border-color: #34425d; } .capacity-row dt, .capacity-trend-baseline-label, .capacity-trend-points { color: #aab7d1; }
  .capacity-trend-line { stroke: #eaf0ff; } .capacity-trend-point { stroke: #eaf0ff; } .capacity-trend-baseline { stroke: #aab7d1; } }

.property-choices{display:grid;gap:.75rem;margin-top:1rem}.property-choice{display:flex;align-items:flex-start;gap:.75rem;padding:.85rem;border:1px solid #dde3ef;border-radius:14px;cursor:pointer}.property-choice:has(input:checked){border-color:#102d75;background:#f6f8fc}.property-choice:has(input:disabled){opacity:.65;cursor:not-allowed}.property-choice input{margin-top:.25rem}.property-choice span{display:grid;gap:.2rem;min-width:0}.property-choice small{color:#58698f}.import-progress{border-top:1px solid #dde3ef;margin-top:1rem;padding-top:.75rem}.import-progress .list li{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.import-progress .list li strong{margin-right:auto}
@media(prefers-color-scheme:dark){.property-choice{border-color:#34425d}.property-choice:has(input:checked){background:#202a40}.property-choice small{color:#aab7d1}.import-progress{border-color:#34425d}}


.support-card .receipt-id{display:block;margin:1rem 0;font-size:1.2rem}.support-card button.text{display:flex;width:fit-content;margin-top:.7rem}.support-counter{font-size:.78rem}.support-fallback{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem;margin-top:.8rem}.support-fallback p,.support-fallback [role=status]{flex-basis:100%;margin:.2rem 0}.support-fallback a{min-height:44px;display:inline-flex;align-items:center}
.receipt-id{user-select:text;overflow-wrap:anywhere}.detail-dialog .card{margin:.75rem 0;box-shadow:none}


.device-detail .device-reading~.device-reading,.reported-schedule{border-top:1px solid #dde3ef;margin-top:1rem;padding-top:1rem}.schedule-row{display:grid;gap:.1rem;padding:.7rem 0;border-top:1px solid #e6eaf2}.schedule-row:first-of-type{border-top:0}.schedule-row p{margin:.15rem 0}@media(prefers-color-scheme:dark){.device-detail .device-reading~.device-reading,.reported-schedule,.schedule-row{border-color:#34425d}}

.timeline-presets{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.5rem;margin:.4rem 0 .8rem}.preset-chip{min-height:44px;border:1px solid #dde3ef;border-radius:12px;background:#fff;color:#102d75;font-weight:700;padding:.6rem}.preset-chip[aria-pressed="true"]{border-color:#102d75;background:#102d75;color:#fff}@media(prefers-color-scheme:dark){.preset-chip{background:#151d30;border-color:#34425d;color:#eaf0ff}.preset-chip[aria-pressed="true"]{background:#f5a623;color:#102d75;border-color:#f5a623}}


.cost-detail-charts{display:grid;gap:1rem;margin-top:1rem}.cost-detail-charts .chart-card{grid-column:auto}.cost-detail-charts .card{box-shadow:none}.cost-detail-charts .table-scroll{max-height:15rem}

/* The paired Today cards follow the compact native Home hierarchy. */
.today-grid{gap:.65rem}.today-grid .card{min-height:132px;padding:1rem;justify-content:flex-start;box-shadow:0 3px 10px #102d7510}.today-card{background:linear-gradient(130deg,#fff2d6,#f6f8fc);border-color:#f5a62355}.today-label,.today-detail{color:#58698f;font-size:.8rem;line-height:1.25}.today-detail{white-space:pre-line}.today-card .hero-value{font-size:clamp(1.65rem,2.6vw,2.1rem);margin:.2rem 0 .1rem;letter-spacing:-.04em}.actions-card{gap:.25rem}.activity-head{display:flex;align-items:center;justify-content:space-between;width:100%;gap:.35rem;border-bottom:1px solid #dde3ef;padding-bottom:.4rem;font-size:.82rem}.activity-open{border:0;background:transparent;color:#102d75;text-align:left;font-weight:700;font-size:.91rem;line-height:1.2;padding:.35rem 0 0}.activity-detail{font-size:.76rem;line-height:1.25;color:#58698f}.actions-card .activity-detail{margin-top:auto}
@media(max-width:600px){.today-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.today-grid .card{min-height:132px;padding:.8rem}.today-card .hero-value{font-size:1.65rem}}
@media(max-width:350px){.today-grid{grid-template-columns:1fr}.today-grid .card{min-height:112px}}
@media(prefers-color-scheme:dark){.today-card{background:linear-gradient(130deg,#44351b,#202a40);border-color:#745b29}.activity-head{border-color:#34425d}.today-label,.today-detail,.activity-detail{color:#aab7d1}.activity-open{color:#eaf0ff}}
.page-head h1{font-weight:600;letter-spacing:-.025em}.today-card .hero-value{font-weight:600}
@media(max-width:600px){.home-section>.section-title{display:grid;grid-template-columns:1fr;gap:.55rem}.home-section>.section-title h2{white-space:nowrap}.home-status{justify-content:flex-start}}

.cost-preference-detail{display:block;color:#58698f;font-size:.82rem;font-weight:400;margin-top:.2rem}@media(prefers-color-scheme:dark){.cost-preference-detail{color:#aab7d1}}

.timeline-presets{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:.45rem}.timeline-presets .preset-chip{flex:0 0 auto;min-width:94px;scroll-snap-align:start}@media(max-width:800px){.shell{grid-template-columns:minmax(0,1fr)}.shell>div,.content{min-width:0}}

.pending-invitations{border-top:1px solid #dde3ef;margin-top:1.2rem;padding-top:1rem}.pending-invitations .row{align-items:flex-start}.pending-invitations p{margin-bottom:0}@media(prefers-color-scheme:dark){.pending-invitations{border-color:#34425d}}

/* The final theme pass wins over component light defaults above. Values mirror WiggleTheme.swift. */
:root {
  --chart-grid: #176586; --chart-export: #c9138d; --chart-home: #060099;
  --chart-solar: #b59b12; --chart-battery: #03620c; --chart-cars: #009a87;
  --chart-heat-pump: #a50017; --chart-rate: #8c1cc1; --chart-export-rate: #73890c;
  --chart-agile: #ad7568; --chart-wholesale: #4c0014;
  --chart-cost: #634505; --chart-running: #2b303d;
  --chart-indoor: #e00750; --chart-outdoor: #0777f8; --chart-target: #897304;
  --chart-hot-water: #97194e; --chart-weather: #312e81; --chart-carbon: #38b11a;
  --chart-space-heat: #d52900; --chart-hot-water-heat: #22a4ba; --chart-solar-heat: #582603;
  --chart-cop: #3c0b51; --chart-usual: #df6814; --chart-gas: #324fa6; --chart-gas-cost: #0b8c8c;
  --chart-wind-speed: #4f6d7a; --chart-sunshine: #e8740c; --chart-grid-wind: #14532d;
  --chart-grid-solar: #6b4226; --chart-supplier: #6e45af; --chart-now: #bf811b;
  --chart-selected: #102d75;
  /* WiggleTheme.success, for usage breakdown and a cost layer that is only earnings; and the
     secondary text at 45% that iOS greys an unavailable layer's key and symbol with. */
  --chart-earnings: #277e60; --muted-text: #58698f73;
  /* The usage breakdown bands, as iOS TimelineUsageBand: accent at 45%, success, yellow and danger. */
  --chart-band-baseload: #102d7573; --chart-band-ev: #277e60; --chart-band-appliances: #f5a623; --chart-band-unusual: #cb3e36;
}
@media(prefers-color-scheme:dark) { :root { color: #eaf0ff; background: #0b1020; } .deleting-dialog,.deleting-dialog::backdrop { background: #0b1020; color: #eaf0ff; } h1,h2,h3,.hero-value,.hero-sub,.tile-value { color: #eaf0ff; } .card,.home-tile,.insight-list,.insight-row,.detail-dialog { background: #151d30; border-color: #34425d; color: #eaf0ff; box-shadow: none; } .today-card,.savings-hero { background: linear-gradient(125deg,#3d321d,#202a40); border-color: #745b29; } .muted,.metric-label,.tile-label,.tile-foot,.device-facts dt { color: #aab7d1; } .eyebrow { color: #aab7d1; } .insight-row:hover { background: #202a40; } .mobile-nav { background: #151d30; border-color: #34425d; } }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --chart-grid: #4cb8e6; --chart-export: #f127af; --chart-home: #5953ff;
    --chart-solar: #faf0b9; --chart-battery: #1aff31; --chart-cars: #67ffec;
    --chart-heat-pump: #ff1a39; --chart-rate: #c876f0; --chart-export-rate: #d4f43d;
    --chart-agile: #c65c00; --chart-wholesale: #b24763;
    --chart-cost: #fbb521; --chart-running: #d5d9e4;
    --chart-indoor: #fe82ac; --chart-outdoor: #1e87fe; --chart-target: #ffe03f;
    --chart-hot-water: #f6bbd4; --chart-weather: #a5b4fc; --chart-carbon: #b2f4a1;
    --chart-space-heat: #ff7554; --chart-hot-water-heat: #8ce0ee; --chart-solar-heat: #fecfae;
    --chart-cop: #ad24e9; --chart-usual: #f59b5b; --chart-gas: #7790d9; --chart-gas-cost: #5fd9d9;
    --chart-wind-speed: #a9c3ce; --chart-sunshine: #ff9f43; --chart-grid-wind: #5eead4;
    --chart-grid-solar: #d9a47a; --chart-supplier: #b99aff; --chart-now: #ffb743;
    --chart-selected: #eaf0ff;
    --chart-earnings: #4fc79a; --muted-text: #aab7d173;
    --chart-band-baseload: #5f88e873; --chart-band-ev: #4fc79a; --chart-band-appliances: #ffb743; --chart-band-unusual: #ff746c;
  }
  a, button.link, .activity-open { color: #a9c1ff; }
  .skip-link { background: #1b253b; color: #eaf0ff; }
  input, textarea { background: #1b253b; color: #eaf0ff; }
  .card.tint { background: #3d321d; border-color: #745b29; }
  .list li, th, td, .device-facts, .device-facts div { border-color: #34425d; }
  .auth-brand, .chart-card svg { color: #eaf0ff; }
  .chart-card svg text { fill: #aab7d1; }
  .chart-card svg text.now-label { fill: var(--chart-now); }
  .flow-legend, .timeline-detail-charts > summary { color: #aab7d1; }
  .mobile-nav button { color: #aab7d1; }
  .mobile-nav button[aria-current="page"] { color: #eaf0ff; box-shadow: inset 0 3px #ffb743; }
  .sidebar .nav button[aria-current="page"] { background: #eaf0ff; color: #102d75; }
}

.alert-history-list{display:grid;gap:.55rem;margin-top:1rem}.alert-history-item{display:flex;align-items:flex-start;gap:.7rem;width:100%;min-height:72px;padding:.75rem;border:1px solid #dde3ef;border-radius:12px;background:#fff;color:#102d75;text-align:left}.alert-history-item>span:last-child{display:grid;gap:.12rem}.alert-history-item small{font-size:.75rem}.alert-unread,.alert-read{flex:none;width:9px;height:9px;border-radius:50%;margin-top:.4rem;background:#bf811b}.alert-read{background:transparent}.alert-attention{--attention-knockout:#fff;flex:none;width:16px;height:16px;margin-top:.15rem;color:#cb3e36}@media(prefers-color-scheme:dark){.alert-history-item{background:#151d30;border-color:#34425d;color:#eaf0ff}.alert-unread{background:#ffb743}.alert-attention{--attention-knockout:#151d30;color:#ff746c}}

.home-mini-suggestion{margin-top:.8rem;padding:1rem 1.1rem}.home-mini-suggestion .home-mini-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.home-mini-suggestion .home-mini-head strong{color:#102d75}.home-mini-suggestion .home-mini-head button{min-height:34px;font-size:.78rem}.home-mini-suggestion p{margin:.45rem 0 .65rem;font-size:.86rem}@media(prefers-color-scheme:dark){.home-mini-suggestion .home-mini-head strong{color:#eaf0ff}}

.today-attention{display:flex;align-items:center;gap:.65rem;width:100%;min-height:58px;margin-top:.65rem;padding:.65rem 1rem;border:1px solid #dde3ef;border-radius:16px;background:#f6f8fc;color:#102d75;text-align:left}.today-attention-symbol{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:#fff0d0;color:#9a5c00;font-weight:800}.today-attention>span:nth-child(2){display:grid;gap:.1rem;min-width:0}.today-attention strong{font-size:.82rem}.today-attention small{font-size:.76rem;color:#58698f;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.today-attention-chevron{margin-left:auto;font-size:1.35rem}@media(prefers-color-scheme:dark){.today-attention{background:#202a40;border-color:#34425d;color:#eaf0ff}.today-attention small{color:#aab7d1}.today-attention-symbol{background:#4a381d;color:#ffda8e}}

.home-header-actions{display:flex;align-items:center;gap:.55rem}.home-notification{position:relative;display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid #dde3ef;border-radius:50%;background:#f6f8fc;color:#102d75}.home-notification-count{position:absolute;top:-3px;right:-3px;min-width:17px;height:17px;padding:0 3px;border:2px solid #f6f8fc;border-radius:99px;background:#cb3e36;color:#fff;font-size:.55rem;font-weight:800;line-height:13px}.home-notification-count[hidden]{display:none}@media(prefers-color-scheme:dark){.home-notification{background:#202a40;border-color:#34425d;color:#eaf0ff}.home-notification-count{border-color:#151d30;background:#ff746c;color:#0b1020}}

.thermostat-tile{min-height:154px}.thermostat-tile .tile-icon{margin-bottom:.4rem}.thermostat-tile .tile-label{margin-top:0}.thermostat-tile .tile-value{margin:.25rem 0 .55rem}.thermostat-readings{display:flex;flex-wrap:wrap;gap:1rem 2rem;margin-bottom:.55rem}.thermostat-readings>span{display:grid;gap:.08rem}.thermostat-readings small{font-size:.73rem;color:#58698f}.thermostat-readings strong{font-size:1.05rem;color:#102d75}.thermostat-tile .tile-foot{padding-right:1.2rem}@media(prefers-color-scheme:dark){.thermostat-readings small{color:#aab7d1}.thermostat-readings strong{color:#eaf0ff}}

.settings-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:1.25rem}.settings-column{display:grid;align-content:start;gap:1.25rem;min-width:0}.settings-group{min-width:0}.settings-group>.section-title{margin:.4rem 0 .75rem}.settings-group>:is(.disclosure-row,.settings-usage){margin-bottom:.65rem}.settings-entry{margin-bottom:.65rem;min-width:0}.settings-entry>summary{list-style:none}.settings-entry>summary::-webkit-details-marker{display:none}.settings-entry[open]>summary{border-color:#aab7d1}.settings-entry>summary .disclosure-row-symbol{transition:transform .2s}.settings-entry[open]>summary .disclosure-row-symbol{transform:rotate(90deg)}.settings-entry>.card,.settings-entry>.settings-stack{margin:.4rem 0 1rem}.settings-entry>.card,.settings-stack>.card{box-shadow:none}.settings-entry>.card h2,.settings-stack>.card h2{font-size:1.12rem;margin-top:0}@media(max-width:800px){.settings-groups,.settings-column{grid-template-columns:1fr;gap:.75rem}.settings-group>.section-title{margin:1rem 0 .65rem}}@media(prefers-reduced-motion:reduce){.settings-entry>summary .disclosure-row-symbol{transition:none}}

.data-sources{display:grid;gap:.75rem}.data-sources section{padding:.75rem;border:1px solid #dde3ef;border-radius:10px}.data-sources h3{margin:.1rem 0 .35rem}.data-sources p{margin:.35rem 0}.data-sources a{color:#102d75}@media(prefers-color-scheme:dark){.data-sources section{border-color:#34425d}.data-sources a{color:#eaf0ff}}


.timeline-activity-sections{display:grid;gap:1.1rem;margin-top:1rem}.timeline-activity-group>.section-title{margin-bottom:.55rem}.timeline-activity-row{margin:.45rem 0;padding:1rem;border:1px solid #dde3ef;border-radius:15px;background:#fff;box-shadow:0 4px 12px #102d7509}.timeline-activity-row .row{align-items:center}.timeline-activity-row p{margin:.5rem 0}.timeline-activity-row small{font-size:.75rem}.timeline-activity-row .form-actions{margin-top:.7rem}@media(prefers-color-scheme:dark){.timeline-activity-row{background:#151d30;border-color:#34425d}}

.weather-band-values{margin:.7rem 0}.weather-band-values>summary{cursor:pointer;color:#102d75;font-weight:700}.weather-band-values li{display:flex;justify-content:space-between;gap:1rem;font-size:.8rem}.chart-card svg text.weather-band-symbol,.chart-card svg text.weather-band-temperature{fill:var(--chart-weather)}@media(prefers-color-scheme:dark){.weather-band-values>summary{color:#eaf0ff}}
.thermostat-tile{display:grid;gap:.7rem;align-content:start}.thermostat-open,.thermostat-temperatures{border:0;background:transparent;color:#102d75;text-align:left;cursor:pointer}.thermostat-open{padding:0;font-size:1rem;font-weight:700}.thermostat-temperatures{padding:0;font-size:.88rem;font-weight:650}.thermostat-tile .tile-value{margin:0}.thermostat-tile .thermostat-readings{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:.55rem;border-top:1px solid #dde3ef;margin:0}.thermostat-readings>span{flex:none}.thermostat-adjust{display:flex;align-items:center;gap:.4rem}.thermostat-step{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #f5a62355;border-radius:50%;background:#fff4dd;color:#102d75;font-size:1.25rem;font-weight:750}.thermostat-step:disabled{opacity:.38}.thermostat-on{padding:0;border:0;background:transparent;color:#a86600;font-size:1.05rem;font-weight:750}.thermostat-feedback{font-size:.78rem;color:#58698f}.thermostat-feedback:empty{display:none}@media(prefers-color-scheme:dark){.thermostat-open,.thermostat-temperatures,.thermostat-step{color:#eaf0ff}.thermostat-tile .thermostat-readings{border-color:#34425d}.thermostat-step{background:#4a381d;border-color:#765524}.thermostat-on{color:#ffda8e}.thermostat-feedback{color:#aab7d1}}
.weather-forecast-detail{display:grid;gap:1rem}.weather-forecast-detail>.chart-card{margin:0}.weather-hour-list{display:grid}.weather-day{margin:.8rem 0 .35rem;color:#58698f;font-size:.83rem}.weather-hour-row{display:grid;grid-template-columns:3.7rem 1.6rem 3rem minmax(0,1fr);align-items:center;gap:.65rem;min-height:58px;padding:.35rem 0;border-bottom:1px solid #dde3ef;color:#102d75;font-size:.84rem}.weather-hour-row>strong{font-size:.96rem}.weather-hour-row>span:last-child{display:grid;gap:.15rem;min-width:0}.weather-hour-row small{font-size:.73rem}.weather-hour-icon{color:var(--chart-weather);font-size:1.15rem}@media(max-width:390px){.weather-hour-row{grid-template-columns:2.5rem 1.3rem 2.3rem minmax(0,1fr);gap:.4rem;font-size:.76rem}}@media(prefers-color-scheme:dark){.weather-day{color:#aab7d1}.weather-hour-row{color:#eaf0ff;border-color:#34425d}}
.insight-detail{display:grid;gap:.7rem}.insight-detail h3{margin:0;color:#102d75}.insight-detail-message{font-size:1.1rem;line-height:1.45}.insight-detail ul{padding-left:1.15rem;color:#58698f}.insight-detail li{margin:.45rem 0}.insight-detail>.primary{justify-self:start}@media(prefers-color-scheme:dark){.insight-detail h3{color:#eaf0ff}.insight-detail ul{color:#aab7d1}}
.ev-activity{display:grid;gap:1rem}.ev-activity .card{display:grid;gap:.45rem;margin:0}.ev-activity .section-value{font-size:1.5rem;color:#102d75}@media(prefers-color-scheme:dark){.ev-activity .section-value{color:#eaf0ff}}

.mobile-nav-skip{display:none}@media(max-width:800px){.mobile-nav-skip{display:block;left:9rem}}

.octopus-secret { display: block; width: 100%; overflow-wrap: anywhere; padding: .85rem; margin: .75rem 0; border: 1px solid #dde3ef; border-radius: 12px; background: #f6f8fc; color: #102d75; font-size: .95rem; user-select: text; text-align: left; font-family: inherit; min-height: 44px; cursor: copy; }
@media (prefers-color-scheme: dark) { .octopus-secret { background: #202a40; border-color: #34425d; color: #eaf0ff; } }

/* Your home cards follow native SliceMetricCard: symbol, title, value with a
   smaller unit, status and chevron in one row. Columns come from rem widths, so
   browser text enlargement drops to one card a row instead of breaking numbers. */
/* As many columns of at least 180px as fit, from two on a phone to five, as iOS and Android (US-HOME-EDIT-001-11):
   a column is never narrower than half the grid less its gap, and 18% allows no sixth column. */
.home-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, max(min(11.25rem, calc((100% - .75rem) / 2)), 18%)), 1fr)); gap: .65rem .75rem; container-type: inline-size; }
/* Equal cells, as iOS HomeGridLayout (US-HOME-EDIT-001-09): a row is as tall as a one-cell card's three lines (title,
   figure and one detail line, with the card's padding), so a two-row card is two rows and the gap. The page places
   each card on its cells; where the columns drop to one (enlarged text) the cards stack at their own heights. */
.home-tiles { --home-row: max(76px, calc(.875rem * 1.5 + 1.56rem * 1.15 + .75rem * 1.25 + .1rem + .8rem)); grid-auto-rows: var(--home-row); }
.home-tiles.stacked { grid-auto-rows: auto; }
.home-tiles:not(.stacked) > .home-card-cell { min-height: 0; }
.home-tiles:not(.stacked) .home-card-body > :first-child { min-height: 0; overflow: hidden; }
.home-tiles:not(.stacked) .home-tile .tile-foot:not(.tile-foot-with-symbol) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-tiles:not(.stacked) .home-tile .tile-text { overflow: hidden; }
.home-tile { min-height: 76px; flex-direction: row; align-items: center; gap: .5rem; padding: .4rem .75rem; }
button.home-tile { cursor: pointer; font: inherit; }
.home-tile .tile-icon { flex: none; display: grid; place-items: center; width: 2.55rem; height: 2.55rem; margin: 0; }
.tile-icon svg { width: 100%; height: 100%; }
/* As iOS MetricTileLayout (US-HOME-021-05): the icon stays at the top left and is centred only against the
   text with no line wrapped, so a wrapping line makes the tile taller below the icon instead of moving the icon
   down. Its box is as tall as that text (label, value and status on one line each, line heights set here,
   0.05rem between them) and the icon is centred in the box. */
/* The title is one line, cut with an ellipsis, so a long name (a car's, an appliance's) never makes the tile taller or
   moves its icon (US-HOME-021-07); the whole title stays in the page for a screen reader. */
.home-tile:not(.thermostat-tile) .tile-label { line-height: 1.5; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-tile:not(.thermostat-tile) .tile-icon { align-self: flex-start; height: max(2.55rem, calc(.875rem * 1.5 + 1.56rem * 1.15 + .75rem * 1.25 + .1rem)); }
.home-tile:not(.thermostat-tile) .tile-icon svg { width: 2.55rem; height: 2.55rem; }
.home-tile .tile-text { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .05rem; }
.home-tile .tile-label { margin: 0; color: #102d75; font-size: .875rem; font-weight: 500; }
.home-tile .tile-value { margin: 0; display: flex; flex-wrap: nowrap; align-items: baseline; gap: .15rem; font-size: 1rem; }
/* A reading that does not fit at 65 percent wraps its unit, at full size (US-HOME-021-10). */
.home-tile .tile-value.tile-value-wraps { flex-wrap: wrap; }
.tile-amount { font-size: calc(1.56rem * var(--tile-fit, 1)); font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thermostat-step { width: 44px; height: 44px; line-height: 1; }
.tile-unit { font-size: calc(.875rem * var(--tile-fit, 1)); font-weight: 500; white-space: nowrap; }
.home-tile .tile-foot { padding: 0; color: #102d75d1; font-size: .75rem; font-weight: 500; }
.home-tile .tile-foot:empty { visibility: hidden; }
.home-tile .tile-foot.tint-signal { color: #986716; }
.home-tile .tile-foot.tint-danger { color: #cb3e36; }
.home-tile .tile-arrow { position: static; flex: none; font-size: 1.2rem; font-weight: 650; color: #102d75; }
.ms-line { stroke: #102d75; } .ms-fill { fill: #102d75; }
.ms-accent { fill: #f5a623; } .ms-accent-line { stroke: #f5a623; }
.ms-cloud { fill: #fff; } .ms-soft-line { stroke: #102d7580; } .ms-soft-fill { fill: #102d7580; }
.thermostat-tile { display: grid; align-items: stretch; gap: .7rem; padding: .95rem; border-radius: 18px; }
.thermostat-open { display: flex; align-items: center; gap: .7rem; width: 100%; font: inherit; }
.thermostat-open .tile-icon { width: 2.9rem; height: 2.9rem; }
.thermostat-title { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.thermostat-title strong { font-size: .97rem; font-weight: 650; }
.thermostat-status { font-size: .75rem; font-weight: 500; color: #58698f; }
.thermostat-status.tint-warning { color: #a75f13; } .thermostat-status.tint-information { color: #3170c9; } .thermostat-status.tint-navy { color: #102d75; }
.thermostat-temperatures { display: flex; gap: 1.25rem; flex: 1; font: inherit; }
.thermostat-reading { display: grid; gap: .1rem; }
.thermostat-reading small, .thermostat-set small { font-size: .66rem; font-weight: 500; color: #58698f; }
.thermostat-reading strong { font-size: 1.25rem; font-weight: 650; }
.thermostat-set { display: grid; justify-items: center; gap: .25rem; padding-left: .75rem; border-left: 1px solid #dde3ef; }
.thermostat-set strong { font-size: 1.125rem; min-width: 2.5rem; text-align: center; }
.thermostat-set strong.adjusting { opacity: .45; }
/* Inside, outside and the set point share a row as on iOS, wrapping only when text is enlarged. */
.thermostat-tile .thermostat-readings { flex-direction: row; flex-wrap: wrap; align-items: center; }
@media (prefers-color-scheme: dark) {
  .home-tile .tile-label, .home-tile .tile-arrow, .thermostat-reading strong { color: #eaf0ff; }
  .home-tile .tile-foot { color: #eaf0ffd1; }
  .home-tile .tile-foot.tint-signal { color: #ffb743; }
  .home-tile .tile-foot.tint-danger { color: #ff746c; }
  .ms-line { stroke: #eaf0ff; } .ms-fill { fill: #eaf0ff; } .ms-cloud { fill: #151d30; }
  .ms-soft-line { stroke: #eaf0ff80; } .ms-soft-fill { fill: #eaf0ff80; }
  .thermostat-status, .thermostat-reading small, .thermostat-set small { color: #aab7d1; }
  .thermostat-status.tint-warning { color: #ffad42; } .thermostat-status.tint-information { color: #78a7ff; } .thermostat-status.tint-navy { color: #eaf0ff; }
  .thermostat-set { border-color: #34425d; }
}
@media (forced-colors: active) { .ms-line, .ms-accent-line, .ms-soft-line { stroke: CanvasText; } .ms-fill, .ms-accent, .ms-soft-fill { fill: CanvasText; } .ms-cloud { fill: Canvas; } }

/* Enlarged text: the bottom tabs fold to two a row rather than running off the
   screen, and the hidden navigation skip link stays inside the viewport. */
@media (max-width: 800px) {
  .mobile-nav { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5rem), 1fr)); }
  .mobile-nav button { min-width: 0; overflow-wrap: anywhere; }
  .mobile-nav-skip { left: .5rem; max-width: calc(100vw - 1rem); }
}
.thermostat-tile { grid-template-columns: minmax(0, 1fr); }
.thermostat-open, .thermostat-temperatures, .thermostat-readings > * { min-width: 0; }
.thermostat-temperatures { flex-wrap: wrap; }
.thermostat-title strong { overflow-wrap: anywhere; }
/* Controls that sized to their content now wrap within the screen when text is enlarged. */
.thermostat-temperatures { flex: 1 1 auto; }
select, input, textarea { max-width: 100%; }
.card strong, .card h2 { overflow-wrap: anywhere; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.activity-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.mode-explanation { margin: .35rem 0 0; font-size: .76rem; line-height: 1.3; color: #58698f; }
@media (prefers-color-scheme: dark) { .mode-explanation { color: #aab7d1; } }
.home-live-status { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 650; }
/* The status dot (statusDot() in app.js, US-PLATFORM-PARITY-001-11): the signal unless a status gives it a tone; it
   pulses below, unless reduced motion is asked for. */
.status-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: #bf811b; }
@media (prefers-color-scheme: dark) { .status-dot { background: #ffb743; } }
.home-live-status .status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.home-live-status.tone-live { color: #277e60; } .home-live-status.tone-warning { color: #a75f13; } .home-live-status.tone-neutral { color: #58698f; }
@media (prefers-color-scheme: dark) { .home-live-status.tone-live { color: #4fc79a; } .home-live-status.tone-warning { color: #ffad42; } .home-live-status.tone-neutral { color: #aab7d1; } }
/* The note on the entry a link opened, as iOS: a tick and the words in the success colour, beside its buttons. */
.timeline-highlight-note { display: inline-flex; align-items: center; gap: 4px; color: #277e60; font-size: .8125rem; font-weight: 600; }
.timeline-highlight-note svg { flex: none; width: 1em; height: 1em; }
@media (prefers-color-scheme: dark) { .timeline-highlight-note { color: #4fc79a; } }
.multiline { white-space: pre-line; }
.settings-stack { display: grid; gap: 1rem; min-width: 0; }
.settings-stack > .card { grid-column: auto; }
.source-line, .home-mini-suggestion, .home-mini-health, .connections-attribution { border-top: 1px solid #dde3ef; padding-top: .8rem; margin-top: .8rem; }
.appliance-card h3, .appliance-group-title { margin: 0; } .appliance-card p { margin: .2rem 0; }
/* Connections' card of appliances no account supplies (US-UI-002-04) is named in a semibold title, as iOS. */
.appliance-group-title { font-weight: 600; }
/* An appliance account's card, or that card, has a line between its header and its appliances' rows (US-UI-002-04). */
.card > .appliance-card + .disclosure-row, .card > .appliance-group-title + .disclosure-row { border-top: 1px solid #dde3ef; margin-top: .6rem; }
.appliance-card .control-reconnect { margin: .7rem 0 0; }
.appliance-card .form-actions { margin-top: .7rem; }
.unlisted-maker h3 { margin: 0; }
.unlisted-maker .form-field { margin: .5rem 0; }
/* Only the text fields fill the width: the contact tick keeps its own size beside its words. */
.unlisted-maker .form-field input { width: 100%; }
/* The Home Mini inside the Octopus card, under a line (US-UI-002-02), as iOS ConnectionsScreen.homeMini: a mark on a
   10% tint of its state's colour (WiggleTheme success, warning or danger), the name and what it gives, and the state in
   a word in that colour. The tariff tokens hold the same three colours with their dark values. */
.home-mini-health { --tone: var(--tariff-success); display: grid; gap: .55rem; }
.home-mini-health.tone-warning { --tone: var(--tariff-warning); } .home-mini-health.tone-danger { --tone: var(--tariff-danger); }
.home-mini-health p, p.connections-attribution { margin-bottom: 0; }
.home-mini-health p { margin-top: 0; }
/* Connections' first line while Wiggle answers (US-UI-002-01), as iOS serviceOnline: the shared success check in the
   success colour beside "Wiggle is online", on one line and not a card. With no notice behind it, its check is white. */
.connections-online { --notice-tint: var(--tariff-success); --notice-fill: #fff; display: flex; align-items: center; gap: .5rem;
  margin: 0; font-size: .9375rem; font-weight: 500; }
.connections-online > .notice-symbol { flex: none; width: 1.15em; height: 1.15em; color: var(--notice-tint); }
.source-health-head { display: flex; align-items: center; gap: .75rem; }
.source-health-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, transparent); }
.source-health-name { display: grid; flex: 1; min-width: 0; }
.source-health-name strong { font-size: 1.05rem; }
.source-health-status { color: var(--tone); font-size: .75rem; font-weight: 650; text-align: right; }
.source-health-retry { font-weight: 650; }
/* Another source inside the Octopus card, as iOS: "capability · status" over a sentence. */
.source-line p { margin: .15rem 0 0; font-size: .85rem; }
.change-tariff { display: grid; gap: .9rem; }
.change-tariff > p { margin: 0; }
@media (prefers-color-scheme: dark) { .source-line, .home-mini-suggestion, .home-mini-health, .connections-attribution, .card > .appliance-card + .disclosure-row, .card > .appliance-group-title + .disclosure-row { border-color: #34425d; } }
.import-banner-mark, .import-mark { flex: none; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font-weight: 800; font-size: .8rem; }
.import-banner-mark { background: #a75f13; color: #fff; }
.import-step { display: flex; gap: .6rem; align-items: flex-start; }
.import-step.complete .import-mark { background: #277e60; color: #fff; }
.import-step.inProgress .import-mark { background: #dde3ef; color: #102d75; }
.import-step.failed .import-mark { background: #a75f13; color: #fff; }
.import-failure { color: #a75f13; margin: .1rem 0 0; }
@media (prefers-color-scheme: dark) { .import-failure { color: #ffad42; } .import-step.inProgress .import-mark { background: #34425d; color: #eaf0ff; } }
.maintenance-banner { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem 1rem; margin-bottom: 1rem; border-radius: 12px; background: #3170c91f; border: 1px solid #3170c959; color: #102d75; }
.maintenance-banner p { margin: .1rem 0 0; font-size: .85rem; color: #58698f; }
.maintenance-banner .import-banner-mark { background: #3170c9; }
@media (prefers-color-scheme: dark) { .maintenance-banner { color: #eaf0ff; } .maintenance-banner p { color: #aab7d1; } }
/* The demo home's notice (US-DEMO-002-01), as iOS DemoHomeLabel: navy on mist with a hairline below,
   pinned above every screen while it scrolls; a panel does not repeat it. In the Home Screen app it
   fills the status bar's inset, so the page below it needs none of its own. */
#demo-home-banner { position: sticky; top: 0; z-index: 20; }
.demo-home-label { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: 8px 14px;
  background: #f6f8fc; border-bottom: 1px solid #dde3ef; color: #102d75; font-size: .9375rem; font-weight: 600; line-height: 1.3; text-align: center; }
.demo-home-label svg { flex: none; }
#demo-home-banner .demo-home-label { padding-top: calc(8px + var(--safe-top)); }
.shell.demo-home .main-wrap { margin-top: calc(-1 * var(--safe-top)); }
@media (prefers-color-scheme: dark) { .demo-home-label { background: #202a40; border-color: #34425d; color: #eaf0ff; } }
/* Contact support (US-SUPPORT-004): the address, then Copy address and the email link as card buttons (cardActions). */
.contact-support-address { display: block; margin: .2rem 0 .4rem; font-size: 1.25rem; overflow-wrap: anywhere; }
.contact-support-details { white-space: pre-line; }
/* The supplier charging question (US-CONTROL-012): each answer a full-width row with its circle, as iOS. */
.supplier-question { display: grid; gap: .55rem; }
.supplier-question .maintenance-gated { display: contents; }
.supplier-question-title { margin: .2rem 0 0; font-size: 1rem; }
.supplier-question p { margin: 0; }
button.supplier-answer { display: flex; align-items: center; justify-content: flex-start; gap: .6rem; width: 100%; max-width: none; text-align: left; }
button.supplier-answer svg { flex: none; }
@media (prefers-color-scheme: dark) {
  .answer-tick { stroke: #151d30; } }
.control-reconnect summary { cursor: pointer; font-weight: 650; }
.control-reconnect p { margin: .5rem 0; }
/* A failure shown beneath a button or its row of buttons keeps clear of them. */
:is(button, .form-actions, .card-actions, .full-width-actions) + :is([role=alert], [role=status]) > .notice:first-child { margin-top: .9rem; }

/* Touch targets of at least 44×44 CSS px, the iOS minimum hit region (scripts/check-web-app-accessibility.mjs). */
button.link, .activity-open, .home-mini-suggestion .home-mini-head button { min-height: 44px; min-width: 44px; }
.activity-open { display: inline-flex; align-items: center; }
/* As iOS SliceTodayCard.activityCard: clock.arrow.circlepath in the accent colour before "Actions",
   drawn here, so it is never read aloud. The chevron on the row that opens the Timeline is the generic disclosure symbol. */
.actions-card .activity-head > strong { display: inline-flex; align-items: center; gap: 6px; }
/* At the largest text the Observe label moves under the heading rather than past the card's edge. */
.actions-card .activity-head { flex-wrap: wrap; }
.actions-card .activity-head > strong::before { content: ""; flex: none; width: 14px; height: 14px; background: #102d75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 12.8A7.6 7.6 0 1 0 6.8 6.6M4.4 3.9v3.6H8M12 8v4.4l2.9 1.8' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.6 12.8A7.6 7.6 0 1 0 6.8 6.6M4.4 3.9v3.6H8M12 8v4.4l2.9 1.8' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.actions-card .activity-open { width: 100%; justify-content: space-between; gap: 6px; }
@media (prefers-color-scheme: dark) { .actions-card .activity-head > strong::before { background: #5f88e8; } }
@media (forced-colors: active) { .actions-card .activity-head > strong::before { background: CanvasText; } }
details > summary { min-height: 44px; padding-block: .55rem; box-sizing: border-box; }
.external-link { display: inline-flex; align-items: center; min-height: 44px; }
/* A date or time field's picker button takes focus inside the field, where :focus-visible does not reach. */
input[type=date]:focus-within, input[type=time]:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.install-steps { margin: .4rem 0 0; padding-left: 1.4rem; }
.install-steps li { margin: .35rem 0; }
/* Focus rings are for keyboard focus. A tap, a click, or focus the app moves to a heading
   after one, shows none; the first key press brings them back (app.js sets data-input).
   Text fields keep theirs, since that is where typing goes. */
:root:not([data-input="keyboard"]) :focus-visible:not(input, textarea, select) { outline: none; }
:root:not([data-input="keyboard"]) input[type=date]:focus-within, :root:not([data-input="keyboard"]) input[type=time]:focus-within { outline: none; }
/* The screen fills the window in every state, loading and failed included, so the tab bar
   stays at the bottom as iOS keeps it (US-WEB-004). There is no separate header bar: each
   screen carries its own header, as on iOS. */
.shell-main { min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; }
.shell-main > main { flex: 1 0 auto; }
@media (max-width: 800px) {
  .mobile-nav { margin-top: auto; padding-bottom: env(safe-area-inset-bottom); }
}
/* No bounce past either end: iOS moves the whole page, sticky tab bar included, and Chrome would
   start its own pull-to-reload. The app's pull to refresh reads touches, so it still works. */
html, body { overscroll-behavior-y: none; }
/* The one loading, could-not-load and empty state (US-PLATFORM-PARITY-001-16; loadState() in app.js), as iOS
   WiggleLoadingCard, WiggleLoadFailureCard and WiggleEmptyCard. Loading: the spinner beside one line of 15 px medium
   words in the main text colour, 18 px in from the card's edges. Failed and empty: a 22 px symbol, then a 17 px
   semibold title in the main text colour over 13 px secondary words, 16 px in. A failure's symbol is the cause's, in
   the warning colour; it is a neutral card, never a red notice, and the shared primary "Try again" button (full width,
   at most 480 px) sits 12 px below it. An empty state's symbol is in the secondary colour. Only loadState() draws one
   (web/tests/load-states.test.mjs). */
.load-state.card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; }
.load-state.loading { align-items: center; padding: 18px; }
.load-state.loading:has(.load-state-detail) { align-items: flex-start; }
.load-state.loading:has(.load-state-detail) > .loading-spinner { margin-top: 2px; }
.load-state-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.load-state-words { display: block; color: #102d75; font-size: .9375rem; font-weight: 500; line-height: 1.35; }
.load-state-title { margin: 0 0 4px; color: #102d75; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.load-state-detail { margin: 0; color: #58698f; font-size: .8125rem; font-weight: 400; line-height: 1.4; }
.load-state-words + .load-state-detail { margin-top: 3px; }
.load-state .load-state-symbol { flex: none; width: 22px; height: 22px; color: #a75f13; }
.load-state.empty .load-state-symbol { color: #58698f; }
.load-state-group { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
@media (prefers-color-scheme: dark) {
  .load-state-words, .load-state-title { color: #eaf0ff; }
  .load-state-detail, .load-state.empty .load-state-symbol { color: #aab7d1; }
  .load-state .load-state-symbol { color: #ffad42; }
}
.loading-spinner { width: 1.1rem; height: 1.1rem; flex: none; border: 2.5px solid #dde3ef; border-top-color: #102d75; border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .loading-spinner { animation: wiggle-spin .8s linear infinite; } }
/* Out-of-date figures being read again fade until the new ones arrive (US-DATA-001-18, web/out-of-date.mjs). */
.home-page.is-out-of-date :is(.today-grid, .home-tiles), .timeline-page.is-out-of-date .timeline-day-slot { opacity: .45; }
@media (prefers-reduced-motion: no-preference) {
  .home-page :is(.today-grid, .home-tiles), .timeline-day-slot { transition: opacity .25s ease-in-out; }
  .home-page.is-out-of-date .home-live-status .status-dot, .status-dot.is-pulsing { animation: wiggle-updating-pulse 1.2s ease-in-out infinite; }
}
@keyframes wiggle-updating-pulse { 50% { opacity: .35; } }
.home-out-of-date-age { margin: -.35rem 0 .5rem; text-align: right; font-size: .8125rem; }
@keyframes wiggle-spin { to { transform: rotate(360deg); } }
.pull-refresh { position: fixed; z-index: 25; top: 0; left: 50%; display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border: 1px solid #dde3ef; border-radius: 999px; background: #fff; color: #102d75; font-size: .82rem; font-weight: 650; box-shadow: 0 6px 18px #102d7520; transform: translate(-50%, calc(var(--pull, 0px) - 100%)); pointer-events: none; }
.pull-refresh:not(.ready):not(.busy) .loading-spinner { animation: none; transform: rotate(calc(var(--pull, 0px) * 4)); }
/* Home's header, as iOS: the Wiggle symbol at top left, the home switcher and bell at top
   right, then the greeting. Desktop keeps the sidebar logo, so the symbol shows on phones. */
.home-head { position: relative; display: block; }
.home-head-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.wiggle-mark { display: block; flex: none; width: 92px; height: auto; color: #102d75; }
.header-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin-left: auto; min-width: 0; }
.household-switcher-slot { display: contents; }
.household-switcher { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 12rem; min-height: 44px; padding: 0 .8rem; border: 1px solid #dde3ef; border-radius: 999px; background: #f6f8fc; color: #102d75; font-size: .82rem; font-weight: 650; }
/* A long name wraps rather than being cut off, so enlarged text still shows which home this is. */
.household-switcher-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; padding: .2rem 0; }
.household-switcher svg { flex: none; }
/* Refresh is for those who cannot pull: hidden until it has keyboard focus, like a skip link. */
.page-refresh.skip-link { top: 0; right: 0; left: auto; transform: none; white-space: nowrap; min-height: 44px; border: 1px solid #aab7d1; border-radius: 999px; color: #102d75; font-weight: 650; }
.page-refresh.skip-link:not(:focus) { width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
@media (min-width: 801px) {
  .home-head .wiggle-mark { display: none; }
  .home-head { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 1rem; }
  .home-head-top { margin: 0; }
}
@media (max-width: 800px) {
  .home-head h1 { font-size: 1.8rem; }
  .page-head { margin-bottom: 1.1rem; }
}
@media (prefers-color-scheme: dark) {
  .wiggle-mark { color: #eaf0ff; }
  .household-switcher, .pull-refresh, .page-refresh.skip-link { background: #202a40; border-color: #34425d; color: #eaf0ff; }
  .loading-spinner { border-color: #34425d; border-top-color: #eaf0ff; }
}
/* Each insight is its own card, as iOS SliceInsightRow in a list spaced 10pt apart, so
   every insight reads as its own row. Ways to save is a row of the same kind. */
.insight-list { display: grid; gap: 10px; border: 0; border-radius: 0; overflow: visible; background: none; }
.insight-row, .insight-row:last-child { position: relative; overflow: hidden; min-height: 64px; border: 1px solid #dde3ef; border-radius: 14px; background: #fff; box-shadow: 0 3px 8px #102d751f; }
.insight-list + .insight-row, .insight-notice + .insight-row { margin-top: 10px; }
.insight-notice { margin: 0; font-size: .85rem; }
.urgent-insight { border: 0; border-radius: 0; overflow: visible; }
@media (prefers-color-scheme: dark) {
  .insight-row, .insight-row:last-child { border-color: #34425d; background: #151d30; box-shadow: none; }
}
/* Holding a card lifts it to be dragged over another, as on iOS. Text in a card is not
   selectable, so a hold never starts a selection or the iOS callout instead. */
.home-tiles > * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Timeline, as iOS EnergyTimelineScreen: the title with "+" and the bell, the day between
   chevrons, then one card holding "Your energy day", the 6h/12h/24h picker, the chart and its
   legend, quick views in a grid below it, and the day's entries on a line. */
:root { --chart-gridline: #dde3efd9; --chart-zero: #58698f73; }
.timeline-page { display: grid; gap: 18px; }
.timeline-page > * { min-width: 0; margin: 0; }
.timeline-page > .page-head { margin: 0; flex-wrap: nowrap; }
.timeline-page .page-head h1 { font-size: clamp(1.85rem, 3vw, 2.4rem); color: #102d75; }
.timeline-page .page-head .header-actions { flex-wrap: nowrap; }
.timeline-create-action { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f6f8fc; color: #102d75; }
.timeline-create-action svg, .timeline-day-step svg, .timeline-period-step svg { width: 20px; height: 20px; }
.timeline-create-action:disabled { opacity: .35; }
.timeline-action-slot { display: contents; }
.timeline-page .new-action-hint { margin: -10px 0 0; font-size: .8rem; text-align: right; }
.timeline-page .new-action-hint:empty, .timeline-action-hint-slot:empty { display: none; }
.timeline-day-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; color: #102d75; }
.timeline-day-step, .timeline-period-step { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #102d75; }
.timeline-day-step:disabled, .timeline-period-step:disabled { opacity: .3; }
.timeline-day-picker, .timeline-window-picker { position: relative; display: grid; justify-items: center; min-width: 0; }
.timeline-day-title, .timeline-period-title { display: grid; justify-items: center; gap: 1px; min-height: 44px; min-width: 44px; max-width: 100%; padding: .2rem .6rem; border: 0; border-radius: 12px; background: transparent; color: #102d75; text-align: center; }
.timeline-day-title strong, .timeline-period-title strong { font-size: 1.05rem; font-weight: 650; line-height: 1.25; }
.timeline-day-date { font-size: .82rem; color: #58698f; line-height: 1.3; }
.timeline-day-input, .timeline-period-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; }
.timeline-day-input.shown, .timeline-period-input.shown { position: static; opacity: 1; pointer-events: auto; width: auto; height: auto; min-height: 44px; margin-top: .4rem; padding: .3rem .6rem; border: 1px solid #aab7d1; border-radius: 9px; }
.timeline-page .timeline-backfill { border-radius: 16px; }
.timeline-series-card.card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; border-color: #dde3ef; box-shadow: 0 6px 18px #102d750f; }
.timeline-series-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-series-head h2 { margin: 0; font-size: 1.15rem; font-weight: 650; color: #102d75; }
.flow-chart-area { min-width: 0; }
.flow-plot { position: relative; min-width: 0; }
.flow-plot-canvas { position: relative; padding-top: 24px; }
.flow-plot svg.flow-svg { display: block; width: 100%; height: 180px; margin: 0; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.flow-now-label { position: absolute; top: 0; margin-left: -1px; white-space: nowrap; pointer-events: none; }
.flow-dispatch { position: absolute; top: 28px; height: 16px; min-width: 4px; border-radius: 7px; background: #6e45af45; display: grid; place-items: center; pointer-events: none; overflow: visible; }
.flow-dispatch.planned { background: #6e45af2e; }
/* One change to Octopus's plan as a strip (US-CHARGE-003-03), and the car it is for as a pill (US-CHARGE-003-01). */
.plan-strip { display: grid; gap: 3px; }
.plan-strip-bar { position: relative; height: 18px; border-radius: 5px; background: #f6f8fc; }
.plan-strip-block { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; box-sizing: border-box; }
.plan-strip-block.planned { background: #6e45af; }
.plan-strip-block.added { background: #277e60; }
.plan-strip-block.removed { border: 1.5px dashed #cb3e36; }
.plan-strip-arcs { display: block; width: 100%; height: 14px; margin-bottom: -3px; overflow: visible; fill: none; stroke: #58698f;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.plan-strip-axis { display: flex; justify-content: space-between; font-size: .8rem; color: #58698f; }
/* A plan for an unplugged car: lighter, and outlined dashed (US-ALERT-008-03). */
.flow-dispatch.provisional { background: #6e45af14; border: 1.5px dashed #6e45af; box-sizing: border-box; }
/* Hollow, so a window too short for its outline still reads as provisional. */
.flow-dispatch.provisional .flow-dispatch-mark { background: #fff; border-color: #6e45af; color: #6e45af; }
.flow-dispatch-mark { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 2px solid #fff; border-radius: 50%; background: #6e45af; color: #fff; }
/* A hatched band: in the smart-charge lane and colour, hatched with diagonal stripes and never filled, so it never
   reads as Octopus's plan. The stripes are the band's own background, so they move with it when the chart scrolls.
   The legend key is hatched the same way. */
.flow-hatched-band { position: absolute; top: 28px; height: 16px; min-width: 4px; border-radius: 7px; box-sizing: border-box; pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--chart-supplier) 0 1.5px, transparent 1.5px 5px); }
/* An Octopus Power Up or Power Down window (US-OCTOPUS-EVENTS-004-02): shaded down the plot in its type's colour, edged in
   it, and named with its symbol at the foot, so colour is never the only signal. A window the home joined is shaded deeper. */
.flow-supplier-event { position: absolute; top: 24px; bottom: 0; min-width: 4px; box-sizing: border-box; pointer-events: none;
  background: color-mix(in srgb, var(--supplier-event) 8%, transparent); border-inline: 1.5px solid var(--supplier-event); }
.flow-supplier-event.joined { background: color-mix(in srgb, var(--supplier-event) 16%, transparent); }
/* The name may run past a short window's edge rather than be cut, so it is always readable. */
.flow-supplier-event-name { position: absolute; left: 3px; bottom: 3px; display: flex; align-items: center; gap: 3px;
  white-space: nowrap; font-size: .66rem; font-weight: 650; }
/* The words keep the text colour for contrast (the Power Down amber is too light for small text); the symbol carries the colour. */
.flow-supplier-event-name svg { flex: none; width: 12px; height: 12px; margin: 0; color: var(--supplier-event); }
@media (forced-colors: active) { .flow-supplier-event { border-color: CanvasText; } .flow-supplier-event-name { color: CanvasText; } }
/* One Octopus event as a row of the Octopus events list and of Home's card: the type's symbol in its colour, the words,
   then the status pill or Join at the trailing edge, wrapping under the words when the row is narrow. */
.supplier-event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .3rem .75rem; padding-block: .7rem; }
.supplier-event + .supplier-event { border-top: 1px solid #dde3ef; }
.supplier-event .supplier-event-symbol { width: 24px; height: 24px; color: var(--supplier-event); margin-top: 1px; }
.supplier-event-copy { display: grid; gap: 2px; min-width: 0; }
.supplier-event-result { font-weight: 600; }
.supplier-event > .card-actions { margin: 0; }
@media (max-width: 420px) { .supplier-event > .pill, .supplier-event > .card-actions { grid-column: 2 / -1; justify-self: start; } }
.supplier-events { display: grid; gap: 1rem; }
.supplier-events-section h3 { margin: 0 0 .4rem; font-size: 1rem; }
.supplier-events-section .card { padding-block: .2rem; }
/* Under "Join Octopus events for me", in its card (US-OCTOPUS-EVENTS-006-05, -006-09): why joining is blocked, as the
   shared warning notice. */
.supplier-events-blocked { margin-top: .75rem; }
/* "Avoid charging during events" under it in the same card, and why a member cannot turn it on (US-OCTOPUS-EVENTS-011). */
.supplier-events-avoid-charging { margin-top: .75rem; }
.supplier-events-avoid-note { margin-top: .5rem; }
/* A car's charge inside an event (US-OCTOPUS-EVENTS-011), as iOS and Android: plain words under the event's details
   behind the rows' divider, across the whole row, the button at the trailing edge as Join's. In the car's Octopus section
   it is the shared notice under the next charge, its link starting under the words. */
.supplier-event > .supplier-event-charge { grid-column: 1 / -1; display: grid; gap: .5rem; padding-top: .7rem;
  border-top: 1px solid #dde3ef; }
.supplier-event-charge > p { margin: 0; }
.supplier-event-charge > .card-actions { margin: 0; }
.supplier-event-charge-message:empty { display: none; }
.octopus-event-charge { display: grid; gap: .5rem; margin-block: .6rem; }
.octopus-event-charge > p { margin: 0; }
.octopus-event-charge .card-actions { justify-content: flex-start; margin-top: .25rem; }
.supplier-event-card { margin-top: .8rem; }
.supplier-event-card > .disclosure-row { padding-top: 0; }
@media (prefers-color-scheme: dark) { .supplier-event + .supplier-event, .supplier-event > .supplier-event-charge { border-color: #34425d; } }
/* Connections › Axle (US-AXLE-001): what Axle is, the status pill with when Axle last answered, then the token form, the
   actions and the sign-up link, one under another. */
.axle-connection { display: grid; gap: 1rem; }
.axle-connection > p, .axle-connection h3, .axle-sign-up > * { margin: 0; }
.axle-feedback:empty { display: none; }
.axle-status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.axle-sign-up { display: grid; gap: .5rem; }
/* Connections › Axle (US-AXLE-001-09): the link icon in red, as iOS WiggleTheme.danger. The red is Axle's mark, not an
   error; --tariff-danger is that colour in both schemes, and the row's words say the connection's state. */
.disclosure-row-icon.axle-mark { color: var(--tariff-danger); }
.legend-hatch { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; box-sizing: border-box;
  border: 1px solid currentColor; background: repeating-linear-gradient(135deg, currentColor 0 1.5px, transparent 1.5px 4px); }
@media (forced-colors: active) {
  .flow-hatched-band { background: repeating-linear-gradient(135deg, CanvasText 0 1.5px, transparent 1.5px 5px); forced-color-adjust: none; }
  .legend-hatch { color: CanvasText; forced-color-adjust: none; }
}

.flow-axis, .flow-weather { position: relative; pointer-events: none; }
.flow-axis { height: 20px; margin-top: 2px; }
.flow-weather { height: 30px; margin-top: 4px; }
.flow-axis-label, .flow-weather-item { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.flow-axis-label { color: #58698f; font-size: .68rem; line-height: 20px; }
.flow-weather-item { display: grid; justify-items: center; color: var(--chart-weather); line-height: 1.1; }
.flow-weather-item .weather-band-symbol { font-size: .85rem; }
.flow-weather-item .weather-band-temperature { font-size: .62rem; font-weight: 600; }
.flow-axis-label[hidden], .flow-weather-item[hidden] { display: none; }
.timeline-legend-slot:empty, .timeline-notice-slot:empty { display: none; }
.timeline-legend { display: grid; gap: 8px; font-size: .68rem; color: #58698f; }
.timeline-legend-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.8rem, 1fr)); gap: 7px 10px; }
.timeline-legend-entry { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; line-height: 1.25; }
.timeline-legend-entry > span { min-width: 0; overflow-wrap: anywhere; }
.timeline-legend .legend-line { flex: none; overflow: visible; }
.timeline-legend .legend-fill, .layer-row .legend-fill { flex: none; width: 12px; height: 12px; border-radius: 3px; opacity: .6; }
.timeline-legend-breakdown { display: grid; gap: 6px; }
.timeline-legend-group { font-weight: 700; }
.timeline-card-notice { margin: 0; font-size: .7rem; color: #58698f; }
.timeline-card-notice::before { content: "⚠ "; }
.timeline-page .timeline-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.3em, 1fr)); gap: 0 8px; margin: -6px 0 0; padding: 0; overflow: visible; font-size: .8rem; }
.timeline-page .timeline-presets[hidden] { display: none; }
.timeline-page .timeline-presets button { display: grid; align-items: center; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #102d75; font: inherit; }
.preset-surface { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: .2rem .5rem; border: 1px solid #dde3ef; border-radius: 999px; background: #f6f8fc; font-weight: 600; line-height: 1.2; transition: background-color .3s, color .3s, border-color .3s; }
.preset-title { min-width: 0; overflow-wrap: anywhere; }
.timeline-icon { flex: none; width: 15px; height: 15px; }
.timeline-page .timeline-presets button[aria-pressed="true"] .preset-surface, .timeline-layers-button.is-selected .preset-surface { background: #102d75; border-color: #102d75; color: #fff; }
.timeline-layers-dialog .layer-section h3 { margin: 1rem 0 .45rem; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: #58698f; }
/* As iOS TimelineLayerPicker: a card per group, a row per layer or preset with its key, its name,
   a help button and a switch. A layer this home can't show is greyed out and its switch disabled. */
.timeline-layers-dialog .layer-rows { display: grid; margin: 0; padding: 0 14px; border: 1px solid #dde3ef; border-radius: 18px; background: #fff; }
.layer-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 4px 0; border-top: 1px solid #dde3ef; color: #102d75; font-weight: 600; }
.layer-row:first-child { border-top: 0; }
.layer-row .legend-line, .layer-row .legend-fill, .layer-row .timeline-icon { flex: none; }
/* As iOS: the line's key, then its symbol 22 points wide, in the line's colour. */
.layer-row-key { flex: none; display: flex; align-items: center; gap: 8px; }
.layer-row-symbol { display: grid; place-items: center; width: 22px; }
.layer-row .layer-row-symbol .timeline-icon { width: 18px; height: 18px; }
.layer-row .legend-fill { margin: 0 5px; } .layer-row .timeline-icon { width: 22px; height: 18px; }
.layer-row-title { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; cursor: pointer; }
.layer-row.is-unavailable { color: #58698f; }
.layer-row.is-unavailable .layer-row-title { cursor: default; }
.timeline-help-button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #58698f; }
.timeline-help-button svg { width: 20px; height: 20px; }
.timeline-help-button:hover { background: #eef2fa; }
.timeline-help-bubble { position: fixed; inset: auto; margin: 0; width: min(300px, calc(100vw - 32px)); max-height: min(60dvh, 420px); overflow: auto; padding: 16px; border: 1px solid #dde3ef; border-radius: 14px; background: #fff; color: #102d75; box-shadow: 0 12px 40px #102d7533; font-weight: 400; }
.timeline-help-title { display: block; font-size: 1rem; font-weight: 700; }
.timeline-help-bubble p { margin: 8px 0 0; color: #58698f; font-size: .92rem; }
.timeline-help-unavailable { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #dde3ef; }
.timeline-help-unavailable svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #a75f13; }
.timeline-help-unavailable strong { font-size: .88rem; }
.timeline-help-unavailable p { margin-top: 2px; }
.timeline-help-no-readings { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #dde3ef; }
.timeline-help-no-readings svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #58698f; }
.timeline-help-no-readings p { margin-top: 0; font-size: .88rem; }
.layer-credit { font-size: .8rem; margin: .8rem 0 0; }
@media (prefers-color-scheme: dark) {
  .timeline-layers-dialog .layer-rows, .timeline-help-bubble { background: #1b253b; border-color: #34425d; }
  .layer-row { border-color: #34425d; color: #eaf0ff; }
  .layer-row.is-unavailable, .timeline-help-button, .timeline-help-bubble p { color: #aab7d1; }
  .timeline-help-bubble { color: #eaf0ff; box-shadow: none; }
  .timeline-help-unavailable, .timeline-help-no-readings { border-color: #34425d; }
  .timeline-help-no-readings svg { color: #aab7d1; }
  .timeline-help-unavailable svg { color: #ffad42; }
  .timeline-help-button:hover { background: #202a40; }
}
.timeline-activity { display: grid; gap: 18px; }
.timeline-activity[hidden] { display: none; }
.timeline-page .timeline-activity-sections { gap: 18px; margin: 0; }
.timeline-page .timeline-activity-group > .section-title { margin-bottom: 10px; }
.timeline-activity-row { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; margin: 0 0 10px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; --tone: #6e45af; }
.timeline-page .timeline-activity-row, .detail-dialog .timeline-activity-row { padding: 0; border: 0; background: none; box-shadow: none; }
.timeline-activity-row:last-child { margin-bottom: 0; }
.timeline-activity-group .timeline-activity-row:not(:last-child)::before { content: ""; position: absolute; left: 4.5px; top: 32px; bottom: -28px; width: 1px; background: #dde3ef; }
.timeline-entry-dot { width: 10px; height: 10px; margin-top: 18px; border: 2px solid #fff; border-radius: 50%; background: var(--tone); box-sizing: content-box; margin-left: -2px; }
.timeline-entry { display: grid; gap: 6px; min-width: 0; padding: 14px; border: 1px solid #dde3ef; border-radius: 18px; background: #fff; box-shadow: 0 4px 12px #102d7509; }
.timeline-activity-row.is-highlighted .timeline-entry { background: #f5a62329; border: 1.5px solid #f5a623; }
.timeline-activity-row.is-provisional .timeline-entry, .actions-card.is-provisional, .home-coming-up-card.is-provisional { border: 1.5px dashed #6e45af; }
.timeline-activity-row.is-provisional .timeline-entry-dot { background: #fff; border-color: var(--tone); }
.timeline-entry-head { display: flex; align-items: flex-start; gap: 8px; }
.timeline-entry-when { display: flex; flex: 1; min-width: 0; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.timeline-entry-time { font-size: .8rem; font-weight: 650; color: #102d75; }
.timeline-entry-state { color: var(--tone); font-size: .7rem; font-weight: 600; }
.timeline-entry-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.timeline-entry-title { font-size: 1rem; font-weight: 650; color: #102d75; line-height: 1.3; }
.timeline-entry p { margin: 0; font-size: .82rem; }
.timeline-entry small { font-size: .72rem; }
.timeline-entry-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.timeline-entry-actions .card-actions { margin: 0 0 0 auto; }
.timeline-entry-actions .timeline-action-controls, .timeline-entry-actions .maintenance-gated { display: contents; }
.timeline-entry-actions .maintenance-action-notice { flex-basis: 100%; margin: 0; }
.tone-completed, .tone-confirmed, .tone-new { --tone: #277e60; } .tone-cancelled, .tone-corrected { --tone: #cb3e36; }
.tone-delayed { --tone: #a75f13; } .tone-estimated { --tone: #3170c9; }
@media (min-width: 801px) {
  .flow-plot svg.flow-svg { height: 240px; }
  .timeline-page .timeline-presets { grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr)); }
}
@media (prefers-color-scheme: dark) {
  :root { --chart-gridline: #34425dd9; --chart-zero: #aab7d173; }
  .timeline-page .page-head h1, .timeline-day-nav, .timeline-day-step, .timeline-day-title, .timeline-period-step, .timeline-period-title, .timeline-series-head h2,
  .timeline-entry-time, .timeline-entry-title { color: #eaf0ff; }
  .timeline-create-action, .preset-surface { background: #202a40; border-color: #34425d; color: #eaf0ff; }
  .timeline-page .timeline-presets button { color: #eaf0ff; }
  .timeline-page .timeline-presets button[aria-pressed="true"] .preset-surface, .timeline-layers-button.is-selected .preset-surface { background: #5f88e8; border-color: #5f88e8; color: #0b1020; }
  .timeline-day-date, .flow-axis-label, .timeline-legend, .timeline-card-notice, .timeline-values-title, .timeline-layers-dialog .layer-section h3 { color: #aab7d1; }
  .flow-dispatch { background: #b99aff45; } .flow-dispatch.planned { background: #b99aff2e; }
  .flow-dispatch.provisional { background: #b99aff14; border-color: #b99aff; }
  .plan-strip-bar { background: #202a40; } .plan-strip-block.planned { background: #b99aff; }
  .plan-strip-block.added { background: #4fc79a; } .plan-strip-block.removed { border-color: #ff746c; }
  .plan-strip-axis { color: #aab7d1; } .plan-strip-arcs { stroke: #aab7d1; }
  .flow-dispatch.provisional .flow-dispatch-mark { background: #151d30; border-color: #b99aff; color: #b99aff; }
  .timeline-activity-row.is-provisional .timeline-entry, .actions-card.is-provisional, .home-coming-up-card.is-provisional { border-color: #b99aff; }
  .flow-dispatch-mark { background: #b99aff; border-color: #151d30; color: #0b1020; }
  .timeline-series-card.card, .timeline-entry { background: #151d30; border-color: #34425d; }
  .timeline-entry-dot { border-color: #0b1020; }
  .timeline-activity-row.is-provisional .timeline-entry-dot { background: #0b1020; border-color: var(--tone); }
  .timeline-activity-group .timeline-activity-row:not(:last-child)::before { background: #34425d; }
  .timeline-activity-row { --tone: #b99aff; }
  .tone-completed, .tone-confirmed, .tone-new { --tone: #4fc79a; } .tone-cancelled, .tone-corrected { --tone: #ff746c; }
  .tone-delayed { --tone: #ffad42; } .tone-estimated { --tone: #78a7ff; }
}
@media (prefers-reduced-motion: reduce) { .preset-surface { transition: none; } }
@media (forced-colors: active) { .timeline-page .timeline-presets button[aria-pressed="true"] .preset-surface { border: 2px solid Highlight; } }
.timeline-layer-section { display: grid; gap: 18px; margin: 0; min-width: 0; }
.timeline-layer-section > * { min-width: 0; }
.timeline-series-card .timeline-legend svg.legend-line, .timeline-layers-dialog svg.legend-line { width: 22px; height: 12px; flex: none; }
.timeline-page .timeline-presets { font-size: .74rem; }
.timeline-page .preset-surface { gap: 4px; padding: .2rem .3rem; }
.timeline-page .preset-title { overflow-wrap: normal; }
.timeline-page .timeline-icon { width: 13px; height: 13px; }
.timeline-create-action { border: 1px solid #dde3ef; } @media (prefers-color-scheme: dark) { .timeline-create-action { border-color: #34425d; } }

/* Tab bar, as iOS TabView: each tab's symbol above its label, filled and in the accent colour when
   selected, grey otherwise. The desktop sidebar shows the same symbols beside its labels. */
.nav-button { --tab-knockout: #fff; }
.tab-symbol { display: inline-grid; flex: none; }
.tab-icon { width: 24px; height: 24px; }
.nav-button .tab-icon-filled, .nav-button[aria-current="page"] .tab-icon-outline { display: none; }
.nav-button[aria-current="page"] .tab-icon-filled { display: block; }
.nav .nav-button { display: flex; align-items: center; gap: .7rem; }
.nav .nav-button[aria-current="page"] { --tab-knockout: #fff; }
.sidebar .nav .nav-button[aria-current="page"] { --tab-knockout: #fff; }
@media (max-width: 800px) {
  .mobile-nav { padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav .nav-button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 56px; padding: 6px 2px 4px; box-shadow: none; color: #58698f; font-size: .66rem; font-weight: 600; line-height: 1.15; }
  .mobile-nav .nav-button[aria-current="page"] { color: #102d75; box-shadow: none; font-weight: 700; }
  .mobile-nav .nav-button .tab-icon { width: 25px; height: 25px; }
}
@media (prefers-color-scheme: dark) {
  .nav-button { --tab-knockout: #151d30; }
  .sidebar .nav .nav-button[aria-current="page"] { --tab-knockout: #eaf0ff; }
  .mobile-nav .nav-button, .mobile-nav button { color: #aab7d1; }
  .mobile-nav .nav-button[aria-current="page"], .mobile-nav button[aria-current="page"] { color: #5f88e8; box-shadow: none; }
}
@media (forced-colors: active) { .mobile-nav .nav-button[aria-current="page"] { color: Highlight; } }

/* Your home's heading, as iOS HomeScreen.sectionHeading: the rate chip and live status share the
   title's line while all of them fit, and otherwise move together to a line of their own under it,
   where the status wraps rather than being cut short. */
.home-section > .section-title, .home-section > .section-title:has(.home-status) { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.home-section > .section-title h2 { white-space: nowrap; }
.home-status { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; max-width: 100%; }
.home-status .home-live-status { min-width: 0; flex: 0 1 auto; font-size: .875rem; font-weight: 500; color: #102d75; }
.home-status .home-live-status .status-dot { flex: none; width: 8px; height: 8px; }
.home-status .home-live-status.tone-live .status-dot, .home-status .home-live-status.tone-neutral .status-dot { background: #bf811b; }
.home-status .home-live-status.tone-warning .status-dot { background: #a75f13; }
.today-attention-symbol { --attention-knockout: #f6f8fc; width: 20px; height: 20px; border-radius: 0; background: none; color: #a75f13; }
@media (prefers-color-scheme: dark) {
  .home-status .home-live-status { color: #eaf0ff; }
  .home-status .home-live-status.tone-live .status-dot, .home-status .home-live-status.tone-neutral .status-dot { background: #ffb743; }
  .home-status .home-live-status.tone-warning .status-dot { background: #ffad42; }
  .today-attention-symbol { --attention-knockout: #202a40; background: none; color: #ffad42; }
}

/* Timeline chart viewport, as iOS TimelineSeriesChartView: the day is drawn once and the visible
   window scrolls and zooms over it. Sideways drags belong to the chart; upright ones scroll the page. */
.flow-plot { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; border-radius: 6px; --plot-height: 180px; }
.flow-plot.is-dragging { cursor: grabbing; }
.flow-plot:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.flow-track { position: relative; width: 100%; will-change: transform; }
.flow-plot svg.flow-svg { cursor: inherit; touch-action: pan-y; height: var(--plot-height); }
.flow-now-label { top: 2px; margin-left: 0; z-index: 2; }
.flow-now-label[hidden], .flow-selection[hidden], .flow-page-hint[hidden] { display: none; }
.flow-selection { position: absolute; top: 24px; height: var(--plot-height); width: 0; border-left: 1.5px solid #102d758c; pointer-events: none; z-index: 2; }
.flow-page-hint { position: absolute; top: 24px; left: 0; height: var(--plot-height); display: grid; place-content: center; justify-items: center; gap: 2px; overflow: hidden; color: #58698f; font-size: .72rem; text-align: center; white-space: nowrap; pointer-events: none; }
.flow-page-hint.from-right { left: auto; right: 0; }
.flow-page-hint-title { color: #102d75; font-size: .78rem; }
/* The neighbouring day beside a pull past the edge, as iOS TimelineDayPager.neighbour: its chart on
   this chart's scales, the width of the plot, sliding in with the pull, its date along the top. */
.flow-neighbour-slot { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.flow-neighbour-slot[hidden] { display: none; }
.flow-neighbour { position: absolute; inset: 0; overflow: hidden; }
.flow-neighbour .flow-track { will-change: auto; }
.flow-neighbour-date { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.timeline-activity-slot[hidden] { display: none; }
@media (min-width: 801px) { .flow-plot { --plot-height: 240px; } }
@media (prefers-reduced-motion: reduce) { .flow-track { will-change: auto; } }

/* The inspected time's values in place of the legend, as iOS TimelineSeriesScrubReadout: each value
   in a pill tinted with its line's colour, a dot of that colour, and its name. */
.timeline-readout { display: grid; gap: 7px; padding: 8px; border: 1px solid #dde3ef; border-radius: 10px; background: #f6f8fc; }
.timeline-readout-title { margin: 0; color: #102d75; font-size: .72rem; font-weight: 650; }
.timeline-readout-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(5.4rem, 28%), 1fr)); gap: 6px; }
.timeline-readout-pill { display: grid; gap: 2px; min-width: 0; padding: 5px 6px; border-radius: 8px; background: color-mix(in srgb, var(--series) 12%, transparent); border-left: 3px solid var(--series); font-size: .66rem; }
.timeline-readout-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; color: #58698f; font-weight: 500; }
.timeline-readout-name > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.timeline-readout-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--series); }
.timeline-readout-pill strong { color: #102d75; font-size: .72rem; font-weight: 700; overflow-wrap: anywhere; }
.timeline-readout-detail { color: #102d75; font-size: .66rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.timeline-readout-events { display: grid; gap: 5px; }
.timeline-readout-event { display: flex; align-items: center; gap: 7px; min-width: 0; color: #102d75; font-size: .74rem; font-weight: 600; }
.timeline-readout-more { margin: 0; text-align: center; color: #58698f; font-size: .62rem; font-weight: 650; }

/* New action while no device can take one: it looks unavailable, as iOS, and a tap says why. */
.timeline-create-action[aria-disabled="true"] { opacity: .35; }
.alert-dialog { width: min(20rem, calc(100vw - 2rem)); text-align: center; }
.alert-dialog h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.alert-dialog p { margin: 0 0 1rem; }
/* An alert's buttons are the dialog's own pair (US-PLATFORM-PARITY-001-14): side by side, centred, each as wide as it needs. */
.alert-dialog .form-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.alert-dialog .form-actions button { width: auto; min-width: 8rem; }
.confirm-dialog { width: min(24rem, calc(100vw - 2rem)); }
.confirm-dialog .form-actions { flex-wrap: wrap; }
/* The message keeps its blank line before the boost advice (US-CONTROL-014-07). */
.confirm-dialog .confirm-message { white-space: pre-line; }
/* Three choices stack, the recommended one first, as an iOS alert lists them. */
.confirm-dialog .stacked-actions { flex-direction: column; align-items: stretch; }
.confirm-dialog .stacked-actions button { width: 100%; }

/* The day and its picker. On a touch screen the invisible date input lies over the day and takes
   the tap, since Safari opens its picker only from the input itself. */
.timeline-day-title, .timeline-period-title { display: flex; align-items: center; justify-content: center; gap: 7px; }
.timeline-day-words { display: grid; justify-items: center; gap: 1px; }
.timeline-day-loading, .timeline-period-loading { flex: none; width: 14px; height: 14px; }
.timeline-day-loading[hidden], .timeline-period-loading[hidden] { display: none; }
.timeline-day-input, .timeline-period-input { font-size: 16px; -webkit-appearance: none; appearance: none; }
@media (pointer: coarse) { .timeline-day-input:not(.shown), .timeline-period-input:not(.shown) { pointer-events: auto; z-index: 1; } }
.timeline-day-slot { display: grid; }
.timeline-day { display: grid; gap: 18px; min-width: 0; }
.timeline-day > * { min-width: 0; margin: 0; }

@media (prefers-color-scheme: dark) {
  .flow-selection { border-left-color: #eaf0ff8c; }
  .flow-page-hint { color: #aab7d1; }
  .flow-page-hint-title { color: #eaf0ff; }
  .timeline-readout { background: #202a40; border-color: #34425d; }
  .timeline-readout-title, .timeline-readout-pill strong, .timeline-readout-detail, .timeline-readout-event { color: #eaf0ff; }
  .timeline-readout-name, .timeline-readout-more { color: #aab7d1; }
  .timeline-readout-pill { background: color-mix(in srgb, var(--series) 18%, transparent); }
}

/* Safe areas. The page is laid out with viewport-fit=cover, so in the Home Screen app and in
   Safari's landscape view it runs under the status bar, the rounded corners, the sensor housing
   and the home indicator. Every edge that meets the screen edge adds the matching inset, which
   is zero in a desktop browser, so the layout there is unchanged. */
:root {
  --safe-top: env(safe-area-inset-top, 0px); --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px);
}
.main-wrap {
  padding-top: calc(clamp(1.2rem, 3vw, 3rem) + var(--safe-top));
  padding-right: calc(clamp(1.2rem, 3vw, 3rem) + var(--safe-right));
  padding-bottom: calc(clamp(1.2rem, 3vw, 3rem) + var(--safe-bottom));
}
.sidebar {
  padding-top: calc(1.8rem + var(--safe-top)); padding-bottom: calc(1.8rem + var(--safe-bottom));
  padding-left: calc(1.15rem + var(--safe-left));
}
.auth-layout {
  padding: calc(1rem + var(--safe-top)) calc(1rem + var(--safe-right))
    calc(1rem + var(--safe-bottom)) calc(1rem + var(--safe-left));
}
.skip-link { top: var(--safe-top); margin-left: var(--safe-left); }
.pull-refresh { top: var(--safe-top); }
.detail-dialog { max-height: min(85dvh, 800px, calc(100dvh - var(--safe-top) - var(--safe-bottom) - 1rem)); }
@media (max-width: 800px) {
  /* The tab bar sits on the home indicator's inset, as the iOS tab bar does, and its buttons keep
     clear of the corners in landscape. The page above it needs no bottom inset of its own. */
  .main-wrap {
    padding-top: calc(1.1rem + var(--safe-top)); padding-right: calc(1rem + var(--safe-right));
    padding-bottom: 2rem; padding-left: calc(1rem + var(--safe-left));
  }
  .mobile-nav { padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left); }
  .detail-dialog { width: min(520px, calc(100vw - 2rem - var(--safe-left) - var(--safe-right))); }
}
@media (max-width: 800px) and (display-mode: standalone) {
  /* From iOS 26 the Home Screen app blurs a band under the status bar that reaches about 23pt
     below the safe area, so the top of the header would sit in it. The page starts below it. */
  .main-wrap { padding-top: calc(2.25rem + var(--safe-top)); }
}
@media (min-width: 801px) {
  /* The sidebar holds the left edge on desktop; the page needs only its own padding there. */
  .main-wrap { padding-left: clamp(1.2rem, 3vw, 3rem); }
}

/* The one switch, as the iOS Toggle (US-PLATFORM-PARITY-001-17): a checkbox drawn as a track and thumb, in the accent
   when on. A chart layer's switch takes its line's colour through --switch-on, the one colour it may take instead. */
input.switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 51px; height: 31px; min-height: 0; margin: 0;
  padding: 0; border: 0; border-radius: 999px; background: #d5dbe8; cursor: pointer; transition: background-color .2s; }
input.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px #0b102040; transition: transform .2s; }
input.switch:checked { background: var(--switch-on, #102d75); }
input.switch:checked::before { transform: translateX(20px); }
input.switch:disabled { cursor: not-allowed; opacity: .5; }
@media (forced-colors: active) { input.switch { border: 2px solid CanvasText; } input.switch:checked { background: Highlight; } }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::before { transition: none; } }

/* Settings → Notifications, as iOS NotificationSettingsScreen. */
.notification-settings > .notification-types-heading { margin: 1.3rem 0 .2rem; font-size: 1.06rem; }
.notification-settings > .notification-types-heading + p { margin-top: 0; font-size: .82rem; }
.notification-status-panel { display: grid; gap: .5rem; padding: 1rem; border: 1px solid #dde3ef; border-radius: 14px; background: #f6f8fc; }
.notification-status-panel p { margin: 0; font-size: .9rem; }
.notification-status-panel > button { justify-self: start; }
.notification-status-title { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.1rem; }
.notification-status-symbol { display: inline-grid; place-items: center; flex: none; color: #102d75; }
.notification-status-symbol[data-state=enabled] { color: #bf811b; }
.notification-status-symbol[data-state=denied], .notification-status-symbol[data-state=failed] { color: #ad2636; }
/* The one switch row, as iOS WiggleSwitchRow: the title, its detail below, the switch at the trailing edge. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; margin-top: .3rem; cursor: pointer; }
.switch-row-copy { display: grid; gap: 3px; min-width: 0; }
.switch-row-title { color: #102d75; font-size: .9375rem; font-weight: 600; }
.switch-row-detail { display: grid; gap: .35rem; color: #58698f; font-size: .8125rem; font-weight: 400; line-height: 1.35; }
/* The status panel's switch sits below its words, so a line divides them, as the iOS section does. */
.notification-status-panel .notification-switch { padding-top: .7rem; border-top: 1px solid #dde3ef; }
.notification-types { display: grid; gap: 0; margin: .5rem 0 0; padding: .6rem 1rem .4rem; border: 1px solid #dde3ef; border-radius: 14px; min-width: 0; }
.notification-types legend { float: left; width: 100%; margin: 0 0 .3rem; padding: 0; font-weight: 700; font-size: 1rem; }
.notification-types.dimmed .alert-row { opacity: .45; }
.alert-row { display: flex; align-items: center; gap: .75rem; min-height: 52px; border-top: 1px solid #eef1f7; }
.alert-row:first-of-type { border-top: 0; }
.alert-row-copy { display: grid; gap: .1rem; min-width: 0; margin-right: auto; }
.alert-row-title { font-weight: 550; font-size: .92rem; }
.alert-row-detail { color: #58698f; font-size: .8rem; }
.alert-row-settings { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #58698f; }
.alert-row-settings:hover:not(:disabled) { background: #eaf0ff; }
/* Quiet hours, as iOS QuietHoursCard: below the home's alert types, since they belong to this browser. */
.quiet-hours { margin-top: .8rem; padding-bottom: .8rem; }
.quiet-hours-detail { margin: 0 0 .6rem; font-size: .82rem; }
.quiet-hours-times { display: grid; gap: .5rem; }
.quiet-hours-times[hidden] { display: none; }
.quiet-hours.dimmed .alert-row, .quiet-hours.dimmed .quiet-hours-detail, .quiet-hours.dimmed .quiet-hours-times { opacity: .45; }
/* One alert's settings, as the iOS sheets: a section header, the steppers or time, and the footer. */
.alert-tuning { display: grid; gap: .6rem; margin-top: .6rem; }
.alert-tuning .tuning-header { margin: 0; font-size: .8rem; font-weight: 650; letter-spacing: .02em; color: #58698f; text-transform: uppercase; }
.alert-tuning .tuning-footer { margin: 0; font-size: .82rem; }
.tuning-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .3rem .9rem;
  border: 1px solid #dde3ef; border-radius: 12px; }
.tuning-row input[type=time] { min-height: 40px; padding: .3rem .5rem; border-radius: 8px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: .3rem .5rem .3rem .9rem;
  border: 1px solid #dde3ef; border-radius: 12px; }
.stepper-value { min-width: 0; font-weight: 550; }
.stepper-amount { color: #102d75; font-weight: 650; }
/* As the iOS Stepper: − and + in one box about 94 × 32, split by a line. The box is drawn behind the two buttons, so
   each button stays a 44 px touch target taller than the box. */
.stepper-buttons { position: relative; display: inline-flex; flex: none; }
.stepper-buttons::before { content: ""; position: absolute; inset: 6px 0; border-radius: 9px; background: #102d7512; pointer-events: none; }
.stepper-step { position: relative; display: grid; place-items: center; width: 47px; height: 44px; padding: 0; border: 0; background: transparent; color: #102d75; }
.stepper-step + .stepper-step::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: #102d7533; }
.stepper-step:disabled { opacity: .35; }
@media (forced-colors: active) { .stepper-buttons::before { border: 1px solid ButtonText; } }

/* The notification history from the bell, as iOS NotificationInboxScreen. */
.notification-inbox { display: grid; gap: .8rem; margin-top: .6rem; }
.notification-inbox-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.notification-inbox-bar .chooser { flex: 1 1 10rem; width: auto; }
/* The inbox's toolbar: Mark all read and Notification settings sit beside the home filter, each as wide as its words. */
.notification-inbox-bar > button { flex: none; width: auto; }
.notification-settings-link { display: inline-flex; align-items: center; gap: .4rem; }
.notification-inbox .alert-history-list { margin-top: 0; }
.notification-inbox > .link { justify-self: start; }
.notification-inbox-empty { display: grid; gap: .2rem; padding: .9rem 1rem; border: 1px solid #dde3ef; border-radius: 14px; }
/* An inbox row from the home being shown, with its type's menu beside it, as iOS NotificationInboxRow. */
.alert-history-row { display: flex; align-items: flex-start; gap: .35rem; }
.alert-history-row > .alert-history-item { flex: 1; min-width: 0; }
.inbox-type-button { font-size: 1.2rem; line-height: 1; }
.inbox-type-menu:popover-open { display: grid; gap: .4rem; }

/* The notifications step, as iOS OnboardingScreen.notificationsStep. */
.onboarding-step > .card { width: min(100%, 560px); }
.onboarding-step h1 { margin: .35rem 0 .5rem; font-size: clamp(1.7rem, 6vw, 2rem); }
.onboarding-types { display: grid; margin: 1.1rem 0 .6rem; padding: .3rem .9rem; border: 1px solid #dde3ef; border-radius: 18px; min-width: 0; }
.onboarding-type { display: flex; align-items: center; gap: .9rem; min-height: 64px; padding: .55rem 0; border-top: 1px solid #eef1f7; cursor: pointer; }
.onboarding-type:first-of-type { border-top: 0; }
.onboarding-type-copy { display: grid; gap: .15rem; min-width: 0; margin-right: auto; }
.onboarding-type-copy strong { font-size: .93rem; }
.onboarding-type-copy span { color: #58698f; font-size: .8rem; line-height: 1.35; }
/* The one tick, as iOS CircularTickToggleStyle (US-PLATFORM-PARITY-001-17): empty, a ring of the main text colour at
   55 %; ticked, the accent filled with a white tick. */
input.tick { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; min-height: 0; margin: 0; padding: 0; border: 2px solid #102d758c;
  border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; transition: background-color .2s, border-color .2s; }
input.tick:checked { border-color: #102d75; background: #102d75; }
input.tick:checked::after { content: ""; width: 7px; height: 12px; margin-top: -3px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
input.tick:disabled { cursor: not-allowed; opacity: .5; }
@media (forced-colors: active) { input.tick:checked { background: Highlight; } }
@media (prefers-reduced-motion: reduce) { input.tick { transition: none; } }
/* The one tick row: the words at the leading edge and the tick at the trailing edge, top-aligned with the first line. */
.tick-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: .7rem; cursor: pointer; }
.tick-row-words { flex: 1; min-width: 0; padding-top: 4px; }
.tick-row > input.tick { margin-top: 2px; }
/* An onboarding alert type leads with its icon beside its words, as iOS notificationTypeRow, so its tick is centred on
   the icon's row rather than the first line, and the rows are divided by lines rather than spaced. */
.onboarding-type.tick-row { align-items: center; margin-top: 0; }
.onboarding-type .tick-row-words { display: flex; align-items: center; gap: .9rem; padding-top: 0; }
.onboarding-type.tick-row > input.tick { margin-top: 0; }
.onboarding-privacy { font-size: .8rem; }
.onboarding-actions { flex-direction: column; align-items: stretch; }
.onboarding-install { display: grid; gap: .4rem; margin: 1.1rem 0 .4rem; padding: 1rem; border: 1px solid #f5a62388; border-radius: 16px; background: #fff8e9; }
.onboarding-install p { margin: 0; }
.onboarding-install button { justify-self: start; }

/* Onboarding's step count and Back, and home setup's stages, as iOS OnboardingScreen and HouseholdSetupScreen. */
.onboarding-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.onboarding-header svg { max-height: 32px; width: auto; }
button.onboarding-back { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.onboarding-dots { display: flex; align-items: center; gap: 7px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 4px; background: #dde3ef; }
.onboarding-dot.reached { background: #f5a623; }
.onboarding-dot.current { width: 24px; }
@media (forced-colors: active) { .onboarding-dot { border: 1px solid CanvasText; } .onboarding-dot.reached { background: Highlight; } }
.onboarding-previews { display: grid; gap: .75rem; margin: 1.1rem 0; padding: 0; list-style: none; }
.onboarding-preview { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem; border: 1px solid #dde3ef; border-radius: 18px; }
.onboarding-preview-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: #eaf0ff; color: #102d75; }
.onboarding-preview-icon.supplier { background: #fff3dc; }
.onboarding-preview-icon svg { width: 26px; height: 26px; }
.setup-panel { display: grid; gap: .5rem; margin: 1rem 0; padding: 1rem; border: 1px solid #dde3ef; border-radius: 18px; min-width: 0; }
.setup-panel > p, .setup-panel h3 { margin: 0; }
.setup-panel input[type=text] { width: 100%; min-height: 44px; }
.setup-events { display: grid; gap: .5rem; padding-top: .5rem; border-top: 1px solid #dde3ef; }
.setup-events:empty { display: none; }
.setup-events > p { margin: 0; }
.axle-setup-finish { display: grid; gap: .5rem; margin-top: 1rem; }
.axle-setup-finish > p { margin: 0; }
.setup-connected { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.setup-about .setup-panel label { display: block; }
.octopus-key-source { display: grid; gap: .5rem; margin: .8rem 0 .4rem; padding: 0; border: 0; min-width: 0; }
.octopus-key-source legend { font-weight: 700; margin-bottom: .4rem; }
.octopus-new-key { display: grid; gap: .5rem; margin-top: .6rem; }
.octopus-new-key > button { justify-self: start; }
/* 13pt secondary text, as iOS OctopusKeyEntry's shared-key note (US-OCTOPUS-KEY-007). */
.octopus-key-shared-note { font-size: .8125rem; }
.property-single { display: grid; gap: .2rem; padding: .85rem; border: 1px solid #dde3ef; border-radius: 14px; }
.property-single small { color: #58698f; }
.key-help { display: grid; gap: .9rem; }
.key-help-step { display: grid; gap: .35rem; padding: .9rem 1rem; border: 1px solid #dde3ef; border-radius: 14px; }
.key-help-step h3, .key-help-step p { margin: 0; }
.key-help-step > button, .key-help-step > a { justify-self: start; }
.device-setup-rows { list-style: none; margin: 1rem 0; padding: 0 .9rem; border: 1px solid #dde3ef; border-radius: 18px; }
.device-setup-row { display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .6rem 0; border-top: 1px solid #eef1f7; }
.device-setup-row:first-child { border-top: 0; }
.device-setup-row .device-symbol { width: 2rem; height: 2rem; }
.device-setup-trailing { display: flex; align-items: center; gap: .6rem; flex: none; }
.device-setup-trailing button { width: auto; min-height: 44px; }
.device-setup-linked { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #1f7a4d; color: #fff; font-weight: 700; }
/* Add appliance: one dialog whose steps replace each other, as iOS AddApplianceSheet (US-DEVICE-001-06). */
.add-appliance-top .icon-button { display: grid; place-items: center; width: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.3rem; }
.add-appliance-top .icon-button[hidden] { display: none; }
.add-appliance-list { display: grid; gap: .6rem; }
.add-appliance-search { width: 100%; min-height: 44px; }
/* An appliance's icon, or a manufacturer's logo, fills the shared row's icon tile. */
.add-appliance-mark { display: contents; }
.add-appliance-mark img { width: 28px; height: 28px; object-fit: contain; }
.add-appliance-unavailable { color: #a75f13; font-weight: 600; }
@media (prefers-color-scheme: dark) { .add-appliance-unavailable { color: #ffad42; } }
.next-home-property strong { overflow-wrap: anywhere; }
@media (max-width: 480px) { .device-setup-row { flex-wrap: wrap; } .device-setup-trailing { margin-left: auto; } }
/* The manufacturer's link on a row a car Octopus charges has linked already (US-OCTOPUS-EV-001-01). */
.onboarding-type-copy .device-setup-manufacturer { justify-self: start; min-height: 44px; text-align: left; font-size: .85rem; }

@media (prefers-color-scheme: dark) {
  .onboarding-dot { background: #34425d; }
  .onboarding-dot.reached { background: #ffb743; }
  .onboarding-preview, .setup-panel, .setup-events, .property-single, .key-help-step, .device-setup-rows { border-color: #34425d; }
  .device-setup-row { border-color: #283550; }
  .onboarding-preview-icon { background: #202a40; color: #eaf0ff; }
  .onboarding-preview-icon.supplier { background: #3d321d; }
  .property-single small { color: #aab7d1; }
}

/* The Add to Home Screen step (US-WEB-007). */
.install-onboarding { margin: 1rem 0 .4rem; }
.install-onboarding .install-steps { display: grid; gap: .5rem; margin: 0; padding: 1rem 1rem 1rem 2.3rem; border: 1px solid #dde3ef; border-radius: 18px; }
.install-onboarding .install-steps li { margin: 0; }

/* Your homes, as iOS HouseholdSwitcherScreen: one divided list of homes, the current one ticked. */
.home-rows { list-style: none; margin: .4rem 0 1rem; padding: 0 .9rem; border: 1px solid #dde3ef; border-radius: 14px; background: #fff; }
.home-rows li { display: flex; align-items: center; gap: .3rem; border-top: 1px solid #eef1f7; }
.home-rows li:first-child { border-top: 0; }
.home-row { display: flex; align-items: center; gap: .8rem; flex: 1; min-width: 0; min-height: 64px; padding: .6rem 0; border: 0;
  background: transparent; color: #102d75; text-align: left; }
.home-row[aria-busy="true"] { opacity: .55; cursor: progress; }
.home-row-symbol { display: grid; place-items: center; flex: none; width: 30px; color: #102d75; }
.home-row[aria-current="true"] .home-row-symbol { color: #bf811b; }
.home-row-copy { display: grid; gap: .15rem; min-width: 0; margin-right: auto; }
.home-row-copy strong { font-size: 1rem; overflow-wrap: anywhere; }
.home-row-copy span { color: #58698f; font-size: .82rem; }
.home-row-tick { display: grid; place-items: center; flex: none; color: #102d75; }
.home-row-manage { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: #58698f; font-size: .85rem; letter-spacing: .05em; }
.home-row-manage:hover { background: #eaf0ff; }
.manage-home-actions { display: grid; gap: 10px; margin-top: .8rem; }

@media (prefers-color-scheme: dark) {
  input.switch { background: #34425d; }
  input.switch:checked { background: var(--switch-on, #5f88e8); }
  .notification-status-panel, .notification-types, .tuning-row, .stepper, .notification-inbox-empty, .onboarding-types { border-color: #34425d; }
  .notification-status-panel { background: #202a40; }
  .notification-status-symbol { color: #eaf0ff; }
  .notification-status-symbol[data-state=enabled] { color: #ffb743; }
  .notification-status-symbol[data-state=denied], .notification-status-symbol[data-state=failed] { color: #ff8a80; }
  .notification-status-panel .notification-switch { border-color: #34425d; }
  .switch-row-title { color: #eaf0ff; }
  .switch-row-detail { color: #aab7d1; }
  .alert-row, .onboarding-type, .home-rows li { border-color: #2a3550; }
  .alert-row-detail, .alert-row-settings, .alert-tuning .tuning-header, .onboarding-type-copy span,
  .home-row-copy span, .home-row-manage { color: #aab7d1; }
  .alert-row-settings:hover:not(:disabled), .home-row-manage:hover { background: #202a40; }
  .stepper-buttons::before { background: #eaf0ff1f; }
  .stepper-step, .stepper-amount { color: #eaf0ff; }
  .stepper-step + .stepper-step::before { background: #eaf0ff40; }
  input.tick { border-color: #eaf0ff8c; }
  input.tick:checked { border-color: #5f88e8; background: #5f88e8; }
  input.tick:checked::after { border-color: #0b1020; }
  .onboarding-install { background: #3d321d; border-color: #745b29; }
  .home-rows { background: #151d30; border-color: #34425d; box-shadow: none; }
  .install-onboarding .install-steps { border-color: #34425d; }
  .home-row, .home-row-symbol, .home-row-tick { color: #eaf0ff; }
  .home-row[aria-current="true"] .home-row-symbol { color: #ffb743; }
}

/* As iOS TimelineSeriesLegend: "Swipe to scroll" and "Hold to inspect" above the keys. */
.timeline-legend-hints { flex-basis: 100%; display: grid; gap: 6px; margin-bottom: 8px; color: #58698f; font-size: .72rem; font-weight: 500; }
.timeline-legend-hint-row { display: flex; justify-content: space-between; gap: 8px; }
.timeline-legend-hint { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend-hint .timeline-icon { width: 16px; height: 16px; flex: none; }
@media (prefers-color-scheme: dark) { .timeline-legend-hints { color: #aab7d1; } }

/* As iOS SavingsScreen: the hero's note and its two summary values, and the observing card. */
.savings-hero-title { color: #58698f; font-size: .85rem; font-weight: 500; }
.savings-hero-note { display: flex; align-items: center; gap: 6px; margin: .2rem 0 0; color: #58698f; font-size: .78rem; font-weight: 500; }
.savings-hero-note svg { width: 15px; height: 15px; flex: none; }
.savings-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: .7rem; padding-top: .7rem; border-top: 1px solid #f5a62359; }
.savings-summary-value { display: flex; align-items: center; gap: 8px; color: #102d75; }
.savings-summary-value > div { display: grid; }
.savings-summary-label { color: #58698f; font-size: .7rem; font-weight: 500; }
.savings-summary-value strong { font-size: 1rem; }
.savings-glyph { width: 22px; height: 22px; flex: none; }
/* As iOS SavingsScreen's 18-point stack: the hero, the observing card and the status panel stand apart. */
.savings-hero + .savings-observing, .savings-observing + .savings-observing { margin-top: 18px; }
.savings-observing { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid #f5a62359; border-radius: 18px; background: #f5a62314; color: #102d75; }
.savings-observing strong { font-size: 1rem; }
.savings-observing p { margin: 4px 0 0; color: #58698f; font-size: .84rem; }
.savings-observing-symbol { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #f5a6231f; color: #f5a623; }
/* A status panel: the observing card's yellow, the amount, the Estimated label in words. */
.savings-status-panel > div { display: grid; justify-items: start; min-width: 0; }
.savings-status-panel-summary { display: grid; }
.savings-status-panel-amount { margin-top: 4px; font-size: 1.6rem; font-weight: 800; overflow-wrap: anywhere; }
.savings-status-panel-figure { font-size: .94rem; font-weight: 650; overflow-wrap: anywhere; }
.savings-status-panel-evidence { color: #58698f; font-size: .81rem; font-weight: 650; }
.savings-status-panel button.link { margin-top: 4px; text-align: left; }
@media (prefers-color-scheme: dark) {
  .savings-hero-title, .savings-hero-note, .savings-summary-label, .savings-observing p, .savings-status-panel-evidence { color: #aab7d1; }
  .savings-summary-value, .savings-observing { color: #eaf0ff; }
}

/* The one disclosure row (US-PLATFORM-PARITY-001-21, -11; disclosureRow() in app.js), as iOS SettingsRow: an optional
   38 px icon tile with 11 px corners and a 10 % tint of the icon's colour, a 16 px semibold title, a 13 px secondary
   subtitle that wraps, and the trailing chevron or "opens outside" arrow in the secondary colour. On its own it is a card
   with 16 px corners and 14 px padding; in a list inside a card it has no card of its own. A Settings entry's summary is
   the same row, and Share usage counts takes the same box around its switch. */
.disclosure-row, .settings-usage { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; margin: 0; padding: 14px;
  border: 1px solid #dde3ef; border-radius: 16px; background: #fff; color: #102d75; box-shadow: 0 4px 16px #102d750b;
  font: inherit; text-align: left; text-decoration: none; }
button.disclosure-row, a.disclosure-row, summary.disclosure-row { cursor: pointer; }
/* A row that opens its content in place (disclosureDetails()), as iOS WiggleDisclosureRow.expanded(_:): the chevron
   turns down while the content shows. */
.disclosure-details > summary { list-style: none; }
.disclosure-details > summary::-webkit-details-marker { display: none; }
.disclosure-details > summary .disclosure-row-symbol { transition: transform .2s; }
.disclosure-details[open] > summary .disclosure-row-symbol { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .disclosure-details > summary .disclosure-row-symbol { transition: none; } }
.disclosure-row:disabled { opacity: .6; cursor: default; }
.disclosure-row:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.disclosure-row-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: color-mix(in srgb, currentColor 10%, transparent); color: #102d75; font-size: 1.2rem; }
.disclosure-row-icon svg { width: 20px; height: 20px; }
/* A manufacturer's logo sits on a white tile, as iOS ApplianceBrandList.logo, since a tint behind it would discolour it. */
.disclosure-row-icon.brand-mark { background: #fff; border: 1px solid #102d7514; }
.disclosure-row-copy { display: grid; flex: 1; gap: 2px; min-width: 0; }
.disclosure-row-copy strong { font-size: 1rem; font-weight: 600; line-height: 1.3; color: inherit; overflow-wrap: anywhere; }
.disclosure-row-copy > span { font-size: .8125rem; font-weight: 400; line-height: 1.3; color: #58698f; }
/* A line under the subtitle in the warning colour, as iOS WiggleDisclosureRow's note, such as a reading that is not fresh. */
.disclosure-row-copy > .disclosure-row-note { font-weight: 600; color: var(--tariff-warning); }
.disclosure-row-value { flex: 0 1 auto; min-width: 0; max-width: 55%; margin-left: auto; font-size: .9375rem; font-weight: 400; color: #58698f; text-align: right; overflow-wrap: anywhere; }
.disclosure-row-value + .disclosure-row-symbol { margin-left: 0; }
.disclosure-row-symbol { display: grid; place-items: center; flex: none; margin-left: auto; color: #58698f; font-size: 1.05rem; }
.disclosure-row.danger .disclosure-row-icon, .disclosure-row.danger .disclosure-row-copy strong { color: #ad2636; }
.card .disclosure-row { border: 0; border-radius: 0; background: none; box-shadow: none; padding-inline: 0; }
.card .disclosure-row + .disclosure-row { border-top: 1px solid #dde3ef; }
@media (prefers-color-scheme: dark) {
  .disclosure-row, .settings-usage { background: #151d30; border-color: #34425d; color: #eaf0ff; box-shadow: none; }
  .disclosure-row-icon { color: #eaf0ff; }
  .disclosure-row-copy > span, .disclosure-row-value, .disclosure-row-symbol { color: #aab7d1; }
  .disclosure-row.danger .disclosure-row-icon, .disclosure-row.danger .disclosure-row-copy strong { color: #ff8a95; }
  .card .disclosure-row { background: none; }
  .card .disclosure-row + .disclosure-row { border-top-color: #34425d; }
}
.account-verification { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #dde3ef; border-radius: 12px; }
.account-verification h3 { margin: 0 0 .35rem; }
.account-verification p { margin: 0; }
.acknowledgements-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
@media (prefers-color-scheme: dark) {
  .account-verification { border-color: #34425d; }
}
/* Heat pump comparison: the word carries the direction; the colour only repeats it. */
.comparison .comparison-values strong.comparison-more { color: #9a5c00; }
.comparison .comparison-values strong.comparison-saved { color: #1f7a3d; }
.comparison-note { font-size: .8rem; line-height: 1.4; margin: .5rem 0 0; }
/* EV sheet: an absent total is a sentence, not a figure; the history lists every session. */
.ev-activity .section-value.ev-absent { font-size: 1.15rem; }
.ev-history-sections, .ev-history, .ev-history-list { display: grid; gap: .75rem; }
.ev-history h3 { margin: .5rem 0 0; }
.ev-history-value { font-size: 1.05rem; color: #102d75; }
.ev-history > button.secondary { justify-self: start; }
@media (prefers-color-scheme: dark) {
  .comparison .comparison-values strong.comparison-more { color: #ffda8e; }
  .comparison .comparison-values strong.comparison-saved { color: #8fdca5; }
  .ev-history-value { color: #eaf0ff; }
}
/* As iOS SliceTodayCard, the whole cost card is the control that opens today's cost. */
button.today-card { width: 100%; font: inherit; color: inherit; text-align: left; align-items: flex-start; cursor: pointer; }
button.today-card:hover { border-color: #f5a623; }
/* As iOS, each urgent insight above Your home is a card of its own. */
.urgent-insight { display: grid; gap: 10px; }
/* As iOS SliceInsightRow and InsightSymbol: the outline symbol on a pale circle, and the evidence label. */
.insight-row { justify-content: flex-start; }
.insight-row > div { flex: 1; min-width: 0; }
.insight-row > .chevron { align-self: center; }
/* As iOS InsightRowLayout (US-HOME-021-06, -08): the symbol stays at the top left however tall the text is, so
   the row's even padding puts it as far from the top edge as from the left. */
.insight-row > .insight-symbol { align-self: flex-start; }
.insight-row strong { line-height: 1.5; }
.insight-row span.muted { line-height: 1.5; }
.insight-row .insight-row-evidence { line-height: 1.5; }
.insight-symbol { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #eef2fa; }
.insight-symbol svg { width: 26px; height: 26px; }
.insight-row-evidence { color: #58698f; font-size: .81rem; font-weight: 650; }
.insight-detail .insight-detail-symbol { width: 56px; height: 56px; background: none; place-items: start; }
.insight-detail .insight-detail-symbol svg { width: 46px; height: 46px; }
.insight-evidence { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 500; }
.insight-evidence svg { flex: none; width: 1.05em; height: 1.05em; }
/* As iOS HomeMetricDetailScreen, the card's status sits under its value. */
.detail-reading { display: grid; gap: .2rem; }
.detail-reading p { margin: 0; }
.detail-reading-status { color: #102d75; }
.weather-hour-icon svg { width: 1.6rem; height: 1.6rem; display: block; }
/* As iOS CostTodayScreen: the figure on a tinted panel, then one chart of the day. */
.cost-today { display: grid; gap: 1rem; }
.cost-today-summary { display: grid; gap: .25rem; padding: 1.1rem; border-radius: 18px; background: #f5a6231f; }
.cost-today-summary.earnings { background: #277e601f; }
.cost-today-summary p { margin: 0; color: #58698f; font-size: .8rem; font-weight: 500; }
.cost-today-summary .hero-value { font-size: 2.3rem; }
.cost-today-chart { display: grid; gap: .7rem; margin: 0; }
.cost-today-chart h3 { margin: 0; color: #102d75; }
.cost-today-figure { display: grid; gap: .3rem; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; cursor: crosshair; border-radius: 6px; }
.cost-today-figure:focus-visible, .insight-chart:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
/* The scrubbable charts' readout above and hint below (US-CHART-001), in the Grid carbon chart's classes. */
.cost-today-scrub, .insight-chart-scrub { display: grid; gap: .5rem; }
.cost-today-area { position: relative; }
.cost-today-area .cost-today-rule { top: 4%; bottom: 4%; }
.cost-today-plot { width: 100%; height: auto; display: block; }
.cost-today-axis { position: relative; height: 1.3rem; }
/* As Swift Charts places them, each hour label starts at its gridline. */
.cost-today-axis span { position: absolute; top: 0; padding-left: 3px; color: #58698f; font-size: .72rem; white-space: nowrap; }
.cost-today-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 0; color: #58698f; font-size: .72rem; font-weight: 500; }
.cost-today-key { display: inline-flex; align-items: center; gap: .3rem; }
.cost-today-key-symbol svg { width: 1.1em; height: 1.1em; display: block; }
.cost-today-note { margin: 0; font-size: .76rem; }
.cost-today-values > summary { cursor: pointer; color: #102d75; font-size: .8rem; font-weight: 650; }
@media (prefers-color-scheme: dark) {
  button.today-card:hover { border-color: #745b29; }
  .insight-symbol { background: #202a40; }
  .insight-row-evidence, .cost-today-summary p, .cost-today-axis span, .cost-today-legend { color: #aab7d1; }
  .detail-reading-status, .cost-today-chart h3, .cost-today-values > summary { color: #eaf0ff; }
}

/* What is wrong with a typed value, in the danger colour and in words, as iOS PostcodeDistrictForm. */
#postcode-district-hint p { margin: .35rem 0 0; font-size: .85rem; }
.field-problem { color: #ad2636; }
@media (prefers-color-scheme: dark) { .field-problem { color: #ff8a80; } }

/* A manufacturer account's state, as iOS ApplianceLinkSection: in words, and in the danger colour when it needs reconnecting. */
.appliance-status { font-size: .85rem; font-weight: 600; }
.appliance-status.attention { color: #ad2636; }
.grid-feed-title { margin-bottom: 0; font-weight: 600; }
@media (prefers-color-scheme: dark) { .appliance-status.attention { color: #ff8a80; } }

/* A brighter-tomorrow insight's estimated sunshine chart (US-INSIGHT-021) shares these rules: one
   line in the sunshine colour of the Timeline, the day the insight names in amber, no average.
   A colder or milder insight's forecast temperature chart (US-INSIGHT-020): the forecast in the
   weather colour, the past three days' average dashed in the muted text colour, and the day the
   insight names in the amber that marks a moment on the other charts. Tokens as iOS InsightTemperatureChart. */
.insight-chart-card { display: grid; gap: .6rem; margin: 0; padding: 1rem; }
.insight-chart-card h3 { margin: 0; font-size: 1.1rem; }
.insight-chart-card p { margin: 0; }
.insight-chart-subheading, .insight-chart-attribution, .insight-chart-caption { font-size: .8rem; }
.insight-chart { display: grid; gap: 2px; margin-top: .25rem; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; cursor: crosshair; border-radius: 6px; }
.insight-chart .metric-chart-plot { height: 160px; }
.insight-chart .metric-chart-times > span { font-size: .62rem; }
.insight-chart-unit { margin-bottom: .45rem; color: #58698f; font-size: .62rem; line-height: 1; }
@media (max-width: 480px) { .insight-chart-card { padding: .85rem .75rem; } .insight-chart .metric-chart-row { grid-template-columns: 1.7rem minmax(0, 1fr); } .insight-chart .metric-chart-times { margin-left: calc(1.7rem + 4px); } }
.insight-chart-forecast { stroke: var(--chart-weather); }
.insight-chart-baseline { stroke: #58698f; }
.insight-chart-sunshine { stroke: var(--chart-sunshine); }
.insight-chart-change { stroke: var(--chart-now); }
.insight-detail .insight-chart-card ul { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; color: inherit; }
.insight-detail .insight-chart-card li { margin: 0; }
.insight-chart-legend li { display: flex; align-items: center; gap: .55rem; font-size: .85rem; line-height: 1.3; }
.insight-chart-swatch { flex: none; width: 1.4rem; height: 0; border-top: 3px solid var(--chart-weather); }
.insight-chart-swatch.is-baseline { border-top: 2px dashed #58698f; }
.insight-chart-swatch.is-sunshine { border-top-color: var(--chart-sunshine); }
.insight-chart-swatch.is-change { width: 0; height: 1rem; border-top: 0; border-left: 3px solid var(--chart-now); margin: 0 calc((1.4rem - 3px) / 2); }
.insight-detail .insight-chart-card .insight-chart-days { margin-top: .25rem; border-top: 1px solid var(--chart-gridline); padding-top: .4rem; }
.insight-chart-days li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) {
  .insight-chart-baseline { stroke: #aab7d1; }
  .insight-chart-unit { color: #aab7d1; }
  .insight-chart-swatch.is-baseline { border-top-color: #aab7d1; }
}
/* Your tariff and Export tariff, as iOS TariffScreen, ExportTariffScreen and TariffRateChartCard.
   --tariff-rate is WiggleTheme.rate; the banner tints are WiggleTheme.success, warning and danger,
   and the off-peak symbol WiggleTheme.accent. The banner's words carry its meaning, not its tint. */
:root { --tariff-rate: #7a47bd; --tariff-success: #277e60; --tariff-warning: #a75f13; --tariff-danger: #cb3e36; --tariff-off-peak: #102d75; }
.tariff-detail { display: grid; gap: 1rem; }
.tariff-header { display: grid; gap: .3rem; }
.tariff-header p, .tariff-header h3 { margin: 0; }
.tariff-header h3 { color: #102d75; font-size: 1.6rem; }
.tariff-status { --tone: var(--tariff-success); display: flex; align-items: flex-start; gap: .75rem; padding: .85rem; border-radius: 16px; background: color-mix(in srgb, var(--tone) 9%, transparent); }
.tariff-status.tone-warning { --tone: var(--tariff-warning); } .tariff-status.tone-danger { --tone: var(--tariff-danger); }
.tariff-status-symbol { flex: none; color: var(--tone); }
.tariff-status-symbol svg { display: block; width: 1.15rem; height: 1.15rem; }
.tariff-status strong { color: #102d75; font-size: .9rem; }
.tariff-status p { margin: .15rem 0 0; color: #58698f; font-size: .8rem; }
.tariff-rate-card { display: grid; gap: .75rem; margin: 0; }
.tariff-rate-card h3 { margin: 0; color: #102d75; font-size: 1.15rem; }
.tariff-rate-message { margin: 0; min-height: 7rem; }
.tariff-rate-footnote { margin: 0; font-size: .74rem; }
.metric-chart-plot.tariff-rate-plot { height: 180px; }
.tariff-rate-inspector { display: grid; gap: .6rem; }
.tariff-rate-selection { display: flex; justify-content: space-between; gap: 1rem; margin: 0; color: #102d75; font-size: .82rem; font-weight: 650; }
.tariff-rates { margin: 0; padding: 0; list-style: none; border: 1px solid #dde3ef; border-radius: 18px; background: #fff; }
.tariff-rate-row { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-top: 1px solid #dde3ef; color: #102d75; }
.tariff-rate-row:first-child { border-top: 0; }
.tariff-rate-row > span:not(.tariff-rate-symbol) { font-weight: 650; }
.tariff-rate-row strong { margin-left: auto; font-size: 1.35rem; white-space: nowrap; }
.tariff-rate-symbol { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: #f6f8fc; color: var(--tariff-warning); }
.tariff-rate-symbol.is-off-peak { color: var(--tariff-off-peak); }
.tariff-rate-symbol svg { width: 18px; height: 18px; }
.tariff-gas h3 { display: flex; align-items: center; gap: .55rem; margin: .2rem 0 .4rem; }
.tariff-gas h3 .energy-icon { width: 1.4rem; height: 1.4rem; }
.tariff-gas p { margin: .6rem 0 0; font-size: .78rem; }
@media (prefers-color-scheme: dark) {
  :root { --tariff-rate: #c29aff; --tariff-success: #4fc79a; --tariff-warning: #ffad42; --tariff-danger: #ff746c; --tariff-off-peak: #5f88e8; }
  .tariff-header h3, .tariff-status strong, .tariff-rate-card h3, .tariff-rate-selection, .tariff-rate-row { color: #eaf0ff; }
  .tariff-status p { color: #aab7d1; }
  .tariff-rates { background: #151d30; border-color: #34425d; }
  .tariff-rate-row { border-color: #34425d; }
  .tariff-rate-symbol { background: #202a40; }
}
@media (forced-colors: active) { .tariff-status { border: 1px solid CanvasText; } }
/* Timeline entries as iOS TimelineEventRow: each state carries its symbol in its tone, and "All activity" stays
   reachable. Its messages are the shared load states (.load-state). */
.timeline-entry-state { display: inline-flex; align-items: center; gap: 4px; }
.timeline-entry-state .timeline-icon.timeline-entry-symbol { width: 1.15em; height: 1.15em; flex: none; }
.timeline-backfill { display: grid; gap: 10px; justify-items: start; }
.timeline-backfill > :is(.card, .load-state-group) { justify-self: stretch; }

/* Wiggle's shared energy icons (energy-icons.mjs) beside text, on every surface iOS draws them. They keep
   their own two tones from the .ms-* classes; .energy-icon-mono draws one in the text colour instead, for a
   selected quick view and the dispatch marker, whose fills the navy line would vanish into. */
:where(.energy-icon) { flex: none; width: 1.3em; height: 1.3em; vertical-align: -.3em; }
.energy-icon-mono .ms-line, .energy-icon-mono .ms-accent-line { stroke: currentColor; }
.energy-icon-mono .ms-fill, .energy-icon-mono .ms-accent { fill: currentColor; }
.icon-heading { display: flex; align-items: center; gap: .5rem; }
.icon-heading .energy-icon { width: 1.6rem; height: 1.6rem; }
.icon-heading .device-symbol { width: 1.9rem; height: 1.9rem; }
.icon-note { display: flex; align-items: flex-start; gap: .5rem; }
.icon-note .energy-icon { width: 1.4rem; height: 1.4rem; }
.timeline-entry-state .energy-icon { width: 1.4rem; height: 1.4rem; }
.action-row-title { display: inline-flex; align-items: center; gap: .5rem; }
.action-row-title .energy-icon { width: 1.6rem; height: 1.6rem; }
.insight-symbol .energy-icon { width: 32px; height: 32px; }
.insight-detail .insight-detail-symbol .energy-icon { width: 54px; height: 54px; }
.onboarding-type-icon { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #eef2fa; }
.onboarding-type-icon .energy-icon { width: 1.7rem; height: 1.7rem; }
.onboarding-type-icon svg:not(.energy-icon) { width: 1.4rem; height: 1.4rem; }
.detail-reading-with-symbol { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .2rem .9rem; }
.detail-reading-text { display: grid; gap: .2rem; min-width: 0; }
.detail-reading-text p { margin: 0; }
.detail-reading-symbol { flex: none; display: inline-grid; width: 2.6rem; height: 2.6rem; }
.detail-reading-symbol svg { width: 100%; height: 100%; }
.layer-row .layer-row-symbol .energy-icon { width: 20px; height: 20px; }
.layer-row.is-unavailable .energy-icon { opacity: .45; }
.flow-dispatch-mark .energy-icon { width: 12px; height: 12px; }
@media (prefers-color-scheme: dark) {
  .onboarding-type-icon { background: #202a40; }
}
.preset-surface .energy-icon, .timeline-page .preset-surface .energy-icon { width: 17px; height: 17px; }
.layer-row .energy-icon.timeline-icon { width: 18px; height: 18px; }
/* About your home (US-PROFILE-001): each question a fieldset whose legend is its heading, and each
   choice a label row at least 44px tall, so the whole row toggles its radio or checkbox. */
.home-profile-question { margin: 1.25rem 0 0; padding: 0; border: 0; min-width: 0; }
.home-profile-question legend { padding: 0; }
.home-profile-question h3 { margin: 0 0 .3rem; }
.home-profile-question p { margin: .2rem 0; }
.home-profile-choices { display: grid; gap: .1rem; margin: .4rem 0; }
.home-profile-choice { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; }
.home-profile-choice input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: #102d75; }
.home-profile-answer { font-weight: 700; }
.home-profile-form .form-actions { margin-top: 1.25rem; }
@media (prefers-color-scheme: dark) {
  .home-profile-choice input { accent-color: #f5a623; }
}
/* Settings › Account › Share usage counts (US-ANALYTICS-002): the row as its neighbours draw it, its
   switch at the end, then the footnote and What is counted inside the same card. The title is the
   switch's label, so a tap on it toggles the switch too. */
.settings-usage { display: block; }
.settings-usage-main { display: flex; align-items: center; gap: .8rem; min-height: 44px; }
.settings-usage-main .disclosure-row-copy { flex: 1; }
.settings-usage-main label { cursor: pointer; }
.settings-usage .maintenance-gated { display: contents; }
.settings-usage-footnote { margin: .75rem 0 .1rem; font-size: .78rem; font-weight: 400; line-height: 1.35; color: #58698f; }
.settings-usage button.link { min-height: 44px; font-weight: 650; }
.settings-usage .maintenance-action-notice { margin: .3rem 0 0; font-weight: 400; }
.settings-usage-feedback .notice { margin: .3rem 0 0; }
@media (prefers-color-scheme: dark) {
  .settings-usage-footnote { color: #aab7d1; }
}
/* Settings history (US-SETTINGS-HISTORY-001): each section a heading and its note, then one list item per
   change with its title, the change and who, when and from which app. The list's dividers and the muted
   line take their light and dark colours from .list and .muted. */
.settings-history h3 { margin: 1.25rem 0 .2rem; }
.settings-history h3 + p { margin: 0 0 .6rem; }
.settings-history-entry strong { display: block; font-weight: 600; }
.settings-history-entry p { margin: .2rem 0 0; overflow-wrap: anywhere; }
.settings-history-empty { margin: .4rem 0 0; }

/* A Savings panel under the tariff card, and the rows it opens. */
.savings-panel { display: grid; gap: .4rem; }
.savings-panel-words { display: grid; gap: .2rem; }
.savings-panel-detail { display: grid; gap: .8rem; }
.savings-panel-row { display: grid; gap: .3rem; }
.savings-panel-row-head { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.savings-panel-row p { margin: 0; }
.savings-panel-footer { display: grid; gap: .4rem; }
.savings-panel-footer p { margin: 0; }

/* The Grid carbon card and its detail, as iOS HomeGridCarbonDetailScreen (US-CARBON-002). The band tints are
   WiggleTheme.success, warning and danger; the band's word goes with every colour, so colour is never the only signal. */
:root { --carbon-success: #277e60; --carbon-warning: #a75f13; --carbon-danger: #cb3e36; --carbon-backing: #fff; --carbon-grid: #dde3ef; }
@media (prefers-color-scheme: dark) {
  :root { --carbon-success: #4fc79a; --carbon-warning: #ffad42; --carbon-danger: #ff746c; --carbon-backing: #151d30; --carbon-grid: #34425d; }
}
.ms-carbon-success { fill: var(--carbon-success); } .ms-carbon-warning { fill: var(--carbon-warning); }
.ms-carbon-danger { fill: var(--carbon-danger); } .ms-backing { fill: var(--carbon-backing); }
.home-tile .tile-foot-with-symbol { display: inline-flex; align-items: center; gap: .3rem; }
.tile-foot-symbol { display: inline-grid; flex: none; }
.green-time-symbol { width: 1.35em; height: 1.35em; }
/* The Met Office's own colours: its style guide allows no others without its agreement (US-WEATHER-009). The mark on
   each is the text colour the guide recommends; the outline keeps the triangle visible on any card. */
:root { --warning-red: #ca0a37; --warning-amber: #ff9900; --warning-yellow: #ffe923; --warning-on-red: #fff; --warning-on-light: #000; --warning-outline: #102d75; }
@media (prefers-color-scheme: dark) { :root { --warning-outline: #eaf0ff; } }
.warning-triangle { width: 1.35em; height: 1.35em; display: block; }
.warning-fill { stroke: var(--warning-outline); stroke-width: 1.2; stroke-linejoin: round; fill: none; }
.warning-red .warning-fill { fill: var(--warning-red); } .warning-red .warning-mark { fill: var(--warning-on-red); }
.warning-amber .warning-fill { fill: var(--warning-amber); } .warning-amber .warning-mark { fill: var(--warning-on-light); }
.warning-yellow .warning-fill { fill: var(--warning-yellow); } .warning-yellow .warning-mark { fill: var(--warning-on-light); }
.warning-unknown .warning-mark { fill: var(--warning-outline); }
.home-tile .tile-foot-with-symbol:has(.warning-triangle) { align-items: flex-start; }
.home-tile.home-tile-status-below { flex-wrap: wrap; row-gap: 0; align-content: flex-start; }
.home-tile.home-tile-status-below .tile-icon { height: 2.55rem; }
.home-tile.home-tile-status-below .tile-warning-lines { flex: 0 0 100%; min-width: 0; display: grid; gap: .05rem; }
.home-tile.home-tile-status-below:not(.home-wide-tile) .tile-text { flex: 1 1 0; }
.home-wide-tile.home-tile-status-below .home-wide-chart { height: 44px; }
.home-tiles { --home-warning-row: max(76px, calc(.875rem * 1.5 + 1.56rem * 1.15 + var(--home-warning-lines, 1) * .75rem * 1.25 + .1rem + .8rem)); }
.weather-warnings { display: grid; gap: .75rem; margin: 0 0 1rem; }
.weather-warning { display: grid; gap: .5rem; }
.weather-warning > * { margin: 0; }
.weather-warning-title { display: flex; align-items: flex-start; gap: .5rem; font-size: 1.05rem; font-weight: 600; }
.weather-warning-title .warning-triangle { flex: none; font-size: 1em; margin-top: .05em; }
.weather-warning-times { display: grid; gap: .1rem; }
.weather-warning-times p { margin: 0; }
.weather-warning h4 { margin: .25rem 0 0; font-size: .95rem; }
.weather-warning ul { margin: 0; padding-left: 1.2rem; }
.weather-warning-small { font-size: .82rem; }
.weather-warning-advice { white-space: pre-line; }
.home-warning-credit { margin: .6rem 0 0; }
.weather-warnings > h4 { margin: .25rem 0 0; font-size: .95rem; }
.grid-carbon-detail { display: grid; gap: 1rem; }
.grid-carbon-reading { margin: 0; }
.grid-carbon-forecast h3 { margin: 0 0 .75rem; }
.grid-carbon-forecast-body { display: grid; gap: .6rem; }
.grid-carbon-chart { display: grid; gap: .3rem; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; cursor: crosshair; border-radius: 6px; }
.grid-carbon-chart:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.grid-carbon-readout { display: grid; gap: .1rem; }
.grid-carbon-readout-title { margin: 0; color: #58698f; font-size: .8rem; font-weight: 650; }
.grid-carbon-readout-value { margin: 0; color: #102d75; font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.grid-carbon-rule { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid #102d75; transform: translateX(-50%);
  pointer-events: none; }
.grid-carbon-hint { margin: 0; color: #58698f; font-size: .8rem; }
.grid-carbon-unit, .grid-carbon-scale, .grid-carbon-axis { color: #58698f; font-size: .75rem; }
.grid-carbon-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .4rem; row-gap: .25rem; }
.grid-carbon-scale { display: flex; flex-direction: column; justify-content: space-between; text-align: right; height: 180px;
  margin: calc(1.4rem - .45em) 0 -.45em; font-variant-numeric: tabular-nums; }
.grid-carbon-plot { position: relative; height: 180px; margin-top: 1.4rem; }
.grid-carbon-bars { display: block; width: 100%; height: 100%; overflow: visible; }
.grid-carbon-gridline { stroke: var(--carbon-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.grid-carbon-bar.tone-success, .grid-carbon-swatch.tone-success { fill: var(--carbon-success); background: var(--carbon-success); }
.grid-carbon-bar.tone-warning, .grid-carbon-swatch.tone-warning { fill: var(--carbon-warning); background: var(--carbon-warning); }
.grid-carbon-bar.tone-danger, .grid-carbon-swatch.tone-danger { fill: var(--carbon-danger); background: var(--carbon-danger); }
.grid-carbon-greenest { position: absolute; display: grid; justify-items: center; gap: .15rem; transform: translateX(-50%);
  color: #102d75; font-size: .8rem; font-weight: 600; white-space: nowrap; pointer-events: none; }
.grid-carbon-greenest.at-start { justify-items: start; transform: translateX(-.3rem); }
.grid-carbon-greenest.at-end { justify-items: end; transform: translateX(calc(-100% + .3rem)); }
.grid-carbon-greenest-label { padding: 0 .25rem; border-radius: 4px; background: var(--carbon-backing); }
.grid-carbon-greenest-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #102d75; margin-bottom: -.3rem; }
.grid-carbon-axis { position: relative; height: 1.2em; container-type: inline-size; }
@container (max-width: 330px) { .grid-carbon-tick.is-minor { visibility: hidden; } }
.grid-carbon-tick { position: absolute; transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid-carbon-tick.at-start { transform: none; } .grid-carbon-tick.at-end { transform: translateX(-100%); }
.grid-carbon-greenest-line { margin: 0; color: #102d75; font-size: .9rem; font-weight: 500; }
.grid-carbon-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: #58698f; font-size: .8rem; }
.grid-carbon-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.grid-carbon-swatch { width: .75rem; height: .75rem; border-radius: 2px; }
.grid-carbon-source { margin: 0; }
@media (prefers-color-scheme: dark) {
  .grid-carbon-unit, .grid-carbon-scale, .grid-carbon-axis, .grid-carbon-legend, .grid-carbon-readout-title, .grid-carbon-hint { color: #aab7d1; }
  .grid-carbon-greenest, .grid-carbon-greenest-line, .grid-carbon-readout-value { color: #eaf0ff; } .grid-carbon-greenest-dot { background: #eaf0ff; }
  .grid-carbon-rule { border-color: #eaf0ff; }
}
@media (forced-colors: active) {
  .ms-carbon-success, .ms-carbon-warning, .ms-carbon-danger, .grid-carbon-bar { fill: CanvasText; } .ms-backing { fill: Canvas; }
  .grid-carbon-swatch, .grid-carbon-greenest-dot { background: CanvasText; forced-color-adjust: none; }
  .grid-carbon-rule { border-color: Highlight; }
}

/* Arranging Your home, as iOS HomeCardEditChrome (US-HOME-EDIT-001): each card sits in a cell with its remove badge at
   the top left and, when it has more than one size, the curved resize handle at the bottom right. While arranging,
   cards shrink slightly and do not open; nothing jiggles. */
.home-tiles { position: relative; }
.home-card-cell { position: relative; min-width: 0; }
.home-card-body { position: relative; height: 100%; transition: scale .3s cubic-bezier(.2,.9,.3,1.1); }
.home-card-body > :first-child { width: 100%; height: 100%; }
.home-tiles.stacked .home-card-body > :first-child { height: auto; }
.home-tiles.editing .home-card-body { scale: .94; }
.home-tiles.editing .home-card-cell.lifted { z-index: 5; }
.home-tiles.editing .home-card-cell.lifted .home-card-body { scale: 1.03; }
.home-tiles.editing .home-card-cell.lifted .home-card-body > :first-child { box-shadow: 0 18px 40px #102d7540; }
.home-tiles.editing, .home-tiles.editing * { cursor: grab; }
.home-tiles.reordering, .home-tiles.reordering * { cursor: grabbing; }
.home-tiles.reordering .home-card-cell:not(.lifted) { transition: none; }
.home-card-remove, .home-card-add { position: absolute; z-index: 2; top: -18px; left: -18px; display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer; }
.home-card-badge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 15px;
  border: 1.5px solid #fff; box-shadow: 0 1px 3px #0003; }
.home-card-remove .home-card-badge { background: #db332e; }
.home-card-add .home-card-badge, .home-edit-add { background: #277e60; color: #fff; }
.home-card-badge .generic-symbol { width: 15px; height: 15px; stroke-width: 3; }
.home-card-resize { position: absolute; z-index: 2; right: -7px; bottom: -7px; display: grid; place-items: center; width: 44px; height: 44px; padding: 7px;
  border: 0; background: none; color: #102d75bf; cursor: nwse-resize; touch-action: none; }
.home-card-resize svg { width: 30px; height: 30px; }
.home-card-remove:focus-visible, .home-card-add:focus-visible, .home-card-resize:focus-visible, .home-edit-add:focus-visible, .home-edit-done:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 0; border-radius: 50%; }
/* While a handle is dragged the outline is the card's surface; its contents keep their last size, clipped to it. */
.home-card-cell.resizing { z-index: 4; }
.home-card-outline { position: absolute; top: 0; left: 0; border: 1px solid #dde3ef; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px #102d7514; }
.home-card-cell.resizing .home-card-body > :not(.home-card-outline):first-of-type { position: relative; background: transparent; border-color: transparent; box-shadow: none; }
.home-card-cell.resizing .home-card-body > .home-tile, .home-card-cell.resizing .home-card-body > .thermostat-tile { background: transparent; border-color: transparent; box-shadow: none; }
/* The heading's add button and Done replace the rate and status while arranging (US-HOME-EDIT-001-02). */
.home-heading-trailing { display: contents; }
.home-edit-actions { display: inline-flex; align-items: center; gap: .75rem; margin-left: auto; }
.home-edit-actions[hidden] { display: none; }
.home-edit-add { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.home-edit-add .generic-symbol { width: 18px; height: 18px; stroke-width: 3; }
.home-edit-add:disabled { background: #58698f66; cursor: default; }
.home-edit-done { min-height: 44px; padding: 0 .25rem; border: 0; background: none; color: #102d75; font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer; }
/* The pencil right next to "Your home" (US-HOME-EDIT-005): a 30 px circle in a 44 px target. */
.home-edit-start { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: none;
  color: #102d75; cursor: pointer; }
.home-edit-start-circle { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #dde3ef; border-radius: 50%;
  background: #f6f8fc; }
.home-edit-start .generic-symbol { width: 16px; height: 16px; }
.home-edit-start:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 0; border-radius: 50%; }
/* The one-time tip that Home can be arranged (US-HOME-EDIT-006): a line under the heading, never over a card. */
.home-edit-tip { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .8rem; padding: .35rem .35rem .35rem 1rem;
  border: 1px solid #dde3ef; border-radius: 14px; background: #f6f8fc; color: #102d75; font-size: .95rem; font-weight: 500; }
/* The add sheet's grid is Home's: each card at its default size, a green add badge where Home has the remove badge. */
.home-add-sheet { min-width: min(36rem, 80vw); padding-top: .5rem; }
.home-add-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); }
.home-add-grid .home-card-body { scale: .94; }
.home-card-cover { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; background: transparent; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .home-card-body { transition: none; } }
@media (prefers-color-scheme: dark) {
  .home-card-outline { background: #151d30; border-color: #34425d; box-shadow: none; }
  .home-card-resize { color: #eaf0ffbf; }
  .home-edit-done { color: #a9c1ff; }
  .home-edit-start { color: #eaf0ff; }
  .home-edit-start-circle { background: #202a40; border-color: #34425d; }
  .home-edit-tip { background: #202a40; border-color: #34425d; color: #eaf0ff; }
}

/* The heating card's smaller sizes and its round set point control, as iOS ThermostatCard and HomeSetpointJoystick
   (US-HOME-EDIT-002, -003): the circle is as large as a card's icon and sits in the icon's box. */
.home-setpoint-box { flex: none; display: grid; place-items: center; width: 2.55rem; height: 2.55rem; }
/* The circle is drawn 2.275rem across inside a 2.75rem (44 px) target: the padding round it is transparent. */
.home-setpoint { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: .2375rem; margin: -.1rem; border-radius: 50%;
  background: var(--setpoint-fill, #102d75) content-box;
  color: var(--setpoint-ink, #fff); font-size: .8125rem; font-weight: 750; line-height: 1; cursor: ns-resize; touch-action: none; user-select: none; }
.home-setpoint[aria-disabled="true"] { cursor: default; }
.home-setpoint.stretching { opacity: 0; }
.home-setpoint:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.home-setpoint-face, .home-setpoint-bubble { display: inline-flex; align-items: baseline; justify-content: center; font-variant-numeric: proportional-nums; }
.home-setpoint-face.adjusting { opacity: .7; }
.home-setpoint-balance { visibility: hidden; }
.thermostat-small .home-setpoint-box { align-self: flex-start; height: max(2.55rem, calc(.875rem * 1.5 + 1.56rem * 1.15 + .75rem * 1.25 + .1rem)); }
.home-card-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: .5rem; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; }
.thermostat-small .tile-label { line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The wide heating card, laid out like the one-cell card with a chart, as the other wide cards. */
.thermostat-wide-chart .home-card-open { gap: .6rem; align-self: stretch; }
.thermostat-tall .thermostat-title { gap: .1rem; }
.thermostat-name { font-size: .97rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thermostat-tall { display: flex; flex-direction: column; justify-content: space-between; gap: .6rem; padding: .8rem; }
.thermostat-tall-head { display: flex; align-items: center; gap: .5rem; }
.thermostat-tall .thermostat-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thermostat-tall .thermostat-temperatures { flex: none; gap: .9rem; }
/* The drag, drawn above the whole page so no card clips it. */
/* Its top padding is the safe area, which the bubble keeps below. */
.home-setpoint-layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; padding-top: env(safe-area-inset-top, 0px); }
.home-setpoint-goo { position: absolute; inset: 0; overflow: visible; }
.home-setpoint-bubble { position: absolute; display: flex; align-items: center; border-radius: 50%; font-size: 1.625rem; font-weight: 750; line-height: 1;
  box-shadow: 0 3px 8px #0000002e; transform: scale(0); transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
.home-setpoint-bubble.shown { transform: scale(var(--home, 1)); }
.home-setpoint-bubble.homing { transition: none; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .home-setpoint-bubble { transform: none; opacity: 0; transition: opacity .2s; }
  .home-setpoint-bubble.shown { transform: none; opacity: 1; }
}

/* Wide cards with a chart, as iOS HomeWideChartCard (US-HOME-EDIT-004): the words take the width of the widest
   figure, so every chart starts at the same place and has the rest of the card. */
.home-wide-tile { gap: .6rem; }
/* `.home-tile` too, so it wins over `.home-tile .tile-text`'s flex and the column keeps its width beside Boost…. */
/* As iOS, as wide as the widest figure, "12.48 kWh" (6.5rem in the app's type); a longer title or detail is cut. */
.home-tile .home-wide-text { flex: none; width: 6.5rem; }
/* Clipped to its own area, so nothing drawn from before the frame starts reaches the card's words. */
.home-wide-chart { flex: 1; min-width: 0; height: 54px; display: grid; place-items: center; overflow: hidden; }
.home-mini-chart { width: 100%; height: 100%; overflow: visible; }
.home-chart-message { font-size: .8125rem; color: #58698f; }
.home-chart-night { fill: #102d750f; }
.home-chart-midnight { stroke: #dde3ef; stroke-width: 1; }
.home-chart-now { stroke: #102d7559; stroke-width: 1; }
/* Over bars, the line at now is solid, with a gap in the card's colour on each side (homeMiniChart). */
.home-chart-now.over-bars { stroke: #102d7599; stroke-width: 1.5; } .home-chart-now-gap { stroke: #fff; stroke-width: 3.5; }
.home-rate-bar.other { fill: #7a47bd4d; } .home-rate-bar.now { fill: #7a47bd; } .home-rate-bar.cheapest { fill: #277e60; }
.home-rate-tile .tile-icon { color: #7a47bd; }
.home-tile .tile-foot.tint-success { color: #277e60; }
/* The battery's plan after now, on its wide card's chart; the car's Boost… opens the car. */
.home-plan-block { opacity: .3; }
.home-plan-block.charge { fill: #277e60; } .home-plan-block.export { fill: #bf811b; } .home-plan-block.hold { fill: #58698f; }
/* A wide card with a control of its own, such as the car's Boost…: the card's button holds the icon, words and chart. */
.home-wide-with-accessory .home-card-open { gap: .6rem; align-self: stretch; }
.card-actions.home-car-boost { flex: none; margin: 0; }
@media (prefers-color-scheme: dark) {
  .home-chart-message { color: #aab7d1; }
  .home-chart-night { fill: #eaf0ff0f; } .home-chart-midnight { stroke: #34425d; } .home-chart-now { stroke: #eaf0ff59; }
  .home-chart-now.over-bars { stroke: #eaf0ff99; } .home-chart-now-gap { stroke: #151d30; }
  .home-rate-bar.other { fill: #c29aff4d; } .home-rate-bar.now { fill: #c29aff; } .home-rate-bar.cheapest { fill: #4fc79a; }
  .home-rate-tile .tile-icon { color: #c29aff; }
  .home-tile .tile-foot.tint-success { color: #4fc79a; }
  .home-plan-block.charge { fill: #4fc79a; } .home-plan-block.export { fill: #ffb743; } .home-plan-block.hold { fill: #aab7d1; }
}
@media (forced-colors: active) {
  .home-chart-now.over-bars { stroke: CanvasText; } .home-chart-now-gap { stroke: Canvas; }
}

/* The one close button (US-PLATFORM-PARITY-001-10, -11; closeButton() in app.js): a plain 16 px cross in the secondary
   text colour, no circle, fill or background, in a 44 px target at the top trailing corner of what it closes. iOS and
   Android draw the same cross the same size and colour. */
button.close-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 50%; background: none; color: #58698f; cursor: pointer; }
button.close-button .generic-symbol { width: 16px; height: 16px; }
button.close-button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 0; border-radius: 50%; }
/* In a dialog's top row and on a suggestion card, the cross's drawing lines up with the corner's padding, its target
   reaching into it. */
.sheet-header-trailing > button.close-button { margin: -10px -14px -10px 0; }
.home-mini-suggestion .home-mini-head > button.close-button { margin: -12px -14px 0 auto; }
@media (prefers-color-scheme: dark) {
  button.close-button { color: #aab7d1; }
}

/* The one row of buttons in a card (US-PLATFORM-PARITY-001-11, -12; cardActions() in app.js): at the card's trailing
   edge, the main action last, wrapping at a large text size with each button still at the trailing edge. Each card
   button is as wide as its words and has the Wiggle design lab's look, as iOS WiggleCardButtonStyle and Android's card
   button: its target is 44 px tall, and its visible box, a borderless capsule drawn by ::before 5 px inside it, is 34 px
   (14 px side padding, 13 px semibold words), growing with the text. Secondary is the accent-tinted fill (iOS
   .bordered), primary the accent fill (.borderedProminent), destructive the danger-tinted fill; every kind's words
   reach at least 4.5:1 on its fill, light and dark. It may carry a leading icon. */
.card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.card-actions > .maintenance-gated { display: contents; }
/* Beside a row's title (a signed-in device's Sign out, a member's Remove), the row lines it up, so it adds no space
   above, and on a line of its own it stays at the trailing edge. */
.row > .card-actions { align-self: center; margin-top: 0; margin-left: auto; }
/* Fills, as Android's card button: #102d75 at 16% over the white card (#d9dde9, words 9.4:1); destructive #f9e8e7 (5.7:1). */
.card-actions .card-button { --card-button-fill: #d9dde9;
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex: 0 0 auto; width: auto; max-width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 13px 14px;
  border: 0; border-radius: 999px; background: none; font-size: .8125rem; font-weight: 650; line-height: 1.2;
  text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.card-actions .card-button::before { content: ""; position: absolute; inset: 5px 0; z-index: -1;
  border-radius: 999px; background: var(--card-button-fill); }
.card-actions .card-button .generic-symbol { flex: none; width: 1em; height: 1em; }
.card-actions .card-button.secondary { color: #102d75; }
.card-actions .card-button.primary { --card-button-fill: #102d75; color: #fff; }
.card-actions .card-button.destructive { --card-button-fill: #f9e8e7; color: #ad2636; }
.card-actions .card-button:disabled { opacity: .45; }
.card-actions .card-button.destructive:hover:not(:disabled) { background: none; }
.card-actions .card-button .card-button-icon { flex: none; width: 1.1em; height: 1.1em; }
.card-actions a.card-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-actions .card-button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 0; }
/* Dark fills over the #151d30 card: #5f88e8 at 22% (#253558, words #eaf0ff 10.7:1, as iOS and Android); destructive #312737 (5.4:1);
   primary #5f88e8 with #0b1020 words (5.6:1). */
@media (prefers-color-scheme: dark) {
  .card-actions .card-button.secondary { --card-button-fill: #253558; color: #eaf0ff; }
  .card-actions .card-button.primary { --card-button-fill: #5f88e8; color: #0b1020; }
  .card-actions .card-button.destructive { --card-button-fill: #312737; color: #ff746c; }
}

/* The one stack of full-width buttons in a settings or form card (US-PLATFORM-PARITY-001-11, -12; fullWidthActions() in
   app.js), as iOS WiggleFullWidthActions: one under the other, 10 px apart, the main action first and a destructive
   action last. Each is the shared action button (button.primary, .secondary, .destructive above). */
.full-width-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.full-width-actions > .maintenance-gated { display: contents; }
/* What's new (US-WHATSNEW-001, -005; openWhatsNew() in app.js), as iOS WhatsNewSheet: the highlights as shared rows, 12 px apart. */
.whats-new-list { display: grid; gap: 12px; margin-top: 12px; }
/* The Timeline's views (US-TIMELINE-017), as iOS TimelinePeriodChooser, TimelineDayTotalsSection, TimelineTotalsCard and
   TimelinePeriodBarsCard: the Day, 7 days, Month and Year choice, Day's one-line total that opens to the bill-style card,
   and the bars card of 7 days, Month and Year (timeline-periods.mjs and app.js). */
.timeline-period-chooser .segmented { max-width: none; }
.timeline-period-slot { display: grid; gap: 18px; }
.timeline-day-totals { margin-bottom: 18px; }
.timeline-totals-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px;
  padding: 4px 14px; border: 0; border-radius: 14px; background: #f5a6231f; color: #102d75; font-size: .9375rem; font-weight: 650; text-align: left; }
.timeline-totals-line:disabled { opacity: 1; cursor: default; }
.timeline-totals-line:focus-visible, .timeline-totals-close:focus-visible, .timeline-period-bar:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.timeline-totals-chevron, .timeline-totals-close { color: #58698f; flex: none; }
.timeline-totals-card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: #f5a6231f; color: #102d75; }
.timeline-totals-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid #dde3ef; }
.timeline-totals-title { margin: 0; color: #58698f; font-size: .8125rem; font-weight: 500; }
.timeline-totals-amount { display: block; font-size: 2.125rem; font-weight: 650; line-height: 1.15; }
.timeline-totals-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px 0 0; padding: 0; border: 0; background: none; }
.timeline-totals-rows { display: grid; gap: 8px; }
.timeline-totals-row, .timeline-period-legend-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 8px; }
.timeline-totals-name, .timeline-period-legend-name { display: flex; align-items: center; gap: 8px; font-size: .9375rem; font-weight: 500; }
.timeline-totals-name svg { width: 18px; height: 18px; flex: none; }
.timeline-totals-figures, .timeline-period-legend-figures { display: flex; align-items: baseline; gap: 12px; margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline-totals-energy, .timeline-period-legend-energy { color: #58698f; font-size: .875rem; }
.timeline-totals-money, .timeline-period-legend-money { min-width: 4.5em; font-size: .9375rem; font-weight: 650; text-align: right; }
.timeline-totals-subtotal { display: flex; justify-content: space-between; gap: 8px; padding-left: 26px; color: #58698f; font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.timeline-totals-notes p, .timeline-period-foot p { margin: 0; color: #58698f; font-size: .8125rem; font-weight: 500; }
.timeline-period-card.card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; border-color: #dde3ef; box-shadow: 0 6px 18px #102d750f; color: #102d75; }
.timeline-period-head { display: grid; gap: 4px; }
.timeline-period-card-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-period-card-title-group { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.timeline-period-card-title { margin: 0; color: #58698f; font-size: .8125rem; font-weight: 500; }
.timeline-period-card-title.is-selected { color: #102d75; }
.timeline-period-clear { margin: -10px 0; }
.timeline-period-amount { display: block; font-size: 1.75rem; font-weight: 650; line-height: 1.2; }
.timeline-period-chart { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; }
.timeline-period-plot { position: relative; height: 11.875rem; }
.timeline-period-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.timeline-period-bars { position: absolute; inset: 0; display: flex; touch-action: pan-y; }
.timeline-period-bar { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.timeline-period-yaxis { position: relative; width: 3.2em; }
.timeline-period-ylabel { position: absolute; left: 0; transform: translateY(-50%); color: #58698f; font-size: .8125rem; line-height: 1; white-space: nowrap; }
.timeline-period-xaxis { display: flex; padding-top: 6px; }
.timeline-period-xlabel { flex: 1; min-width: 0; display: flex; justify-content: center; color: #58698f; font-size: .8125rem; white-space: nowrap; overflow: visible; }
.timeline-period-xlabel.is-selected { color: #102d75; font-weight: 650; }
.timeline-period-legend { display: grid; gap: 7px; }
.timeline-period-legend-row.is-sum .timeline-period-legend-name { color: #58698f; font-size: .8125rem; font-weight: 400; }
.timeline-period-legend-row.is-sum .timeline-period-legend-money { color: #58698f; font-weight: 400; }
.timeline-period-swatch { width: 12px; height: 12px; flex: none; border-radius: 3px; background: var(--swatch); }
.timeline-period-swatch.is-total { height: 4px; margin: 4px 0; border-radius: 2px; background: var(--chart-selected); }
.timeline-period-swatch.is-sum { background: none; }
.timeline-period-legend-placeholder { position: relative; }
.timeline-period-legend-ghost { display: grid; gap: 7px; visibility: hidden; }
.timeline-period-legend-empty { position: absolute; inset: 0 auto auto 0; margin: 0; color: #58698f; font-size: .875rem; font-weight: 500; }
.timeline-period-legend-note { display: flex; align-items: center; gap: 8px; margin: 0; color: #58698f; font-size: .8125rem; font-weight: 500; }
.timeline-period-missing-swatch { width: 12px; height: 12px; flex: none; background: linear-gradient(#58698f 50%, transparent 50%) center / 1.5px 6px repeat-y; }
.timeline-period-hint { display: flex; align-items: center; gap: 6px; }
.timeline-period-hint .timeline-icon { width: 16px; height: 16px; flex: none; }
.timeline-period-activity { display: grid; gap: 14px; }
.timeline-period-activity > .section-title { margin: 0; }
.timeline-period-activity-day { display: grid; gap: 8px; }
.timeline-period-activity-date { margin: 0; color: #58698f; font-size: .8125rem; font-weight: 650; }
@media (prefers-color-scheme: dark) {
  .timeline-totals-line, .timeline-totals-card { background: #f5a62324; color: #eaf0ff; }
  .timeline-totals-head { border-color: #34425d; }
  .timeline-period-card.card { background: #151d30; border-color: #34425d; color: #eaf0ff; }
  .timeline-period-card-title.is-selected, .timeline-period-xlabel.is-selected { color: #eaf0ff; }
  .timeline-totals-chevron, .timeline-totals-close, .timeline-totals-title, .timeline-totals-energy, .timeline-totals-subtotal,
  .timeline-totals-notes p, .timeline-period-foot p, .timeline-period-card-title, .timeline-period-ylabel, .timeline-period-xlabel,
  .timeline-period-legend-energy, .timeline-period-legend-row.is-sum .timeline-period-legend-name,
  .timeline-period-legend-row.is-sum .timeline-period-legend-money, .timeline-period-legend-empty, .timeline-period-legend-note,
  .timeline-period-activity-date { color: #aab7d1; }
  .timeline-period-missing-swatch { background-image: linear-gradient(#aab7d1 50%, transparent 50%); }
}
@media (forced-colors: active) {
  .timeline-period-bar[aria-pressed="true"] { outline: 2px solid Highlight; }
  .timeline-period-swatch { forced-color-adjust: none; }
}
/* The launch animation's overlay (US-XPLAT-008): the logo at the size of the iOS launch screen's, on the page's
   background, over the app while it opens. With reduced motion it never shows (US-XPLAT-008-04). */
.launch-animation { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #f6f8fc; }
.launch-animation svg { width: 164px; height: auto; overflow: visible; }
.launch-animation .launch-line { fill: none; stroke: #102d75; stroke-width: 32; stroke-linecap: round; stroke-linejoin: round; }
.launch-animation .launch-sun { fill: #f5a623; }
.launch-animation .launch-letter { fill: #102d75; }
@media (prefers-color-scheme: dark) { .launch-animation { background: #0b1020; } .launch-animation .launch-line { stroke: #eaf0ff; } .launch-animation .launch-letter { fill: #eaf0ff; } .launch-animation .launch-sun { fill: #ffb743; } }
@media (prefers-reduced-motion: reduce) { .launch-animation { display: none; } }
