/* Styles for /open/, /open/spec/ and /convert/ (the open .vybe format pages). */
:root {
  --bg: #F7F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F1F5;
  --ink: #121218;
  --muted: #5E5E6C;
  --dim: #8A8A98;
  --line: rgba(18, 18, 24, .10);
  --line-strong: rgba(18, 18, 24, .18);
  --accent: #5B45E8;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(91, 69, 232, .10);
  --code-bg: #F3F3F7;
  --ok: #157F4F;
  --err: #C3283B;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18,18,24,.04), 0 8px 24px rgba(18,18,24,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E13;
    --surface: #16161D;
    --surface-2: #1D1D26;
    --ink: #F2F2F7;
    --muted: #A6A6B4;
    --dim: #7C7C8A;
    --line: rgba(255, 255, 255, .09);
    --line-strong: rgba(255, 255, 255, .16);
    --accent: #8B7CFF;
    --accent-ink: #0E0E13;
    --accent-soft: rgba(139, 124, 255, .14);
    --code-bg: #121219;
    --ok: #4CD394;
    --err: #FF6B7D;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand span { color: var(--dim); font-weight: 500; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 6px 10px; border-radius: 9px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .nav a.hide-sm { display: none; } .brand span { display: none; } }

/* type */
h1, h2, h3 { letter-spacing: -.025em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 750; }
h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: clamp(17px, 2vw, 19.5px); color: var(--muted); max-width: 680px; margin: 18px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.hero { padding: 72px 0 56px; }
.sec-head { max-width: 680px; margin-bottom: 28px; }
.sec-head p { color: var(--muted); margin: 10px 0 0; }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-family: inherit; font-weight: 600; font-size: 15.5px; line-height: 1; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .12s, background .2s, border-color .2s; }
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn small { font-weight: 500; opacity: .8; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.btn svg { flex: none; }

/* cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 14px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g3, .g2 { grid-template-columns: minmax(0, 1fr); } }
.feat h3 { margin-bottom: 6px; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; }
.feat .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; font-weight: 650; color: var(--muted); background: var(--surface-2); letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
td code, th code { white-space: nowrap; }

/* code */
code, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }
:not(pre) > code { font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.code { position: relative; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code .bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; }
.copy { font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--line-strong); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); }

/* drop zone */
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; min-height: 150px; padding: 26px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.drop b { color: var(--ink); font-weight: 650; font-size: 16.5px; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* notes */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }
.note.warn { background: color-mix(in srgb, var(--err) 12%, transparent); }
.note p { margin: 0; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

vybe-file { --vybe-accent: var(--accent); --vybe-bg: var(--surface); --vybe-fg: var(--ink); --vybe-muted: var(--muted); --vybe-line: var(--line); max-width: none; }
