:root {
  --canvas: #f3f5f4;
  --card: #fff;
  --card-2: #f7f9f8;
  --fill-hover: #eef2ef;

  --border: #e2e7e3;
  --border-row: #edf1ee;
  --border-control: #d8dfda;
  --border-strong: #b9c3bd;

  --ink: #151c17;
  --ink-2: #3f4a43;
  --ink-3: #5b6862;
  --muted: #6f7a74;
  --disabled: #a9b2ac;

  --green: #079c2a;
  --green-dark: #05781f;
  --green-text: #067a21;
  --green-bg: #e6f6ea;
  --green-border: #c9e8d2;

  --red: #c4331a;
  --red-text: #a52912;
  --red-bg: #fdeeea;
  --red-border: #f2cfc7;

  --blue: #2f5f8a;
  --blue-bg: #e9f0f6;
  --blue-border: #d2dfe8;

  --due: var(--ink);
  --paid: var(--blue);
  --closed: var(--green-text);

  --rail-bg: #fbfcfb;
  --rail-border: #e5e9e6;
  --rail-w: 84px;

  --radius: 14px;
  --radius-sm: 8px;
  --focus: 0 0 0 3px rgb(7 156 42 / 22%);

  --font:
    "Instrument Sans", system-ui, "Segoe UI", helvetica, arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

table {
  border-collapse: collapse;
}

button,
select {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ shell */

.page {
  display: flex;
  min-height: 100dvh;
}

.shell {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 30px 36px 40px calc(var(--rail-w) + 36px);
}

.shell--bare {
  padding: 0;
}

.sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rail-w);
  padding: 22px 0 18px;
  background: var(--rail-bg);
  border-right: 1px solid var(--rail-border);
}

.sidebar__brand {
  display: flex;
  margin-bottom: 26px;
  color: var(--green);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.sidebar__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}

.sidebar__link:hover {
  color: var(--ink);
  text-decoration: none;
}

.sidebar__link[aria-current="page"] {
  color: var(--green);
}

.sidebar__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 6px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
}

.signout {
  position: absolute;
  bottom: 18px;
  left: 0;
  display: flex;
  justify-content: center;
  width: var(--rail-w);
}

.signout__button {
  display: flex;
  padding: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink-3);
}

.signout__button:hover {
  background: var(--fill-hover);
  color: var(--ink);
}

/* ------------------------------------------------------------- page head */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.top__title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.top__sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.kicker {
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.block > .section-title {
  margin-bottom: 14px;
}

.block {
  margin-bottom: 28px;
}

.block__lede {
  max-width: 74ch;
  margin: 6px 0 14px;
  font-size: 14px;
  color: var(--ink-3);
  text-wrap: pretty;
}

.foot {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card--pad {
  padding: 24px 26px;
}

.card--table {
  padding: 4px 20px 20px;
}

.block .card + .card {
  margin-top: 16px;
}

/* ------------------------------------------------------------------ band */

.band {
  margin-bottom: 16px;
}

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

.tile {
  padding: 20px 24px;
}

.figure {
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: nowrap;
}

.figure--alert {
  color: var(--red);
}

.figure--calm {
  color: var(--ink);
}

.tile__value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.tile__value small {
  margin-left: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-3);
}

.chart-card {
  padding: 20px 24px 12px;
}

.chart-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 400;
}

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

.legend__swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend__swatch--underpaid {
  background: var(--red);
}

.legend__swatch--compliant {
  background: var(--green);
}

.legend__swatch--overpaid {
  background: var(--blue);
}

.legend__swatch--pending {
  border: 1.2px dashed var(--disabled);
}

.chart-scroll {
  overflow-x: auto;
}

.chart {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.chart__axis {
  stroke: var(--border-control);
  stroke-width: 1;
}

.chart__bar--underpaid {
  fill: var(--red);
}

.chart__bar--overpaid {
  fill: var(--blue);
}

.chart__bar--compliant {
  fill: var(--green);
}

.chart__pending {
  fill: none;
  stroke: var(--disabled);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.chart__value {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
}

.chart__value--underpaid {
  fill: var(--red);
}

.chart__value--overpaid {
  fill: var(--blue);
}

.chart__label {
  font-family: var(--font);
  font-size: 12.5px;
  fill: var(--muted);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform 80ms ease;
}

.btn:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink-3);
  color: var(--ink);
  text-decoration: none;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--danger {
  background: var(--red);
  color: #fff;
}

.btn--danger:hover {
  background: var(--red-text);
  color: #fff;
  text-decoration: none;
}

.btn--block {
  width: 100%;
  height: 44px;
  justify-content: center;
  font-size: 15px;
}

.btn--icon {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* ----------------------------------------------------------------- forms */

.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
}

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

.input[readonly] {
  border-color: var(--border);
  background: var(--card-2);
  color: var(--muted);
}

.input--reveal {
  padding-right: 42px;
}

select.input {
  padding-right: 32px;
  appearance: none;
  background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2366736b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 10px center / 16px;
}

.label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.hint {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.field__control {
  position: relative;
  display: flex;
}

.field__control .input {
  flex: 1;
  min-width: 0;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  transform: translateY(-50%);
}

.reveal:hover {
  background: var(--fill-hover);
  color: var(--ink);
}

.rules {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.rule::before {
  content: "·";
  width: 13px;
  text-align: center;
}

.rule.is-met {
  color: var(--green-text);
}

.rule.is-met::before {
  content: "✓";
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  max-width: 720px;
}

.grid--tight {
  gap: 18px 24px;
  max-width: 640px;
}

.grid__full {
  grid-column: 1 / -1;
  max-width: 340px;
}

.setting {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-row);
}

.setting:last-child {
  border-bottom: 0;
}

.setting__label {
  flex: none;
  width: 160px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.setting__value {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.toolbar .input {
  width: auto;
  height: 36px;
  font-size: 13.5px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--muted);
}

.search svg {
  position: absolute;
  left: 12px;
  pointer-events: none;
}

.search .input {
  width: 220px;
  padding-left: 34px;
}

.state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.state-chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
  text-decoration: none;
}

.state-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.state-chip--underpaid .state-chip__dot {
  background: var(--red);
}

.state-chip--compliant .state-chip__dot {
  background: var(--green);
}

.state-chip--overpaid .state-chip__dot {
  background: var(--blue);
}

.state-chip--pending .state-chip__dot {
  border: 1.5px solid var(--muted);
}

.state-chip__count {
  color: var(--ink-3);
}

.state-chip--on,
.state-chip--on:hover {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green-text);
}

.state-chip--on .state-chip__count {
  color: inherit;
}

.period {
  position: relative;
  margin-left: auto;
}

.period summary {
  list-style: none;
}

.period summary::-webkit-details-marker {
  display: none;
}

.period[open] summary {
  border-color: var(--ink-3);
}

.period__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 5;
  width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--border-control);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 30px rgb(21 28 23 / 14%);
}

.period__year {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.period__year .btn--icon {
  width: 28px;
  height: 28px;
}

.picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 4px;
}

.picker__cell {
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.picker__cell:hover {
  background: var(--card-2);
}

.picker__cell:disabled {
  background: none;
  color: var(--disabled);
  cursor: default;
}

.picker__cell--in,
.picker__cell--in:hover {
  border-radius: 0;
  background: var(--green-bg);
  color: var(--green-text);
}

.picker__cell--start,
.picker__cell--end {
  background: var(--green);
  color: #fff;
}

.picker__cell--start:hover,
.picker__cell--end:hover {
  background: var(--green-dark);
}

.picker__cell--start {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.picker__cell--end {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.picker__cell--start.picker__cell--end {
  border-radius: var(--radius-sm);
}

.period__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-3);
}

.period__all {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-text);
  cursor: pointer;
}

.period__all:hover {
  text-decoration: underline;
}

.sort {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: inherit;
}

.sort:hover {
  color: var(--ink);
  text-decoration: none;
}

.sort.is-active {
  color: var(--ink);
}

.sort__arrow {
  font-size: 11px;
}

/* ----------------------------------------------------------------- table */

.scroll-x {
  overflow-x: auto;
}

.months-scroll {
  position: relative;
  overflow-x: auto;
}

.months {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.months thead th {
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-align: left;
  white-space: nowrap;
}

.months thead th:first-child,
.months tbody th {
  padding-left: 20px;
}

.months thead th:last-child,
.months tbody td:last-child {
  padding-right: 20px;
}

.months tbody th {
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-row);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.months tbody td {
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-row);
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.months tbody tr:hover {
  background: var(--card-2);
}

.months tbody th a {
  color: var(--ink);
}

.months tbody th a:hover {
  color: var(--green-text);
  text-decoration: none;
}

.num {
  text-align: right !important;
}

.gap {
  font-weight: 600;
}

.months thead th.gap {
  color: var(--ink);
}

.months tbody td.gap--alert {
  color: var(--red);
}

.months tbody td.gap--over {
  color: var(--blue);
}

.months tbody tr.is-pending th,
.months tbody tr.is-pending td {
  color: var(--muted);
  font-weight: 400;
}

.is-empty {
  color: var(--disabled);
}

.settle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 164px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
}

.settle:hover {
  border-color: var(--ink-3);
}

.settle--add {
  min-width: 0;
  border-style: dashed;
  color: var(--ink-2);
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
}

.iconbtn:hover,
.iconbtn:focus-visible {
  background: var(--fill-hover);
  color: var(--ink);
}

.months tbody tr.is-pending .iconbtn {
  color: var(--muted);
}

.cell-sub {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--muted);
}

.settle--danger {
  border-color: var(--red-border);
  background: #fff;
  font-weight: 600;
  color: var(--red-text);
}

.settle--danger:hover,
.settle--danger:focus-visible {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.months .action {
  text-align: right;
}

.table-note {
  max-width: 100ch;
  margin: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- badge */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge--compliant {
  color: var(--green-text);
}

.badge--underpaid {
  color: var(--red);
}

.badge--overpaid {
  color: var(--blue);
}

.badge--pending {
  font-weight: 400;
  color: var(--muted);
}

.badge--pending .badge__dot {
  border: 1.5px solid currentColor;
  background: none;
}

.amt--due {
  font-weight: 600;
  color: var(--due);
}

.amt--paid {
  font-weight: 600;
  color: var(--paid);
}

.amt--closed {
  font-weight: 600;
  color: var(--closed);
}

/* ---------------------------------------------------------------- detail */

.title-band {
  margin-bottom: 24px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.back:hover {
  color: var(--ink);
  text-decoration: none;
}

.title-band__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.title-band h1,
.legal__title {
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.title-band__gap {
  text-align: right;
}


.title-band .figure {
  font-size: 40px;
}

.title-band__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.title-band__head h1 {
  margin-bottom: 0;
}

.back--icon {
  width: 32px;
  height: 32px;
  justify-content: center;
  margin: 0 0 0 -8px;
  border-radius: var(--radius-sm);
}

.back--icon:hover,
.back--icon:focus-visible {
  background: var(--fill-hover);
}

.buckets,
.statements {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.buckets thead th,
.statements thead th {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

.buckets thead th:first-child,
.statements thead th:first-child {
  padding-left: 0;
  text-align: left;
}

.buckets thead th:last-child,
.buckets tbody td:last-child,
.statements thead th:last-child,
.statements tbody td:last-child {
  padding-right: 0;
}

.buckets tbody th {
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--border-row);
  font-weight: 500;
  text-align: left;
}

.buckets tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border-row);
  font-size: 14.5px;
  text-align: right;
  white-space: nowrap;
}

.buckets tbody tr.is-base th,
.buckets tbody tr.is-base td {
  font-weight: 600;
}

.bucket__name {
  font-size: 14.5px;
  color: var(--ink);
}

.bucket__hint {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.buckets tbody tr.is-total th,
.buckets tbody tr.is-total td {
  padding-top: 12px;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-3);
}

.calc {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 10px;
  background: var(--card-2);
}

.calc__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 17px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

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

.calc__eq {
  padding: 0 6px;
  color: var(--muted);
}

.calc__result {
  font-size: 20px;
  font-weight: 700;
}

.calc__result--alert {
  color: var(--red);
}

.calc__note {
  font-size: 14px;
  color: var(--ink-3);
}

.calc__rule {
  height: 1px;
  margin: 12px 0;
  background: var(--border);
}

.statements,
.statements-none {
  margin-top: 22px;
}

.statements-none {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.statements tbody th {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--border-row);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.statements tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-row);
  font-size: 14.5px;
  text-align: right;
  white-space: nowrap;
}

.statements tbody tr:last-child th,
.statements tbody tr:last-child td {
  border-bottom: 0;
}

.statements .aside,
.statements thead th.aside {
  color: var(--muted);
}

.statements tbody tr.extra th {
  white-space: normal;
}

.extra__name {
  font-weight: 500;
}

.extra__act {
  display: inline-flex;
  gap: 6px;
  vertical-align: middle;
}

.extra__act .settle {
  min-width: 0;
}

.statements tfoot th,
.statements tfoot td {
  padding: 12px 14px 0;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}

.statements tfoot th {
  padding-left: 0;
  text-align: left;
}

/* ----------------------------------------------------------- empty/error */

.state {
  display: flex;
  justify-content: center;
  padding: 72px 24px 96px;
}

.state__inner {
  max-width: 560px;
  padding: 40px 44px;
}

.state__glyph {
  display: flex;
  gap: 5px;
  margin-bottom: 28px;
}

.state__glyph span {
  height: 9px;
  border-radius: 3px;
}

.state__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 24px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  font-size: 19px;
  font-weight: 500;
  color: var(--red);
}

.state h1 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.state p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.state__cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: var(--green);
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
}

.state__cta:hover {
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
}

.state__aside {
  max-width: 46ch;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- panels */

.panel {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.panel--error {
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: var(--red-text);
}

.panel--success {
  border: 1px solid var(--green-border);
  background: var(--green-bg);
  color: var(--green-text);
}

.panel--muted {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink-2);
}

.panel + * {
  margin-top: 16px;
}

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.55;
  text-wrap: pretty;
  box-shadow: 0 8px 24px rgb(21 28 23 / 14%);
  animation: toast-in 160ms ease-out;
  pointer-events: auto;
}

.toast__close {
  flex: none;
  display: flex;
  margin: 1px -4px 0 auto;
  padding: 2px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  opacity: 0.6;
}

.toast__close:hover {
  opacity: 1;
}

.toast--success {
  border: 1px solid var(--green-border);
  background: var(--green-bg);
  color: var(--green-text);
}

.toast--error {
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: var(--red-text);
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

/* ----------------------------------------------------------------- modal */

.modal {
  width: min(440px, calc(100vw - 40px));
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}

.modal::backdrop {
  background: rgb(21 28 23 / 40%);
}

.modal--form {
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.modal--form .grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.modal--form .grid__full {
  max-width: none;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal__title {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.modal__close {
  flex: none;
  display: flex;
  margin: -4px -8px 0 0;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
}

.modal__close:hover {
  color: var(--ink);
}

.modal__alert:not(:empty) {
  margin-bottom: 22px;
}

.modal__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal__sub {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------------- payment dialog */

.recap {
  margin: 0 0 20px;
  font-variant-numeric: tabular-nums;
}

.recap__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-row);
  font-size: 14px;
}

.recap__row dt {
  color: var(--ink-3);
}

.recap__row dd {
  margin: 0;
  font-weight: 600;
}

.recap__row--gap {
  border-bottom: 0;
}

.recap__row--gap dt {
  font-weight: 600;
  color: var(--ink);
}

.recap__row--gap dd {
  font-weight: 700;
}

.choices {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.choice + .choice {
  margin-top: 8px;
}

.choice--on {
  border-color: var(--green);
  background: var(--green-bg);
}

.choice__pick {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  font-weight: 500;
  cursor: pointer;
}

.choice__pick input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.choice__value {
  font-weight: 600;
}

.amount {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-right: 10px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  background: #fff;
  font-variant-numeric: tabular-nums;
  cursor: text;
}

.amount:focus-within {
  border-color: var(--green);
  box-shadow: var(--focus);
}

.amount__input {
  width: 8ch;
  min-width: 0;
  height: 100%;
  padding: 0 3px 0 8px;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-align: right;
  color: inherit;
}

.amount__input:focus-visible {
  box-shadow: none;
}

.amount__unit {
  font-weight: 500;
  color: var(--ink-3);
}

.amount--invalid,
.amount--invalid:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(196 51 26 / 16%);
}

.verdict {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.verdict.is-alert {
  color: var(--red-text);
}

@media (width <= 560px) {
  .statements tbody tr.extra td.no-print {
    white-space: normal;
  }

  .extra__act {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* ---------------------------------------------------------- portal cards */

.card--failed {
  border-color: var(--red-border);
  border-left: 3px solid var(--red);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.card__name {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.card__purpose {
  font-size: 13.5px;
  color: var(--ink-3);
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-3);
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card__actions--even {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.card__actions--even .btn {
  width: 100%;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.chip--ok {
  background: var(--green-bg);
  color: var(--green-text);
}

.chip--ko {
  background: var(--red-bg);
  color: var(--red-text);
}

.chip--none {
  background: var(--canvas);
  color: var(--ink-3);
}

.chip--none .chip__dot {
  border: 1.5px solid currentColor;
  background: none;
}

/* ------------------------------------------------------------------ auth */

.auth {
  display: flex;
  flex-direction: column;
}

.auth__body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth__card {
  width: 400px;
  max-width: 100%;
  padding: 32px 32px 28px;
}

.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.auth__brand svg {
  color: var(--green);
}

.auth__brand:hover {
  text-decoration: none;
}

.auth__card h1 {
  margin-bottom: 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.auth__lede {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--ink-3);
}

.auth__field {
  margin-bottom: 16px;
}

.auth__field--last {
  margin-bottom: 24px;
}

.auth__link {
  margin-top: 18px;
  font-size: 14px;
  text-align: center;
}

.auth__link a {
  color: var(--ink-3);
}

.auth__link a:hover {
  color: var(--green-text);
}

.auth__foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 32px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ home */

.home {
  display: flex;
  flex-direction: column;
}

.home__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 40px 72px;
}

.home__title,
.pricing__title {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 1.3rem + 3.4vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.home__title {
  font-size: clamp(2.2rem, 0.4rem + 3.7vw, 3.1rem);
}

.home__lede,
.pricing__lede {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.home__lede {
  max-width: 44ch;
  margin: 0 0 30px;
}

.pricing__lede {
  max-width: 52ch;
  margin: 0 auto;
}

.home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home__actions .btn {
  height: 42px;
  padding: 0 20px;
  font-size: 15px;
}

.sign {
  max-width: 430px;
  padding: 22px 26px 24px;
}

.sign__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.sign__cross {
  display: flex;
  color: var(--green);
}

.sign__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.sign__rows {
  margin: 0;
}

.sign__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-row);
}

.sign__row dt {
  font-size: 13.5px;
  color: var(--ink-3);
}

.sign__row dd {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sign__row--gap {
  padding-bottom: 0;
  border-bottom: 0;
}

.sign__row--gap dd {
  font-size: 24px;
  color: var(--red);
}

.home__ledger {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px 24px;
  scroll-margin-top: 72px;
}

.home__h2,
.pricing__h2 {
  padding: 34px 0 6px;
  border-top: 1px solid var(--border);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pricing__h2 {
  text-align: center;
}

.lgr {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-row);
}

.lgr:last-child {
  border-bottom: 0;
}

.lgr__term {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.lgr__text {
  max-width: 64ch;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- mobile */

@media (width <= 900px) {
  .shell:not(.shell--bare) {
    padding: 20px 16px 100px;
  }

  /* The rail becomes a bottom tab bar. */
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    flex-direction: row;
    width: auto;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rail-border);
    border-right: 0;
  }

  .sidebar__brand {
    display: none;
  }

  .sidebar__nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 4px;
  }

  .sidebar__link {
    flex: 0 1 112px;
    padding: 8px 0 6px;
    border-radius: 12px;
  }

  .sidebar__link[aria-current="page"] {
    background: var(--green-bg);
  }

  .sidebar__link[aria-current="page"]::before {
    display: none;
  }

  .signout {
    inset: 20px 12px auto auto;
    width: auto;
  }

  .toasts {
    bottom: 88px;
  }

  .top {
    align-items: flex-start;
    padding-right: 44px;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .period {
    margin-left: 0;
  }

  .months {
    min-width: 780px;
  }

  .months thead th:first-child,
  .months tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--card);
  }

  .months thead th:first-child {
    background: var(--card-2);
  }

  .buckets {
    min-width: 560px;
  }

  .statements {
    min-width: 520px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .figure {
    font-size: 40px;
  }
}

@media (width <= 560px) {
  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    gap: 8px;
  }

  /* One scrolling line of chips; the mask fades the edge, the padding keeps
     the last chip clear of it once scrolled to the end. */
  .state-chips {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0 -20px;
    padding: 0 60px 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
  }

  .state-chips::-webkit-scrollbar {
    display: none;
  }

  .search {
    flex: 1 1 140px;
  }

  .search .input {
    width: 100%;
  }

  .toolbar__reset,
  #export span {
    display: none;
  }

  .setting {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 14px 16px;
  }

  .setting__label {
    width: 100%;
  }

  .setting__value {
    flex: 1 1 140px;
  }

  #export {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .home__hero,
  .home__ledger {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lgr {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .auth__card {
    padding: 24px 20px;
  }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--green);
  cursor: pointer;
}

.rules {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.rule::before {
  content: "·";
  width: 13px;
  text-align: center;
}

.rule.is-met {
  color: var(--green-dark);
}

.rule.is-met::before {
  content: "✓";
}


/* --------------------------------------------------------------- welcome */

.welcome__skip {
  margin-left: auto;
  font-size: 13.5px;
  color: var(--ink-3);
}

.welcome__body {
  max-width: 732px;
  margin: 0 auto;
  padding: 52px 26px 72px;
}

.welcome h1 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.welcome__lede {
  max-width: 62ch;
  margin: 0 0 32px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.steps {
  --step-gap: 16px;
  --step-pad: 26px;
  --marker: 28px;

  display: grid;
  gap: var(--step-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 22px var(--step-pad) 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.step::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(var(--step-pad) + var(--marker) / 2 - 1px);
  width: 2px;
  height: calc(var(--step-gap) + 2px);
  background: var(--border);
}

.step:last-child::after {
  display: none;
}

.step--done::after {
  background: var(--green);
}

.step--failed {
  border-color: var(--red-border);
}

.step__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.step__marker {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--marker);
  height: var(--marker);
  border: 1.5px solid var(--border-control);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.step--current .step__marker {
  border-color: var(--green);
  color: var(--green-dark);
}

.step--done .step__marker {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.step__title {
  flex: 1 1 200px;
  min-width: 0;
}

.step__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.step__purpose {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.step--later .step__name {
  color: var(--ink-3);
}

.step--later .step__purpose {
  color: var(--muted);
}

.step__verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.step__body {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-row);
}

.step__submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.step__edit > summary {
  display: flex;
  align-items: baseline;
  gap: 8px 24px;
  flex-wrap: wrap;
  border-radius: 4px;
  list-style: none;
  cursor: pointer;
}

.step__edit > summary::-webkit-details-marker {
  display: none;
}

.step__edit > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(7 156 42 / 18%);
}

.step__edit[open] > summary {
  margin-bottom: 20px;
}

.step__fact {
  font-size: 14px;
  font-weight: 500;
}

.step__fact-key {
  margin-right: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.step__toggle {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--green-dark);
}

.step__edit > summary:hover .step__toggle {
  color: var(--green);
  text-decoration: underline;
}

.welcome__done {
  margin-top: 28px;
  padding: 26px 28px 28px;
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  background: var(--green-bg);
}

.welcome__done h2 {
  margin-bottom: 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--green-dark);
}

.welcome__done p {
  max-width: 58ch;
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}


/* ----------------------------------------------------------- site chrome */

.mark {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  color: var(--green);
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
}

.mark::before {
  clip-path: inset(36% 0);
}

.mark::after {
  clip-path: inset(0 36%);
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 0 32px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-head__brand,
.site-foot__wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.site-head__brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.site-head__nav {
  display: flex;
  gap: 24px;
}

.site-head__nav a {
  font-size: 14px;
  color: var(--ink-2);
}

.site-head__nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

.site-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.site-foot {
  margin-top: auto;
  padding: 56px 32px 28px;
  background: var(--ink);
  color: rgb(255 255 255 / 70%);
}

.site-foot a {
  color: rgb(255 255 255 / 78%);
}

.site-foot a:hover {
  color: #fff;
}

.site-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.site-foot__wordmark,
.site-foot__wordmark:hover {
  color: #fff;
  text-decoration: none;
}

.site-foot__wordmark .mark {
  color: var(--green);
}

.site-foot__tagline {
  max-width: 34ch;
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
}

.site-foot__mail {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
}

.site-foot__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-foot__col a {
  font-size: 14px;
}

.site-foot__title {
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgb(255 255 255 / 45%);
}

.site-foot__base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: 12.5px;
  color: rgb(255 255 255 / 45%);
}


/* ----------------------------------------------------------------- legal */

.legal {
  max-width: calc(68ch + 160px);
  padding: 48px 40px 88px;
}

.legal__head {
  margin-bottom: 22px;
}

.legal__meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
}

.legal__article {
  padding: 32px 40px 40px;
}

.legal h2 {
  margin: 32px 0 10px;
  font-size: 17px;
}

.legal p,
.legal li {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.legal p + p,
.legal ul + p {
  margin-top: 12px;
}

.legal ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.legal__facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.legal__facts dt,
.legal__facts dd {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-row);
}

.legal__facts dt {
  padding-right: 28px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.legal__facts dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}

/* --------------------------------------------------------------- pricing */

.pricing {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 40px 88px;
  text-align: center;
}

.plan {
  max-width: 480px;
  margin: 40px auto 0;
  padding: 22px 26px 24px;
  text-align: left;
}

.plan__name {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.plan__unit,
.plan__alt {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.plan__alt {
  margin: 8px 0 0;
}

.plan__rows {
  margin: 18px 0 22px;
}

.plan__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-top: 1px solid var(--border-row);
  font-size: 14px;
}

.plan__row dt {
  flex: none;
  color: var(--ink-3);
}

.plan__row dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  text-wrap: balance;
}

.pricing__section {
  max-width: 760px;
  margin: 56px auto 0;
  text-align: left;
}

.included {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 36px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.included li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.included svg {
  flex: none;
  margin-top: 3px;
  color: var(--green);
}

.faq {
  margin-top: 12px;
}

.faq__item {
  border-bottom: 1px solid var(--border-row);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.faq__q svg {
  flex: none;
  color: var(--muted);
  transition: transform 150ms ease;
}

.faq__item[open] .faq__q svg {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .faq__q svg {
    transition: none;
  }
}

.faq__a {
  max-width: 64ch;
  margin: 0;
  padding: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ------------------------------------------------- public pages, mobile */

@media (width <= 860px) {
  .site-head__nav {
    display: none;
  }

  .home__hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding-bottom: 64px;
  }

  .site-foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-foot__brand {
    grid-column: 1 / -1;
  }

  .included {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (width <= 560px) {
  .site-head,
  .site-foot,
  .legal,
  .pricing {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-head__signin {
    display: none;
  }

  .site-foot__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal__article {
    padding: 22px 18px 26px;
  }

  .legal__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal__facts dt {
    padding: 10px 0 0;
    border-bottom: 0;
  }

  .legal__facts dd {
    padding-top: 2px;
  }

  .plan {
    padding: 20px 20px 22px;
  }

  .welcome__body {
    padding: 32px 16px 56px;
  }

  .welcome h1 {
    font-size: 26px;
  }

  .steps {
    --step-pad: 18px;
  }

  .step {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .step__verdict {
    flex-basis: 100%;
    margin-left: 0;
    padding-left: calc(var(--marker) + 16px);
  }

  .welcome__done {
    padding: 22px 20px 24px;
  }
}

/* ----------------------------------------------------------------- print */

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .no-print {
    display: none !important;
  }

  .page {
    padding: 0;
  }

  .shell {
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 0;
  }

  .card {
    border: 0;
  }

  thead {
    display: table-header-group;
  }

  tr {
    page-break-inside: avoid;
  }
}
