:root {
  color-scheme: light;
  --app-bg: #f3f6f8;
  --app-card: #ffffff;
  --app-tile: #f7fafc;
  --app-border: #d8e1e8;
  --app-text: #17212a;
  --app-muted: rgba(0, 0, 0, 0.58);
  --primary: #0c6b8e;
  --primary-soft: #eaf3f7;
  --primary-border: #74a8bd;
  --sun: #e4a11b;
  --rain: #4d94b8;
  --habit: #56a875;
  --drink: #e06666;
  --both: #8b6fd6;
  --shadow: 0 18px 60px rgba(15, 23, 29, 0.14);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--app-text);
  background: var(--app-bg);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-icon {
  display: inline-grid;
  place-items: center;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.site-appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 clamp(16px, 4vw, 48px);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(8, 44, 58, 0.2);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--app-border);
  color: var(--app-muted);
  background: var(--app-card);
}

.site-footer div {
  display: grid;
  gap: 3px;
}

.site-footer strong,
.site-footer a {
  color: var(--app-text);
  font-weight: 900;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.brand-title,
.site-nav,
.header-actions,
.language-switcher,
.hero-actions,
.app-actions,
.card-title-row,
.sober-row,
.weather-stats,
.sheet-toolbar {
  display: flex;
  align-items: center;
}

.brand-title {
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #c90d0d;
  background: #b9dde3;
  font-size: 1.35rem;
  font-weight: 950;
}

.site-nav {
  gap: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.header-actions {
  gap: 10px;
}

.language-switcher {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.lang-button {
  min-width: 36px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.lang-button.is-active {
  color: var(--primary);
  background: #fff;
}

.top-action,
.filled-action,
.outline-action,
.trial-banner a,
.play-store-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 800;
}

button.top-action,
button.outline-action {
  border: 0;
  cursor: pointer;
}

.top-action {
  padding: 0 16px;
  color: var(--primary);
  background: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.35fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 6vw, 84px) clamp(16px, 4vw, 48px) 40px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  color: var(--app-muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.benefit-slider {
  position: relative;
  min-height: 166px;
  margin-top: 24px;
  padding: 16px 16px 48px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-card);
  box-shadow: 0 14px 38px rgba(15, 23, 29, 0.08);
}

.benefit-slide {
  position: absolute;
  inset: 16px 16px 48px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
  pointer-events: none;
}

.benefit-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.benefit-slide .material-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.benefit-slide strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.04rem, 2vw, 1.25rem);
  line-height: 1.18;
}

.benefit-slide p {
  margin: 0;
  color: var(--app-muted);
  line-height: 1.45;
}

.slider-controls {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.slider-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--app-border);
  cursor: pointer;
}

.slider-dot.is-active {
  background: var(--primary);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filled-action,
.outline-action {
  padding: 0 18px;
}

.filled-action {
  color: #fff;
  background: var(--primary);
}

.outline-action {
  border: 1px solid var(--app-border);
  background: var(--app-card);
}

.product-frame {
  min-width: 0;
}

.app-window {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: var(--app-text);
  background: var(--app-bg);
  box-shadow: var(--shadow);
}

.app-window[data-theme="dark"] {
  color: #eef5f8;
  background: #0f171d;
  border-color: #334854;
  --app-card: #17232b;
  --app-tile: #1d2a33;
  --app-border: #334854;
  --app-muted: rgba(255, 255, 255, 0.7);
  --primary: #5ab6d6;
  --primary-soft: #1a3a47;
  --primary-border: #74a8bd;
}

.app-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 18px;
  color: #fff;
  background: #0c6b8e;
}

.app-window[data-theme="dark"] .app-bar {
  color: #071016;
  background: #5ab6d6;
}

.app-title {
  border: 0;
  padding: 6px 2px;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
}

.app-actions {
  gap: 4px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.dashboard {
  padding: 16px;
}

.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #e7c56a;
  border-radius: 8px;
  background: #fff6de;
}

.app-window[data-theme="dark"] .trial-banner {
  color: #f5e7bb;
  background: #2b2615;
  border-color: #7f692c;
}

.trial-banner strong,
.trial-banner span {
  display: block;
}

.trial-banner span {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.9rem;
}

.trial-banner a {
  flex: 0 0 auto;
  border: 0;
  padding: 0 14px;
  color: #fff;
  background: #0c6b8e;
}

.app-window[data-theme="dark"] .trial-banner a {
  color: #071016;
  background: #5ab6d6;
}

.sheet-toolbar {
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.sheet-toolbar::-webkit-scrollbar {
  display: none;
}

.profile-chip,
.sheet-tab {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 0 12px;
  color: inherit;
  background: var(--app-card);
  font-weight: 750;
  cursor: pointer;
}

.sheet-tab.is-active {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}

.edit-button {
  flex: 0 0 auto;
  color: var(--app-muted);
}

.dashboard-panel {
  display: none;
}

.dashboard-panel.is-active {
  display: block;
}

.panel-grid {
  display: grid;
  gap: 12px;
}

.coach-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.calendar-card {
  grid-column: 1 / -1;
}

.weather-grid,
.nord-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.material-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-card);
}

.card-title-row {
  gap: 8px;
  margin-bottom: 12px;
}

.card-title-row h2 {
  margin: 0;
  font-size: 1.1rem;
}

.muted {
  color: var(--app-muted);
}

.bac-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.bac-value strong,
.weather-value strong,
.price-card strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  font-weight: 950;
}

.bac-value span {
  color: var(--app-muted);
  font-weight: 800;
  text-align: right;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.app-window[data-theme="dark"] .progress-track {
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff9800;
}

.sober-row {
  gap: 6px;
  margin: 12px 0 0;
  color: var(--app-muted);
  line-height: 1.35;
}

.habit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.habit-chips span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--app-tile);
  color: var(--app-muted);
  font-weight: 750;
}

.habit-chips .selected {
  color: #113320;
  border-color: var(--habit);
  background: #ddf7e7;
}

.app-window[data-theme="dark"] .habit-chips .selected {
  color: #dff7e8;
  background: #1f4c35;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-grid b {
  color: var(--app-muted);
  font-size: 0.72rem;
  text-align: center;
}

.calendar-grid button,
.calendar-grid span {
  aspect-ratio: 1;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: inherit;
  background: var(--app-tile);
  font-weight: 850;
}

.calendar-grid .habit-day {
  background: #ddf7e7;
  border-color: var(--habit);
}

.calendar-grid .drink-day {
  background: #ffd6d6;
  border-color: var(--drink);
}

.calendar-grid .both-day {
  background: #e8ddff;
  border-color: var(--both);
}

.calendar-grid .today {
  border-color: var(--primary);
  border-width: 2px;
}

.app-window[data-theme="dark"] .calendar-grid .habit-day {
  background: #1f4c35;
}

.app-window[data-theme="dark"] .calendar-grid .drink-day {
  background: #5f1f25;
}

.app-window[data-theme="dark"] .calendar-grid .both-day {
  background: #40305e;
}

.weather-sun {
  color: var(--sun);
}

.weather-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.weather-value span {
  color: var(--app-muted);
  text-align: right;
}

.weather-stats {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.weather-stats span,
.cheap-window {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--app-muted);
  background: var(--app-tile);
  font-weight: 750;
}

.line-chart,
.price-bars {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-tile);
}

.line-chart span,
.price-bars span {
  flex: 1;
  min-width: 12px;
  border-radius: 8px 8px 0 0;
  background: var(--rain);
}

.price-card strong {
  margin-bottom: 12px;
}

.cheap-window {
  color: #0d4d2c;
  background: #ddf7e7;
}

.app-window[data-theme="dark"] .cheap-window {
  color: #dff7e8;
  background: #1f4c35;
}

.price-bars span:nth-child(3),
.price-bars span:nth-child(4) {
  background: var(--habit);
}

.price-bars span:nth-child(6) {
  background: var(--drink);
}

.mobile-toolbar {
  display: none;
}

.module-section,
.feedback-section {
  padding: clamp(56px, 7vw, 92px) clamp(16px, 4vw, 48px);
}

.feedback-section {
  border-top: 1px solid var(--app-border);
  background: var(--app-card);
}

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

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

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

.module-grid article {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-card);
}

.module-grid .material-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.module-grid h3 {
  margin-bottom: 8px;
}

.module-grid p {
  color: var(--app-muted);
  line-height: 1.55;
}

.section-heading p:not(.eyebrow) {
  color: var(--app-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 18, 24, 0.58);
  backdrop-filter: blur(8px);
}

.privacy-page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 28px);
}

.privacy-hero {
  margin-bottom: 24px;
}

.privacy-hero h1 {
  max-width: 760px;
}

.privacy-card {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-card);
}

.privacy-card + .privacy-card {
  margin-top: 16px;
}

.privacy-card h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.privacy-card h3 {
  margin: 24px 0 8px;
}

.privacy-card p {
  color: var(--app-muted);
  line-height: 1.6;
}

.privacy-card strong,
.privacy-card h2,
.privacy-card h3 {
  color: var(--app-text);
}

.language-label {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.newsletter-modal {
  position: relative;
  width: min(100%, 520px);
  padding: 24px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: var(--app-text);
  background: var(--app-card);
  box-shadow: 0 24px 80px rgba(2, 14, 20, 0.32);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--app-muted);
  background: var(--app-tile);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.newsletter-modal h2 {
  margin: 0 42px 10px 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
}

.modal-copy {
  color: var(--app-muted);
  line-height: 1.5;
}

.newsletter-form {
  margin-top: 18px;
}

.feedback-form {
  width: min(100%, 720px);
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-tile);
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.play-store-action {
  width: 100%;
  color: #fff;
  background: var(--primary);
}

.modal-feedback-link {
  width: 100%;
}

.newsletter-form label,
.deletion-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 850;
}

.deletion-form {
  display: grid;
  gap: 10px;
  margin: 18px 0 6px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-tile);
}

.deletion-form input,
.deletion-form textarea {
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--app-text);
  background: var(--app-card);
  outline: none;
}

.deletion-form textarea {
  min-height: 120px;
  resize: vertical;
}

.deletion-form input:focus,
.deletion-form textarea:focus {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 3px rgba(116, 168, 189, 0.22);
}

.deletion-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #0c6b8e;
  font-weight: 850;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}

.form-row input,
.newsletter-form textarea {
  min-width: 0;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: var(--app-text);
  background: var(--app-tile);
  outline: none;
}

.form-row input {
  height: 46px;
  padding: 0 12px;
}

.newsletter-form textarea {
  width: 100%;
  min-height: 110px;
  margin-top: 0;
  padding: 12px;
  resize: vertical;
}

.form-row input:focus,
.newsletter-form textarea:focus {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 3px rgba(116, 168, 189, 0.22);
}

.form-row button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #0c6b8e;
  font-weight: 850;
  cursor: pointer;
}

.form-note,
.form-status {
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.9rem;
}

.form-status {
  color: var(--primary);
  font-weight: 800;
}

.hidden-field {
  display: none;
}

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

  .product-frame {
    max-width: 860px;
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .site-appbar {
    gap: 10px;
  }

  .header-actions {
    gap: 6px;
  }

  .language-switcher {
    gap: 2px;
  }

  .lang-button {
    min-width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .top-action {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 28px;
  }

  .benefit-slider {
    min-height: 188px;
  }

  .app-window {
    min-height: 720px;
  }

  .dashboard {
    padding: 8px 8px 88px;
  }

  .trial-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .sheet-toolbar {
    display: none;
  }

  .coach-grid,
  .weather-grid,
  .nord-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .weather-value,
  .bac-value {
    align-items: flex-start;
    flex-direction: column;
  }

  .weather-value span,
  .bac-value span {
    text-align: left;
  }

  .mobile-toolbar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px;
    border-top: 1px solid var(--app-border);
    background: var(--app-card);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.12);
  }

  .mobile-toolbar button {
    min-width: 0;
    border: 0;
    border-radius: 8px;
    padding: 5px 2px;
    color: var(--app-muted);
    background: transparent;
    font-size: 0.68rem;
    font-weight: 800;
  }

  .mobile-toolbar .material-icon {
    display: block;
    margin: 0 auto 1px;
  }

  .mobile-toolbar .is-active {
    color: var(--primary);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-title span:last-child {
    display: none;
  }

  .top-action {
    display: none;
  }

  h1 {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .benefit-slider {
    min-height: 230px;
    padding: 14px 14px 48px;
  }

  .benefit-slide {
    inset: 14px 14px 48px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .slider-controls {
    right: 14px;
    left: 14px;
  }

  .slider-dot {
    flex: 1;
    width: auto;
  }

  .app-bar {
    padding-left: 12px;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .material-card {
    padding: 12px;
  }

  .newsletter-modal {
    padding: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row button {
    width: 100%;
  }
}
