/* Shared look for every diagram in the study app. Diagrams are inline SVG that use these classes,
   never hard-coded colours, so they follow the light and dark themes. */
svg.dg { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; font-family: var(--f-body, "Atkinson Hyperlegible Next", system-ui, sans-serif); }
svg.dg .ln  { stroke: var(--ink, #172b4d); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.dg .thin{ stroke: var(--ink, #172b4d); stroke-width: 1.2; fill: none; }
svg.dg .dash{ stroke: var(--muted, #5b6b85); stroke-width: 1.5; fill: none; stroke-dasharray: 6 5; }
svg.dg .ac  { stroke: var(--pen, #2557d6); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.dg .rd  { stroke: var(--red, #c8372d); stroke-width: 2.5; fill: none; stroke-linecap: round; }
svg.dg .gr  { stroke: var(--green, #17804f); stroke-width: 2.5; fill: none; stroke-linecap: round; }
svg.dg .hl  { fill: var(--hl, #ffe14d); fill-opacity: .55; stroke: none; }
svg.dg .fa  { fill: var(--pen, #2557d6); fill-opacity: .12; stroke: none; }
svg.dg .fr  { fill: var(--red, #c8372d); fill-opacity: .12; stroke: none; }
svg.dg .fg  { fill: var(--green, #17804f); fill-opacity: .14; stroke: none; }
svg.dg .dot { fill: var(--ink, #172b4d); stroke: none; }
svg.dg .dota{ fill: var(--pen, #2557d6); stroke: none; }
svg.dg .lb  { fill: var(--ink, #172b4d); font-size: 15px; }
svg.dg .lbs { fill: var(--muted, #5b6b85); font-size: 13px; }
svg.dg .lba { fill: var(--pen, #2557d6); font-size: 15px; font-weight: 700; }
svg.dg .lbr { fill: var(--red, #c8372d); font-size: 15px; font-weight: 700; }
svg.dg .lbg { fill: var(--green, #17804f); font-size: 15px; font-weight: 700; }
svg.dg .hand{ font-family: var(--f-hand, "Kalam", cursive); font-size: 17px; fill: var(--red, #c8372d); }
svg.dg .bx  { fill: var(--card, #ffffff); stroke: var(--ink, #172b4d); stroke-width: 1.5; }
svg.dg .bxa { fill: var(--card, #ffffff); stroke: var(--pen, #2557d6); stroke-width: 2; }
svg.dg .ax  { stroke: var(--muted, #5b6b85); stroke-width: 1.3; fill: none; }
svg.dg .grid{ stroke: var(--grid, #e3eaf4); stroke-width: 1; fill: none; }
