:root {
  --black: #121212;
  --dark: #1E1E1E;
  --green: #0F3D2E;
  --deep-green: #1B5E20;
  --white: #FFFFFF;
  --muted: #B7BDB7;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --surface: rgba(30, 30, 30, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(15, 61, 46, 0.72) 0%, rgba(18, 18, 18, 0) 42%),
    linear-gradient(180deg, #121212 0%, #171917 52%, #101010 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 26px;
}

.tag,
.section-heading p {
  margin: 0 0 8px;
  color: #DDE9DF;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.1rem, 4vw, 4.25rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #EEF5EF;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #78D77F;
  box-shadow: 0 0 16px rgba(120, 215, 127, 0.75);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-panel {
  padding: 24px;
}

.result-panel {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 72px);
  padding: 24px;
}

.section-heading {
  margin-bottom: 22px;
}

.field-block {
  display: block;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.field-block span,
legend {
  display: block;
  margin: 0 0 10px;
  color: #F7FAF7;
  font-weight: 750;
  line-height: 1.35;
}

.field-block .required-mark {
  display: inline;
  margin: 0 0 0 4px;
  color: #FF5F5F;
  font-weight: 900;
}

.hint {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-card,
.radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #F4F8F4;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.option-card:hover,
.radio-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.075);
}

.option-card:has(input:checked),
.radio-card:has(input:checked) {
  border-color: rgba(120, 215, 127, 0.74);
  background: rgba(15, 61, 46, 0.78);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--deep-green);
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--white);
  outline: none;
  padding: 14px 15px;
  resize: vertical;
  min-height: 48px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

textarea::placeholder,
input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

textarea:focus,
input[type="text"]:focus {
  border-color: rgba(120, 215, 127, 0.8);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.2);
}

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

.error-text {
  min-height: 19px;
  margin: 8px 0 0;
  color: #FFB4A8;
  font-size: 0.88rem;
  font-weight: 700;
}

.button-row,
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.button-row {
  margin-top: 26px;
}

.result-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  flex: 1;
  background: linear-gradient(135deg, var(--deep-green), var(--green));
  color: var(--white);
  box-shadow: 0 16px 36px rgba(15, 61, 46, 0.34);
}

.secondary-button,
.icon-button {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  color: #F4F8F4;
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.38);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 460px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(15, 61, 46, 0.42), rgba(30, 30, 30, 0.25)),
    rgba(255, 255, 255, 0.035);
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.empty-state p {
  max-width: 490px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.strategy-output {
  display: grid;
  gap: 14px;
}

.strategy-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.strategy-section.error-result {
  border-color: rgba(255, 118, 118, 0.45);
  background: rgba(120, 28, 28, 0.18);
}

.strategy-section h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.strategy-section h4 {
  margin: 16px 0 8px;
  color: #DDE9DF;
  font-size: 0.98rem;
}

.strategy-section p,
.strategy-section li {
  color: #DCE3DD;
  line-height: 1.58;
}

.strategy-section ul,
.strategy-section ol {
  margin: 0;
  padding-left: 20px;
}

.strategy-section li + li {
  margin-top: 7px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(18, 18, 18, 0.5);
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(120, 215, 127, 0.14);
  color: #DDF2DF;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hidden {
  display: none;
}

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

  .result-panel {
    position: static;
    min-height: auto;
  }
}

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

  .topbar,
  .button-row,
  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-pill {
    align-self: flex-start;
  }

  .form-panel,
  .result-panel {
    padding: 17px;
  }

  .option-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .icon-button {
    width: 100%;
  }

  .result-actions {
    width: 100%;
    flex-direction: column;
  }
}
