/* ТАНКМЕДИА — tokens, reset, typography, controls. Shared by the public site and the working areas. */

@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-cyrillic-wght-normal.3a5ed4d11365.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../fonts/unbounded-latin-wght-normal.8616dc355070.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-cyrillic-wght-normal.fe2bd26ae82a.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/onest-latin-wght-normal.3db826ed1c5d.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic-wght-normal.615bf869ebeb.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.b058178d7f30.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0B0D10;
  --bg-raised: #10141A;
  --surface: #151A21;
  --surface-2: #1B222B;
  --blue: #0D253B;
  --blue-2: #123250;
  --text: #F1F3F5;
  --text-2: #ABB4BF;
  --text-3: #8A94A1;
  --silver: #CAD1D9;
  --accent: #8BAEC8;
  --line: rgba(202, 209, 217, .14);
  --line-2: rgba(202, 209, 217, .26);
  --line-3: rgba(202, 209, 217, .5);
  --danger: #F2A9A9;
  --danger-bg: rgba(214, 84, 84, .12);
  --ok: #9FD5B8;
  --ok-bg: rgba(96, 190, 143, .12);
  --warn: #E7CB8F;
  --warn-bg: rgba(222, 180, 90, .12);

  --f-display: "Unbounded", "Onest", "Segoe UI", Arial, sans-serif;
  --f-text: "Onest", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 64px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--f-text); font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--accent); color: var(--bg); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--text); color: var(--bg); padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* --- Type ------------------------------------------------------------------- */
.display { font-family: var(--f-display); font-weight: 300; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.08; text-wrap: balance; }
.h1 { font-size: clamp(30px, 4.5vw, 66px); }
.h2 { font-size: clamp(24px, 2.9vw, 42px); line-height: 1.14; }
.h3 { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.25; font-weight: 400; letter-spacing: 0; }
.mono { font-family: var(--f-mono); font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--text-2); max-width: 46em; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.nowrap { white-space: nowrap; }

/* --- Logo ------------------------------------------------------------------- */
.logo { display: inline-flex; align-items: center; color: var(--text); }
.logo__svg { height: 15px; width: auto; fill: currentColor; }
.logo__dot { fill: var(--accent); }
.mark__svg { width: 36px; height: 36px; fill: var(--text); }
.mark__frame { fill: none; stroke: var(--line-3); stroke-width: 1.5; }

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  --btn-bg: var(--text); --btn-fg: var(--bg); --btn-bd: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 14px 26px; border: 1px solid var(--btn-bd); border-radius: 2px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 15px/1.2 var(--f-text); letter-spacing: .02em; text-align: center; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn::after { content: "→"; font-family: var(--f-mono); transition: transform .3s var(--ease); }
.btn:hover { --btn-bg: var(--accent); --btn-bd: var(--accent); }
.btn:hover::after { transform: translateX(5px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bg: rgba(202, 209, 217, .08); --btn-bd: var(--line-3); }
.btn--plain::after { content: none; }
.btn--sm { min-height: 42px; padding: 10px 18px; font-size: 14px; gap: 10px; }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: rgba(242, 169, 169, .4); }
.btn--danger:hover { --btn-bg: var(--danger-bg); --btn-bd: var(--danger); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link { color: var(--text); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color .2s, background-size .3s var(--ease); }
.link:hover { color: var(--accent); }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; color: var(--text); }
.arrow-link::after { content: "→"; font-family: var(--f-mono); color: var(--accent); transition: transform .3s var(--ease); }
.arrow-link:hover::after { transform: translateX(5px); }

/* --- Forms ------------------------------------------------------------------ */
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .field__label { font-size: 14px; font-weight: 500; color: var(--silver); }
.field__opt { color: var(--text-3); font-weight: 400; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"],
.field input[type="search"], .field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 15px; background: rgba(8, 10, 13, .6); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 2px; font-size: 16px; line-height: 1.4;
  transition: border-color .2s, background-color .2s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  padding-right: 42px; background-image: linear-gradient(45deg, transparent 50%, var(--silver) 50%), linear-gradient(135deg, var(--silver) 50%, transparent 50%);
  background-position: calc(100% - 21px) 55%, calc(100% - 15px) 55%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field select option { background: var(--surface); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #727C89; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input[type="file"] { width: 100%; padding: 12px; border: 1px dashed var(--line-2); border-radius: 2px; font-size: 14px; color: var(--text-2); }
.field input[type="file"]::file-selector-button { margin-right: 14px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.field__help { font-size: 13.5px; line-height: 1.45; color: var(--text-3); }
.field__error, .errorlist { font-size: 14px; line-height: 1.4; color: var(--danger); }
.errorlist li + li { margin-top: 4px; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--danger); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1px solid var(--line-3); border-radius: 2px;
  background: rgba(8, 10, 13, .6); display: grid; place-content: center; cursor: pointer; min-height: 0; padding: 0;
}
.check input[type="checkbox"]::after { content: ""; width: 10px; height: 10px; background: var(--accent); transform: scale(0); transition: transform .15s var(--ease); }
.check input[type="checkbox"]:checked::after { transform: scale(1); }
.check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.check a:hover { text-decoration-color: currentColor; }
.checks { display: grid; gap: 10px; }
.checks--cols { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hp { position: absolute !important; left: -6000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 16px; border: 1px solid var(--line-2); border-left-width: 3px; border-radius: 2px; background: rgba(202, 209, 217, .05); font-size: 15px; line-height: 1.5; }
.alert--error { border-color: rgba(242, 169, 169, .5); background: var(--danger-bg); color: var(--danger); }
.alert--success { border-color: rgba(159, 213, 184, .5); background: var(--ok-bg); color: var(--ok); }
.alert--warning { border-color: rgba(231, 203, 143, .5); background: var(--warn-bg); color: var(--warn); }
.alert--info { border-color: rgba(139, 174, 200, .5); color: var(--silver); }
.alerts { display: grid; gap: 10px; margin-bottom: 24px; }

/* --- Rich text (Markdown output) ---------------------------------------------- */
.prose { color: var(--text-2); }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose li { max-width: 68ch; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); text-decoration-thickness: 1px; }
.prose a:hover { color: var(--accent); }
.prose ul, .prose ol { display: grid; gap: .55em; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: var(--accent); }
.prose ol { counter-reset: n; }
.prose ol > li { position: relative; padding-left: 40px; counter-increment: n; }
.prose ol > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: .28em; font: 400 12px/1.6 var(--f-mono); color: var(--accent); letter-spacing: .06em; }
.prose li > ul, .prose li > ol { margin-top: .55em; }
.prose h2 { font: 400 clamp(20px, 1.9vw, 27px)/1.22 var(--f-display); text-transform: uppercase; color: var(--text); margin-top: 2.1em; letter-spacing: -.005em; text-wrap: balance; }
.prose h3 { font: 600 clamp(18px, 1.3vw, 20px)/1.35 var(--f-text); color: var(--text); margin-top: 1.7em; }
.prose h2 + *, .prose h3 + * { margin-top: .8em; }
.prose blockquote { border: 1px solid var(--line); border-left: 2px solid var(--accent); background: rgba(13, 37, 59, .45); padding: 18px 22px; color: var(--silver); }
.prose blockquote > * + * { margin-top: .7em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose code { font-family: var(--f-mono); font-size: .88em; background: var(--surface); padding: 2px 6px; border-radius: 2px; color: var(--silver); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 0; }
.prose table { min-width: 560px; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font: 500 12px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: var(--bg-raised); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--text); }

/* --- Status chips --------------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 2px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--silver); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.chip--new, .chip--clarify { color: var(--warn); border-color: rgba(231, 203, 143, .4); }
.chip--preparing, .chip--offer_sent, .chip--negotiation, .chip--in_progress { color: var(--accent); border-color: rgba(139, 174, 200, .45); }
.chip--in_work, .chip--done { color: var(--ok); border-color: rgba(159, 213, 184, .4); }
.chip--completed, .chip--closed, .chip--spam { color: var(--text-3); }
.chip--plain::before { content: none; }
.dot-unread { display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; vertical-align: middle; margin-left: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.prose { min-width: 0; overflow-wrap: break-word; }
.auth__top .logo, .auth__top .back { padding-block: 10px; }
