/* Project Schedule Network Diagram Maker: the Learn pages (activity-on-node/, activity-on-arrow/).
   Built on guide-shared.css, as the Global Income Tax Calculator's country pages are; only what a
   reading page with diagrams adds. The diagrams are drawn by the tool's own code
   (_learn/diagrams.cjs) in the theme's colours. */
.lx .gd-hero { max-width: 52rem; }
.lx-lede { margin: 0 0 20px; font-size: 1.05rem; line-height: 1.65; color: var(--text); }
.lx-lede p { margin: 0 0 10px; }
.lx-toc { margin: 0 0 18px; padding-top: 0; border-top: 0; }

.lx-prose { font-size: .95rem; line-height: 1.65; color: var(--text); max-width: 62rem; }
.lx-prose p { margin: 0 0 10px; }
.lx-prose ul, .lx-prose ol { margin: 0 0 10px; padding-left: 1.3em; }
.lx-prose li { margin: 0 0 5px; }
.lx .gd-sec h3 { margin: 22px 0 8px; font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.lx .gd-sec h2 + h3, .lx .gd-sec h2 + .gd-sub + h3 { margin-top: 12px; }
.lx .gd-sec a:not(.btn-primary) { color: var(--accent-strong, var(--accent)); }
.lx em { font-style: italic; font-weight: inherit; color: inherit; }
.lx .mono { font-family: 'DM Mono', ui-monospace, monospace; font-size: .92em; }

/* A diagram: the tool's drawing, as wide as the card, scrolled sideways on a phone. */
.lx-fig { margin: 12px 0 14px; max-width: 62rem; }
.lx-fig-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--panel); }
.lx-svg { display: block; width: 100%; min-width: 640px; height: auto; }
.lx-fig-sm .lx-svg { min-width: 420px; }
.lx-fig figcaption { margin-top: 6px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.lx-twin { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 62rem; }
.lx-twin .lx-fig { margin: 8px 0; }
.lx-twin h4 { margin: 0 0 4px; font-size: .92rem; }

/* Pros and cons: two lists side by side. */
.lx-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; max-width: 62rem; margin: 6px 0 4px; }
.lx-pc h4 { margin: 0 0 6px; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.lx-pc ul { margin: 0; padding-left: 1.2em; font-size: .92rem; line-height: 1.6; }
.lx-pc li { margin: 0 0 5px; }

/* Tables: the comparison and the passes worked by hand. */
.lx-table td, .lx-table th { font-variant-numeric: tabular-nums; }
.lx-table tbody th { width: 26%; }
@media (min-width: 701px) {
  .lx-table.lx-num td, .lx-table.lx-num th { text-align: center; }
  .lx-table.lx-num tbody th { width: auto; text-align: left; }
}
.lx-table tr.lx-crit th, .lx-table tr.lx-crit td { color: var(--gold); font-weight: 700; }
.lx-prose + .gd-table-wrap, .gd-table-wrap + .lx-prose { margin-top: 8px; }

/* The steps of drawing one by hand. */
.lx-steps { counter-reset: lx; list-style: none; margin: 6px 0 0; padding: 0; max-width: 62rem; }
.lx-steps > li { counter-increment: lx; position: relative; padding: 0 0 6px 40px; font-size: .95rem; line-height: 1.65; }
.lx-steps > li::before { content: counter(lx); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--text-inv); font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.lx-steps > li > h3 { margin: 0 0 4px !important; font-size: 1rem !important; }
.lx-steps > li p { margin: 0 0 8px; }

/* A worked sum, set apart. */
.lx-calc { margin: 6px 0 10px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--input-bg); border-radius: 0 8px 8px 0;
  font-family: 'DM Mono', ui-monospace, monospace; font-size: .86rem; line-height: 1.75; max-width: 62rem; overflow-x: auto; white-space: pre-line; }
.lx-calc b { color: var(--gold); }

.lx-item + .lx-item { border-top: 1px dashed var(--border); padding-top: 4px; }
.lx-item { font-size: .95rem; line-height: 1.65; max-width: 62rem; }
.lx-item p { margin: 0 0 10px; }
.lx-refs ol { margin: 0; padding-left: 1.6rem; font-size: .88rem; line-height: 1.6; color: var(--muted); max-width: 62rem; }
.lx-refs li { margin: 0 0 6px; overflow-wrap: anywhere; }
.lx-open { margin: 10px 0 0; font-size: .92rem; }
.lx-open a { font-weight: 700; text-decoration: none; }
.lx-open a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .lx-twin, .lx-pc { grid-template-columns: 1fr; }
  .lx-lede { font-size: 1rem; }
  .lx-steps > li { padding-left: 34px; }
}
.lx-table.lx-num td[data-l="Activity"], .lx-table.lx-num td[data-l="Why"] { text-align: left; }
