:root {
  --bg: #06111f;
  --panel: rgba(12, 27, 48, 0.82);
  --panel-strong: rgba(14, 35, 61, 0.94);
  --line: rgba(144, 190, 255, 0.16);
  --text: #eef6ff;
  --muted: #a9b9ce;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --good: #9ef2c9;
  --warn: #ffd38a;
  --danger: #ff9da6;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.15), transparent 28%),
    linear-gradient(135deg, #06111f 0%, #08101c 52%, #04070d 100%);
  color: var(--text);
  overflow-x: hidden;
}

.bg-orb { position: fixed; border-radius: 999px; filter: blur(16px); opacity: 0.34; pointer-events: none; }
.bg-orb-1 { width: 360px; height: 360px; background: var(--accent); top: 12%; right: -140px; }
.bg-orb-2 { width: 300px; height: 300px; background: var(--accent-2); bottom: -120px; left: -100px; }

.topbar, .layout, .footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, rgba(56, 189, 248, 0.92), rgba(139, 92, 246, 0.86)); box-shadow: var(--shadow); }
.brand span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.lang-switch { padding: 4px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); border-radius: 14px; }
.lang-switch button { border: 0; color: var(--muted); background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.lang-switch button.active { background: rgba(56, 189, 248, 0.16); color: var(--text); }

.layout { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 18px; padding: 20px 0 34px; }
.card { border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(18px); border-radius: 28px; box-shadow: var(--shadow); }
.hero { padding: 34px; min-height: 560px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow, .section-title span, .result-eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 900; }
h1 { font-size: clamp(36px, 5vw, 68px); line-height: 0.96; margin: 16px 0; letter-spacing: -0.06em; }
p { color: var(--muted); line-height: 1.65; font-size: 16px; }
.principles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.principles span { border: 1px solid var(--line); padding: 9px 12px; border-radius: 999px; color: #d8e8ff; background: rgba(255,255,255,0.04); font-size: 13px; }
.warning { margin-top: 28px; border-left: 3px solid var(--warn); padding: 14px 16px; border-radius: 14px; background: rgba(255, 211, 138, 0.08); color: #ffe8bf; font-size: 13px; line-height: 1.55; }

.input-panel { padding: 28px; }
.section-title h2 { margin: 8px 0 20px; font-size: 30px; letter-spacing: -0.04em; }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 8px; color: #d9e8fa; font-size: 13px; font-weight: 800; }
label.full { grid-column: 1 / -1; }
select, textarea { width: 100%; border: 1px solid var(--line); background: rgba(2, 8, 18, 0.58); color: var(--text); border-radius: 16px; padding: 13px 14px; outline: none; font: inherit; }
textarea { resize: vertical; min-height: 92px; }
select:focus, textarea:focus { border-color: rgba(56, 189, 248, 0.68); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12); }
.primary { grid-column: 1 / -1; border: 0; border-radius: 18px; padding: 15px 18px; font-weight: 900; cursor: pointer; color: #02101f; background: linear-gradient(135deg, var(--accent), #a7f3d0); box-shadow: 0 18px 44px rgba(56, 189, 248, 0.22); }
.primary:hover { transform: translateY(-1px); }

.result-panel { grid-column: 1 / -1; padding: 28px; background: var(--panel-strong); }
.hidden { display: none; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.result-head h2 { font-size: 34px; letter-spacing: -0.045em; margin: 8px 0; }
.score { text-align: right; min-width: 160px; }
.score strong { font-size: 42px; display: block; }
.score span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.brief-card { border: 1px solid var(--line); background: rgba(255,255,255,0.035); border-radius: 22px; padding: 18px; }
.brief-card.wide { grid-column: span 2; }
.brief-card.full { grid-column: 1 / -1; }
.brief-card h3 { margin: 0 0 12px; letter-spacing: -0.025em; }
ul { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }
.allocation { display: grid; gap: 10px; }
.alloc-row { display: grid; grid-template-columns: 130px 1fr 54px; align-items: center; gap: 12px; color: #d8e8ff; font-size: 14px; }
.bar { height: 11px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 900; margin: 3px 6px 3px 0; }
.good { background: rgba(158,242,201,0.11); color: var(--good); }
.warn { background: rgba(255,211,138,0.11); color: var(--warn); }
.danger { background: rgba(255,157,166,0.11); color: var(--danger); }
.footer { color: var(--muted); padding: 4px 0 28px; font-size: 13px; text-align: center; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .brief-grid { grid-template-columns: 1fr; }
  .brief-card.wide { grid-column: auto; }
  .result-head { flex-direction: column; }
  .score { text-align: left; }
}
@media (max-width: 620px) {
  .topbar { align-items: flex-start; gap: 16px; flex-direction: column; }
  form { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .hero, .input-panel, .result-panel { padding: 22px; border-radius: 22px; }
  .alloc-row { grid-template-columns: 1fr; gap: 6px; }
}
