/* ClawHunt v5 — components. Semantic tokens only. */

/* ── buttons ───────────────────────────────────
   Primary buttons carry the "claw": a coral disc with two pincers that close when
   the button is pressed — the brand's one piece of button personality. */

.btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding-inline: 22px;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  transition:
    background-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.btn--primary {
  background: var(--btn);
  color: var(--btn-ink);
}

.btn--primary:hover {
  background: var(--btn-hover);
}

.btn--primary.has-claw {
  padding-left: 7px;
}

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.btn--secondary:hover {
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  background: color-mix(in oklab, var(--surface) 92%, var(--ink) 8%);
}

.btn--quiet {
  background: transparent;
  color: var(--ink);
  padding-inline: 14px;
}

.btn--quiet:hover {
  background: color-mix(in oklab, var(--ink) 7%, transparent);
}

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

.btn--accent:hover {
  background: color-mix(in oklab, var(--accent-ink) 88%, #000 12%);
}

.btn--on-dark {
  background: #f3f6f6;
  color: #07161f;
}

.btn--sm {
  --btn-h: 36px;
  padding-inline: 14px;
  font-size: 0.875rem;
  gap: 8px;
}

.btn--lg {
  --btn-h: 56px;
  padding-inline: 26px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: var(--btn-h);
  padding: 0;
}

.claw {
  --claw-size: 34px;
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--claw-size);
  height: var(--claw-size);
  border-radius: 50%;
  background: var(--brand-grad);
  color: #ffffff;
}

.btn--sm .claw {
  --claw-size: 24px;
}

.btn--lg .claw {
  --claw-size: 42px;
}

.claw svg {
  width: 58%;
  height: 58%;
  overflow: visible;
}

.claw .pincer {
  transform-box: fill-box;
  transition: transform var(--t-med) var(--ease-spring);
}

.claw .pincer--top {
  transform-origin: 0% 100%;
}

.claw .pincer--bottom {
  transform-origin: 0% 0%;
}

.btn:hover .claw .pincer--top,
.btn:focus-visible .claw .pincer--top {
  transform: rotate(-9deg);
}

.btn:hover .claw .pincer--bottom,
.btn:focus-visible .claw .pincer--bottom {
  transform: rotate(9deg);
}

.btn:active .claw .pincer--top,
.btn.is-grab .claw .pincer--top {
  transform: rotate(10deg);
}

.btn:active .claw .pincer--bottom,
.btn.is-grab .claw .pincer--bottom {
  transform: rotate(-10deg);
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: var(--btn-ink) transparent var(--btn-ink) transparent;
  animation: ch-spin 0.8s linear infinite;
}

.btn--secondary.is-loading::after,
.btn--quiet.is-loading::after {
  border-color: var(--ink) transparent var(--ink) transparent;
}

@keyframes ch-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── links ─────────────────────────────────── */

.link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklab, var(--link) 45%, transparent);
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}

.link:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.link--quiet {
  color: inherit;
  text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
}

/* ── chips & status ────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding-inline: 11px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 540;
  line-height: 1;
  white-space: nowrap;
}

.chip--outline {
  background: transparent;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.chip--button {
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.chip--button:hover {
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
}

.chip--button[aria-pressed="true"],
.chip--button.is-active {
  background: var(--ink);
  color: var(--ink-inverse);
  box-shadow: none;
}

.chip__count {
  font-variant-numeric: lining-nums proportional-nums;
  opacity: 0.66;
}

.status {
  --tone: var(--ink-3);
  --tone-soft: var(--surface-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding-inline: 10px 11px;
  border-radius: var(--r-pill);
  background: var(--tone-soft);
  color: color-mix(in oklab, var(--tone) 86%, var(--ink) 14%);
  font-size: 0.78125rem;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
}

.status--open {
  --tone: var(--accent);
  --tone-soft: var(--accent-soft);
}

.status--live::before {
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--tone) 60%, transparent);
  animation: ch-ping 2.2s var(--ease-out) infinite;
}

.status--held {
  --tone: var(--held);
  --tone-soft: var(--held-soft);
}

.status--ok {
  --tone: var(--ok);
  --tone-soft: var(--ok-soft);
}

.status--warn {
  --tone: var(--warn);
  --tone-soft: var(--warn-soft);
}

.status--bad {
  --tone: var(--bad);
  --tone-soft: var(--bad-soft);
}

@keyframes ch-ping {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--tone) 55%, transparent);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  border-radius: var(--r-pill);
  background: var(--accent-ink);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: lining-nums proportional-nums;
}

/* ── form controls ─────────────────────────── */

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

.field__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.field__hint {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.field__error {
  font-size: 0.8125rem;
  color: var(--bad);
  font-weight: 540;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--r-control);
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 0 0 1px transparent inset;
  font-size: 0.9375rem;
  line-height: 1.45;
  transition: box-shadow var(--t-fast), background-color var(--t-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-3);
}

.input:hover,
.textarea:hover,
.select:hover {
  box-shadow: 0 0 0 1px var(--line) inset;
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--focus) inset,
    0 0 0 4px color-mix(in oklab, var(--focus) 18%, transparent);
}

.field.is-invalid .input,
.field.is-invalid .textarea,
.input[aria-invalid="true"] {
  box-shadow: 0 0 0 1px var(--bad) inset;
}

.textarea {
  min-height: 132px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236f8187' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.check {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--ink-2);
  cursor: pointer;
}

.check input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  display: grid;
  place-items: center;
  transition: background-color var(--t-fast), box-shadow var(--t-fast);
}

.check input[type="radio"] {
  border-radius: 50%;
}

.check input:checked {
  background: var(--ink);
  box-shadow: none;
}

.check input:checked::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--ink-inverse);
  border-bottom: 2px solid var(--ink-inverse);
  transform: translateY(-1px) rotate(-45deg);
}

.check input[type="radio"]:checked::after {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--ink-inverse);
  transform: none;
}

.switch {
  appearance: none;
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  position: relative;
  transition: background-color var(--t-med) var(--ease-out);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
  transition: transform var(--t-med) var(--ease-spring);
}

.switch:checked {
  background: var(--current);
}

.switch:checked::after {
  transform: translateX(18px);
}

/* Segmented control — used for filters, billing period, view mode */
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  position: relative;
}

.segmented button {
  position: relative;
  z-index: 1;
  height: 36px;
  padding-inline: 16px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 580;
  color: var(--ink-2);
  transition: color var(--t-med) var(--ease-out);
}

.segmented button[aria-pressed="true"],
.segmented button[aria-selected="true"] {
  color: var(--ink);
}

.segmented__thumb {
  position: absolute;
  z-index: 0;
  top: 4px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(11 34 48 / 0.12), 0 0 0 1px var(--line-soft) inset;
  transition:
    left var(--t-med) var(--ease-out),
    width var(--t-med) var(--ease-out);
}

/* Tabs with a travelling underline */
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs [role="tab"] {
  position: relative;
  padding: 14px 0 15px;
  font-size: 0.9375rem;
  font-weight: 580;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color var(--t-fast);
}

.tabs [role="tab"]:hover {
  color: var(--ink-2);
}

.tabs [role="tab"][aria-selected="true"] {
  color: var(--ink);
}

.tabs__bar {
  position: absolute;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition:
    left var(--t-med) var(--ease-out),
    width var(--t-med) var(--ease-out);
}

/* ── surfaces ──────────────────────────────── */

.panel {
  background: var(--surface);
  border-radius: var(--r-panel);
  padding: clamp(24px, 3.4vw, 48px);
}

.panel--sunken {
  background: var(--surface-2);
}

.panel--line {
  background: transparent;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 24px;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* Big thin numerals — the Bloom lesson: numbers do the talking */
.stat {
  display: grid;
  gap: 10px;
  align-content: start;
}

.stat__value {
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  line-height: 0.92;
  font-weight: 360;
  font-stretch: 86%;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums proportional-nums;
  color: var(--ink);
}

.stat__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.stat__note {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* ── disclosure / FAQ ──────────────────────── */

.qa {
  border-top: 1px solid var(--line);
}

.qa:last-child {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.008em;
}

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

.qa__icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: background-color var(--t-med), box-shadow var(--t-med);
}

.qa__icon::before,
.qa__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 11px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-med);
}

.qa__icon::after {
  transform: rotate(90deg);
}

.qa[open] .qa__icon {
  background: var(--ink);
  box-shadow: none;
}

.qa[open] .qa__icon::before,
.qa[open] .qa__icon::after {
  background: var(--ink-inverse);
}

.qa[open] .qa__icon::after {
  transform: rotate(0deg);
}

.qa__body {
  padding: 0 56px 26px 0;
  color: var(--ink-2);
  max-width: 70ch;
  text-wrap: pretty;
}

.qa__body p + p {
  margin-top: 0.8em;
}

/* ── code & commands ───────────────────────── */

.cmd {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: var(--r-control);
  background: #0b2230;
  color: #d8e6e8;
  font-family: var(--font-code);
  font-size: 0.875rem;
  line-height: 1.5;
}

[data-theme="dark"] .cmd {
  background: #041018;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.cmd code {
  font-size: inherit;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.cmd__prompt {
  color: #6cc6c8;
  user-select: none;
  margin-right: 0.6em;
}

.copy-btn {
  height: 34px;
  padding-inline: 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.08);
  color: #e7eef0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background-color var(--t-fast);
}

.copy-btn:hover {
  background: rgb(255 255 255 / 0.16);
}

.copy-btn.is-done {
  background: #1c6f76;
}

pre.code {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: #0b2230;
  color: #d8e6e8;
  overflow-x: auto;
  line-height: 1.6;
  font-size: 0.8125rem;
}

[data-theme="dark"] pre.code {
  background: #041018;
  box-shadow: 0 0 0 1px var(--line) inset;
}

:not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.86em;
}

/* ── dialog: modal on desktop, sheet on phones ─ */

.dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog[open] {
  display: grid;
  place-items: center;
}

.dialog__panel {
  position: relative;
  width: min(var(--dialog-w, 520px), calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 28px;
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-pop);
}

.dialog--wide {
  --dialog-w: 880px;
}

.dialog--xl {
  --dialog-w: 1120px;
}

.dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
  z-index: 2;
}

.dialog__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.dialog[open] .dialog__panel {
  animation: ch-dialog-in var(--t-slow) var(--ease-out);
}

@keyframes ch-dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@media (max-width: 640px) {
  .dialog[open] {
    place-items: end stretch;
  }

  .dialog__panel {
    width: 100%;
    max-height: 92svh;
    border-radius: 24px 24px 0 0;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
  }

  .dialog__panel::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 4px;
    background: var(--line-strong);
  }

  .dialog[open] .dialog__panel {
    animation-name: ch-sheet-in;
  }

  @keyframes ch-sheet-in {
    from {
      transform: translateY(40px);
      opacity: 0.4;
    }
  }
}

/* ── toast ─────────────────────────────────── */

.toasts {
  position: fixed;
  /* reset the UA popover box: the region is placed, not centred in the viewport */
  inset: auto auto max(20px, env(safe-area-inset-bottom)) 50%;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  transform: translateX(-50%);
  z-index: 900;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--r-pill);
  background: #0b2230;
  color: #eef3f4;
  font-size: 0.9rem;
  font-weight: 520;
  box-shadow: var(--shadow-float);
  animation: ch-toast-in var(--t-slow) var(--ease-out);
}

[data-theme="dark"] .toast {
  background: #e7eef0;
  color: #07161f;
}

.toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.toast--error .toast__dot {
  background: var(--accent);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-med), transform var(--t-med);
}

@keyframes ch-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ── skeletons & empty states ─────────────── */

.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 10px;
  min-height: 14px;
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--surface) 70%, transparent), transparent);
  animation: ch-shimmer 1.6s var(--ease-in-out) infinite;
}

@keyframes ch-shimmer {
  to {
    transform: translateX(100%);
  }
}

.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  padding: 56px 24px;
}

.empty img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin-bottom: 4px;
}

.empty__title {
  font-size: 1.1875rem;
  font-weight: 640;
}

.empty__body {
  color: var(--ink-2);
  max-width: 42ch;
}

/* ── tables ────────────────────────────────── */

.table {
  font-size: 0.9rem;
}

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 0.8125rem;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--t-fast);
}

.table tbody tr:hover {
  background: color-mix(in oklab, var(--surface-2) 60%, transparent);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-scroll {
  overflow-x: auto;
  border-radius: var(--r-card);
  background: var(--surface);
}

/* ── avatar ────────────────────────────────── */

.avatar {
  --size: 36px;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--tint, var(--surface-2));
  /* initials read on the theme surface; on a pastel tint they stay dark in both themes */
  color: var(--ink);
  font-size: calc(var(--size) * 0.4);
  font-weight: 700;
}

.avatar[style*="--tint"] {
  color: #0b2230;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── misc ──────────────────────────────────── */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

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

.crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.6;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.progress {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--current);
  transition: width var(--t-slow) var(--ease-out);
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 6px;
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 0 -1px 0 var(--line-strong) inset;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink-2);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--lg {
  width: 24px;
  height: 24px;
}

/* Instrument annotation (the Neurotrace lesson): a hairline that points at
   something exact. Drawn by JS as SVG over 3D scenes; this is the DOM label. */
.annot {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 4px;
  max-width: 240px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-glass-solid);
  box-shadow: var(--shadow-float);
  font-size: 0.8125rem;
  line-height: 1.4;
  pointer-events: none;
}

.annot__title {
  font-weight: 640;
  color: var(--ink);
  font-size: 0.875rem;
}

.annot__meta {
  color: var(--ink-2);
  font-variant-numeric: lining-nums proportional-nums;
}

.leader {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.leader line,
.leader path {
  stroke: var(--accent);
  stroke-width: 1;
  fill: none;
}

.leader circle {
  fill: var(--accent);
}

/* ── post-a-task composer ──────────────────── */

.post__panel {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.post__rail {
  display: grid;
  align-content: space-between;
  gap: 32px;
  padding: 36px 28px;
  background: var(--surface-2);
}

.post__kicker {
  font-weight: 640;
  font-size: 0.9375rem;
  margin-bottom: 18px;
}

.post__steps {
  display: grid;
  gap: 4px;
}

.post__step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--ink-3);
  font-weight: 560;
  font-size: 0.9375rem;
}

.post__step-n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong) inset;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.post__step.is-current {
  color: var(--ink);
}

.post__step.is-current .post__step-n {
  background: var(--ink);
  color: var(--ink-inverse);
  box-shadow: none;
}

.post__step.is-done .post__step-n {
  background: var(--held);
  color: #fff;
  box-shadow: none;
}

/* funding rule in step 2: every post is funded up front */
.post__funding {
  display: grid;
  gap: 6px;
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-radius: var(--r-control);
  border-left: 3px solid var(--held);
  background: var(--held-soft);
}

.post__funding-title {
  font-weight: 640;
  color: var(--ink);
}

.post__funding-body,
.post__funding-state {
  font-size: 0.875rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

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

.post__funding-state.is-short {
  color: var(--warn);
  font-weight: 560;
}

.post__funding-state .link {
  margin-left: 4px;
}

.post__promise img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  margin: 0 0 10px -8px;
}

.post__promise-title {
  font-weight: 640;
  margin-bottom: 10px;
}

.post__promise-list {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.post__promise-list li {
  position: relative;
  padding-left: 18px;
}

.post__promise-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--held);
}

.post__form {
  padding: clamp(28px, 3.4vw, 48px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
}

.post__view {
  display: grid;
  gap: 20px;
}

.post__lede {
  color: var(--ink-2);
  margin-top: -8px;
  max-width: 60ch;
}

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

.post__criteria-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.post__suggestions {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-control);
  background: var(--held-soft);
}

.post__suggestions-head {
  font-weight: 600;
  font-size: 0.875rem;
}

.post__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.post__summary {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.post__summary-title {
  font-weight: 640;
  font-size: 1.0625rem;
}

.post__summary-desc {
  color: var(--ink-2);
  white-space: pre-wrap;
  max-height: 7.5em;
  overflow: hidden;
  mask-image: linear-gradient(#000 70%, transparent);
}

.post__summary-criteria {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.post__summary-criteria li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
}

.post__summary-criteria li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 10px;
  height: 6px;
  border-left: 1.6px solid var(--ok);
  border-bottom: 1.6px solid var(--ok);
  transform: rotate(-45deg);
}

.post__summary-empty {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.post__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.post__wide {
  grid-column: 1 / -1;
}

.post__money {
  position: relative;
  display: block;
}

.post__money > span {
  position: absolute;
  left: 16px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-3);
  font-weight: 600;
}

.post__money .input {
  padding-left: 30px;
  font-variant-numeric: lining-nums proportional-nums;
}

.post__advanced {
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--line) inset;
  padding: 0 18px;
}

.post__advanced summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: 0.9375rem;
}

.post__advanced[open] {
  padding-bottom: 18px;
}

@media (max-width: 860px) {
  .post__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .post__rail {
    padding: 26px 22px 10px;
    gap: 12px;
  }

  .post__steps {
    grid-auto-flow: column;
    justify-content: start;
    gap: 20px;
  }

  .post__promise {
    display: none;
  }

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

/* ── task "specimen tag" ───────────────────── */

.tag {
  position: relative;
}

.tag__link {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  height: 100%;
  padding: 20px 22px 18px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft) inset;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}

.tag__link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float), 0 0 0 1px var(--line) inset;
}

/* museum-label eyelet — the one nod to the specimen metaphor */
.tag__eyelet {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--line-strong) inset;
}

.tag__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-right: 20px;
}

.tag__cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.tag__cat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--accent));
}

.tag__title {
  font-size: 1.0625rem;
  font-weight: 620;
  line-height: 1.34;
  letter-spacing: -0.008em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag__money {
  display: grid;
  gap: 2px;
}

.tag__amount {
  font-size: 1.875rem;
  font-weight: 420;
  font-stretch: 86%;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.tag__funds {
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.tag__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.tag__id {
  margin-left: auto;
}

/* the grid tags live in (home, marketplace, live, design system) */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gutter);
}

@media (max-width: 1000px) {
  .tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tag-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.tag--skel {
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  min-height: 220px;
}

/* inline-code styling must not leak into command blocks */
.cmd code,
pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
