/* =============================================================
   Magic Weather — documentation pages (manual / support)
   ============================================================= */

body.docs {
  background: var(--paper);
  color: var(--ink-text);
}
body.docs::after { mix-blend-mode: multiply; opacity: 0.05; }

/* Override the dark default for the docs body — paper everywhere */
.docs .nav { color: var(--ink-text); }

/* hero header */
.doc-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}

.doc-hero {
  max-width: 760px;
  margin: 0 auto 60px;
  text-align: center;
}
.doc-eyebrow {
  display: inline-block;
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember-2);
  padding: 6px 14px;
  border: 1px solid rgba(184,97,46,0.30);
  border-radius: 999px;
  background: rgba(217,122,71,0.08);
  margin-bottom: 28px;
}
.doc-title {
  font-family: var(--t-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  color: var(--ink-text);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.doc-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--ember-2);
}
.doc-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: #5a543f;
  margin: 0;
}

/* layout: TOC sidebar + body */
.doc-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 80px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 90px;
  align-self: start;
}
.toc-label {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #88806a;
  margin-bottom: 14px;
}
.doc-toc ol {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-left: 1px solid var(--line-p);
}
.doc-toc li {
  margin: 0;
}
.doc-toc a {
  display: block;
  padding: 8px 0 8px 18px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 14px;
  color: #5a543f;
  transition: color .2s, border-color .2s;
}
.doc-toc a:hover {
  color: var(--ember-2);
  border-left-color: var(--ember);
}
.toc-cta {
  margin-top: 24px;
}

/* article body */
.doc-body {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.65;
  color: #2c2a22;
}
.doc-body section {
  padding: 28px 0 40px;
  border-bottom: 1px solid var(--line-p);
}
.doc-body section:last-of-type { border-bottom: none; }

.doc-body h2 {
  font-family: var(--t-display);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-text);
  margin: 0 0 22px;
  font-variation-settings: 'opsz' 96, 'SOFT' 100;
}
.doc-body h2 .dim { font-weight: 300; color: #88806a; }
.doc-body h3 {
  font-family: var(--t-display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink-text);
  margin: 30px 0 12px;
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
}
.doc-body p { margin: 0 0 16px; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body ul, .doc-body ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.doc-body li {
  margin: 6px 0;
}
.doc-body strong { color: var(--ink-text); font-weight: 600; }
.doc-body em { font-style: italic; color: #4a4536; }
.doc-body a {
  color: var(--ember-2);
  border-bottom: 1px solid rgba(184,97,46,0.40);
  transition: color .2s, border-color .2s;
}
.doc-body a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

/* callout */
.callout {
  margin: 22px 0;
  padding: 16px 20px;
  background: rgba(217,122,71,0.07);
  border-left: 3px solid var(--ember);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: #4a4536;
}
.callout strong { color: var(--ink-text); }

/* FAQ details */
.faq {
  border-bottom: 1px solid var(--line-p);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0 18px 36px;
  font-family: var(--t-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  color: var(--ink-text);
  position: relative;
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+';
  position: absolute;
  left: 0;
  top: 14px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-family: var(--t-mono);
  font-size: 18px;
  font-weight: 400;
  color: var(--ember-2);
  border: 1px solid rgba(184,97,46,0.35);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.faq[open] summary::before {
  content: '−';
  background: var(--ember);
  color: #fff;
  border-color: var(--ember);
  transform: rotate(360deg);
}
.faq summary:hover { color: var(--ember-2); }
.faq[open] summary { color: var(--ember-2); }
.faq p, .faq ol, .faq ul {
  padding-left: 36px;
  padding-bottom: 18px;
  font-size: 15px;
  color: #4a4536;
}
.faq ol li, .faq ul li { margin: 4px 0; }

/* contact */
.contact-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line-p);
  border-radius: 14px;
  margin: 22px 0;
}
.contact-label {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #88806a;
  min-width: 60px;
}
.contact-link {
  font-family: var(--t-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 36, 'SOFT' 100;
  border-bottom: none !important;
}

/* bug report card */
.bug-card {
  margin: 22px 0 36px;
  padding: 32px;
  background: linear-gradient(180deg, #fff 0%, #fbf6ee 100%);
  border: 1px solid var(--line-p);
  border-radius: 20px;
  box-shadow: var(--shadow-paper);
}
.bug-card h3 { margin-top: 0; }
.bug-fineprint {
  margin-top: 14px !important;
  font-size: 13px;
  color: #88806a;
}
.btn-paper {
  background: var(--ink);
  color: var(--star);
}
.btn-paper:hover { background: var(--ember-2); color: var(--star); }
.btn-large {
  padding: 16px 28px;
  font-size: 16px;
  margin-top: 8px;
}

.bug-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 26px 0;
}
.bug-mini {
  padding: 18px 20px;
  background: #fbf6ee;
  border: 1px solid var(--line-p);
  border-radius: 14px;
}
.bug-mini-tag {
  font-family: var(--t-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember-2);
  margin-bottom: 8px;
}
.bug-mini p { font-size: 14px; line-height: 1.55; color: #4a4536; margin: 0; }

/* keyboard shortcuts */
.kbd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
.kbd-table tr { border-bottom: 1px solid var(--line-p); }
.kbd-table tr:last-child { border-bottom: none; }
.kbd-table td { padding: 12px 0; }
.kbd-table td:last-child { text-align: right; }
kbd {
  display: inline-block;
  padding: 4px 9px;
  margin: 0 1px;
  font-family: var(--t-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-text);
  background: #fff;
  border: 1px solid var(--line-p);
  border-bottom-width: 2px;
  border-radius: 6px;
  box-shadow: 0 1px 0 var(--line-p);
}

/* end of doc */
.doc-end {
  border: none;
  border-top: 1px solid var(--line-p);
  margin: 60px 0 30px;
}
.doc-cta {
  font-family: var(--t-display);
  font-style: italic;
  font-size: 18px;
  text-align: center;
  color: #88806a;
}
.doc-cta a { color: var(--ember-2); border-bottom: none !important; }
.doc-cta a:hover { color: var(--ember); }

/* responsive */
@media (max-width: 1080px) {
  .doc-grid { grid-template-columns: 1fr; gap: 40px; }
  .doc-toc {
    position: static;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line-p);
    border-radius: 16px;
  }
  .doc-toc ol { border-left: none; }
  .doc-toc a { padding-left: 0; border-left: none; }
  .bug-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .doc-shell { padding: 110px 22px 60px; }
  .bug-card { padding: 22px; }
  .doc-body h2 { font-size: 28px; }
  .contact-line { flex-direction: column; gap: 4px; padding: 16px 18px; }
}
