:root {
  --bg: #f07028;
  --bg-deep: #d85a12;
  --ink: #1c241c;
  --muted: #5c675c;
  --line: #cfc6b4;
  --card: #fffaf2;
  --accent: #7a2200;
  --accent-soft: #ffe8d0;
  --accent-blue: #2b4c9b;
  --accent-blue-soft: #dfe7f8;
  --accent-green: #2f6b4f;
  --warn: #8a4b12;
  --tansy: var(--accent-green);
  --adi: #3d5a80;
  --shadow: 0 10px 30px rgba(28, 36, 28, 0.06);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffaa55 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f58a3c 0%, transparent 45%),
    var(--bg);
}

.top .eyebrow {
  color: rgba(255, 250, 240, 0.92);
}

.top h1 {
  color: #fffaf5;
}

.week-head h2 {
  color: #fffaf5;
}

.home-slideshow-meta .quiet {
  color: rgba(255, 250, 240, 0.88);
}

.app {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.about-app {
  width: min(1180px, calc(100% - 2rem));
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 2.9rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.55rem;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fffbf5;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.btn:focus-visible,
.hub-card:focus-visible,
.about-nav a:focus-visible,
.about-tree-link:focus-visible,
.about-tree-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.top-actions .btn.ghost {
  background: rgba(255, 250, 245, 0.12);
  color: #fffaf5;
  border: 1px solid rgba(255, 250, 245, 0.55);
}

.top-actions .btn.ghost:hover {
  background: rgba(255, 250, 245, 0.22);
}

.meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.meter.current-period {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.meter .quiet {
  font-weight: 400;
  color: var(--muted);
}

.meter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.meter h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.meter .big {
  font-family: var(--display);
  font-size: 2.1rem;
  margin: 0;
}

.meter .sub {
  margin: 0.25rem 0 0.6rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.bar {
  height: 0.55rem;
  background: color-mix(in srgb, var(--line) 45%, var(--card));
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.week-head {
  margin-bottom: 0.75rem;
}

.hint {
  color: var(--muted);
  margin: 0.35rem 0 0;
  line-height: 1.5;
  font-size: 1.05rem;
  max-width: 70ch;
}

.week {
  display: grid;
  gap: 0.75rem;
}

.day {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}

.day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.day.past {
  opacity: 0.88;
}

.day-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.7rem;
}

.day-top strong {
  font-size: 1.25rem;
}

.day-top span {
  color: var(--muted);
  font-size: 1.05rem;
}

.providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.provider {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}

.provider.tansy {
  border-top: 3px solid var(--tansy);
}

.provider.adi {
  border-top: 3px solid var(--adi);
}

.provider h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.provider .sum {
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.row label {
  color: var(--muted);
}

.row .suggested {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 4rem;
  text-align: right;
  font-size: 1.15rem;
}

.row input {
  width: 5.5rem;
  font: inherit;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.totals {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.total-card {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.total-card.adi {
  background: #e7eef7;
}

.total-card p {
  margin: 0.25rem 0;
  font-size: 1.1rem;
}

.total-card .label {
  color: var(--muted);
  font-size: 1rem;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(520px, calc(100% - 2rem));
  background: var(--card);
  color: var(--ink);
  font-size: 1.05rem;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(28, 36, 28, 0.35);
}

#settings-form {
  padding: 1.2rem 1.25rem 1.3rem;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0.75rem 0;
  padding: 0.75rem;
}

legend {
  padding: 0 0.3rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.hm,
.names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

label {
  display: grid;
  gap: 0.25rem;
  font-size: 1rem;
}

input,
select {
  font: inherit;
  font-size: 1.1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.meter .providers-line {
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.meter .providers-line .sub {
  margin: 0.25rem 0 0;
}

.meter .period-break {
  margin: 0.2rem 0 0;
}

.quiet {
  color: var(--muted);
  font-size: 1rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.85rem;
}

.hub-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hub-card:hover {
  border-color: var(--accent-blue);
  background: var(--accent-blue-soft);
  box-shadow: 0 0 0 1px var(--accent-blue), var(--shadow);
}

.hub-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
  color: var(--accent-blue);
}

.hub-card p {
  margin: 0.35rem 0 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.panel h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.panel-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

.panel-form.hidden {
  display: none;
}

.panel-form h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1.6rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.65rem;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.data-table .actions {
  text-align: right;
  white-space: nowrap;
}

.btn-sm {
  font-size: 0.95rem;
  padding: 0.45rem 0.85rem;
}

/* All About Jacob */
.about-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: 1.75rem 2.25rem;
  align-items: start;
  margin-top: 0.35rem;
}

.about-nav {
  position: sticky;
  top: 1rem;
  padding: 0.85rem 0.8rem 1rem;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 0.85rem;
  box-shadow: 0 6px 18px rgba(28, 36, 28, 0.04);
}

.about-nav-title {
  margin: 0 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.about-nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 0.4rem 0.5rem;
  border-radius: 0.45rem;
}

.about-nav a:hover {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  text-decoration: none;
}

.about-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.about-tree.depth-0 > .about-tree-item {
  border-radius: 0.5rem;
}

.about-tree.depth-0 > .about-tree-item.has-kids {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  padding: 0.15rem;
  margin-bottom: 0.2rem;
}

.about-tree-item.has-kids > .about-tree-panel {
  padding: 0.15rem 0.2rem 0.35rem 0.35rem;
}

.about-tree-row {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
}

.about-tree-row .about-tree-link {
  flex: 1;
  min-width: 0;
}

.about-tree-toggle {
  appearance: none;
  flex: 0 0 2rem;
  width: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-tree-toggle:hover {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.about-tree-chevron {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  margin-top: -0.12rem;
}

.about-tree-item.is-open > .about-tree-row .about-tree-chevron {
  transform: rotate(45deg);
  margin-top: 0;
}

.about-tree-panel[hidden] {
  display: none;
}

.about-tree.depth-1,
.about-tree.depth-2,
.about-tree.depth-3 {
  margin: 0;
  padding-left: 0.45rem;
  border-left: 2px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.about-tree-link {
  font-size: 0.92rem;
  font-weight: 500;
}

.about-tree.depth-0 > .about-tree-item > .about-tree-link,
.about-tree.depth-0 > .about-tree-item > .about-tree-row > .about-tree-link {
  font-weight: 600;
  font-size: 0.95rem;
}

.about-tree-link.is-ancestor {
  color: var(--accent-blue);
}

.about-tree-link.is-active {
  background: var(--accent-blue-soft);
  font-weight: 600;
  color: var(--accent-blue);
}

.about-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.about-crumbs a {
  color: var(--accent-blue);
  text-decoration: none;
}

.about-crumbs a:hover {
  text-decoration: underline;
}

.about-crumb-sep {
  color: var(--line);
}

.about-child-links {
  margin: 0.5rem 0 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 0.75rem;
  max-width: 42rem;
}

.about-child-label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-child-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.about-child-links a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
}

.about-child-links a:hover {
  text-decoration: underline;
}

.about-ext-links a {
  color: var(--accent-blue);
}

.about-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--display);
  font-size: 1.2rem;
}

/* SuperCare resupply list — matches About Jacob body flow */
.supercare-order {
  margin: 1.25rem 0 0.25rem;
  max-width: 42rem;
}

.supercare-order > h3 {
  margin-top: 0;
}

.supercare-hint {
  font-size: 0.95rem;
  color: var(--muted);
}

.supercare-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 0;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.supercare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
}

.supercare-table thead th {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--card));
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}

.supercare-table thead th.num,
.supercare-table tbody td.num {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.supercare-table tbody td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  vertical-align: middle;
}

.supercare-table tbody tr:last-child td {
  border-bottom: none;
}

.supercare-table tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

.supercare-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 7.5rem;
}

.supercare-item img {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.supercare-item span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.01em;
}

.supercare-item-text {
  padding-left: 0;
}

.about-body .supercare-order,
.about-body .supercare-order p,
.about-body .supercare-order ul {
  max-width: 42rem;
}

@media (max-width: 640px) {
  .supercare-table thead .col-eligible,
  .supercare-table tbody .col-eligible {
    display: none;
  }

  .supercare-item {
    min-width: 0;
  }

  .supercare-item img {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .supercare-item-text {
    padding-left: 0;
  }
}

.about-main {
  min-width: 0;
}

.about-section {
  padding: 0 0 2.15rem;
  margin: 0 0 1.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  scroll-margin-top: 1.25rem;
}

.about-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.about-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.about-section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.25;
}

.about-body {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: none;
}

.about-body > p,
.about-body > ul {
  max-width: 42rem;
}

.about-body p {
  margin: 0 0 0.85rem;
}

.about-body ul {
  margin: 0 0 0.35rem;
  padding-left: 1.2rem;
}

.about-body li {
  margin: 0.4rem 0;
}

.about-body li::marker {
  color: var(--accent);
}

.about-body a {
  color: var(--accent-blue);
}

.about-welcome-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 17.5rem) minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  align-items: start;
}

.about-welcome .about-body {
  max-width: none;
  padding-top: 0.15rem;
}

.about-hero {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.about-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 12%;
}

.about-section-figure {
  margin: 0 0 1rem;
}

.about-image {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.75rem, 1fr));
  gap: 1.15rem 0.95rem;
  margin: 1.5rem 0 0.15rem;
  max-width: none;
}

.about-body .about-gallery {
  max-width: none;
}

.about-gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(28, 36, 28, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (hover: hover) {
  .about-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(28, 36, 28, 0.09);
  }
}

.about-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  background: color-mix(in srgb, var(--line) 30%, var(--card));
}

.about-gallery-item figcaption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.55rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  min-height: 2.6rem;
}

.about-editor {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
  max-width: 42rem;
}

.about-editor label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.about-editor input,
.about-editor textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  width: 100%;
  box-sizing: border-box;
}

.about-editor textarea {
  resize: vertical;
  min-height: 10rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9rem;
}

.about-edit-toggle.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.about-layout.is-edit-mode .about-section-head .about-edit {
  animation: about-edit-in 0.2s ease;
}

@keyframes about-edit-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-meta {
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .about-welcome-grid {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .meters,
  .totals,
  .providers {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr auto;
  }

  .row .suggested {
    grid-column: 2;
  }

  .row input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .form-grid,
  .perm-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-label {
    padding-top: 0;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-nav {
    position: static;
  }

  .about-nav ul {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.12rem;
  }

  .about-welcome-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .about-hero {
    max-width: 16.5rem;
    margin: 0 auto;
  }

  .about-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.7rem;
  }

  .about-gallery-item figcaption {
    font-size: 0.78rem;
    min-height: 2.4rem;
  }
}

@media (min-width: 1100px) {
  .about-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Login */
.login-page {
  max-width: 52rem;
  padding-top: 2.5rem;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: 1.75rem 2rem;
  align-items: start;
}

.login-portrait {
  margin: 0;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.login-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 15%;
}

.login-caption {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.login-caption strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

.login-form-wrap {
  min-width: 0;
  padding-top: 0.15rem;
}

.login-form-wrap #settings-form {
  padding: 0;
}

.login-fields {
  grid-template-columns: 1fr;
}

.login-error {
  color: var(--warn);
  margin: 0 0 0.75rem;
}

@media (max-width: 640px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .login-portrait {
    max-width: 14rem;
    margin: 0 auto;
  }
}

/* Home hub slideshow */
.home-slideshow {
  margin-top: 1.75rem;
}

.home-slideshow-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.home-slideshow-track {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 400px;
  background: var(--card);
}

.home-slideshow-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
}

.home-slideshow-slide[hidden] {
  display: none;
}

.home-slideshow-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.home-slideshow-prev,
.home-slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(28, 36, 28, 0.08);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.home-slideshow-prev {
  left: 0.65rem;
}

.home-slideshow-next {
  right: 0.65rem;
}

.home-slideshow-prev:hover,
.home-slideshow-next:hover,
.home-slideshow-prev:focus-visible,
.home-slideshow-next:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.home-slideshow-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.home-slideshow-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.home-slideshow-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, var(--line));
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.home-slideshow-dot[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.home-slideshow-dot:hover,
.home-slideshow-dot:focus-visible {
  background: color-mix(in srgb, var(--accent) 70%, var(--line));
  outline: none;
}

.home-slideshow-counter {
  margin: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .home-slideshow-track {
    aspect-ratio: 4 / 3;
    max-height: 280px;
  }

  .home-slideshow-prev,
  .home-slideshow-next {
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
  }

  .home-slideshow-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-slideshow-dot {
    transition: none;
  }
}
