/* =========================================================
   CalcNote — Inner Pages Stylesheet (dark code-editor theme)
   Используется на внутренних страницах: privacy, consent,
   cookies, terms, offer, changelog, buy.
   Лендинг (index.html) использует css/landing.css.
   Font: Inter (UI), JetBrains Mono (code)
   ========================================================= */

/* Inter — self-hosted, OFL 1.1 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  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;
}

/* JetBrains Mono — self-hosted, OFL 1.1 */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  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: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  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:            #0A0E16;
  --bg-secondary:  #0D1320;
  --surface:       #111827;
  --accent:        #3B82F6;
  --accent-hover:  #2563EB;
  --accent-soft:   #60A5FA;
  --accent-light:  rgba(59, 130, 246, .12);
  --text:          #E6EAF2;
  --text-muted:    #94A0B4;
  --dim:           #5B6678;
  --purple:        #8B5CF6;
  --green:         #34D399;
  --border:        rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .26);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,.45);
  --radius:        14px;
  --radius-sm:     9px;
  --mono:          'JetBrains Mono', 'Fira Code', monospace;
  --sans:          'Inter', -apple-system, sans-serif;
  --max-width:     1140px;
  --transition:    0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--sans); }
::selection { background: rgba(59, 130, 246, .35); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 80px 0; }

/* ---- Typography ---- */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { line-height: 1.7; }
code {
  font-family: var(--mono);
  font-size: .86em;
  background: rgba(59, 130, 246, .12);
  color: var(--accent-soft);
  border: 1px solid rgba(59, 130, 246, .18);
  border-radius: 6px;
  padding: 1px 6px;
}

.section-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 4px;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 22, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { display: block; border-radius: 6px; }
.nav-logo .logo-name { color: var(--text); }
.nav-logo span { color: var(--accent-soft); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn-primary { color: #fff; }
.nav-links .btn-primary:hover { color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #4D90F8, var(--accent));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .4) inset, 0 8px 28px rgba(59, 130, 246, .35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #5B9AFA, var(--accent-hover));
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .5) inset, 0 10px 36px rgba(59, 130, 246, .5);
  color: #fff;
}
.btn-outline {
  background: rgba(148, 163, 184, .07);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: rgba(148, 163, 184, .13); border-color: rgba(148, 163, 184, .4); text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p { font-size: 0.82rem; color: var(--dim); margin-top: 8px; }
.footer-legal { display: flex; flex-direction: column; gap: 6px; }
.footer-legal a { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--text); }
.footer-legal div { font-size: 0.78rem; color: var(--dim); }
.footer-email { font-family: var(--mono); font-size: 0.82rem; color: var(--text-muted); text-decoration: none; }
.footer-email:hover { color: var(--text); }
.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.rkn-notice { font-size: 0.75rem; color: var(--dim); max-width: 640px; text-align: right; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#cookie-banner {
  display: none;
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 9999;
  max-width: 720px;
  margin: 0 auto;
  align-items: center;
  gap: 20px;
  background: rgba(17, 24, 39, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.cookie-text { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.cookie-title { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.cookie-desc { font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); margin: 0; }
.cookie-text a { color: var(--accent-soft); }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-cookie-accept {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-cookie-accept:hover { background: var(--accent-hover); }
.btn-cookie-decline {
  background: rgba(148, 163, 184, .1);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-cookie-decline:hover { background: rgba(148, 163, 184, .18); color: var(--text); }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-page { padding: 60px 0 80px; }
.legal-page .container { max-width: 800px; }
.legal-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.legal-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-body h2 { font-size: 1.2rem; margin: 36px 0 12px; }
.legal-body h3 { font-size: 1rem; margin: 24px 0 8px; color: var(--text-muted); }
.legal-body p  { margin-bottom: 14px; font-size: 0.95rem; color: var(--text-muted); }
.legal-body strong { color: var(--text); }
.legal-body ul { margin: 12px 0 16px 24px; }
.legal-body ul li { list-style: disc; font-size: 0.95rem; margin-bottom: 6px; line-height: 1.6; color: var(--text-muted); }
.legal-body ol li { color: var(--text-muted); }
.legal-body table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.875rem; }
.legal-body table th { text-align: left; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border-strong); font-weight: 600; color: var(--text); }
.legal-body table td { padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; color: var(--text-muted); }
.legal-body .highlight-box {
  background: rgba(59, 130, 246, .08);
  border: 1px solid rgba(59, 130, 246, .22);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.legal-breadcrumb { font-size: 0.82rem; color: var(--dim); margin-bottom: 24px; }
.legal-breadcrumb a { color: var(--dim); }
.legal-breadcrumb a:hover { color: var(--accent-soft); text-decoration: none; }

/* ============================================================
   CHANGELOG
   ============================================================ */
.changelog-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.changelog-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-version { background: rgba(59, 130, 246, .14); color: var(--accent-soft); border: 1px solid rgba(59, 130, 246, .3); font-family: var(--mono); }
.badge-date    { background: rgba(148, 163, 184, .08); color: var(--text-muted); border: 1px solid var(--border); font-weight: 500; }
.badge-current { background: rgba(52, 211, 153, .1); color: var(--green); border: 1px solid rgba(52, 211, 153, .3); font-weight: 500; }

.changelog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.changelog-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.changelog-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-body .changelog-features li,
.changelog-features li {
  list-style: none;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
  margin-bottom: 0;
}
.changelog-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}
.changelog-features code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .18);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  section { padding: 56px 0; }
  .container { padding: 0 18px; }
  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
  .rkn-notice { text-align: left; }
  #cookie-banner { flex-direction: column; align-items: stretch; left: 12px; right: 12px; bottom: 12px; }
  .cookie-actions { justify-content: flex-end; }
  .legal-body table { display: block; overflow-x: auto; }
}
