@charset "UTF-8";
:root {
  --gap: 16px;
}

:root, :root[data-theme=minima] {
  --bg: #fdf6e8;
  --surface: #fffdf7;
  --surface-alt: #f7eed8;
  --header-bg: rgba(253, 246, 232, 0.94);
  --input-bg: #fffdf7;
  --text: #3a2f1d;
  --muted: #6f5f45;
  --line: #e2d3b0;
  --border-control: #8f7a4d;
  --accent: #b45309;
  --accent-strong: #92400e;
  --accent-text: #fffdf7;
  --in: #3f6a0a;
  --out: #b91c1c;
  --out-bg: #fef2f2;
  --font-body: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --font-display: Georgia, "Times New Roman", serif;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 2px 6px rgba(120, 95, 50, 0.12);
}

:root[data-theme=y2k] {
  --bg: #008a8a;
  --surface: #ffffff;
  --surface-alt: #dfdfdf;
  --header-bg: linear-gradient(90deg, #000080, #0a5fa8);
  --input-bg: #ffffff;
  --text: #000000;
  --muted: #444444;
  --line: #808080;
  --border-control: #808080;
  --accent: #0000ff;
  --accent-strong: #000080;
  --accent-text: #ffffff;
  --in: #004d00;
  --out: #8f0000;
  --out-bg: #ffe4e4;
  --font-body: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  --font-display: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  --radius: 0;
  --radius-sm: 0;
  --shadow:
    inset -1px -1px 0 #0a0a0a,
    inset 1px 1px 0 #ffffff,
    inset -2px -2px 0 #808080,
    inset 2px 2px 0 #dfdfdf;
}
:root[data-theme=y2k] .site-header {
  backdrop-filter: none;
}
:root[data-theme=y2k] .site-brand, :root[data-theme=y2k] .site-brand:hover, :root[data-theme=y2k] .nav-link, :root[data-theme=y2k] .nav-account .muted {
  color: #ffffff;
}
:root[data-theme=y2k] .nav-link[aria-current=page] {
  background: #c0c0c0;
  color: #000000;
  border-bottom-color: transparent;
}
:root[data-theme=y2k] .nav-link:hover {
  background: #c0c0c0;
  color: #000000;
}
:root[data-theme=y2k] .nav-link:focus-visible {
  outline-color: #ffffff;
}
:root[data-theme=y2k] .page, :root[data-theme=y2k] .page-narrow {
  margin-top: 16px;
  margin-bottom: 16px;
  background: #c0c0c0;
  border: 1px solid #0a0a0a;
  box-shadow: var(--shadow);
}
:root[data-theme=y2k] .site-footer {
  color: #000000;
}
:root[data-theme=y2k] .site-footer a {
  color: #000000;
}

:root[data-theme=dark] {
  --bg: #0b1020;
  --surface: #131d38;
  --surface-alt: #1c2a50;
  --header-bg: rgba(11, 16, 32, 0.94);
  --input-bg: #0e1732;
  --text: #e8f0ff;
  --muted: #93a6cc;
  --line: #2a3d6e;
  --border-control: #5a74b0;
  --accent: #5ad1ff;
  --accent-strong: #8ae0ff;
  --accent-text: #06182b;
  --in: #7bdc8b;
  --out: #ff7b7b;
  --out-bg: rgba(255, 123, 123, 0.1);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Courier New", Courier, monospace;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 0 0 1px rgba(90, 209, 255, 0.14);
}
:root[data-theme=dark] h1 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 0.9375rem/1.55 var(--font-body);
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
}

p {
  margin: 0 0 12px;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.1rem;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.in {
  color: var(--in);
}

.out {
  color: var(--out);
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-narrow {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

@media (max-width: 768px) {
  .page, .page-narrow {
    padding-left: 12px;
    padding-right: 12px;
  }
}
.row {
  display: flex;
  gap: var(--gap);
  align-items: center;
  flex-wrap: wrap;
}

.row-between {
  justify-content: space-between;
}

.row-end {
  justify-content: flex-end;
}

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

.page-title {
  margin: 0;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.section-gap {
  margin-top: 32px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.modal-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

main:focus {
  outline: none;
}

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

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-header .card-title {
  margin: 0;
}

.field-hint {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.field > label.checkbox, .checkbox {
  display: inline-flex;
  font-weight: 400;
  margin-bottom: 0;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  min-height: 28px;
}
.field > label.checkbox input, .checkbox input {
  width: 1.25rem;
  height: 1.25rem;
}

input[type=checkbox] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.small {
  font-size: 0.875rem;
}

input[readonly] {
  background: var(--surface-alt);
  cursor: default;
}

@media (max-width: 768px) {
  .checkbox {
    min-height: 44px;
  }
}
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li {
  padding: 4px 0;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--gap);
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--accent-text);
  background: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  color: var(--accent-text);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-danger {
  color: var(--out);
}
.btn-danger:hover:not(:disabled) {
  color: var(--accent-text);
  background: var(--out);
  border-color: var(--out);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }
}
.field {
  margin-bottom: 16px;
}

.field > label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent);
}

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input, select, textarea {
  font: inherit;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--input-bg);
  color: var(--text);
  width: 100%;
}

.field-error {
  margin: 4px 0 0;
  color: var(--out);
  font-size: 0.8rem;
}

.alert {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--out);
  background: var(--out-bg);
  color: var(--out);
  margin-bottom: var(--gap);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.table th, .table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
}

.table thead {
  background: var(--surface-alt);
}

.table th.num, .table td.num {
  text-align: right;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-alt);
}

.table tr.clickable {
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  vertical-align: middle;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  flex: none;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text);
}
.tab:focus-visible {
  outline-offset: -2px;
}
.tab[aria-selected=true] {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

.tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  background: var(--surface-alt);
  border-radius: 999px;
}

.pie-wrap {
  max-width: 22rem;
  margin: 0 auto;
}

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
  background-image: linear-gradient(var(--surface), var(--surface));
  color: var(--text);
  box-shadow: var(--shadow);
  width: min(32rem, 100vw - 2rem);
  padding: var(--gap);
}

.dialog-actions {
  margin-top: var(--gap);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.years-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .years-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
.carousel {
  --year-card-h: 10rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.carousel-track {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
  max-height: var(--year-card-h);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track > .card {
  flex: none;
  height: var(--year-card-h);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.carousel-track > .card .year-title {
  font-size: 2.75rem;
  line-height: 1;
  margin: 0;
}
.carousel-track > .card {
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .carousel {
    --year-card-h: 8.5rem;
    flex-direction: row;
    align-items: center;
  }
  .carousel-track {
    flex: 1;
    flex-direction: row;
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  .carousel-track > .card {
    flex: 0 0 100%;
  }
}
.carousel-btn {
  flex: none;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem 0.75rem;
}

@media (max-width: 768px) {
  .carousel-btn {
    font-size: 1.5rem;
  }
}
.balances {
  margin-top: var(--gap);
}
.balances .btn-link {
  margin-top: 8px;
}

.balance-row {
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.year-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 24px;
  align-items: start;
  margin-top: 32px;
}

.tabs-pill {
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 0;
}
.tabs-pill .tab {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.tabs-pill .tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tabs-pill .tab[aria-selected=true] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.section-row {
  margin: -6px 0 6px;
}
.section-row .section-title, .section-row .tabs {
  margin: 0;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 16px;
  text-align: center;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.empty-body {
  margin: 0 auto 16px;
  max-width: 380px;
  color: var(--muted);
  font-size: 0.88rem;
}

textarea {
  resize: vertical;
  min-height: 4.5em;
  line-height: 1.4;
}

.note-cell {
  white-space: pre-line;
}

.pager {
  margin: 12px 0;
}

.btn-link {
  padding: 0;
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.btn-link:hover {
  text-decoration: underline;
}

.year-card .weave {
  position: absolute;
  inset: 0 0 auto 0;
  height: 12px;
  background: linear-gradient(135deg, var(--accent) 25%, transparent 25%) -6px 0/12px 12px, linear-gradient(225deg, var(--accent) 25%, transparent 25%) -6px 0/12px 12px, linear-gradient(315deg, var(--accent) 25%, transparent 25%) 0 0/12px 12px, linear-gradient(45deg, var(--accent) 25%, transparent 25%) 0 0/12px 12px;
  background-color: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.year-card.past .weave, .year-card.future .weave {
  opacity: 0.45;
}

.year-pasture, .year-prints {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.year-pasture {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.year-pasture.past, .year-pasture.future {
  color: var(--muted);
  font-weight: 400;
}

.year-prints {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rate-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-bottom: 8px;
}
.rate-row .field-error {
  flex-basis: 100%;
}

.rate-label {
  flex: 0 1 15rem;
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
}

label.rate-label:not(.checkbox) {
  padding-left: 28px;
}

.rate-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rate-input input {
  width: 5rem;
}
.rate-input input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tax-preview {
  margin: -4px 0 16px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tax-preview li {
  padding: 2px 0;
  font-size: 0.9rem;
}

.field-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 24px;
  margin-bottom: 16px;
}
.field-pair .field {
  margin-bottom: 0;
}
.field-pair .checkbox {
  min-height: 0;
  padding-block: 9px;
}

.row-check {
  width: auto;
  margin: 0;
}

.chart-summary {
  margin-top: 12px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .accounts-table thead {
    display: none;
  }
  .accounts-table tbody, .accounts-table tr, .accounts-table td {
    display: block;
  }
  .accounts-table tr {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 8px 12px;
    align-items: end;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .accounts-table td {
    padding: 0;
    border: 0;
  }
  .accounts-table td:first-child {
    grid-column: 1/-1;
  }
  .accounts-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
  }
  .accounts-table td input {
    width: 100%;
  }
  .accounts-table td:last-child {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}
.portfolio {
  margin-bottom: 24px;
}

.stat-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}
.stat-hero dt {
  font-size: 0.875rem;
  color: var(--muted);
}
.stat-hero dd {
  margin: 2px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.stat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stat-grid dt {
  font-size: 0.8rem;
  color: var(--muted);
}
.stat-grid dd {
  margin: 2px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}

.account-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 2px 8px;
}

@media (min-width: 769px) {
  .account-title {
    min-height: 3rem;
  }
}
.account-title .badge {
  flex: none;
}

.holdings-table {
  margin-top: 16px;
}
.holdings-table .holding-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.holdings-table td {
  white-space: normal;
}

.holdings-table td .badge {
  margin-left: 4px;
}

.holdings-table td.phone-only, .holdings-table .phone-btn {
  display: none;
}

.holdings-table .holding-actions {
  align-items: center;
}

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

.more-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: 4px;
  list-style: none;
  min-width: 9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.more-list li {
  display: block;
}
.more-list .btn-link {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
}
.more-list .btn-link:disabled {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .holdings-table thead {
    display: none;
  }
  .holdings-table tbody, .holdings-table tr, .holdings-table td {
    display: block;
  }
  .holdings-table tr {
    padding: 12px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
  }
  .holdings-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
    text-align: right;
  }
  .holdings-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: left;
  }
  .holdings-table td:first-child {
    display: block;
    text-align: left;
    font-size: 1.05rem;
  }
  .holdings-table td:first-child::before {
    content: none;
  }
  .holdings-table .holding-actions {
    justify-content: flex-start;
    padding-top: 8px;
  }
  .holdings-table .phone-btn {
    display: inline-block;
  }
  .holdings-table td.detail {
    display: none;
  }
  .holdings-table tr.is-open td.detail {
    display: flex;
  }
  .holdings-table .more-list {
    right: auto;
    left: 0;
  }
  .stat-grid {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
  }
  .stat-hero {
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .stat-hero > :first-child {
    grid-column: 1/-1;
  }
}
.theme-selector {
  position: relative;
  flex: none;
}

.theme-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: none;
  min-width: 11rem;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.theme-dropdown.show {
  display: block;
}

.theme-option {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.87rem;
  text-align: left;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.theme-option:hover {
  background: var(--surface-alt);
}
.theme-option.active {
  color: var(--accent);
  font-weight: 600;
}
.theme-option.active::after {
  content: "✓";
  margin-left: auto;
}

.theme-swatch {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: 1180px;
  min-height: 60px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 10px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-link:hover {
  background: var(--surface-alt);
}

.nav-link[aria-current=page] {
  color: var(--accent);
  font-weight: 600;
}

.nav-account .muted {
  padding: 0 8px;
  font-size: 0.85rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .nav-account .muted {
    display: none;
  }
  .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
  background: var(--surface);
  padding: 0.5rem;
  z-index: 10;
}

.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--gap);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
.site-footer p {
  margin: 0.25rem 0;
}

.auth-wrap {
  padding-top: 2rem;
}

.auth-logo {
  font-size: 2.75rem;
  line-height: 1;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-brand {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.auth-title {
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.75rem;
  height: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
}
.password-toggle:hover {
  color: var(--text);
}

input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.check-hit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 32px;
  min-height: 32px;
  cursor: pointer;
}
.check-hit input {
  margin: 0;
}
.check-hit .check-text {
  display: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.btn-link {
  min-height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 768px) {
  .site-brand, .theme-toggle, .back-link, .btn-link, .tab, .checkbox, .field > label.checkbox, .field-pair .checkbox {
    min-height: 44px;
  }
  .tab {
    min-width: 44px;
    justify-content: center;
  }
  .btn-link {
    display: inline-flex;
    align-items: center;
  }
  .theme-toggle {
    min-width: 44px;
    justify-content: center;
  }
  .theme-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .site-nav > .btn {
    min-width: 44px;
  }
  input:not([type=checkbox]):not([type=radio]), select {
    min-height: 44px;
  }
  .check-hit {
    min-width: 44px;
    min-height: 44px;
  }
  .check-hit .check-text {
    display: inline;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .tabs-scroll {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
  .site-header {
    position: static;
  }
}
