:root {
  color-scheme: light;
  --cream: #f4efe5;
  --paper: #ffffff;
  --green: #06464a;
  --green-soft: #315f5e;
  --ink: #013641;
  --line: #d8cbb5;
  --healthy: #1c765f;
  --attention: #b06e10;
  --risk: #a53c32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: linear-gradient(180deg, #f7f3eb 0%, #f1eadc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main { width: min(1180px, calc(100% - 32px)); margin: 24px auto 56px; }

.app-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.brand { flex: 0 0 auto; color: var(--green); font-size: 18px; font-weight: 900; letter-spacing: -.03em; text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; padding: 4px; border: 1px solid rgb(216 203 181 / 82%); border-radius: 16px; background: rgb(255 255 255 / 72%); box-shadow: 0 6px 20px rgb(1 54 65 / 5%); }
.nav-links a { padding: 8px 11px; border-radius: 12px; color: var(--green-soft); font-size: 12px; font-weight: 800; line-height: 1.15; text-decoration: none; white-space: nowrap; }
.nav-links a { transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.nav-links a:hover { background: #e7f0ed; color: var(--green); }
.nav-links a.active { background: var(--green); color: white; box-shadow: 0 5px 14px rgb(1 54 65 / 20%); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 30px 32px;
  border-radius: 24px;
  background: var(--green);
  color: white;
  box-shadow: 0 16px 40px rgb(1 54 65 / 15%);
}

.eyebrow, .step { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { max-width: 760px; margin: 10px 0; font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -.04em; line-height: 1.04; }
.hero p { max-width: 680px; margin: 0; color: #d9ebe7; font-size: 16px; line-height: 1.5; }
.hero-mark { display: grid; place-items: center; width: 112px; aspect-ratio: 1; border: 2px solid #a7cfbf; border-radius: 50%; font: 800 62px/1 Georgia, serif; color: var(--cream); }
.hero-mark.has-icon { padding: 6px; border: 0; background: rgb(255 255 255 / 10%); }
.section-icon { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-mark.has-icon .section-icon { animation: section-icon-float 5s ease-in-out infinite; }

.workspace { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(480px, 1.2fr); gap: 16px; margin-top: 16px; }
.calculator, .results { padding: 22px; border: 1px solid rgb(216 203 181 / 88%); border-radius: 20px; background: var(--paper); box-shadow: 0 8px 24px rgb(1 54 65 / 5%); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 4px 0 18px; font-size: 24px; }
.step { color: var(--green-soft); }
.local-badge, .best { padding: 7px 10px; border-radius: 999px; background: #dcebe5; color: var(--green); font-size: 12px; font-weight: 800; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-wide { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 750; }
.form-value { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #eee6d8; color: var(--green-soft); font-size: 16px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fffefd; color: var(--ink); font: inherit; font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(49 95 94 / 18%); border-color: var(--green-soft); box-shadow: 0 5px 16px rgb(1 54 65 / 8%); }
details { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; }
details p { font-size: 14px; line-height: 1.5; }

.fixture-warning { margin: 0 0 16px; padding: 12px; border-radius: 12px; background: #fff1cd; color: #6e4a0a; font-size: 13px; line-height: 1.45; }
.comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.module-empty { display: grid; place-content: center; gap: 8px; min-height: 190px; padding: 28px; border: 1px dashed var(--line); border-radius: 24px; background: rgb(255 250 241 / 72%); color: var(--green-soft); text-align: center; line-height: 1.45; }
.module-empty strong { color: var(--green); font-size: 18px; }
.module-empty span { max-width: 420px; font-size: 14px; }
.document-groups { display: grid; gap: 20px; }
.document-group { display: grid; gap: 10px; }
.document-group h2 { margin: 0; font-size: 20px; }
.single-workspace { max-width: 760px; margin: 20px auto; }
.document-result { margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.55 Georgia, serif; }
.result-card { padding: 16px; border: 1px solid var(--line); border-top: 5px solid var(--green-soft); border-radius: 18px; background: white; }
.result-card.healthy { border-top-color: var(--healthy); }
.result-card.attention { border-top-color: var(--attention); }
.result-card.risk { border-top-color: var(--risk); }
.result-heading { display: flex; justify-content: space-between; gap: 8px; min-height: 52px; }
.marketplace { display: block; font-weight: 850; }
.result-heading small { display: block; margin-top: 3px; color: #5b706f; }
.best { align-self: flex-start; padding: 5px 7px; font-size: 10px; }
.remainder { display: block; margin-top: 18px; font-size: 28px; }
.status { display: block; min-height: 36px; margin-top: 4px; color: var(--green-soft); font-size: 13px; font-weight: 700; }
dl { margin: 14px 0 0; font-size: 12px; }
dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #eee6d8; }
dt { color: #617372; }
dd { margin: 0; font-weight: 750; }
.summary { margin: 16px 0 0; padding: 16px; border-radius: 14px; background: var(--green); color: white; line-height: 1.5; }
.integration-status { margin: 12px 0 0; padding: 10px 13px; border: 1px solid rgb(216 203 181 / 88%); border-radius: 12px; background: rgb(255 255 255 / 76%); color: var(--green-soft); font-size: 12px; font-weight: 700; line-height: 1.35; }
.integration-status.connected { border-color: #9ac9b8; background: #e0efe8; color: var(--healthy); }
.integration-status.warning { border-color: #e1be72; background: #fff1cd; color: #6e4a0a; }
.report-button { width: 100%; margin-top: 12px; padding: 14px 18px; border: 2px solid var(--green); border-radius: 12px; background: transparent; color: var(--green); cursor: pointer; font: inherit; font-weight: 850; transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.report-button:hover { background: var(--green); color: white; box-shadow: 0 8px 18px rgb(1 54 65 / 18%); transform: translateY(-1px); }
.report-button:disabled { border-color: var(--line); background: #eee6d8; color: #7a8581; cursor: not-allowed; }
.report-button:focus-visible { outline: 3px solid rgb(176 110 16 / 35%); outline-offset: 3px; }
.report-note { margin: 8px 2px 0; color: var(--green-soft); font-size: 12px; line-height: 1.4; text-align: center; }

.ecosystem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ecosystem-card { padding: 22px; border: 1px solid rgb(216 203 181 / 88%); border-radius: 20px; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.ecosystem-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgb(1 54 65 / 12%); }
.ecosystem-card span { color: var(--green-soft); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.ecosystem-card h2 { margin: 8px 0; }
.ecosystem-card p { margin: 0; line-height: 1.5; }
.ecosystem-card.legal { border-top: 6px solid #a35d27; }
.ecosystem-card.offer { border-top: 6px solid var(--healthy); }

.entertainment-promo { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; padding: 20px 22px; border: 1px solid rgb(216 203 181 / 88%); border-radius: 20px; background: var(--paper); }
.entertainment-promo h2 { margin: 5px 0 8px; font-size: 25px; }
.entertainment-promo p { margin: 0; line-height: 1.5; }
.button-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 13px 18px; border-radius: 12px; background: var(--green); color: white; font-weight: 850; text-decoration: none; box-shadow: 0 7px 16px rgb(1 54 65 / 14%); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button-link:hover { background: var(--green-soft); box-shadow: 0 10px 20px rgb(1 54 65 / 20%); transform: translateY(-2px); }
.button-link:focus-visible, .nav-links a:focus-visible, .brand:focus-visible { outline: 3px solid rgb(176 110 16 / 35%); outline-offset: 3px; }

.entertainment-hero { background: linear-gradient(125deg, var(--green), #0b5a5e); }
.gamepad { font-size: 48px; }
.game-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 24px; margin-top: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); }
.game-copy h2 { margin: 14px 0 8px; font-size: clamp(30px, 5vw, 48px); }
.game-copy > p { max-width: 700px; margin: 0; color: var(--green-soft); font-size: 17px; line-height: 1.55; }
.feature-list { display: grid; gap: 8px; margin: 20px 0; padding-left: 22px; line-height: 1.45; }
.game-launch { min-width: 150px; }
.game-visual { display: grid; place-content: center; min-height: 300px; padding: 28px; border-radius: 20px; background: radial-gradient(circle at 50% 35%, #168087, var(--green) 60%); color: var(--cream); text-align: center; box-shadow: inset 0 0 0 2px rgb(251 238 217 / 22%); }
.game-visual span { font: 800 86px/1 Georgia, serif; }
.game-visual strong { margin-top: 15px; font-size: clamp(23px, 4vw, 38px); }
.game-visual small { margin-top: 5px; color: #cce2dc; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.module-hero { background: linear-gradient(125deg, var(--green), #684322); }
.offer-hero { background: linear-gradient(125deg, var(--green), #22705b); }
.module-workspace { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(480px, 1.15fr); gap: 16px; margin-top: 16px; }
.module-form, .module-output { padding: 22px; border: 1px solid rgb(216 203 181 / 88%); border-radius: 20px; background: var(--paper); box-shadow: 0 8px 24px rgb(1 54 65 / 5%); }
.module-form { display: grid; gap: 15px; align-content: start; }
.module-form .section-heading { margin-bottom: 2px; }
.module-form .section-heading h2 { margin-bottom: 0; }
.privacy-note, .review-warning { margin: 0; padding: 13px; border-radius: 12px; background: #fff1cd; color: #6e4a0a; font-size: 13px; line-height: 1.5; }
.primary-button { width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--green); color: white; cursor: pointer; font: inherit; font-weight: 850; box-shadow: 0 7px 16px rgb(1 54 65 / 14%); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.primary-button:hover { background: var(--green-soft); box-shadow: 0 10px 20px rgb(1 54 65 / 20%); transform: translateY(-2px); }

@keyframes section-icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.analysis-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.analysis-heading h2 { margin: 5px 0 18px; }
.risk-badge { max-width: 210px; padding: 7px 10px; border-radius: 999px; background: #f3dfb8; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.risk-badge.high, .risk-badge.critical { background: #f2d3ce; color: var(--risk); }
.analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.analysis-grid section { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.analysis-grid h3 { margin: 0 0 9px; font-size: 15px; }
.analysis-grid ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.score-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 20px; border-radius: 16px; background: var(--green); color: white; }
.score-card.attention { background: var(--attention); }
.score-card.risk { background: var(--risk); }
.score-card strong { display: inline-block; margin-top: 5px; font-size: 52px; line-height: 1; }
.score-card small { margin-left: 5px; }
.score-card h2 { margin: 0; text-align: right; }
.score-card .step { color: white; opacity: .8; }
.findings { display: grid; gap: 10px; margin-bottom: 14px; }
.finding { padding: 15px; border: 1px solid var(--line); border-left: 5px solid var(--attention); border-radius: 14px; background: white; }
.finding.high { border-left-color: var(--risk); }
.finding.good { border-left-color: var(--healthy); }
.finding span { color: var(--green-soft); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.finding h3 { margin: 5px 0; font-size: 16px; }
.finding p { margin: 0; color: var(--green-soft); font-size: 13px; line-height: 1.45; }

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .hero-mark:not(.has-icon) { display: none; }
  .hero-mark.has-icon { display: grid; position: absolute; top: 16px; right: 16px; width: 64px; background: rgb(255 255 255 / 12%); }
  .game-card { grid-template-columns: 1fr; }
  .game-visual { min-height: 220px; }
  .module-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  main { width: min(100% - 20px, 1180px); margin-top: 10px; }
  .app-nav { gap: 8px; margin-bottom: 10px; }
  .brand { font-size: 16px; }
  .nav-links { width: calc(100vw - 20px); flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; border-radius: 14px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; padding: 9px 12px; font-size: 12px; }
  .hero { padding: 23px; border-radius: 20px; }
  .hero-mark.has-icon { top: 14px; right: 14px; width: 54px; }
  h1 { margin: 9px 0; font-size: 32px; }
  .hero p { font-size: 15px; }
  .fields { grid-template-columns: 1fr; }
  .calculator, .results { padding: 18px; border-radius: 18px; }
  .app-nav, .entertainment-promo { align-items: stretch; flex-direction: column; }
  .entertainment-promo .button-link { width: 100%; }
  .game-card { padding: 20px; border-radius: 18px; }
  .ecosystem-grid, .analysis-grid { grid-template-columns: 1fr; }
  .module-form, .module-output { padding: 18px; border-radius: 18px; }
  .score-card { align-items: flex-start; flex-direction: column; }
  .score-card h2 { text-align: left; }
}

@media (min-width: 561px) and (max-width: 980px) {
  .app-nav { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; justify-content: flex-start; border-radius: 14px; }
}
