.page--tracker .section--tracker {
  padding: 34px 0 72px;
}

.page--tracker .card {
  overflow: visible;
}

.page--tracker .card::before {
  border-radius: inherit;
}

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

.tracker-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 680;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.03em;
}

.tracker-sub {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 72ch;
}

.tracker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.action-with-help {
  display: flex;
  align-items: center;
  gap: 8px;
}

.head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help {
  appearance: none;
  border: 1px solid rgba(246, 242, 234, 0.14);
  background: rgba(246, 242, 234, 0.03);
  color: rgba(246, 242, 234, 0.82);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  cursor: help;
  position: relative;
  user-select: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.help:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 242, 234, 0.26);
  background: rgba(246, 242, 234, 0.06);
}

.help:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 111, 120, 0.14);
}

.help::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(246, 242, 234, 0.14);
  background: rgba(10, 16, 15, 0.92);
  box-shadow: var(--shadow2);
  color: rgba(246, 242, 234, 0.92);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 1000;
}

.help::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 16, 15, 0.92);
  border-left: 1px solid rgba(246, 242, 234, 0.14);
  border-top: 1px solid rgba(246, 242, 234, 0.14);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 1001;
}

.help:hover::after,
.help:focus-visible::after,
.help.is-open::after,
.help:hover::before,
.help:focus-visible::before,
.help.is-open::before {
  opacity: 1;
}

.help:hover::after,
.help:focus-visible::after,
.help.is-open::after {
  transform: translateX(-50%) translateY(0);
}

.tracker-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 14px;
  align-items: start;
}

.tracker-aside {
  display: grid;
  gap: 14px;
}

.tracker-main {
  display: grid;
  gap: 14px;
}

.tracker-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tracker-card__title {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(243, 233, 221, 0.92);
}

.tracker-card__sub {
  margin-top: 8px;
  color: var(--muted2);
  font-size: 13px;
  line-height: 1.45;
}

.tracker-note {
  margin-top: 12px;
  color: var(--muted2);
  line-height: 1.55;
  font-size: 13px;
}

.tracker-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.tmetric {
  border-radius: 16px;
  border: 1px solid rgba(246, 242, 234, 0.12);
  background: rgba(246, 242, 234, 0.02);
  padding: 10px 12px;
}

.tmetric__k {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(246, 242, 234, 0.72);
}

.tmetric__v {
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: rgba(246, 242, 234, 0.96);
}

.filters,
.settings {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.settings__title {
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(169, 209, 142, 0.9);
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.72);
}

.field__input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(246, 242, 234, 0.14);
  background: rgba(10, 16, 15, 0.42);
  color: rgba(246, 242, 234, 0.92);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.field__input::placeholder {
  color: rgba(246, 242, 234, 0.45);
}

.field__input:focus-visible {
  outline: none;
  border-color: rgba(31, 111, 120, 0.8);
  background: rgba(10, 16, 15, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 111, 120, 0.14);
}

.field__input--area {
  resize: vertical;
  min-height: 98px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.col-3 {
  grid-column: span 3;
}
.col-4 {
  grid-column: span 4;
}
.col-6 {
  grid-column: span 6;
}
.col-8 {
  grid-column: span 8;
}
.col-12 {
  grid-column: span 12;
}

.details {
  margin-top: 12px;
  border-radius: var(--r);
  border: 1px solid rgba(246, 242, 234, 0.12);
  background: rgba(246, 242, 234, 0.01);
  padding: 10px 12px 12px;
}

.details__summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 233, 221, 0.9);
  list-style: none;
}

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

.details__summary::after {
  content: "▾";
  float: right;
  color: rgba(246, 242, 234, 0.55);
}

details[open] > .details__summary::after {
  content: "▴";
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.table-wrap {
  border-radius: var(--r);
  border: 1px solid rgba(246, 242, 234, 0.12);
  background: rgba(10, 16, 15, 0.25);
  overflow: auto;
  max-height: 520px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(10, 16, 15, 0.92);
  border-bottom: 1px solid rgba(246, 242, 234, 0.12);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(246, 242, 234, 0.72);
  text-align: left;
  padding: 12px 12px;
  white-space: nowrap;
}

.data-table tbody td {
  border-bottom: 1px solid rgba(246, 242, 234, 0.08);
  padding: 11px 12px;
  font-size: 13px;
  color: rgba(246, 242, 234, 0.9);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: rgba(246, 242, 234, 0.04);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 234, 0.12);
  background: rgba(246, 242, 234, 0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill--scale {
  border-color: rgba(169, 209, 142, 0.28);
  color: rgba(169, 209, 142, 0.9);
}

.pill--kill {
  border-color: rgba(199, 123, 63, 0.28);
  color: rgba(199, 123, 63, 0.92);
}

.pill--keep {
  border-color: rgba(31, 111, 120, 0.36);
  color: rgba(246, 242, 234, 0.9);
}

.actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  appearance: none;
  border: 1px solid rgba(246, 242, 234, 0.12);
  background: rgba(246, 242, 234, 0.02);
  color: rgba(246, 242, 234, 0.86);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 242, 234, 0.22);
  background: rgba(246, 242, 234, 0.05);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 111, 120, 0.14);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(246, 242, 234, 0.14);
  background: rgba(10, 16, 15, 0.86);
  color: rgba(246, 242, 234, 0.92);
  box-shadow: var(--shadow2);
  transition: opacity 220ms ease, transform 220ms ease;
  max-width: min(780px, calc(100vw - 28px));
  text-align: center;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .tracker-layout {
    grid-template-columns: 1fr;
  }

  .tracker-actions {
    justify-content: flex-start;
  }

  .col-3,
  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }
}
