:root:root,
[data-theme="light"]:root {
  --pico-font-family-sans-serif: "Mulish", system-ui, -apple-system, sans-serif;
  --pico-font-size: 100%;
  --pico-border-radius: 8px;
  --pico-background-color: #eae8e3;
  --pico-primary: #1a2456;
  --pico-primary-background: #1a2456;
  --pico-primary-border: #1a2456;
  --pico-primary-hover-background: #2a3670;
  --pico-primary-hover-border: #2a3670;
  --pico-primary-underline: rgba(26, 36, 86, 0.5);
  --pico-primary-inverse: #fff;
  --pico-secondary: #1a2456;
  --pico-secondary-background: #fff;
  --pico-secondary-border: #c9c6c0;
  --pico-secondary-hover-background: #f4f3f1;
  --pico-secondary-hover-border: #b3afa8;
  --pico-secondary-inverse: #1a2456;
  --pico-form-element-spacing-vertical: 0.6rem;
}

body {
  background-color: #eae8e3;
}

h1, h2, h3, .brand-name {
  font-family: "Sora", var(--pico-font-family-sans-serif);
  color: #1a2456;
}

body > header.topbar {
  background: #fff;
  border-bottom: 1px solid #dcdad5;
  padding: 0.75rem 0;
  margin-bottom: 2rem;
}

.topbar .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1a2456;
  display: inline-block;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.account-name {
  font-size: 0.8rem;
  color: #6b6b6b;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.account-switch {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.account-switch-label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b6b;
  white-space: nowrap;
  margin: 0;
}

.account-switch select {
  margin: 0;
  font-size: 0.8rem;
  padding: 0.3rem 2rem 0.3rem 0.6rem;
  width: auto;
  background-position: right 0.5rem center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.auth-shell .card {
  width: 100%;
  max-width: 420px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.card.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.action-row button,
.action-row [role="button"],
.head-actions button,
.head-actions [role="button"] {
  margin: 0;
  width: auto;
  white-space: nowrap;
}

.action-row-end {
  margin-left: auto;
  font-size: 0.9rem;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

form label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b6b;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

table {
  font-size: 0.85rem;
  margin: 0;
}

table th {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.task-status {
  font-size: 0.85rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: #f4f3f1;
  border-left: 3px solid #1a2456;
  margin-bottom: 1rem;
}

.task-status.failed {
  border-left-color: #b03030;
  color: #b03030;
}

.no-plan {
  color: #b03030;
}

.warn {
  color: #b07a30;
}

.pagination {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
}

.pagination .chevron {
  font-size: 1.1rem;
  line-height: 1;
}

.pagination a, .pagination span {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
}

.pagination .current {
  background: #1a2456;
  color: #fff;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-field {
  position: relative;
  flex: 1;
}

.search-field input {
  margin: 0;
  padding-right: 2.4rem;
}

.search-clear {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
  text-decoration: none;
  color: #6b6b6b;
}

.search-bar > button[type="submit"] {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding-inline: 1.5rem;
  white-space: nowrap;
}

.select-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fdf3d3;
  border: 1px solid #f0dc9a;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.select-toolbar button[type="submit"] {
  width: auto;
  margin: 0;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.no-match {
  padding: 1.5rem 0;
  color: #6b6b6b;
}

.list-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 1rem;
}

.list-footer .row-count {
  margin: 0;
}

.hint {
  position: relative;
  display: inline-block;
}

.hint::after {
  content: attr(data-hint);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.3rem;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  background: #1a2456;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}

.hint:hover::after {
  visibility: visible;
}

.incomplete {
  color: #cb3c33;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
}

.action-note {
  text-align: center;
  font-size: 0.8rem;
  color: #6b6b6b;
  margin: 0.6rem 0 0;
}

.row-count {
  font-size: 0.8rem;
  color: #6b6b6b;
}

fieldset.grid-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 1rem;
  border: 0;
  padding: 0;
}

fieldset.grid-fields > div:has(select[name$="-appliance_lookup_id"]),
fieldset.grid-fields > div:has(> textarea[name="notes"]) {
  grid-column: span 2;
}

fieldset.utility-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
  border: 0;
  padding: 0;
}

@media (max-width: 640px) {
  fieldset.utility-rows {
    grid-template-columns: 1fr;
  }
}

.usage-status {
  margin: -0.5rem 0 1rem;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.usage-status.failed {
  color: #cb3c33;
}

div.scenario {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.scenario-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

button.scenario-toggle {
  width: auto;
  margin: 0;
  padding: 0.35rem;
  line-height: 0;
  background: none;
  border: 0;
  color: #1a2456;
}

button.scenario-toggle[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.scenario-body {
  margin-top: 0.75rem;
}

button.trash {
  width: auto;
  margin: 0;
  padding: 0.35rem;
  line-height: 0;
  background: none;
  border: 0;
  color: #cb3c33;
}

button.trash:hover,
button.trash:focus-visible {
  background: #fbeaea;
  color: #a32b23;
}

button.add-row {
  display: block;
  width: fit-content;
  margin: 0.75rem auto 0;
}

.subform {
  border: 1px solid #dcdad5;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fdfdfc;
}

.helptext {
  display: block;
  font-size: 0.78rem;
  color: #6b6b6b;
  margin-top: -0.6rem;
}

.helptext ul {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
}

.errorlist {
  color: #b03030;
  font-size: 0.8rem;
  list-style: none;
  padding: 0;
}

.messages {
  list-style: none;
  padding: 0;
}

.messages li {
  list-style: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: #fff;
  border-left: 3px solid #1a2456;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.messages li.error {
  border-left-color: #b03030;
}

.action-row button.generate-plans:disabled {
  opacity: 1;
  background-color: #d4d4d4;
  border-color: #d4d4d4;
  color: #6b6b6b;
}

fieldset.appliance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.appliance-grid .row-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.appliance-grid .row-actions .more-details {
  width: auto;
  margin: 0;
}

.fuel-field select:disabled {
  opacity: 1;
  border-color: transparent;
  background-color: transparent;
  background-image: none;
  padding-left: 0;
  color: inherit;
}

.more-details-fields {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e6e4df;
}

@media (max-width: 640px) {
  fieldset.appliance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .appliance-grid .row-actions {
    grid-column: auto;
  }
}

.section-help {
  font-size: 0.9rem;
  color: #6b6b6b;
}

.electrify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0;
}

.electrify-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin: 1rem 0 0.5rem;
}

.electrify-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
}

.electrify-all input {
  margin: 0;
}

.electrify-list {
  border: 1px solid #dcdad5;
  border-radius: 8px;
}

.electrify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e6e4df;
}

.electrify-row:last-child {
  border-bottom: 0;
}

.electrify-name small {
  display: block;
  color: #6b6b6b;
}

.choice-group {
  display: inline-flex;
  border: 1px solid #dcdad5;
  border-radius: 6px;
  overflow: hidden;
}

.choice-group label {
  margin: 0;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: #1a2456;
  font-weight: 500;
}

.choice-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-group span {
  display: block;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  border-left: 1px solid #dcdad5;
}

.choice-group label:first-child span {
  border-left: 0;
}

.choice-group input:checked + span {
  background: #1a2456;
  color: #fff;
}

.choice-group input:focus-visible + span {
  outline: 2px solid #1a2456;
  outline-offset: -2px;
}

@media (max-width: 640px) {
  .electrify-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.option-label {
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d0592b;
}

.drop-zone {
  border: 2px dashed #cfccc5;
  border-radius: 8px;
  background: #fff;
}

.drop-zone.is-dragging {
  border-color: #1a2456;
  background: #f1f2f8;
}

.drop-zone-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: inherit;
}

.template-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.option-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
  color: #6b6b6b;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.option-divider::before,
.option-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #dcdad5;
}

.upload-dialog {
  max-width: 560px;
  width: calc(100vw - 32px);
}

.upload-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.upload-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e6e4df;
}

.upload-list li span {
  color: #6b6b6b;
  flex: 1;
}

.upload-list li.failed span {
  color: #b03030;
}

.upload-list li button {
  width: auto;
  margin: 0;
  padding: 0.25rem 0.75rem;
}

.upload-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--pico-spacing);
}

.upload-button {
  display: inline-block;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 1px solid #dcdad5;
  border-radius: 8px;
  background: #fff;
  color: #1a2456;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.upload-control:focus-within .upload-button {
  outline: 2px solid #1a2456;
  outline-offset: 2px;
}

.chosen-file {
  font-size: 0.85rem;
  color: #6b6b6b;
}

/* Design C */

:root:root {
  --navy: hsl(223 73% 19%);
  --orange: hsl(13 87% 55%);
  --body: hsl(120 3% 20%);
  --subtle: hsl(220 9% 40%);
  --line: hsl(220 13% 88%);
  --page: hsl(42 20% 90%);
  --gold: hsl(43 96% 92%);
  --danger: hsl(0 72% 51%);
  --shadow-card: 0 1px 3px hsl(223 73% 19% / 0.08), 0 1px 2px hsl(223 73% 19% / 0.06);
  --shadow-elevated: 0 8px 24px hsl(223 73% 19% / 0.12), 0 2px 6px hsl(223 73% 19% / 0.08);
  --shadow-prominent: 0 16px 40px hsl(223 73% 19% / 0.16), 0 4px 10px hsl(223 73% 19% / 0.1);
  --ink: var(--navy);
  --muted: var(--subtle);
  --card-line: var(--line);
  --pico-color: var(--body);
  --pico-background-color: var(--page);
  --pico-primary: var(--navy);
  --pico-primary-background: var(--navy);
  --pico-primary-border: var(--navy);
  --pico-primary-hover-background: hsl(223 73% 15%);
  --pico-primary-hover-border: hsl(223 73% 15%);
  --pico-secondary: var(--navy);
  --pico-secondary-border: var(--line);
  --pico-form-element-border-color: var(--line);
  --pico-form-element-focus-color: var(--navy);
  --pico-line-height: normal;
}

body,
button,
input,
select,
textarea,
td,
th,
label,
p,
h1,
h2,
h3,
h4 {
  line-height: normal;
}

.account-switch select {
  height: 32px;
}

body {
  background-color: var(--page);
  color: var(--body);
  font-size: 16px;
  padding-bottom: 96px;
}

h1, h2, h3, h4, .brand-name {
  color: var(--navy);
}

main.container {
  max-width: 1152px;
  padding: 0 24px;
  margin: 0 auto;
}

main.container.wide {
  max-width: 1248px;
}

body > header.topbar {
  height: auto;
  padding: 0;
  margin-bottom: 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  height: 100%;
  padding: 16px 32px;
}

.brand {
  gap: 10px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--navy);
}

.brand-name {
  font-size: 16px;
}

.topbar .topbar-nav {
  flex-shrink: 0;
  gap: 32px;
}

.topbar .nav-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--subtle);
}

.account-name {
  font-size: 14px;
  color: var(--body);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--page);
  border: 1px solid var(--line);
}

.account-menu {
  position: relative;
  margin: 0;
}

.account-menu > summary.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.account-menu > summary.avatar::-webkit-details-marker,
.account-menu > summary.avatar::after {
  display: none;
}

.account-menu > summary.avatar:hover,
.account-menu[open] > summary.avatar {
  border-color: var(--navy);
}

.account-menu-items {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 180px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-elevated);
}

.account-menu-items li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-menu-items form {
  margin: 0;
}

.account-menu-items a,
.account-menu-items .link-button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.account-menu-items a:hover,
.account-menu-items .link-button:hover {
  background: var(--page);
  text-decoration: none;
}

.card.password-change {
  max-width: 480px;
}

.link-button {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}

.link-button:hover {
  background: none;
  color: var(--navy);
  text-decoration: underline;
}

.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

button,
[type="submit"],
[type="button"],
[role="button"] {
  --pico-font-weight: 700;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: none;
}

[role="button"].secondary,
button.secondary,
[role="button"].secondary.outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
}

[role="button"].secondary:hover,
button.secondary:hover {
  background: #fff;
  border-color: var(--subtle);
  color: var(--navy);
}

form label,
fieldset label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"]),
select {
  height: 38px;
  margin-bottom: 0;
  padding: 0 10px;
  font-size: 14px;
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
}

select {
  padding-right: 2rem;
  padding-left: 10px;
}

textarea {
  margin-bottom: 0;
  padding: 9px 10px;
  font-size: 14px;
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: #fff;
}

fieldset.grid-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

fieldset.grid-fields > div {
  margin-bottom: 0;
}

fieldset.grid-fields > div:has(select[name$="-appliance_lookup_id"]) {
  grid-column: auto;
}

fieldset.grid-fields > div:has(> textarea[name="notes"]),
fieldset.grid-fields > div:has(> textarea[name$="-notes"]) {
  grid-column: 1 / -1;
}

.profile-section {
  margin-top: 28px;
}

.section-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--navy);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.section-help {
  margin: -4px 0 16px;
  font-size: 14px;
  color: var(--subtle);
}

.option-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
}

.option-label:last-of-type {
  margin-bottom: 16px;
}

.drop-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #fff;
}

.drop-zone-hint {
  gap: 16px;
  padding: 24px;
  font-size: 16px;
  color: var(--body);
}

.drop-zone-hint svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--subtle);
}

.template-link {
  margin: 10px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}

.option-divider {
  margin: 28px 0;
  gap: 16px;
  font-size: 14px;
  color: var(--subtle);
}

.option-divider::before,
.option-divider::after {
  border-top-color: var(--line);
}

.panel-form.subform {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

button.add-row,
button.add-row.secondary {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
}

button.add-row:not(.secondary) {
  padding: 10px 20px;
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

button.trash {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  color: var(--danger);
}

button.trash svg {
  width: 16px;
  height: 16px;
}

button.trash:hover,
button.trash:focus-visible {
  background: none;
  color: hsl(0 72% 42%);
}

fieldset.utility-rows {
  gap: 16px;
}

fieldset.utility-rows > div {
  margin: 0;
}

.upload-control {
  margin: 0;
  gap: 12px;
}

.upload-button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.usage-status {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--subtle);
}

.usage-status.failed {
  color: var(--danger);
}

.chosen-file {
  font-size: 14px;
  color: var(--subtle);
}

.appliance-row.subform {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

fieldset.appliance-grid {
  gap: 16px;
}

fieldset.appliance-grid > div {
  margin-bottom: 0;
}

.appliance-grid .row-actions {
  align-self: end;
  height: 38px;
}

button.more-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

button.more-details svg {
  width: 14px;
  height: 14px;
}

button.more-details:hover,
button.more-details:focus {
  background: none;
  color: var(--navy);
}

button.more-details[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

button.more-details:disabled {
  opacity: 1;
  color: var(--subtle);
}

.more-details-fields {
  display: grid;
  gap: 20px;
  margin-top: 16px;
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--page);
}

.more-details-fields fieldset.grid-fields {
  gap: 20px 16px;
}

.more-details-fields[hidden] {
  display: none;
}

.more-details-fields fieldset.grid-fields {
  margin: 0;
}

.fuel-field select:disabled {
  height: 38px;
  font-size: 14px;
  color: var(--subtle);
}

div.scenario {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.scenario-head {
  gap: 12px;
}

button.scenario-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--navy);
}

button.scenario-toggle svg {
  width: 16px;
  height: 16px;
}

.scenario-body {
  margin-top: 16px;
}

.electrify-head {
  margin: 0 0 10px;
  gap: 12px;
}

.electrify-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.electrify-all {
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.electrify-all input[role="switch"] {
  width: 40px;
  height: 22px;
  margin: 0;
  border: 1px solid var(--line);
  background-color: var(--page);
  --pico-switch-thumb-box-shadow: var(--shadow-card);
}

.electrify-all input[role="switch"]:checked {
  border-color: var(--navy);
  background-color: var(--navy);
}

.electrify-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 0;
}

.electrify-row {
  padding: 14px 16px;
  gap: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.electrify-row:last-child {
  border-bottom: 1px solid var(--line);
}

.electrify-name strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.electrify-name small {
  margin-top: 2px;
  font-size: 13px;
  color: var(--subtle);
}

.choice-group {
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.choice-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.choice-group label + label {
  margin-left: -1px;
}

.choice-group span {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  white-space: nowrap;
}

.choice-group label:first-child span {
  border-left: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
}

.choice-group label:last-child span {
  border-radius: 0 10px 10px 0;
}

.choice-group input:checked + span {
  position: relative;
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.choice-detail {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 16px;
  border-radius: 12px;
  background: var(--gold);
}

.appliance-row.replacement-row {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.replacement-row .more-details-fields {
  margin-top: 16px;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
}

.additional {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.additional .electrify-title {
  margin: 0 0 6px;
}

.additional .section-help {
  margin: 0 0 14px;
}

.addition-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.addition-list .appliance-row.subform {
  margin: 0;
  padding: 16px;
}

.footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-bar .action-row {
  justify-content: space-between;
  min-height: 0;
  padding: 16px 32px;
  gap: 12px;
  flex-wrap: nowrap;
}

.stale-note {
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--gold);
  color: var(--body);
  font-size: 14px;
}

.stale-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--body);
  font-size: 14px;
}

.stale-banner button {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
}

.footer-bar .action-note {
  margin: 0;
  max-width: 340px;
  font-size: 13px;
  color: var(--subtle);
  text-align: right;
}

.action-row button.generate-plans:disabled {
  opacity: 1;
  background-color: var(--page);
  border-color: var(--page);
  color: var(--subtle);
}

[role="button"].danger-outline,
button.danger-outline {
  background: #fff;
  border: 1px solid var(--danger);
  color: var(--danger);
}

[role="button"].danger-outline:hover,
button.danger-outline:hover {
  background: #fff;
  border-color: hsl(0 72% 42%);
  color: hsl(0 72% 42%);
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

button.danger:hover {
  background: hsl(0 72% 42%);
  border-color: hsl(0 72% 42%);
}

.search-bar {
  gap: 10px;
  margin-bottom: 20px;
}

.search-bar input {
  height: auto;
  padding: 12px 40px 12px 14px;
  font-size: 16px;
}

.search-bar > button[type="submit"] {
  height: auto;
  align-self: stretch;
  padding: 0 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--navy);
}

.select-toolbar {
  margin-bottom: 12px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--gold);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.select-toolbar button[type="submit"] {
  padding: 8px 16px;
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.select-toolbar .clear-selection {
  font-weight: 400;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.table-card table {
  margin: 0;
  font-size: 16px;
  color: var(--body);
}

.table-card th {
  height: 43px;
  padding: 12px 20px;
  border: 0;
  background: var(--page);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.table-card td {
  padding: 14px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--body);
}

.table-card th,
.table-card td {
  white-space: nowrap;
}

.table-card td.wrap {
  white-space: normal;
}

.table-card td a {
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.table-card td a:hover {
  text-decoration: underline;
}

.table-card .select-col {
  width: 40px;
  padding-right: 0;
}

.table-card input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 3px;
  border-width: 1px;
}

.no-plan {
  color: var(--danger);
}

.list-footer {
  margin-top: 16px;
}

.list-footer .row-count {
  font-size: 14px;
  color: var(--subtle);
}

.pagination {
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 12px;
  color: var(--navy);
}

.pagination .current {
  background: var(--navy);
  color: #fff;
}

.plans-count {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--body);
}

.plans-table td {
  padding: 18px 20px;
  font-size: 14px;
  vertical-align: top;
}

.task-status {
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  background: #fff;
  font-size: 14px;
}

.task-status.failed {
  border-left-color: var(--danger);
  color: var(--danger);
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

main.container > .card {
  max-width: 560px;
}

.card .action-row {
  justify-content: flex-start;
  gap: 12px;
}

.auth-shell .card {
  max-width: 440px;
  padding: 40px;
  box-shadow: var(--shadow-prominent);
}

.auth-shell .brand {
  gap: 10px;
  margin-bottom: 32px;
}

.auth-shell .brand-mark {
  width: 28px;
  height: 28px;
}

.auth-shell .brand-name {
  font-size: 18px;
}

.auth-shell hr {
  display: none;
}

.auth-shell input:not([type="checkbox"], [type="radio"]) {
  height: auto;
  padding: 10px 12px;
  font-size: 16px;
}

.auth-shell form > div,
.auth-shell form > p {
  margin-bottom: 20px;
}

.auth-shell button[type="submit"] {
  width: 100%;
  padding: 12px 0;
  font-size: 16px;
}

.auth-links {
  font-size: 14px;
}

button.link-button {
  padding: 0;
}

dialog > article {
  border-radius: 16px;
  box-shadow: var(--shadow-prominent);
}

a.upload-history {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-style: dashed;
}

.list-footer a.upload-history {
  justify-self: end;
}

.upload-intro {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--body);
}

.gathered-files {
  margin: -8px 0 0;
  padding: 0 24px 20px 62px;
  list-style: none;
  font-size: 14px;
  color: var(--body);
}

.gathered-files li {
  margin: 0 0 4px;
  list-style: none;
}

.upload-actions {
  justify-content: flex-start;
  margin-top: 20px;
}

.task-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.task-status-row form,
.table-card td form {
  margin: 0;
}

.table-card td form button {
  margin: -6px 0;
  padding: 6px 14px;
  font-size: 13px;
}

.row-issues {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--subtle);
}

.deleted-home {
  color: var(--subtle);
}

.upload-error-text {
  color: var(--danger);
}

dialog.confirm {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.confirm-dialog {
  max-width: 360px;
  width: calc(100vw - 32px);
  padding: 28px;
  background: #fff;
}

.confirm-question {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.confirm-question:has(+ .confirm-detail) {
  margin-bottom: 8px;
}

.confirm-detail {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}

.confirm-error {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--danger);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.confirm-actions button {
  width: auto;
  margin: 0;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 768px) {
  fieldset.grid-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bar .action-row {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-inner {
    padding: 12px 16px;
  }

  main.container {
    padding: 0 16px;
  }
}

.option-label + .profile-section,
.page-head + .profile-section {
  margin-top: 0;
}

.grid-fields .helptext {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--subtle);
}

.auth-shell a,
.auth-links a {
  text-decoration: none;
}

.auth-shell a:hover,
.auth-links a:hover {
  text-decoration: underline;
}

button.visually-hidden,
input.visually-hidden {
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
}

.save-note {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.save-note.error {
  color: var(--danger);
}

.auth-shell form > input:not([type="hidden"]) {
  margin-bottom: 20px;
}

.auth-shell form > input[type="password"] {
  margin-bottom: 28px;
}

/* Plan generation states */

@keyframes plan-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes plan-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes plan-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.plan-progress,
.plan-alert,
.plan-error-card,
.plans-loading {
  animation: plan-fade-in 0.4s ease both;
}

.plan-progress {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.plan-progress > div,
.plan-alert-text > div {
  display: grid;
  gap: 2px;
}

.plan-progress strong,
.plan-alert strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.plan-progress span:not(.plan-spinner),
.plan-alert span {
  font-size: 14px;
  color: var(--body);
  text-wrap: pretty;
}

.plan-progress > div {
  gap: 4px;
}

.plan-progress strong {
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 18px;
}

.plan-spinner {
  flex: 0 0 auto;
  display: block;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2.5px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: plan-spin 0.9s linear infinite;
}

.plan-progress .plan-spinner {
  margin-top: 2px;
}

.plans-loading,
.plans-loading section {
  display: grid;
  gap: 32px;
}

.plans-loading section {
  gap: 16px;
}

.plans-loading[aria-busy="true"]::before {
  content: none;
}

.skeleton-bar,
.skeleton-badge {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--page);
  animation: plan-pulse 1.6s ease-in-out infinite;
}

.skeleton-bar + .skeleton-bar {
  margin-top: 8px;
}

.skeleton-heading {
  width: 200px;
  height: 28px;
  background: var(--line);
}

.skeleton-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
}

.plans-skeleton table {
  table-layout: fixed;
  width: 100%;
}

.plans-skeleton th:first-child,
.plans-skeleton td:first-child {
  width: 66px;
}

.plans-skeleton th .skeleton-bar {
  width: 70%;
  height: 10px;
  background: #fff;
  animation: none;
}

.plans-skeleton th:first-child .skeleton-bar {
  width: 100%;
}

.skeleton-bar.w-55 { width: 55%; }
.skeleton-bar.w-60 { width: 60%; }
.skeleton-bar.w-65 { width: 65%; }
.skeleton-bar.w-70 { width: 70%; }
.skeleton-bar.w-85 { width: 85%; }

.plan-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--danger);
  border-radius: 12px;
  background: #fff;
}

.plan-alert-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.plan-alert-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--danger);
}

.plan-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-alert form,
.plan-error-card form {
  margin: 0;
}

.plan-alert button[type="submit"]:not(.icon-button) {
  width: auto;
  margin: 0;
  padding: 8px 16px;
}

.plan-alert .icon-button,
.plans-toast .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--body);
}

.plan-alert .icon-button:hover {
  background: var(--page);
}

.plan-error-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.plan-error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: hsl(0 72% 51% / 0.1);
  color: var(--danger);
}

.plan-error-card h2 {
  margin: 0;
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.plan-error-card p {
  margin: 0;
  font-size: 14px;
  color: var(--body);
}

.plan-error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.plan-error-actions [role="button"],
.plan-error-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 9px 16px;
}

.plan-error-actions [role="button"].secondary:hover {
  border-color: var(--line);
  background: var(--page);
}

.plans-toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 48px);
  padding: 14px 12px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.plans-toast-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: hsl(203 73% 39%);
}

.plans-toast > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.plans-toast strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.plans-toast span {
  font-size: 14px;
  color: var(--body);
}

.plans-toast .icon-button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--subtle);
}

.plans-toast .icon-button:hover {
  background: var(--page);
  color: var(--navy);
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan-filters {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-menu {
  position: relative;
  margin: 0;
}

.filter-menu summary,
.filter-menu[open] > summary {
  margin: 0;
  list-style: none;
  line-height: normal;
  cursor: pointer;
}

.plan-filters .filter-menu > summary.filter-pill:not([role]) {
  color: var(--navy);
}

.plan-filters .filter-menu > summary.filter-pill.on:not([role]) {
  color: #fff;
}

.filter-menu summary::-webkit-details-marker,
.filter-menu summary::after {
  display: none;
}

.filter-end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: -4px;
}

.filter-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  color: inherit;
}

.filter-clear:hover {
  background: #fff;
  color: var(--navy);
}

.filter-menu.active summary:hover .filter-clear {
  display: inline-flex;
}

.filter-menu.active summary:hover .filter-caret {
  display: none;
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 260px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.filter-group {
  display: grid;
  gap: 2px;
}

.filter-group + .filter-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.filter-group-title {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  user-select: none;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--body);
  cursor: pointer;
}

.filter-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 4px;
}

.filter-option.disabled {
  color: var(--subtle);
  cursor: not-allowed;
}

.filter-none {
  margin: 0;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--subtle);
}

.plan-filters .clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.plan-filters .clear-filters:hover {
  text-decoration: underline;
}

.plans-table tbody tr:hover {
  background: hsl(42 20% 96%);
}

.plans-table th,
.plans-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.plans-table th:first-child,
.plans-table td:first-child {
  padding-left: 20px;
}

.plans-table th:last-child,
.plans-table td:last-child {
  padding-right: 20px;
}

.plans-table .favorite-col {
  width: 36px;
  padding-right: 0;
}

.plans-table td.favorite-col form {
  margin: 0;
}

.favorite-star {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -1px 0 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  transition: color 0.15s;
}

.plans-table tr:hover .favorite-star,
.favorite-star:focus-visible {
  color: var(--subtle);
}

.favorite-star:hover,
.favorite-star.on,
.plans-table tr:hover .favorite-star.on {
  color: var(--navy);
}

.plans-table .cell-line,
.plans-table .cell-sub {
  display: block;
}

.plans-table .cell-line + .cell-line,
.plans-table .cell-sub {
  margin-top: 2px;
}

.plans-table .cell-sub {
  color: var(--subtle);
}

.cost-sort {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.filter-pill:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-card);
}

.filter-pill.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.plans-table th {
  white-space: normal;
}

.plans-table th.scenario-col {
  width: 180px;
  min-width: 100px;
}

.plans-table .scenario-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plans-table th.appliances-col {
  min-width: 200px;
}

.plan-appliances {
  display: grid;
  gap: 14px;
  align-content: start;
}

.featured-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.featured-pill {
  padding: 4px 12px;
  white-space: nowrap;
  border-radius: 9999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.plan-appliances .appliance-name,
.plan-appliances .appliance-spec {
  display: block;
}

.plan-appliances .appliance-spec {
  color: var(--subtle);
}

.filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 20px;
  text-align: center;
}

.filter-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--page);
  color: var(--navy);
}

.filter-empty .filter-empty-title {
  margin: 0;
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.filter-empty .filter-empty-text {
  margin: 0;
  font-size: 14px;
  color: var(--subtle);
}

.filter-empty [role="button"] {
  margin-top: 12px;
  padding: 9px 16px;
  border: 1px solid var(--navy);
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.footer-bar .action-row {
  justify-content: flex-end;
}

.footer-bar .save-note {
  margin-right: auto;
}

.footer-bar button.save-profile {
  background: #fff;
  border: 1px solid var(--navy);
  color: var(--navy);
}

.footer-bar button.save-profile:hover {
  background: var(--page);
  border-color: var(--navy);
  color: var(--navy);
}

.profile-toasts {
  position: fixed;
  left: 24px;
  bottom: max(96px, calc(var(--footer-height, 0px) + 24px));
  z-index: 60;
  display: grid;
  gap: 8px;
  width: 360px;
  max-width: calc(100vw - 48px);
}

.profile-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.profile-toast-icon {
  flex: 0 0 auto;
  color: hsl(203 73% 39%);
}

.profile-toast > span {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.profile-toast .icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
}

.profile-toast .icon-button:hover {
  background: var(--page);
  color: var(--navy);
}

.compare-page .back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 9px 16px;
}

.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.compare-featured .filter-dropdown {
  width: 340px;
  max-width: calc(100vw - 48px);
}

.compare-featured .filter-option {
  align-items: flex-start;
  padding: 10px;
}

.compare-featured .filter-option input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.compare-featured-text {
  display: grid;
  gap: 2px;
}

.compare-featured-text strong {
  color: var(--navy);
}

.compare-featured-text span {
  color: var(--subtle);
}

.compare-featured .filter-option.disabled:has(input:not(:checked)) strong {
  color: var(--subtle);
}

.compare-differences {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.compare-differences input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.compare-card {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
  font-size: 14px;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) repeat(var(--compare-columns), minmax(170px, 1fr));
  min-width: calc(130px + var(--compare-columns) * 170px);
  border-top: 1px solid var(--line);
}

.compare-row:first-child {
  border-top: 0;
}

.compare-row:not(.compare-head, .compare-actions):hover {
  background: hsl(42 20% 96%);
}

.compare-label {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.compare-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-left: 1px solid var(--line);
  color: var(--body);
  overflow-wrap: anywhere;
}

.compare-head .compare-label,
.compare-head .compare-cell {
  padding-top: 20px;
  padding-bottom: 20px;
}

.compare-head .compare-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.compare-scenario {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--subtle);
}

.compare-cost {
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.compare-head .featured-pill {
  white-space: normal;
}

.compare-item .cell-line,
.compare-item .cell-sub {
  display: block;
}

.compare-item .cell-line + .cell-line,
.compare-item .cell-sub {
  margin-top: 2px;
}

.compare-item .cell-sub {
  color: var(--subtle);
}

.compare-item.bullet {
  position: relative;
  padding-left: 16px;
}

.compare-item.bullet::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--navy);
}

.compare-none {
  font-style: italic;
  color: var(--subtle);
}

.compare-actions .compare-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compare-actions form {
  margin: 0;
}

.compare-actions .favorite-star {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--subtle);
}

.compare-actions .favorite-star:hover {
  background: var(--page);
}

.compare-actions .favorite-star.on {
  color: var(--navy);
}

.compare-actions [role="button"] {
  margin: 0;
  padding: 8px 12px;
  font-weight: 700;
}

.compare-no-differences {
  margin: 0;
  padding: 32px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--subtle);
}

.compare-page:not(.differences-only) .compare-no-differences,
.compare-page.differences-only .compare-row[data-same] {
  display: none;
}

.plans-table .compare-col {
  width: 34px;
  padding-right: 0;
}

.plans-table td form button.favorite-star {
  margin: -1px 0 0;
  padding: 0;
}

.plans-table .compare-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  cursor: pointer;
}

.plans-table .compare-col input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.plans-table tbody.plan-group.compare-on > tr.plan-row > td {
  background: var(--gold);
}

.plans-table tbody.plan-group.compare-on .plan-col .featured-pill {
  background: #fff;
}

body.compare-open {
  padding-bottom: 160px;
}

body.compare-open .plans-toast {
  bottom: 120px;
}

.compare-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.compare-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  max-width: 1392px;
  margin: 0 auto;
  padding: 16px 24px;
}

.compare-bar-status {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
}

.compare-bar-status strong {
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 16px;
  color: var(--navy);
}

.compare-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--subtle);
}

.compare-hint.at-limit {
  font-weight: 700;
  color: var(--navy);
}

.compare-chips {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 6px 5px 12px;
  border-radius: 9999px;
  background: var(--page);
  font-size: 14px;
  font-weight: 600;
  color: var(--body);
}

.compare-chip button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--subtle);
}

.compare-chip button:hover {
  background: #fff;
  color: var(--navy);
}

.compare-bar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.compare-bar-actions button {
  width: auto;
  margin: 0;
  padding: 9px 16px;
}

.compare-bar-actions button:disabled {
  border-color: var(--line);
  background: var(--page);
  color: var(--subtle);
  opacity: 1;
  cursor: not-allowed;
}

.footer-bar button.save-profile {
  min-width: 7rem;
}

.footer-bar button.save-profile[aria-busy="true"]::before {
  display: none;
}

.truncated-tip {
  position: fixed;
  z-index: 1000;
  max-width: min(360px, calc(100vw - 16px));
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.usage-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--subtle);
}

.compare-head {
  grid-template-rows: repeat(3, auto);
}

.compare-head .compare-label {
  grid-row: 1 / 4;
}

.compare-head .compare-cell {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  align-content: start;
  align-items: start;
}

.compare-head .featured-pills:not(:empty) {
  margin-bottom: 12px;
}

.compare-head .compare-scenario {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
}

.plans-table input[type="checkbox"],
.filter-option input[type="checkbox"],
.compare-differences input[type="checkbox"] {
  --pico-background-color: #fff;
  --pico-border-color: var(--subtle);
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--pico-border-color);
  border-radius: 4px;
  background-color: var(--pico-background-color);
  background-size: 12px auto;
  box-shadow: none;
  opacity: 1;
  cursor: pointer;
}

.plans-table .compare-col input[type="checkbox"] {
  margin-top: 2px;
}

.plans-table input[type="checkbox"]:checked,
.filter-option input[type="checkbox"]:checked,
.compare-differences input[type="checkbox"]:checked {
  --pico-background-color: var(--navy);
  --pico-border-color: var(--navy);
}

.plans-table input[type="checkbox"]:hover:not(:disabled, :checked),
.filter-option:hover input[type="checkbox"]:not(:disabled, :checked),
.compare-differences:hover input[type="checkbox"]:not(:checked) {
  --pico-border-color: var(--navy);
}

.plans-table input[type="checkbox"]:focus-visible,
.filter-option input[type="checkbox"]:focus-visible,
.compare-differences input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.plans-table input[type="checkbox"]:disabled,
.filter-option input[type="checkbox"]:disabled {
  --pico-background-color: var(--page);
  --pico-border-color: var(--line);
  cursor: not-allowed;
}

.plans-table input[type="checkbox"]:checked:disabled,
.filter-option input[type="checkbox"]:checked:disabled {
  --pico-background-color: var(--subtle);
  --pico-border-color: var(--subtle);
}

.compare-featured .filter-option input[type="checkbox"]:checked:disabled {
  --pico-background-color: var(--navy);
  --pico-border-color: var(--navy);
}

/* Plans page: favorites, featured and all plans */

.plans-section {
  margin-bottom: 32px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0;
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.section-head h2 .plan-scenario {
  max-width: 100%;
  font-family: var(--pico-font-family-sans-serif);
  font-size: 16px;
  font-weight: 400;
}

.section-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--subtle);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-actions .compare-differences {
  margin: 0;
}

.section-action,
.plans-page-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.section-action [data-mode-matrix],
.section-action [data-mode-cards] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-action [hidden] {
  display: none;
}

.section-action.flipped svg {
  transform: rotate(180deg);
}

.section-empty {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--subtle);
  font-size: 14px;
}

.plans-divider {
  margin: 0 0 24px;
  border: 0;
  border-top: 1px solid var(--line);
}

.scenario-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
  min-width: 0;
  margin-bottom: 24px;
}

.scenario-nav-label {
  font-size: 14px;
  color: var(--subtle);
}

.scenario-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px;
  margin: -3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.scenario-tabs.fitted {
  overflow: visible;
}

.scenario-tab,
.scenario-more > summary.scenario-tab {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 300px;
  height: 44px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s;
}

.scenario-tabs:not(.fitted) .scenario-tab {
  flex-shrink: 0;
}

.scenario-tabs.measuring > * {
  flex: 0 0 auto;
}

.scenario-tab > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-tab svg {
  flex: 0 0 auto;
}

.scenario-tab:hover,
.scenario-more > summary.scenario-tab:hover {
  background: var(--page);
  color: var(--navy);
}

.scenario-tab:focus-visible,
.scenario-more > summary.scenario-tab:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  box-shadow: none;
}

.scenario-tab.on,
.scenario-tab.on:hover,
.scenario-more.on > summary.scenario-tab,
.scenario-more.on > summary.scenario-tab:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.scenario-more > summary.scenario-tab {
  max-width: min(300px, 100%);
  padding-right: 14px;
}

.scenario-nav .scenario-tabs .scenario-more > summary.scenario-tab {
  color: var(--navy);
}

.scenario-nav .scenario-tabs .scenario-more.on > summary.scenario-tab {
  color: #fff;
}

.scenario-tab[hidden],
.scenario-more[hidden],
.scenario-option[hidden] {
  display: none;
}

.scenario-more {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 300px;
}

.scenario-more-menu {
  right: 0;
  left: auto;
  grid-template-columns: minmax(0, 1fr);
  width: max-content;
  min-width: min(240px, calc(100vw - 32px));
  max-width: min(300px, calc(100vw - 32px));
  max-height: 360px;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.scenario-more-menu.above {
  top: auto;
  bottom: calc(100% + 6px);
}

.scenario-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
}

.scenario-option-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scenario-option:hover,
.scenario-option:focus-visible,
.scenario-option:focus {
  background: var(--page);
  color: var(--navy);
  outline: none;
}

.scenario-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.scenario-option.on {
  font-weight: 700;
}

.scenario-check {
  display: inline-flex;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.favorites-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: hsl(42 20% 96%);
  color: var(--subtle);
  font-size: 14px;
}

.favorites-empty > svg {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 1px;
}

.favorites-empty div {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
}

.favorites-empty strong {
  color: var(--navy);
}

.favorites-empty button {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.favorites-section .plan-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.favorites-section:not(.show-all) .plan-card-slot.extra {
  display: none;
}

.plan-card-slot {
  display: grid;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  transition: box-shadow 0.15s, border-color 0.15s, background-color 0.15s;
}

.plan-card:hover {
  box-shadow: var(--shadow-elevated);
}

.plan-card:focus-within:has(.stretched:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.plan-card.compare-on {
  border-color: hsl(43 70% 78%);
  background: var(--gold);
}

.plan-card.compare-on .featured-pill {
  background: #fff;
}

.plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.plan-name {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.plan-name-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--navy);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

a.plan-name-text:hover {
  text-decoration: none;
}

.plan-card .plan-name-text {
  font-size: 16px;
  line-height: 1.35;
}

.plan-name-text.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

.plan-name-text.stretched:focus-visible {
  outline: none;
}

.plan-card .favorite-form,
.plan-card .rename-button,
.plan-card .compare-toggle,
.plan-card .rename-form,
.plan-card .plan-scenario span,
.plan-card .plan-card-facts dd {
  position: relative;
  z-index: 1;
}

.plan-card {
  cursor: pointer;
}

.favorite-form {
  margin: 0;
}

.plan-card .favorite-star,
.plans-table .favorite-star,
.compare-head .favorite-star {
  width: 28px;
  height: 28px;
  margin: -3px 0 0;
  border-radius: 8px;
  color: var(--subtle);
}

.plan-card .favorite-star.on,
.plans-table .favorite-star.on,
.compare-head .favorite-star.on {
  color: var(--navy);
}

.plan-card .favorite-star:hover,
.plans-table .favorite-star:hover,
.compare-head .favorite-star:hover {
  background: var(--page);
  color: var(--navy);
}

.favorite-star:focus-visible,
.plan-icon-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.plan-icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}

.plan-icon-button:hover:not(:disabled) {
  background: var(--page);
  color: var(--navy);
}

.plan-icon-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rename-button {
  width: 24px;
  height: 24px;
  margin-top: -2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.plan-card:hover .rename-button,
.plan-group:hover .rename-button,
.compare-head .rename-button,
.rename-button:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .rename-button {
    opacity: 1;
  }
}

.plan-name.editing {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.rename-form {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  max-width: 240px;
  margin: 0;
}

.rename-form.saving {
  opacity: 0.6;
  pointer-events: none;
}

.rename-field {
  position: relative;
  min-width: 0;
}

.rename-field input[type="text"],
.rename-field input[type="text"][aria-invalid] {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 56px 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  background-image: none;
  box-shadow: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.rename-field input[type="text"]:focus {
  border-color: var(--navy);
  box-shadow: none;
  outline: none;
}

.rename-field input[aria-invalid="true"],
.rename-field input[aria-invalid="true"]:focus {
  padding: 0 56px 0 8px !important;
  border-color: var(--danger);
  background-image: none !important;
}

.rename-field .plan-icon-button,
.table-card td form.rename-form .plan-icon-button {
  position: absolute;
  top: 4px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 6px;
}

.rename-field [data-save] {
  right: 28px;
  color: var(--navy);
}

.rename-field [data-cancel] {
  right: 4px;
}

.rename-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.rename-error:empty {
  display: none;
}

.plan-scenario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--subtle);
  font-size: 14px;
}

.plan-scenario span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-scenario svg {
  flex: 0 0 auto;
}

.plan-card .featured-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-card .featured-pill,
.plans-table .plan-col .featured-pill,
.add-plan-option .featured-pill {
  padding: 3px 10px;
  font-size: 12px;
}

.plan-card-cost {
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.appliance-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.appliance-pill {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.plan-card-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0;
}

.plan-card-facts dt {
  color: var(--subtle);
  font-weight: 400;
}

.plan-card-facts dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--body);
}

.plan-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  cursor: pointer;
}

.compare-toggle input[type="checkbox"],
.add-plan-option input[type="checkbox"] {
  --pico-background-color: #fff;
  --pico-border-color: var(--subtle);
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--pico-border-color);
  border-radius: 4px;
  background-color: var(--pico-background-color);
  background-size: 12px auto;
  box-shadow: none;
  cursor: pointer;
}

.compare-toggle input[type="checkbox"]:checked,
.add-plan-option input[type="checkbox"]:checked {
  --pico-background-color: var(--navy);
  --pico-border-color: var(--navy);
}

.compare-toggle input[type="checkbox"]:disabled,
.add-plan-option input[type="checkbox"]:disabled:not(:checked) {
  --pico-background-color: var(--page);
  --pico-border-color: var(--line);
  cursor: not-allowed;
}

.compare-toggle:has(input:disabled) {
  color: var(--subtle);
  cursor: not-allowed;
}

.plan-card-view {
  color: var(--navy);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s;
}

.plan-card:hover .plan-card-view {
  opacity: 1;
}

.featured-matrix.differences-only .compare-row[data-same],
.featured-matrix.differences-only .compare-subrow[data-same],
.compare-page.differences-only .compare-subrow[data-same] {
  display: none;
}

.featured-matrix:not(.differences-only) .compare-no-differences {
  display: none;
}

.compare-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.compare-head-top .plan-name-text {
  font-size: 16px;
}

.compare-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.compare-remove {
  margin-top: -3px;
}

.compare-head {
  grid-template-rows: repeat(4, auto);
}

.compare-head .compare-label {
  grid-row: 1 / 5;
}

.compare-head .compare-cell {
  grid-row: span 4;
}

.compare-head .plan-scenario {
  margin-top: 6px;
  min-height: 1px;
}

.compare-head .featured-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.compare-head .featured-pills:not(:empty) {
  margin-bottom: 0;
}

.compare-head .featured-pill {
  padding: 3px 10px;
  font-size: 12px;
}

.compare-head .compare-cost {
  margin-top: 16px;
  align-self: end;
}

.compare-group {
  display: grid;
}

.compare-subrows {
  display: grid;
  grid-column: 2 / -1;
}

.compare-subrow {
  display: grid;
  grid-template-columns: repeat(var(--compare-columns), minmax(170px, 1fr));
}

.compare-subrow + .compare-subrow .compare-cell {
  border-top: 1px solid var(--line);
}

.compare-sublabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.compare-cell .compare-sublabel + .compare-appliance,
.compare-cell .compare-appliance + .compare-appliance {
  margin-top: -2px;
}

.compare-appliance {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.compare-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compare-spec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: hsl(42 20% 95%);
  color: var(--body);
  max-width: 100%;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.compare-spec svg {
  flex: 0 0 auto;
}

.compare-value,
.compare-values {
  justify-self: start;
}

.compare-values .cell-line,
.compare-values .cell-sub {
  display: block;
}

.compare-values .cell-sub {
  margin-top: 2px;
  color: var(--subtle);
}

.differences-only .compare-value.marked,
.differences-only .compare-values.marked {
  margin-left: -6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: hsl(42 20% 92%);
}

.compare-actions .compare-cell [role="button"] {
  margin: 0;
}

/* All plans */

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.section-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
  border-radius: 6px;
}

.section-chevron {
  transition: transform 0.2s ease;
}

.all-plans-section.open .section-chevron {
  transform: rotate(180deg);
}

.all-plans-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
}

.all-plans-body.closed {
  grid-template-rows: 0fr;
  opacity: 0;
}

.all-plans-inner {
  min-height: 0;
}

.all-plans-body:not(.closed) .all-plans-inner {
  overflow: visible;
}

.all-plans-body.closed .all-plans-inner {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .all-plans-body,
  .section-chevron,
  .plan-card,
  .rename-button,
  .plan-card-view {
    transition: none;
  }
}

#plans-page .plan-filters {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.plans-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar-end {
  display: flex;
  align-items: center;
  gap: 16px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--subtle);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.link-button span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.link-button [hidden] {
  display: none;
}

.link-button:hover {
  color: var(--navy);
}

.link-button,
.link-button:hover,
.link-button:focus {
  border: 0;
  box-shadow: none;
  text-decoration: none;
}

.link-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 6px;
}

.sort-menu > summary.sort-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 264px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
}

.sort-trigger-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sort-dropdown {
  right: 0;
  left: auto;
  min-width: 264px;
}

.sort-option,
form .sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--navy);
  font-size: 14px;
  cursor: pointer;
}

.sort-option:hover,
.sort-option:focus-within,
.sort-option.on {
  background: var(--page);
}

form .sort-option.on {
  font-weight: 700;
}

.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters-summary {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.match-count {
  color: var(--subtle);
}

#plans-page .filters-summary .clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.plans-table .plan-col {
  width: 1%;
  min-width: 190px;
  padding-right: 24px;
}

.plans-table td.plan-col .plan-name-text {
  max-width: 170px;
}

.plan-col-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.plans-table .plan-col .plan-name {
  flex: 1 1 auto;
  min-width: 0;
}

.plans-table .plan-col .plan-name-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 2px;
}

.plans-table .plan-col .featured-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 6px 0 0 34px;
}

.plans-table .plan-col .plan-scenario {
  margin: 6px 0 0 34px;
  font-size: 13px;
}

.plans-table .appliances-cell {
  min-width: 290px;
  padding-left: 0;
}

.plans-table th.appliances-col {
  padding-left: 0;
}

.appliances-toggle {
  display: flex;
  align-items: center;
  gap: 24px;
  width: auto;
  max-width: 100%;
  margin: -4px -6px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.appliances-toggle:hover {
  border-color: var(--line);
  background: #fff;
}

.appliances-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.appliances-toggle .appliance-pills {
  flex: 0 1 auto;
  max-width: 230px;
}

.row-chevron {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--navy);
}

.plans-table.table-card th:not(.sortable-col) {
  white-space: normal;
}

.plans-table .menu-col {
  width: 40px;
  padding-left: 4px;
}

.row-chevron svg {
  transition: transform 0.15s;
}

.plan-group.expanded .row-chevron svg {
  transform: rotate(90deg);
}

.plans-table .nowrap {
  white-space: nowrap;
}

.plans-table .cell-sub.clamp {
  overflow: hidden;
  max-width: 120px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plans-table .cost-cell {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.plans-table .menu-col {
  width: 44px;
  text-align: right;
}

.plans-table tbody.plan-group > tr.plan-row > td {
  vertical-align: middle;
}

.plans-table tbody.plan-group > tr.plan-row > td.compare-col,
.plans-table tbody.plan-group > tr.plan-row > td.plan-col {
  vertical-align: top;
}

.plans-table tbody.plan-group + tbody.plan-group > tr.plan-row > td {
  border-top: 1px solid var(--line);
}

.plans-table tbody.plan-group:not(.compare-on):hover > tr > td {
  background: hsl(42 20% 97%);
}

.plans-table .column-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  white-space: nowrap;
  text-decoration: none;
}

.plans-table .column-sort svg {
  flex: 0 0 auto;
}

.plans-table th.sortable-col {
  white-space: nowrap;
}

.plans-table .column-sort.on,
.plans-table .column-sort:hover {
  color: var(--navy);
}

.plans-table .plan-specs > td {
  padding-top: 12px;
  padding-bottom: 16px;
  border-top: 0;
}

.specs-table {
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 14px;
}

.plans-table .specs-table th,
.plans-table .specs-table td {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: transparent;
  white-space: normal;
}

.plans-table .specs-table thead th {
  border-top: 0;
  font-size: 12px;
}

.plans-table .specs-table td:first-child {
  color: var(--navy);
}

.appliance-pill.is-match {
  border-color: var(--gold);
  background: var(--gold);
}

.plans-table .specs-table tr.is-match > td {
  background: var(--gold);
}

.plans-table .specs-table tr.is-match:last-child > td:first-child {
  border-bottom-left-radius: 11px;
}

.plans-table .specs-table tr.is-match:last-child > td:last-child {
  border-bottom-right-radius: 11px;
}

.row-menu {
  position: relative;
  display: inline-block;
  margin: 0;
}

.row-menu > summary {
  list-style: none;
}

.row-menu > summary::-webkit-details-marker,
.row-menu > summary::after {
  display: none;
}

.row-menu-list {
  position: fixed;
  z-index: 30;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
  text-align: left;
}

.row-menu-list [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.row-menu-list [role="menuitem"]:hover,
.row-menu-list [role="menuitem"]:focus-visible {
  background: var(--page);
}

.row-menu-list [role="menuitem"]:disabled {
  color: var(--subtle);
  cursor: not-allowed;
}

.plans-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 4px;
  color: var(--subtle);
  font-size: 14px;
}

.plans-loading-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.plans-loading-more[hidden] {
  display: none;
}

/* Compare: Add Plans */

.add-plans {
  position: relative;
  margin: 0;
}

.add-plans > summary,
.add-plans[open] > summary {
  margin: 0;
  list-style: none;
}

.add-plans > summary::-webkit-details-marker,
.add-plans > summary::after {
  display: none;
}

.add-plans-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.add-plans-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 32px));
  max-height: min(560px, 70vh);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-prominent);
}

.add-plans-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}

.add-plans-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 8px;
}

.add-plans-group + .add-plans-group {
  border-top: 1px solid var(--line);
}

.add-plans-title {
  padding: 12px 8px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.add-plan-option,
.add-plans-group label.add-plan-option {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
}

.add-plan-option:hover:not(.disabled) {
  background: var(--page);
}

.add-plan-option.disabled {
  cursor: not-allowed;
}

.add-plan-option.disabled:has(input:not(:checked)) .add-plan-text {
  opacity: 0.55;
}

.add-plan-option[hidden] {
  display: none;
}

.add-plan-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.add-plan-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--navy);
}

.add-plan-meta {
  color: var(--subtle);
  font-size: 14px;
}

.add-plan-text .featured-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.add-plans-empty {
  display: flex;
  gap: 10px;
  padding: 6px 8px 12px;
  color: var(--subtle);
  font-size: 14px;
}

.add-plans-empty div {
  display: grid;
  gap: 2px;
}

.add-plans-empty strong {
  color: var(--navy);
}

.add-plans-none {
  margin: 0;
  padding: 6px 8px 12px;
  color: var(--subtle);
  font-size: 14px;
}

.add-plans-foot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.add-plans-foot:hover {
  text-decoration: underline;
}

.compare-page.updating {
  opacity: 0.6;
  pointer-events: none;
}

.back-button svg.flip {
  transform: rotate(180deg);
}

.compare-chip-text {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .favorites-section .plan-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .favorites-section .plan-cards {
    grid-template-columns: 1fr;
  }

  .section-head,
  .plans-toolbar,
  .filters-row,
  .favorites-empty {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-end {
    justify-content: space-between;
  }

  .sort-menu > summary.sort-trigger {
    width: 100%;
  }
}

#plans-page.swapping:not(.swapping-list) .plans-section,
#plans-page.swapping:not(.swapping-list) .scenario-nav,
#plans-page.swapping-list #all-plans .plans-table,
#plans-page.swapping-list #all-plans .plans-footer {
  opacity: 0.6;
  transition: opacity 0.15s;
}

#plans-page.swapping {
  cursor: progress;
}

.compare-page.refreshing .compare-card {
  opacity: 0.6;
  transition: opacity 0.15s;
}

.plans-table td.detail-cell:not(.nowrap) {
  min-width: 96px;
  white-space: normal;
}

.back-to-top {
  gap: 6px;
  color: var(--navy);
  font-weight: 700;
}

.back-to-top[hidden] {
  display: none;
}

.featured-section .plan-cards {
  grid-auto-rows: auto;
}

.featured-section .plan-card {
  display: grid;
  grid-row: span 7;
  grid-template-rows: subgrid;
  row-gap: 10px;
}

.featured-section .plan-card .plan-scenario:empty {
  display: block;
}

.featured-section .plan-card > * {
  align-self: start;
}

.featured-section .plan-card .featured-pills {
  align-items: flex-start;
  align-content: flex-start;
}

.featured-section .plan-card .plan-card-cost {
  align-self: end;
}

.featured-section .plan-card .plan-card-foot {
  align-self: end;
}

.plans-table tbody.plan-group.expanded > tr > td {
  background: hsl(42 20% 96%);
}

.plans-table tbody.plan-group.expanded.compare-on > tr.plan-row > td {
  background: var(--gold);
}

.plans-table tbody.plan-group.expanded .specs-table {
  box-shadow: var(--shadow-card);
}

#all-plans .plans-table.table-card.fits {
  overflow: clip;
}

#all-plans.open > .section-head {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-top: -12px;
  margin-bottom: 0;
  padding: 12px 0 16px;
  background: var(--page);
}

#all-plans .plans-table.fits > table > thead th {
  position: sticky;
  top: var(--plans-head-top, 0px);
  z-index: 4;
  box-shadow: 0 1px 0 var(--line);
}

#all-plans .plans-table.fits.stuck > table > thead th {
  box-shadow: 0 1px 0 var(--line), var(--shadow-card);
}

.plans-table td.plan-col .plan-scenario {
  display: flex;
  width: 0;
  min-width: calc(100% - 34px);
}

#all-plans .plans-table > table > thead th {
  background: #fff;
}

#plans-page[aria-busy="true"] {
  white-space: normal;
}

#plans-page[aria-busy="true"]::before {
  display: none;
}

.row-menu > summary,
.row-menu[open] > summary {
  margin: 0;
}

.favorite-star svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

/* Home profile cards */

.profile-card {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.page-head + .profile-card,
.option-label + .profile-card {
  margin-top: 0;
}

.profile-card .card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 18px 24px;
  cursor: pointer;
}

.profile-card .card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.profile-card button.card-toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  text-align: left;
}

.profile-card button.card-toggle:focus {
  box-shadow: none;
}

.profile-card button.card-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
  border-radius: 6px;
}

.card-status,
.card-status > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--subtle);
}

.card-status [hidden],
.tab-status [hidden],
.action-note [hidden] {
  display: none;
}

.status-complete svg {
  color: hsl(142 45% 32%);
}

.card-summary {
  min-width: 0;
  font-size: 14px;
  color: var(--subtle);
}

.card-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  height: 32px;
  margin-left: auto;
  color: var(--navy);
}

.card-chevron svg,
.more-label svg {
  transition: transform 0.2s ease;
}

.profile-card[data-open] > .card-head .card-chevron svg,
.more-fields[data-open] .more-label svg {
  transform: rotate(-90deg);
}

.profile-card > .card-body {
  padding: 4px 24px 24px;
}

.profile-card > .home-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0;
  border-top: 1px solid var(--line);
}

.profile-card > .home-card-body[hidden] {
  display: none;
}

.section-nav {
  display: flex;
  flex: 0 1 232px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  min-width: 200px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
}

.section-nav button.section-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--body);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

.section-nav button.section-tab:hover {
  background: hsl(42 20% 96%);
}

.section-nav button.section-tab[aria-selected="true"] {
  background: hsl(42 20% 93%);
  color: var(--navy);
  font-weight: 700;
}

.section-nav button.section-tab:focus {
  box-shadow: none;
}

.section-nav button.section-tab:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.tab-status {
  display: inline-flex;
  flex: 0 0 auto;
}

.tab-status .status-pending:not([hidden]) {
  display: inline-flex;
  color: var(--subtle);
}

.tab-status .status-complete:not([hidden]) {
  display: inline-flex;
}

.tab-optional {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--subtle);
}

.tab-panels {
  flex: 1 1 520px;
  min-width: 0;
  padding: 24px 28px 28px;
}

.tab-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.field-grid > .profile-field:has(textarea) {
  grid-column: 1 / -1;
}

.profile-field {
  min-width: 0;
}

.profile-field > label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-field > label .label-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.panel-note {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--subtle);
}

.panel-note.is-blocking {
  font-weight: 600;
  color: var(--danger);
}

.panel-form.is-entering {
  animation: hpp-panel-in 200ms ease-out;
}

@keyframes hpp-panel-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel-form.is-entering {
    animation: none;
  }
}

.profile-field .errorlist {
  margin: 4px 0 0;
}

.missing-note {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
}

.stepper,
.affix-input {
  display: flex;
  align-items: stretch;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.stepper:focus-within,
.affix-input:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.is-missing .stepper,
.is-missing .affix-input,
.is-missing > input,
.is-missing > select {
  border-color: var(--danger);
}

.stepper input:not([type="checkbox"], [type="radio"]),
.affix-input input:not([type="checkbox"], [type="radio"]) {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background-image: none;
  box-shadow: none;
  outline: none;
  -moz-appearance: textfield;
}

.stepper input {
  text-align: center;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button,
.affix-input input::-webkit-outer-spin-button,
.affix-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper button.stepper-button {
  flex: 0 0 38px;
  width: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.stepper button.stepper-button:first-child {
  border-right: 1px solid var(--line);
}

.stepper button.stepper-button:last-child {
  border-left: 1px solid var(--line);
}

.stepper button.stepper-button:hover {
  background: hsl(42 20% 96%);
}

.stepper button.stepper-button:focus {
  box-shadow: none;
  outline: none;
}

.stepper button.stepper-button:focus-visible {
  background: hsl(42 20% 93%);
}

.stepper button.stepper-button:disabled {
  opacity: 1;
  color: var(--subtle);
  background: hsl(42 20% 97%);
  cursor: default;
}

.affix {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 14px;
  color: var(--subtle);
  user-select: none;
}

.affix.suffix {
  border-left: 1px solid var(--line);
}

.affix.prefix {
  padding-right: 0;
}

.affix.prefix + input:not([type="checkbox"], [type="radio"]) {
  padding-left: 6px;
}

.more-fields {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: hsl(42 20% 97%);
}

.more-fields button.more-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.more-fields button.more-toggle:focus {
  box-shadow: none;
}

.more-fields button.more-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 6px;
}

.more-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.more-summary {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  color: var(--subtle);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0 4px;
}

.more-body[hidden] {
  display: none;
}

.more-card {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.info-tip {
  position: relative;
  display: inline-flex;
}

button.info-tip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--subtle);
  cursor: help;
}

.card-head button.info-tip-button {
  width: 28px;
  height: 28px;
  margin: 0 -6px;
  border-radius: 8px;
}

button.info-tip-button:hover {
  background: transparent;
  color: var(--navy);
}

.card-head button.info-tip-button:hover {
  background: hsl(42 20% 96%);
}

button.info-tip-button:focus {
  box-shadow: none;
}

button.info-tip-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-radius: 6px;
}

.info-tip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 40;
  display: none;
  width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--navy);
  box-shadow: var(--shadow-elevated);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  transform: translateX(-50%);
  cursor: default;
}

.info-tip-text.wide {
  top: calc(100% + 6px);
  bottom: auto;
  left: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 360px;
  max-width: calc(100vw - 48px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--body);
  font-size: 14px;
  line-height: 1.45;
  transform: none;
}

.info-tip-text.wide strong {
  color: var(--navy);
}

.info-tip-text .tip-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 18px;
}

.info-tip-text .tip-list > span {
  display: list-item;
  list-style: disc;
}

.info-tip:hover .info-tip-text,
.info-tip:focus-within .info-tip-text,
.info-tip.open .info-tip-text {
  display: block;
}

.info-tip:hover .info-tip-text.wide,
.info-tip:focus-within .info-tip-text.wide,
.info-tip.open .info-tip-text.wide {
  display: flex;
}

.footer-bar .action-note {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
  margin: 0 4px 0 0;
  padding: 8px 12px;
  border: 1px solid hsl(40 85% 78%);
  border-radius: 10px;
  background: hsl(43 96% 95%);
  color: var(--body);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.footer-bar .action-note[hidden] {
  display: none;
}

.footer-bar .action-note svg {
  flex: 0 0 auto;
  color: hsl(38 92% 42%);
}

.footer-bar .action-note a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.utility-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.upload-control.drop-target {
  display: block;
  margin: 0;
}

.upload-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--subtle);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.upload-drop[hidden] {
  display: none;
}

.upload-drop .upload-button {
  padding: 0;
  border: 0;
  color: var(--navy);
}

.upload-control.dragging .upload-drop,
.upload-control:focus-within .upload-drop {
  border-color: var(--navy);
}

.upload-control .chosen-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.upload-control .chosen-file[hidden] {
  display: none;
}

.upload-control .chosen-file label.link-button {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
}

.chosen-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.upload-control .saved-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.upload-control .saved-file[hidden] {
  display: none;
}

.saved-file-icon {
  flex: 0 0 auto;
  color: var(--subtle);
}

.saved-file-text {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  min-width: 0;
}

.saved-name {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-weight: 700;
}

.saved-meta {
  font-size: 12px;
  color: var(--subtle);
}

.upload-control .saved-file label.link-button {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
}

.upload-types {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--subtle);
}

.provider-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid hsl(40 85% 78%);
  border-radius: 10px;
  background: hsl(43 96% 95%);
  font-size: 13px;
  color: var(--body);
}

.provider-warning[hidden] {
  display: none;
}

.provider-warning svg {
  flex: 0 0 auto;
  color: hsl(38 92% 42%);
}

.provider-warning button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
}

.provider-warning button.icon-button:hover {
  background: hsl(43 96% 90%);
  color: var(--navy);
}

@media (max-width: 720px) {
  .section-nav {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tab-panels {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-chevron svg,
  .more-label svg {
    transition: none;
  }
}

.card-head button.info-tip-button svg {
  width: 16px;
  height: 16px;
}

.profile-field input[aria-invalid="true"]:not([type="checkbox"], [type="radio"]) {
  padding-right: 10px;
  background-image: none;
}

.count-stepper {
  max-width: 140px;
}

.appliance-grid .row-actions,
.replacement-grid .row-actions {
  justify-content: flex-end;
  gap: 4px;
}

.icon-tip {
  position: relative;
  display: inline-flex;
}

.icon-tip-text {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 40;
  display: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--navy);
  box-shadow: var(--shadow-elevated);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}

.icon-tip:hover .icon-tip-text,
.icon-tip:focus-within .icon-tip-text,
.icon-tip.open .icon-tip-text {
  display: block;
}

.info-tip.tip-hidden .info-tip-text,
.icon-tip.tip-hidden .icon-tip-text {
  display: none !important;
}

button.edit-details,
.appliance-grid .row-actions button.edit-details,
.replacement-grid .row-actions button.edit-details {
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--navy);
}

button.edit-details svg {
  width: 16px;
  height: 16px;
}

button.edit-details:not([aria-disabled="true"]):hover,
button.edit-details[aria-expanded="true"] {
  background: hsl(42 20% 90%);
}

button.edit-details[aria-expanded="true"] svg {
  transform: none;
}

button.edit-details:focus {
  box-shadow: none;
}

button.edit-details:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

button.edit-details[aria-disabled="true"] {
  color: hsl(42 8% 74%);
  background: none;
  cursor: not-allowed;
}

.scenario-name {
  position: relative;
  flex: 1;
  min-width: 0;
}

.scenario-name input {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 9px 80px 9px 12px;
  font-family: "Sora", var(--pico-font-family-sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.scenario-name input:hover {
  border-color: hsl(42 10% 70%);
}

.scenario-name input:focus {
  border-color: var(--navy);
  box-shadow: none;
}

.name-actions {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
}

.name-editing {
  gap: 2px;
}

.scenario-name .name-editing,
.scenario-name[data-editing] .name-idle {
  display: none;
}

.scenario-name[data-editing] .name-editing {
  display: flex;
}

button.name-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
}

button.name-button.cancel {
  color: var(--subtle);
}

button.name-button:hover {
  background: hsl(42 20% 93%);
}

button.name-button:focus {
  box-shadow: none;
}

button.name-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 16px 12px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: hsl(42 20% 96%);
}

.guide-banner-icon {
  display: inline-flex;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--subtle);
}

.guide-banner-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  font-size: 14px;
  color: var(--body);
}

.guide-banner-text strong {
  font-weight: 700;
  color: var(--navy);
}

button.guide-banner-close {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
}

button.guide-banner-close:hover {
  background: hsl(42 20% 90%);
  color: var(--navy);
}

button.guide-banner-close:focus {
  box-shadow: none;
}

button.guide-banner-close:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

button.scenario-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
}

button.scenario-copy:hover {
  background: hsl(42 20% 93%);
}

button.scenario-copy:focus {
  box-shadow: none;
}

button.scenario-copy:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.identical-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--gold);
  font-size: 14px;
  color: var(--body);
}

.identical-note[hidden] {
  display: none;
}

.identical-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--navy);
}

fieldset.new-appliance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px repeat(4, minmax(0, 1fr)) auto;
  gap: 16px 12px;
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
}

.new-appliance-grid > div {
  margin: 0;
}

.new-appliance-grid > .category-field {
  grid-column: 1 / 3;
}

.new-appliance-grid > .category-field + div {
  grid-column: 1;
}

.new-appliance-grid .count-stepper {
  max-width: none;
}

.new-appliance-grid .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 38px;
}

@media (max-width: 1024px) {
  fieldset.new-appliance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-appliance-grid > .category-field,
  .new-appliance-grid .row-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  fieldset.new-appliance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.head-actions [role="button"].with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.imported-from {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  color: var(--subtle);
}

.imported-from svg,
.imported-from span {
  flex: 0 0 auto;
}

.imported-from strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  color: var(--body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.import-banner-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: hsl(142 45% 32%);
}

.import-banner-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  color: var(--body);
  overflow-wrap: anywhere;
}

.import-banner-text strong {
  font-weight: 700;
  color: var(--navy);
}

dialog.wb-modal {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.wb-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: calc(100vw - 32px);
  max-width: 600px;
  max-height: calc(100vh - 48px);
  margin: 0;
  padding: 28px;
  overflow: auto;
  background: #fff;
}

.wb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wb-heading {
  display: grid;
  gap: 4px;
}

.wb-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.wb-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--subtle);
}

button.wb-icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--subtle);
}

button.wb-icon-button:hover:not(:disabled) {
  background: var(--page);
  color: var(--navy);
}

button.wb-icon-button:focus {
  box-shadow: none;
}

button.wb-icon-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.wb-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  min-height: 96px;
  padding: 16px 24px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--subtle);
  cursor: pointer;
}

.wb-drop[hidden] {
  display: none;
}

.wb-drop.is-dragging {
  border-color: var(--navy);
  background: hsl(223 73% 19% / 0.04);
}

.wb-drop-full {
  background: var(--page);
  cursor: default;
}

.wb-drop svg {
  flex: 0 0 auto;
}

.wb-drop-text {
  display: grid;
  gap: 2px;
  font-size: 16px;
  color: var(--body);
}

.wb-drop-hint {
  font-size: 13px;
  color: var(--subtle);
}

.wb-drop .wb-browse {
  display: inline;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
}

.wb-drop .wb-browse:focus {
  box-shadow: none;
}

.wb-drop .wb-browse:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.wb-limit {
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.wb-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.wb-count[hidden] {
  display: none;
}

.wb-count-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.wb-skip {
  font-size: 13px;
  color: var(--danger);
}

.wb-card > * {
  flex: 0 0 auto;
}

.wb-card > .wb-files {
  flex: 0 1 auto;
  min-height: 96px;
  overflow-y: auto;
}

.wb-files {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wb-files:empty {
  display: none;
}

.wb-file {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  min-height: 72px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  list-style: none;
}

.wb-files.is-single .wb-file {
  align-items: center;
  min-height: 96px;
  padding: 12px 24px;
  border-width: 2px;
}

.wb-file.is-invalid,
.wb-file.is-failed {
  border-color: var(--danger);
}

.wb-file-icon {
  display: flex;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--navy);
}

.wb-file.is-checking .wb-file-icon {
  color: var(--subtle);
}

.wb-file.is-invalid .wb-file-icon,
.wb-file.is-failed .wb-file-icon {
  color: var(--danger);
}

.wb-file.is-done .wb-file-icon {
  color: hsl(142 45% 32%);
}

.wb-file-body {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.wb-file-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.wb-file-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-file-size {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--subtle);
}

.wb-file-note,
.wb-file-detail {
  font-size: 13px;
  color: var(--subtle);
  overflow-wrap: anywhere;
}

.wb-file.is-invalid .wb-file-note,
.wb-file.is-failed .wb-file-note {
  color: var(--danger);
}

.wb-file-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: center;
  gap: 4px;
}

.wb-file-actions a {
  font-size: 14px;
  font-weight: 600;
}

.wb-file-actions .link-button {
  padding: 4px 6px;
  color: var(--navy);
  font-weight: 700;
}

.wb-spin {
  animation: wb-spin 0.9s linear infinite;
}

@keyframes wb-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wb-spin {
    animation: none;
  }

  .wb-bar > div {
    transition: none;
  }
}

.wb-progress {
  display: grid;
  gap: 6px;
}

.wb-progress[hidden] {
  display: none;
}

.wb-progress-label {
  font-size: 13px;
  color: var(--subtle);
}

.wb-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--page);
}

.wb-bar > div {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--navy);
  transition: width 0.3s linear;
}

.wb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding-top: 4px;
}

.wb-template {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
}

.wb-buttons {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.wb-buttons button {
  width: auto;
  margin: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.wb-buttons button[hidden] {
  display: none;
}

.upload-toasts {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: 360px;
  max-width: calc(100vw - 48px);
}

.wb-toast {
  align-items: flex-start;
}

.wb-toast.is-error {
  border-color: hsl(0 72% 51% / 0.4);
  background: linear-gradient(hsl(0 72% 51% / 0.05), hsl(0 72% 51% / 0.05)), #fff;
}

.wb-toast > .wb-toast-icon {
  display: flex;
  flex: 0 0 auto;
  margin-top: 1px;
  color: hsl(142 45% 32%);
}

.wb-toast.is-partial > .wb-toast-icon {
  color: hsl(203 73% 39%);
}

.wb-toast.is-error > .wb-toast-icon {
  color: var(--danger);
}

.wb-toast-text {
  display: grid;
  flex: 1;
  gap: 4px;
  justify-items: start;
  min-width: 0;
  font-size: 14px;
  color: var(--body);
}

.wb-toast-text strong {
  font-weight: 700;
  color: var(--navy);
}

.wb-toast-text .wb-toast-action {
  padding: 0;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.unsaved-dialog {
  max-width: 560px;
}

.unsaved-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.unsaved-title svg {
  flex: 0 0 auto;
  color: hsl(38 92% 50%);
}

.unsaved-message {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
}

.unsaved-error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  font-size: 14px;
  color: var(--danger);
}

.unsaved-dialog .confirm-actions {
  flex-wrap: wrap;
}

.unsaved-dialog button.tertiary {
  border-color: transparent;
  background: transparent;
  color: var(--subtle);
}

.unsaved-dialog button.tertiary:hover {
  color: var(--navy);
}

@media (max-width: 560px) {
  .wb-card {
    padding: 20px;
  }

  .wb-drop {
    padding: 16px;
  }

  .wb-files.is-single .wb-file {
    padding: 12px 16px;
  }

  .wb-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wb-buttons {
    justify-content: flex-end;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .profile-card .card-head {
    position: relative;
  }

  .card-head .info-tip {
    position: static;
  }

  .card-head .info-tip-text.wide {
    top: calc(100% - 8px);
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .choice-group {
    display: flex;
  }

  .choice-group label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .choice-group span {
    justify-content: center;
    height: 100%;
    min-height: 38px;
    padding: 4px 8px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
}

.subform,
div.scenario,
.electrify-row {
  scroll-margin-top: 16px;
  scroll-margin-bottom: calc(var(--footer-height, 72px) + 16px);
}

fieldset.appliance-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px 150px auto;
  grid-template-areas: "category appliance count fuel actions";
  gap: 16px;
  align-items: end;
}

.appliance-grid > .category-field {
  grid-area: category;
}

.appliance-grid > .appliance-field {
  grid-area: appliance;
}

.appliance-grid > .count-field {
  grid-area: count;
}

.appliance-grid > .fuel-field {
  grid-area: fuel;
}

.appliance-grid > .row-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 38px;
}

.appliance-grid .count-stepper {
  max-width: none;
}

.fuel-field select:disabled {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: hsl(42 20% 96%);
  background-image: none;
  font-size: 14px;
  color: var(--subtle);
  opacity: 1;
  cursor: not-allowed;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  fieldset.appliance-grid {
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "category category appliance appliance"
      "count fuel . actions";
  }
}

@media (max-width: 640px) {
  fieldset.appliance-grid {
    grid-template-columns: 120px minmax(0, 1fr) auto;
    grid-template-areas:
      "category category category"
      "appliance appliance appliance"
      "count fuel actions";
  }
}

.choice-detail {
  background: hsl(42 20% 96%);
}

.replacement-grid > .detail-field label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.choice-group label + label {
  margin-left: 0;
}

.choice-group span,
.choice-group label:first-child span,
.choice-group label:last-child span {
  height: auto;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
}

.choice-group input:checked + span {
  border: 0;
  background: var(--navy);
  color: #fff;
}

.choice-group input:focus-visible + span {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.choice-group input:disabled + span {
  color: hsl(42 8% 74%);
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .choice-group {
    display: flex;
    width: 100%;
    border-radius: 20px;
  }

  .choice-group span,
  .choice-group label:first-child span,
  .choice-group label:last-child span {
    padding: 6px 8px;
  }
}

.appliance-row.is-entering {
  animation: hpp-panel-in 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .appliance-row.is-entering {
    animation: none;
  }
}

/* Home Profile: panels, electrical service and scenario replacements */
.guide-banner[data-tip="panels"] {
  border-color: hsl(203 50% 86%);
  background: hsl(203 73% 96%);
}

.guide-banner[data-tip="panels"] .guide-banner-icon {
  color: hsl(203 73% 39%);
}

.panel-list {
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-list .panel-form.subform {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.panel-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 20px;
}

.panel-card[data-open] > .panel-card-head {
  border-bottom: 1px solid var(--line);
}

button.panel-card-title {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

button.panel-card-chevron {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
}

button.panel-card-chevron svg {
  transition: transform 0.2s ease;
}

.panel-card[data-open] button.panel-card-chevron svg {
  transform: rotate(-90deg);
}

button.panel-card-title:focus,
button.panel-card-chevron:focus {
  box-shadow: none;
}

button.panel-card-title:focus-visible,
button.panel-card-chevron:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 6px;
}

.panel-card-body {
  padding: 20px;
}

.panel-card-body[hidden] {
  display: none;
}

.panel-card-body .more-fields {
  margin-top: 20px;
}

.panel-card .panel-note {
  margin: 0 0 16px;
}

.panel-card-head button.trash {
  color: var(--danger);
}

button.add-row.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: var(--navy);
  font-weight: 700;
}

.card-description {
  flex: 1 0 100%;
  margin: 0;
  font-size: 14px;
  color: var(--body);
}

.profile-card:not([data-open]) > .card-head .card-description {
  display: none;
}

.electrify-head {
  flex-wrap: wrap;
}

.electrify-head[hidden],
.manual-note[hidden],
[data-replace-menu][hidden],
.additional-subtitle[hidden] {
  display: none;
}

.electrify-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
}

.manual-note button.manual-note-button {
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.manual-note button.manual-note-button:hover {
  background: hsl(42 20% 96%);
}

.manual-note .info-tip-text.manual-note-tip {
  right: 0;
  left: auto;
  width: 320px;
  white-space: normal;
}

.choice-group input[type="radio"]:disabled {
  opacity: 0;
}

.electrify-all:has(input:disabled) {
  color: hsl(42 8% 74%);
  cursor: not-allowed;
}

.electrify-empty {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
}

.electrify-empty[hidden] {
  display: none;
}

.electrify-empty svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.additional .electrify-title {
  margin: 0 0 12px;
}

.additional-subtitle {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.replacing-list:not(:has(> .electrify-row:not([hidden]))) {
  display: none;
}

.electrify-row.upgrade-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.upgrade-row button.trash {
  color: var(--danger);
}

.add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.split-menu {
  position: relative;
  display: inline-flex;
}

.split-menu[hidden] {
  display: none;
}

.split-menu button.split-button {
  display: inline-flex;
  align-items: stretch;
  width: auto;
  margin: 0;
  padding: 0;
  border: 1px solid var(--navy);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.split-menu button.split-button:hover,
.split-menu button.split-button[aria-expanded="true"] {
  background: hsl(42 20% 96%);
}

.split-menu button.split-button:focus {
  box-shadow: none;
}

.split-menu button.split-button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.split-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 14px;
}

.split-chevron {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid var(--navy);
}

.split-pair button.split-left {
  border-right: 0;
  border-radius: 10px 0 0 10px;
}

.split-pair button.split-right {
  border-radius: 0 10px 10px 0;
}

.split-pair button.split-right .split-chevron {
  height: 100%;
}

.split-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  width: 320px;
  max-width: calc(100vw - 48px);
  max-height: 300px;
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-elevated);
}

.split-popup[hidden] {
  display: none;
}

.split-popup-title {
  margin: 0;
  padding: 6px 10px 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.split-popup button.split-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.split-popup button.split-option[hidden] {
  display: none;
}

.split-popup button.split-option:hover,
.split-popup button.split-option:focus {
  background: hsl(42 20% 96%);
  box-shadow: none;
}

.split-popup button.split-option:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.split-option-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--subtle);
}

.scenario-head[data-scenario-head] {
  cursor: pointer;
}

@media (max-width: 640px) {
  .electrify-row.upgrade-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .upgrade-row .choice-group {
    grid-column: 1;
  }

  .electrify-tools {
    justify-content: flex-start;
  }

  .manual-note button.manual-note-button {
    white-space: normal;
  }

  .manual-note .info-tip-text.manual-note-tip {
    right: auto;
    left: 0;
  }
}
