/* ------------------------------------------------------------------ */
/* voxelsy — browser chrome                                            */
/* ------------------------------------------------------------------ */

html,
body {
  height: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
}

/* ------------------------------------------------------------------ */
/* Top chrome                                                          */
/* ------------------------------------------------------------------ */
.chrome {
  flex: none;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 30;
}

.tabsrow {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 42px;
  padding: 6px 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
  border-radius: 9px;
  flex: none;
}
.brand:hover svg {
  transform: scale(1.05);
}
.brand svg {
  transition: transform 160ms ease;
}

.tabstrip {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabstrip::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  width: 196px;
  min-width: 108px;
  max-width: 220px;
  padding: 0 6px 0 10px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  transition: background-color 140ms, color 140ms;
}
.tab:hover {
  background: color-mix(in oklab, var(--muted) 55%, transparent);
  color: var(--foreground);
}
.tab.active {
  background: color-mix(in oklab, var(--card) 94%, transparent);
  border-color: var(--border);
  color: var(--foreground);
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: color-mix(in oklab, var(--card) 94%, transparent);
}
.tab .favicon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex: none;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab .favicon .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--primary) 80%, transparent);
}
.tab:not(.active) .favicon .dot {
  background: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
}
.tab .label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tab .close {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  opacity: 0;
  color: var(--muted-foreground);
  flex: none;
}
.tab:hover .close,
.tab.active .close {
  opacity: 1;
}
.tab .close:hover {
  background: color-mix(in oklab, var(--foreground) 12%, transparent);
  color: var(--foreground);
}

.tab-add {
  width: 27px;
  height: 27px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted-foreground);
  flex: none;
  transition: background-color 140ms, color 140ms;
}
.tab-add:hover {
  background: var(--muted);
  color: var(--foreground);
}

.tabs-spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

/* relay status chip ------------------------------------------------- */
.relay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  max-width: 230px;
  padding: 0 10px;
  margin-bottom: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 45%, transparent);
  color: var(--muted-foreground);
  font-size: 11px;
  white-space: nowrap;
  transition: background-color 140ms, color 140ms, border-color 140ms;
}
.relay-chip:hover {
  background: var(--muted);
  color: var(--foreground);
}
.relay-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex: none;
}
.relay-chip[data-state="online"] {
  border-color: color-mix(in oklab, var(--ok) 35%, transparent);
  color: color-mix(in oklab, var(--ok) 80%, var(--foreground));
}
.relay-chip[data-state="online"] .dot {
  background: var(--ok);
  box-shadow: 0 0 8px color-mix(in oklab, var(--ok) 70%, transparent);
}
.relay-chip[data-state="connecting"] .dot {
  background: var(--warn);
  animation: pulse 1.1s ease-in-out infinite;
}
.relay-chip[data-state="offline"] {
  border-color: color-mix(in oklab, var(--bad) 40%, transparent);
  color: color-mix(in oklab, var(--bad) 85%, var(--foreground));
}
.relay-chip[data-state="offline"] .dot {
  background: var(--bad);
}
.relay-chip .name {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* toolbar ----------------------------------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 8px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--foreground);
  transition: background-color 140ms, color 140ms, opacity 140ms;
  flex: none;
}
.icon-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-foreground);
}
.icon-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
.icon-btn.small {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.omnibox {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 55%, transparent);
  transition: border-color 140ms, background-color 140ms;
}
.omnibox:hover {
  background: color-mix(in oklab, var(--muted) 75%, transparent);
}
.omnibox:focus-within {
  border-color: color-mix(in oklab, var(--ring) 55%, transparent);
  background: color-mix(in oklab, var(--card) 85%, transparent);
}
.omnibox .shield {
  color: color-mix(in oklab, var(--ok) 80%, var(--foreground));
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.02em;
  flex: none;
}
.omnibox .shield.off {
  color: var(--muted-foreground);
}
.omnibox input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 12.5px;
  color: var(--foreground);
  text-overflow: ellipsis;
}
.omnibox input::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 75%, transparent);
}
.omnibox .scheme {
  display: none;
}

/* loading bar -------------------------------------------------------- */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 200ms;
}
.progress.on {
  opacity: 1;
}
.progress::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: slide 1.1s ease-in-out infinite;
}
@keyframes slide {
  from { transform: translateX(-120%); }
  to { transform: translateX(420%); }
}

/* ------------------------------------------------------------------ */
/* Stage                                                               */
/* ------------------------------------------------------------------ */
#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--background);
}

#frames {
  position: absolute;
  inset: 0;
}
#frames iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: none;
}
#frames iframe.active {
  display: block;
}

/* Home --------------------------------------------------------------- */
.home {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background-image: radial-gradient(circle, oklch(1 0 0 / 5%) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.home[hidden],
#frames[hidden] {
  display: none;
}
.home-inner {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 9vh, 5.5rem) 1rem 5rem;
}
.wordmark {
  font-size: clamp(2.75rem, 7vw, 4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  user-select: none;
  color: var(--brand-text);
  text-shadow: 0 0 18px var(--brand-glow-1), 0 0 60px var(--brand-glow-2);
}
.tagline {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  letter-spacing: 0.01em;
}

.search-form {
  margin-top: 1.75rem;
  width: 100%;
  max-width: 30rem;
}
.search-wrap {
  position: relative;
}
.search-icon {
  pointer-events: none;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}
.search-input {
  height: 2.9rem;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 72%, transparent);
  padding: 0 3.4rem 0 2.8rem;
  font-size: 0.875rem;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 150ms;
}
.search-input::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
}
.search-input:focus {
  border-color: color-mix(in oklab, var(--primary) 50%, transparent);
}
.search-go {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 16%, transparent);
  color: var(--brand-text);
  transition: background-color 150ms;
}
.search-go:hover {
  background: color-mix(in oklab, var(--primary) 26%, transparent);
}

/* home card --------------------------------------------------------- */
.home-grid {
  margin-top: 1.6rem;
  width: 100%;
  max-width: 34rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .home-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.card {
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 66%, transparent);
  border-radius: 1rem;
  padding: 1.1rem 1.15rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 0;
}
.card h2 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-bottom: 0.55rem;
}

.relay-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--foreground);
}
.relay-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex: none;
}
.relay-status[data-state="online"] .dot {
  background: var(--ok);
  box-shadow: 0 0 10px color-mix(in oklab, var(--ok) 65%, transparent);
}
.relay-status[data-state="offline"] .dot {
  background: var(--bad);
}
.relay-status[data-state="connecting"] .dot {
  background: var(--warn);
  animation: pulse 1.1s ease-in-out infinite;
}
.relay-meta {
  margin-top: 0.4rem;
  font-size: 0.74rem;
  color: var(--muted-foreground);
  word-break: break-all;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 65%, transparent);
  color: var(--foreground);
  font-size: 0.78rem;
  white-space: nowrap;
  transition: background-color 140ms, border-color 140ms, opacity 140ms;
}
.btn:hover {
  background: var(--muted);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn.primary {
  background: var(--primary);
  border-color: transparent;
  color: var(--primary-foreground);
  font-weight: 500;
}
.btn.primary:hover {
  background: color-mix(in oklab, var(--primary) 88%, var(--foreground));
}
.btn.ghost {
  background: transparent;
}
.btn.ghost:hover {
  background: var(--muted);
}
.btn.small {
  height: 1.75rem;
  font-size: 0.72rem;
  padding: 0 0.65rem;
}

/* quick links ------------------------------------------------------- */
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}
.quick a,
.quick button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.75rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 45%, transparent);
  color: var(--muted-foreground);
  font-size: 0.73rem;
  text-decoration: none;
  transition: background-color 140ms, color 140ms;
}
.quick a:hover,
.quick button:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* clock ------------------------------------------------------------- */
.clock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.clock-time {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  margin-top: 0.4rem;
  font-size: 0.76rem;
  text-transform: capitalize;
  color: var(--muted-foreground);
}

/* onboarding gate --------------------------------------------------- */
.gate {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  padding: 1.25rem;
  overflow-y: auto;
  background-color: var(--background);
  background-image: radial-gradient(circle, oklch(1 0 0 / 5%) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
.gate.on {
  display: grid;
}
.gate-card {
  width: 100%;
  max-width: 32rem;
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: color-mix(in oklab, var(--card) 82%, transparent);
  backdrop-filter: blur(14px);
  padding: 1.6rem;
}
.gate-card h1 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.gate-card p {
  margin-top: 0.5rem;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}
.gate-steps {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.gate-steps li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted-foreground);
  counter-increment: step;
}
.gate-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--foreground);
}
.gate-steps b {
  color: var(--foreground);
  font-weight: 500;
}
.gate-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

/* ------------------------------------------------------------------ */
/* Settings sheet                                                      */
/* ------------------------------------------------------------------ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: oklch(0 0 0 / 55%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  width: 100%;
  max-width: 38rem;
  max-height: min(85vh, 46rem);
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: 0 24px 60px -12px oklch(0 0 0 / 0.65);
  transform: translateY(8px) scale(0.99);
  transition: transform 160ms ease;
}
.overlay.open .sheet {
  transform: none;
}
.sheet header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.sheet header h2 {
  font-size: 0.95rem;
  font-weight: 600;
}
.sheet header .sub {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  margin-top: 0.1rem;
}
.sheet .body {
  padding: 1rem 1.1rem 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sheet .close {
  margin-left: auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.field label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.field .hint {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  line-height: 1.45;
}
.input {
  height: 2.25rem;
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid var(--input);
  background: color-mix(in oklab, var(--background) 55%, transparent);
  padding: 0 0.7rem;
  font-size: 0.8rem;
  outline: none;
  min-width: 0;
}
.input:focus {
  border-color: color-mix(in oklab, var(--ring) 60%, transparent);
}
.input.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.76rem;
}
.row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.row .grow {
  flex: 1 1 auto;
  min-width: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-bottom: 0.55rem;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 0.1rem 0;
}
.connect-log {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 60%, transparent);
  padding: 0.6rem 0.7rem;
  display: none;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 10rem;
  overflow-y: auto;
}
.connect-log.on {
  display: block;
}
.connect-log .ok {
  color: var(--ok);
}
.connect-log .err {
  color: var(--bad);
}
.connect-log .dim {
  color: var(--muted-foreground);
}

/* code block + copy ------------------------------------------------ */
.code {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}
.code pre {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 70%, transparent);
  padding: 0.55rem 0.65rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  color: color-mix(in oklab, var(--foreground) 88%, transparent);
}
.copy {
  flex: none;
  width: 2.25rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
}
.copy:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* theme grid -------------------------------------------------------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  padding: 0.55rem 0.3rem;
  font-size: 10.5px;
  color: var(--muted-foreground);
  transition: background-color 140ms, color 140ms, border-color 140ms;
}
.theme-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}
.theme-btn.active {
  border-color: color-mix(in oklab, var(--primary) 60%, transparent);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--foreground);
}
.theme-btn .swatch {
  width: 1.55rem;
  height: 1.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid oklch(1 0 0 / 10%);
  box-shadow: inset 0 2px 4px oklch(0 0 0 / 0.15);
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Toasts                                                              */
/* ------------------------------------------------------------------ */
#toasts {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  max-width: min(90vw, 30rem);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--popover);
  color: var(--popover-foreground);
  padding: 0.5rem 0.9rem;
  font-size: 0.76rem;
  box-shadow: 0 8px 24px -8px oklch(0 0 0 / 0.6);
  animation: toast-in 180ms ease;
}
.toast.err {
  border-color: color-mix(in oklab, var(--bad) 45%, transparent);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ */
/* Small screens                                                       */
/* ------------------------------------------------------------------ */
@media (max-width: 640px) {
  .tab {
    width: 130px;
  }
  .relay-chip .name {
    display: none;
  }
  .relay-chip {
    padding: 0 8px;
  }
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* [hidden] must win over the flex/grid rules above */
.overlay[hidden],
.progress[hidden] {
  display: none;
}

/* codespace is ready but the proxy hasn't been opened from here yet */
.relay-chip[data-state="ready"] {
  color: var(--foreground);
}
.relay-chip[data-state="ready"] .dot {
  background: var(--brand-text);
  box-shadow: 0 0 8px var(--brand-glow-1);
}

/* long setup commands should wrap instead of disappearing off the card */
.code pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* hints that are not inside a .field */
.hint {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* leak-protection toggles ------------------------------------------- */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: color-mix(in oklab, var(--background) 45%, transparent);
  cursor: pointer;
  font-size: 0.8rem;
}
.switch-row:hover {
  background: color-mix(in oklab, var(--muted) 45%, transparent);
}
.switch-row input {
  margin-top: 0.15rem;
  accent-color: var(--primary);
  flex: none;
}
.switch-row span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.switch-row b {
  font-weight: 500;
}
.switch-row small {
  font-size: 0.71rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}
