:root {
  color-scheme: dark;
  --bg: #070b13;
  --surface: #0d1422;
  --surface-2: #111b2d;
  --editor: #080e19;
  --line: #23324a;
  --line-soft: #18253a;
  --text: #f4f7fb;
  --muted: #8f9db2;
  --mint: #77f2c2;
  --blue: #7aa7ff;
  --violet: #ad8cff;
  --danger: #ff9da4;
  --shadow: 0 24px 80px rgb(0 0 0 / 34%);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% -10%, rgb(64 104 168 / 25%), transparent 34rem),
    radial-gradient(circle at 90% 2%, rgb(102 58 155 / 18%), transparent 30rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image: linear-gradient(rgb(255 255 255 / 2.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 2.5%) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 75%);
}
a { color: inherit; }
button, input, textarea { font: inherit; }
.shell { position: relative; width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 54px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 42px; }
.brand { display: flex; align-items: center; gap: 11px; color: #dfe8f6; font-size: 13px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #395373; border-radius: 9px; background: #111d31; color: var(--mint); font: 800 15px/1 ui-monospace, monospace; box-shadow: inset 0 1px rgb(255 255 255 / 7%); }
.nav { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s ease; }
.nav:hover { color: var(--text); }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 36px; margin-bottom: 26px; }
.hero-copy { max-width: 760px; }
.eyebrow { margin-bottom: 12px; color: var(--mint); font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: -.055em; }
.accent { background: linear-gradient(120deg, var(--mint), var(--blue), var(--violet)); background-clip: text; color: transparent; }
.lede { max-width: 700px; margin: 17px 0 0; color: var(--muted); font-size: 17px; }
.trust { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 360px; }
.chip { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgb(13 20 34 / 78%); color: #b9c6d8; font: 12px/1.2 ui-monospace, monospace; white-space: nowrap; }
.chip.safe { border-color: rgb(119 242 194 / 28%); color: var(--mint); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgb(17 27 45 / 96%), rgb(10 16 28 / 96%)); box-shadow: var(--shadow); overflow: hidden; }
.config-panel { margin-bottom: 18px; padding: 18px; }
.config-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr); gap: 14px; }
.field { display: grid; gap: 8px; color: #c8d2e0; font-size: 13px; font-weight: 650; }
.field small { color: var(--muted); font-weight: 400; }
input {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--editor); color: var(--text); outline: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
input:focus, textarea:focus { border-color: #557fc0; box-shadow: 0 0 0 3px rgb(122 167 255 / 12%); }
.config-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.editor-panel { display: flex; flex-direction: column; min-height: 520px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 0 17px; border-bottom: 1px solid var(--line-soft); background: rgb(255 255 255 / 1.5%); }
.panel-title { display: flex; align-items: center; gap: 10px; }
.panel-title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 15px var(--blue); }
.output-panel .panel-title::before { background: var(--mint); box-shadow: 0 0 15px var(--mint); }
.panel h2 { margin: 0; font-size: 14px; letter-spacing: .01em; }
.editor {
  display: block; flex: 1; width: 100%; min-height: 380px; padding: 20px; resize: vertical; border: 0; border-radius: 0;
  background: var(--editor); color: #dce7f5; outline: none; font: 14px/1.72 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4;
}
.panel-foot { display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 66px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.status { margin: 0; color: var(--muted); font-size: 13px; }
.status.error { color: var(--danger); }
button { border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; background: #162238; color: #dbe5f3; cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
button:hover { border-color: #5273a2; background: #1a2942; }
button:active { transform: translateY(1px); }
button.primary { min-width: 126px; border-color: transparent; background: linear-gradient(120deg, var(--mint), #82d7ff); color: #071512; font-weight: 800; box-shadow: 0 8px 24px rgb(74 213 172 / 16%); }
button.primary:hover { background: linear-gradient(120deg, #92ffd5, #9cdeff); }
button.ghost { background: transparent; }
button:disabled { cursor: wait; opacity: .56; transform: none; }
.privacy-note { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 0; padding: 14px 16px; border: 1px solid #263c5b; border-radius: 13px; background: rgb(19 34 56 / 74%); color: var(--muted); font-size: 13px; }
.privacy-note strong { color: #cbd8e9; }
.privacy-icon { flex: 0 0 auto; color: var(--blue); font: 700 15px/1.5 ui-monospace, monospace; }
footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; color: var(--muted); font-size: 13px; }
footer a { color: #b8c8df; text-decoration: none; }
footer a:hover { color: var(--mint); }
.small { color: var(--muted); font-size: 12px; }
@media (max-width: 820px) {
  .shell { width: min(100% - 22px, 680px); padding-top: 18px; }
  .topbar { margin-bottom: 30px; }
  .hero { display: block; }
  .trust { justify-content: flex-start; margin-top: 20px; }
  .config-grid, .workspace { grid-template-columns: 1fr; }
  .editor-panel { min-height: 420px; }
  .editor { min-height: 310px; }
  .panel-foot { align-items: flex-start; flex-direction: column; }
  button.primary { width: 100%; }
}

