/* Help and legal pages. Builds on styles.css tokens. */

/* Legal pages: one column, no table of contents. */
.help-wrap.single { grid-template-columns: minmax(0, 1fr); }
.doc address { font-style: normal; margin: 0 0 14px; }
.doc h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--ink-soft); font-size: 15px; }

.help-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 64px;
  padding-block: 40px 112px; align-items: start;
}
.doc { max-width: 720px; min-width: 0; }
.crumb { margin: 0 0 18px; font-size: 14px; color: var(--ink-soft); }
.crumb a { color: var(--ink-soft); }
.doc h1 {
  margin: 0; font-family: var(--display); font-weight: 500;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em;
}
.doc-lede { margin: 18px 0 28px; font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; }
.doc h2 {
  margin: 0 0 12px; font-family: var(--display); font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}
.doc p { margin: 0 0 14px; }
.doc b { font-weight: 600; }
.doc > h2 { margin-top: 56px; }

.note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; margin: 20px 0; }
.note svg { flex-shrink: 0; margin-top: 2px; }
.note p { margin: 0; font-size: 15px; line-height: 1.55; }
.note-calm { background: var(--primary-soft); color: var(--primary-deep); }
.note-caution { background: #F8E3DA; color: #6E2C16; }

/* Pick a key */
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.pick-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 72px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  text-decoration: none; color: var(--ink); transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pick-card:hover { color: var(--ink); border-color: var(--primary); transform: translateY(-1px); }
.pick-card span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.pick-card small { color: var(--ink-soft); font-size: 13px; }

/* Neutral letter marks (not provider logos). */
.mark {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; margin-right: 0;
}
.m-brave { background: #F7EAD3; color: #85561A; }
.m-tavily { background: #E8E1D6; color: #1E2B28; }
.m-openai { background: var(--muted); color: var(--ink); }
.m-anthropic { background: #F8E3DA; color: #6E2C16; }
.m-openrouter { background: var(--primary-soft); color: var(--primary-deep); }

/* How-to sections */
.howto { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; margin-top: 24px; }

.steps-list { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; }
.split .steps-list { margin-top: 0; }
.steps-list li { position: relative; padding: 0 0 26px 52px; counter-increment: step; }
.steps-list li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.steps-list li:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 2px; background: var(--line);
}
.steps-list h3 { margin: 2px 0 4px; font-size: 17px; font-weight: 600; }
.steps-list p { margin: 0; color: var(--ink-soft); }
.steps-list b { color: var(--ink); }

/* Mini phone screenshot */
.shot { margin: 0; position: sticky; top: 24px; }
.phone-mini {
  border-radius: 34px; background: var(--ink); padding: 8px;
  box-shadow: 0 24px 48px -28px rgba(30, 43, 40, 0.45);
}
.pm-screen { background: var(--canvas); border-radius: 26px; overflow: hidden; }
.pm-bar { display: flex; align-items: center; gap: 10px; padding: 18px 16px 10px; font-size: 15px; }
.pm-back { width: 9px; height: 9px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin-left: 4px; }
.pm-group { margin: 0; padding: 8px 16px 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.pm-list { list-style: none; margin: 0; padding: 0 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pm-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 12px; background: var(--surface); }
.pm-list li .mark { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.pm-list li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pm-list b { font-size: 12.5px; font-weight: 600; }
.pm-list small { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-list em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--primary); }
.pm-list li.hl { box-shadow: 0 0 0 2px var(--primary); }
.pm-sheet {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 20px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.pm-sheet strong { font-size: 14px; }
.pm-field {
  position: relative; display: block; padding: 16px 12px 8px; border: 1.5px solid var(--primary); border-radius: 12px;
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink);
}
.pm-label { position: absolute; top: 3px; left: 12px; font-size: 10px; font-weight: 600; color: var(--primary); letter-spacing: 0; }
.pm-sheet small { font-size: 11px; color: var(--ink-soft); }
.pm-btn { align-self: flex-end; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px; }

/* Providers table */
.table-wrap { overflow-x: auto; margin: 20px 0 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.providers { width: 100%; border-collapse: collapse; font-size: 15px; }
.providers th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.providers td { padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.providers tr:last-child td { border-bottom: 0; }
.providers td:first-child { font-weight: 600; display: flex; align-items: center; gap: 10px; }
.providers td .mark { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }

/* FAQ */
.faq { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 600; font-size: 16px; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 24px; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 28px; }
.faq details p { margin: -4px 0 18px; color: var(--ink-soft); }

/* On this page */
.toc { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 4px; padding-top: 70px; font-size: 14px; }
.toc p { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.toc a { color: var(--ink-soft); text-decoration: none; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--primary); border-left-color: var(--primary); }

@media (max-width: 1000px) {
  .help-wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .shot { position: static; max-width: 300px; }
}
