/* voron.zip — site styles */
:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --bg-2: #101217;
  --surface: #15171d;
  --surface-2: #1b1e25;
  --surface-3: #23272f;
  --border: #272b34;
  --border-strong: #363b46;
  --text: #eceef2;
  --muted: #9aa1ad;
  --faint: #6b7280;
  --accent: #e3342b;
  --accent-hover: #f04a41;
  --accent-soft: rgba(227, 52, 43, .14);
  --ok: #3ecf8e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .8);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 85% -10%, rgba(227, 52, 43, .13), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(120, 130, 160, .08), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 12, 15, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.site-header .container { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 17px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(227, 52, 43, .7);
}
.brand-mark svg { width: 17px; height: 17px; }
.brand b { color: var(--accent); font-weight: 700; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px;
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .07); }
@media (max-width: 560px) { .nav a .label-long { display: none; } .nav a { padding: 7px 9px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); border-color: #464c59; }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 8px 22px -10px rgba(227, 52, 43, .8); }
.btn-primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: transparent; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-icon { padding: 8px; }
.btn .sub { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }

/* ---------- Form controls ---------- */
.select, .input {
  width: 100%; appearance: none; -webkit-appearance: none;
  background-color: var(--bg-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 14px; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa1ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.select:hover, .input:hover { border-color: #4a5060; }
.select:focus, .input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select option, .select optgroup { background: var(--surface); color: var(--text); }
.field-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid rgba(255, 255, 255, .06);
}
.chip-accent { background: var(--accent-soft); color: #ff8a83; border-color: rgba(227, 52, 43, .25); }
.chip .icon { width: 12px; height: 12px; }

/* ---------- Hero ---------- */
.hero { padding-top: 64px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 18px; font-weight: 800; }
.hero h1 .dot { color: var(--accent); }
.hero p { max-width: 620px; color: var(--muted); font-size: clamp(15px, 2vw, 17.5px); margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; color: var(--faint); font-size: 13.5px; }
.hero-stats span { display: inline-flex; align-items: center; gap: 7px; }
.hero-stats strong { color: var(--text); font-weight: 600; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 142, .15); }

/* ---------- Machine grid ---------- */
#machines { scroll-margin-top: 64px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 16px; }
.section-title h2 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.section-title p { margin: 0; color: var(--faint); font-size: 13.5px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); padding-bottom: 56px; }

.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-strong); }
.card-media {
  position: relative; height: 230px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #f6f7f9 0%, #dfe2e7 55%, #c4c8cf 100%);
}
.card-media img { height: 92%; width: auto; object-fit: contain; transition: transform .45s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .22)); }
.card:hover .card-media img { transform: scale(1.04) translateY(-2px); }
.card-media .chip { position: absolute; top: 12px; left: 12px; background: rgba(15, 16, 20, .82); color: #fff; border-color: transparent; backdrop-filter: blur(6px); }
.card-media .chip-accent { background: rgba(227, 52, 43, .92); color: #fff; }
.card-media .chips { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.card-media .chips .chip { position: static; }

.card-body { padding: 18px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title h3 { margin: 0; font-size: 19px; letter-spacing: -.015em; }
.card-title a.gh { color: var(--faint); display: inline-flex; padding: 4px; border-radius: 6px; }
.card-title a.gh:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.card-desc { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--faint); min-height: 19px; font-variant-numeric: tabular-nums; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .icon { width: 13px; height: 13px; }
.card-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.card-actions .btn-primary { width: 100%; }
.card-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card-links .btn { padding: 9px 8px; font-size: 13px; font-weight: 500; }
.card-links .btn .icon { width: 16px; height: 16px; }

/* ---------- Info strip ---------- */
.info { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); padding-bottom: 60px; }
.info-item { padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--bg-2)); }
.info-item .icon { color: var(--accent); width: 22px; height: 22px; margin-bottom: 10px; }
.info-item h3 { margin: 0 0 4px; font-size: 15px; }
.info-item p { margin: 0; color: var(--muted); font-size: 13.5px; }
.info-item code { font-family: var(--mono); font-size: 12.5px; color: #ff8a83; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: rgba(0, 0, 0, .25); color: var(--faint); font-size: 13px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Notices / skeleton ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255, 196, 0, .08); border: 1px solid rgba(255, 196, 0, .2); color: #f3d27a; font-size: 13.5px; margin-bottom: 16px; }
.notice[hidden] { display: none; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* =================================================================
   Explorer
   ================================================================= */
.explore-body { height: 100vh; height: 100dvh; overflow: hidden; }
.explore-body .site-footer { display: none; }
.explorer {
  flex: 1; min-height: 0; display: grid; gap: 14px; padding: 14px 16px 16px;
  grid-template-columns: minmax(290px, 370px) 1fr; grid-template-rows: minmax(0, 1fr);
  width: 100%; max-width: 1600px; margin: 0 auto;
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 0; }

.sidebar { display: flex; flex-direction: column; overflow: hidden; }
.sidebar-controls { padding: 14px; display: grid; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-controls .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; pointer-events: none; }
.search .input { padding-left: 34px; }
.sidebar-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--faint); }
.sidebar-summary a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.sidebar-summary a:hover { color: var(--text); }
.sidebar-summary .icon { width: 14px; height: 14px; }

.tree { flex: 1; overflow: auto; padding: 6px 6px 12px; overscroll-behavior: contain; }
.tree details > summary {
  list-style: none; display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px;
  cursor: pointer; user-select: none; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.tree details > summary::-webkit-details-marker { display: none; }
.tree details > summary:hover { background: rgba(255, 255, 255, .04); }
.tree details > summary .chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.tree details[open] > summary .chev { transform: rotate(90deg); }
.tree details > summary .folder { width: 15px; height: 15px; color: var(--faint); }
.tree details > summary .count { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tree .children { margin-left: 14px; padding-left: 6px; border-left: 1px solid var(--border); }

.file {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px 6px 8px; border-radius: 7px;
  font-size: 13px; color: var(--muted); cursor: pointer; border: 1px solid transparent; background: none; text-align: left;
}
.file:hover { background: rgba(255, 255, 255, .045); color: var(--text); }
.file.active { background: var(--accent-soft); border-color: rgba(227, 52, 43, .3); color: var(--text); }
.file .dot { width: 8px; height: 8px; border-radius: 3px; background: #6d737e; flex: none; }
.file .dot.accent { background: var(--accent); }
.file .dot.clear { background: #cfe3ee; }
.file .dot.other { background: transparent; border: 1.5px solid #6d737e; }
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .path { display: block; font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .qty { font-size: 11px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .07); padding: 0 6px; border-radius: 5px; line-height: 18px; }
.file .size { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.file .dl { opacity: 0; display: inline-flex; padding: 4px; border-radius: 5px; color: var(--muted); }
.file:hover .dl, .file.active .dl, .file:focus-visible .dl { opacity: 1; }
.file .dl:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.file .dl .icon { width: 15px; height: 15px; }
@media (hover: none) { .file .dl { opacity: 1; } }
.tree-empty { padding: 30px 16px; text-align: center; color: var(--faint); font-size: 13.5px; }

.viewer { position: relative; overflow: hidden; background: radial-gradient(120% 100% at 50% 20%, #1d2027 0%, #121419 60%, #0d0e12 100%); }
.viewer canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.viewer-top { position: absolute; top: 0; left: 0; right: 0; padding: 14px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.viewer-top > * { pointer-events: auto; }
.viewer-title { min-width: 0; }
.viewer-title h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.viewer-title .crumbs { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; margin-top: 2px; }
.viewer-title .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.viewer-tools { display: flex; gap: 4px; background: rgba(15, 16, 20, .7); border: 1px solid var(--border); border-radius: 10px; padding: 3px; backdrop-filter: blur(8px); flex: none; }
.viewer-tools .btn { padding: 7px; }
.viewer-tools .btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.viewer-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.viewer-bottom > * { pointer-events: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stat { background: rgba(15, 16, 20, .75); border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
.stat b { color: var(--text); font-weight: 600; }
.viewer-actions { display: flex; gap: 8px; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--faint); pointer-events: none; }
.viewer-empty .icon { width: 44px; height: 44px; stroke-width: 1.4; color: #3a3f4a; margin: 0 auto 12px; }
.viewer-empty h2 { margin: 0 0 4px; color: var(--muted); font-size: 16px; }
.viewer-empty p { margin: 0; font-size: 13.5px; }
.viewer-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(260px, 70%); text-align: center; font-size: 12.5px; color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.progress.indeterminate > div { width: 35%; animation: indet 1.1s infinite ease-in-out; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.viewer-hint { font-size: 11.5px; color: var(--faint); }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .explore-body { height: auto; overflow: visible; }
  .explore-body .site-footer { display: block; }
  .explorer { grid-template-columns: 1fr; grid-template-rows: auto auto; padding: 12px 12px 20px; }
  .viewer { order: -1; height: min(58vh, 520px); scroll-margin-top: 72px; }
  .sidebar { max-height: none; }
  .tree { overflow: visible; }
  .viewer-hint { display: none; }
}
@media (max-width: 480px) {
  .viewer { height: 48vh; }
  .viewer-title h2 { font-size: 14px; }
  .viewer-title .crumbs { font-size: 11px; }
  .viewer-actions .btn .label { display: none; }
}
