:root {
  --navy: #071833;
  --ink: #122033;
  --muted: #5d6d84;
  --line: #d7e0ec;
  --blue: #2d62e3;
  --blue-deep: #1d4ec4;
  --sheet: #f5f7fb;
  --ok: #e8f6ee;
  --ok-ink: #14613a;
  --warn: #fbf4e4;
  --warn-ink: #8a5a12;
  --bad: #f8ece9;
  --bad-ink: #8d3a2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: Manrope, "Segoe UI", sans-serif;
  background-color: #071427;
  background-image:
    radial-gradient(700px 520px at 50% 40%, rgba(42, 96, 170, 0.45), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 1400'%3E%3Cg fill='none' stroke='%23d5e6ff' stroke-linecap='round'%3E%3Cpath stroke-opacity='0.55' stroke-width='54' d='M-120 160C120 40 280 300 520 140S860 40 1040 200'/%3E%3Cpath stroke-opacity='0.4' stroke-width='30' d='M-80 340C160 220 300 480 560 320S900 220 1080 380'/%3E%3Cpath stroke-opacity='0.62' stroke-width='48' d='M-140 560C140 400 320 700 580 500S920 380 1100 600'/%3E%3Cpath stroke-opacity='0.35' stroke-width='24' d='M-40 760C180 640 340 920 600 740S960 640 1120 800'/%3E%3Cpath stroke-opacity='0.5' stroke-width='40' d='M-100 980C160 820 340 1140 600 960S980 860 1140 1040'/%3E%3Cpath stroke-opacity='0.45' stroke-width='32' d='M-60 1180C180 1040 360 1340 620 1160S1000 1060 1160 1240'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center top, center center;
  background-size: auto, 160% auto;
  background-attachment: fixed;
}

body::before { content: none; }

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-bottom: 1px solid rgba(190, 214, 255, 0.18);
  background: rgba(8, 22, 46, 0.55);
  backdrop-filter: blur(10px);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-move 42s linear infinite;
}

.ticker-track p {
  margin: 0;
  padding: 10px 0;
  color: #e7f0ff;
  font-size: 14px;
  white-space: nowrap;
}

@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nav-row .nav-btn { width: 100%; }

.nav-btn.bank,
.nav-btn.chat {
  color: #fff;
  background: rgba(16, 36, 68, 0.72);
  border: 1px solid rgba(186, 208, 240, 0.35);
}

.about-block,
.bank-note {
  margin-top: 22px;
  padding: 20px 18px;
  border-radius: 26px;
  background: rgba(8, 22, 46, 0.28);
  border: 1px solid rgba(190, 214, 255, 0.2);
  backdrop-filter: blur(8px);
}

.about-block h2,
.bank-note h2 {
  margin: 10px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.about-block p,
.bank-note p,
.about-block li {
  color: #d5e2f4;
  line-height: 1.45;
}

.about-block ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.about-block li + li { margin-top: 12px; }

.bank-note {
  border-color: rgba(230, 195, 106, 0.7);
  box-shadow: 0 0 0 1px rgba(230, 195, 106, 0.15), 0 16px 40px rgba(0, 0, 0, 0.18);
}

.page { position: relative; z-index: 1; }

.page {
  width: min(440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  display: grid;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 22px;
  background: rgba(6, 16, 36, 0.94);
  border: 1px solid rgba(214, 186, 106, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: none;
  border: 0;
}

.emblem {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #16325f 0%, #0c1c38 100%);
  border: 1px solid rgba(214, 186, 106, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.emblem img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.brand-kicker,
.brand-name {
  margin: 0;
}

.brand-kicker {
  color: #f3d78a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-name {
  margin-top: 2px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.nav-btn {
  width: 100%;
  border-radius: 999px;
  padding: 15px 18px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.nav-btn.ghost,
.nav-btn.solid,
.nav-btn.bank,
.nav-btn.chat {
  color: #fff;
  background: rgba(16, 36, 68, 0.72);
  border: 1px solid rgba(186, 208, 240, 0.35);
}

.nav-btn.ghost:hover,
.nav-btn.solid:hover,
.nav-btn.bank:hover,
.nav-btn.chat:hover { background: rgba(28, 54, 96, 0.92); }

.docs {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
}

.docs-kicker {
  margin: 0 0 10px;
  color: #9eb0c9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.docs-list li {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.docs-list strong { display: block; }
.docs-list span { color: #b7c7de; font-size: 14px; }

.docs-empty {
  margin: 0;
  color: #c5d4ea;
  line-height: 1.4;
}

.intro,
.features article,
.docs,
.feed {
  background: rgba(7, 20, 42, 0.22);
  border: 1px solid rgba(210, 226, 255, 0.24);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.intro {
  margin-top: 18px;
  padding: 16px 16px 18px;
  border-radius: 26px;
}

.pill {
  display: inline-block;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(190, 214, 255, 0.22);
  background: rgba(12, 28, 56, 0.55);
  color: #d5e2f4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 8vw, 44px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lead {
  margin: 16px 0 0;
  max-width: 34rem;
  color: #c5d4ea;
  font-size: 16px;
  line-height: 1.45;
}

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

.features article {
  padding: 18px 18px 16px;
  border-radius: 22px;
}

.features h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.features p {
  margin: 8px 0 0;
  color: #b7c7de;
  line-height: 1.4;
  font-size: 15px;
}

.sheet {
  margin-top: 22px;
  padding: 22px 18px 18px;
  border-radius: 28px;
  background: rgba(245, 247, 251, 0.78);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(3, 12, 28, 0.22);
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sheet h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.lookup {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

input, select, button { font: inherit; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
}

.lookup-field {
  position: relative;
}

.lookup-field svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.lookup input {
  font-size: 20px;
  padding: 16px 16px 16px 44px;
  border-radius: 999px;
}

.lookup-note {
  margin: 0;
  color: #7d8b9e;
  font-size: 14px;
  line-height: 1.4;
}

.result-note { margin-top: 10px; }

.result-note + .result-note { margin-top: 4px; }

.lookup-note b,
.text-link {
  color: var(--blue);
  font-weight: 700;
}

.text-link {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

button[type="submit"] {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 15px 18px;
  cursor: pointer;
}

input:focus, select:focus {
  outline: 3px solid rgba(45, 98, 227, 0.22);
  border-color: var(--blue);
}

button[type="submit"]:hover { background: var(--blue-deep); }

.try {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chip, .text-btn, .delete {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.chip {
  margin: 0 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e4ebf5;
  color: var(--ink);
  font-weight: 700;
}

.chip:hover { background: #d5e0f0; }

.result { margin-top: 16px; }

.loader {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px 8px 8px;
  color: var(--ink);
}

.loader p {
  margin: 0;
  font-weight: 700;
}

.eagle {
  width: 108px;
  height: 82px;
  animation: eagle-spin 1.15s linear infinite;
}

@keyframes eagle-spin {
  to { transform: rotate(360deg); }
}

.profile {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.found-title {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.found-badge {
  justify-self: start;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e4f6ea;
  color: #1d8a4b;
  font-size: 14px;
  font-weight: 700;
}

.profile-status {
  margin: 0;
  font-weight: 700;
}

.profile-status.warn { color: var(--warn-ink); }
.profile-status.bad { color: var(--bad-ink); }

.profile-field {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6edf5;
}

.profile-field span {
  display: block;
  color: #8b97a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-field strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.profile-note {
  margin: 4px 4px 2px;
  color: #7d8b9e;
  font-size: 14px;
  line-height: 1.4;
}

.feed {
  margin-top: 22px;
  padding: 22px 18px 8px;
  border-radius: 26px;
  color: #fff;
}

.feed h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.feed-pill {
  display: inline-block;
  margin: 14px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(190, 214, 255, 0.28);
  background: rgba(8, 20, 42, 0.35);
  color: #d5e2f4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.news li {
  padding: 16px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.news p {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.news time {
  display: block;
  margin-top: 8px;
  color: #9eb0c9;
  font-size: 14px;
}

.news-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}

.news-kicker time {
  display: inline;
  margin: 0;
}

.news-tag {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(140, 170, 255, 0.16);
  color: #d6e2ff;
  font-size: 12px;
  font-weight: 700;
}

.activity article {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.activity h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.activity article p {
  margin: 8px 0 0;
}

.info-list {
  list-style: disc;
  margin: 12px 0 0;
  padding-left: 18px;
}

.info-list li {
  margin: 0;
  padding: 4px 0;
  cursor: default;
}

.info-list li + li { margin-top: 0; }

.foot {
  margin-top: 28px;
  text-align: center;
  color: #8ea0b8;
}

.foot p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.foot p + p {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.answer {
  border-radius: 18px;
  padding: 14px 14px 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.answer.ok { background: var(--ok); border-color: transparent; }
.answer.warn { background: var(--warn); border-color: transparent; }
.answer.bad, .answer.miss { background: var(--bad); border-color: transparent; }

.answer-status {
  margin: 0 0 10px;
  font-weight: 700;
}

.answer.ok .answer-status { color: var(--ok-ink); }
.answer.warn .answer-status { color: var(--warn-ink); }
.answer.bad .answer-status,
.answer.miss .answer-status { color: var(--bad-ink); }

.fields {
  margin: 0;
  display: grid;
  gap: 0;
}

.fields div {
  padding: 10px 0;
  border-top: 1px solid rgba(18, 32, 51, 0.08);
}

.fields dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fields dd {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.miss-title {
  margin: 0;
  font-size: 20px;
}

.miss-text { margin: 6px 0 8px; }

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

.add label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.note {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: var(--bad-ink);
  font-size: 14px;
}

.note.ok { color: var(--ok-ink); }

.list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.person {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.person strong { display: block; }
.person span { color: var(--muted); font-size: 14px; }

.delete {
  color: var(--bad-ink);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0;
}

.text-btn {
  margin-top: 8px;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
}

@media (min-width: 960px) {
  .page {
    width: min(1240px, calc(100% - 48px));
    padding-top: 28px;
  }

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

  .nav-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
    gap: 8px;
  }

  .nav-row .nav-btn,
  .nav-btn.bank {
    width: auto;
    grid-column: auto;
  }

  .brand { margin-right: auto; }

  .nav-btn {
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }

  .workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: start;
    margin-top: 8px;
  }

  .intro {
    margin-top: 0;
    padding: 22px 24px 24px;
  }

  .intro h1 { font-size: 52px; }

  .features { margin-top: 16px; }

  .panel { position: sticky; top: 20px; }

  .panel .sheet { margin-top: 0; }

  .staff { margin-top: 28px; }

  .add {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .add button { align-self: end; }
}

.chat-launcher {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  color: #1a1408;
  background: #e6c36a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.chat-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4453a;
}

.chat-panel {
  position: fixed;
  z-index: 31;
  right: 18px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 110px));
  overflow: hidden;
  border-radius: 22px;
  background: rgba(245, 247, 251, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px) scale(0.96);
  transform-origin: right bottom;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 12px;
  background: #10284d;
  color: #fff;
}

.chat-head p {
  margin: 0;
  color: #e6c36a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-head strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.chat-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 14px;
}

.chat-hello {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.bubble {
  max-width: 86%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
}

.bubble p { margin: 0; line-height: 1.35; }

.bubble img {
  display: block;
  width: min(220px, 100%);
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 6px;
}

.bubble span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.bubble.mine {
  margin-left: auto;
  background: #2d62e3;
  color: #fff;
}

.bubble.mine span { color: rgba(255, 255, 255, 0.75); }

.bubble.theirs { background: #e7eef8; }

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px;
}

#chat-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#chat-contacts[hidden] {
  display: none;
}

.chat-panel:not(.is-chat) .chat-log {
  display: none;
}

.chat-panel.is-chat #chat-hello,
.chat-panel.is-chat #chat-contacts {
  display: none;
}

.chat-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.chat-form label span { color: #c4473a; }

.chat-send {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

.chat-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chat-photo {
  flex: 0 0 auto;
  background: #102444;
}

.chat-picked {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.chat-picked img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  margin-top: 4px;
  border-radius: 8px;
}

.chat-place {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-camera {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-camera[hidden] { display: none; }

.chat-camera.is-silent {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  height: 240px;
  opacity: 0;
  pointer-events: none;
}

.chat-camera video {
  width: 100%;
  max-height: 180px;
  border-radius: 12px;
  background: #0c1c38;
  object-fit: cover;
}

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

.chat-note {
  margin: 8px 14px 12px;
  color: var(--muted);
  font-size: 12px;
}
