/* askjasontyner.com: question tips and diagrams (2026-11-18). One shared file; pages link it after site.css.
   Colors come from site.css variables. Two local additions, used only here:
   --dg-panel (diagram panel, a deeper paper tone) and --dg-b (muted rust for the second path, 4.9:1 on the panel). */
:root{--dg-panel:#F3EFE6;--dg-b:#A3502A;--dg-muted:#D8D2C4;--dg-hatch-bg:#FBF7F0}

/* ---------- Tips ---------- */
/* Without JavaScript (and in print): the answer reads as an indented note under the paragraph. */
.tip-note{display:block;margin:10px 0 18px;padding:6px 0 6px 16px;border-left:3px solid var(--accent);font-size:16px;line-height:1.55;color:var(--ink)}
.tip-q{display:block;margin-bottom:2px;color:var(--ink)}

/* The "?" button: 22px circle drawn, 44px hit area from the ::after. */
.tip-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin:0 0 0 6px;padding:0;border:1.5px solid var(--accent);border-radius:50%;background:var(--accent-tint);color:var(--accent);font:700 13px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;vertical-align:2px;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tip-btn::after{content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%);border-radius:50%}
.tip-btn:hover,.tip-btn[aria-expanded="true"],.tip-btn:focus-visible{background:var(--accent);color:#fff}
.tip-btn:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* On dark bands (hero, footer), if a tip ever lands there. */
.hero .tip-btn,.site-footer .tip-btn{border-color:var(--on-dark-soft);background:transparent;color:var(--on-dark)}
.hero .tip-btn:hover,.hero .tip-btn[aria-expanded="true"],.site-footer .tip-btn:hover,.site-footer .tip-btn[aria-expanded="true"]{background:var(--on-dark);color:var(--dark)}
.hero .tip-note:not(.tip-card){border-left-color:var(--on-dark-soft);color:var(--on-dark)}
.hero .tip-note:not(.tip-card) .tip-q{color:var(--on-dark)}

/* With JavaScript: wired notes become cards, hidden until opened. Unwired notes stay inline. */
.tips-on .tip-card{position:absolute;z-index:60;display:none;margin:0;width:320px;max-width:calc(100vw - 24px);overflow:auto;padding:14px 44px 14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);box-shadow:0 10px 28px rgba(23,34,42,.18);font-size:16px;font-weight:400;line-height:1.5;text-align:left;white-space:normal;-webkit-overflow-scrolling:touch}
.tips-on .tip-card.tip-open{display:block}
.tips-on .tip-card .tip-q{margin-bottom:4px;color:var(--accent)}
.tips-on .tip-card:focus{outline:none}
.tips-on .tip-card:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.tip-close{position:absolute;top:0;right:0;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ink-soft);font:400 24px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;cursor:pointer}
.tip-close:hover{color:var(--ink)}
.tip-close:focus-visible{outline:3px solid var(--focus);outline-offset:-3px}

/* ---------- Diagrams ---------- */
figure.diagram{max-width:560px;margin:24px 0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--dg-panel);color:var(--ink)}
figure.diagram svg{display:block;width:100%;height:auto;overflow:visible;font-family:inherit;font-size:13px}
/* SVG classes (contract list). Font size and text-anchor are left to the markup's attributes. */
.dg-axis{fill:none;stroke:var(--ink-soft);stroke-width:1.5;stroke-linecap:square}
.dg-text,.dg-text-strong{fill:var(--ink);stroke:var(--dg-panel);stroke-width:3px;stroke-linejoin:round;paint-order:stroke fill}
.dg-text-strong{font-weight:700}
.dg-line-a{fill:none;stroke:var(--accent);stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.dg-line-b{fill:none;stroke:var(--dg-b);stroke-width:3.5;stroke-dasharray:8 5;stroke-linecap:butt;stroke-linejoin:round}
.dg-marker{fill:var(--ink);stroke:var(--dg-panel);stroke-width:2}
.dg-fill-a{fill:var(--accent);stroke:none}
.dg-fill-b{fill:var(--dg-b);stroke:none}
.dg-fill-muted{fill:var(--dg-muted);stroke:var(--ink-soft);stroke-width:1}
.dg-fill-hatch{stroke:var(--dg-b);stroke-width:1} /* no fill here on purpose: the shape's fill="url(#dg-hatch-<id>)" must win */
.dg-hatch-bg{fill:var(--dg-hatch-bg);stroke:none}
.dg-hatch-line{stroke:var(--dg-b);stroke-width:3.5}
.dg-box{fill:var(--card);stroke:var(--ink-soft);stroke-width:1.5}
.dg-outline{fill:none;stroke:var(--ink-soft);stroke-width:1.5}
.dg-arrow{fill:none;stroke:var(--ink-soft);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* Legend: one key per line, so long labels wrap cleanly at 375px. */
.diagram-legend{display:flex;flex-direction:column;gap:6px;margin-top:14px;font-size:15px;line-height:1.4;color:var(--ink)}
.diagram-legend .key{display:flex;align-items:flex-start;gap:9px;min-width:0}
.swatch{flex:none;display:inline-block;width:26px;height:13px;margin-top:4px;border-radius:2px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.swatch-a{background:var(--accent)}
.swatch-b{background:linear-gradient(90deg,var(--dg-b) 0 8px,transparent 8px) 2.5px 0/13px 100% repeat-x} /* two 8px dashes, 5px gap, like the line */
.swatch-muted{background:var(--dg-muted);box-shadow:inset 0 0 0 1px var(--ink-soft)}
.swatch-hatch{background:repeating-linear-gradient(135deg,var(--dg-b) 0 2.5px,var(--dg-hatch-bg) 2.5px 5px);box-shadow:inset 0 0 0 1px var(--dg-b)}
.diagram-note{display:block;margin-top:4px;font-size:14px;color:var(--ink-soft)}
@media (min-width:760px){figure.diagram{padding:20px 22px}}

/* ---------- Print ---------- */
@media print{
  .tip-btn,.tip-close{display:none!important}
  .tips-on .tip-card,.tip-note{display:block!important;position:static!important;width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;margin:6px 0 12px!important;padding:2px 0 2px 12px!important;border:0!important;border-left:2px solid #000!important;border-radius:0!important;box-shadow:none!important;background:none!important;color:#000!important;font-size:12pt;break-inside:avoid}
  .tips-on .tip-card .tip-q,.tip-q{color:#000!important}
  figure.diagram{break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
