/* hazeljs-petri-example's styles: for now ^report(43)'s (https://matthewhammer.org/hazel/reports/043/), to be redone in Messed Up Dress Up's style (PLAN.md) */
  :root {
    --bg: #fbfaf7; --paper: #ffffff; --ink: #1f2328; --muted: #5b6470; --line: #e3e0d8;
    --accent: #6d28d9; --good: #15803d; --warn: #b45309; --bad: #b91c1c; --link: #1d4ed8; --accent2: #0e7490; --cx: #d6d1c6;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #15171a; --paper: #1d2024; --ink: #e8e6e3; --muted: #a2a9b3; --line: #33373d;
      --accent: #c4b5fd; --good: #4ade80; --warn: #fbbf24; --bad: #f87171; --link: #93c5fd; --accent2: #67e8f9; --cx: #5d636b;
    }
  }
  :root[data-theme="dark"] { --bg: #15171a; --paper: #1d2024; --ink: #e8e6e3; --muted: #a2a9b3; --line: #33373d;
    --accent: #c4b5fd; --good: #4ade80; --warn: #fbbf24; --bad: #f87171; --link: #93c5fd; --accent2: #67e8f9; --cx: #5d636b; }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--ink);
         font: 16px/1.55 system-ui, "Segoe UI", Roboto, sans-serif; }
  main { max-width: 1020px; margin: 0 auto; padding: 32px 16px 80px; }
  h1 { font-size: 2em; line-height: 1.2; margin: 0 0 6px; }
  h2 { font-size: 1.35em; margin: 48px 0 10px; padding-top: 8px; border-top: 2px solid var(--line); }
  h3 { font-size: 1.05em; margin: 26px 0 6px; }
  p, li { max-width: 76ch; }
  .sub { color: var(--muted); margin: 0 0 24px; }
  .series { color: var(--muted); margin: 0 0 6px; font-size: 0.92em; }
  .headline { background: var(--paper); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 6px; }
  .headline > p { margin: 6px 0; }
  ol.ans { padding-left: 1.4em; margin: 8px 0; }
  ol.ans > li { max-width: none; margin: 14px 0; }
  ol.ans > li > .row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: center; }
  ol.ans > li p { margin: 0; }
  figure.mini { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
  figure.mini figcaption { font-size: 0.8em; margin-top: 4px; }
  @media (max-width: 760px) { ol.ans > li > .row { grid-template-columns: minmax(0, 1fr); } figure.mini { max-width: 340px; } }
  a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
  a code { color: var(--link); }
  a.cl { text-decoration: none; } a.cl:hover code { text-decoration: underline; }
  sup.at { font-size: 0.68em; color: var(--muted); margin-left: 2px; font-weight: 600; }
  .good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
  figure.fig { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 18px 0; }
  .figscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  figcaption { color: var(--muted); font-size: 0.9em; margin-top: 6px; max-width: 80ch; }
  table { border-collapse: collapse; width: 100%; font-size: 0.92em; }
  th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
  th { color: var(--muted); font-weight: 600; }
  td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .scroll { overflow-x: auto; }
  code { font-size: 0.9em; background: color-mix(in srgb, var(--line) 50%, transparent); padding: 0 4px; border-radius: 4px; overflow-wrap: anywhere; }
  pre.code { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto;
             font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 6px 0 4px; }
  pre.code .rm { color: var(--bad); } pre.code .ad { color: var(--good); } pre.code .cm { color: var(--muted); }
  .codepair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  @media (max-width: 760px) { .codepair { grid-template-columns: minmax(0, 1fr); } }
  .codepair h4 { margin: 6px 0 0; font-size: 0.95em; }
  .note { color: var(--muted); font-size: 0.9em; }
  .callout { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent2); border-radius: 6px; padding: 8px 14px; margin: 14px 0; }
  .callout.warn { border-left-color: var(--warn); }
  section.q { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 6px 16px 10px; margin: 20px 0; }
  section.q h3 { margin: 10px 0 6px; line-height: 1.4; }
  section.q h3 .qn { color: var(--accent); margin-right: 6px; }
  .tags { margin: 2px 0 8px; }
  .tag { display: inline-block; font-size: 0.78em; font-weight: 600; padding: 1px 9px; border-radius: 999px; margin: 0 6px 4px 0; border: 1px solid; }
  .tag.ans { color: var(--good); border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
  .tag.now { color: var(--accent2); border-color: var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, transparent); }
  .tag.cyrus { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
  .tag.block { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
  .tag.open { color: var(--muted); border-color: var(--line); }
  .answer { background: color-mix(in srgb, var(--good) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line)); border-radius: 6px; padding: 8px 12px; margin: 8px 0; max-width: 80ch; }
  .after { max-width: 80ch; }
  ul.ev { padding-left: 1.2em; } ul.ev li { margin: 5px 0; max-width: 84ch; }
  ul.ev .refs { color: var(--muted); font-size: 0.92em; }
  ol.opts li { margin: 6px 0; max-width: 82ch; }
  .optnote { display: inline-block; font-size: 0.8em; font-weight: 600; color: var(--accent); margin-left: 4px; }
  .optnote.out { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
  button.copylink { margin-left: 8px; font: 600 12px system-ui, sans-serif; padding: 1px 8px; border: 1px solid var(--line);
    border-radius: 999px; background: var(--bg); color: var(--muted); cursor: pointer; vertical-align: 2px; }
  button.copylink:hover { color: var(--ink); border-color: var(--muted); }
  button.copylink.done { color: var(--good); border-color: var(--good); }
  input.copyfield { display: block; width: 100%; max-width: 640px; margin: 4px 0; font: 13px ui-monospace, monospace;
    background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
  .cyrus { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 4px 16px; }
  .cyrus li { margin: 8px 0; }
  details.ev summary { cursor: pointer; color: var(--link); }
  .wip { color: var(--warn); font-weight: 600; }

svg.fig { width: 100%; height: auto; max-width: 900px; display: block; margin: 0 auto; }
svg.fig text { font: 13px system-ui, sans-serif; fill: var(--ink); }
svg.fig .mono { font: 12.5px ui-monospace, monospace; }
svg.fig .small { font-size: 11px; fill: var(--muted); }
svg.fig .box { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
svg.fig .hz { fill: color-mix(in srgb, var(--accent) 14%, var(--paper)); stroke: var(--accent); stroke-width: 1.5; }
svg.fig .game { fill: color-mix(in srgb, var(--warn) 14%, var(--paper)); stroke: var(--warn); stroke-width: 1.5; }
svg.fig .snap { fill: color-mix(in srgb, var(--accent2) 16%, var(--paper)); stroke: var(--accent2); stroke-width: 1.2; }
svg.fig .arrow { stroke: var(--muted); stroke-width: 1.6; fill: none; marker-end: url(#ah); }
svg.fig .ahead { fill: var(--muted); }
svg.fig .on { fill: var(--accent); } svg.fig .off { fill: var(--line); }
svg.fig .kindtxt { font-size: 10.5px; }
figure { margin: 1.6em 0; } figcaption { color: var(--muted); font-size: 0.9em; max-width: 52em; margin: 0.5em auto 0; }
pre.hz, pre.fu { background: #000; color: #f8f8f2; border-radius: 8px; padding: 10px 12px; overflow: auto; font-size: 0.86em; line-height: 1.5; }
pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
pre.hz .hk { color: #5fd7ff; font-weight: 700; } pre.hz .hC { color: #ff87ff; } pre.hz .hv { color: #f8f8f2; } pre.hz .hs { color: #ffb86c; }
pre.hz .hn { color: #bd93f9; } pre.hz .hc { color: #87ff87; font-style: italic; } pre.hz .ho { color: #ffd75f; }
pre.fu .fk { color: #569CD6; } pre.fu .fT { color: #a989d0; } pre.fu .fv { color: #f6ead2; } pre.fu .fs { color: #c87e60; } pre.fu .fc { color: #6A9955; }
pre.fu .fy { color: #d3a8de; font-weight: 600; } pre.fu .ft { color: #e5c07b; }
p.part { font: 700 1.5em system-ui, sans-serif; margin: 2.2em 0 0.1em; padding-top: 0.6em; border-top: 3px solid var(--accent); }
p.part span { color: var(--accent); margin-right: 0.4em; } p.partsub { color: var(--muted); margin: 0 0 1em; font-style: italic; }
nav.outline { border: 1px solid var(--line); border-radius: 10px; padding: 8px 18px; margin: 1em 0; background: var(--paper); }
nav.outline ol.parts > li { margin: 0.35em 0; } nav.outline ol ol { margin: 0.1em 0 0.3em; font-size: 0.93em; } p.intro { font-size: 1.05em; }
code.hzi { background: #000; color: #f8f8f2; padding: 1px 6px; border-radius: 5px; font-size: 0.88em; }
code.hzi .hk { color: #5fd7ff; font-weight: 700; } code.hzi .hC { color: #ff87ff; } code.hzi .hv { color: #f8f8f2; } code.hzi .hs { color: #ffb86c; }
code.hzi .hn { color: #bd93f9; } code.hzi .ho { color: #ffd75f; }
.codecap { color: var(--muted); font-size: 0.85em; margin: 0.6em 0 0.2em; }
a.src code { font-size: 0.85em; }
table.t { border-collapse: collapse; font-size: 0.9em; } table.t td, table.t th { border-bottom: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.addr { font: 0.86em ui-monospace, monospace; }
details[data-pic] { border-bottom: 1px solid var(--line); padding: 2px 0; }
details[data-pic] summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; }
details[data-pic] summary::-webkit-details-marker { display: none; }
details[data-pic] summary .addr { color: var(--accent); }
details[data-pic] summary .what { color: var(--muted); font-size: 0.85em; }
details[data-pic] .pic { margin: 6px 0 14px; } details[data-pic] .pic .main { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
details[data-pic] .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
details[data-pic] .gallery figure.small img { width: 100%; max-height: none; } details[data-pic] .gallery figcaption { font-size: 0.72em; line-height: 1.25; }
button.copylink { margin-left: auto; font-size: 0.75em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; } details[data-pic] .pic figure { margin: 0; } details[data-pic] .pic figcaption { margin: 2px 0 0; font-size: 0.8em; } details[data-pic] .pic img { max-height: 280px; max-width: min(100%, 560px); border: 1px solid var(--line); border-radius: 6px; background: #fff; }
h3.grp { margin-top: 1.2em; }

  table.ideas td:first-child { font-weight: 600; white-space: nowrap; }
  .meas { color: var(--good); font-weight: 600; } .est { color: var(--warn); font-weight: 600; }

  pre.code { background: color-mix(in srgb, var(--line) 35%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
             overflow-x: auto; font-size: 0.84em; line-height: 1.45; max-width: 100%; }
  pre.code code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; white-space: pre; }
  ol.steps > li { margin: 10px 0; }
  /* the game's pieces: names whole, one to a line, the code column as wide as its longest name */
  table.pieces td:first-child { width: 8.5em; } table.pieces td:last-child { white-space: nowrap; }
  table.pieces td:last-child code { overflow-wrap: normal; }
  /* the live example (live.js) */
  /* (within the page's column: the nav beside it makes any width from the window wrong) two columns when the column is wide */
  .live { container-type: inline-size; }
  .live-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
  /* (0.0.6, Matthew 2026-11-06: "reverse LHS and RHS ... code on left, dynamics on right", as Messed Up Dress Up) two columns: the
     rules on the left, the net and its log on the right; one column, on a narrow screen: the net first, as before */
  @container (min-width: 880px) {
    /* (0.0.7) the divider between them on the page too, not only in full screen (--split: its place, from js/live.js) */
    .live-grid { grid-template-columns: minmax(0, var(--split, 6fr)) 14px minmax(0, 4fr); column-gap: 6px; }
    .live-right { order: 1; } .live-divider { order: 2; } .live-left { order: 3; position: sticky; top: 8px; }
  }
  .live-left, .live-right { min-width: 0; }
  .live-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
  .live-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
  .live-controls button, .live-toggle { font: inherit; font-size: 0.9em; padding: 3px 10px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--bg); color: var(--ink); cursor: pointer; }
  .live-controls button:hover, .live-toggle:hover { border-color: var(--accent); }
  .live-controls button:disabled { opacity: 0.5; cursor: default; }
  .live:not(.on) .live-controls, .live:not(.on) #live-log { display: none; }
  .live:not(.on) .live-nojs { display: block; } .live-nojs { display: none; }
  #live-net .live-tr { cursor: pointer; } #live-net .live-tr.off { fill: var(--muted); opacity: 0.45; }
  #live-net .live-tr:focus { outline: none; stroke: var(--ink); stroke-width: 2; }
  .live-marking { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; color: var(--muted); }
  .live-status { border-left: 4px solid var(--line); padding: 6px 10px; margin: 8px 0; border-radius: 6px; background: var(--bg); font-size: 0.92em; }
  .live-status.ok { border-left-color: var(--good); } .live-status.no { border-left-color: var(--warn); }
  .live-status ul { margin: 4px 0 0; padding-left: 1.2em; }
  .live-ed { margin: 0 0 14px; }
  .live-ed-head { margin: 0 0 4px; font-size: 0.92em; } .live-ed-head .muted, .muted { color: var(--muted); }
  /* Hazel listings (hazel-listings.js): the text until Hazel's editor says ready, then the editor */
  .hazel-listing { position: relative; margin: 10px 0; }
  .hazel-listing iframe { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
  .hazel-listing[data-state="loading"] pre, .hazel-listing[data-state="tiles"] pre { display: none; }
  .hazel-listing pre.hazel { margin: 0; }
  /* 🪵 the event log, as Messed Up Dress Up's (its style.css, ticket 592): a line an event, opened for the answer acted out */
  .script-log { margin-top: 10px; font-size: 0.92em; }
  .script-log .log-head { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
  .script-log .log-count { color: var(--muted); font-size: 0.9em; }
  .script-log .log-head button { margin-left: auto; font: inherit; font-size: 0.85em; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; }
  .script-log .log-list { display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow: auto; }
  .script-log .log-entry > summary { cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 0; }
  .script-log .log-entry > summary code { background: none; padding: 0; }
  .script-log .log-n, .script-log .log-at, .script-log .log-ms, .script-log .log-diff { color: var(--muted); font-variant-numeric: tabular-nums; }
  .script-log .log-eng { padding: 0 5px; border-radius: 4px; font-size: 0.85em; background: color-mix(in srgb, currentColor 12%, transparent); }
  .script-log .log-hazel { color: var(--accent); } .script-log .log-js { color: var(--warn); } .script-log .log-mixed { color: var(--muted); }
  .script-log .log-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; align-items: baseline; margin: 4px 0 4px 14px; }
  .script-log .log-grid > .log-effect { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: 3px 12px; align-items: baseline; margin: 2px 0; }
  .script-log .log-effect { background: color-mix(in srgb, #f59e0b 14%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); border-radius: 8px; padding: 4px 10px 6px; }
  .script-log .log-k { color: var(--muted); font-size: 0.85em; white-space: nowrap; text-align: right; }
  .script-log .log-v { min-width: 0; }
  .script-log .log-json { overflow-x: auto; font-size: 0.85em; margin: 0; display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
  .script-log .log-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 3px 0 2px; }
  .script-log .log-chip { display: inline-block; padding: 3px 9px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); color: var(--ink); white-space: nowrap; font-size: 0.92em; line-height: 1.45; }
  .script-log .log-chip:has(> .log-field) { padding-left: 4px; }
  .script-log summary .log-chip { font-size: 0.85em; padding: 1px 7px; } .script-log summary .log-chip:has(> .log-field) { padding-left: 2px; }
  .script-log .log-field { display: inline-block; padding: 0 6px; line-height: 1.3; margin-right: 1px; border-radius: 8px; background: color-mix(in srgb, #14b8a6 26%, transparent); border: 1px solid color-mix(in srgb, #14b8a6 60%, transparent); }
  .script-log .log-eq { margin: 0 0.35em; opacity: 0.8; }
  .script-log .log-goto { font: inherit; padding: 0; border: 0; background: none; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
  .script-log .log-quiet { color: var(--muted); border-style: dashed; }
  .script-log .log-bad { color: var(--bad); } .script-log .log-chip.log-bad { border-color: var(--bad); }
  .script-log .log-globals { margin: 0 0 6px 14px; } .script-log .log-globals > summary { cursor: pointer; color: var(--muted); font-size: 0.9em; }
  .script-log .log-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .script-log .hint { color: var(--muted); font-size: 0.9em; }

/* (0.0.2) an opened log entry shows its whole line, wrapped; and ⛶ full screen (js/live.js): the browser's, or the window filled */
.script-log .log-entry[open] > summary { white-space: normal; overflow: visible; }
.script-log .log-entry[open] > summary .log-chip { margin: 2px 0; }
/* (0.0.8, Matthew: "no margins") the app to the screen's edges, the columns' own panels its only borders */
.live:fullscreen, .live.live-max { background: var(--bg); color: var(--ink); padding: 0; overflow: auto; box-sizing: border-box; }
.live.live-max { position: fixed; inset: 0; z-index: 10000; }
html.live-max-on, html.live-max-on body { overflow: hidden; }
.live:fullscreen .script-log .log-list, .live.live-max .script-log .log-list { max-height: 45vh; }
/* (0.0.4) two columns: the divider between the net and the rules (js/live.js), as Messed Up Dress Up's: dragged, the arrow keys
   on it, a double-click for the first split. (0.0.7, Matthew 2026-11-06: on the page too, not only in full screen.) On the page
   it runs the height of the columns, its grip kept on the screen as the page scrolls; in full screen it is the screen's height. */
.live-divider { display: none; }
@container (min-width: 880px) {
  .live-divider { display: flex; align-self: stretch; cursor: col-resize; touch-action: none; align-items: flex-start; justify-content: center;
    border-radius: 7px; outline: none; }
  .live-divider::before { position: sticky; top: 45vh; margin-top: 48px; }
  .live:fullscreen .live-divider, .live.live-max .live-divider { align-self: start; position: sticky; top: 0; height: 100vh; height: 100dvh;
    align-items: center; }
  .live:fullscreen .live-divider::before, .live.live-max .live-divider::before { position: static; margin-top: 0; }
}
.live-divider::before { content: ""; width: 5px; height: 56px; border-radius: 3px; background: var(--line); }
.live-divider:hover::before, .live-divider:focus-visible::before, .live-divider.drag::before { background: var(--accent); height: 96px; }
html.dragging-split, html.dragging-split * { cursor: col-resize !important; user-select: none; -webkit-user-select: none; }
html.dragging-split iframe { pointer-events: none; }  /* (a frame under the pointer would take its moves) */

/* (0.0.3) what Hazel says of the rules, under the listing it is in (js/hazel-listings.js) */
.hazel-listing-status { list-style: none; margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); border-radius: 0 6px 6px 0; color: var(--ink); font-size: 0.9em; }
.hazel-listing-status li { margin: 2px 0; }
