:root {
  --muted: #607783;
}
.subtitle,
.row-sub,
.stat-note,
.cost-label,
.legend-row,
.inline-meta,
.field small,
.footer {
  color: #607783;
}
.stat-top {
  color: #526f80;
}
.field label {
  font-size: 13px;
}
.field input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  height: 22px;
  accent-color: var(--teal);
  align-self: flex-start;
}
.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quick-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.quick-actions .button {
  background: #fff;
  flex: 1;
  min-width: 110px;
}
.storage-strip {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding: 13px 17px;
  border-radius: 8px;
  background: #e8f2f1;
  color: #365f66;
  font-size: 11px;
}
.storage-strip > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dashboard-extras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}
.dashboard-extras p {
  font-size: 12px;
}
.dashboard-extras .button {
  margin-top: 15px;
}
.bottom-nav {
  display: none;
}
.checklist-items {
  display: grid;
  gap: 12px;
}
.checklist-item {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.checklist-item input {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  accent-color: var(--teal);
}
.checklist-item small {
  display: block;
  color: #946d27;
  margin-top: 5px;
  font-size: 11px;
}
.checklist-item strong {
  font-weight: 500;
}
.trend-chart {
  width: 100%;
  max-height: 230px;
}
.trend-chart text {
  font: 12px system-ui;
  fill: #587785;
}
.personal-boat {
  object-fit: cover;
  border-radius: 10px;
  right: 22px;
  bottom: 22px;
  width: 40%;
  height: calc(100% - 44px);
}
.quick-dialog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-copy ul {
  padding-left: 20px;
}
.attachment-option input {
  min-width: 22px;
  min-height: 22px;
}
.table-wrap td {
  overflow-wrap: anywhere;
}
.settings-grid .card p {
  overflow-wrap: anywhere;
}
[data-theme="dark"] {
  color-scheme: dark;
  --line: #355064;
  --muted: #bdd0db;
  background: #102432;
  color: #e5edf2;
}
[data-theme="dark"] .topbar,
[data-theme="dark"] .card,
[data-theme="dark"] .stat,
[data-theme="dark"] dialog,
[data-theme="dark"] .month-card,
[data-theme="dark"] .overview-panel,
[data-theme="dark"] .search-results {
  background: #193648;
  color: #e4edf2;
}
[data-theme="dark"] .row-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] .detail-item dd {
  color: #e5eef4;
}
[data-theme="dark"] .subtitle,
[data-theme="dark"] .row-sub,
[data-theme="dark"] .stat-note,
[data-theme="dark"] .modal-copy,
[data-theme="dark"] .component-card p,
[data-theme="dark"] .field label,
[data-theme="dark"] .field small,
[data-theme="dark"] .cost-label,
[data-theme="dark"] .legend-row,
[data-theme="dark"] .detail-item dt,
[data-theme="dark"] .stat-top,
[data-theme="dark"] .footer,
[data-theme="dark"] .settings-grid p,
[data-theme="dark"] .help-content p,
[data-theme="dark"] .help-content li {
  color: #b8cbd7;
}
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .field select,
[data-theme="dark"] .toolbar select,
[data-theme="dark"] .year-select,
[data-theme="dark"] .search-box input {
  background: #112b3c;
  color: #e6eff3;
  border-color: #466377;
}
[data-theme="dark"] th,
[data-theme="dark"] .modal-footer {
  background: #132d3d;
  color: #b8ccd8;
}
[data-theme="dark"] .button:not(.primary):not(.danger),
[data-theme="dark"] .icon-button,
[data-theme="dark"] .quick-actions .button {
  background: #23495b;
  color: #dcebef;
  border-color: #4c7180;
}
[data-theme="dark"] .notice,
[data-theme="dark"] .tip,
[data-theme="dark"] .storage-strip {
  background: #203f4b;
  border-color: #426672;
  color: #d1e5e9;
}
[data-theme="dark"] .search-results button {
  color: #e3eff4;
}
[data-theme="dark"] .month-card button {
  background: #274e5b;
  color: #d3e6ee;
}
[data-theme="dark"] .legend-row .amount {
  color: #c6e2eb;
}
[data-theme="dark"] .badge.muted {
  background: #345366;
  color: #d6e5ec;
}
[data-theme="dark"] .meter {
  color: #70d5c9;
}
@media (max-width: 980px) {
  .dashboard-extras {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding-bottom: 30px;
  }
  .nav-links {
    margin-bottom: 15px;
  }
}
@media (max-width: 760px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(66px + env(safe-area-inset-top));
  }
  main {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 8px max(5px, env(safe-area-inset-left))
      calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px #17394d10;
  }
  .bottom-nav a,
  .bottom-nav button {
    background: none;
    border: 0;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #516f80;
    font-size: 10px;
    padding: 5px 0;
    min-height: 48px;
    line-height: 1.4;
  }
  .bottom-nav [aria-current="page"] {
    color: #087d77;
    font-weight: 650;
  }
  .bottom-nav button:nth-child(3) {
    color: #087d77;
  }
  .bottom-nav button:nth-child(3) .icon {
    background: #168a82;
    color: white;
    padding: 5px;
    width: 31px;
    height: 31px;
    border-radius: 8px;
  }
  .sidebar {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: 100px;
    z-index: 50;
  }
  .layout.menu-open .menu-scrim {
    z-index: 49;
  }
  .button,
  .icon-button {
    min-height: 44px;
  }
  .button.small {
    min-height: 40px;
  }
  .field input,
  .field select {
    min-height: 46px;
  }
  .quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .quick-actions .button {
    min-width: 0;
    font-size: 11px;
    padding: 10px 5px;
  }
  .storage-strip {
    font-size: 11px;
    padding: 13px;
    gap: 10px;
  }
  .storage-strip > span {
    width: 100%;
  }
  .storage-strip .button {
    width: 100%;
  }
  .dashboard-grid .stack {
    min-width: 0;
  }
  .hero-copy {
    width: 100%;
  }
  .hero .hero-copy p {
    max-width: 72%;
  }
  .personal-boat {
    width: 33%;
    height: 100px;
    bottom: 20px;
    right: 12px;
  }
  .hero h2 {
    max-width: 80%;
  }
  .hero-links {
    max-width: 100%;
  }
  .table-wrap {
    overflow: visible;
  }
  .table-wrap table,
  .table-wrap tbody {
    display: block;
    width: 100%;
  }
  .table-wrap thead {
    display: none;
  }
  .table-wrap tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .table-wrap tr:last-child {
    border-bottom: 0;
  }
  .table-wrap td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.6;
  }
  .table-wrap td:first-child {
    grid-column: 1/-1;
  }
  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.7px;
    color: #607b8b;
    margin-bottom: 5px;
  }
  .table-wrap td:first-child::before {
    display: none;
  }
  .table-wrap .row-title {
    font-size: 14px;
  }
  .table-wrap .row-sub {
    font-size: 11px;
  }
  .table-wrap .row-symbol {
    display: grid;
  }
  .table-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .card-head .button.ghost {
    font-size: 11px;
  }
  .stat-note {
    font-size: 11px;
    line-height: 1.6;
  }
  .stat-top {
    font-size: 11px;
  }
  .stat-value {
    font-size: 26px;
  }
  .card-body .subtitle {
    font-size: 12px;
  }
  .overview-panel .meter {
    font-size: 32px;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar label {
    flex: 1;
    min-width: 135px;
    display: grid;
    gap: 6px;
  }
  .toolbar select,
  .toolbar input {
    max-width: 100%;
    width: 100%;
    font-size: 14px;
    min-height: 44px;
  }
  .toolbar .view-toggle {
    width: 100%;
    justify-content: center;
  }
  .view-toggle button {
    min-height: 40px;
  }
  .help-content p,
  .help-content li {
    font-size: 14px;
  }
  .modal-content {
    padding: 20px 17px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .field input[type="checkbox"] {
    min-height: 24px;
  }
  .modal-footer {
    flex-wrap: wrap;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  dialog {
    max-height: calc(
      100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px
    );
  }
  .footer {
    margin-bottom: 15px;
  }
  #toast {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .connection {
    font-size: 10px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading .subtitle {
    font-size: 12px;
  }
  .data-grid {
    grid-template-columns: 1fr;
  }
  .component-card h3 {
    font-size: 15px;
  }
  .component-card p {
    font-size: 13px;
  }
  .component-card .button {
    font-size: 12px;
  }
  .component-card .verification {
    font-size: 11px;
  }
  .empty {
    font-size: 13px;
  }
  .bottom-nav .icon {
    width: 21px;
    height: 21px;
  }
  [data-theme="dark"] .bottom-nav {
    background: #163244;
    border-color: #406174;
  }
  [data-theme="dark"] .bottom-nav a,
  [data-theme="dark"] .bottom-nav button,
  [data-theme="dark"] .table-wrap td::before {
    color: #c9dce6;
  }
  [data-theme="dark"] .bottom-nav [aria-current="page"] {
    color: #69dfd0;
  }
}
/* Text and controls target AA contrast on both surfaces. */
:root {
  --teal: #08776f;
  --muted: #526b79;
}
.subtitle,
.row-sub,
.stat-note,
.cost-label,
.legend-row,
.inline-meta,
.field small,
.footer,
.breadcrumb,
.connection,
.eyebrow,
th,
.table-footer,
.empty,
.year-select {
  color: #526b79;
}
.nav-label {
  color: #9cb6c5;
}
.hero .eyebrow {
  color: #9ec8d1;
}
.hero-meta {
  color: #bdd8e0;
}
.badge.muted {
  color: #526b79;
}
.badge.green {
  color: #24664d;
}
.badge.orange,
.component-card .verification {
  color: #805518;
}
.badge.red {
  color: #983a3a;
}
.badge.blue {
  color: #2d617d;
}
.tip {
  color: #3e6268;
}
.chart text {
  fill: #526b79;
}
.component-card p,
.settings-grid p,
.help-content p,
.help-content li {
  color: #526b79;
}
.overview-panel p {
  color: #526b79;
}
.empty strong {
  color: #345c70;
}
.quick-actions .button {
  color: #365362;
}
.table-wrap td {
  white-space: normal;
}
.checkbox-field label {
  font-size: 13px;
}
[data-theme="dark"] .empty,
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .connection,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .table-footer,
[data-theme="dark"] .overview-panel p {
  color: #bdd1dc;
}
[data-theme="dark"] .chart text {
  fill: #bdd1dc;
}
[data-theme="dark"] .empty strong,
[data-theme="dark"] .tip strong {
  color: #e2edf2;
}
[data-theme="dark"] a,
[data-theme="dark"] .inline-link {
  color: #71dfd1;
}
[data-theme="dark"] .button.primary {
  background: #08776f;
  border-color: #08776f;
  color: white;
}
@media (max-width: 760px) {
  .table-wrap td::before {
    color: #526b79;
  }
}
@media print {
  .bottom-nav,
  .quick-actions,
  .storage-strip {
    display: none !important;
  }
  body {
    padding: 0;
  }
}
.notice,
.toolbar label,
.detail-item dt {
  color: #4d6877;
}
[data-theme="dark"] .notice,
[data-theme="dark"] .toolbar label,
[data-theme="dark"] .detail-item dt,
[data-theme="dark"] .breadcrumb strong {
  color: #c7dce6;
}
