.bc-scope {
  --bg: #f4f8fc;
  --bg-deep: #e7eef6;
  --paper: rgba(255, 255, 255, 0.82);
  --ink: #102033;
  --muted: #52657c;
  --line: rgba(16, 48, 84, 0.12);
  --accent: #0b87a8;
  --accent-2: #5b4cdb;
  --accent-ink: #086883;
  --gold: #0b87a8;
  --result: #f7fbff;
  --result-ink: #102033;
  --result-dim: #52657c;
  --shadow: 0 18px 40px rgba(28, 64, 110, 0.08);
  --serif: Syne, Outfit, "Segoe UI", sans-serif;
  --sans: Outfit, "Segoe UI", sans-serif;
  --radius: 22px;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 8% -10%, rgba(14, 180, 214, 0.2), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(110, 96, 255, 0.14), transparent 50%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 420px, #f4f8fc 100%);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

.bc-scope::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 70, 120, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 70, 120, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 75%);
}

.bc-scope *,
.bc-scope *::before,
.bc-scope *::after {
  box-sizing: border-box;
}

.bc-scope h1,
.bc-scope h2,
.bc-scope h3,
.bc-scope p {
  margin: 0;
}

.bc-scope a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

.bc-scope button,
.bc-scope input,
.bc-scope select,
.bc-scope textarea {
  font: inherit;
  color: inherit;
}

.bc-scope :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.bc-scope ::selection {
  background: rgba(11, 135, 168, 0.22);
}

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

.bc-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.bc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 8px;
}

.bc-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.bc-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(62, 224, 255, 0.95), rgba(124, 107, 255, 0.9));
  color: #041018;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  flex: 0 0 auto;
  box-shadow: 0 8px 22px rgba(14, 160, 200, 0.28);
}

.bc-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.bc-brand strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.bc-brand span,
.bc-status,
.bc-eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bc-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.bc-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 14px;
  scrollbar-width: none;
}

.bc-nav::-webkit-scrollbar {
  display: none;
}

.bc-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
}

.bc-nav a[aria-current="page"],
.bc-nav a:hover {
  background: rgba(11, 135, 168, 0.1);
  border-color: rgba(11, 135, 168, 0.4);
  color: var(--accent-ink);
}

.bc-hero {
  padding: 28px 0 8px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: end;
}

.bc-eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
}

.bc-hero h1,
.bc-calc-head h1,
.bc-section h2,
.bc-prose h2 {
  font-family: var(--serif);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.bc-hero h1 {
  font-size: clamp(46px, 6.4vw, 78px);
  max-width: 12ch;
}

.bc-lede {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 18px;
}

.bc-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bc-points li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  backdrop-filter: blur(12px);
}

.bc-points strong {
  display: block;
  font-size: 14px;
}

.bc-points span {
  color: var(--muted);
  font-size: 13.5px;
}

.bc-search {
  display: block;
  margin: 26px 0 8px;
}

.bc-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 17px;
  box-shadow: 0 0 0 1px rgba(11, 135, 168, 0.04), var(--shadow);
}

.bc-search input:focus {
  border-color: rgba(11, 135, 168, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 135, 168, 0.12);
}

.bc-ad {
  margin: 18px 0 4px;
}

.bc-ad-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bc-ad-code {
  overflow: auto;
}

.bc-ad-code img,
.bc-ad-code iframe,
.bc-ad-code ins {
  max-width: 100%;
}

.bc-section {
  padding: 26px 0 6px;
}

.bc-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.bc-section h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.bc-section-head a {
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  text-decoration: none;
}

.bc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.bc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  border: 1px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 24px rgba(28, 64, 110, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bc-card:hover {
  border-color: var(--cat, var(--accent));
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(28, 64, 110, 0.1), 0 0 0 1px var(--cat, var(--accent));
}

.bc-card[data-cat="finansy"] { --cat: #0c8f72; }
.bc-card[data-cat="matematika"] { --cat: #3a63e8; }
.bc-card[data-cat="zdorove"] { --cat: #d43a68; }
.bc-card[data-cat="konvertory"] { --cat: #b47a08; }
.bc-card[data-cat="avto"] { --cat: #2c8a38; }
.bc-card[data-cat="stroika"] { --cat: #b56a2e; }
.bc-card[data-cat="vremya"] { --cat: #4a5ed4; }
.bc-card[data-cat="byt"] { --cat: #7a45c4; }

.bc-card-kicker {
  color: var(--cat, var(--accent));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bc-card strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.bc-card p {
  color: var(--muted);
  font-size: 14.5px;
}

.bc-empty {
  padding: 28px 0 40px;
  color: var(--muted);
}

.bc-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  padding-top: 8px;
}

.bc-crumbs a {
  color: inherit;
  text-decoration: none;
}

.bc-crumbs a:hover {
  color: var(--accent);
}

.bc-calc-head {
  padding: 18px 0 18px;
  max-width: 760px;
}

.bc-calc-head h1 {
  font-size: clamp(36px, 5vw, 60px);
  max-width: 16ch;
}

.bc-calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.bc-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.bc-form {
  display: grid;
  gap: 14px;
}

.bc-field label,
.bc-segment-title {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.bc-control {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 0 12px;
}

.bc-control:focus-within {
  border-color: rgba(11, 135, 168, 0.55);
  box-shadow: 0 0 0 3px rgba(11, 135, 168, 0.12);
}

.bc-control input,
.bc-field select,
.bc-field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 0;
  outline: none;
}

.bc-field select,
.bc-field textarea {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 12px;
}

.bc-field textarea {
  min-height: 140px;
  resize: vertical;
}

.bc-unit {
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.bc-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.bc-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bc-segmented label {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}

.bc-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bc-segmented span {
  display: inline-flex;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.bc-segmented input:checked + span {
  background: linear-gradient(90deg, #3ee0ff, #7c6bff);
  color: #041018;
  border-color: transparent;
}

.bc-segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bc-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.bc-check input {
  margin-top: 4px;
  accent-color: #0b87a8;
}

.bc-submit,
.bc-copy,
.bc-again,
.bc-keys button {
  border: 0;
  cursor: pointer;
}

.bc-submit,
.bc-again {
  background: linear-gradient(90deg, #3ee0ff, #5b8cff);
  color: #041018;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(62, 224, 255, 0.18);
}

.bc-submit:hover,
.bc-again:hover {
  filter: brightness(1.06);
}

.bc-copy {
  margin-top: 14px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(11, 135, 168, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.bc-result {
  position: sticky;
  top: 14px;
  background:
    radial-gradient(420px 180px at 90% 0%, rgba(20, 196, 224, 0.16), transparent 55%),
    linear-gradient(180deg, #ffffff, #f3f9ff);
  color: var(--result-ink);
  border: 1px solid rgba(11, 135, 168, 0.22);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 220px;
  box-shadow: 0 0 36px rgba(20, 180, 210, 0.1), var(--shadow);
}

.bc-kicker {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bc-result-value {
  font-family: var(--serif);
  font-weight: 750;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 12px 0 6px;
  overflow-wrap: anywhere;
  background: linear-gradient(90deg, #0a3a52 8%, #0b87a8 48%, #4d45d6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.bc-result-value.is-long {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
}

.bc-result-label {
  color: var(--result-ink);
  font-weight: 650;
}

.bc-result-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.bc-result-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 48, 84, 0.1);
}

.bc-result-list dt {
  color: var(--result-dim);
}

.bc-result-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bc-result-list small,
.bc-notes {
  display: block;
  color: var(--result-dim);
  font-weight: 500;
  font-size: 13px;
}

.bc-notes {
  margin-top: 12px;
}

.bc-error {
  color: #c4234a;
  font-weight: 700;
}

.bc-table-wrap {
  margin-top: 14px;
}

.bc-table-wrap summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 700;
}

.bc-table-scroll {
  overflow-x: auto;
  margin-top: 8px;
}

.bc-scope table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.bc-scope th,
.bc-scope td {
  text-align: right;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(16, 48, 84, 0.1);
  white-space: nowrap;
}

.bc-scope th:first-child,
.bc-scope td:first-child {
  text-align: left;
}

.bc-prose {
  padding: 28px 0 10px;
  max-width: 760px;
}

.bc-prose h2 {
  font-size: 32px;
  margin: 22px 0 8px;
}

.bc-prose p,
.bc-prose li {
  color: var(--ink);
  font-size: 17px;
}

.bc-prose p + p,
.bc-prose ul {
  margin-top: 8px;
}

.bc-prose a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.bc-prose ul {
  padding-left: 1.15em;
}

.bc-inputs,
.bc-picks {
  display: grid;
  gap: 6px;
}

.bc-guide {
  padding-bottom: 12px;
}

.bc-formula {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 600;
  background: rgba(11, 135, 168, 0.08);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 0 14px 14px 0;
  margin-top: 10px;
}

.bc-example {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 16px;
}

.bc-faq {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.bc-faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
}

.bc-faq summary {
  cursor: pointer;
  font-weight: 700;
}

.bc-faq p {
  margin-top: 8px;
  color: var(--muted);
}

.bc-related {
  padding-bottom: 28px;
}

.bc-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 20px;
}

.bc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.bc-footer a {
  color: inherit;
  text-decoration: none;
}

.bc-footer a:hover {
  color: var(--accent);
}

.bc-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.bc-display {
  grid-column: 1 / -1;
  min-height: 78px;
  border-radius: 16px;
  background: #f7fbff;
  border: 1px solid rgba(11, 135, 168, 0.28);
  color: #0b6e8a;
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: -0.04em;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  box-shadow: inset 0 0 24px rgba(20, 180, 210, 0.06);
}

.bc-keys button {
  height: 58px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 20px;
  font-weight: 650;
}

.bc-keys .is-op {
  background: rgba(11, 135, 168, 0.08);
  color: var(--accent);
}

.bc-keys .is-eq {
  background: linear-gradient(90deg, #3ee0ff, #5b8cff);
  color: #041018;
  border-color: transparent;
}

.bc-dock {
  display: none;
}

@media (max-width: 860px) {
  .bc-hero,
  .bc-calc-layout,
  .bc-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .bc-header {
    display: flex;
  }

  .bc-status {
    display: none;
  }

  .bc-result {
    position: static;
  }

  .bc-wrap {
    width: min(1120px, calc(100% - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-scope * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .bc-header,
  .bc-nav,
  .bc-search,
  .bc-submit,
  .bc-copy,
  .bc-dock,
  .bc-footer,
  .bc-status,
  .bc-ad {
    display: none !important;
  }

  .bc-scope {
    background: white;
    color: black;
  }

  .bc-scope::before {
    display: none;
  }

  .bc-result {
    position: static;
    background: white;
    color: black;
    border-color: #ccc;
  }

  .bc-result-value,
  .bc-kicker,
  .bc-copy {
    color: black;
    background: none;
    -webkit-text-fill-color: black;
  }
}

.bc-embed {
  min-height: 0;
  border-radius: 24px;
  padding: 8px;
  background: transparent;
}
