:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182435;
  background: #f7f9fc;
}

html[data-theme="dark"],
html[data-site-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-site-theme="dark"],
html[data-site-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-site-theme="dark"] .app,
html[data-theme="dark"] .app-shell,
html[data-site-theme="dark"] .app-shell,
html[data-theme="dark"] .workspace,
html[data-site-theme="dark"] .workspace {
  background-color: #0c111b !important;
  color: #e8edf6 !important;
}

html[data-theme="dark"] body,
html[data-site-theme="dark"] body {
  background:
    radial-gradient(circle at 90% 0, rgba(49, 99, 229, 0.15), transparent 22rem),
    #0c111b !important;
}

html[data-theme="dark"] .editor-card,
html[data-site-theme="dark"] .editor-card {
  background: #151d2a;
  border-color: #263347;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] button,
html[data-site-theme="dark"] button {
  background: #151d2a;
  color: #e8edf6;
  border-color: #263347;
}

html[data-theme="dark"] button:hover,
html[data-site-theme="dark"] button:hover {
  border-color: #3163e5;
  color: #60a5fa;
}

html[data-theme="dark"] textarea,
html[data-site-theme="dark"] textarea {
  background: #192334;
  color: #e8edf6;
  border-color: #263347;
}

html[data-theme="dark"] .editor-heading p,
html[data-site-theme="dark"] .editor-heading p,
html[data-theme="dark"] .input-status,
html[data-site-theme="dark"] .input-status {
  color: #8e9bb0;
}

html[data-theme="dark"] .results article,
html[data-site-theme="dark"] .results article {
  background: #151d2a;
  border-color: #263347;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .results strong,
html[data-site-theme="dark"] .results strong {
  color: #60a5fa;
}

html[data-theme="dark"] .results span,
html[data-theme="dark"] .results small,
html[data-site-theme="dark"] .results span,
html[data-site-theme="dark"] .results small {
  color: #8e9bb0;
}

html[data-theme="dark"] .privacy-note,
html[data-site-theme="dark"] .privacy-note {
  color: #6ee7b7;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at 90% 0, rgba(49, 99, 229, 0.11), transparent 22rem),
    #f7f9fc;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 44px;
}

.app-header,
.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #3163e5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
}

.privacy-note {
  display: inline-flex;
  margin: 7px 0 0;
  align-items: center;
  gap: 8px;
  color: #587066;
  font-size: 0.86rem;
}

.privacy-note-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: #1b9a62;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.editor-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid #dbe2ec;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(36, 56, 89, 0.08);
}

.editor-heading label {
  display: block;
  font-size: 0.95rem;
  font-weight: 760;
}

.editor-heading p {
  margin: 5px 0 0;
  color: #69788d;
  font-size: 0.82rem;
  line-height: 1.45;
}

button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid #ccd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #334257;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  border-color: #3163e5;
  color: #1749c8;
}

button:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(49, 99, 229, 0.24);
  outline-offset: 2px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 230px;
  margin-top: 17px;
  padding: 17px;
  resize: vertical;
  border: 1px solid #cbd5e2;
  border-radius: 12px;
  background: #fbfcfe;
  color: #182435;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.input-status {
  margin: 9px 0 0;
  color: #718096;
  font-size: 0.8rem;
}

.results {
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.results article {
  display: grid;
  grid-column: span 2;
  min-height: 138px;
  padding: 19px;
  border: 1px solid #dbe2ec;
  border-radius: 16px;
  background: #ffffff;
  align-content: center;
  box-shadow: 0 8px 22px rgba(36, 56, 89, 0.05);
}

.results article:nth-child(5) {
  grid-column: 2 / span 2;
}

.results article:nth-child(6) {
  grid-column: 4 / span 2;
}

.results article:nth-child(7) {
  grid-column: 6 / span 2;
}

.results span,
.results small {
  color: #69788d;
}

.results span {
  font-size: 0.82rem;
  font-weight: 720;
}

.results strong {
  margin: 4px 0 1px;
  color: #1749c8;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.results small {
  font-size: 0.75rem;
}

@media (max-width: 860px) {
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results article,
  .results article:nth-child(n) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 22px;
  }

  .app-header,
  .editor-heading {
    flex-direction: column;
  }

  .editor-heading button {
    width: 100%;
  }

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

  .results article {
    min-height: 110px;
  }
}
