/* Компоненты: консоль памяти героя, устройства, переписка, экраны демо, форма. */

/* ── консоль памяти (герой) ── */
.recall {
  position: relative; width: 100%; max-width: 560px; justify-self: end;
  border-radius: var(--r-3); background: linear-gradient(180deg, #16171e, #111217);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 9%), 0 60px 120px -40px rgb(0 0 0 / 70%), inset 0 1px 0 rgb(255 255 255 / 6%);
  color: var(--night-ink); overflow: hidden;
}
.recall__bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid rgb(255 255 255 / 7%); }
.recall__dots { display: flex; gap: 6px; }
.recall__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / 12%); }
.recall__title { font-size: 13px; font-weight: 600; color: var(--night-ink-2); letter-spacing: -0.005em; }
.recall__tag { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-ink-3); padding: 4px 8px; border: 1px solid rgb(255 255 255 / 10%); border-radius: var(--r-1); }
.recall__body { padding: 22px 22px 20px; }
.recall__q { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: var(--r-2); background: rgb(255 255 255 / 4%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.recall__q svg { flex: none; width: 17px; height: 17px; color: var(--night-ink-3); }
.recall__text { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--night-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recall__caret { flex: none; width: 2px; height: 20px; margin-left: -8px; background: var(--night-indigo); border-radius: 1px; opacity: 0; }
.recall.is-typing .recall__caret { opacity: 1; }
.recall__kbd { margin-left: auto; flex: none; font-family: var(--mono); font-size: 11px; color: var(--night-ink-3); padding: 3px 7px; border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--r-1); }
.recall__scan { position: relative; height: 1px; margin: 18px 0 0; background: rgb(255 255 255 / 7%); overflow: hidden; }
.recall__scan i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--night-indigo), transparent); transform: translateX(-100%); }
.recall__a { padding-top: 18px; min-height: 236px; }
.recall__who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.recall__ava { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-2); background: rgb(139 133 255 / 14%); box-shadow: inset 0 0 0 1px rgb(139 133 255 / 22%); }
.recall__ava img { width: 15px; height: auto; }
.recall__name { font-size: 13.5px; font-weight: 600; }
.recall__src { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.04em; color: var(--night-ink-3); text-align: right; }
.recall__ans { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; letter-spacing: -0.012em; color: var(--night-ink); text-wrap: pretty; }
.recall__ans em { font-style: normal; color: #fff; background: linear-gradient(rgb(139 133 255 / 26%), rgb(139 133 255 / 26%)) 0 88% / 100% 34% no-repeat; }
.recall__facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.recall__facts span { padding: 5px 10px; border-radius: var(--r-1); background: rgb(255 255 255 / 5%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); font-size: 12.5px; font-weight: 550; color: var(--night-ink-2); }
.recall__next { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 7%); font-size: 14px; color: var(--night-ink-2); }
.recall__yes { margin-left: auto; padding: 6px 12px; border-radius: var(--r-1); background: #fff; color: var(--night); font-size: 13px; font-weight: 600; }
.recall__nav { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgb(255 255 255 / 7%); }
.recall__nav li { position: relative; padding: 12px 16px 13px; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-ink-3); transition: color 0.4s var(--ease); }
.recall__nav li + li { border-left: 1px solid rgb(255 255 255 / 7%); }
.recall__nav li i { position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--night-indigo); transform: scaleX(0); transform-origin: 0 50%; }
.recall__nav li.is-on { color: var(--night-ink); }
.recall__nav li.is-done i { transform: scaleX(1); }

/* ── устройства ── */
.laptop { width: 100%; max-width: 680px; justify-self: center; }
.laptop__lid { position: relative; padding: 11px 11px 13px; background: #15161c; border-radius: 16px 16px 6px 6px; box-shadow: var(--shadow-dev), inset 0 0 0 1px rgb(255 255 255 / 6%); }
.laptop__lid::before { content: ""; position: absolute; top: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #2c2d36; }
.laptop__base { height: 12px; margin: 0 -4.5%; border-radius: 0 0 12px 12px; background: linear-gradient(#d9dbe2, #bfc2cc); box-shadow: 0 18px 30px -18px rgb(11 12 16 / 35%); }
.laptop__screen { background: #fbfbfc; border-radius: 6px 6px 2px 2px; overflow: hidden; color: var(--ink); }
.phone { width: 100%; max-width: 360px; justify-self: center; }
.phone__body { position: relative; display: flex; flex-direction: column; height: 640px; padding: 9px; border-radius: 46px; background: #121318; box-shadow: var(--shadow-dev), inset 0 0 0 1px rgb(255 255 255 / 7%); }
.phone__body::before { content: ""; position: absolute; top: 19px; left: 50%; z-index: 2; width: 82px; height: 22px; margin-left: -41px; border-radius: 12px; background: #050506; }
.phone__screen { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 38px; background: #fbfbfc; overflow: hidden; color: var(--ink); }

/* ── интерфейс внутри устройств (всегда светлый) ── */
.ui-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgb(11 12 16 / 8%); background: #fff; }
.ui-bar__ava, .p-ava { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--indigo-soft); }
.ui-bar__ava img, .p-ava img { width: 16px; height: auto; }
.ui-bar__t { font-weight: 650; font-size: 13.5px; letter-spacing: -0.01em; }
.badge { margin-left: auto; padding: 4px 8px; border-radius: var(--r-1); box-shadow: inset 0 0 0 1px rgb(11 12 16 / 14%); font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); background: #fff; }
.p-head { display: flex; align-items: center; gap: 11px; padding: 50px 18px 12px; border-bottom: 1px solid rgb(11 12 16 / 8%); background: #fff; }
.p-head .p-ava { width: 36px; height: 36px; border-radius: 10px; }
.p-head .p-ava img { width: 19px; }
.p-name { font-weight: 650; font-size: 15px; letter-spacing: -0.015em; line-height: 1.2; }
.p-sub { font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.p-chat { position: relative; flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px); mask-image: linear-gradient(to bottom, transparent 0, #000 48px); }
.p-day { align-self: center; padding: 3px 10px; border-radius: var(--r-1); background: rgb(11 12 16 / 5%); font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.m { max-width: 86%; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.m time { display: block; margin-top: 4px; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-3); }
.m--u { align-self: flex-end; padding: 10px 13px 8px; border-radius: 14px 14px 4px 14px; background: #fff; box-shadow: 0 0 0 1px rgb(11 12 16 / 9%), 0 4px 12px -8px rgb(11 12 16 / 18%); }
.m--u time { text-align: right; }
.m--a { align-self: flex-start; display: grid; grid-template-columns: 30px 1fr; gap: 10px; max-width: 94%; }
.m mark { background: linear-gradient(var(--mark-bg), var(--mark-bg)) 0 0 / calc(var(--on, 1) * 100%) 100% no-repeat; color: inherit; border-radius: 3px; padding: 0 3px; margin: 0 -1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.m__file { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 7px 10px; border-radius: 6px; background: var(--indigo-wash); box-shadow: inset 0 0 0 1px rgb(75 68 224 / 14%); font-size: 12.5px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip { padding: 3px 8px; border-radius: var(--r-1); background: var(--indigo-wash); box-shadow: inset 0 0 0 1px rgb(75 68 224 / 16%); font-size: 11.5px; font-weight: 600; color: var(--indigo-ink); }
.remind { align-self: stretch; margin-left: 40px; padding: 13px 14px 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgb(11 12 16 / 9%), 0 10px 24px -14px rgb(11 12 16 / 24%); }
.remind__k { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.remind__k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #18a596; }
.remind__t { margin-top: 5px; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.p-input { display: flex; align-items: center; justify-content: space-between; margin: 8px 14px 16px; padding: 0 16px; min-height: 46px; border-radius: 23px; background: #fff; box-shadow: inset 0 0 0 1px rgb(11 12 16 / 14%); color: var(--ink-3); font-size: 14px; }
.p-input svg { width: 16px; height: 16px; }

/* ── экран «Документы» ── */
.docs { display: grid; grid-template-columns: 1fr; }
.docs__col { padding: 14px 16px 18px; min-width: 0; }
.docs__col + .docs__col { border-top: 1px solid rgb(11 12 16 / 8%); }
.docs__h { font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.docs__col--parse { display: none; }
@media (min-width: 720px) {
  .docs { grid-template-columns: 0.95fr 1.1fr 1fr; }
  .docs__col + .docs__col { border-top: 0; border-left: 1px solid rgb(11 12 16 / 8%); }
  .docs__col--parse { display: block; }
}
.file { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 32px 10px 11px; border-radius: var(--r-2); font-size: 12.5px; line-height: 1.3; }
.file + .file { margin-top: 4px; }
.file::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--indigo-wash); box-shadow: inset 0 0 0 1px rgb(75 68 224 / 18%); opacity: var(--on, 0); }
.file.is-on { --on: 1; }
.file > * { position: relative; }
.file__ty { min-width: 36px; padding: 3px 6px; border-radius: var(--r-1); text-align: center; background: #fff; box-shadow: inset 0 0 0 1px rgb(11 12 16 / 12%); color: var(--ink-2); font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.file__n { min-width: 0; overflow-wrap: break-word; font-weight: 600; }
.file__ck { position: absolute !important; top: 10px; right: 10px; width: 15px; height: 15px; color: var(--indigo); }
.paper-stack { position: relative; display: grid; }
.paper { grid-area: 1 / 1; padding: 13px; border-radius: var(--r-2); background: #fff; box-shadow: 0 0 0 1px rgb(11 12 16 / 9%); }
.paper__t { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 11.5px; font-weight: 650; }
.paper__st { position: relative; display: inline-grid; font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--indigo); }
.paper p { font-size: 11.5px; line-height: 1.4; padding: 4px 6px; margin: 0 -6px; border-radius: 3px; }
.paper p.is-fact { background: color-mix(in srgb, var(--indigo-wash) calc(var(--f, 1) * 100%), transparent); box-shadow: inset 2px 0 0 color-mix(in srgb, var(--indigo) calc(var(--f, 1) * 100%), transparent); }
.paper i { display: block; height: 5px; margin: 8px 0; border-radius: 1px; background: #eceef2; }
.mem__g + .mem__g { margin-top: 14px; }
.mem__gh { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; margin-bottom: 4px; }
.mem__f { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--indigo); }
.dot--soft { background: #a7a2f3; }

/* ── окно веб-версии ── */
.web { width: 100%; border-radius: var(--r-3); background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgb(11 12 16 / 10%), var(--shadow-dev); overflow: hidden; }
.web__bar { display: flex; align-items: center; gap: 6px; padding: 11px 13px; border-bottom: 1px solid rgb(11 12 16 / 8%); background: #f4f5f7; }
.web__bar i { width: 9px; height: 9px; border-radius: 50%; background: #d3d5dc; }
.web__lbl { margin-left: 10px; padding: 3px 10px; border-radius: var(--r-1); background: #fff; box-shadow: inset 0 0 0 1px rgb(11 12 16 / 9%); font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-3); }
.web__body { padding: 13px 15px 16px; }
.web__head { display: flex; align-items: center; gap: 10px; padding-bottom: 11px; border-bottom: 1px solid rgb(11 12 16 / 8%); }
.web__chat { display: grid; gap: 9px; padding-top: 13px; }
.web__chat .m { max-width: 92%; font-size: 13px; }
.web__chat .m--a { grid-template-columns: 26px 1fr; }
.web__chat .p-ava { width: 26px; height: 26px; border-radius: 7px; }

/* ── карточки «Первым» ── */
.clock svg { width: 100%; height: auto; overflow: visible; }
.set-card, .tg-card { padding: 16px 18px; border-radius: var(--r-3); background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgb(11 12 16 / 9%), var(--shadow-pop); }
.set-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-card__t { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.set-card__x { font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: 0.02em; }
.switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px; background: #d9dbe3; overflow: hidden; }
.switch::before { content: ""; position: absolute; inset: 0; background: var(--indigo); opacity: var(--on, 1); }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(11 12 16 / 30%); transform: translateX(calc(var(--on, 1) * 18px)); }
.held { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 8px 12px; border-radius: var(--r-2); background: rgb(11 12 16 / 5%); box-shadow: inset 0 0 0 1px rgb(11 12 16 / 8%); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.held__dot { width: 6px; height: 6px; border-radius: 50%; background: #8a8ea0; }
.tg-card__h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tg-card__h time { margin-left: auto; font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--ink-3); }
.tg-card__t { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.tg-card__x { margin-top: 2px; color: var(--ink-2); font-size: 15px; }

/* ── форма ── */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field[hidden], .form[hidden] { display: none; }
.field > label, .field > .lbl { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.input {
  width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-2);
  background: var(--field); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 16px; color: var(--fg);
  transition: box-shadow var(--dur-ui) var(--ease), background var(--dur-ui) var(--ease);
}
.input::placeholder { color: var(--fg-3); }
@media (hover: hover) { .input:hover { box-shadow: inset 0 0 0 1px var(--line-3); } }
.input:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 4px var(--acc-soft); }
.input:-webkit-autofill { transition: background-color 9999s; }
.hint { font-size: 13.5px; color: var(--fg-3); line-height: 1.45; }
.err { font-size: 13.5px; color: var(--danger); line-height: 1.4; }
[data-theme="night"] .err { color: #ff8a80; }
.err:empty { display: none; }
.field[data-invalid="true"] .input { box-shadow: inset 0 0 0 1.5px var(--danger); }
[data-theme="night"] .field[data-invalid="true"] .input { box-shadow: inset 0 0 0 1.5px #ff8a80; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.pick legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-2); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 550; color: var(--fg-2); transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease); }
.pick input:checked + span { background: var(--acc-soft); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--acc); }
.pick input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }
@media (hover: hover) { .pick input:not(:checked):hover + span { box-shadow: inset 0 0 0 1px var(--line-3); color: var(--fg); } }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.consent__box { position: relative; display: block; width: 24px; height: 24px; }
.consent input { position: absolute; opacity: 0; inset: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.consent .box { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-1); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-3); transition: background var(--dur-ui) var(--ease); }
.consent .box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transition: opacity var(--dur-ui) var(--ease); }
.consent input:checked + .box { background: var(--acc); box-shadow: none; }
.consent input:checked + .box svg { opacity: 1; }
.consent input:focus-visible + .box { outline: 2px solid var(--acc); outline-offset: 3px; }
.field[data-invalid="true"] .consent .box { box-shadow: inset 0 0 0 1.5px var(--danger); }
.consent__t { font-size: 12.5px; line-height: 1.55; color: var(--fg-3); }
.consent__t a { color: var(--fg-2); }
.form__foot { display: grid; gap: 12px; }
.form__claude { font-size: 12.5px; color: var(--fg-3); line-height: 1.45; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.banner { padding: 12px 14px; border-radius: var(--r-2); background: #fdeceb; color: #7a1a15; font-size: 14px; line-height: 1.45; }
.banner[hidden] { display: none; }
.done { display: grid; gap: 14px; justify-items: start; padding: 8px 0; }
.done[hidden] { display: none; }
.done__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-2); background: var(--acc-soft); color: var(--acc); }
.done__ico svg { width: 22px; height: 22px; }
.done__t { font-size: 26px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.done__x { color: var(--fg-2); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .done:not([hidden]) .done__ico path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.7s var(--ease) 0.2s forwards; }
}
