/* ============================================================================
   ATLAS REDESIGN — Help & Docs screen styles  ·  2026-07-03

   Prefix: .rd-help-*. Tokens only (--r-*) so Calm (almanac) + Operator themes
   both work automatically. Editorial docs rhythm: mono section labels, calm
   cards, one accent family (mint) for wayfinding. Content scrolls with the
   page — no viewport-locked heights. Single column at phone widths (390px).
   ========================================================================== */

.rd-help {
  font-family: var(--r-font-body);
  color: var(--r-body);
  padding: var(--r-gutter);
  max-width: var(--r-page-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- page header ----------------------------------------------------------- */
.rd-help-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rd-help-eyebrow {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--r-clay);
}
.rd-help-h1 {
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h1);
  font-weight: 600;
  line-height: 1.1;
  color: var(--r-ink);
  margin: 0;
}
.rd-help-sub {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--r-muted);
  max-width: 640px;
}
.rd-help-org {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--r-mint-ink);
  background: var(--r-mint-surface);
  border-radius: var(--r-radius-pill);
  padding: 1px 8px;
}

/* ---- search ------------------------------------------------------------------ */
.rd-help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-control);
  box-shadow: var(--r-shadow-card);
  padding: 10px 14px;
  transition: border-color var(--r-dur) var(--r-ease);
}
.rd-help-search:focus-within { border-color: var(--r-primary); }
.rd-help-search .ph {
  flex: none;
  font-size: 16px;
  color: var(--r-faint);
}
.rd-help-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--r-font-body);
  font-size: var(--r-fs-body);
  color: var(--r-ink);
  outline: none;
}
.rd-help-search-input::placeholder { color: var(--r-faint); }
.rd-help-search-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--r-well);
  color: var(--r-muted);
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease),
              color var(--r-dur) var(--r-ease);
}
.rd-help-search-clear .ph { font-size: 11px; color: inherit; }
.rd-help-search-clear:hover { background: var(--r-canvas-raised); color: var(--r-ink); }
.rd-help-search-clear:active { background: var(--r-well); }
.rd-help-search-clear:focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* zero-result state — honest, points at the Ideas board */
.rd-help-zero {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  letter-spacing: .02em;
  line-height: 1.6;
  color: var(--r-faint);
  text-align: center;
  padding: 28px 14px;
  border: 1px dashed var(--r-border);
  border-radius: var(--r-radius-control);
}
.rd-help-zero-link {
  font: inherit;
  letter-spacing: inherit;
  color: var(--r-mint-ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rd-help-zero-link:hover { color: var(--r-primary); }

/* ---- sections ------------------------------------------------------------------ */
.rd-help-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.rd-help-sec:first-of-type { margin-top: 2px; }
.rd-help-sec-label {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--r-faint);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--r-hairline);
}

/* ---- shared card chrome ---------------------------------------------------------- */
.rd-help-tile {
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  padding: 20px 22px;
}
.rd-help-tile-title {
  margin: 0;
  font-family: var(--r-font-display);
  font-size: var(--r-fs-h2);
  font-weight: 600;
  color: var(--r-ink);
}
.rd-help-tile-note {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--r-muted);
}

/* ---- GETTING STARTED — numbered step rows ------------------------------------------ */
.rd-help-steps { padding: 8px 10px; }
.rd-help-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: var(--r-radius-control);
  border-bottom: 1px solid var(--r-hairline-2);
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease);
}
.rd-help-step:last-child { border-bottom: 0; }
.rd-help-step:hover { background: var(--r-well); }
.rd-help-step:active { background: var(--r-canvas-raised); }
.rd-help-step:hover .rd-help-step-go,
.rd-help-slink:hover .rd-help-step-go {
  color: var(--r-mint-ink);
  transform: translateX(2px);
}
.rd-help-step-n {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-meta);
  font-weight: 700;
  color: var(--r-mint-ink);
  background: var(--r-mint-surface);
  border-radius: var(--r-radius-badge);
}
.rd-help-step-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rd-help-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--r-ink);
}
.rd-help-step-body {
  font-size: var(--r-fs-body);
  line-height: 1.5;
  color: var(--r-muted);
}
.rd-help-step-go {
  flex: none;
  font-size: 15px;
  color: var(--r-faint);
  transition: color var(--r-dur) var(--r-ease),
              transform var(--r-dur) var(--r-ease);
}

/* ---- two-up layout (keyboard|voice · faq|support) ----------------------------------- */
.rd-help-duo {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ---- keyboard table -------------------------------------------------------------------- */
.rd-help-tablewrap { overflow-x: auto; margin-top: 12px; }
.rd-help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--r-fs-body);
}
.rd-help-table th {
  font-family: var(--r-font-mono);
  font-size: var(--r-fs-eyebrow);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--r-faint);
  text-align: left;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--r-hairline);
}
.rd-help-table td {
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid var(--r-hairline-2);
  color: var(--r-body);
  line-height: 1.5;
  vertical-align: top;
  transition: background var(--r-dur) var(--r-ease);
}
.rd-help-table tr:last-child td { border-bottom: 0; }
.rd-help-table tbody tr:hover td { background: var(--r-well); }
.rd-help-kbd-cell { white-space: nowrap; width: 34%; }
.rd-help-table kbd {
  display: inline-block;
  font-family: var(--r-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--r-ink);
  background: var(--r-well);
  border: 1px solid var(--r-border);
  border-bottom-width: 2px;
  border-radius: var(--r-radius-chip);
  padding: 2px 7px;
  line-height: 1.5;
}
.rd-help-kbd-plus {
  color: var(--r-faint);
  padding: 0 5px;
  font-size: 11px;
}
.rd-help-kbd-alt {
  font-size: 11px;
  color: var(--r-faint);
  white-space: nowrap;
}

/* ---- voice card --------------------------------------------------------------------------- */
.rd-help-voice-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.rd-help-voice-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: var(--r-fs-body);
  line-height: 1.55;
  color: var(--r-body);
  padding: 9px 0;
  border-bottom: 1px solid var(--r-hairline-2);
}
.rd-help-voice-list li:last-child { border-bottom: 0; }
.rd-help-voice-list .ph {
  flex: none;
  font-size: 15px;
  color: var(--r-mint-ink);
  transform: translateY(1px);
}
.rd-help-voice-foot {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--r-muted);
  padding: 9px 12px;
  background: var(--r-well);
  border: 1px solid var(--r-hairline-2);
  border-radius: var(--r-radius-control);
}

/* ---- HOW YOUR DATA WORKS — rule grid ---------------------------------------------------------- */
.rd-help-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.rd-help-rule {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--r-surface);
  border: 1px solid var(--r-border);
  border-radius: var(--r-radius-card);
  box-shadow: var(--r-shadow-card);
  padding: 16px 18px;
}
.rd-help-rule-ic {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--r-mint-ink);
  background: var(--r-mint-surface);
  border-radius: var(--r-radius-badge);
}
.rd-help-rule-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rd-help-rule-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--r-ink);
}
.rd-help-rule-body {
  font-size: var(--r-fs-body);
  line-height: 1.55;
  color: var(--r-muted);
}

/* ---- FAQ accordion ------------------------------------------------------------------------------ */
.rd-help-faqs { padding: 6px 22px; }
.rd-help-faq { border-bottom: 1px solid var(--r-hairline-2); }
.rd-help-faq:last-child { border-bottom: 0; }
.rd-help-faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -10px;
  padding: 14px 10px;
  border-radius: var(--r-radius-control);
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease);
}
.rd-help-faq summary::-webkit-details-marker { display: none; }
.rd-help-faq-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--r-ink);
  line-height: 1.4;
}
.rd-help-faq summary:hover { background: var(--r-well); }
.rd-help-faq summary:active { background: var(--r-canvas-raised); }
.rd-help-faq summary:hover .rd-help-faq-q { color: var(--r-primary); }
.rd-help-faq-caret {
  flex: none;
  font-size: 13px;
  color: var(--r-faint);
  transition: transform var(--r-dur) var(--r-ease);
}
.rd-help-faq[open] .rd-help-faq-caret { transform: rotate(180deg); }
.rd-help-faq-a {
  margin: 0;
  padding: 0 2px 16px;
  font-size: var(--r-fs-body);
  line-height: 1.6;
  color: var(--r-muted);
  max-width: 62ch;
}

/* ---- support card --------------------------------------------------------------------------------- */
.rd-help-support-copy {
  margin: 8px 0 0;
  font-size: var(--r-fs-body);
  line-height: 1.55;
  color: var(--r-body);
}
.rd-help-slinks {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}
.rd-help-slink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-radius: var(--r-radius-control);
  border-bottom: 1px solid var(--r-hairline-2);
  cursor: pointer;
  transition: background var(--r-dur) var(--r-ease);
}
.rd-help-slink:last-child { border-bottom: 0; }
.rd-help-slink:hover { background: var(--r-well); }
.rd-help-slink:active { background: var(--r-canvas-raised); }
.rd-help-slink-ic {
  flex: none;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--r-mint-ink);
  background: var(--r-mint-surface);
  border-radius: var(--r-radius-badge);
}
.rd-help-slink-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rd-help-slink-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--r-ink);
}
.rd-help-slink-sub {
  font-size: 12px;
  line-height: 1.45;
  color: var(--r-muted);
}

/* ---- focus visibility (keyboard) --------------------------------------------------------------------- */
.rd-help :focus-visible { outline: var(--r-focus); outline-offset: 2px; }

/* ---- responsive — single column by phone widths (390px target) ----------------------------------------- */
@media (max-width: 1180px) {
  .rd-help-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .rd-help-duo { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rd-help-rules { grid-template-columns: 1fr; }
  .rd-help-tile { padding: 16px; }
  .rd-help-faqs { padding: 4px 16px; }
  .rd-help-kbd-cell { width: auto; white-space: normal; }
  .rd-help-step { align-items: flex-start; }
  .rd-help-step-n { margin-top: 1px; }
}
@media (max-width: 420px) {
  .rd-help { gap: 12px; }
  .rd-help-tile { padding: 14px; }
  .rd-help-faq summary { margin: 0 -6px; padding: 13px 6px; }
  .rd-help-search { padding: 9px 12px; }
  .rd-help-step { padding: 12px 8px; gap: 11px; }
  .rd-help-slink { padding: 10px 6px; }
}
