:root {
  color-scheme: dark;
  --bg: #10131b;
  --panel: #171c27;
  --panel-2: #1d2431;
  --line: #2a3241;
  --muted: #8993a6;
  --text: #f1f4fa;
  --accent: #9f91ff;
  --accent-2: #c4bbff;
  --green: #68d6a2;
  --yellow: #f0c778;
  --red: #ff858e;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 50% -20%, #242442 0, transparent 42%), var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(160, 164, 199, .13); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.7px; font-size: 17px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent-2); background: #302c52; border: 1px solid #514b7b; border-radius: 10px; font: 700 13px ui-monospace, monospace; }
.brand-light { color: #a5adbf; font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 22px; color: #aab3c4; font-size: 12px; }
.privacy-pill { border: 1px solid #345748; color: #9de4bf; border-radius: 99px; padding: 7px 11px; display: inline-flex; gap: 8px; align-items: center; background: rgba(46, 116, 83, .13); }
.status-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 9px #68d6a2; }
.github-link { color: #b9c1d1; }
.github-link span { color: var(--accent-2); margin-left: 4px; }
.hero { padding: 64px 0 50px; max-width: 730px; }
.eyebrow, .section-kicker { color: var(--accent-2); font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 25px; height: 1px; background: var(--accent); }
h1 { margin: 21px 0 16px; font-size: clamp(42px, 6.5vw, 72px); line-height: .99; letter-spacing: -4px; font-weight: 760; }
h1 span { color: var(--accent-2); }
.hero-copy { color: #a0aabc; max-width: 575px; font-size: 15px; line-height: 1.8; margin: 0; }
.hero-meta { margin-top: 25px; display: flex; flex-wrap: wrap; gap: 22px; color: #8e99ac; font-size: 11px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.meta-icon { color: var(--green); }
.workspace { background: rgba(20, 25, 36, .83); border: 1px solid #2b3342; border-radius: 18px; padding: 26px; box-shadow: 0 25px 90px rgba(0,0,0,.18); }
.workspace-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.workspace-heading { margin-bottom: 21px; }
h2 { margin: 7px 0 0; font-size: 23px; letter-spacing: -.8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 10px 13px; color: #d7dce7; font-size: 11px; font-weight: 650; transition: .18s ease; }
.button:hover, .icon-button:hover, .export-card:hover { transform: translateY(-1px); }
.button-quiet { background: #202735; border-color: #303a4c; }
.button-quiet span { color: var(--accent-2); margin-right: 5px; }
.button-danger-quiet { background: transparent; color: #e69ba2; border-color: #4a3039; }
.button-primary { background: var(--accent); color: #151326; font-weight: 800; padding: 11px 16px; }
.button-primary:hover { background: #b7adff; }
.button-primary span { margin-left: 12px; }
.button-small { padding: 8px 11px; font-size: 10px; }
.button-outline { color: var(--accent-2); background: #282543; border-color: #514b78; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 15px; }
.stat-card { min-height: 92px; padding: 14px 16px; background: #191f2b; border: 1px solid #2a3342; border-radius: 10px; display: grid; grid-template-columns: 1fr auto; align-items: center; }
.stat-label { color: #8792a6; font: 700 9px ui-monospace, monospace; letter-spacing: 1.3px; grid-column: 1 / -1; }
.stat-card strong { font-size: 25px; letter-spacing: -.8px; font-weight: 650; }
.stat-card strong.good { color: var(--green); }
.stat-card strong.warn { color: var(--yellow); }
.stat-note { color: #778296; font-size: 10px; align-self: end; padding-bottom: 4px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 14px; align-items: stretch; }
.panel { background: #171d28; border: 1px solid #2a3342; border-radius: 12px; overflow: hidden; }
.panel-heading { min-height: 68px; padding: 13px 16px; border-bottom: 1px solid #293140; }
.panel-title-wrap { display: flex; align-items: center; gap: 11px; }
.panel-title-wrap h3 { margin: 0; font-size: 12px; font-weight: 700; }
.panel-title-wrap p { margin: 4px 0 0; color: #7f8a9d; font-size: 10px; }
.file-icon, .table-icon, .check-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; background: #292643; color: var(--accent-2); }
.table-icon { background: #1d3a36; color: #83d7b2; }
.check-icon { background: #3b3022; color: #eac783; }
.file-type { color: #929cb0; font: 700 9px ui-monospace, monospace; border: 1px solid #354052; padding: 5px 7px; border-radius: 5px; }
#source-editor { display: block; resize: vertical; width: 100%; height: 315px; min-height: 220px; border: 0; outline: 0; padding: 17px; color: #d5d9e6; background: #121721; font: 12px/1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
#source-editor::placeholder { color: #566174; }
.source-footer { min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-top: 1px solid #293140; color: #768196; font: 10px ui-monospace, monospace; }
.variables-heading { min-height: 68px; }
.table-tools { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid #293140; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 10px; height: 33px; border: 1px solid #313b4d; border-radius: 7px; background: #121721; color: #7f8b9e; }
.search-box input { width: 100%; min-width: 0; background: transparent; color: var(--text); border: 0; outline: 0; font-size: 10px; }
.search-box input::placeholder { color: #69758a; }
.icon-button { border: 1px solid #394253; color: #aeb8c9; background: #202735; border-radius: 7px; height: 33px; padding: 0 10px; font-size: 10px; transition: .18s ease; white-space: nowrap; }
.icon-button span { margin-left: 4px; }
.table-wrap { height: 267px; overflow: auto; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; }
thead { position: sticky; top: 0; z-index: 1; background: #1b222f; }
th { color: #8590a3; font: 700 8px ui-monospace, monospace; letter-spacing: 1px; text-align: left; padding: 11px 12px; }
th:first-child { width: 35%; }
th:last-child { width: 66px; }
td { border-top: 1px solid #252e3c; padding: 8px 8px 8px 12px; vertical-align: middle; }
.variable-input { width: 100%; min-width: 0; border: 1px solid transparent; outline: 0; background: transparent; color: #dbe0ea; border-radius: 5px; padding: 7px 6px; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.variable-input:focus { border-color: #625b93; background: #202538; }
.variable-input.key-input { color: #b9adff; font-weight: 700; }
.variable-input.invalid { color: var(--red); border-color: #76414b; }
.value-cell { position: relative; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-action { width: 25px; height: 26px; display: grid; place-items: center; border: 0; background: transparent; color: #8591a4; border-radius: 5px; font-size: 13px; }
.row-action:hover { background: #2a3343; color: #e3e7f0; }
.row-action.delete:hover { color: var(--red); }
.sensitive-mark { display: inline-block; margin-left: 4px; vertical-align: middle; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.empty-row td { height: 220px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #7d899d; text-align: center; }
.empty-glyph { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 3px; border-radius: 12px; background: #292642; color: #b5abff; font: 700 15px ui-monospace, monospace; }
.empty-state strong { color: #c4cad6; font-size: 11px; }
.empty-state span:last-child { max-width: 230px; font-size: 10px; line-height: 1.5; }
.variables-footer { height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-top: 1px solid #293140; color: #778397; font: 9px ui-monospace, monospace; }
.mask-note { color: #a6a0d3; }
.diagnostics-panel { margin-top: 14px; }
.diagnostics-heading { min-height: 65px; }
.report-status { font: 10px ui-monospace, monospace; color: #8792a6; }
.diagnostics-list { padding: 13px 16px; display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; }
.diagnostic-empty { color: #8490a4; font-size: 10px; display: flex; align-items: center; gap: 9px; }
.diagnostic-empty span { color: var(--green); font-size: 15px; }
.diagnostic { display: flex; gap: 7px; align-items: flex-start; padding: 8px 10px; background: #222a37; border: 1px solid #303a4b; border-radius: 7px; color: #b6c0d0; font-size: 10px; max-width: 100%; }
.diagnostic.error { border-color: #63404a; background: #30232d; color: #f0a0a5; }
.diagnostic.warning { border-color: #5b4b34; background: #302c25; color: #e8c889; }
.diagnostic.info { border-color: #3b4963; background: #222b3a; color: #aebcdd; }
.export-section { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 27px 3px 2px; }
.export-copy { min-width: 190px; }
.export-copy h2 { font-size: 19px; }
.export-copy p { margin: 7px 0 0; color: #8c97aa; font-size: 10px; line-height: 1.6; }
.export-actions { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.export-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; text-align: left; color: var(--text); background: #202735; border: 1px solid #343e50; border-radius: 9px; transition: .18s ease; }
.export-symbol { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: #302b51; color: var(--accent-2); font: 700 10px ui-monospace, monospace; }
.example-symbol { background: #1e3c34; color: #8bdbb5; }
.json-symbol { background: #3c3225; color: #edc982; }
.export-card span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.export-card strong { font-size: 9px; white-space: nowrap; }
.export-card small { color: #8c98aa; font-size: 8px; white-space: nowrap; }
.export-card b { margin-left: auto; color: #adb5c8; font-size: 14px; font-weight: 400; }
.security-note { margin: 18px 0 32px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #365344; border-radius: 11px; background: rgba(31, 69, 54, .17); }
.security-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; background: #244335; color: #9be0b9; font-size: 18px; }
.security-note strong { color: #b7e7cc; font-size: 11px; }
.security-note p { color: #8eaa9b; margin: 4px 0 0; font-size: 9px; line-height: 1.55; }
.security-tag { margin-left: auto; color: #82c6a0; font: 700 8px ui-monospace, monospace; letter-spacing: .8px; white-space: nowrap; }
.footer { padding: 18px 0 25px; border-top: 1px solid rgba(160,164,199,.13); display: flex; justify-content: space-between; color: #969fb0; font: 9px ui-monospace, monospace; letter-spacing: .6px; }
.footer-muted { color: #596477; letter-spacing: 0; }
.footer-dot { color: var(--green); font-size: 7px; margin-left: 4px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; padding: 11px 16px; border: 1px solid #4b4a72; border-radius: 8px; color: #e5e1ff; background: #282543; box-shadow: 0 10px 35px rgba(0,0,0,.3); font-size: 11px; transition: .2s ease; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .editor-grid { grid-template-columns: 1fr; }
  .table-wrap { height: 280px; }
  .export-section { align-items: flex-start; flex-direction: column; }
  .export-actions { width: 100%; }
}
@media (max-width: 620px) {
  .app-shell { width: min(100% - 28px, 1180px); }
  .topbar { height: 64px; }
  .topbar-right { gap: 11px; }
  .github-link { display: none; }
  .hero { padding: 48px 0 36px; }
  h1 { letter-spacing: -2.5px; }
  .hero-copy { font-size: 13px; }
  .hero-meta { gap: 12px; font-size: 9px; }
  .workspace { padding: 14px; border-radius: 13px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; }
  .toolbar .button { flex: 1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 78px; }
  .panel-heading { padding: 11px; }
  .variables-heading { align-items: flex-start; }
  .variables-heading .panel-title-wrap p { max-width: 140px; }
  .button-small { padding: 8px; }
  th:first-child { width: 39%; }
  th:last-child { width: 58px; }
  td { padding-left: 7px; padding-right: 5px; }
  .variable-input { font-size: 9px; padding: 7px 4px; }
  .row-action { width: 23px; }
  .export-actions { grid-template-columns: 1fr; }
  .export-card { padding: 10px 12px; }
  .security-note { align-items: flex-start; }
  .security-tag { display: none; }
  .footer { gap: 12px; font-size: 8px; }
}
