/* ------------------------------------------------------------------
   Code to Snippet — simple light theme, one blue accent
------------------------------------------------------------------ */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --ink: #15171c;
  --ink-soft: #3d424d;
  --muted: #6b7280;
  --line: #e4e6ea;
  --line-strong: #d3d7de;
  --accent: #2f5bea;
  --accent-ink: #2347c4;
  --accent-soft: #eef2ff;
  --code-bg: #15171c;
  --code-text: #d6dae2;
  --code-muted: #6d7688;
  --radius: 16px;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 50% -160px, #e8edff 0%, rgba(232, 237, 255, 0) 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: #dbe4ff;
  color: #0d1a3a;
}

:focus-visible {
  outline: 2px solid rgba(47, 91, 234, 0.55);
  outline-offset: 2px;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 249, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding-top: 1px;
  border: 1px solid #d9e2ff;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.brand-arrow {
  margin: 0 4px;
  color: #9aa1ae;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  color: var(--muted);
}

.site-nav a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

/* Hero ------------------------------------------------------------ */

.hero {
  padding: 68px 0 34px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.2rem);
  font-weight: 640;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero h1 .accent {
  color: var(--accent);
}

.lede {
  max-width: 58ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.65;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12.5px;
}

.meta-item + .meta-item::before {
  content: "·";
  margin: 0 14px;
  color: #b3b9c4;
}

/* Cards and settings ---------------------------------------------- */

.tool {
  margin-top: 8px;
  scroll-margin-top: 84px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 8px 24px -20px rgba(16, 24, 40, 0.18);
}

.settings {
  padding: 22px 24px 20px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.settings .card-head {
  margin-bottom: 18px;
}

.card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.badge {
  flex: none;
  padding: 4px 9px;
  border: 1px solid #dbe4ff;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.field-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.85fr 1.35fr 0.95fr;
  gap: 14px;
}

.field {
  min-width: 0;
}

.field label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
}

.optional {
  padding: 1.5px 7px;
  border-radius: 999px;
  background: #f1f2f5;
  color: #5b6270;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #a2a8b4;
}

.field input:focus,
.field select:focus {
  border-color: #9db3f6;
  box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.12);
}

.field select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.settings-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #dfe2e8;
  transition: background 0.16s ease;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25);
  transition: transform 0.16s ease;
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(14px);
}

.toggle input:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.22);
}

.hint {
  margin-left: 5px;
  padding: 2px 6px;
  border: 1px solid #e8eaee;
  border-radius: 5px;
  background: #f3f4f6;
  color: #5f6673;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
}

.micro {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.micro code,
.cheat-note code,
.faq-item code {
  padding: 1px 4px;
  border: 1px solid #e8eaee;
  border-radius: 4px;
  background: #f3f4f6;
  font-family: var(--mono);
  font-size: 0.92em;
}

/* Workspace and editors ------------------------------------------- */

.workspace {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.editor-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.editor-head {
  flex: none;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.head-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.head-title h2 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.window-dots {
  display: flex;
  flex: none;
  gap: 4px;
  margin-right: 2px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5d9e0;
}

.file-name {
  color: var(--ink-soft);
  font-family: var(--mono) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfd4dc;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.status-dot.is-valid {
  background: #1f9d67;
  box-shadow: 0 0 0 3px rgba(31, 157, 103, 0.14);
}

.head-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.06s ease;
}

.btn:hover:not(:disabled) {
  border-color: #c8cdd6;
  background: #f6f7f9;
  color: var(--ink);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  border-color: #9db3f6;
  box-shadow: 0 0 0 3px rgba(47, 91, 234, 0.18);
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
  color: #fff;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  border-color: transparent;
  background: #eef0f4;
  color: var(--ink);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.is-copied {
  border-color: #bfe6d3;
  background: #e9f7f0;
  color: #0f6b45;
}

.editor-shell {
  min-height: 0;
  flex: 1;
}

.editor {
  position: relative;
  display: flex;
  height: 430px;
  background: var(--code-bg);
}

.editor:focus-within {
  box-shadow: inset 0 0 0 1px rgba(114, 150, 255, 0.5);
}

.gutter {
  flex: none;
  width: 52px;
  padding: 16px 10px 24px 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  color: #7b8494;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 21px;
  text-align: right;
  user-select: none;
}

.gutter-inner span {
  display: block;
  height: 21px;
}

.editor textarea {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 16px 18px 24px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 21px;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
  resize: none;
  caret-color: #7da2ff;
}

.editor textarea::placeholder {
  color: #596273;
}

.viewport {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.viewport:focus-visible {
  outline: 2px solid rgba(114, 150, 255, 0.55);
  outline-offset: -2px;
}

.code-output {
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 16px 20px 24px;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 21px;
  tab-size: 2;
}

.tok-key { color: #a9c4ff; }
.tok-string { color: #b9dfa8; }
.tok-number { color: #f0b37e; }
.tok-literal { color: #c6a8ff; }
.tok-punct { color: #7e8798; }

.editor textarea::-webkit-scrollbar,
.viewport::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.editor textarea::-webkit-scrollbar-track,
.viewport::-webkit-scrollbar-track {
  background: transparent;
}

.editor textarea::-webkit-scrollbar-thumb,
.viewport::-webkit-scrollbar-thumb {
  border: 3px solid var(--code-bg);
  border-radius: 10px;
  background: #2c313d;
}

.editor textarea::-webkit-scrollbar-thumb:hover,
.viewport::-webkit-scrollbar-thumb:hover {
  background: #3a4050;
}

.editor-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 32px;
  background: var(--code-bg);
  color: var(--code-muted);
  text-align: center;
}

.editor-empty strong {
  color: #aeb6c5;
  font-size: 13px;
  font-weight: 600;
}

.editor-empty span {
  font-size: 12.5px;
}

.card-foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
}

.foot-hint {
  color: var(--muted);
  font-size: 11px;
}

.status {
  font-size: 12px;
  font-weight: 500;
}

.status.is-error { color: #b42318; }
.status.is-ready { color: #0f6b45; }

.local-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.local-note svg {
  width: 13px;
  height: 13px;
  color: #8a92a0;
}

/* Info, cheat sheet, FAQ ------------------------------------------ */

.info {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 70px;
  align-items: start;
  margin-top: 96px;
  scroll-margin-top: 84px;
}

.info-steps h2 {
  max-width: 18ch;
  margin: 0 0 26px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.steps {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 14px;
}

.step-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.steps p {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.step-note {
  max-width: 52ch;
  margin: 26px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.step-note strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.cheat {
  padding: 22px 24px;
  scroll-margin-top: 84px;
}

.cheat .card-head {
  margin-bottom: 8px;
}

.cheat .card-head h2 {
  margin-bottom: 5px;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.cheat-list {
  margin: 0;
  padding: 0;
}

.cheat-list > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed #e8eaee;
}

.cheat-list > div:last-child {
  border-bottom: 0;
}

.cheat-list dt {
  margin: 0;
}

.cheat-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.cheat-list code {
  padding: 3px 7px;
  border: 1px solid #e7e9ee;
  border-radius: 6px;
  background: #f4f5f7;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.cheat-note {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.faq {
  display: grid;
  grid-template-columns: 0.72fr 1.4fr;
  gap: 64px;
  align-items: start;
  margin-top: 80px;
  scroll-margin-top: 84px;
}

.faq-intro h2 {
  max-width: 14ch;
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.faq-intro > p:not(.eyebrow) {
  max-width: 32ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item summary:focus-visible {
  outline-offset: -3px;
}

.faq-item p {
  max-width: 70ch;
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* Footer ---------------------------------------------------------- */

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 38px;
  color: var(--muted);
  font-size: 12px;
}

.footer-brand {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.footer-brand span {
  margin: 0 3px;
  color: var(--muted);
}

.footer-meta a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-meta a:hover {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

/* Responsive ------------------------------------------------------ */

@media (max-width: 980px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .editor {
    height: 360px;
  }

  .info {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .info-steps h2 {
    max-width: 22ch;
  }

  .faq {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 28px);
  }

  .header-inner {
    height: 56px;
  }

  .site-nav {
    gap: 14px;
    font-size: 12.5px;
  }

  .site-nav a:last-child {
    display: none;
  }

  .hero {
    padding: 44px 0 24px;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

  .lede {
    font-size: 15px;
  }

  .settings {
    padding: 18px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .settings-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .micro {
    text-align: left;
  }

  .editor-head {
    padding: 11px 12px;
  }

  .editor-head .btn {
    padding: 0 8px;
  }

  .editor {
    height: 320px;
  }

  .card-foot {
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 9px 12px;
  }

  .cheat {
    padding: 18px;
  }

  .cheat-list > div {
    grid-template-columns: 112px 1fr;
    gap: 12px;
  }

  .info {
    margin-top: 64px;
  }

  .faq {
    margin-top: 56px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 30px;
  }
}

@media (max-width: 420px) {
  .window-dots {
    display: none;
  }

  .head-title {
    gap: 7px;
  }

  .editor-head {
    gap: 10px;
  }

  .editor-head .btn {
    padding: 0 7px;
  }

  .head-actions {
    gap: 4px;
  }

  .head-actions .btn span {
    display: none;
  }

  .local-note {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .site-nav a:not(:first-child) {
    display: none;
  }

  .toggle .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}


