/* Общие цвета, типографика и компоненты BorBit. Подключается последним. */
:root {
    --primary-color: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --background-color: #f1f5f9;
    --background: #f1f5f9;
    --card-color: #fff;
    --surface: #fff;
    --text-color: #1e293b;
    --text-primary: #1e293b;
    --light-text: #64748b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgb(15 23 42 / 6%);
    --shadow-md: 0 4px 16px rgb(15 23 42 / 7%);
    --shadow-lg: 0 12px 32px rgb(15 23 42 / 12%);
    --transition: all .2s ease-in-out;
}
body.bb-site {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--background-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.6;
}
body.bb-site::before { content: none; }
.bb-site * { box-sizing: border-box; }
.bb-site > #site-header, .bb-site > .bb-footer { flex-shrink: 0; }
.bb-site > .bb-footer { margin-top: auto; }
.bb-site :where(button, input, select, textarea) { font-family: inherit; }
.bb-site > .container { box-sizing: border-box; width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.bb-site :where(.card, .project-card) { border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); background-color: var(--card-color); box-shadow: var(--shadow-md); }
.bb-site :where(.title, .main-title, .container > h1) { color: var(--text-color); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; font-weight: 700; letter-spacing: -.025em; }
.bb-site :where(input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="url"], input[type="password"], select, textarea) { border-color: var(--border-color); border-radius: var(--border-radius-sm); }
.bb-site :where(input, select, textarea):focus-visible { outline: 2px solid var(--secondary-color); outline-offset: 2px; }
.bb-site :where(a, button, summary):focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.bb-site :where(.calculator-button, .primary-button, .btn-primary, .generate-btn) { background-color: var(--primary-color); color: #fff; border-radius: var(--border-radius-sm); }
.bb-site.legal-document main { max-width: 1152px; margin: 32px auto; border: 1px solid var(--border-color); box-shadow: var(--shadow-md); border-radius: var(--border-radius-lg); padding: 32px; }
.bb-header, .bb-header * { box-sizing: border-box; }
.bb-site .bb-header {
    display: block; position: relative; z-index: 20; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: linear-gradient(110deg, #1e3a8a, #1e40af 65%, #2563eb);
    color: #fff; box-shadow: var(--shadow-sm); text-align: left;
}
.bb-header-inner { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; }
.bb-header .bb-brand { color: #fff; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.bb-brand span { color: #bfdbfe; }
.bb-tagline { margin: 0; color: #dbeafe; font-size: 14px; flex: 1; min-width: 190px; }
.bb-nav { display: flex; align-items: center; gap: 8px; }
.bb-header :where(a, button, summary) { font: inherit; }
.bb-header :where(.bb-nav > a, summary, .bb-header-actions > a, .bb-bookmark) { color: #fff; text-decoration: none; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; line-height: 1.4; font-size: 14px; cursor: pointer; }
.bb-header :where(.bb-nav > a, summary, .bb-header-actions > a, .bb-bookmark):hover { background: rgb(255 255 255 / 12%); }
.bb-header [aria-current="page"] { background: rgb(255 255 255 / 12%); }
.bb-tools { position: relative; }
.bb-tools summary { list-style: none; white-space: nowrap; }
.bb-tools summary::-webkit-details-marker { display: none; }
.bb-tools summary::after { content: ' ▾'; }
.bb-tools-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 220px; padding: 8px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; box-shadow: var(--shadow-lg); }
.bb-tools-menu a { display: block; padding: 9px 12px; color: #1e293b; font-size: 14px; text-decoration: none; border-radius: 6px; }
.bb-tools-menu a:hover, .bb-tools-menu a[aria-current="page"] { background: #eff6ff; color: #1e40af; }
.bb-header-actions { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 18%); }
.bb-header .bb-support { background: #fff; color: #1e40af; font-weight: 600; }
.bb-header .bb-support:hover { background: #dbeafe; }
.bb-header .bb-bookmark { margin-left: auto; border-color: rgb(255 255 255 / 35%); }
.bb-footer { margin: 0; padding: 28px 24px; color: #64748b; background: #fff; border-top: 1px solid var(--border-color); font: 14px/1.6 system-ui, sans-serif; text-align: left; }
.bb-footer-inner { max-width: 1152px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.bb-footer a { color: #1e40af; text-decoration: none; }
.bb-footer a:hover { text-decoration: underline; }
.bb-footer-brand { font-size: 18px; font-weight: 700; margin-right: auto; }
.bb-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.bb-footer p { width: 100%; margin: 0; }
@media (max-width: 700px) {
    .bb-header-inner { padding: 20px 16px; gap: 12px 16px; }
    .bb-header .bb-brand { font-size: 27px; }
    .bb-tagline { flex-basis: calc(100% - 150px); font-size: 12px; min-width: 140px; }
    .bb-nav { width: 100%; justify-content: space-between; }
    .bb-header-actions { gap: 4px; }
    .bb-header :where(.bb-header-actions > a, .bb-bookmark) { padding: 8px; font-size: 13px; }
    .bb-header .bb-bookmark { margin-left: 0; }
    .bb-site > .container { padding: 24px 16px; }
    .bb-site.legal-document main { margin: 24px 16px; padding: 24px 20px; }
    .bb-footer { padding: 24px 16px; }
    .bb-tools-menu { max-width: calc(100vw - 32px); }
}

.bb-intro { margin-bottom: 24px; }
.bb-intro h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.3; margin: 0 0 12px; }
.bb-intro p { color: var(--text-secondary); }
.bb-intro nav { font-size: 14px; line-height: 1.8; }
.bb-intro a { color: var(--primary-color); }
