/* ====================================================
   tool-page.css — ClickShot · Shared component library
   for all tool / service pages (parsers, analyzers,
   converters, API explorers, dashboards).

   Depends on: base.css (design tokens, fonts, ink scale)
   ====================================================

   PHILOSOPHY
   ──────────
   Tool pages share one visual language that sits distinct
   from the marketing landing: same design system tokens
   from base.css, but tighter density (13 px base font),
   a white background (no bone), and lime (#C5FF1A) as the
   sole accent for interactive states. Audience is specialists
   who need information density, not visual theater.

   CREATING A NEW TOOL PAGE
   ────────────────────────
   See the clickshot-tool-page skill (.claude/skills/) for the full
   step-by-step guide, copy rules and conventions. Quick version:

   1. Copy landing-php/tool/firecrawl/ as your starting template.
      Tool pages live in tool/<name>/ (two levels below css/).
   2. Add class="fc-app" to <body>.
   3. Link in <head> (in this order):
        <link rel="stylesheet" href="../../css/base.css">
        <link rel="stylesheet" href="../../css/nav.css">
        <link rel="stylesheet" href="../../css/tool-page.css">
        <link rel="stylesheet" href="<name>.css">
   4. require_once sections/icons.php; include sections/nav.php.
   5. Build with the components below; see HTML SKELETON.
   6. Write JS in tool/<name>/script.js.
   7. Add the help-modal JS snippet (see HELP MODAL section).

   Icons: use icon('name', size) from sections/icons.php — never emoji
   (brand rule). The skeleton below uses icon() calls for that reason.

   HTML SKELETON
   ─────────────
   <body class="fc-app">
     <?php include 'sections/nav.php'; ?>

     <header class="fc-hero">
       <div class="dotfield fc-hero-dots" data-variant="light" aria-hidden="true"><canvas></canvas></div>
       <div class="container fc-hero-inner">
         <div>
           <p class="fc-eyebrow">Категория · подзаголовок</p>
           <h1 class="fc-title">Название инструмента</h1>
           <p class="fc-sub">Краткое описание: что делает, для кого.</p>
         </div>
         <div class="fc-hero-meta">
           <button type="button" class="fc-help-btn" id="fc-help-open">
             <?= icon('search', 12) ?> Как пользоваться?
           </button>
           <a class="fc-hero-link" href="..." target="_blank" rel="noopener">Docs →</a>
           <a class="fc-hero-link" href="..." target="_blank" rel="noopener">Получить ключ →</a>
         </div>
       </div>
     </header>

     <main id="main-content" class="fc-main">
       <div class="container">

         <!-- Topbar: API key + mode switcher (оба блока опциональны) -->
         <section class="fc-topbar" aria-label="Настройки">
           <div class="fc-key">
             <label class="fc-key-label" for="my-key"><?= icon('zap', 12) ?> API key</label>
             <div class="fc-key-input-wrap">
               <input type="password" id="my-key" class="fc-input fc-key-input" placeholder="sk-...">
               <button type="button" class="fc-icon-btn" title="Показать"><?= icon('search', 14) ?></button>
               <button type="button" class="fc-icon-btn" title="Очистить"><?= icon('minus', 14) ?></button>
             </div>
             <span class="fc-key-status" data-state="empty">не задан</span>
           </div>
           <div class="fc-mode" role="tablist">
             <button type="button" class="fc-mode-tab is-active" data-mode="mode1">Режим 1</button>
             <button type="button" class="fc-mode-tab" data-mode="mode2">Режим 2 <em>AI</em></button>
           </div>
         </section>

         <!-- Рабочая область: форма слева, результаты справа -->
         <section class="fc-grid" aria-label="Рабочая область">

           <form class="fc-panel fc-form" id="my-form">
             <div class="fc-panel-head">
               <span class="fc-panel-eyebrow">POST /v1/endpoint</span>
               <span class="fc-panel-hint">Описание операции</span>
             </div>

             <div class="fc-field">
               <label class="fc-label" for="my-url">URL <span class="fc-req">*</span></label>
               <input type="url" id="my-url" class="fc-input" placeholder="https://example.com" required>
             </div>

             <div class="fc-field">
               <span class="fc-label">Форматы</span>
               <div class="fc-chips">
                 <label class="fc-chip"><input type="checkbox" value="json" checked><span>json</span></label>
                 <label class="fc-chip"><input type="checkbox" value="csv"><span>csv</span></label>
               </div>
             </div>

             <div class="fc-field">
               <span class="fc-label">Опции</span>
               <div class="fc-toggles">
                 <label class="fc-toggle"><input type="checkbox" checked><span>onlyMainContent</span></label>
               </div>
             </div>

             <details class="fc-collapse">
               <summary>Дополнительно</summary>
               <div class="fc-collapse-body">
                 <div class="fc-row">
                   <div class="fc-field">
                     <label class="fc-label" for="my-timeout">timeout (ms)</label>
                     <input type="number" id="my-timeout" class="fc-input" placeholder="30000">
                   </div>
                   <div class="fc-field">
                     <label class="fc-label" for="my-proxy">proxy</label>
                     <select id="my-proxy" class="fc-input fc-select">
                       <option value="">— default —</option>
                       <option value="stealth">stealth</option>
                     </select>
                   </div>
                 </div>
               </div>
             </details>

             <div class="fc-form-foot">
               <button type="submit" class="fc-btn fc-btn-primary"><?= icon('zap', 14) ?> Запустить</button>
               <button type="button" class="fc-btn fc-btn-ghost">Сбросить</button>
             </div>
           </form>

           <div class="fc-panel fc-results" id="my-results">
             <div class="fc-results-head">
               <div class="fc-status" id="my-status" data-state="idle">
                 <span class="fc-status-dot" aria-hidden="true"></span>
                 <span class="fc-status-text">Готов к запросу</span>
               </div>
               <div class="fc-results-actions">
                 <button type="button" class="fc-icon-btn" title="Скопировать"><?= icon('copy', 14) ?></button>
                 <button type="button" class="fc-icon-btn" title="Скачать"><?= icon('download', 14) ?></button>
               </div>
             </div>
             <div class="fc-tabs" role="tablist">
               <button type="button" class="fc-tab is-active" data-tab="result">result</button>
               <button type="button" class="fc-tab" data-tab="json">raw json</button>
             </div>
             <div class="fc-output">
               <div class="fc-empty" id="my-empty">
                 <p class="fc-empty-title">Здесь появится результат</p>
                 <p class="fc-empty-sub">Введите параметры и нажмите <kbd>Запустить</kbd>.</p>
               </div>
               <pre class="fc-pane" data-pane="result" hidden></pre>
               <pre class="fc-pane fc-mono" data-pane="json" hidden></pre>
             </div>
           </div>

         </section>

         <p class="fc-foot-note">
           Сервисный инструмент. Запросы выполняются из браузера напрямую.
           Ключ хранится в <code>localStorage</code>, не уходит на сервер.
         </p>
       </div>
     </main>

     <!-- Help modal: скопировать как есть, заменить только содержимое fc-help-body -->
     <div class="fc-help-overlay" id="fc-help-overlay" role="dialog" aria-modal="true">
       <div class="fc-help-panel">
         <div class="fc-help-head">
           <h2 class="fc-help-title">Как пользоваться</h2>
           <button type="button" class="fc-help-close" id="fc-help-close" aria-label="Закрыть"><?= icon('minus', 18) ?></button>
         </div>
         <div class="fc-help-body">
           <div class="fc-help-section">
             <h3>Быстрый старт</h3>
             <ol class="fc-help-steps">
               <li>Шаг один.</li>
               <li>Шаг два.</li>
               <li>Шаг три.</li>
             </ol>
           </div>
           <div class="fc-help-section">
             <h3>Справочник форматов</h3>
             <table class="fc-help-table">
               <tr><th>Параметр</th><th>Описание</th></tr>
               <tr><td>param</td><td>Что делает.</td></tr>
             </table>
           </div>
           <p class="fc-help-note">
             Ключ хранится в <code>localStorage</code> и не уходит на сервер.
           </p>
         </div>
       </div>
     </div>

     <script src="../../js/dotfield.js"></script>
     <script src="../../js/nav.js"></script>
     <script src="script.js"></script>
     <script>
     <!-- Help modal: этот блок одинаков для всех страниц -->
     (function () {
       var overlay = document.getElementById('fc-help-overlay');
       var openBtn = document.getElementById('fc-help-open');
       var closeBtn = document.getElementById('fc-help-close');
       function open()  { overlay.classList.add('is-open');    document.body.style.overflow = 'hidden'; }
       function close() { overlay.classList.remove('is-open'); document.body.style.overflow = ''; }
       if (openBtn)  openBtn.addEventListener('click', open);
       if (closeBtn) closeBtn.addEventListener('click', close);
       overlay.addEventListener('click', function(e) { if (e.target === overlay) close(); });
       document.addEventListener('keydown', function(e) { if (e.key === 'Escape') close(); });
     })();
     </script>
   </body>

   COMPONENT REFERENCE
   ───────────────────
   LAYOUT
     .fc-app            <body> class. Activates design tokens. Required.
     .fc-hero           Compact white hero with dotfield bg.
     .fc-hero-dots      DotField canvas inside hero (position: absolute).
     .fc-hero-inner     Flex row: left text block | right .fc-hero-meta.
     .fc-hero-meta      Column of links/buttons, aligned right.
     .fc-main           White content wrapper below hero.
     .fc-topbar         Optional settings bar: API key + mode tabs.
     .fc-grid           Two-column grid: 380px form | flex-1 results. Stacks <980px.

   TYPOGRAPHY
     .fc-eyebrow        Mono uppercase with lime dot before. Use <p>.
     .fc-title          Geologica 600, clamp(28–40px). Use <h1>.
     .fc-sub            Onest 14px, max-width 560px. Use <p>.
     .fc-hero-link      Mono link with ink-200 underline in hero-meta.
     .fc-help-btn       Ghost mono button in hero-meta → opens help modal.

   PANEL
     .fc-panel          White card: 1px ink-200 border + soft shadow.
     .fc-panel-head     Flex row: eyebrow badge + hint text. Dashed bottom border.
     .fc-panel-eyebrow  lime-100 bg, ink-700 text. Shows endpoint or category.
     .fc-panel-hint     Muted ink-500 text, right side.

   FORM
     .fc-form           Flex column, gap 14px. display:flex overrides hidden attr —
                        use .fc-form[hidden] { display:none } if toggling panels.
     .fc-field          Flex column: label above, input below.
     .fc-row            Two equal columns for side-by-side fields.
     .fc-label          Mono uppercase. Children: .fc-req (red *), .fc-hint.
     .fc-input          Standard input. Variants: .fc-textarea, .fc-mono, .fc-select.
     .fc-chips          Flex-wrap group of checkbox chips.
     .fc-chip           <label> wrapping hidden <input> + <span>. Lime when checked.
     .fc-toggles        Flex column of toggle rows.
     .fc-toggle         <label> with pill toggle. Lime when checked.
     .fc-collapse       <details> with +/− summary. Wrap advanced options.
     .fc-form-foot      Flex row: .fc-btn-primary (flex:1) + .fc-btn-ghost.

   BUTTONS
     .fc-btn            Base. Combine with variant below.
     .fc-btn-primary    Lime (#b5ff51) bg, dark accent text. Main CTA.
     .fc-btn-ghost      Transparent, ink-700 text. Reset/secondary (bare).
     .fc-btn-outline    White bg + ink-200 border. Secondary that still
                        reads as a button (use instead of re-styling ghost).
     .fc-icon-btn       26×26 icon-only square button.

   API KEY (optional, inside .fc-topbar)
     .fc-key            Grid: label | input-wrap | status.
     .fc-key-input-wrap Composite: password input + icon buttons. Lime focus ring.
     .fc-key-input      Borderless input inside the wrap.
     .fc-key-status     Pill badge. data-state="empty" (grey) | "saved" (lime).

   MODE TABS (optional, inside .fc-topbar)
     .fc-mode           Pill-shaped segment control.
     .fc-mode-tab       Tab button. Add .is-active for selected state.
     .fc-mode-tab em    Small badge (e.g. "AI"). lime-200 bg, accent text.

   RESULTS
     .fc-results        Flex column panel, min-height 520px.
     .fc-results-head   Space-between: .fc-status left, .fc-results-actions right.
     .fc-status         data-state: "idle" (grey dot) | "loading" (lime pulse) |
                        "ok" (green dot) | "error" (red dot).
     .fc-tabs           Tab bar: mono 11px, lime underline on .is-active tab.
     .fc-tab            Tab button. data-empty="true" dims it.
     .fc-output         Scrollable pane area (max-height 70vh).
     .fc-empty          Placeholder shown before first request.
     .fc-pane           Result pane. <pre> for text, <div> for HTML content.
                        Toggle with the hidden attribute.
     .fc-links          Links-list pane: flex column of <a> rows.
     .fc-links-count    Small count badge above links list.
     .fc-screenshot     Image display pane: <img> + open link.
     .fc-error          Red error block. Add as class to .fc-pane on failure.

   MISC
     .fc-mono           Monospace style override for inputs / panes.
     .fc-foot-note      Centered mono footnote below the grid.

   HELP MODAL
     .fc-help-overlay   Fixed full-screen overlay. Add .is-open to show.
     .fc-help-panel     White modal: max-width 560px, slides up on open.
     .fc-help-head      Title (.fc-help-title) + close btn (.fc-help-close).
     .fc-help-body      Flex column of .fc-help-section, gap 20px.
     .fc-help-section   Wrapper. <h3> inside gets lime dot prefix automatically.
     .fc-help-steps     Numbered <ol> with lime circle step counters (CSS counter).
     .fc-help-table     Two-column reference table. First <td> in mono.
     .fc-help-note      Highlighted note with lime-400 left border.

   ==================================================== */


/* ============================================================
   DESIGN TOKENS
   ============================================================ */

.fc-app {
  --fc-fs-xs:   11px;
  --fc-fs-sm:   12px;
  --fc-fs-base: 13px;
  --fc-fs-md:   14px;
  --fc-fs-lg:   16px;
  --fc-fs-xl:   22px;

  --fc-p-1: 4px;
  --fc-p-2: 6px;
  --fc-p-3: 8px;
  --fc-p-4: 10px;
  --fc-p-5: 14px;
  --fc-p-6: 18px;
  --fc-p-7: 24px;

  --fc-r-1: 4px;
  --fc-r-2: 6px;
  --fc-r-3: 8px;
  --fc-r-4: 12px;

  --fc-lime-ring: rgba(197, 255, 26, 0.28);

  --fc-border:            1px solid var(--ink-200);
  --fc-border-strong:     1px solid var(--ink-300);
  --fc-shadow-card:       0 1px 2px rgba(10,10,10,0.04), 0 12px 28px rgba(10,10,10,0.05);
  --fc-shadow-card-hover: 0 2px 4px rgba(10,10,10,0.05), 0 18px 36px rgba(10,10,10,0.07);
  --fc-shadow-flat:       0 1px 2px rgba(10,10,10,0.04);

  font-size: var(--fc-fs-base);
}


/* ============================================================
   HERO
   ============================================================ */

.fc-hero {
  padding: 120px 0 56px;
  background: var(--white);
  color: var(--ink-950);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.fc-hero-dots {
  position: absolute !important;
  inset: 0;
  z-index: 0;
}
.fc-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.fc-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fc-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--fc-lime-ring);
}
.fc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 10px;
  font-stretch: var(--type-stretch-h);
  color: var(--ink-950);
}
.fc-sub {
  font-size: var(--fc-fs-md);
  color: var(--ink-600);
  margin: 0;
  max-width: 560px;
  line-height: 1.55;
}
.fc-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
}
.fc-hero-link {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--ink-200);
  padding: 2px 0;
  transition: color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
.fc-hero-link:hover {
  color: var(--ink-700);
  border-bottom-color: var(--lime);
}

@media (max-width: 720px) {
  .fc-hero { padding: 100px 0 32px; }
  .fc-hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .fc-hero-meta { flex-direction: row; align-items: center; }
}


/* ============================================================
   MAIN
   ============================================================ */

.fc-main {
  padding: 28px 0 80px;
  background: var(--white);
  min-height: calc(100vh - 220px);
}


/* ============================================================
   TOPBAR  (API key + mode tabs)
   ============================================================ */

.fc-topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: var(--fc-border);
  border-radius: var(--fc-r-4);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--fc-shadow-card);
}
@media (max-width: 720px) {
  .fc-topbar { grid-template-columns: 1fr; }
}


/* ============================================================
   API KEY
   ============================================================ */

.fc-key {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}
@media (max-width: 540px) {
  .fc-key { grid-template-columns: 1fr; }
}

.fc-key-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.fc-key-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: var(--fc-r-2);
  padding: 2px 4px 2px 8px;
  transition: border-color var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out);
}
.fc-key-input-wrap:focus-within {
  border-color: var(--lime);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--fc-lime-ring);
}
.fc-key-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 6px 0 !important;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-base);
}
.fc-key-status {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  letter-spacing: 0.06em;
  padding: 0 10px;
  border-radius: var(--fc-r-1);
  background: var(--ink-100);
  color: var(--ink-600);
  white-space: nowrap;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}
.fc-key-status[data-state="saved"] { background: var(--lime-400); color: var(--accent); }
.fc-key-status[data-state="empty"] { background: var(--ink-100);  color: var(--ink-500); }


/* ============================================================
   MODE TABS
   ============================================================ */

.fc-mode {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: var(--fc-r-2);
  padding: 3px;
  gap: 2px;
}
.fc-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--fc-fs-base);
  font-weight: 500;
  color: var(--ink-600);
  background: transparent;
  border: none;
  border-radius: var(--fc-r-1);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out);
}
.fc-mode-tab em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  background: var(--lime-200);
  color: var(--accent);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 2px;
}
.fc-mode-tab:hover { color: var(--ink-950); }
.fc-mode-tab.is-active {
  background: var(--white);
  color: var(--ink-950);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}


/* ============================================================
   GRID  (form + results)
   ============================================================ */

.fc-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px) {
  .fc-grid { grid-template-columns: 1fr; }
}

.fc-panel {
  background: var(--white);
  border: var(--fc-border);
  border-radius: var(--fc-r-4);
  box-shadow: var(--fc-shadow-card);
  transition: box-shadow var(--dur-3) var(--ease-out);
}
.fc-panel:hover { box-shadow: var(--fc-shadow-card-hover); }


/* ============================================================
   FORM
   ============================================================ */

.fc-form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* display:flex выше перебивает hidden — явно гасим */
.fc-form[hidden] { display: none; }

.fc-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--ink-200);
}
.fc-panel-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  color: var(--ink-700);
  background: var(--lime-100);
  padding: 2px 6px;
  border-radius: var(--fc-r-1);
  letter-spacing: 0.02em;
}
.fc-panel-hint {
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
}

.fc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fc-label {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-req  { color: #d4351c; }
.fc-hint {
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-500);
  font-weight: 400;
}

.fc-input {
  font-family: var(--font-body);
  font-size: var(--fc-fs-base);
  padding: 8px 10px;
  border: 1px solid var(--ink-300);
  border-radius: var(--fc-r-2);
  background: var(--white);
  color: var(--ink-950);
  outline: none;
  transition: border-color var(--dur-2) var(--ease-out);
  width: 100%;
}
.fc-input::placeholder { color: var(--ink-400); }
.fc-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--fc-lime-ring);
}
.fc-textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.5;
}
.fc-mono {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
}
.fc-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-700) 50%),
    linear-gradient(135deg, var(--ink-700) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 10px) 50%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

/* Chips */
.fc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fc-chip {
  position: relative;
  cursor: pointer;
}
.fc-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fc-chip span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  padding: 5px 9px;
  border: 1px solid var(--ink-300);
  border-radius: var(--fc-r-1);
  color: var(--ink-700);
  background: var(--white);
  transition: all var(--dur-2) var(--ease-out);
  user-select: none;
}
.fc-chip:hover span { border-color: var(--lime); color: var(--ink-950); }
.fc-chip input:checked + span {
  background: var(--lime-400);
  color: var(--accent);
  border-color: var(--lime-400);
}
.fc-chip input:focus-visible + span {
  outline: 2px solid var(--fc-lime-ring);
  outline-offset: 2px;
}

/* Toggles */
.fc-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.fc-toggle input {
  appearance: none;
  width: 28px;
  height: 16px;
  background: var(--ink-200);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out);
  flex: none;
}
.fc-toggle input::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--dur-2) var(--ease-out);
}
.fc-toggle input:checked { background: var(--lime-400); }
.fc-toggle input:checked::after { transform: translateX(12px); }
.fc-toggle:hover { color: var(--ink-950); }

/* Collapse (details/summary) */
.fc-collapse {
  border-top: 1px dashed var(--ink-200);
  padding-top: 12px;
}
.fc-collapse summary {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.fc-collapse summary::-webkit-details-marker { display: none; }
.fc-collapse summary::before {
  content: '+';
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  width: 14px;
  height: 14px;
  text-align: center;
  line-height: 13px;
  border: 1px solid var(--ink-700);
  border-radius: 3px;
  transition: transform var(--dur-2) var(--ease-out);
}
.fc-collapse[open] summary::before { content: '−'; }
.fc-collapse:hover summary { color: var(--ink-950); }
.fc-collapse-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
}

.fc-form-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--fc-fs-base);
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--fc-r-2);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
  white-space: nowrap;
}
.fc-btn:hover   { transform: translateY(-1px); }
.fc-btn:active  { transform: translateY(0); }
.fc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.fc-btn-primary {
  background: var(--lime-400);
  color: var(--accent);
  border-color: var(--lime-400);
  flex: 1;
  box-shadow: 0 1px 2px rgba(181,255,81,0.25), 0 4px 12px rgba(181,255,81,0.18);
}
.fc-btn-primary:hover:not(:disabled) {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 1px 2px rgba(197,255,26,0.3), 0 6px 16px rgba(197,255,26,0.22);
}
.fc-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(181,255,81,0.35),
              0 1px 2px rgba(181,255,81,0.25),
              0 4px 12px rgba(181,255,81,0.18);
}

.fc-btn-ghost { background: transparent; color: var(--ink-700); }
.fc-btn-ghost:hover { color: var(--ink-950); }

/* Outline: secondary button that still reads as a button (bordered),
   not bare text. Use when a ghost button sits alone or next to inputs. */
.fc-btn-outline {
  background: var(--white);
  color: var(--ink-700);
  border-color: var(--ink-200);
}
.fc-btn-outline:hover:not(:disabled) {
  background: var(--ink-50);
  color: var(--ink-950);
  border-color: var(--ink-400);
}

.fc-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-500);
  width: 26px;
  height: 26px;
  border-radius: var(--fc-r-1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-2) var(--ease-out);
}
.fc-icon-btn:hover {
  color: var(--ink-950);
  background: var(--ink-100);
  border-color: var(--ink-200);
}


/* ============================================================
   RESULTS PANEL
   ============================================================ */

.fc-results {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.fc-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-200);
}
.fc-results-actions { display: flex; gap: 4px; }


/* ============================================================
   STATUS INDICATOR
   ============================================================ */

.fc-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  color: var(--ink-700);
}
.fc-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-400);
}
.fc-status[data-state="idle"]    .fc-status-dot { background: var(--ink-400); }
.fc-status[data-state="loading"] .fc-status-dot {
  background: var(--lime);
  animation: fcPulse 1.2s ease-in-out infinite;
}
.fc-status[data-state="ok"]    .fc-status-dot { background: #10b981; }
.fc-status[data-state="error"] .fc-status-dot { background: #d4351c; }

@keyframes fcPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(197,255,26,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(197,255,26,0);   }
}


/* ============================================================
   RESULT TABS
   ============================================================ */

.fc-tabs {
  display: flex;
  flex-wrap: wrap;
  padding: 0 14px;
  border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
}
.fc-tab {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-500);
  padding: 9px 10px;
  cursor: pointer;
  transition: color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
  margin-bottom: -1px;
}
.fc-tab:hover { color: var(--ink-950); }
.fc-tab.is-active {
  color: var(--ink-950);
  border-bottom-color: var(--lime);
  font-weight: 500;
}
.fc-tab[data-empty="true"]       { color: var(--ink-300); }
.fc-tab[data-empty="true"]:hover { color: var(--ink-400); }


/* ============================================================
   OUTPUT AREA
   ============================================================ */

.fc-output {
  flex: 1;
  padding: 14px;
  overflow: auto;
  max-height: 70vh;
  background: var(--white);
  border-bottom-left-radius: var(--fc-r-4);
  border-bottom-right-radius: var(--fc-r-4);
}
.fc-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--ink-500);
}
.fc-empty-title {
  font-family: var(--font-display);
  font-size: var(--fc-fs-lg);
  font-weight: 600;
  color: var(--ink-700);
  margin: 0 0 8px;
}
.fc-empty-sub {
  font-size: var(--fc-fs-sm);
  line-height: 1.6;
  margin: 0;
}
.fc-empty kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 3px;
  padding: 1px 5px;
}

.fc-pane {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  line-height: 1.55;
  color: var(--ink-950);
  white-space: pre-wrap;
  word-break: break-word;
}
.fc-pane[hidden] { display: none; }

/* Links pane */
.fc-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
}
.fc-links a {
  color: var(--ink-700);
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  word-break: break-all;
}
.fc-links a:hover { color: var(--ink-700); border-bottom-color: var(--lime); }
.fc-links-count {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
  padding: 4px 0 8px;
  border-bottom: 1px dashed var(--ink-200);
  margin-bottom: 8px;
}

/* Screenshot pane */
.fc-screenshot img {
  max-width: 100%;
  display: block;
  border: 1px solid var(--ink-200);
  border-radius: var(--fc-r-2);
}
.fc-screenshot a {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
}

/* Error block */
.fc-error {
  margin: 0;
  padding: 14px 16px;
  background: #fff1f0;
  border: 1px solid #fbb4ad;
  border-radius: var(--fc-r-2);
  color: #8a1c10;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  white-space: pre-wrap;
  word-break: break-word;
}


/* ============================================================
   FOOTNOTE
   ============================================================ */

.fc-foot-note {
  margin: 24px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
  text-align: center;
  letter-spacing: 0.02em;
}
.fc-foot-note a {
  color: var(--ink-700);
  border-bottom: 1px solid var(--ink-300);
}
.fc-foot-note code {
  font-family: var(--font-mono);
  background: var(--ink-100);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}


/* ============================================================
   HELP BUTTON  (inside .fc-hero-meta)
   ============================================================ */

.fc-help-btn {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink-200);
  padding: 2px 0;
  cursor: pointer;
  transition: color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
.fc-help-btn:hover {
  color: var(--ink-700);
  border-bottom-color: var(--lime);
}


/* ============================================================
   HELP MODAL
   JS snippet (одинаков для всех страниц):
     var overlay = document.getElementById('fc-help-overlay');
     var openBtn = document.getElementById('fc-help-open');
     var closeBtn = document.getElementById('fc-help-close');
     function open()  { overlay.classList.add('is-open');    document.body.style.overflow='hidden'; }
     function close() { overlay.classList.remove('is-open'); document.body.style.overflow=''; }
     if (openBtn)  openBtn.addEventListener('click', open);
     if (closeBtn) closeBtn.addEventListener('click', close);
     overlay.addEventListener('click', function(e) { if (e.target===overlay) close(); });
     document.addEventListener('keydown', function(e) { if (e.key==='Escape') close(); });
   ============================================================ */

.fc-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-3) var(--ease-out);
}
.fc-help-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.fc-help-panel {
  background: var(--white);
  border-radius: var(--fc-r-4);
  box-shadow: var(--shadow-4);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  position: relative;
  transform: translateY(8px);
  transition: transform var(--dur-3) var(--ease-out);
}
.fc-help-overlay.is-open .fc-help-panel { transform: translateY(0); }

.fc-help-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.fc-help-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink-950);
  margin: 0;
}
.fc-help-close {
  background: none;
  border: none;
  color: var(--ink-500);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--dur-2) var(--ease-out);
}
.fc-help-close:hover { color: var(--ink-950); }

.fc-help-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fc-help-section h3 {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-help-section h3::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--lime);
  border-radius: 50%;
}

.fc-help-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: help-step;
}
.fc-help-steps li {
  counter-increment: help-step;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: var(--fc-fs-base);
  color: var(--ink-700);
  line-height: 1.5;
}
.fc-help-steps li::before {
  content: counter(help-step);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  background: var(--lime-100);
  color: var(--accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fc-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fc-fs-base);
}
.fc-help-table th {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  text-align: left;
  padding: 0 10px 6px 0;
  border-bottom: 1px solid var(--ink-200);
}
.fc-help-table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--ink-150);
  color: var(--ink-700);
  vertical-align: top;
  line-height: 1.45;
}
.fc-help-table td:first-child {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-950);
  white-space: nowrap;
}

.fc-help-note {
  background: var(--ink-50);
  border-left: 3px solid var(--lime-400);
  border-radius: 0 var(--fc-r-1) var(--fc-r-1) 0;
  padding: 10px 12px;
  font-size: var(--fc-fs-sm);
  color: var(--ink-600);
  line-height: 1.55;
  margin: 0;
}
.fc-help-note a {
  color: var(--ink-700);
  border-bottom: 1px solid var(--lime-200);
}
.fc-help-note code {
  font-family: var(--font-mono);
  background: var(--ink-100);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}


/* ============================================================
   DOCUMENTATION PAGE COMPONENTS
   Reusable elements for tool pages with docs/tutorials/guides
   ============================================================ */

/* Content card wrapper */
.fc-doc-card {
  padding: var(--fc-p-6);
  margin-bottom: 20px;
}
.fc-doc-card:last-of-type { margin-bottom: 0; }

.fc-doc-card h2 {
  font-family: var(--font-display);
  font-size: var(--fc-fs-xl);
  font-weight: 600;
  color: var(--ink-950);
  margin: 16px 0 12px;
  letter-spacing: -0.01em;
}

.fc-doc-card h3 {
  font-family: var(--font-display);
  font-size: var(--fc-fs-lg);
  font-weight: 600;
  color: var(--ink-900);
  margin: 24px 0 10px;
}

.fc-doc-card p {
  font-size: var(--fc-fs-md);
  line-height: 1.65;
  color: var(--ink-700);
  margin: 0 0 14px;
}

.fc-doc-card code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: var(--fc-r-1);
  padding: 1px 6px;
  color: var(--ink-900);
  word-break: break-word;
}

/* Code blocks — dark variant for documentation */
.fc-code-block {
  position: relative;
  margin: 0 0 14px;
}
.fc-code-block pre {
  margin: 0;
  padding: var(--fc-p-6) 48px var(--fc-p-6) var(--fc-p-6);
  background: var(--ink-950);
  border-radius: var(--fc-r-3);
  overflow-x: auto;
}
.fc-code-block code {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  line-height: 1.6;
  color: #e8eaed;
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
}

/* Copy button overlay on code blocks */
.fc-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--ink-400);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--fc-r-1);
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  transition: color var(--dur-2) var(--ease-out);
}
.fc-copy-btn:hover { color: var(--white); }
.fc-copy-btn.is-copied { color: var(--lime); border-color: var(--lime); }

/* Light code block — for inline previews */
.fc-code-light {
  position: relative;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  background: var(--ink-50);
  color: var(--ink-800);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  max-height: 360px;
}

/* Note/highlight block */
.fc-note {
  margin: 4px 0 0;
  padding: 14px 16px;
  background: var(--ink-50);
  border-left: 3px solid var(--lime-400);
  border-radius: 0 var(--fc-r-1) var(--fc-r-1) 0;
  font-size: var(--fc-fs-sm);
  color: var(--ink-600);
  line-height: 1.55;
}
.fc-note code {
  font-family: var(--font-mono);
  background: var(--ink-100);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.fc-note a {
  color: var(--ink-700);
  border-bottom: 1px solid var(--lime-200);
}

/* Highlight/alert box — bright background variant */
.fc-highlight {
  margin: 4px 0 0 !important;
  padding: 14px 16px;
  background: var(--lime-100);
  border-left: 3px solid var(--lime-600);
  border-radius: var(--fc-r-2);
  font-size: var(--fc-fs-base) !important;
  color: var(--ink-700);
}

/* Documentation table */
.fc-doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: var(--fc-fs-base);
}
.fc-doc-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  padding: 8px 12px;
  border-bottom: var(--fc-border-strong);
}
.fc-doc-table td {
  padding: 10px 12px;
  border-bottom: 1px dashed var(--ink-200);
  color: var(--ink-700);
  line-height: 1.5;
  vertical-align: top;
}
.fc-doc-table td:first-child {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-sm);
  color: var(--ink-950);
  white-space: nowrap;
}

/* Feature grid for highlights */
.fc-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.fc-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ink-50);
  border: var(--fc-border);
  border-radius: var(--fc-r-3);
  font-size: var(--fc-fs-base);
  color: var(--ink-800);
}
.fc-feature svg {
  flex-shrink: 0;
  color: var(--ink-900);
}

/* Custom list with lime dots */
.fc-doc-list {
  margin: 4px 0 14px;
  padding-left: 18px;
  list-style: none;
}
.fc-doc-list li {
  position: relative;
  font-size: var(--fc-fs-md);
  line-height: 1.6;
  color: var(--ink-700);
  margin-bottom: 8px;
}
.fc-doc-list li::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime-600);
}

/* Download/file info box */
.fc-file-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: var(--fc-p-6);
  background: var(--ink-50);
  border: var(--fc-border);
  border-radius: var(--fc-r-4);
  margin: 4px 0 8px;
}
.fc-file-box-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fc-file-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--lime-100);
  border: 1px solid var(--lime-200);
  border-radius: var(--fc-r-3);
  color: var(--ink-900);
  font-size: 20px;
}
.fc-file-box-info h4 {
  font-family: var(--font-display);
  font-size: var(--fc-fs-md);
  font-weight: 600;
  color: var(--ink-950);
  margin: 0 0 2px;
}
.fc-file-box-info p {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
  margin: 0;
}

/* Metadata/stats display — for showing counts, costs, etc. */
.fc-stats {
  padding: 10px 12px;
  background: var(--ink-50);
  border: 1px solid var(--ink-150);
  border-radius: var(--fc-r-3);
}

.fc-stats-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  font-size: var(--fc-fs-sm);
  color: var(--ink-600);
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}

.fc-stats-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.fc-stats-item + .fc-stats-item {
  padding-left: 14px;
  border-left: 1px solid var(--ink-200);
}

.fc-stat-strong { color: var(--ink-900); font-weight: 600; }
.fc-stat-ok     { color: var(--ink-700); }
.fc-stat-err    { color: #b40000; font-weight: 600; }
.fc-stat-dim    { color: var(--ink-400); }

/* Log/live update display */
.fc-log-display {
  display: flex;
  flex-direction: column;
}

.fc-log-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--ink-100);
  font-size: var(--fc-fs-sm);
}

.fc-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-300);
}

.fc-log-row.is-pending .fc-log-dot {
  background: var(--lime);
  animation: fcPulse 1.2s ease-in-out infinite;
}

.fc-log-row.is-ok .fc-log-dot    { background: #10b981; }
.fc-log-row.is-error .fc-log-dot { background: #d4351c; }

.fc-log-text {
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-log-msg {
  font-family: var(--font-mono);
  font-size: var(--fc-fs-xs);
  color: var(--ink-500);
  white-space: nowrap;
}

.fc-log-row.is-ok .fc-log-msg    { color: #10b981; }
.fc-log-row.is-error .fc-log-msg { color: #d4351c; white-space: normal; }

/* Custom checkbox — standalone */
.fc-checkbox {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.fc-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fc-checkbox span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink-300);
  border-radius: var(--fc-r-1);
  background: var(--white);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-2) var(--ease-out);
}
.fc-checkbox input:checked + span {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--accent);
}
.fc-checkbox input:focus-visible + span {
  outline: 2px solid var(--fc-lime-ring);
  outline-offset: 2px;
}

/* Responsive for documentation boxes */
@media (max-width: 560px) {
  .fc-file-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .fc-file-box .fc-btn {
    width: 100%;
    justify-content: center;
  }
}
