:root {
  color-scheme: light dark;

  --bg: light-dark(#f6f7f9, #0b0d11);
  --surface: light-dark(#ffffff, #12161d);
  --surface-alt: light-dark(#eef1f5, #181d26);
  --border: light-dark(#dce1e8, #262d3a);
  --text: light-dark(#111827, #f1f5f9);
  --muted: light-dark(#4b5563, #94a3b8);
  --accent: light-dark(#0f766e, #14b8a6);
  --accent-contrast: #ffffff;
  --danger: light-dark(#b91c1c, #f87171);
  --danger-bg: light-dark(#fef2f2, #2b1417);
  --success: light-dark(#15803d, #4ade80);
  --warn: light-dark(#b45309, #fbbf24);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Header */
.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  background: var(--surface);
  border-block-end: 1px solid var(--border);
}

.topbar-inner {
  max-inline-size: 1240px;
  margin-inline: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  font-family: var(--mono);
  color: var(--accent);
}

.brand-logo {
  border-radius: 6px;
  display: block;
  flex: none;
}

.hub-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.hub-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.hub-nav a:hover,
.hub-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent);
}

.brand-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.search-input {
  inline-size: clamp(160px, 24vw, 260px);
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
}

/* Buttons */
button,
.btn-secondary {
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  transition: opacity 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border: 1px solid transparent;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost[aria-pressed="true"],
.lang-switch .btn-ghost[data-active="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-success {
  background: var(--success);
  color: #071b0e;
  border: 1px solid transparent;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  padding: 0.15rem 0.3rem;
  font-size: 0.78rem;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.25rem 0.55rem;
}

.full-width {
  inline-size: 100%;
  margin-block-start: 0.75rem;
}

/* Theme toggle labels via CSS root selector */
.theme-label-dark {
  display: none;
}
.theme-label-light {
  display: inline;
}
@media (prefers-color-scheme: light) {
  :root:not(:has(> head > meta[name="color-scheme"][content="dark"])) .theme-label-light {
    display: none;
  }
  :root:not(:has(> head > meta[name="color-scheme"][content="dark"])) .theme-label-dark {
    display: inline;
  }
}
:root:has(> head > meta[name="color-scheme"][content="light"]) .theme-label-light {
  display: none;
}
:root:has(> head > meta[name="color-scheme"][content="light"]) .theme-label-dark {
  display: inline;
}

/* Layout */
.container {
  max-inline-size: 1240px;
  inline-size: 100%;
  margin-inline: auto;
  padding: 1.25rem 1rem 2.5rem;
  flex: 1;
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-block-end: 1rem;
  border-block-end: 1px solid var(--border);
}

.hero-copy h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.telemetry-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.metric-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.metric-label {
  color: var(--muted);
}

.status-dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--warn);
}
.status-dot[data-state="live"] {
  background: var(--success);
}
.status-dot[data-state="polling"] {
  background: var(--warn);
}
.status-dot[data-state="offline"] {
  background: var(--danger);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block: 1rem;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tab-btn {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tab-btn[aria-selected="true"] {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--accent);
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Workspace Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 860px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

.section-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.model-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.model-item-btn {
  inline-size: 100%;
  justify-content: space-between;
  text-align: start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
}

.model-item-btn[aria-current="true"] {
  border-color: var(--accent);
  background: var(--surface-alt);
}

.model-item-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* Active Model Card & Responsive Table */
.model-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: 0.9rem;
}

.model-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.model-title-row h2 {
  margin: 0;
  font-size: 1.2rem;
}

.status-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.alert-banner {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin-block-end: 0.9rem;
  font-size: 0.88rem;
}

.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 75vh);
  container-type: inline-size;
}

.opp-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  --label-1: "Type";
  --label-2: "Access";
  --label-3: "Est. Left";
  --label-4: "Confidence";
  --label-5: "Contributor";
  --label-6: "Action";
}

html[lang="ko"] .opp-table {
  --label-1: "유형";
  --label-2: "액세스";
  --label-3: "예상 잔여";
  --label-4: "신뢰도";
  --label-5: "공유자";
  --label-6: "작업";
}

.opp-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--surface-alt);
}

.opp-table th,
.opp-table td {
  padding: 0.65rem 0.8rem;
  border-block-end: 1px solid var(--border);
  text-align: start;
  vertical-align: middle;
}

.opp-table:not(.compare-table) tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface);
  font-weight: 600;
  z-index: 1;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

@container (width < 680px) {
  .opp-table,
  .opp-table thead,
  .opp-table tbody,
  .opp-table tr,
  .opp-table th,
  .opp-table td {
    display: block;
  }

  .opp-table thead {
    display: none;
  }

  .opp-table tr {
    margin-block-end: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
  }

  .opp-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-alt);
  }

  .opp-table:not(.compare-table) td:nth-child(2)::before { content: var(--label-2) ": "; color: var(--muted); font-weight: 600; }
  .opp-table:not(.compare-table) td:nth-child(3)::before { content: var(--label-3) ": "; color: var(--muted); font-weight: 600; }
  .opp-table:not(.compare-table) td:nth-child(4)::before { content: var(--label-4) ": "; color: var(--muted); font-weight: 600; }
  .opp-table:not(.compare-table) td:nth-child(5)::before { content: var(--label-5) ": "; color: var(--muted); font-weight: 600; }
  .opp-table:not(.compare-table) td:nth-child(6)::before { content: var(--label-6) ": "; color: var(--muted); font-weight: 600; }
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2rem 1rem;
  text-align: center;
  margin-block-start: 0.75rem;
}

.activity-panel {
  margin-block-start: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.activity-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--border);
  background: var(--surface);
  padding: 0.9rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner {
  max-inline-size: 1240px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.footer-links a {
  color: var(--muted);
}

/* Native Modal Dialogs (Modern Web Guidance) */
dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  inline-size: min(480px, calc(100vw - 2rem));
  padding: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-block-end: 1px solid var(--border);
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dialog-body {
  padding: 1rem;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-block-start: 1rem;
}

.secret-reveal-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-block: 0.75rem;
}

.secret-code {
  font-family: var(--mono);
  font-size: 0.98rem;
  word-break: break-all;
}

.notice-box {
  font-size: 0.8rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--warn);
  background: var(--surface-alt);
  margin-block-end: 0.75rem;
}

.feedback-section {
  margin-block-start: 1rem;
  padding-block-start: 0.9rem;
  border-block-start: 1px solid var(--border);
}

.feedback-prompt {
  font-size: 0.85rem;
  margin: 0 0 0.55rem;
}

.feedback-actions {
  display: flex;
  gap: 0.5rem;
}

.post-success-cta {
  margin-block-start: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-alt);
}

.post-success-actions {
  display: grid;
  gap: 0.45rem;
}

/* Forms & Validation After Interaction (:user-invalid) */
.field {
  margin-block-end: 0.85rem;
}

.field label,
.field .field-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-block-end: 0.25rem;
}

.seg-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.seg-btn {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn[aria-checked="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-alt);
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-block-end: 0.3rem;
}

.field input,
.field select {
  inline-size: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.error-msg {
  display: none;
  color: var(--danger);
  font-size: 0.8rem;
  margin-block-start: 0.25rem;
}

:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--danger) !important;
  background: var(--danger-bg) !important;
}

:is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

:is(:user-valid, .user-valid-fallback) {
  border-color: var(--success) !important;
}

.turnstile-slot {
  margin-block: 0.75rem;
  min-block-size: 65px;
}

.form-status {
  font-size: 0.84rem;
  min-block-size: 1.2em;
  margin: 0.4rem 0 0;
}

/* Interactive UI Polish (Interface Design + Modern Web Guidance) */
.tabular {
  font-variant-numeric: tabular-nums;
}

:where(button) {
  transition: box-shadow 150ms ease-out, scale 150ms ease-out, border-color 150ms ease-out, background-color 150ms ease-out;
}

button:hover:not(:disabled) {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
}

button:active:not(:disabled) {
  scale: 0.97;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid CanvasText;
  outline-offset: 3px;
}

.pool-panel {
  view-transition-name: pool-card;
}

#active-model-heading {
  inline-size: fit-content;
}

.model-item-meta-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.model-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-inline-size: 0;
}

.model-rank {
  font-size: 0.72rem;
  color: var(--muted);
  min-inline-size: 1.6rem;
}

.hot-drops-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: 0.65rem 0.25rem;
}

.hot-drops-label {
  flex: none;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hot-drop-pill {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  min-block-size: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.hot-drop-pill[aria-current="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-alt);
}

.hot-drop-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: var(--accent);
}

.request-box {
  margin-block-start: 0.9rem;
  padding-block-start: 0.75rem;
  border-block-start: 1px solid var(--border);
}

.request-box summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}

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

.request-form {
  display: flex;
  gap: 0.35rem;
  margin-block: 0.55rem;
}

.request-form input {
  flex: 1;
  min-inline-size: 0;
  padding: 0.38rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
}

.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.request-vote-btn {
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  cursor: pointer;
}

.model-count-pill {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.model-count-pill[data-has-codes="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.model-new-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--success);
  color: #071b0e;
}

.proof-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
}

.proof-badge[data-state="fresh"] {
  color: var(--muted);
}

.pool-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.65rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip-btn {
  padding: 0.35rem 0.7rem;
  min-block-size: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.chip-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-alt);
}

.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.sort-select {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
}

.conf-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-variant-numeric: tabular-nums;
}

.conf-meter,
.claim-progress {
  inline-size: 56px;
  block-size: 6px;
  border: none;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  appearance: none;
}

.claim-progress {
  inline-size: 100%;
  block-size: 6px;
  margin-block-end: 0.6rem;
}

.conf-meter::-webkit-progress-bar,
.claim-progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 999px;
}

.conf-meter::-webkit-progress-value,
.claim-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

.conf-meter[data-tier="high"]::-webkit-progress-value {
  background: var(--success);
}

.source-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.source-age {
  font-size: 0.72rem;
  color: var(--muted);
}

/* Redemption Quick-Guide, Supply Boost & On-Page FAQ */
.hint-strip {
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.65rem;
  border-inline-start: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.82rem;
}

.supply-boost-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  margin-block-end: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.83rem;
  color: var(--muted);
}

.supply-boost-strip[data-highlight="true"] {
  border-color: var(--accent);
  background: var(--surface-alt);
  color: var(--text);
}

.faq-panel {
  margin-block-start: 1.15rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.faq-list {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.faq-item dt {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-block-end: 0.2rem;
}

.faq-item dd {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
}

.related-panel {
  margin-block-start: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.related-models-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-model-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.related-model-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.post-contrib-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  margin-block-end: 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-alt);
}

.post-contrib-copy strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
}

.post-contrib-copy p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

.post-contrib-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.guide-panel {
  margin-block-start: 1.15rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin: 0 0 0.65rem;
}

.guide-card {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
}

.guide-card dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-block-end: 0.2rem;
}

.guide-card dd {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.guide-howto {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.compare-table-wrap {
  margin-block-start: 1rem;
  max-block-size: none;
}

.compare-agent-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.compare-agent-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Free Tools Hub (/tools) */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-block-start: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tool-card h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.tool-card p {
  margin: 0;
  font-size: 0.84rem;
}

.tool-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tool-result-box {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tool-result-box[data-verdict="safe"] {
  border-color: var(--accent);
}

.tool-result-box[data-verdict="danger"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.tool-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tool-match-item {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
}

.tool-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tool-match-desc {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.badge-preview-box {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.badge-snippet-code {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  word-break: break-all;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
}

@container (width < 680px) {
  .compare-table tbody th {
    position: static;
    background: var(--surface-alt);
  }

  .compare-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-weight: 600;
  }
}

/* Persistent Top-Layer Popover Toasts */
.toast-region {
  position: fixed;
  inset-block-end: 1rem;
  inset-inline-end: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  position: static;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
  max-inline-size: min(360px, calc(100vw - 2rem));
  opacity: 0;
  translate: 0 8px;
  transition: opacity 150ms ease-out, translate 150ms ease-out, display 150ms;
  transition-behavior: allow-discrete;
}

.toast-card:is(:popover-open, .\:popover-open) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  opacity: 1;
  translate: 0 0;
}

@starting-style {
  .toast-card:is(:popover-open, .\:popover-open) {
    opacity: 0;
    translate: 0 8px;
  }
}

.toast-card .toast-close {
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  :where(button),
  .toast-card {
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
