:root {
  --ink: #071415;
  --muted: #5d6f72;
  --line: #d8e8e6;
  --surface: #ffffff;
  --canvas: #f2faf8;
  --soft: #e8f7f4;
  --deep: #06444b;
  --accent: #29c7bd;
  --warn: #f4b93f;
  --shadow: rgba(6, 68, 75, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

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

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  padding: 22px;
}

.topbar {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--deep);
  font-size: 20px;
  font-weight: 850;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.status-pill,
.route-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--deep);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.language-picker {
  position: relative;
}

.language-current {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--deep);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.language-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 20;
  display: none;
  min-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px var(--shadow);
  padding: 6px;
}

.language-picker.open .language-menu {
  display: grid;
}

.language-option {
  min-height: 34px;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 780;
  text-align: left;
}

.language-option:hover,
.language-option.active {
  background: var(--soft);
  color: var(--deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: end;
  padding: 30px 0 22px;
}

.eyebrow,
.panel-kicker,
.mini-label {
  color: var(--deep);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1,
.hub h1 {
  max-width: 820px;
  margin-top: 10px;
  font-size: 48px;
  font-weight: 850;
  line-height: 1.02;
}

.lead {
  max-width: 720px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 650;
  line-height: 28px;
}

.hero-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
}

.workspace {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: stretch;
}

.builder,
.core-preview,
.route-card,
.support-card,
.saved-box,
.hub-grid a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px var(--shadow);
}

.builder {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 610px;
  padding: 20px;
}

.stepper {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.step-dot {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.step-dot.active {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.step-dot:disabled {
  cursor: default;
  opacity: 0.42;
}

.panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px 0;
}

.panel h2 {
  max-width: 680px;
  font-size: 34px;
  font-weight: 850;
  line-height: 1.08;
}

.panel-note {
  max-width: 650px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 23px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 780px;
}

.choice-grid.one-column {
  grid-template-columns: 1fr;
  max-width: 620px;
}

.choice {
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font-size: 15px;
  font-weight: 820;
  line-height: 20px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.choice:hover,
.choice.active {
  transform: translateY(-1px);
  border-color: rgba(41, 199, 189, 0.75);
  background: var(--soft);
}

.choice small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.inline-link {
  width: fit-content;
  color: var(--deep);
  font-size: 13px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preview {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.preview h3 {
  margin-top: 4px;
  font-size: 25px;
  font-weight: 850;
  line-height: 30px;
}

.route-card,
.support-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  box-shadow: none;
}

.route-card ol,
.route-card ul,
.support-card ol,
.support-card ul {
  padding-left: 20px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 22px;
}

.route-card .route-action-list {
  display: grid;
  gap: 7px;
  padding-left: 0;
  list-style: none;
}

.route-action-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 20px;
}

.route-action-marker {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft, var(--soft));
  color: var(--accent-deep, var(--deep));
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.route-action-list--steps .route-action-marker {
  background: var(--accent, var(--deep));
  color: #fff;
}

.route-action-list--habits .route-action-marker {
  border: 1px solid rgba(0, 105, 100, 0.18);
}

.route-action-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.route-card p,
.support-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 21px;
}

.save-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.download-first {
  display: grid;
  gap: 12px;
  max-width: 560px;
}

.optional-save {
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.optional-save summary {
  cursor: pointer;
  color: var(--deep);
  font-size: 14px;
  font-weight: 900;
  list-style-position: outside;
}

.optional-save[open] {
  display: grid;
  gap: 10px;
}

.optional-save-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 19px;
}

.form-error {
  max-width: 520px;
  border: 1px solid rgba(181, 72, 72, 0.2);
  border-radius: 10px;
  background: rgba(255, 244, 244, 0.92);
  color: #8b2d2d;
  font-size: 13px;
  font-weight: 760;
  line-height: 19px;
  padding: 10px 12px;
}

.save-form label {
  display: grid;
  gap: 7px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 870;
}

.save-form input[type="email"],
.save-form input[type="password"],
.save-form input[type="text"],
.save-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.save-form input:focus,
.save-form select:focus {
  border-color: var(--accent);
}

.check-row {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  color: var(--muted) !important;
  line-height: 20px;
}

.check-row a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.check-row a:hover {
  text-decoration: underline;
}

.builder-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.store-button,
.primary,
.ghost {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
}

.store-button,
.primary {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}

.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

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

.ghost:disabled {
  opacity: 0.45;
  cursor: default;
}

.wide {
  width: 100%;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 170px)) 96px;
  gap: 10px;
  align-items: stretch;
}

.store-grid.single-store {
  grid-template-columns: minmax(0, 220px);
}

.qr {
  height: 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.qr span {
  border-radius: 4px;
  background: var(--deep);
}

.saved-box {
  display: grid;
  gap: 4px;
  max-width: 520px;
  padding: 13px;
  box-shadow: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.saved-box strong {
  color: var(--deep);
  overflow-wrap: anywhere;
}

.core-preview {
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone {
  width: 292px;
  min-height: 575px;
  overflow: hidden;
  border: 7px solid #101416;
  border-radius: 34px;
  background: #fff;
}

.phone-bar {
  height: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  color: #273033;
  font-size: 11px;
  font-weight: 850;
}

.phone-content {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.phone h2 {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 850;
  line-height: 27px;
}

.phone p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 19px;
}

.core-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, var(--canvas), #fff);
}

.core-card span {
  color: var(--deep);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.core-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 19px;
}

.day-cycle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 6px;
}

.cycle-dot {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.cycle-dot.active {
  background: var(--accent);
}

.hub-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.hub {
  padding: 48px 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.hub-grid a {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  box-shadow: none;
}

.hub-grid span {
  color: var(--deep);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hub-grid strong {
  font-size: 18px;
  line-height: 24px;
}

@media (max-width: 1120px) {
  .workspace,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .core-preview {
    display: none;
  }
}

@media (max-width: 720px) {
  html,
  body {
    min-height: 100dvh;
  }

  .shell {
    min-height: 100dvh;
    padding: 8px;
  }

  .topbar {
    min-height: 36px;
    align-items: center;
    padding: 0 2px;
    border-bottom: 0;
  }

  .brand {
    font-size: 18px;
    line-height: 22px;
  }

  .topbar p {
    display: none;
  }

  .status-pill {
    min-height: 22px;
    padding: 0 9px;
    font-size: 10px;
    font-weight: 800;
  }

  .topbar-actions {
    gap: 6px;
  }

  .language-current {
    min-height: 22px;
    padding: 0 8px;
    font-size: 10px;
  }

  .language-menu {
    min-width: 150px;
  }

  .hero {
    display: none;
  }

  .workspace {
    min-height: auto;
    display: block;
  }

  .builder {
    min-height: auto;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(6, 68, 75, 0.08);
    grid-template-rows: auto auto auto;
  }

  .stepper {
    padding-bottom: 8px;
    gap: 6px;
    border-bottom: 0;
  }

  .step-dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .panel {
    gap: 10px;
    padding: 10px 0 12px;
  }

  .panel-kicker {
    font-size: 10px;
    line-height: 12px;
  }

  .panel h2 {
    font-size: 21px;
    line-height: 1.12;
  }

  .panel-note,
  .lead {
    font-size: 13px;
    line-height: 18px;
  }

  .choice-grid,
  .choice-grid.one-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .choice {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 780;
  }

  .choice small {
    display: none;
  }

  .preview {
    gap: 9px;
  }

  .preview h3 {
    margin-top: 2px;
    font-size: 19px;
    line-height: 23px;
  }

  .route-card,
  .support-card,
  .saved-box {
    gap: 6px;
    padding: 9px 10px;
  }

  .route-card ol,
  .route-card ul,
  .support-card ol,
  .support-card ul {
    margin-top: 3px;
    padding-left: 17px;
    font-size: 12.5px;
    line-height: 18px;
  }

  .route-card .route-action-list {
    gap: 6px;
    padding-left: 0;
  }

  .route-action-item {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    font-size: 12.5px;
    line-height: 17px;
  }

  .route-action-marker {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .route-card p,
  .support-card p {
    font-size: 12.5px;
    line-height: 18px;
  }

  .save-form {
    gap: 9px;
  }

  .download-first,
  .optional-save {
    max-width: 100%;
  }

  .optional-save {
    padding: 10px;
  }

  .optional-save summary {
    font-size: 13px;
  }

  .save-form input[type="email"],
  .save-form input[type="password"],
  .save-form input[type="text"],
  .save-form select {
    min-height: 42px;
    padding: 0 12px;
  }

  .builder-actions {
    padding-top: 8px;
    gap: 8px;
    border-top: 0;
  }

  .primary,
  .ghost,
  .store-button {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .store-grid,
  .store-grid.single-store {
    grid-template-columns: 1fr;
  }

  .qr {
    display: none;
  }
}

/* ============================================================
   Nomidex visual additions — 2026-05-26
   Audience-specific accents + choice icons + Today emphasis
   ============================================================ */

/* Audience accent colors via data-route-entry on .shell.
   Base brand fistashka stays, only --accent changes.
   This drives active state, hover, today card, progress, etc. */

[data-route-entry="students"] {
  --accent: #ff8a3d;        /* теплый оранжевый для студентов */
  --accent-soft: #fff1e6;
  --accent-deep: #b85a1a;
}

[data-route-entry="parents"] {
  --accent: #2d8659;        /* спокойный зелёный для родителей */
  --accent-soft: #e6f4ec;
  --accent-deep: #1f5c3d;
}

[data-route-entry="career"] {
  --accent: #2563eb;        /* деловой синий для карьеры */
  --accent-soft: #e6efff;
  --accent-deep: #1d4fc4;
}

[data-route-entry="life"] {
  --accent: #8b5cf6;        /* мягкий лиловый для личного */
  --accent-soft: #f0eafd;
  --accent-deep: #6d3fd9;
}

/* Choice кнопка с иконкой */

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
}

.choice-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
  font-size: 20px;
  line-height: 1;
  transition: background 160ms ease;
}

.choice.active .choice-icon,
.choice:hover .choice-icon {
  background: var(--accent-soft, var(--soft));
}

.choice-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.choice-label {
  display: block;
}

/* Active state usa accent если доступен */

.choice.active {
  border-color: var(--accent, rgba(41, 199, 189, 0.75));
  background: var(--accent-soft, var(--soft));
}

.step-dot.active {
  border-color: var(--accent, var(--deep));
  background: var(--accent, var(--deep));
}

/* Сегодня — акцентная карточка с цветом аудитории */

.route-card--today {
  position: relative;
  border: 1px solid var(--accent, var(--deep));
  background: linear-gradient(180deg, var(--accent-soft, var(--soft)), #fff);
  padding-left: 48px;
}

.route-card--today .route-card-icon {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent, var(--deep));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.route-card--today strong {
  color: var(--accent-deep, var(--deep));
}

.route-card--today p {
  color: var(--ink);
  font-weight: 760;
}

/* Smoothing font-weight: 920/930 → 800/850 для лучшего рендеринга */

.brand,
.hero h1,
.hub h1,
.panel h2,
.phone h2 {
  font-weight: 850;
}

.eyebrow,
.panel-kicker,
.mini-label,
.status-pill,
.route-chip,
.hero-cta,
.primary,
.store-button,
.hub-grid strong {
  font-weight: 800;
}

.choice {
  font-weight: 700;
}

/* Mobile adjustments для иконок */

@media (max-width: 720px) {
  .choice {
    gap: 9px;
    padding: 8px 10px;
  }

  .choice-icon {
    width: 30px;
    height: 30px;
    font-size: 17px;
    border-radius: 8px;
  }

  .route-card--today {
    padding-left: 42px;
  }

  .route-card--today .route-card-icon {
    left: 10px;
    top: 10px;
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
}
