:root {
  --bg: #07111d;
  --surface: #0f1b2b;
  --border: #22344c;
  --text: #eef4fb;
  --muted: #a8b5c6;
  --dim: #6f8197;
  --accent: #20c997;
  --blue: #2bb8d6;
  --warning: #f5b84b;
  --danger: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(32, 201, 151, 0.18), transparent 31%),
    radial-gradient(circle at 88% 18%, rgba(43, 184, 214, 0.15), transparent 30%),
    linear-gradient(135deg, #07111d, #081824 54%, #07111d);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }
a { color: inherit; }

.disclaimer-modal {
  background: rgba(3, 8, 14, 0.78);
  backdrop-filter: blur(10px);
  display: grid;
  inset: 0;
  padding: 20px;
  place-items: center;
  position: fixed;
  z-index: 100;
}

.disclaimer-modal[hidden] { display: none; }

.disclaimer-dialog {
  background: var(--surface);
  border: 1px solid rgba(245, 184, 75, 0.36);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 680px;
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  width: min(100%, 680px);
}

.disclaimer-dialog h2 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.disclaimer-dialog p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.accept-check {
  align-items: flex-start;
  background: rgba(245, 184, 75, 0.08);
  border: 1px solid rgba(245, 184, 75, 0.28);
  border-radius: 8px;
  color: #f4d39b;
  cursor: pointer;
  display: flex;
  gap: 10px;
  line-height: 1.5;
  margin-top: 20px;
  padding: 13px 14px;
}

.accept-check input {
  flex: 0 0 auto;
  margin-top: 3px;
  width: auto;
}

.accept-check span { font-size: 13px; }
.disclaimer-dialog .button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.48;
  transform: none;
}

.topbar {
  align-items: center;
  background: rgba(7, 17, 29, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  text-decoration: none;
}

.brand small {
  color: var(--dim);
  display: block;
  font-size: 11px;
  margin-top: 1px;
}

.mark {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border-radius: 8px;
  color: white;
  display: grid;
  font-weight: 850;
  height: 42px;
  place-items: center;
  width: 42px;
}

nav {
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 22px;
}

nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }

main {
  margin: 0 auto;
  width: min(1180px, calc(100% - 36px));
}

.hero {
  align-items: center;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 66vh;
  padding: 78px 0 64px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(42px, 8vw, 78px);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 22px;
  max-width: 780px;
}

.hero-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 720px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button, .mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
}

.button:hover, .mini:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border: 0;
  color: white;
}

.wide { width: 100%; margin-top: 18px; }

.hero-panel {
  background: rgba(15, 27, 43, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 24px;
}

.hero-panel div {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.hero-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hero-panel span {
  display: block;
  font-size: 30px;
  font-weight: 850;
}

.hero-panel small {
  color: var(--dim);
  font-size: 12px;
}

.workspace, .systems-grid, .about { scroll-margin-top: 86px; }

.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: 30px; margin: 0; }

.notice {
  background: rgba(245, 184, 75, 0.1);
  border: 1px solid rgba(245, 184, 75, 0.34);
  border-radius: 8px;
  color: #f4d39b;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.notice strong { color: var(--warning); }

.tool {
  display: grid;
  gap: 16px;
  grid-template-columns: 230px minmax(0, 1fr) 390px;
}

.systems {
  align-content: start;
  display: grid;
  gap: 8px;
}

.system-btn {
  background: rgba(15, 27, 43, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: block;
  font-weight: 750;
  padding: 11px 12px;
  text-align: left;
  width: 100%;
}

.system-btn:hover {
  background: rgba(21, 38, 59, 0.95);
  border-color: rgba(32, 201, 151, 0.36);
  color: var(--text);
}

.system-btn strong,
.system-btn small {
  display: block;
}

.system-btn small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 3px;
}

.system-btn.active {
  background: rgba(32, 201, 151, 0.13);
  border-color: rgba(32, 201, 151, 0.55);
  color: var(--accent);
}

.system-btn.active small {
  color: rgba(230, 255, 247, 0.75);
}

.card {
  background: rgba(15, 27, 43, 0.82);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-head, .result-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.form-head h3, .result-top h3 {
  font-size: 24px;
  margin: 0 0 4px;
}

.form-head p, .result-top small {
  color: var(--dim);
  font-size: 12px;
  margin: 0;
}

.badge {
  background: rgba(32, 201, 151, 0.12);
  border: 1px solid rgba(32, 201, 151, 0.28);
  border-radius: 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  padding: 5px 9px;
  text-transform: uppercase;
}

.field { margin-bottom: 14px; }

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  margin-bottom: 14px;
}

label {
  color: var(--dim);
  display: block;
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 5px;
}

input, select, textarea {
  background: #081423;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mini {
  font-size: 11px;
  padding: 7px 10px;
}

.mini.accent {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border: 0;
  color: white;
}

.result-list {
  display: grid;
  gap: 13px;
  margin: 0;
}

.result-list div {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

dd {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

#recommendation.ok { color: var(--accent); }
#recommendation.warn { color: var(--warning); }

.result-warning {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 8px;
  color: #f6b2b2;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 16px;
  padding: 11px 12px;
}

.ai-assistant {
  background: rgba(8, 20, 35, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 16px;
  padding: 14px;
}

.ai-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ai-head small {
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-head h4 {
  font-size: 15px;
  margin: 3px 0 0;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-output {
  background: rgba(15, 27, 43, 0.86);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 10px;
  min-height: 86px;
  padding: 11px 12px;
  white-space: pre-wrap;
}

.systems-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 72px 0 18px;
}

.system-card h3 { margin-bottom: 8px; }

.system-card p, .about p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 0;
}

.about { margin: 18px 0; }
.about { margin-bottom: 72px; }
.about p { margin-bottom: 14px; }
.about p:last-child { margin-bottom: 0; }
.about a {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

footer {
  border-top: 1px solid var(--border);
  color: var(--dim);
  display: flex;
  font-size: 12px;
  gap: 16px;
  justify-content: space-between;
  margin: 0 auto;
  padding: 30px 0 44px;
  width: min(1180px, calc(100% - 36px));
}

@media (max-width: 1020px) {
  .hero, .tool { grid-template-columns: 1fr; }
  .systems { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (max-width: 640px) {
  nav { display: none; }
  main, footer { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 46px; }
  .actions .button { width: 100%; }
}
