/* Flame Buffer components. Built only from tokens.css. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fb-night);
  color: var(--fb-text);
  font-family: var(--fb-font-sans);
  font-size: var(--fb-text-body);
  font-weight: var(--fb-weight-regular);
  line-height: var(--fb-leading);
  overflow-x: hidden;
}

a { color: var(--fb-coral); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }

/* ---------- Layout ---------- */

.fb-column { width: 100%; max-width: var(--fb-column); margin: 0 auto; padding: 0 var(--fb-space-5); }
.fb-wide { width: 100%; max-width: var(--fb-wide); margin: 0 auto; padding: 0 var(--fb-space-5); }
.fb-section { padding: var(--fb-space-8) 0; }
.fb-section--tight { padding: var(--fb-space-7) 0; }
.fb-section--bar { background: var(--fb-bar); border-top: var(--fb-border); border-bottom: var(--fb-border); }
.fb-rule { border: 0; border-top: var(--fb-border); margin: 0; }
.fb-center { text-align: center; }

/* ---------- Top bar ---------- */

.fb-bar {
  background: var(--fb-bar);
  border-bottom: var(--fb-border);
  position: sticky; top: 0; z-index: 10;
}
.fb-bar__inner {
  max-width: var(--fb-column); margin: 0 auto; padding: 0 var(--fb-space-5);
  height: var(--fb-bar-height);
  display: flex; align-items: center; justify-content: space-between; gap: var(--fb-space-4);
}
.fb-bar__links { display: flex; align-items: center; gap: var(--fb-space-5); font-size: 16px; }
.fb-bar__links a { color: var(--fb-text); }
.fb-bar__links a:hover, .fb-bar__links a[aria-current] { color: var(--fb-bright); text-decoration: none; }
.fb-bar__links a[aria-current] { border-bottom: var(--fb-border-coral); padding-bottom: 2px; }

/* The wordmark: a drawn flame glyph and a light lowercase word in the flame gradient */
.fb-mark { display: inline-flex; align-items: center; gap: var(--fb-space-2); text-decoration: none !important; }
.fb-mark__glyph {
  width: 22px; height: 24px; flex: none; display: block;
  background: var(--fb-flame-gradient);
  clip-path: polygon(50% 0%, 64% 34%, 78% 22%, 100% 100%, 64% 100%, 50% 62%, 36% 100%, 0% 100%, 26% 40%, 38% 50%);
}
.fb-mark__word {
  font-size: 22px; font-weight: var(--fb-weight-light); letter-spacing: -0.01em;
  background: var(--fb-flame-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Type ---------- */

.fb-hero-title {
  font-size: var(--fb-text-hero); font-weight: var(--fb-weight-light);
  line-height: var(--fb-leading-tight); letter-spacing: -0.02em;
  color: var(--fb-bright); margin: 0 0 var(--fb-space-4);
}
.fb-h2 {
  font-size: var(--fb-text-h2); font-weight: var(--fb-weight-light);
  line-height: var(--fb-leading-tight); color: var(--fb-coral);
  margin: 0 0 var(--fb-space-4);
}
.fb-h3 { font-size: var(--fb-text-h3); font-weight: var(--fb-weight-regular); color: var(--fb-bright); margin: 0 0 var(--fb-space-2); line-height: 1.3; }
.fb-lead { font-size: var(--fb-text-lead); color: var(--fb-dim); max-width: 620px; margin: 0 0 var(--fb-space-5); }
.fb-center .fb-lead { margin-left: auto; margin-right: auto; }
.fb-accent { color: var(--fb-coral); }
.fb-comment { font-family: var(--fb-font-mono); font-size: var(--fb-text-small); color: var(--fb-dim); margin: 0 0 var(--fb-space-2); }
.fb-comment::before { content: "/// "; }
.fb-mono { font-family: var(--fb-font-mono); font-size: 0.88em; }
.fb-small { font-size: var(--fb-text-small); color: var(--fb-dim); }

/* ---------- Buttons ---------- */

.fb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fb-space-2);
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--fb-radius);
  font-family: var(--fb-font-sans); font-size: 16px; font-weight: var(--fb-weight-bold);
  line-height: 1.2; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.fb-btn--primary { background: var(--fb-coral); color: var(--fb-bright); }
.fb-btn--primary:hover { background: var(--fb-coral-deep); }
.fb-btn--outline { background: transparent; color: var(--fb-bright); border-color: var(--fb-line); }
.fb-btn--outline:hover { border-color: var(--fb-dim); }
.fb-btn--link { background: none; color: var(--fb-coral); padding-left: 0; padding-right: 0; font-weight: var(--fb-weight-regular); }
.fb-btn--sm { padding: 7px 14px; font-size: 14px; }
.fb-btn--block { width: 100%; }
.fb-actions { display: flex; flex-wrap: wrap; gap: var(--fb-space-3); align-items: center; }
.fb-center .fb-actions { justify-content: center; }

/* ---------- Hero ---------- */

.fb-hero { padding: var(--fb-space-8) 0 var(--fb-space-7); }

/* ---------- The buffer window (signature) ---------- */

.fb-buffer {
  background: var(--fb-buffer); border: var(--fb-border);
  font-family: var(--fb-font-mono); font-size: var(--fb-text-code); line-height: 1.75;
  color: var(--fb-text); text-align: left; overflow: hidden;
}
.fb-buffer__body { overflow-x: auto; padding: var(--fb-space-2) 0; }
.fb-buffer__line { display: block; white-space: pre; min-width: max-content; padding-right: var(--fb-space-4); }
.fb-buffer__line::before {
  content: attr(data-n); display: inline-block; width: var(--fb-gutter-width); padding-right: var(--fb-space-3); margin-right: var(--fb-space-2);
  text-align: right; color: var(--fb-dim); opacity: 0.7;
}
.fb-buffer__line--current { background: var(--fb-gutter); }
.fb-buffer__line--current::before { color: var(--fb-bright); opacity: 1; }
.fb-buffer__line--error::before { content: "\25CF  " attr(data-n); color: var(--fb-coral); opacity: 1; }
.fb-buffer__line--warn::before { content: "\25CF  " attr(data-n); color: var(--fb-flame); opacity: 1; }
.fb-buffer__status {
  display: flex; justify-content: space-between; gap: var(--fb-space-4); flex-wrap: wrap;
  background: var(--fb-gutter); border-top: var(--fb-border);
  padding: 2px var(--fb-space-3); font-size: 12px; color: var(--fb-text);
}
.fb-buffer__status b { font-weight: 500; color: var(--fb-bright); }
.fb-buffer__mode { background: var(--fb-coral); color: var(--fb-bright); padding: 0 6px; margin-right: var(--fb-space-2); }
.fb-cursor { display: inline-block; width: 0.6em; height: 1.15em; vertical-align: -0.2em; background: var(--fb-bright); animation: fb-blink 1.1s steps(1) infinite; }
@keyframes fb-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fb-cursor { animation: none; } }

/* Code colors, used inside .fb-buffer and .fb-prose pre */
.fb-c-com { color: var(--fb-dim); font-style: italic; }
.fb-c-key { color: var(--fb-sky); }
.fb-c-str { color: var(--fb-sage); }
.fb-c-num { color: var(--fb-flame); }
.fb-c-hot { color: var(--fb-coral); }

/* ---------- Icon trio (the "install on" row) ---------- */

.fb-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--fb-space-5); text-align: center; }
.fb-trio__item h3 { font-size: 19px; font-weight: var(--fb-weight-regular); color: var(--fb-bright); margin: 0 0 var(--fb-space-3); }
.fb-trio__icon { width: 56px; height: 56px; margin: 0 auto var(--fb-space-3); display: block; color: var(--fb-text); }
.fb-trio__item a { display: block; font-size: 15px; }

/* ---------- Badges and chips ---------- */

.fb-tag {
  display: inline-block; font-family: var(--fb-font-mono); font-size: 12px; line-height: 1.6;
  padding: 0 6px; border: var(--fb-border); color: var(--fb-dim); white-space: nowrap;
}
.fb-tag::before { content: "["; } .fb-tag::after { content: "]"; }
.fb-tag--coral { color: var(--fb-coral); border-color: var(--fb-coral); }
.fb-tag--sage { color: var(--fb-sage); border-color: var(--fb-sage); }
.fb-tag--sky { color: var(--fb-sky); border-color: var(--fb-sky); }
.fb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-sage); vertical-align: 1px; }
.fb-dot--coral { background: var(--fb-coral); } .fb-dot--flame { background: var(--fb-flame); }

/* ---------- Cards and lists ---------- */

.fb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--fb-line); border: var(--fb-border); }
.fb-card { background: var(--fb-night); padding: var(--fb-space-5); }
.fb-card__key { font-family: var(--fb-font-mono); font-size: 13px; color: var(--fb-sky); margin-bottom: var(--fb-space-2); display: block; }
.fb-card__title { font-size: 19px; color: var(--fb-bright); margin: 0 0 var(--fb-space-2); font-weight: var(--fb-weight-regular); }
.fb-card__text { margin: 0; color: var(--fb-dim); font-size: 16px; }

/* Changelog-style list: mono version and date on the left, text on the right */
.fb-log { list-style: none; margin: 0; padding: 0; border-top: var(--fb-border); }
.fb-log li { display: grid; grid-template-columns: 150px 1fr; gap: var(--fb-space-4); padding: var(--fb-space-4) 0; border-bottom: var(--fb-border); }
.fb-log__ver { font-family: var(--fb-font-mono); font-size: 14px; color: var(--fb-bright); }
.fb-log__ver span { display: block; color: var(--fb-dim); font-size: 12px; }
.fb-log p { margin: 0; }

/* Quote: a plain comment block */
.fb-quote { border-left: 2px solid var(--fb-coral); padding: var(--fb-space-2) 0 var(--fb-space-2) var(--fb-space-5); margin: 0; }
.fb-quote p { font-size: 22px; font-weight: var(--fb-weight-light); color: var(--fb-bright); margin: 0 0 var(--fb-space-3); line-height: 1.45; }
.fb-quote cite { font-style: normal; font-family: var(--fb-font-mono); font-size: 13px; color: var(--fb-dim); }

/* Numbers */
.fb-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--fb-border); }
.fb-stat { padding: var(--fb-space-5); border-right: var(--fb-border); }
.fb-stat:last-child { border-right: 0; }
.fb-stat b { display: block; font-size: 36px; font-weight: var(--fb-weight-light); color: var(--fb-bright); line-height: 1.1; }
.fb-stat span { font-size: 14px; color: var(--fb-dim); }

/* ---------- Pricing ---------- */

.fb-toggle { display: inline-flex; border: var(--fb-border); font-family: var(--fb-font-mono); font-size: 13px; }
.fb-toggle button { background: none; border: 0; color: var(--fb-dim); padding: 6px 14px; cursor: pointer; font: inherit; }
.fb-toggle button[aria-pressed="true"] { background: var(--fb-gutter); color: var(--fb-bright); }

.fb-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--fb-line); border: var(--fb-border); text-align: left; }
.fb-plan { background: var(--fb-night); padding: var(--fb-space-6) var(--fb-space-5); display: flex; flex-direction: column; }
.fb-plan--featured { background: var(--fb-buffer); box-shadow: inset 0 2px 0 var(--fb-coral); }
.fb-plan__name { font-size: 24px; font-weight: var(--fb-weight-light); color: var(--fb-coral); margin: 0 0 var(--fb-space-1); }
.fb-plan__desc { color: var(--fb-dim); font-size: 15px; margin: 0 0 var(--fb-space-5); min-height: 48px; }
.fb-plan__price { font-size: 44px; font-weight: var(--fb-weight-light); color: var(--fb-bright); line-height: 1; margin-bottom: var(--fb-space-1); }
.fb-plan__price small { font-size: 15px; color: var(--fb-dim); }
.fb-plan__note { font-family: var(--fb-font-mono); font-size: 12px; color: var(--fb-dim); margin-bottom: var(--fb-space-5); }
.fb-plan__list { list-style: none; padding: 0; margin: var(--fb-space-5) 0 0; font-size: 15px; }
.fb-plan__list li { padding: 6px 0; border-top: var(--fb-border); }
.fb-plan__list li::before { content: "+ "; font-family: var(--fb-font-mono); color: var(--fb-sage); }

.fb-table-wrap { overflow-x: auto; border: var(--fb-border); }
.fb-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.fb-table th, .fb-table td { padding: 10px var(--fb-space-4); text-align: left; border-bottom: var(--fb-border); }
.fb-table thead th { background: var(--fb-gutter); color: var(--fb-bright); font-weight: var(--fb-weight-regular); }
.fb-table tbody th { font-weight: var(--fb-weight-regular); color: var(--fb-text); }
.fb-table td { font-family: var(--fb-font-mono); font-size: 13px; color: var(--fb-dim); }
.fb-table__yes { color: var(--fb-sage) !important; }
.fb-table__no { color: var(--fb-dim); opacity: 0.6; }

.fb-faq { border-top: var(--fb-border); }
.fb-faq details { border-bottom: var(--fb-border); }
.fb-faq summary { list-style: none; cursor: pointer; padding: var(--fb-space-4) 0; color: var(--fb-bright); font-size: 18px; display: flex; justify-content: space-between; gap: var(--fb-space-4); }
.fb-faq summary::-webkit-details-marker { display: none; }
.fb-faq summary::after { content: "+"; font-family: var(--fb-font-mono); color: var(--fb-coral); }
.fb-faq details[open] summary::after { content: "-"; }
.fb-faq p { margin: 0 0 var(--fb-space-4); color: var(--fb-dim); }

/* ---------- Article ---------- */

.fb-meta { font-family: var(--fb-font-mono); font-size: 13px; color: var(--fb-dim); display: flex; flex-wrap: wrap; gap: var(--fb-space-2); }
.fb-meta span + span::before { content: "\00B7"; margin-right: var(--fb-space-2); }

.fb-prose { font-size: 18px; line-height: 1.7; }
.fb-prose h2 { font-size: 30px; font-weight: var(--fb-weight-light); color: var(--fb-coral); margin: var(--fb-space-7) 0 var(--fb-space-3); line-height: 1.2; }
.fb-prose h3 { font-size: 20px; font-weight: var(--fb-weight-regular); color: var(--fb-bright); margin: var(--fb-space-6) 0 var(--fb-space-2); }
.fb-prose p { margin: 0 0 var(--fb-space-4); }
.fb-prose ul, .fb-prose ol { padding-left: 1.3em; margin: 0 0 var(--fb-space-4); }
.fb-prose li { margin-bottom: var(--fb-space-1); }
.fb-prose ul li::marker { content: "-  "; color: var(--fb-coral); font-family: var(--fb-font-mono); }
.fb-prose code { font-family: var(--fb-font-mono); font-size: 0.82em; background: var(--fb-buffer); border: var(--fb-border); padding: 1px 5px; color: var(--fb-bright); }
.fb-prose pre { background: var(--fb-buffer); border: var(--fb-border); padding: var(--fb-space-4); overflow-x: auto; font-family: var(--fb-font-mono); font-size: var(--fb-text-code); line-height: 1.7; margin: 0 0 var(--fb-space-5); }
.fb-prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.fb-prose figure { margin: var(--fb-space-6) 0; }
.fb-prose figcaption { font-family: var(--fb-font-mono); font-size: 13px; color: var(--fb-dim); margin-top: var(--fb-space-2); }
.fb-prose blockquote { margin: var(--fb-space-6) 0; border-left: 2px solid var(--fb-coral); padding-left: var(--fb-space-5); font-size: 22px; font-weight: var(--fb-weight-light); color: var(--fb-bright); }

.fb-callout { border: var(--fb-border); border-left: 2px solid var(--fb-flame); background: var(--fb-buffer); padding: var(--fb-space-4) var(--fb-space-5); margin: 0 0 var(--fb-space-5); font-size: 16px; }
.fb-callout strong { color: var(--fb-flame); font-family: var(--fb-font-mono); font-weight: 500; font-size: 13px; display: block; margin-bottom: 2px; }

.fb-author { display: flex; align-items: center; gap: var(--fb-space-3); }
.fb-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--fb-gutter); border: var(--fb-border); font-family: var(--fb-font-mono); font-size: 14px; color: var(--fb-coral); }
.fb-author b { display: block; color: var(--fb-bright); font-weight: var(--fb-weight-regular); }
.fb-author span { font-size: 14px; color: var(--fb-dim); }
.fb-author--card { border: var(--fb-border); padding: var(--fb-space-5); align-items: flex-start; }

.fb-posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--fb-space-5); }
.fb-post { border-top: var(--fb-border-coral); padding-top: var(--fb-space-3); }
.fb-post h3 { font-size: 19px; font-weight: var(--fb-weight-regular); margin: var(--fb-space-1) 0; }
.fb-post h3 a { color: var(--fb-bright); }
.fb-post p { margin: 0; color: var(--fb-dim); font-size: 15px; }

/* ---------- Forms ---------- */

.fb-form { display: grid; gap: var(--fb-space-4); }
.fb-field { display: grid; gap: 6px; }
.fb-label { font-size: 15px; color: var(--fb-bright); }
.fb-input, .fb-select {
  width: 100%; background: var(--fb-buffer); border: var(--fb-border); border-radius: var(--fb-radius);
  color: var(--fb-bright); font-family: var(--fb-font-mono); font-size: 15px; padding: 11px 12px;
}
.fb-input::placeholder { color: var(--fb-dim); }
.fb-input:focus, .fb-select:focus { outline: none; border-color: var(--fb-coral); box-shadow: inset 2px 0 0 var(--fb-coral); }
.fb-help { font-size: 13px; color: var(--fb-dim); font-family: var(--fb-font-mono); }
.fb-error { font-size: 13px; color: var(--fb-coral); font-family: var(--fb-font-mono); }
.fb-field--error .fb-input { border-color: var(--fb-coral); }
.fb-input-wrap { position: relative; }
.fb-input-wrap .fb-input { padding-right: 70px; }
.fb-input-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--fb-coral); font-family: var(--fb-font-mono); font-size: 13px; cursor: pointer; }
.fb-check { display: flex; gap: var(--fb-space-3); align-items: flex-start; font-size: 15px; }
.fb-check input { accent-color: var(--fb-coral); width: 16px; height: 16px; margin-top: 4px; flex: none; }
.fb-divider-text { display: flex; align-items: center; gap: var(--fb-space-3); color: var(--fb-dim); font-family: var(--fb-font-mono); font-size: 12px; }
.fb-divider-text::before, .fb-divider-text::after { content: ""; flex: 1; border-top: var(--fb-border); }
.fb-btn--social { background: var(--fb-buffer); color: var(--fb-bright); border-color: var(--fb-line); font-weight: var(--fb-weight-regular); }
.fb-btn--social:hover { border-color: var(--fb-dim); }
.fb-btn__letter { width: 20px; height: 20px; display: grid; place-items: center; border: var(--fb-border); font-family: var(--fb-font-mono); font-size: 12px; color: var(--fb-coral); }

/* ---------- Footer ---------- */

.fb-footer { background: var(--fb-bar); border-top: var(--fb-border); padding: var(--fb-space-7) 0 var(--fb-space-5); font-size: 15px; }
.fb-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--fb-space-5); }
.fb-footer h4 { font-size: 14px; font-weight: var(--fb-weight-regular); color: var(--fb-dim); margin: 0 0 var(--fb-space-3); font-family: var(--fb-font-mono); }
.fb-footer ul { list-style: none; margin: 0; padding: 0; }
.fb-footer li { margin-bottom: 6px; }
.fb-footer li a { color: var(--fb-text); }
.fb-footer__bottom { margin-top: var(--fb-space-7); padding-top: var(--fb-space-4); border-top: var(--fb-border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--fb-space-3); font-family: var(--fb-font-mono); font-size: 12px; color: var(--fb-dim); }

/* ---------- Phone ---------- */

@media (max-width: 720px) {
  .fb-bar__links { gap: var(--fb-space-4); font-size: 15px; }
  .fb-bar__links .fb-hide-sm { display: none; }
  .fb-section { padding: var(--fb-space-7) 0; }
  .fb-hero { padding: var(--fb-space-7) 0 var(--fb-space-6); }
  .fb-trio, .fb-grid, .fb-plans, .fb-posts { grid-template-columns: 1fr; }
  .fb-trio { gap: var(--fb-space-6); }
  .fb-stats { grid-template-columns: 1fr; }
  .fb-stat { border-right: 0; border-bottom: var(--fb-border); }
  .fb-stat:last-child { border-bottom: 0; }
  .fb-log li { grid-template-columns: 1fr; gap: var(--fb-space-1); }
  .fb-footer__cols { grid-template-columns: 1fr 1fr; }
  .fb-plan__desc { min-height: 0; }
  .fb-buffer { font-size: 12.5px; }
  :root { --fb-gutter-width: 36px; }
}
