/* Forgeverse design system v2 — shared by forgeverse.org pages and the Studio shell.
   Neutral ink surfaces, one ember accent (focus, status, the mark). Colour is never decoration. */
@font-face { font-family: "Plex"; src: url("/fv/fonts/IBMPlexSans-Variable.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fv/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #09090b;
  --bg-raised: #0e0e11;
  --surface: #121215;
  --surface-2: #18181c;
  --surface-3: #202025;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .2);
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #ff7a45;
  --accent-2: #ff5a2a;
  --accent-soft: rgba(255, 122, 69, .12);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 50px rgba(0, 0, 0, .5);
  --font: "Plex", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  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: 15px/1.6 var(--font); min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 122, 69, .35); }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
@media (max-width: 560px) { .wrap { width: calc(100% - 32px); } }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── header ─────────────────────────────────────────────────────────────── */
.fv-header { position: sticky; top: 0; z-index: 50; background: rgba(9, 9, 11, .78); backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.fv-header .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.fv-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.fv-brand img { width: 26px; height: 26px; }
.fv-nav { display: flex; gap: 2px; }
.fv-nav a { color: var(--text-2); font-size: 14px; padding: 7px 12px; border-radius: 8px; transition: color .15s, background .15s; }
.fv-nav a:hover { color: var(--text); }
.fv-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.fv-header .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.fv-header .fv-menu-btn { display: none; }
@media (max-width: 760px) {
  .fv-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .fv-nav.open { display: flex; }
  .fv-nav a { padding: 12px; font-size: 16px; }
  .fv-header .fv-menu-btn { display: inline-flex; }
  .fv-header .hide-sm { display: none; }
}
.account { position: relative; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; color: var(--text); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: linear-gradient(135deg, #ff9b5e, #ff5a2a); color: #1a0a04; }
.account-menu { position: absolute; right: 0; top: 42px; width: 240px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; }
.account-menu .who { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-menu .who small { display: block; color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.account-menu a, .account-menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px;
  background: none; border: 0; color: var(--text-2); font-size: 14px; cursor: pointer; text-align: left; }
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); color: var(--text); }

/* ── type ───────────────────────────────────────────────────────────────── */
.eyebrow { font: 500 12.5px/1 var(--font); letter-spacing: .02em; color: var(--accent); margin: 0 0 16px; display: inline-flex; gap: 8px; align-items: center; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; line-height: 1.08; font-weight: 600; }
.display { font-size: clamp(40px, 6.4vw, 76px); letter-spacing: -.035em; line-height: 1.02; }
h1 { font-size: clamp(32px, 4.4vw, 52px); }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: 17px; letter-spacing: -.01em; line-height: 1.3; }
.lede { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; color: var(--text-2); max-width: 640px; margin: 18px 0 0; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre { font-family: var(--mono); font-size: 13px; line-height: 1.6; background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; margin: 10px 0; color: #e4e4e7; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.btn:hover { background: var(--surface-3); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: #0a0a0b; border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1a0904; }
.btn.accent:hover { background: #ff8a5a; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn.danger { color: #fca5a5; }
.btn.icon-only { width: 36px; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ── layout blocks ──────────────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.head { margin-bottom: 40px; max-width: 720px; }
.head p { color: var(--text-2); margin: 14px 0 0; font-size: 16.5px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.panel.flat { background: transparent; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

/* ── product cards ──────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: border-color .2s, transform .25s var(--ease); min-width: 0; }
.app:hover { border-color: var(--line-3); transform: translateY(-2px); }
.app .shot { aspect-ratio: 16 / 10; background: var(--bg-raised); overflow: hidden; border-bottom: 1px solid var(--line); }
.app .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s var(--ease); }
.app:hover .shot img { transform: scale(1.03); }
.app .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app .title { display: flex; align-items: center; gap: 10px; }
.app .title img { width: 28px; height: 28px; border-radius: 7px; }
.app .title strong { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.app .like { font-size: 12.5px; color: var(--text-3); margin-left: auto; }
.app p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.app .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }
.app .foot .btn { margin-left: auto; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  font-size: 13.5px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip[aria-pressed="true"] { background: var(--text); color: #0a0a0b; border-color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.tag.ok { color: var(--ok); background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .2); }
.tag.accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 122, 69, .25); }

/* ── forms ──────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 7px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-weight: 400; color: var(--text-3); font-size: 12.5px; }
input[type=text], input[type=url], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea {
  width: 100%; background: var(--bg-raised); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 14.5px;
  color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: #52525b; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }
.note { border: 1px solid var(--line-2); background: var(--surface); padding: 12px 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; }
.note.bad { border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .05); color: #fecaca; }
.note.ok { border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .05); color: #a7f3d0; }
.note.accent { border-color: rgba(255, 122, 69, .3); background: var(--accent-soft); color: #ffd3bf; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 7px 14px; border-radius: 8px; color: var(--text-2); cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }

dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 0;
  width: min(560px, 100% - 24px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.fv-footer { border-top: 1px solid var(--line); padding: 48px 0 64px; color: var(--text-3); font-size: 13.5px; }
.fv-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .fv-footer .cols { grid-template-columns: 1fr 1fr; } }
.fv-footer h4 { font-size: 13px; color: var(--text); margin-bottom: 12px; letter-spacing: 0; font-weight: 600; }
.fv-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fv-footer a:hover { color: var(--text); }
.fv-footer p { margin: 8px 0 0; max-width: 420px; line-height: 1.55; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
