/* Site guide: welcome window, «?» hint, header-chip legend, site tour, «Первые шаги», «С чего начать», «Материалы».
   Short and visual: an icon tile, a title and at most two short lines. */

.gd-ic { flex: none; display: block; }

/* coloured icon tiles — one hue per kind of thing, the same everywhere */
.gd-badge { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
  background: var(--oz-green-soft); color: var(--oz-green-dark); }
.gd-badge--xl { width: 72px; height: 72px; border-radius: 22px; }
.gd-badge--hud, .gd-badge--streak { background: #FFE9D6; color: #C2410C; }
.gd-badge--freeze { background: #E0F2FE; color: #0369A1; }
.gd-badge--xp, .gd-badge--cup, .gd-badge--los, .gd-badge--events { background: var(--oz-yellow-soft); color: var(--oz-yellow-ink); }
.gd-badge--hamroh, .gd-badge--final, .gd-badge--start, .gd-badge--help { background: #EDE9FE; color: #6D28D9; }
.gd-badge--international, .gd-badge--universities, .gd-badge--abroad { background: #E0F2FE; color: #0369A1; }
.gd-badge--favorites, .gd-badge--chat, .gd-badge--notifications { background: #FCE7F3; color: #BE185D; }

/* buttons */
.gd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.gd-btn--main { background: var(--oz-green); color: #fff; }
.gd-btn--main:hover { background: var(--oz-green-dark); }
.gd-btn--soft { background: #EDE9FE; color: #5B21B6; }
.gd-btn--ghost { background: transparent; color: var(--oz-muted); }
.gd-btn--ghost:hover { color: var(--oz-ink); background: var(--oz-line-soft); }
.gd-btn--wide { width: 100%; }
.gd-btn:focus-visible, .gd-lang button:focus-visible, .gd-tour__end:focus-visible { outline: 3px solid var(--oz-yellow); outline-offset: 2px; }

/* hint card (used by «?», the tour and the start page) */
.gd-card { display: grid; gap: 12px; }
.gd-card__head { display: flex; align-items: center; gap: 12px; }
.gd-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--oz-ink); line-height: 1.25; }
.gd-card__final { margin: 0; font-size: 15px; color: var(--oz-ink); line-height: 1.45; }
.gd-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gd-lines li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--oz-page); }
.gd-lines__ic { color: var(--oz-green); margin-top: 2px; }
.gd-lines li > span:last-child { display: grid; gap: 1px; font-size: 14px; line-height: 1.35; color: var(--oz-ink); font-weight: 600; }
.gd-lines small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--oz-muted); }

/* popovers under a header button */
.gd-pop { position: fixed; z-index: 1200; background: #fff; border: 1px solid var(--oz-line); border-radius: 18px; padding: 16px;
  box-shadow: 0 24px 48px -20px rgba(11, 42, 31, .35); display: grid; gap: 14px; }
.gd-pop[hidden] { display: none; }
.gd-pop__foot { display: flex; gap: 8px; flex-wrap: wrap; }
.gd-pop__foot .gd-btn { flex: 1 1 auto; min-height: 38px; font-size: 13px; padding: 0 12px; }
.gd-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gd-legend li { display: flex; gap: 12px; align-items: center; }
.gd-legend li > span:last-child { display: grid; font-size: 13px; color: var(--oz-muted); line-height: 1.3; }
.gd-legend strong { font-size: 15px; color: var(--oz-ink); }

.app-header__help { font-weight: 800; }
.app-header__help[aria-expanded="true"] { background: var(--oz-yellow); border-color: var(--oz-yellow); color: var(--oz-ink); }

/* welcome window */
body.gd-modal-open { overflow: hidden; }
.gd-welcome { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 16px; }
.gd-welcome[hidden] { display: none; }
.gd-welcome__scrim { position: absolute; inset: 0; background: rgba(11, 42, 31, .55); }
.gd-welcome__card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 18px 20px 20px;
  display: grid; gap: 16px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .45); }
.gd-lang { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 12px; background: var(--oz-page); border: 1px solid var(--oz-line); }
.gd-lang button { font: inherit; font-size: 13px; font-weight: 800; border: 0; border-radius: 9px; padding: 7px 4px; background: transparent; color: var(--oz-muted); cursor: pointer; }
.gd-lang button.is-on { background: var(--oz-green); color: #fff; }
.gd-slide { display: grid; gap: 10px; text-align: center; }
.gd-slide[hidden] { display: none; }
.gd-art { min-height: 132px; border-radius: 18px; background: linear-gradient(160deg, var(--oz-green-soft), #fff 80%); display: flex;
  align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.gd-art--trio span { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.gd-art--trio i { font-style: normal; width: 56px; height: 56px; border-radius: 18px; }
.gd-art--trio b { font-size: 12px; color: var(--oz-ink); }
.gd-art--chain { flex-wrap: wrap; color: var(--oz-muted); }
.gd-chain__tasks { display: flex; gap: 4px; }
.gd-chain__tasks i { width: 14px; height: 14px; border-radius: 5px; background: var(--oz-green); }
.gd-chain__tasks i:nth-child(n+4) { background: var(--oz-line); }
.gd-art--hamroh { position: relative; }
.gd-bubble { position: absolute; transform: translate(42px, -34px); background: #fff; border: 2px solid #C4B5FD; color: #6D28D9; font-weight: 800;
  width: 34px; height: 34px; border-radius: 12px 12px 12px 4px; display: grid; place-items: center; font-size: 18px; }
.gd-welcome__title { margin: 4px 0 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--oz-ink); text-wrap: balance; }
.gd-welcome__text { margin: 0; color: var(--oz-muted); font-size: 15px; line-height: 1.45; }
.gd-welcome__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gd-welcome__btns { display: flex; gap: 6px; margin-left: auto; }
.gd-welcome__btns[hidden] { display: none; }
.gd-dots { display: flex; gap: 6px; }
.gd-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--oz-line); transition: width .2s; }
.gd-dots i.is-on { width: 22px; background: var(--oz-green); }
@media (max-width: 520px) {
  .gd-welcome { align-items: end; padding: 0; }
  .gd-welcome__card { border-radius: 24px 24px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* tour */
.gd-tour { position: fixed; inset: 0; z-index: 1250; }
.gd-tour[hidden] { display: none; }
/* Four dim panels around the highlighted element (a giant box-shadow does not always paint). */
.gd-tour__shade i { position: fixed; background: rgba(11, 42, 31, .55); }
.gd-tour__spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 4px var(--oz-yellow); pointer-events: none; }
.gd-tour__spot.is-free { display: none; }
.gd-tour__card { position: fixed; background: #fff; border-radius: 20px; padding: 14px 16px 16px; display: grid; gap: 12px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .5); transition: left .25s ease, top .25s ease; }
.gd-tour.is-final .gd-tour__card { box-shadow: 0 0 0 3px #C4B5FD, 0 30px 60px -24px rgba(0, 0, 0, .5); }
.gd-tour__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gd-tour__count { font-size: 12px; font-weight: 800; color: var(--oz-muted); font-variant-numeric: tabular-nums; }
.gd-tour__end { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 800; color: var(--oz-muted);
  background: var(--oz-page); border: 1px solid var(--oz-line); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.gd-tour__end[hidden] { display: none; }
.gd-tour__bar { height: 4px; border-radius: 99px; background: var(--oz-line-soft); overflow: hidden; }
.gd-tour__bar i { display: block; height: 100%; background: var(--oz-green); transition: width .25s ease; }
.gd-tour__body { display: grid; gap: 8px; }
.gd-tour__where { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--oz-green);
  background: var(--oz-green-soft); border-radius: 99px; padding: 3px 10px; }
.gd-tour__foot { display: flex; gap: 8px; justify-content: flex-end; }
.gd-tour__foot [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .gd-tour__spot, .gd-tour__card, .gd-tour__bar i, .gd-dots i { transition: none; }
}

/* «Первые шаги» card on the dashboard */
.gd-steps { display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--oz-line); }
.gd-steps__head { display: flex; align-items: center; gap: 12px; }
.gd-steps__head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--oz-ink); flex: 1; }
.gd-steps__count { font-weight: 800; color: var(--oz-green); font-variant-numeric: tabular-nums; }
.gd-steps__bar { height: 8px; border-radius: 99px; background: var(--oz-line-soft); overflow: hidden; }
.gd-steps__bar i { display: block; height: 100%; background: var(--oz-green); border-radius: 99px; }
.gd-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.gd-step { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--oz-page); border: 1px solid transparent;
  text-decoration: none; color: var(--oz-ink); min-width: 0; }
a.gd-step:hover { border-color: var(--oz-green); background: #fff; }
.gd-step__label { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.3; }
.gd-step__xp { font-size: 12px; font-weight: 800; color: var(--oz-yellow-ink); background: var(--oz-yellow-soft); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.gd-step__tick { width: 26px; height: 26px; border-radius: 99px; flex: none; border: 2px solid var(--oz-line); display: grid; place-items: center; color: #fff; }
.gd-step.is-done { background: var(--oz-green-soft); }
.gd-step.is-done .gd-step__label { color: var(--oz-green-dark); }
.gd-step.is-done .gd-step__tick { background: var(--oz-green); border-color: var(--oz-green); }
.gd-step.is-next { border-color: var(--oz-green); background: #fff; box-shadow: 0 8px 20px -14px rgba(11, 127, 88, .6); }
.gd-steps__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gd-steps__auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--oz-muted); }

/* «С чего начать» and «Материалы» pages */
.gd-page { display: grid; gap: 28px; }
.gd-page__title { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 3vw, 28px); font-weight: 700; color: var(--oz-ink); }
.gd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gd-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--oz-line);
  text-decoration: none; color: var(--oz-ink); min-width: 0; transition: transform .15s ease, border-color .15s ease; }
.gd-tile:hover { border-color: var(--oz-green); transform: translateY(-2px); }
.gd-tile__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.gd-tile__text b { font-size: 15px; line-height: 1.3; }
.gd-tile__text span { font-size: 13px; color: var(--oz-muted); line-height: 1.35; }
.gd-tile__go { color: var(--oz-green); flex: none; }
.gd-tiles--big .gd-tile { flex-direction: column; align-items: flex-start; padding: 22px; }
.gd-tiles--big .gd-badge { width: 56px; height: 56px; border-radius: 18px; }
.gd-legend--row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .gd-tile { transition: none; } .gd-tile:hover { transform: none; } }

/* The «?» button adds one more icon to the phone header: keep «Ozmun AI» on one line. */
@media (max-width: 420px) {
  body[data-user-id] .app-header__icon-btn { width: 38px; height: 38px; flex: 0 0 38px; }
  .app-header__brand-name { white-space: nowrap; }
}
