/* Портал самопознания — общие стили макета */
:root {
  --ink: #18212B;
  --ink-2: #3B4652;
  --muted: #4A5664;
  --line: #A9B4BF;
  --bg: #F3F5F7;
  --card: #FFFFFF;
  --teal: #0E5E5E;
  --teal-dark: #0A4747;
  --teal-soft: #E3F1F0;
  --amber: #B8742F;
  --amber-dark: #8A4B12;
  --amber-ink: #6B3A0E;
  --amber-soft: #FBF3EA;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: 'Manrope', system-ui, -apple-system, sans-serif; color: var(--ink); -webkit-text-size-adjust: 100%; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.page { padding: 40px 24px 56px; min-height: 100vh; }
.wrap { max-width: 1360px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.wrap-tight { gap: 24px; }

.test-note { font-size: 13px; color: var(--ink-2); background: #E9EDF1; border-radius: 10px; padding: 8px 12px; align-self: flex-start; }

.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.top-title { display: flex; flex-direction: column; gap: 6px; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.eyebrow-sm { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 800; }
h2 { margin: 0; font-size: 20px; font-weight: 800; }
.h2-big { font-size: 24px; }
.sub { font-size: 16px; color: var(--ink-2); }
.small { font-size: 14px; margin: 0; }
.tiny { font-size: 13px; }
.muted { color: var(--ink-2); }
.muted2 { color: var(--muted); }
.strong { font-weight: 800; }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--muted); }
.teal { color: var(--teal); }
.amber { color: var(--amber-dark); }
.amber-dark { color: var(--amber-dark); }

.entry { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-size: 14px; font-weight: 600; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid #C5CDD6; background: #fff; color: var(--ink); }
.pill-dark { border: none; background: var(--ink); color: #fff; }

.card { background: var(--card); border-radius: 20px; padding: 24px; }
.col { display: flex; flex-direction: column; gap: 14px; }
.col-tight { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }

.card-start { padding: 28px; display: flex; flex-direction: column; gap: 18px; border: 2px solid var(--teal); }
.fields { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.field label { font-size: 14px; font-weight: 700; }
input[type=text], input[type=date], input[type=number] {
  font: inherit; font-size: 18px; min-height: 52px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; font-size: 15px; align-items: center; }
.chip { padding: 8px 14px; border-radius: 20px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }
.btn-teal { font-size: 15px; font-weight: 700; min-height: 40px; padding: 8px 16px; border-radius: 20px; border: none; background: var(--teal); color: #fff; }

/* Линия времени */
.timeline-card { padding: 28px 28px 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.timeline { min-width: 1100px; display: flex; flex-direction: column; gap: 14px; }
.tl-grid { display: grid; grid-template-columns: 150px minmax(0,2fr) minmax(0,2fr) 170px minmax(0,2.4fr) 170px; }
.tl-head { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tl-line { align-items: center; height: 64px; }
.tl-labels { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.tl-labels .strong { color: var(--ink); font-weight: 700; }
.tl-labels .teal.strong { color: var(--teal); }
.pl { padding-left: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.roles { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 8px; row-gap: 2px; }
.seg { display: flex; align-items: center; height: 64px; }
.seg.pos { position: relative; }
.seg.now { justify-content: center; }
.seg.end { justify-content: flex-end; }
.bar { flex: 1; height: 4px; }
.bar.dark { background: var(--ink); }
.bar.grey { background: #5E6B78; }
.bar.dashed { height: 0; border-top: 4px dashed var(--amber); }
.dot-start { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); flex: none; }
.dot-end { width: 22px; height: 22px; border-radius: 4px; background: var(--ink); flex: none; }
.tick { position: absolute; top: 22px; width: 2px; height: 20px; background: #5E6B78; }
.ring { position: absolute; top: 25px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #5E6B78; }
.bar-now { position: absolute; left: 0; right: 0; top: 30px; height: 4px; background: var(--teal); }
.now-dot { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 8px #D6ECEB; display: flex; align-items: center; justify-content: center; }
.now-dot div { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.dia { position: absolute; top: 23px; width: 18px; height: 18px; transform: rotate(45deg); background: #fff; border: 3px solid var(--amber); }
.dia.full { background: var(--amber); border: none; }

/* Квадрат Пифагора */
.py-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; font-family: 'IBM Plex Mono', monospace; }
.py-cell { background: #EEF1F4; border-radius: 8px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.py-num { font-size: 16px; color: var(--ink); }
.py-label { font-size: 11px; color: var(--muted); font-family: 'Manrope', sans-serif; }
.py-grid.big { gap: 8px; }
.py-grid.big .py-cell { height: 72px; border-radius: 10px; }
.py-grid.big .py-num { font-size: 18px; }
.py-grid.mini { gap: 4px; }
.py-grid.mini .py-cell { height: 34px; border-radius: 6px; }
.py-grid.mini .py-num { font-size: 13px; }

/* Радар */
.radar-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.radar { position: relative; width: 160px; height: 160px; flex: none; }
.radar-circle { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); }
.radar-h { position: absolute; left: 0; top: 79px; width: 160px; height: 2px; background: var(--line); }
.radar-v { position: absolute; left: 79px; top: 0; width: 2px; height: 160px; background: var(--line); }
.radar-l { position: absolute; left: 4px; top: 84px; font-size: 10px; color: var(--muted); }
.radar-r { position: absolute; right: 4px; top: 84px; font-size: 10px; color: var(--muted); }
.radar-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--amber); left: 73px; top: 73px; transition: left .3s, top .3s; }
.radar-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; flex: 1 1 120px; }

.btn-amber { align-self: flex-start; font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--amber); background: #fff; color: var(--amber-ink); }
.explain { background: var(--amber-soft); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.btn-block { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 12px; background: var(--ink); color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn-light { align-self: flex-start; font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #C5CDD6; background: #fff; color: var(--ink); }

.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 12px; font-size: 15px; }
.list-amber li { background: var(--amber-soft); }
.list-amber .mono { color: var(--amber-ink); }

.card-now { background: var(--teal); color: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.btn-white { font-size: 14px; font-weight: 700; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: none; background: #fff; color: var(--teal); text-align: left; }
.btn-pisanka { font-size: 15px; font-weight: 600; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid #E2C4A3; background: #fff; color: var(--ink); text-align: left; }

.card-end { background: var(--ink); color: #fff; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.end-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: baseline; }
.end-head h2 { font-size: 22px; }
.end-head div { font-size: 15px; color: #C9D2DB; }
.countdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cd { background: #232F3C; border-radius: 12px; padding: 14px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.cd-v { font-family: 'IBM Plex Mono', monospace; font-size: 22px; }
.cd-u { font-size: 13px; color: #C9D2DB; }

/* Личная карта */
.back { align-self: flex-start; display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 15px; }
.me-field { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.me-field label { font-size: 14px; font-weight: 700; }
.card-cheat { background: var(--ink); color: #fff; gap: 16px; }
.cheat-cols { display: flex; flex-wrap: wrap; gap: 16px; }
.cheat-col { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; }
.cheat-h { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.cheat-item { background: #232F3C; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.cheat-item b { font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.cheat-empty { font-size: 14px; color: #C9D2DB; }
.btn-white-ink { font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 16px; border-radius: 12px; border: none; background: #fff; color: var(--ink); }
.btn-ghost { font-size: 14px; font-weight: 700; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #5E6B78; background: transparent; color: #fff; }
.dec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dec { background: var(--bg); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.dec div:last-child { font-size: 14px; color: var(--ink-2); }
.rels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.rel { border: 1px solid #D5DCE3; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.rel label { font-size: 15px; font-weight: 800; }
.rel input[type=date] { font-size: 16px; min-height: 48px; border-radius: 10px; }
.rel-t { font-size: 13px; line-height: 1.45; }
.rel-i { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.btn-amber-fill { font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 12px; border-radius: 10px; border: none; background: var(--amber); color: #fff; }
.btn-light-sm { font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #C5CDD6; background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.swipe-hint { display: none; font-size: 13px; color: var(--muted); margin-bottom: -18px; }
@media (max-width: 640px) {
  .swipe-hint { display: block; }
  .page { padding: 20px 16px 40px; }
  h1 { font-size: 30px; }
  .card, .card-start, .card-end { padding: 18px; }
  .timeline-card { padding: 18px; }
  .rels { grid-template-columns: 1fr; }
  .me-field { min-width: 0; width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
}
