/* Help pages. Built on the tokens in /styles.css. */

body { line-height: 1.7; }

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Page head */

.page-head { display: flex; flex-direction: column; gap: 18px; }
.page-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.lede { font-size: 20px; line-height: 1.55; color: var(--text-2); }
.page-head .eyebrow { padding-top: 8px; }

/* Platform switch */

.switch { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.switch-legend { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.switch-track { display: flex; padding: 3px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--border); }

.switch-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 9px;
  font-size: 15px;
  color: var(--text-3);
}
.switch-opt:hover { color: var(--text); }
.switch-opt img { width: 22px; height: 22px; opacity: 0.55; filter: grayscale(0.6); }
.switch-app { display: none; font-family: var(--mono); font-size: 11px; color: var(--text-4); }
.switch-text { display: flex; flex-direction: column; line-height: 1.2; }
.switch-opt .check { display: none; stroke: var(--accent); }

.switch-opt[aria-current="page"] {
  background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--text);
  font-weight: 600;
}
.switch-opt[aria-current="page"] img { opacity: 1; filter: none; }
.switch-opt[aria-current="page"] .check { display: block; }
.switch-opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 9px; }

.switch-large { margin-top: 8px; gap: 12px 16px; }
.switch-large .switch-track { padding: 4px; border-radius: 14px; }
.switch-large .switch-opt { min-height: 48px; padding: 0 16px 0 10px; border-radius: 10px; gap: 10px; }
.switch-large .switch-opt img { width: 28px; height: 28px; }
.switch-large .switch-app { display: block; }
.switch-large .switch-opt .check { margin-left: 4px; }

/* Index */

.help-index {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.help-index h2 { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; line-height: 1.2; }
.help-index .lede { font-size: 19px; max-width: 34em; }
.route, .reference { display: flex; flex-direction: column; gap: 28px; }
.reference { gap: 20px; }

.route-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.route-group {
  padding: 16px 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.route-group:first-child { padding-top: 0; }

.route-item { position: relative; display: flex; gap: 22px; padding-bottom: 6px; }
.route-item:not(.last)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: -6px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--border-strong) 0 5px, transparent 5px 10px);
}
.route-n, .step-n {
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
}
.route-n { width: 40px; height: 40px; font-size: 15px; }
.route-item a {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 14px 22px;
  margin: -6px -14px 0;
  border-radius: 12px;
  color: var(--text);
}
.route-item.last a { padding-bottom: 14px; }
.route-item a:hover { background: var(--bg-alt); }
.route-title { font-size: 20px; font-weight: 600; line-height: 1.35; }
.route-blurb { font-size: 16px; color: var(--text-2); }

.ref-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.ref-grid a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.ref-grid a:hover { border-color: var(--dash); }
.ref-title { font-size: 18px; font-weight: 600; }
.ref-blurb { font-size: 15px; color: var(--text-2); }
.contact { font-size: 16px; color: var(--text-2); }

/* Task pages */

.help-shell { padding-top: 24px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; }

.help-nav { flex: 0 0 248px; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.help-nav ol, .help-nav ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.4; }
.nav-all {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 12px 10px;
}
.help-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 10px;
  color: var(--text-2);
}
.help-nav li a:hover { background: var(--bg-alt); color: var(--text); }
.help-nav li a.ref { padding-left: 46px; }
.nav-n { flex: none; width: 22px; font-family: var(--mono); font-size: 13px; color: var(--text-4); }
.help-nav a[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-weight: 600; }
.help-nav a[aria-current="page"] .nav-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-rule { height: 1px; background: var(--line); margin: 10px 12px; }

.help-article { flex: 999 1 560px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 40px; }

.help-top { padding-top: 4px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-toggle-text { display: flex; flex-direction: column; line-height: 1.25; }
.nav-toggle-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.nav-toggle-title { font-size: 15px; font-weight: 600; }
.nav-toggle-more { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); }
.nav-toggle-more svg { transition: transform 0.15s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-more svg { transform: rotate(180deg); }

@media (max-width: 899px) {
  .js .nav-toggle { display: flex; }
  .js .nav-toggle[hidden] { display: none; }
  .js .help-nav:not(.open) { display: none; }
  .help-nav { flex-basis: 100%; }
  .help-shell { gap: 24px; }
}

/* Body text */

.help-article { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.help-article strong { color: var(--text); font-weight: 600; }
.help-article h1, .help-article h2 { color: var(--text); }
.help-article h2 { font-size: 21px; font-weight: 600; line-height: 1.4; }

.term {
  color: var(--text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

kbd {
  font-family: var(--mono);
  font-size: 13px;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface);
  color: var(--text);
}
.keys { white-space: nowrap; }

.menu {
  white-space: nowrap;
  font-weight: 500;
  color: var(--text);
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.menu-arrow { margin: 0 4px; color: var(--text-4); }
.ui { color: var(--text); font-weight: 600; }

/* Steps */

.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 52px; }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 20px; }
.step-n { width: 36px; height: 36px; font-size: 15px; }
.step-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.step-body h2 { padding-top: 2px; }
.step-body ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Asides */

.note { display: flex; gap: 14px; padding: 16px 18px; border-radius: 12px; font-size: 16px; color: var(--text); }
.note svg { flex: none; margin-top: 3px; stroke: var(--accent); }
.note p + p { margin-top: 6px; }
.note.tip { background: var(--status-done-bg); }
.note.warning { background: var(--status-confirmed-bg); }
.note.warning svg { stroke: var(--status-confirmed); }

/* Screenshots */

.step-fig { margin: 6px 0 0; display: flex; flex-direction: column; gap: 10px; }
.step-fig figcaption { font-family: var(--mono); font-size: 13px; color: var(--text-3); }
.step-fig .shot { border-radius: 12px; }
.step-fig .shot strong { color: var(--text-2); }
.fig-pic .zoom { position: relative; }
.fig-pic img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-strong); }
.enlarge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

/* Previous and next */

.prev-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; padding-top: 8px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.card:hover { border-color: var(--dash); color: var(--text); }
.card-next { align-items: flex-end; text-align: right; }
.card-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text-3); }
.card-title { font-size: 17px; font-weight: 600; }

/* Glossary back link */

.back-link { font-family: var(--mono); font-size: 13px; }

/* Reference sections */

.ref-section { display: flex; flex-direction: column; gap: 14px; }
.ref-section ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Troubleshooting */

.sym-jump {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}
.help-article .sym-jump h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sym-jump ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2px 24px;
  font-size: 16px;
}
.sym-jump a { display: flex; align-items: center; min-height: 36px; }

.symptoms { display: flex; flex-direction: column; gap: 20px; }
.symptom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 28px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  scroll-margin-top: 24px;
}
.symptom:target { box-shadow: 0 0 0 2px var(--accent); }

.sym-rows { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px 16px; align-items: baseline; }
.sym-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sym-why { color: var(--text-2); }
.sym-fix { color: var(--text); display: flex; flex-direction: column; gap: 10px; }
.sym-fix ol, .sym-fix ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

.still-stuck { padding: 22px 24px; border-radius: 14px; border: 1px solid var(--line); color: var(--text-2); }

/* Glossary */

.gloss-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: -22px; }
.gloss-chips a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 15px;
}
.gloss-chips a:hover { border-color: var(--dash); background: var(--bg-alt); color: var(--text); }

.gloss-section { display: flex; flex-direction: column; gap: 4px; scroll-margin-top: 24px; }
.help-article .gloss-section h2 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.gloss-section dl { margin: 0; display: flex; flex-direction: column; }
.gloss-entry { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.gloss-entry:last-child { border-bottom: 1px solid var(--line); }
.gloss-entry dt { font-size: 19px; font-weight: 600; line-height: 1.4; color: var(--text); }
.gloss-abbr { margin-left: 6px; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-3); }
.gloss-entry dd { margin: 4px 0 0; color: var(--text-2); }

.gloss-entry:target {
  margin: 0 -20px;
  padding: 18px 20px;
  border-color: transparent;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}
.gloss-entry:target + .gloss-entry { margin-top: 6px; }

/* Phones */

@media (max-width: 600px) {
  .lede { font-size: 18px; }
  .steps { gap: 40px; }
  .step { grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; }
  .step-n { width: 32px; height: 32px; font-size: 14px; }
  .step-body h2 { font-size: 19px; }
  .switch-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .switch-opt { justify-content: center; min-height: 44px; }
  .switch { flex-direction: column; align-items: stretch; }
  .switch-legend { padding-bottom: 6px; }
  .route-item { gap: 16px; }
  .route-title { font-size: 18px; }
  .symptom { padding: 20px 18px; }
  .sym-rows { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sym-label + * { margin-bottom: 10px; }
  .sym-rows > :last-child { margin-bottom: 0; }
  .gloss-entry:target { margin: 0 -12px; padding: 16px 12px; }
}
