/* filester — shared site chrome (header menu, footer) and the long-form
 * help pages (guide.html, faq.html). Tokens come from styles.css; layout
 * utilities from tailwind.css. Bump ?v= in the pages when this changes:
 * Cloudflare keeps CSS for four hours. */

/* ── Header links ─────────────────────────────────────────────────── */
.site-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .15s, background-color .15s;
}
.site-link:hover { color: var(--ink); background: rgba(255,255,255,.8); }
.site-link[aria-current="page"] { color: var(--ink); background: #fff; box-shadow: var(--shadow-card); }

/* Small-screen menu: a <details>, so it works without script. */
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
.site-menu[open] > summary { border-color: var(--ink); }
.site-menu-panel a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.site-menu-panel a:hover,
.site-menu-panel a[aria-current="page"] { background: var(--paper-sunk); }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ── Help pages ───────────────────────────────────────────────────── */
.help h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
  color: var(--ink);
}
.help h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 26px 0 8px;
  color: var(--ink);
}
.help p, .help li { font-size: 15px; line-height: 1.65; color: var(--ink); }
.help p { margin: 0 0 12px; }
.help .lead { color: var(--ink-soft); margin-bottom: 18px; }
.help ul { list-style: disc; padding-left: 20px; margin: 0 0 14px; }
.help ul li { margin: 0 0 6px; }
.help ul li::marker { color: var(--ink-soft); }
.help a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
.help a:hover { text-decoration-color: var(--ink); }

/* Numbered steps with round counters. */
.help ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 16px; }
.help ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 42px;
  margin: 0 0 14px;
  min-height: 28px;
}
.help ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* A button or screen name exactly as the app shows it. */
.ui {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  background: #fff;
  font-size: .92em;
  font-weight: 600;
  line-height: 1.55;
  white-space: nowrap;
}
.code-sample {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}

.note {
  margin: 14px 0 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--paper-sunk);
  font-size: 14px;
  line-height: 1.6;
}
.note strong { font-weight: 700; }

.pro-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  vertical-align: 3px;
}

/* Tables (plans, where files go). Scroll sideways on a phone. */
.table-wrap { overflow-x: auto; margin: 6px 0 16px; border: 1px solid var(--hairline); border-radius: 16px; background: #fff; }
.help table { width: 100%; border-collapse: collapse; font-size: 14px; }
.help th, .help td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); line-height: 1.5; }
.help tr:last-child td { border-bottom: 0; }
.help th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); background: var(--paper); }

/* Table of contents beside the guide. */
.toc-link {
  display: block;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
}
.toc-link:hover { color: var(--ink); background: #fff; }

/* FAQ entries. */
.faq-item {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: #fff;
  margin: 0 0 10px;
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 52px 16px 18px;
  position: relative;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-soft);
}
.faq-item[open] > summary::after { content: "−"; }
.faq-item > div { padding: 0 18px 6px; }
.faq-item:target { border-color: var(--ink); }

section[id], .faq-item[id] { scroll-margin-top: 88px; }

/* On a phone, a stacked table: one card per row, each cell labelled. */
@media (max-width: 600px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { display: block; padding: 2px 0; border: 0; }
  .table-stack td:first-child { font-weight: 700; padding-bottom: 6px; }
  .table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 6px;
  }
}
