:root {
  color-scheme: dark;
  --bg: #11110f;
  --panel: #191917;
  --panel-strong: #20201d;
  --line: #34342f;
  --line-soft: #292925;
  --text: #f2f0e8;
  --muted: #aaa69a;
  --faint: #777266;
  --accent: #f05a43;
  --accent-2: #47c2a5;
  --accent-3: #f2bd4b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 6px;
  --body-wash: linear-gradient(180deg, rgba(240, 90, 67, 0.08), transparent 260px);
  --body-glow: radial-gradient(circle at 50% 0, rgba(71, 194, 165, 0.08), transparent 390px);
  --dock-bg: rgba(17, 17, 15, 0.86);
  --dock-line: rgba(255, 255, 255, 0.08);
  --field-bg: #11110f;
  --command-bg: #080807;
  --command-border: #3f3f39;
  --command-code: #f8f3df;
  --command-inset: rgba(255, 255, 255, 0.025);
  --tooltip-bg: #080807;
  --preset-bg: rgba(25, 25, 23, 0.78);
  --button-bg: #121210;
  --option-bg: rgba(25, 25, 23, 0.94);
  --code-bg: #10100e;
  --description: #d6d1c4;
  --toggle-bg: #0f0f0d;
  --copy-active-text: #11110f;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5ef;
  --panel: #fffdf7;
  --panel-strong: #f0eee6;
  --line: #d8d2c3;
  --line-soft: #e5dfd2;
  --text: #181713;
  --muted: #676052;
  --faint: #877f70;
  --accent: #d94d3a;
  --accent-2: #178f78;
  --accent-3: #af7418;
  --shadow: 0 18px 36px rgba(72, 55, 31, 0.15);
  --body-wash: linear-gradient(180deg, rgba(217, 77, 58, 0.13), transparent 260px);
  --body-glow: radial-gradient(circle at 50% 0, rgba(23, 143, 120, 0.14), transparent 390px);
  --dock-bg: rgba(247, 245, 239, 0.88);
  --dock-line: rgba(24, 23, 19, 0.1);
  --field-bg: #fffdf7;
  --command-bg: #fffaf0;
  --command-border: #cfc6b3;
  --command-code: #272017;
  --command-inset: rgba(24, 23, 19, 0.035);
  --tooltip-bg: #181713;
  --preset-bg: rgba(255, 253, 247, 0.82);
  --button-bg: #fffdf7;
  --option-bg: rgba(255, 253, 247, 0.96);
  --code-bg: #f3ebda;
  --description: #3f392f;
  --toggle-bg: #ece7dc;
  --copy-active-text: #fffdf7;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    var(--body-wash),
    var(--body-glow),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

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

.site-header {
  padding: 44px 0 28px;
}

.header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  gap: 32px;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.theme-button {
  z-index: 2;
  width: 40px;
  min-height: 40px;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 2.1rem + 1.8vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h1 code {
  color: var(--accent-3);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

.intro {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
}

.command-dock {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  border-block: 1px solid var(--dock-line);
  background: var(--dock-bg);
  backdrop-filter: blur(16px);
}

.command-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: stretch;
}

.app-name-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.app-name-field span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--field-bg);
  outline: none;
}

input {
  padding: 0 12px;
}

select {
  padding: 0 34px 0 12px;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(71, 194, 165, 0.18);
}

.command-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--command-border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    var(--command-bg);
  box-shadow: inset 0 0 0 1px var(--command-inset);
  overflow-x: auto;
}

.command-shell code {
  white-space: nowrap;
  color: var(--command-code);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.93rem;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent-3);
}

.icon-button :is(svg, i) {
  width: 22px;
  height: 22px;
  font-size: 1.15rem;
  fill: currentColor;
}

.tooltip {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: -34px;
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--tooltip-bg);
  color: #f2f0e8;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.icon-button:hover .tooltip,
.icon-button:focus-visible .tooltip,
.saved-icon-button:hover .tooltip,
.saved-icon-button:focus-visible .tooltip {
  opacity: 1;
  transform: translateY(0);
}

.theme-button .tooltip {
  top: 50%;
  right: calc(100% + 8px);
  bottom: auto;
  transform: translate(4px, -50%);
}

.theme-button:hover .tooltip,
.theme-button:focus-visible .tooltip {
  transform: translate(0, -50%);
}

.controls-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 28px 0 64px;
}

.preset-panel {
  position: sticky;
  top: 102px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--preset-bg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.panel-section {
  display: grid;
  gap: 10px;
}

.panel-section + .panel-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.preset-panel h2,
.section-heading h2 {
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.panel-section h2 {
  margin-bottom: 0;
}

.preset-actions {
  display: grid;
  gap: 8px;
}

.preset-button,
.save-config-button,
.saved-load,
.saved-icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--text);
  cursor: pointer;
}

.preset-button {
  text-align: left;
  padding: 0 12px;
}

.preset-button:hover,
.save-config-button:hover,
.saved-load:hover,
.saved-icon-button:hover {
  border-color: var(--accent-2);
}

.saved-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.save-config-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent-2);
  font-weight: 700;
}

.save-config-button :is(svg, i) {
  width: 15px;
}

.saved-list {
  display: grid;
  gap: 8px;
}

.saved-empty {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.saved-point {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  gap: 6px;
}

.saved-load {
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-name-input {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
}

.saved-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0;
  color: var(--muted);
}

.saved-icon-button :is(svg, i) {
  width: 14px;
  height: 14px;
}

.options-root {
  display: grid;
  gap: 22px;
}

.option-section {
  display: grid;
  gap: 12px;
}

.promo-ad {
  --promo-border: rgba(0, 105, 255, 0.48);
  --promo-glow: rgba(0, 221, 255, 0.3);
  --promo-start: #003ea8;
  --promo-mid: #0069ff;
  --promo-end: #0047b3;
  --promo-shadow: rgba(0, 64, 175, 0.24);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--promo-border);
  border-radius: var(--radius);
  color: #ffffff;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(circle at 100% 0, var(--promo-glow), transparent 34%),
    linear-gradient(135deg, var(--promo-start), var(--promo-mid) 58%, var(--promo-end));
  box-shadow: 0 16px 34px var(--promo-shadow);
}

.hover-ad {
  --promo-border: rgba(255, 255, 255, 0.2);
  --promo-glow: rgba(255, 255, 255, 0.1);
  --promo-start: #20272e;
  --promo-mid: #2b333b;
  --promo-end: #11181f;
  --promo-shadow: rgba(17, 24, 31, 0.24);
}

.simple-analytics-ad {
  --promo-border: rgba(222, 50, 67, 0.58);
  --promo-glow: rgba(255, 215, 219, 0.2);
  --promo-start: #7d1723;
  --promo-mid: rgb(222 50 67);
  --promo-end: #4a0d15;
  --promo-shadow: rgba(222, 50, 67, 0.2);
}

.promo-ad:hover {
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.promo-ad-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  color: #ffffff;
  font-weight: 900;
}

.promo-ad-mark :is(svg, i) {
  width: 34px;
  height: 34px;
  font-size: 2rem;
}

.promo-ad-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.promo-ad-kicker {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.promo-ad-copy strong {
  font-size: clamp(1.05rem, 0.98rem + 0.45vw, 1.4rem);
  line-height: 1.16;
}

.promo-ad-copy span:last-child {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

.promo-ad-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  white-space: nowrap;
}

.promo-ad-action :is(svg, i) {
  width: 14px;
}

.section-heading {
  padding: 0 2px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.option-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
}

.option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 22px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  background: var(--option-bg);
}

.option-row-toggle {
  cursor: pointer;
}

.option-row-toggle:hover {
  background:
    linear-gradient(90deg, rgba(71, 194, 165, 0.08), transparent 55%),
    var(--option-bg);
}

.option-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 8px;
}

.option-title-line h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.option-title-line code {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-3);
  background: var(--code-bg);
  font-size: 0.78rem;
}

.option-description {
  margin-bottom: 7px;
  color: var(--description);
  line-height: 1.5;
}

.option-example {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.option-example::before {
  content: "Useful when ";
  color: var(--accent-2);
  font-weight: 700;
}

.option-control {
  display: flex;
  justify-content: flex-end;
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 32px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle span {
  width: 54px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--toggle-bg);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle input:checked + span {
  border-color: rgba(71, 194, 165, 0.85);
  background: rgba(71, 194, 165, 0.18);
}

.toggle input:checked + span::after {
  transform: translateX(22px);
  background: var(--accent-2);
}

.text-control {
  max-width: 230px;
}

.copy-button.copied {
  color: var(--copy-active-text);
  background: var(--accent-2);
}

@media (max-width: 840px) {
  .site-header {
    padding-top: 30px;
  }

  .header-grid,
  .controls-layout,
  .option-row {
    grid-template-columns: 1fr;
  }

  .header-side {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    justify-items: stretch;
  }

  .theme-button {
    justify-self: start;
  }

  .theme-button .tooltip {
    top: auto;
    right: auto;
    bottom: calc(100% + 8px);
    left: 0;
    transform: translateY(-4px);
  }

  .theme-button:hover .tooltip,
  .theme-button:focus-visible .tooltip {
    transform: translateY(0);
  }

  .command-grid {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .app-name-field {
    grid-column: 1 / -1;
  }

  .preset-panel {
    position: static;
  }

  .option-control {
    justify-content: flex-start;
  }

  .text-control {
    max-width: none;
  }

  .promo-ad {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .promo-ad-action {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 2.15rem;
  }

  .command-dock {
    padding: 9px 0;
  }

  .command-shell {
    min-height: 56px;
  }

  .option-row {
    min-height: 0;
    padding: 15px;
  }

  .promo-ad {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 16px;
  }

  .promo-ad-mark {
    width: 48px;
    height: 48px;
  }
}
