:root {
  color-scheme: light;
  --bg-1: #edf3f6;
  --bg-2: #f7f1e7;
  --surface: #fcfeff;
  --surface-2: #e2edf4;
  --text: #17212b;
  --muted: #60727f;
  --accent: #f3b23f;
  --accent-2: #126b5d;
  --danger: #c6534c;
  --border: rgba(23, 33, 43, .11);
  --shadow: 0 18px 45px rgba(34, 52, 63, .16);
}

body.dark {
  color-scheme: dark;
  --bg-1: #0e141b;
  --bg-2: #111b25;
  --surface: #182330;
  --surface-2: #233447;
  --text: #f4f7fa;
  --muted: #b8c7d4;
  --accent: #f8c66d;
  --accent-2: #54d2b8;
  --danger: #ff8b7f;
  --border: rgba(255, 255, 255, .11);
  --shadow: 0 18px 50px rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2));
  color: var(--text);
}

button, input {
  font: inherit;
}

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

.hidden {
  display: none;
}

.app {
  min-height: 100vh;
  padding: calc(env(safe-area-inset-top) + 18px) 18px calc(env(safe-area-inset-bottom) + 28px);
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 10px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 8px;
  color: var(--text);
  font-weight: 950;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.primary-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  color: #111923;
  background: var(--accent);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 30px;
  align-items: center;
  min-height: min(760px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 38px;
  padding: clamp(22px, 5vw, 56px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(248, 198, 109, .42), transparent 28%),
    radial-gradient(circle at 12% 86%, rgba(84, 210, 184, .28), transparent 26%),
    linear-gradient(145deg, #111923, #1f3448 58%, #14251f);
  box-shadow: var(--shadow);
}

.landing-copy h1 {
  max-width: 720px;
  font-size: clamp(42px, 8.4vw, 92px);
  line-height: .88;
  letter-spacing: -.07em;
}

.landing-copy > p:not(.eyebrow):not(.platform-note) {
  max-width: 620px;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.45;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-buttons.center {
  justify-content: center;
}

.download-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 178px;
  min-height: 66px;
  border: 0;
  border-radius: 22px;
  padding: 12px 18px;
  text-align: left;
  text-decoration: none;
  color: #111923;
  background: var(--accent);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .22);
  cursor: pointer;
}

.download-button span {
  font-size: 12px;
  opacity: .78;
}

.download-button strong {
  font-size: 18px;
}

.download-button.rustore {
  color: #fff;
  background: #121a24;
  outline: 1px solid rgba(255, 255, 255, .18);
}

.download-button.web {
  color: #fff;
  background: #126b5d;
}

.platform-note {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, .64);
  line-height: 1.45;
}

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}

.phone-frame {
  width: min(330px, 88vw);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 44px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04));
  box-shadow: 0 35px 80px rgba(0, 0, 0, .36);
  transform: rotate(2deg);
}

.phone-frame img {
  display: block;
  width: 100%;
  border-radius: 34px;
}

.floating-card {
  position: absolute;
  right: 6%;
  bottom: 12%;
  min-width: 170px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 24px;
  padding: 14px 16px;
  color: #fff;
  background: rgba(18, 26, 36, .82);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .32);
  backdrop-filter: blur(14px);
}

.floating-card span {
  display: block;
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
}

.floating-card strong {
  font-size: 34px;
  letter-spacing: -.05em;
}

.company-section,
.screens-section,
.final-cta {
  margin-top: 28px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 16px;
}

.section-heading h2,
.final-cta h2 {
  font-size: clamp(30px, 5vw, 58px);
  line-height: .98;
  letter-spacing: -.04em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-card {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 25px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.45;
}

.device-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
}

.device-section h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -.03em;
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-snap-type: x mandatory;
}

.screen-shot {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.screen-shot img {
  display: block;
  width: 100%;
  border-radius: 22px;
}

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

.steps > div {
  display: grid;
  gap: 14px;
  min-height: 150px;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps strong {
  color: var(--accent-2);
  font-size: 34px;
  letter-spacing: -.06em;
}

.steps span {
  color: var(--muted);
  line-height: 1.45;
}

.final-cta {
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 18% 12%, rgba(248, 198, 109, .34), transparent 28%),
    linear-gradient(145deg, #111923, #126b5d);
  box-shadow: var(--shadow);
}

.final-cta p {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .72);
  line-height: 1.45;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(248, 198, 109, .45), transparent 28%),
    linear-gradient(145deg, #121a24, #203348);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -48px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 520px;
  margin-bottom: 10px;
  font-size: clamp(30px, 8vw, 48px);
  line-height: .95;
}

h2 {
  margin: 4px 0 12px;
  font-size: 26px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hero p {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.action {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  width: 100%;
  border: 0;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: var(--accent-2);
  color: #fff;
  font-weight: 900;
}

.action p, .muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.status {
  margin-top: 14px;
  border-color: rgba(243, 178, 63, .45);
}

.status-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

.timer {
  margin: 10px 0 4px;
  font-size: clamp(36px, 12vw, 72px);
  font-weight: 900;
  letter-spacing: -.05em;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .45s ease;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.topbar h2 {
  margin: 0;
  flex: 1;
}

.site-return {
  background: var(--accent);
  color: #111923;
}

.web-app-return {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 10px);
  z-index: 6;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.web-app-return .site-return {
  box-shadow: var(--shadow);
}

.pill, .primary, .secondary, .danger {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  white-space: normal;
}

a.pill,
a.primary,
a.secondary,
a.danger {
  display: inline-grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.primary {
  color: #111923;
  background: var(--accent);
}

.secondary {
  background: var(--surface-2);
}

.danger {
  color: #fff;
  background: var(--danger);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.day-btn.active,
.copy-btn.active {
  color: #111923;
  background: var(--accent);
}

.schedule-table {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0 7px;
}

th, td {
  padding: 11px 10px;
  text-align: left;
  background: var(--surface-2);
}

th {
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

td:first-child, th:first-child {
  border-radius: 14px 0 0 14px;
  font-weight: 900;
}

td:last-child, th:last-child {
  border-radius: 0 14px 14px 0;
}

.day-cell.empty {
  color: transparent;
}

.lesson-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.lesson-editor .fields {
  display: grid;
  grid-template-columns: .7fr 1fr 1fr;
  gap: 8px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-2);
  outline: 2px solid transparent;
}

input:focus {
  outline-color: var(--accent);
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  z-index: 10;
  transform: translateX(-50%);
  width: min(92vw, 520px);
  padding: 13px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(17, 24, 32, .94);
  box-shadow: var(--shadow);
}

.install-note {
  border-style: dashed;
}

@media (min-width: 720px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .phone-stage {
    min-height: auto;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .device-section,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card, .hero {
    border-radius: 24px;
  }

  .days {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-nav {
    align-items: stretch;
    border-radius: 26px;
    flex-direction: column;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .nav-actions .pill {
    width: 100%;
  }

  .landing-hero {
    border-radius: 28px;
    padding: 20px;
  }

  .landing-copy h1 {
    font-size: 42px;
  }

  .hero-buttons {
    display: grid;
  }

  .download-button {
    width: 100%;
  }

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

  .lesson-editor .fields {
    grid-template-columns: 1fr;
  }
}
