/* secret.strateg.link — одна визуальная семья с приложениями «Стратега» (assets/brand/app-kit):
   графит, фирменный градиент #DC5BF2 → #2AE8C6, Montserrat в заголовках, Inter в тексте.
   Один эффект на странице — перелив бренда в ключевых словах заголовка.
   Шрифты — assets/fonts.css (копия из app-kit), подключается отдельной ссылкой в <head>. */

:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --card: #121821;
  --card-2: #19202b;
  --line: #232c39;
  --line-strong: #323d4d;
  --text: #e8eaed;
  --muted: #8f97a8;
  --dim: #626b7c;
  --accent: #DC5BF2;
  --accent-2: #2AE8C6;
  --brand: linear-gradient(92deg, var(--accent), var(--accent-2));
  --flow-text: linear-gradient(100deg, #DC5BF2 0%, #2AE8C6 50%, #DC5BF2 100%);
  --on-accent: #0b0e13;
  --link: #e48cf6;
  --ok: #2AE8C6;
  --warn: #f0c674;
  --bad: #f4a3a3;
  --bad-line: rgba(244, 163, 163, .35);
  --focus: #e48cf6;
  --logo-word: #2AE8C6;
  --logo-sub: #DC5BF2;
  --glow-1: rgba(220, 91, 242, .16);
  --glow-2: rgba(42, 232, 198, .11);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .7);
  --radius: 16px;
  --radius-sm: 10px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f5f8;
    --card: #ffffff;
    --card-2: #f1f3f7;
    --line: #e1e5ec;
    --line-strong: #cbd2dc;
    --text: #10151c;
    --muted: #586274;
    --dim: #8a93a3;
    --flow-text: linear-gradient(100deg, #b236d0 0%, #0c9d86 50%, #b236d0 100%);
    --link: #9a2fb8;
    --ok: #0b8a76;
    --warn: #8a5d00;
    --bad: #b42318;
    --bad-line: rgba(180, 35, 24, .3);
    --focus: #9a2fb8;
    --logo-word: #10a58c;
    --logo-sub: #b23fd0;
    --glow-1: rgba(220, 91, 242, .12);
    --glow-2: rgba(42, 232, 198, .12);
    --shadow: 0 24px 60px -36px rgba(16, 21, 28, .28);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Мягкое свечение бренда за первым экраном — декорация, без анимации. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 620px;
  background:
    radial-gradient(520px 320px at 12% -40px, var(--glow-1), transparent 70%),
    radial-gradient(560px 340px at 92% 40px, var(--glow-2), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, 780px); margin-inline: auto; position: relative; z-index: 1; }

.i { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-lg { width: 28px; height: 28px; }

/* ── Шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 8px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand .logo { height: 52px; width: auto; }
.brand-sep { width: 1px; height: 30px; background: var(--line-strong); }
.brand-name { font: 600 18px/1 Montserrat, Inter, sans-serif; letter-spacing: .01em; }
.top-link { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.top-link:hover { color: var(--text); }

.logo .w { fill: var(--logo-word); }
.logo .t { fill: var(--logo-sub); }

/* ── Первый экран ── */
.hero { padding: 36px 0 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); font-size: 13px; background: color-mix(in srgb, var(--card) 70%, transparent);
}
.eyebrow .i { width: 16px; height: 16px; color: var(--ok); }
h1 {
  margin: 0 0 16px;
  font: 700 clamp(30px, 5.4vw, 46px)/1.1 Montserrat, Inter, sans-serif;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.flow {
  background: var(--flow-text) 0 50% / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brand-flow 7s ease-in-out infinite;
}
@keyframes brand-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.lead { margin: 0; max-width: 62ch; color: var(--muted); font-size: 17px; text-wrap: pretty; }

/* ── Карточки ── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card:focus { outline: none; }
h2, .h2-like { margin: 0; font: 700 22px/1.25 Montserrat, Inter, sans-serif; letter-spacing: 0; }
.muted { color: var(--muted); }

/* ── Поля ── */
.field { display: block; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 9px; padding: 0;
  font-weight: 600; font-size: 15px;
}
.hint { font-weight: 400; font-size: 13px; color: var(--muted); text-align: right; }
.hint.is-bad { color: var(--bad); font-weight: 600; }
.note { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }

textarea, input[type="password"], input[type="text"], .linkbox input {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 15px/1.55 var(--mono);
  transition: border-color .15s;
}
textarea { display: block; min-height: 150px; padding: 14px 16px; resize: vertical; }
input[type="password"], input[type="text"] { padding: 11px 14px; height: 46px; }
textarea::placeholder, input::placeholder { color: var(--dim); font-family: Inter, system-ui, sans-serif; }
textarea:hover, input:hover { border-color: var(--line-strong); }
textarea:focus-visible, input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; border-radius: var(--radius-sm); }

/* Загрузка файлов */
.drop {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover { border-color: var(--muted); }
.drop.is-over { border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop .i-lg { color: var(--accent-2); }
.drop b { color: var(--text); font-weight: 600; }
.drop small { display: block; font-size: 13px; color: var(--dim); }

.files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.files li {
  display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 6px 6px 6px 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.files .i { color: var(--muted); width: 18px; height: 18px; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .size { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Сроки */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--text); white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.chip:hover span { border-color: var(--muted); }
.chip input:checked + span { background: var(--brand); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Параметры: одноразовость и пароль */
.options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 24px; align-items: start; margin-bottom: 24px; }
.options .field { margin: 0; }
/* padding-top выравнивает переключатель по середине поля пароля в соседней колонке */
.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding-top: 43px; }
.switch input {
  appearance: none; -webkit-appearance: none;
  position: relative; flex-shrink: 0;
  width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: var(--line-strong);
  cursor: pointer; transition: background-color .2s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .2s;
}
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch b { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.switch small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 2px; }

.pw { position: relative; }
.pw input { padding-right: 50px; }
.pw .icon-btn { position: absolute; top: 3px; right: 3px; }
.pw .icon-btn[aria-pressed="true"] { color: var(--accent-2); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card-2); color: var(--text);
  font: 600 15px/1 Inter, system-ui, sans-serif;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: border-color .15s, background-color .15s, opacity .15s, transform .1s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--brand); border: 0; color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-lg { height: auto; min-height: 54px; padding: 12px 22px; font-size: 16px; line-height: 1.3; white-space: normal; text-align: center; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { border-color: var(--bad); }
.btn-danger.is-armed { background: var(--bad); color: var(--card); border-color: var(--bad); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--line); }

.submit-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.submit-row .btn { width: 100%; }

.status { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.status.is-error { color: var(--bad); padding: 12px 14px; border: 1px solid var(--bad-line); border-radius: var(--radius-sm); }
.progress { display: block; height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width .15s; }

/* ── Результат ── */
.result-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.result-head p { margin: 6px 0 0; }
.badge {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--on-accent);
}
.badge .i { stroke-width: 2.4; }
.result.is-deleted .badge { background: var(--card-2); color: var(--muted); }
.result.is-deleted .linkbox, .result.is-deleted #share, .result.is-deleted #delete-now { display: none; }

.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; height: 54px; padding: 0 16px; font-size: 14px; color: var(--text); }
.linkbox .btn { height: 54px; }

.facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 15px; line-height: 1.5; }
.facts .i { margin-top: 1px; color: var(--accent-2); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions .note { flex-basis: 100%; margin: 0 0 4px; }

/* ── Просмотр ── */
.view { margin-top: 28px; }
.state-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.state-head p { margin: 6px 0 0; color: var(--muted); }
.state-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--accent-2);
}
.state-icon.is-brand { background: var(--brand); border: 0; color: var(--on-accent); }
.state-icon.is-muted { color: var(--muted); }
.view .facts { margin: 0 0 22px; }
.open-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.open-row .btn { width: 100%; }
.form-error { margin: 0; color: var(--bad); font-size: 14px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.block-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; font-weight: 600; font-size: 15px; }
.secret-text {
  margin: 0;
  max-height: 60vh; overflow: auto;
  padding: 16px 18px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 15px/1.6 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
  user-select: text;
}
.secret-block + .secret-block { margin-top: 22px; }
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px; padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  font-size: 14px; line-height: 1.5;
}
.callout .i { color: var(--warn); margin-top: 1px; }
.callout b { display: block; }

/* ── Как это работает ── */
.how { padding: 56px 0 8px; }
.how h2 { margin-bottom: 20px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.how-item { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--card) 60%, transparent); }
.how-item .state-icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px; }
.how-item h3 { margin: 0 0 6px; font: 600 16px/1.35 Montserrat, Inter, sans-serif; }
.how-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ── Подвал ── */
.foot { margin-top: auto; padding: 56px 0 32px; position: relative; z-index: 1; }
.foot-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.foot-note { max-width: 46ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.foot-note p { margin: 0 0 8px; }
.foot-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.foot-logo { display: block; line-height: 0; }
.foot-logo .logo { width: 178px; height: auto; }
.contacts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 15px; }
.contacts a { color: var(--muted); text-decoration: none; }
.contacts a:hover { color: var(--accent-2); }

/* ── Уведомление ── */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10;
  transform: translate(-50%, 12px); opacity: 0;
  max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px;
  background: var(--text); color: var(--bg);
  font-size: 15px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
  transition: opacity .2s, transform .2s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Узкие экраны ── */
@media (max-width: 680px) {
  .top { padding-top: 16px; }
  .brand .logo { height: 42px; }
  .brand-sep { height: 24px; }
  .brand-name { font-size: 16px; }
  .top-link { display: none; }
  .hero { padding: 24px 0 22px; }
  .lead { font-size: 16px; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .options { grid-template-columns: minmax(0, 1fr); }
  .switch { padding-top: 0; }
  .chip span { height: 38px; padding: 0 14px; }
  .linkbox { flex-direction: column; }
  .linkbox .btn { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-side, .contacts { align-items: flex-start; }
  .files .btn span { display: none; }
  .files .btn { width: 40px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flow { background-position: 0 50%; }
}

@media (forced-colors: active) {
  .flow { color: CanvasText; background: none; }
}
