/* DatasetsDB design system. Light, hub-style by default; [data-theme="dark"] flips the tokens. */
:root {
  --bg: #ffffff; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #f9fafb; --line: #e5e7eb; --line-2: #d1d5db;
  --text: #111827; --muted: #4b5563; --faint: #6b7280;
  --a1: #ff9d00; --a2: #2563eb; --accent: #b45309; --accent-ink: #ffffff;
  --yellow: #ffd21e; --ink: #111827; --ink-text: #ffffff;
  --ok: #059669; --warn: #b45309; --bad: #dc2626;
  --grad: linear-gradient(100deg, #ff9d00, #ffd21e);
  --radius: 12px; --radius-s: 8px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 12px 32px -16px rgba(17, 24, 39, .18);
  --font: "Source Sans 3", "Source Sans Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0f19; --bg-2: #0b0f19; --panel: #111827; --panel-2: #161d2b; --line: #1f2937; --line-2: #374151;
  --text: #e5e7eb; --muted: #a3acb9; --faint: #7d8696; --a2: #60a5fa; --accent: #ffd21e; --accent-ink: #111827;
  --ink: #f9fafb; --ink-text: #111827;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --shadow: 0 16px 40px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
::selection { background: rgba(255, 210, 30, .55); }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.grad-text { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:root[data-theme="dark"] .grad-text { background: none; color: var(--yellow); }
.lnk { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; } .lnk:hover { text-decoration-color: var(--a1); }
.row { display: flex; align-items: center; gap: 12px; } .row.wrap-x { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .hide { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* backdrop: soft grey fade under the header */
.backdrop { position: absolute; left: 0; right: 0; top: 0; height: 420px; z-index: -1; pointer-events: none; background: linear-gradient(var(--panel-2), var(--bg)); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 2px rgba(17, 24, 39, .04); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { border-color: var(--ink); color: var(--ink-text); background: var(--ink); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); opacity: .86; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.danger { color: var(--bad); }
.btn.lg { height: 46px; padding: 0 20px; font-size: 17px; border-radius: 10px; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 15px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* forms */
.field { display: grid; gap: 6px; }
.field > span { font-size: 15px; color: var(--muted); font-weight: 600; }
.input, select.input { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--bg-2); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(255, 157, 0, .2); }
.input::placeholder { color: var(--faint); }
.input.sm { height: 34px; font-size: 15px; padding: 0 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--a1); width: 16px; height: 16px; }

/* surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; }
.card.hover { transition: border-color .15s, transform .15s; } .card.hover:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 15px; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.badge.run { color: var(--a2); border-color: color-mix(in srgb, var(--a2) 35%, transparent); background: color-mix(in srgb, var(--a2) 10%, transparent); }
.badge.run::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 70%, transparent); font-size: 15px; color: var(--muted); }
.pill b { color: var(--text); font-weight: 600; }

.stat { display: grid; gap: 4px; }
.stat .k { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

.progress { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .5s; }

.ring { --p: 0; --c: var(--a1); width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-2) 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--panel); }
.ring > div { position: relative; z-index: 1; text-align: center; line-height: 1; }
.ring b { font-size: 38px; font-weight: 700; letter-spacing: -.04em; } .ring small { display: block; margin-top: 4px; color: var(--faint); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.ring.sm { width: 44px; height: 44px; } .ring.sm::after { inset: 4px; } .ring.sm b { font-size: 15px; letter-spacing: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: left; font-size: 15px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .12s; } .t tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.t tr.click { cursor: pointer; }
.clip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clip.one { -webkit-line-clamp: 1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 14px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.tabs button .n { margin-left: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 8px; font-size: 18px; }
.alert { padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); font-size: 15px; }
.alert.info { border-color: var(--line-2); background: var(--panel-2); color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50; font-size: 15px; max-width: calc(100vw - 32px); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--a1); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
pre.code { margin: 0; padding: 16px; border-radius: var(--radius-s); background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* brand + top nav */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand i { width: 28px; height: 28px; border-radius: 8px; background: var(--yellow); display: grid; place-items: center; }
.brand i svg { width: 17px; height: 17px; color: #111827; }
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.nav .links { display: flex; gap: 4px; margin-left: 12px; }
.nav .links a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 16px; }
.nav .links a:hover { color: var(--text); background: var(--panel-2); }
.nav .links a.on { color: var(--text); font-weight: 600; }
.nav-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; flex: 0 1 300px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--faint); }
.nav-search:focus-within { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(255, 157, 0, .2); background: var(--bg); }
.nav-search svg { width: 16px; height: 16px; flex: none; }
.nav-search input { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; color: var(--text); }
.nav-search input::placeholder { color: var(--faint); }
@media (max-width: 560px) { .nav-search { display: none; } }
.nav-search { position: relative; }
.suggest { position: absolute; left: 0; top: calc(100% + 6px); width: max(100%, 380px); max-width: calc(100vw - 32px); z-index: 30; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; }
.suggest a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; color: var(--text); font-size: 15px; }
.suggest a:hover, .suggest a.on { background: var(--panel-2); }
.suggest b { font-weight: 500; font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest small { color: var(--faint); font-size: 13px; white-space: nowrap; }
.sg-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.sg-dataset { background: color-mix(in srgb, var(--yellow) 30%, var(--panel)); border-color: transparent; color: #111827; }
:root[data-theme="dark"] .sg-dataset { color: var(--yellow); background: transparent; border-color: var(--line-2); }
.suggest .sg-all { display: block; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; color: var(--muted); font-size: 14px; }
.key-once { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.key-once code { font-size: 14px; overflow-wrap: anywhere; flex: 1; min-width: 220px; }
@media (max-width: 900px) { .nav .links a:not(:first-child) { display: none; } .nav .links { margin-left: 0; } }
@media (max-width: 480px) { .nav .signin { display: none; } }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth .card { width: 100%; max-width: 420px; padding: 32px; box-shadow: var(--shadow); }
.auth form { display: grid; gap: 14px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 18px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* app shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; background: var(--panel-2); }
.side .brand { padding: 4px 10px 18px; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 16px; }
.side a.item:hover { color: var(--text); background: var(--panel); }
.side a.item.on { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.side a.item svg { width: 17px; height: 17px; flex: none; }
.side a.item { white-space: nowrap; }
.side .foot { margin-top: auto; display: grid; gap: 10px; }
.user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); min-width: 0; }
.user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 700; color: #111827; font-size: 15px; flex: none; overflow: hidden; }
.user .av img { width: 100%; height: 100%; object-fit: cover; }
.user div { min-width: 0; } .user b, .user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user b { font-size: 15px; font-weight: 600; } .user small { font-size: 12px; color: var(--faint); }
.main { padding: 28px 32px 80px; min-width: 0; }
.main > header { margin-bottom: 22px; }
.main h1 { font-size: 26px; }
.crumb { font-size: 15px; color: var(--faint); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.crumb a:hover { color: var(--text); }
.section { margin-top: 22px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 20; overflow-x: auto; }
  .side .brand { padding: 0 8px 0 4px; } .side .brand span { display: none; }
  .side .foot { margin: 0 0 0 auto; display: flex; } .side .user div, .side .plan-card { display: none; }
  .main { padding: 20px 16px 72px; }
}

.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 40px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: var(--bg-2); }
.drop:hover, .drop.over { border-color: var(--a1); background: color-mix(in srgb, var(--a1) 8%, var(--bg-2)); }
.drop svg { width: 34px; height: 34px; color: var(--a1); margin-bottom: 10px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); gap: 4px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.checks { display: grid; gap: 2px; }
.checks .c { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.checks .c:last-child { border-bottom: 0; }
.checks .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.checks .pass .dot { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.checks .warn .dot { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.checks .fail .dot { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.checks b { font-weight: 600; font-size: 15px; display: block; } .checks small { color: var(--muted); font-size: 15px; }
.recs { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); }
.exp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg-2); transition: border-color .15s; }
.exp:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.exp b { display: block; font-size: 15px; font-weight: 600; } .exp small { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.qa-q { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; } .qa-a { color: var(--muted); font-size: 15px; }
.meter { display: inline-block; width: 46px; height: 5px; border-radius: 9px; background: var(--panel-2); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.meter i { display: block; height: 100%; background: var(--grad); }
/* package cards (pricing, distribution) */
.price { display: flex; flex-direction: column; gap: 18px; padding: 26px; }
.price .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price h3 { font-size: 17px; }
.price .amt { display: flex; align-items: baseline; gap: 6px; }
.price .amt b { font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price .amt span { color: var(--muted); font-size: 14px; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--muted); flex: 1; }
.price li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; }
.price li svg { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }
.price.featured { border-color: var(--a1); box-shadow: var(--shadow); background: linear-gradient(180deg, color-mix(in srgb, var(--yellow) 14%, var(--panel)), var(--panel) 60%); }
.price-note { margin-top: 22px; color: var(--muted); font-size: 14px; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
