:root {
  color-scheme: dark;
  --bg: #0a0c0f;
  --panel: #11151a;
  --panel-2: #151a20;
  --line: #27303a;
  --muted: #8e9aa7;
  --text: #f4f7fa;
  --accent: #d7ff3f;
  --accent-soft: rgba(215, 255, 63, 0.1);
  --orange: #ff9d4d;
  --red: #ff6b65;
  --radius: 18px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, rgba(82, 106, 64, 0.16), transparent 28rem),
    linear-gradient(180deg, #0c0f13, #080a0d 62%);
}

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

button {
  cursor: pointer;
}

.site-header,
main,
footer {
  width: min(1440px, calc(100% - 56px));
  margin-inline: auto;
}

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  letter-spacing: -0.03em;
  font-size: 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #0b0d0f;
  background: var(--accent);
  border-radius: 9px 9px 3px 9px;
  font-weight: 900;
}

.status-pill,
.source-badge {
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 12, 15, 0.7);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: end;
  gap: 48px;
  padding: 74px 0 60px;
}

.eyebrow,
.kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(52px, 6.3vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.072em;
  max-width: 1040px;
  margin: 0;
}

.hero-copy {
  color: #b7c0c9;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.55;
  max-width: 760px;
  margin: 28px 0 0;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(17, 21, 26, 0.64);
}

.hero-proof div {
  min-height: 96px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-proof div:nth-child(even) {
  border-right: 0;
}

.hero-proof div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.hero-proof strong {
  color: #596573;
  font-size: 12px;
}

.hero-proof span {
  font-weight: 720;
}

.workspace {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(520px, 1.22fr);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.28);
}

.input-panel {
  display: flex;
  flex-direction: column;
  padding: 34px;
  gap: 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(215, 255, 63, 0.025), transparent 38%),
    var(--panel);
}

.panel-heading,
.result-topline,
.card-heading,
.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0;
  letter-spacing: -0.025em;
}

label {
  color: #c2cad2;
  font-size: 13px;
  font-weight: 650;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

label.grow {
  flex: 1;
}

input,
select,
textarea {
  color: var(--text);
  background: #0b0e12;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  padding: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(215, 255, 63, 0.65);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  flex: 1;
  resize: vertical;
  min-height: 270px;
  line-height: 1.55;
}

.text-button,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
}

.icon-button {
  font-size: 28px;
  color: var(--muted);
}

.privacy-note {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.privacy-note p {
  margin: 0;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-weight: 780;
}

.primary-button {
  color: #0b0d0f;
  background: var(--accent);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.secondary-button {
  color: var(--text);
  background: #202730;
  border: 1px solid #303a45;
}

.result-panel {
  position: relative;
  padding: 40px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--panel-2);
  background-size: 34px 34px;
}

.empty-state,
.error-state {
  height: 100%;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 560px;
  margin: auto;
}

.empty-state > p:last-child,
.error-state > p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
}

.orbit {
  width: 126px;
  height: 126px;
  position: relative;
  border: 1px solid #303943;
  border-radius: 50%;
  margin-bottom: 32px;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid #252e37;
}

.orbit::before {
  inset: 20px;
}

.orbit::after {
  inset: 43px;
  background: var(--accent);
  border: 0;
  box-shadow: 0 0 28px rgba(215, 255, 63, 0.25);
}

.orbit span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #65717c;
}

.orbit span:nth-child(1) {
  top: -4px;
  left: 59px;
}

.orbit span:nth-child(2) {
  right: 4px;
  bottom: 19px;
}

.orbit span:nth-child(3) {
  left: 10px;
  bottom: 12px;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.score-row {
  display: flex;
  align-items: baseline;
}

.score-row strong {
  font-size: 68px;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.score-row span {
  color: var(--accent);
  font-size: 22px;
}

.summary {
  color: #c8d0d8;
  font-size: 18px;
  line-height: 1.55;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.result-grid,
.evidence-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-grid article,
.evidence-row article,
.questions-card {
  border: 1px solid var(--line);
  background: rgba(10, 13, 16, 0.76);
  border-radius: 15px;
  padding: 22px;
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

dl div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
}

.muted {
  color: #626d78;
}

.issue-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.issue-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
}

.severity {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 6px;
  border-radius: 5px;
}

.severity-blocking {
  background: rgba(255, 107, 101, 0.14);
  color: var(--red);
}

.severity-important {
  background: rgba(255, 157, 77, 0.13);
  color: var(--orange);
}

.severity-minor {
  background: rgba(142, 154, 167, 0.13);
  color: var(--muted);
}

.questions-card ol {
  margin: 22px 0 0;
  padding-left: 22px;
  color: #dce2e8;
}

.questions-card li {
  padding: 8px 0 8px 7px;
  line-height: 1.45;
}

.card-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.evidence-row p:last-child {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0;
  font-size: 13px;
}

.integration-strip {
  padding: 52px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.integration-strip > p {
  margin: 0;
  color: #66727e;
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 780;
}

.integration-strip div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.integration-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #9aa5b0;
  font-size: 12px;
}

dialog {
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.dialog-card {
  width: min(680px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border: 1px solid #323b45;
  border-radius: 18px;
  background: #12171c;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.dialog-card > p {
  color: var(--muted);
  line-height: 1.55;
}

.checkbox-label {
  flex-direction: row;
  align-items: flex-start;
  font-weight: 500;
  line-height: 1.45;
}

.checkbox-label input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
}

.dialog-actions {
  justify-content: flex-end;
  align-items: center;
}

.dialog-actions .primary-button {
  min-height: 44px;
}

.dialog-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--accent) !important;
  font-size: 13px;
}

.call-preview {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(215, 255, 63, 0.24);
  border-radius: 14px;
  background: rgba(215, 255, 63, 0.04);
}

.call-preview p,
.call-preview ul,
.call-preview ol {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.call-preview ul,
.call-preview ol {
  padding-left: 20px;
}

.call-preview code {
  color: var(--accent);
  font-size: 11px;
  overflow-wrap: anywhere;
}

footer {
  min-height: 100px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #5d6873;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

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

  .hero {
    align-items: start;
  }

  .workspace {
    min-height: auto;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1440px);
  }

  .status-pill {
    max-width: 170px;
    text-align: right;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 38px;
  }

  h1 {
    font-size: 48px;
  }

  .workspace {
    border-radius: 16px;
  }

  .input-panel,
  .result-panel {
    padding: 24px;
  }

  .result-grid,
  .evidence-row {
    grid-template-columns: 1fr;
  }

  .integration-strip,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .integration-strip div {
    justify-content: flex-start;
  }
}
