/* WND Software: styles for the error library, docs and tools pages.
   Kept apart from styles.css so pages already cached keep working. */
.err-aliases { color: var(--muted); font-size: .95rem; margin-top: 10px; }
.err-aliases code, .err-list code, .article code { font-family: var(--mono); font-size: .92em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.err-body { padding-top: 32px; }
.err-body .article, .doc-body .article { min-width: 0; }
.article code { overflow-wrap: anywhere; }
.err-body .wrap { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 48px; align-items: start; }
.err-body .article h2:first-child { margin-top: 0; }
.err-example { font-family: var(--mono); font-size: .86rem; line-height: 1.5; background: var(--ink); color: #c9f7dc; border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; white-space: pre; }
.err-banner { position: sticky; top: 96px; background: var(--ink); color: #e8eef8; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.err-banner strong { color: #fff; display: block; margin-bottom: 6px; font-size: 1.05rem; }
.err-banner .btn { align-self: flex-start; }
.err-hub .err-banner { position: static; margin-top: 40px; flex-direction: row; align-items: center; justify-content: space-between; }
kbd { font-family: var(--mono); font-size: .85em; background: #fff; color: var(--text); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.err-banner kbd { background: var(--ink-3); color: var(--phos); border-color: #2a3757; }
.err-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.err-back { margin: 0 0 24px; }
.err-search input { width: 100%; max-width: 520px; font: inherit; font-size: 1.05rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-top: 18px; }
.err-search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.err-jump { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-weight: 600; font-size: .95rem; }
.err-group { margin-bottom: 36px; }
.err-group h2 { font-size: 1.4rem; scroll-margin-top: 96px; }
.err-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.err-list li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.err-list li a { flex: 0 0 auto; }
.err-list li span { color: var(--muted); font-size: .95rem; }
.doc-body .article pre { font-family: var(--mono); font-size: .86rem; line-height: 1.5; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.err-body .article table, .doc-body .article table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0 1.5em; }
.err-body .article th, .err-body .article td, .doc-body .article th, .doc-body .article td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.err-body .article th, .doc-body .article th { background: var(--bg-soft); }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.calc label { display: block; font-weight: 600; margin-bottom: 14px; }
.calc input, .calc select { display: block; width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; font-weight: 400; }
.calc-out { background: var(--ink); color: #e8eef8; border-radius: var(--radius); padding: 28px; }
.calc-out .big { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--phos); line-height: 1.1; }
.calc-out dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 18px 0 0; }
.calc-out dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .err-body .wrap, .calc { grid-template-columns: minmax(0, 1fr); }
  .err-banner { position: static; }
  .err-hub .err-banner { flex-direction: column; align-items: flex-start; }
}
/* The header has one more menu (Resources); keep it on one line down to the 1180px breakpoint. */
@media (min-width: 1181px) and (max-width: 1320px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px 9px; font-size: .92rem; }
  .nav-links .btn { margin-left: 6px; padding: 10px 14px; }
}

@media (max-width: 640px) { .err-body .article table, .doc-body .article table { display: block; overflow-x: auto; } }
.pov-form select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 1rem; background: #fff; color: var(--text); }
.pov-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
