﻿@font-face {
  font-family: 'Inter';
  src: url('../../../fonts/Inter/Inter-VariableFont_opsz%2Cwght.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('../../../fonts/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --color-green: #4db373;
  --color-blue: #93bffe;
  --color-orange: #fb9154;
  --color-yellow: #f6ca45;
  --color-deep-green: #52b874;
  --color-black: #383632;
  --color-beige: #f4f0e5;
  --color-cream: #f8f3e7;
  --color-white: #ffffff;
  --color-border: rgba(56, 54, 50, 0.14);
  --color-muted: rgba(56, 54, 50, 0.74);
  --color-shadow: rgba(77, 179, 115, 0.12);
  --color-blue-soft: #8db6f0;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--color-black);
  background:
    radial-gradient(circle at 10% 10%, rgba(147, 191, 254, 0.14), transparent 24%),
    radial-gradient(circle at 92% 8%, rgba(77, 179, 115, 0.08), transparent 18%),
    var(--color-beige);
}

button,
input {
  font: inherit;
}

.page-main {
  padding: 12px 0 40px;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.card {
  background: rgba(244, 240, 229, 0.92);
  border: 3px solid var(--color-green);
  border-radius: 24px;
  box-shadow: 0 10px 24px var(--color-shadow);
}

.hero-shell {
  padding: 14px 18px 16px;
  margin-bottom: 14px;
}

.back-link-row {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 12px;
  padding: 0 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid rgba(77, 179, 115, 0.64);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 8px 18px rgba(77, 179, 115, 0.12);
  color: var(--color-black);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.back-link:hover {
  color: var(--color-green);
  border-color: var(--color-green);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(77, 179, 115, 0.18);
}

.hero-shell h1 {
  margin: 8px 0 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.65rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--color-blue);
}

.hero-shell p {
  margin: 0;
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.compass-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(360px, 1fr);
  gap: 28px;
  align-items: center;
  padding: 24px 18px 22px;
  margin-bottom: 16px;
}

.controls-panel {
  padding: 8px 4px 8px 12px;
}

.controls-copy h2 {
  margin: 0 0 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--color-blue);
}

.controls-copy p {
  margin: 0 0 8px;
  max-width: 320px;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--color-muted);
}

.slider-group {
  display: grid;
  gap: 18px;
  margin: 8px 0 18px;
}

.slider-row {
  display: grid;
  gap: 8px;
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.slider-head label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-black);
}

.slider-head output {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-black);
}

.state-slider {
  --slider-fill: 50%;
  width: 100%;
  margin: 0;
  appearance: none;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-green) 0%, var(--color-green) var(--slider-fill), rgba(125, 135, 157, 0.18) var(--slider-fill), rgba(125, 135, 157, 0.18) 100%);
}

.state-slider:focus {
  outline: none;
}

.state-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.state-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(125, 135, 157, 0.18);
}

.state-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--color-green);
}

.state-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: #787a8e;
  box-shadow: 0 3px 8px rgba(56, 54, 50, 0.24);
}

.state-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: #787a8e;
  box-shadow: 0 3px 8px rgba(56, 54, 50, 0.24);
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  color: var(--color-muted);
}

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

.preset-btn,
.reset-btn {
  min-height: 40px;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.preset-btn {
  border: 2px solid rgba(77, 179, 115, 0.72);
  background: rgba(255, 248, 237, 0.72);
  color: var(--color-black);
}

.preset-btn:hover,
.preset-btn.is-active {
  background: rgba(77, 179, 115, 0.18);
  transform: translateY(-1px);
}

.reset-btn {
  width: 100%;
  border: 0;
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: 0 8px 18px rgba(77, 179, 115, 0.24);
}

.reset-btn:hover {
  transform: translateY(-1px);
}

.compass-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.compass-axis {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--color-black);
}

.compass-wrap {
  width: min(100%, 620px);
}

.compass-ring {
  position: relative;
  padding: 18px;
  border: 3px solid var(--color-green);
  border-radius: 50%;
  background: rgba(255, 252, 247, 0.56);
}

.compass-chart {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 560px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 12px rgba(244, 240, 229, 0.68);
}

.quadrant {
  position: absolute;
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
}

.quadrant span {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 1.65vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
  text-shadow: 0 1px 2px rgba(56, 54, 50, 0.16);
  width: 78%;
}

.quadrant-overload span,
.quadrant-fatigue span {
  text-align: right;
  transform: translate(10px, 0);
}

.quadrant-resource span,
.quadrant-calm span {
  text-align: left;
  transform: translate(-10px, 0);
}

.quadrant-overload span,
.quadrant-resource span {
  transform: translate(var(--quadrant-shift-x, 0), 10px);
}

.quadrant-overload span {
  --quadrant-shift-x: 10px;
}

.quadrant-resource span {
  --quadrant-shift-x: -10px;
}

.quadrant-fatigue span,
.quadrant-calm span {
  transform: translate(var(--quadrant-shift-x, 0), -10px);
}

.quadrant-fatigue span {
  --quadrant-shift-x: 10px;
}

.quadrant-calm span {
  --quadrant-shift-x: -10px;
}

.quadrant-resource {
  top: 0;
  right: 0;
  background: var(--color-yellow);
}

.quadrant-calm {
  right: 0;
  bottom: 0;
  background: var(--color-deep-green);
}

.quadrant-fatigue {
  left: 0;
  bottom: 0;
  background: var(--color-blue-soft);
}

.quadrant-overload {
  top: 0;
  left: 0;
  background: var(--color-orange);
}

.pointer {
  --pointer-angle: 0deg;
  --pointer-length: 28%;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: var(--pointer-length);
  background: linear-gradient(180deg, rgba(244, 247, 252, 0.99) 0%, rgba(196, 206, 224, 0.98) 100%);
  clip-path: polygon(50% 0%, 74% 44%, 61% 44%, 61% 100%, 39% 100%, 39% 44%, 26% 44%);
  box-shadow: 0 5px 14px rgba(56, 54, 50, 0.2);
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(var(--pointer-angle));
  z-index: 3;
}

.pointer::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(229, 236, 248, 0.98) 100%);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: inset 0 0 0 1px rgba(56, 54, 50, 0.08);
}

.pointer::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 18px;
  height: 22px;
  background: linear-gradient(180deg, rgba(136, 146, 168, 0.95) 0%, rgba(96, 109, 138, 0.95) 100%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  transform: translateX(-50%);
}

.pointer-cap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d7dce5 0%, #aab5ca 100%);
  border: 6px solid rgba(255, 255, 255, 0.88);
  transform: translate(-50%, -50%);
  z-index: 4;
}

.insight-shell {
  padding: 22px 18px 20px;
}

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

.insight-head h2 {
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--color-blue);
}

.insight-head p {
  margin: 0;
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.state-badge {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(77, 179, 115, 0.14);
  border: 2px solid rgba(77, 179, 115, 0.22);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--color-black);
}

.insight-intro {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid rgba(56, 54, 50, 0.08);
}

.insight-intro h3 {
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 0.98;
  color: var(--color-black);
}

.insight-intro p {
  margin: 0;
  max-width: 840px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-muted);
}

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

.insight-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.74);
  border: 1px solid rgba(56, 54, 50, 0.08);
}

.insight-card-accent {
  background: rgba(77, 179, 115, 0.1);
  border-color: rgba(77, 179, 115, 0.22);
}

.insight-card h4 {
  margin: 0 0 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
  line-height: 1.2;
}

.insight-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.insight-card li {
  color: var(--color-black);
  font-size: 0.98rem;
  line-height: 1.5;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100% - 24px));
  padding: 18px;
  border-radius: 16px;
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: 0 14px 30px rgba(56, 54, 50, 0.22);
  transform: translateY(150px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 20;
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-content {
  position: relative;
  display: grid;
  gap: 12px;
}

.cookie-banner-text {
  padding-right: 30px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-banner-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-white);
  font-size: 1.35rem;
  cursor: pointer;
}

.cookie-banner-accept {
  width: fit-content;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 980px) {
  .compass-shell {
    grid-template-columns: 1fr;
    gap: 24px;

  .back-link-row {
    padding: 0;
  }
  }

  .controls-panel {
    padding: 2px 2px 0;
  }

  .controls-copy p {
    max-width: none;
  }

  .compass-wrap {
    width: min(100%, 560px);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 16px, 100%);
  }


  .insight-grid {
    grid-template-columns: 1fr;
  }
  .back-link-row {
    padding: 0;
  }

  .hero-shell,
  .compass-shell,
  .insight-shell {
    border-radius: 20px;
  }

  .insight-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-shell h1 {
    font-size: clamp(2.15rem, 10vw, 3.5rem);
  }

  .controls-copy h2 {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
  }

  .slider-head label {
    font-size: 1.2rem;
  }

  .slider-head output {
    font-size: 1.35rem;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .compass-axis {
    font-size: clamp(1.5rem, 8vw, 2.35rem);
  }

  .quadrant {
    padding: 18px;
  }

  .quadrant span {
    font-size: clamp(0.78rem, 3vw, 1.02rem);
  }

  .pointer {
    width: 30px;
  }

  .pointer::before {
    width: 12px;
    height: 12px;
    top: 8px;
  }

  .pointer::after {
    width: 14px;
    height: 16px;
    bottom: -10px;
  }

  .pointer-cap {
    width: 30px;
    height: 30px;
    border-width: 5px;
  }
}

.cookie-banner-text {
  margin-bottom: 15px;
}

.cookie-banner-accept {
  width: 100%;
  padding: 12px 20px;
  background: var(--white);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-banner-accept:hover,
.cookie-banner-close:hover {
  opacity: 0.9;
}

@media (max-width: 780px) {
  .navbar {
    padding: 0 12px;
  }

  .navbar-links {
    gap: 12px;
  }

  .navbar-links a {
    font-size: 0.78rem;
  }

  .container {
    padding: 0 12px;
    margin-top: 16px;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

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

  .cookie-banner {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}
