/* VM Forge Cloud: one stylesheet for the website and the web app. */
:root {
  --bg: #0B0B10; --panel: #14141C; --panel-2: #17152A; --line: #23232E; --line-2: #2A2A38; --line-3: #3A3A4A;
  --text: #E7E7EE; --muted: #B8B8C6; --dim: #9A9AAB; --faint: #7C7C8E; --white: #FFFFFF;
  --accent: #9D8CFF; --ok: #7EE2A8; --warn-bg: #2B2412; --warn: #F5C66B; --bad: #FF8A8A;
  --display: 'Space Grotesk', Inter, system-ui, sans-serif; --body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); }
a { color: #C9C3FF; } a:hover { color: var(--white); }
h1, h2, h3 { color: var(--white); margin: 0; }
h1, h2 { font-family: var(--display); letter-spacing: -0.01em; }
button, input, textarea, select { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 14px; } .tiny { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* brand + nav */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 18px; }
.brand svg { flex-shrink: 0; }
.topbar { border-bottom: 1px solid #1E1E28; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 16px 24px; max-width: 1200px; margin: 0 auto; }
.nav-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; flex-grow: 1; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-3); background: transparent; color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #5A5A70; color: var(--white); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-primary:hover { color: var(--bg); filter: brightness(1.08); }
.btn-danger { border-color: #5A2A2A; color: var(--bad); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.link-btn { background: none; border: 0; padding: 10px 6px; color: var(--text); cursor: pointer; font-size: 14px; text-decoration: none; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--text); }
.input { min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--white); width: 100%; }
.input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.error { color: var(--bad); font-size: 14px; min-height: 20px; }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.notice.warn { background: var(--warn-bg); border-color: #4A3B14; color: var(--warn); }

/* landing */
.hero { max-width: 920px; margin: 0 auto; padding: 96px 24px 56px; text-align: center; }
.pill { display: inline-block; margin: 0 0 20px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--muted); }
.hero h1 { font-weight: 700; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.lead { margin: 20px auto 0; max-width: 640px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.promptbox { margin: 40px auto 0; max-width: 760px; text-align: left; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; }
.promptbox textarea { width: 100%; resize: none; background: transparent; border: 0; color: var(--white); font-size: 16px; line-height: 1.5; }
.promptbox textarea:focus { outline: none; }
.promptbox:focus-within { border-color: #4A4A60; }
.pb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.grow { flex-grow: 1; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--line-2); color: var(--white); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.chip { text-decoration: none; color: var(--muted); font-size: 14px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: none; cursor: pointer; }
.strip { border-top: 1px solid #1E1E28; border-bottom: 1px solid #1E1E28; }
.strip ul { list-style: none; margin: 0 auto; max-width: 1200px; padding: 22px 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; font-size: 14px; color: var(--dim); }
.section { max-width: 1200px; margin: 0 auto; padding: 88px 24px 40px; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split > * { flex: 1 1 420px; min-width: 0; }
.ticks { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.ticks li { display: flex; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.grid3 { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card h3 { margin: 16px 0 8px; font-size: 18px; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.steps li { border-top: 2px solid var(--line-3); padding-top: 20px; }
.steps li:first-child { border-color: var(--accent); }
.steps .n { font-family: var(--display); font-size: 14px; color: var(--dim); }
.steps h3 { margin: 8px 0; font-size: 20px; }
.steps p { margin: 0; font-size: 15px; color: var(--muted); }
.plans { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.plan.featured { background: var(--panel-2); border-color: var(--accent); }
.plan .price { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--white); }
.plan .price span { font-size: 16px; font-weight: 500; color: var(--dim); }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; flex-grow: 1; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--bg); }
.faq { max-width: 820px; margin: 0 auto; padding: 56px 24px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 500; color: var(--white); }
.faq p { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.footer { border-top: 1px solid #1E1E28; }
.footer .cols { padding: 48px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; font-size: 14px; }
.footer .cols div { display: flex; flex-direction: column; gap: 10px; }
.footer a { text-decoration: none; color: var(--dim); }

/* auth pages */
.auth { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.auth > section { flex: 1 1 420px; min-width: 0; }
.auth-card { width: 100%; max-width: 440px; margin: 48px auto 96px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.planpick { display: flex; flex-direction: column; gap: 12px; }
.planopt { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; padding: 16px 18px; border-radius: 14px; cursor: pointer; background: var(--panel); border: 1px solid var(--line-2); text-align: left; }
.planopt[aria-checked="true"] { background: var(--panel-2); border: 2px solid var(--accent); }
.planopt .dot { flex-shrink: 0; width: 18px; height: 18px; border-radius: 999px; border: 2px solid #4A4A5C; }
.planopt[aria-checked="true"] .dot { border: 6px solid var(--accent); }
.planopt .nm { font-size: 17px; font-weight: 600; color: var(--white); }
.planopt .pr { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--white); white-space: nowrap; }

/* web app */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.app-main { flex-grow: 1; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.pcard { display: flex; flex-direction: column; gap: 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; cursor: pointer; color: inherit; }
.pcard:hover { border-color: var(--line-3); }
.pcard .t { font-size: 17px; font-weight: 600; color: var(--white); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--dim); }
.status.ready::before { background: var(--ok); } .status.error::before { background: var(--bad); } .status.provisioning::before { background: var(--warn); }
.env { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 600; }
.editor { display: flex; flex-wrap: wrap; height: calc(100vh - 66px); min-height: 560px; }
.chatcol { flex: 1 1 380px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.chathead { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.msgs { flex-grow: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 100%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--line-2); color: var(--white); }
.msg.assistant { background: transparent; padding: 0; color: var(--text); }
.msg.meta { font-size: 13px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); }
.msg.tool { font-size: 12px; color: var(--faint); padding: 0; font-family: ui-monospace, monospace; }
.msg.err { color: var(--bad); background: #2A1414; }
.composer { padding: 12px; border-top: 1px solid var(--line); }
.composer .promptbox { margin: 0; padding: 10px; border-radius: 14px; }
.previewcol { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.pvbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.url { flex: 1 1 200px; min-width: 0; padding: 8px 12px; border-radius: 8px; background: var(--panel); font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame { flex-grow: 1; background: #fff; border: 0; width: 100%; }
.waiting { flex-grow: 1; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--dim); }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 24px; margin-bottom: 8px; }
dialog h3 { font-size: 16px; margin: 20px 0 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; font-size: 14px; }
.kv code, .lk code { overflow-wrap: anywhere; color: var(--white); }
.lk { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lk code { flex-grow: 1; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.env-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0 8px; }
.tabs button { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: none; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--line-2); color: var(--white); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--white); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; }
.toast.bad { background: var(--bad); }
@media (max-width: 860px) { .chatcol { max-width: none; border-right: 0; height: 60vh; } .editor { height: auto; } .frame { min-height: 70vh; } }
