:root {
  color-scheme: light;
  --bg: #fbfcfe;
  --surface: #fff;
  --soft: #f3f5f8;
  --fg: #1b2433;
  --muted: #677286;
  --line: #e5e9ef;
  --primary: #2563eb;
  --danger: #b83a42;
  --shadow: 0 10px 35px #182d5610;
  font-family: "Avenir Next", "Mona Sans Variable", "Trebuchet MS", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131820;
  --surface: #1b222d;
  --soft: #232c39;
  --fg: #e5ebf5;
  --muted: #9ba9be;
  --line: #313d50;
  --primary: #6899ff;
  --danger: #ff9197;
  --shadow: 0 10px 35px #0003;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 14px;
  font-weight: 650;
}
.top {
  height: 70px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo {
  display: flex;
  padding: 6px 10px;
  border-radius: 8px;
  background: #131e30;
}
.brand-logo img {
  display: block;
  width: 128px;
  height: auto;
}
:root[data-theme="dark"] .brand-logo {
  background: #131820;
}
.brand-product {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  border-left: 1px solid var(--line);
  padding-left: 15px;
  margin-left: 8px;
  letter-spacing: 0;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 38px 5vw 20px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
}
.heading p:not(.eyebrow) {
  margin-top: 10px;
  color: var(--muted);
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 650;
  margin-bottom: 10px;
}
.primary,
.outline,
.quiet,
.danger {
  border-radius: 7px;
  padding: 9px 14px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 12px;
}
.primary {
  background: var(--primary);
  color: #fff;
}
.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
.outline {
  background: var(--surface);
  border-color: var(--line);
  color: var(--fg);
}
.outline:hover:not(:disabled) {
  background: var(--soft);
}
.quiet,
.danger {
  background: none;
  color: var(--muted);
  padding: 5px 7px;
}
.quiet:hover,
.danger:hover {
  background: var(--soft);
}
.danger {
  color: var(--danger);
}
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--muted);
  background: var(--surface);
  margin-bottom: 20px;
  font-size: 12px;
}
.notice[data-error="true"] {
  color: var(--danger);
  border-color: var(--danger);
}
.workspace {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.settings {
  border-right: 1px solid var(--line);
}
.settings-section {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.settings-section h2 {
  margin-bottom: 15px;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.settings-section label:not(.check),
legend {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin: 13px 0 6px;
}
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  padding: 9px 10px;
  min-height: 38px;
}
textarea {
  resize: vertical;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
}
.account-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.segmented {
  display: flex;
  background: var(--soft);
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
}
.segmented label {
  flex: 1;
  margin: 0 !important;
}
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.segmented span,
.segmented button {
  display: block;
  text-align: center;
  border: 0;
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  background: none;
}
.segmented input:checked + span,
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 3px #0001;
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--primary);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}
output {
  float: right;
  font-weight: 400;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin-top: 12px;
}
input[type="checkbox"] {
  accent-color: var(--primary);
}
.settings-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.preview-panel {
  min-width: 0;
}
.preview-toolbar {
  height: 61px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.preview-toolbar > div:first-child {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.preview-toolbar b {
  color: var(--fg);
}
.preview-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}
.preview-canvas {
  padding: 34px;
  background: linear-gradient(145deg, var(--soft), var(--bg));
  min-height: 620px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.preview-site {
  width: 100%;
  padding: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: max-width 0.25s;
}
.preview-site.mobile {
  max-width: 375px;
  padding: 20px;
}
.site-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 0 28px;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--muted);
}
.site-line {
  margin-left: auto;
  width: 65px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}
.site-bottom {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.embed-section {
  padding: 25px 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  border-top: 1px solid var(--line);
}
.embed-section > div {
  flex: 1;
}
.embed-section p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
pre {
  width: 100%;
  margin: 0;
  padding: 16px;
  background: var(--soft);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 11px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  margin-top: 22px;
}
.footer nav {
  display: flex;
  gap: 18px;
}
dialog {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px #0003;
}
dialog::backdrop {
  background: #09142766;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
dialog p,
dialog label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
dialog label {
  display: block;
  margin-top: 20px;
  margin-bottom: 6px;
}
dialog .primary {
  width: 100%;
  margin-top: 15px;
}
.error {
  color: var(--danger);
  min-height: 18px;
  margin: 8px 0 0;
}
.legal {
  max-width: 720px;
}
.legal h1 {
  margin-bottom: 20px;
}
.legal h2 {
  margin-top: 28px;
}
.legal p,
.legal li {
  margin-top: 12px;
  color: var(--muted);
}
.legal a {
  color: var(--primary);
}
@media (max-width: 950px) {
  main {
    padding: 26px 22px;
  }
  .top {
    padding: 0 22px;
  }
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .preview-canvas {
    padding: 20px;
  }
  .preview-site {
    padding: 20px;
  }
  .preview-toolbar {
    padding: 0 14px;
  }
  .preview-toolbar #preview-kind {
    display: none;
  }
}
@media (max-width: 700px) {
  .top {
    height: 62px;
    padding: 0 16px;
  }
  .brand-product {
    display: none;
  }
  .brand-logo img {
    width: 110px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-actions button {
    font-size: 10px;
    padding: 7px 9px;
  }
  main {
    padding: 25px 16px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 28px;
  }
  .heading p:not(.eyebrow) {
    font-size: 12px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .settings {
    border-right: 0;
  }
  .settings-section {
    padding: 16px;
  }
  .preview-panel {
    border-top: 1px solid var(--line);
  }
  .preview-canvas {
    min-height: 450px;
    padding: 16px;
  }
  .settings-footer {
    position: static;
  }
  .embed-section {
    padding: 20px;
  }
  .footer {
    align-items: flex-start;
    gap: 10px;
  }
  .footer nav {
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
