/* Styles for the analytics area: the site dashboard (public/static/app/analytics.js),
   goals and share tabs, share pages, site card stats (src/routes/analytics.ts).
   Linked on every page by src/layout.ts, after site.css. Uses the tokens there;
   the dashboard is adapted from makerhandle public/static/app-stats.css. */

.dash {
  /* Bars behind breakdown rows: the accent at low strength, so row text keeps
     its full contrast (--text on the bar stays above 11:1 in both themes). */
  --dash-bar: color-mix(in srgb, var(--accent) 13%, transparent);
  --dash-bar-hover: color-mix(in srgb, var(--accent) 24%, transparent);
  --dash-good: var(--chip-ok-fg);
  --dash-bad: var(--danger-fg);
  display: grid;
  gap: 16px;
  min-width: 0;
  margin-top: 20px;
  font-variant-numeric: tabular-nums;
}
.dash.is-loading > :not(.dash-bar) {
  opacity: 0.55;
  transition: opacity 0.2s ease 0.12s;
  pointer-events: none;
}
.dash-card {
  min-width: 0;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.dash-ic {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.dash-error {
  padding: 20px;
  color: var(--danger-fg);
}
.dash-unavailable {
  margin: 0;
}
.dash-sub {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.dash-sub .mono {
  font-size: 13px;
}
.dash-notice {
  margin: 16px 0 0;
}

/* ---- top bar ---- */
.dash-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.dash-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-panel);
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.dash-live b {
  color: var(--text);
  font-weight: 700;
}
.dash-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}
.dash-live.on .dash-pulse {
  background: var(--chip-ok-fg);
}
.dash-live.on .dash-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--chip-ok-fg);
  opacity: 0.5;
  animation: dash-pulse 2s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
@keyframes dash-pulse {
  from {
    transform: scale(0.4);
    opacity: 0.55;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
.dash-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-pop {
  position: relative;
}
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--btn-h-md);
  padding: 0 12px;
  border: 1px solid var(--line-control);
  border-radius: var(--btn-radius);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.dash-btn:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
}
.dash-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dash-btn[aria-expanded='true'] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dash-btn .dash-ic {
  color: var(--text-dim);
}
.dash-range {
  min-width: 176px;
}
.dash-range-label {
  flex: 1;
  text-align: left;
}
.dash-icon-btn {
  width: var(--btn-h-md);
  padding: 0;
  justify-content: center;
}

.dash-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 220px;
  padding: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-menu);
  animation: dash-menu 0.14s ease-out;
}
@keyframes dash-menu {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}
.dash-menu-filter {
  left: 0;
  right: auto;
  min-width: 260px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dash-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.dash-menu-item:hover,
.dash-menu-item:focus-visible {
  background: var(--bg-hover);
  outline: none;
  text-decoration: none;
}
.dash-menu-item[aria-checked='true'] {
  font-weight: 700;
}
.dash-menu-item[aria-checked='true'] .dash-ic {
  color: var(--accent);
}
.dash-menu-item[aria-disabled='true'] {
  color: var(--text-faint);
  cursor: not-allowed;
}
.dash-menu-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-menu-hint {
  color: var(--text-faint);
  font-size: 12.5px;
}
.dash-menu-label {
  padding: 8px 10px 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.dash-menu-sep {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}
.dash-menu-empty {
  padding: 10px;
  font-size: 14px;
  color: var(--text-dim);
}
.dash-custom {
  display: grid;
  gap: 8px;
  padding: 0 4px 4px;
}
.dash-custom .dash-menu-label {
  padding: 4px 6px 0;
}
.dash-custom-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.dash-date {
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  font-size: 13.5px;
}
.dash-lock {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.dash-switch {
  appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.dash-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.15s ease;
}
.dash-switch:checked {
  background: var(--accent);
}
.dash-switch:checked::after {
  transform: translateX(14px);
}
.dash-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
}
.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 4px 4px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 13.5px;
}
.dash-chip-dim {
  color: var(--text-dim);
  white-space: nowrap;
}
.dash-chip b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-chip button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.dash-chip button:hover {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--text);
}
.dash-clear {
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- KPIs and chart ---- */
.dash-main {
  overflow: hidden;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.dash-kpi {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 16px 18px 15px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.dash-kpi:last-child {
  border-right: 0;
}
.dash-kpi:hover {
  background: var(--bg-hover);
}
.dash-kpi:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.dash-kpi[aria-selected='true'] {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.dash-kpi[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
.dash-kpi-label {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}
.dash-kpi[aria-selected='true'] .dash-kpi-label {
  color: var(--accent);
}
.dash-kpi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.dash-kpi-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.dash-kpi-sub {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-faint);
}
.dash-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-faint);
}
.dash-delta.good {
  color: var(--dash-good);
}
.dash-delta.bad {
  color: var(--dash-bad);
}

.dash-chart {
  position: relative;
  min-height: 232px;
  padding: 18px 18px 6px;
  outline: none;
}
.dash-chart:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.dash-svg {
  display: block;
  overflow: visible;
  touch-action: pan-y;
}
.dash-gl {
  stroke: var(--line);
  stroke-width: 1;
}
.dash-gl.base {
  stroke: var(--line-strong);
}
.dash-ytick,
.dash-xtick {
  fill: var(--text-faint);
  font-family: var(--sans);
  font-size: 11.5px;
}
.dash-fill-top {
  stop-color: var(--accent);
  stop-opacity: 0.26;
}
.dash-fill-bottom {
  stop-color: var(--accent);
  stop-opacity: 0;
}
.dash-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-tail {
  stroke-dasharray: 3 5;
}
.dash-prev {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 1.75;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  opacity: 0.85;
}
.dash-dot {
  fill: var(--accent);
}
.dash-svg.animate .dash-line:not(.dash-tail) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: dash-draw 0.8s cubic-bezier(0.3, 0.7, 0.2, 1) forwards;
}
.dash-svg.animate .dash-area {
  opacity: 0;
  animation: dash-fade 0.6s ease 0.25s forwards;
}
@keyframes dash-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes dash-fade {
  to {
    opacity: 1;
  }
}
.dash-cross {
  stroke: var(--text-dim);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.dash-hdot {
  fill: var(--accent);
  stroke: var(--bg-panel);
  stroke-width: 2.5;
}
.dash-hdot.prev {
  fill: var(--text-faint);
}
.dash-tip {
  position: absolute;
  top: 8px;
  left: 0;
  z-index: 5;
  display: grid;
  gap: 5px;
  min-width: 170px;
  padding: 10px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-menu);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.dash-tip.show {
  opacity: 1;
}
.dash-tip-when {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.dash-tip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-tip-row span {
  flex: 1;
  white-space: nowrap;
  color: var(--text-dim);
}
.dash-tip-row b {
  font-size: 15px;
}
.dash-tip-row.prev b {
  font-size: 13px;
  color: var(--text-dim);
}
.sw {
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.sw.prev {
  background: repeating-linear-gradient(90deg, var(--text-faint) 0 3px, transparent 3px 5px);
}
.dash-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  padding: 0 18px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.dash-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dash-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 24px 48px;
  text-align: center;
}
.dash-empty-art {
  margin-bottom: 6px;
  color: var(--accent);
  opacity: 0.85;
}
.dash-empty h2 {
  font-size: 19px;
}
.dash-empty p {
  max-width: 46ch;
  font-size: 14.5px;
  color: var(--text-dim);
}
.dash-empty .btn {
  margin-top: 6px;
}

/* ---- breakdown panels ---- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dash-goals {
  grid-column: 1 / -1;
}
.dash-panel {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 16px 18px 14px;
}
.dash-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}
.dash-panel-head h2 {
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.dash-panel-note {
  margin: -4px 0 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.dash-tabs {
  display: flex;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.dash-tabs::-webkit-scrollbar {
  display: none;
}
.dash-tabs button {
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-faint);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.dash-tabs button:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.dash-tabs button[aria-selected='true'] {
  background: var(--bg-active);
  color: var(--text);
}
.dash-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.dash-colhead,
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 52px;
  align-items: center;
  column-gap: 8px;
}
.dash-colhead.goals,
.dash-goals .dash-row {
  grid-template-columns: minmax(0, 1fr) 80px 72px 60px;
}
.dash-colhead {
  padding: 0 10px 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.dash-colhead > :not(:first-child) {
  text-align: right;
}
.dash-colhead .dash-pct {
  font-size: inherit;
}
.dash-rows {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dash-row {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dash-row:disabled {
  cursor: default;
}
.dash-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--w);
  border-radius: 8px;
  background: var(--dash-bar);
  transition: background-color 0.12s ease, width 0.4s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.dash-row:not(:disabled):hover .dash-bar-fill,
.dash-row.active .dash-bar-fill {
  background: var(--dash-bar-hover);
}
.dash-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.dash-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.dash-name .dash-ic {
  color: var(--text-dim);
}
.dash-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-row:not(:disabled):hover .dash-label {
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-underline-offset: 3px;
}
.dash-goal-match {
  overflow: hidden;
  flex-shrink: 1;
  min-width: 0;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-hover);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-flag {
  flex-shrink: 0;
  width: 16px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}
.dash-letter {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}
.dash-val {
  font-weight: 650;
  text-align: right;
}
.dash-pct {
  font-size: 13px;
  text-align: right;
  color: var(--text-faint);
}
.dash-none {
  margin: auto 0;
  padding: 18px 10px;
  font-size: 14px;
  text-align: center;
  color: var(--text-faint);
}
.dash-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  text-align: center;
  color: var(--text-faint);
}

/* ---- skeleton (server-rendered, so nothing jumps when data arrives) ---- */
.sk {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-hover), var(--bg-active), var(--bg-hover));
  background-size: 200% 100%;
  animation: dash-shimmer 1.4s ease infinite;
}
.sk-sm {
  width: 60%;
  height: 11px;
  margin-bottom: 10px;
}
.sk-lg {
  width: 50%;
  height: 26px;
}
.sk-row {
  height: 30px;
  margin-top: 6px;
}
.sk-chart {
  height: 210px;
}
@keyframes dash-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .dash-kpi {
    padding-inline: 14px;
  }
  .dash-kpi-value {
    font-size: 23px;
  }
}
@media (max-width: 960px) {
  .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dash-kpi:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .dash-kpi:nth-child(3) {
    border-right: 0;
  }
}
@media (max-width: 720px) {
  .dash {
    gap: 14px;
    margin-top: 16px;
  }
  .dash-bar-left {
    width: 100%;
  }
  .dash-controls {
    width: 100%;
  }
  .dash-controls > .dash-pop:nth-child(2) {
    flex: 1;
  }
  .dash-range {
    width: 100%;
    min-width: 0;
  }
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-kpi {
    gap: 3px;
    padding: 12px 14px 11px;
    border-bottom: 1px solid var(--line);
  }
  .dash-kpi:nth-child(3) {
    border-right: 1px solid var(--line);
  }
  .dash-kpi:nth-child(2n) {
    border-right: 0;
  }
  .dash-kpi:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }
  .dash-kpi[aria-selected='true']::after {
    left: 14px;
    right: 14px;
  }
  .dash-kpi-value {
    font-size: 21px;
  }
  .dash-chart {
    min-height: 200px;
    padding: 14px 10px 4px 6px;
  }
  .dash-legend {
    justify-content: center;
  }
  .dash-panel {
    min-height: 0;
    padding: 14px 12px 10px;
  }
  .dash-colhead {
    padding: 0 8px 6px;
  }
  .dash-row {
    min-height: 40px;
    padding: 0 8px;
  }
  .dash-colhead,
  .dash-row {
    grid-template-columns: minmax(0, 1fr) 56px 46px;
  }
  .dash-colhead.goals,
  .dash-goals .dash-row {
    grid-template-columns: minmax(0, 1fr) 70px 50px;
  }
  .dash-hide-sm,
  .dash-goal-match {
    display: none;
  }
  .dash-privacy {
    align-items: flex-start;
    font-size: 12px;
    text-align: left;
  }
  .dash-menu {
    max-width: calc(100vw - 32px);
  }
  .dash-menu-range {
    left: 0;
    right: auto;
  }
}

/* ---- site cards in /app ---- */
.site-card-stats {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}
.scs-num {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.scs-label {
  font-size: 12.5px;
  color: var(--text-faint);
}
.site-card-stats.is-empty {
  align-items: center;
}
.spark {
  flex-shrink: 0;
  overflow: visible;
}
.spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.spark-area {
  fill: var(--accent-soft);
  stroke: none;
}

/* ---- goals tab ---- */
.goal-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.goal-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.goal-item:first-child {
  border-top: 0;
}
.goal-kind {
  min-width: 52px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-dim);
}
.goal-name {
  font-weight: 600;
}
.goal-match {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.goal-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
}
.goal-empty .empty-mark {
  flex-shrink: 0;
}
.goal-kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.goal-kinds legend {
  margin-bottom: 8px;
  padding: 0;
}
.goal-kind-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-control);
  border-radius: var(--radius);
  background: var(--bg-input);
  cursor: pointer;
}
.goal-kind-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.goal-kind-option input {
  margin-top: 4px;
  accent-color: var(--accent);
}
.goal-kind-option > span {
  display: grid;
  gap: 2px;
}
@media (max-width: 480px) {
  .goal-kinds {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- share pages ---- */
.share-section {
  padding-block: 32px 56px;
}
.share-container {
  max-width: 1240px;
}
.share-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.share-head h1 {
  font-size: 28px;
}
.share-head .eyebrow {
  margin-bottom: 4px;
}
.share-logo {
  flex-shrink: 0;
  max-width: 160px;
  height: 44px;
  object-fit: contain;
}
/* White label without a logo: the owner's name in the logo's place. */
.share-brand {
  flex-shrink: 0;
  max-width: 220px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
/* White-label footer: no link columns, just the owner's name and the theme toggle. */
.wl-footer .footer-bottom {
  margin-top: 0;
  border-top: 0;
}
.share-domain {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);
}
@media (max-width: 720px) {
  .share-section {
    padding-block: 20px 40px;
  }
  .share-head h1 {
    font-size: 23px;
  }
}
