/* B33 Software site styles. Tokens match the Certificate Manager product UI. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0E0F11;
  --hover: #17181B;
  --line: #232427;
  --line2: #1B1C1F;
  --text: #ECECEA;
  --text2: #BDBDB6;
  --muted: #9A9A94;
  --accent: #C6F36B;
  --on-accent: #0E0F11;
  --btn-line: #2C2D31;
  --log: #0A0B0C;
  --warn: #F5B544;
  --bad: #FF7A66;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAFAF7;
  --hover: #EFEFE9;
  --line: #DEDED6;
  --line2: #E8E8E1;
  --text: #17181A;
  --text2: #3E3F3A;
  --muted: #5E5F59;
  --accent: #3E8A12;
  --on-accent: #FFFFFF;
  --btn-line: #C9C9C0;
  --log: #F1F1EB;
  --warn: #A55F00;
  --bad: #C2321B;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #FAFAF7;
    --hover: #EFEFE9;
    --line: #DEDED6;
    --line2: #E8E8E1;
    --text: #17181A;
    --text2: #3E3F3A;
    --muted: #5E5F59;
    --accent: #3E8A12;
    --on-accent: #FFFFFF;
    --btn-line: #C9C9C0;
    --log: #F1F1EB;
    --warn: #A55F00;
    --bad: #C2321B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.skip:focus { top: 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.label a { color: var(--muted); }
.label a:hover { color: var(--text); }
.mono { font-family: var(--mono); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 16px; padding-top: 20px; padding-bottom: 20px;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.logo b { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; font-size: 15px; font-weight: 500; }
.nav a.link { padding: 6px 0; border-bottom: 2px solid transparent; color: var(--text2); }
.nav a.link:hover { color: var(--text); }
.nav a.link[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  display: none; /* shown by JS */
  align-items: center; justify-content: center;
  height: 36px; padding: 0 12px;
  background: transparent; border: 1px solid var(--btn-line); border-radius: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text2); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.js .theme-toggle { display: inline-flex; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700; font-size: 16px; line-height: 1.3;
  text-align: center; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn.sm { padding: 10px 18px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--btn-line); font-weight: 600; }
.btn.ghost:hover { border-color: var(--text2); filter: none; }
.btn.lg { padding: 14px 30px; font-size: 17px; font-weight: 800; }

.menu-btn {
  display: none;
  flex-direction: column; justify-content: center; align-items: stretch; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px;
  background: transparent; border: 1px solid var(--btn-line); border-radius: 8px; cursor: pointer;
}
.menu-btn span { height: 2px; background: var(--text); }

/* Sections */
.hero { padding: 120px 0 104px; }
.hero .wrap, .page-top .wrap { display: flex; flex-direction: column; gap: 28px; }
h1 {
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.06;
  max-width: 920px; overflow-wrap: anywhere;
}
.lead { font-size: 22px; color: var(--text2); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; }

.page-top { padding: 96px 0 64px; }
.page-top h1 { font-size: clamp(40px, 5.6vw, 72px); }
.page-top.hero-ish { padding: 96px 0 72px; }
.page-top .lead { max-width: 680px; }

.section { border-top: 1px solid var(--line); }
.section > .wrap { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 64px; padding-bottom: 64px; }
.section > .wrap.col { flex-direction: column; gap: 32px; }
.section .label.side { flex: 0 0 200px; }
.section .body { flex: 1 1 400px; display: flex; flex-direction: column; min-width: 0; }
.section .body.narrow { max-width: 760px; gap: 18px; }
.section .body.mid { max-width: 820px; gap: 14px; }
.intro { font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; }
.body p.copy { font-size: 17px; color: var(--text2); }

.principle { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 24px 0; border-top: 1px solid var(--line2); }
.principle .n { flex: 0 0 40px; font-family: var(--mono); font-size: 15px; color: var(--accent); }
.principle .t { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.principle .d { font-size: 16px; color: var(--text2); max-width: 560px; margin-top: 6px; }
.principle > div:last-child { flex: 1 1 240px; min-width: 0; }

.teaser {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.teaser:hover .go { text-decoration: underline; text-underline-offset: 4px; }
.teaser .txt { display: flex; flex-direction: column; gap: 6px; flex: 1 1 260px; min-width: 0; }
.teaser .name { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.teaser .desc { color: var(--text2); }
.go { font-weight: 700; color: var(--accent); }

.band { border-top: 1px solid var(--line); background: var(--hover); }
.band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 28px; padding-top: 88px; padding-bottom: 88px;
}
.band .txt { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.band h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.band p { font-size: 17px; color: var(--text2); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a:hover { color: var(--text); }

/* Products accordion */
.acc { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 96px; }
.acc-item { border-top: 1px solid var(--line); }
.acc-head { margin: 0; font: inherit; }
.acc-btn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  width: 100%; padding: 30px 0; background: transparent; border: 0; text-align: left; cursor: pointer;
}
.acc-btn .n { flex: 0 0 40px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.acc-btn .name { flex: 1 1 200px; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.acc-btn .status { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.acc-btn .glyph { flex: 0 0 28px; text-align: right; font-family: var(--mono); font-size: 22px; color: var(--accent); }
.acc-panel { display: flex; flex-direction: column; gap: 18px; max-width: 824px; padding: 0 0 40px 64px; }
.acc-panel[hidden] { display: none; }
.acc-panel p { font-size: 18px; color: var(--text2); }
.acc-panel .meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }

/* Product page */
.feature { display: flex; flex-wrap: wrap; gap: 6px 32px; padding: 22px 0; border-top: 1px solid var(--line2); }
.feature h3 { flex: 0 0 220px; font-size: 17px; font-weight: 700; }
.feature p { flex: 1 1 260px; font-size: 16px; color: var(--text2); }

.dash { display: flex; flex-direction: column; gap: 4px; background: var(--log); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.dash-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.dash-head b { color: var(--text); font-weight: 500; }
.dash-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-top: 1px solid var(--line2); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }
.dash-row .host { font-size: 15px; font-weight: 600; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line); padding: 1px 6px; }
.dash-row .why { font-size: 14px; color: var(--text2); flex: 1 1 240px; }
.dash-note { padding-top: 12px; font-size: 12px; color: var(--muted); }

.editions-head { display: flex; flex-direction: column; gap: 14px; }
h2.big { font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.editions-head p { font-size: 17px; color: var(--text2); max-width: 680px; }
.ed-list { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.ed { display: flex; flex-wrap: wrap; gap: 10px 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.ed h3 { flex: 0 0 200px; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.ed .pr { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed .price { font-family: var(--mono); font-size: 18px; color: var(--accent); }
.ed .bill { font-size: 14px; color: var(--muted); }
.ed .lim { flex: 2 1 300px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed .lim b { font-size: 16px; font-weight: 600; }
.ed .lim span { font-size: 15px; color: var(--text2); }
.note { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.note b { font-size: 15px; font-weight: 600; }
.note span { font-size: 15px; color: var(--text2); }

.table-scroll { overflow-x: auto; border-top: 1px solid var(--line); }
.table-scroll:focus-visible { outline-offset: -2px; }
table.compare { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
.compare caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.compare th, .compare td { padding: 14px 10px 14px 0; text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; color: var(--muted); }
.compare tbody tr { border-top: 1px solid var(--line2); }
.compare tbody th { width: 260px; font-weight: 600; padding-right: 12px; }
.compare td { color: var(--text2); }
.compare td.yes { color: var(--accent); }
.compare td.no { color: var(--muted); }

/* Contact */
.contact-grid { display: flex; flex-wrap: wrap; gap: 56px 96px; padding-top: 96px; padding-bottom: 104px; }
.contact-info { flex: 1 1 320px; max-width: 460px; display: flex; flex-direction: column; gap: 22px; }
.contact-info h1 { font-size: clamp(40px, 5vw, 64px); }
.contact-info p.lead { font-size: 18px; }
.facts { display: flex; flex-direction: column; margin-top: 12px; border-bottom: 1px solid var(--line); }
.fact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; }
.fact .label { font-size: 12px; letter-spacing: 0.1em; }
.contact-form-col { flex: 1 1 400px; max-width: 640px; min-width: 0; }
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font-size: 16px;
  background: var(--bg); border: 1px solid var(--btn-line); border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.field .err { font-size: 14px; color: var(--bad); min-height: 0; }
.field [aria-invalid="true"] { border-color: var(--bad); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-row .small { font-size: 14px; color: var(--muted); }
.form button.btn { border: 0; }
.form button[disabled] { opacity: 0.6; cursor: wait; }
.form-error { padding: 14px 16px; border: 1px solid var(--bad); border-left-width: 3px; border-radius: 8px; font-size: 15px; }
.form-error b { color: var(--bad); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; display: block; margin-bottom: 4px; }
.form-error a { text-decoration: underline; text-underline-offset: 3px; }
.sent {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--log); border-radius: 8px;
}
.sent[hidden], .form[hidden], [hidden] { display: none; }
.sent .label { color: var(--accent); font-size: 12px; letter-spacing: 0.1em; }
.sent h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.sent p { color: var(--text2); }
.sent .btn { align-self: flex-start; }

/* Prose pages */
.prose { max-width: 760px; display: flex; flex-direction: column; gap: 18px; padding-bottom: 96px; }
.prose h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; padding-top: 18px; }
.prose p, .prose li { font-size: 17px; color: var(--text2); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Phone */
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .site-header .wrap { padding-top: 16px; padding-bottom: 16px; }
  .js .menu-btn { display: flex; }
  .js .nav { display: none; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); font-size: 17px; font-weight: 600; order: 3; }
  .js .nav.open { display: flex; }
  .js .nav a.link { padding: 16px 0; border-bottom: 1px solid var(--line2); color: var(--text); }
  .js .nav a.link[aria-current="page"] { color: var(--accent); border-bottom-color: var(--line2); }
  .js .nav .btn { margin-top: 16px; padding: 14px 18px; }
  .js .nav-tools { flex-direction: column; align-items: stretch; gap: 0; }
  .js .theme-toggle { margin-top: 12px; height: 44px; }
  .nav { gap: 10px 18px; }
  .nav-tools { flex-wrap: wrap; }
  .site-header .wrap { justify-content: space-between; }
  .hero { padding: 56px 0; }
  h1 { font-size: 40px; }
  .page-top { padding: 48px 0 32px; }
  .page-top h1 { font-size: 36px; }
  .page-top.hero-ish { padding: 48px 0 40px; }
  .lead, .intro { font-size: 18px; }
  .section > .wrap { gap: 20px; padding-top: 40px; padding-bottom: 40px; }
  .section .label.side { flex: 1 1 100%; }
  .band .wrap { padding-top: 48px; padding-bottom: 48px; }
  .band h2 { font-size: 28px; }
  .site-footer .wrap { padding-top: 24px; padding-bottom: 24px; }
  .acc { margin-bottom: 48px; }
  .acc-btn { padding: 22px 0; }
  .acc-btn .name { font-size: 22px; }
  .acc-panel { padding: 0 0 28px 0; }
  h2.big { font-size: 30px; }
  .contact-grid { padding-top: 48px; padding-bottom: 56px; gap: 36px; }
  .contact-info h1 { font-size: 40px; }
  .actions .btn { flex: 1 1 100%; }
  .teaser .name { font-size: 22px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.body p.copy.big { font-size: 18px; }
figure.dash { margin: 0; }
.form .small a { text-decoration: underline; text-underline-offset: 3px; }
.js .acc-panel.start-closed { display: none; }
.section > .wrap.col > * { min-width: 0; max-width: 100%; }

.ed .act { flex: 0 0 150px; display: flex; align-items: center; }
.ed .act .btn { opacity: 0; transition: opacity 0.12s; white-space: nowrap; }
.ed:hover .act .btn, .ed:focus-within .act .btn { opacity: 1; }
@media (hover: none), (max-width: 640px) { .ed .act .btn { opacity: 1; } .ed .act { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { .ed .act .btn { transition: none; } }

fieldset.quote { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
fieldset.quote[hidden] { display: none; }
fieldset.quote legend { padding: 0 8px; }
fieldset.quote .small { font-size: 14px; color: var(--muted); }

.ed .act { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.ed-size {
  width: 100%; padding: 9px 10px; font-size: 14px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--btn-line); border-radius: 8px;
  opacity: 0; transition: opacity 0.12s;
}
.ed:hover .ed-size, .ed:focus-within .ed-size { opacity: 1; }
@media (hover: none), (max-width: 640px) { .ed-size { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ed-size { transition: none; } }

.ed .pr { flex: 1 1 0; min-width: 240px; }
.ed .lim { flex: 2 1 0; min-width: 300px; }

.ed .act { flex: 0 0 180px; }
@media (hover: none), (max-width: 640px) { .ed .act { flex: 1 1 100%; } }
