/* wtcy.org - Workflow Tools Control Yard. Site styles rev4, 22 Nov 2026. */

:root {
  color-scheme: light dark;
  --paper: #eef0ea;
  --surface: #fbfcf9;
  --ink: #16211f;
  --muted: #4c5c57;
  --rail: #6b7c76;
  --line: #c9d0c9;
  --link: #0b5e6f;
  --code-bg: #e0e5dd;
  --go: #1a7446;
  --caution: #955800;
  --stop: #b3261e;
  --lamp-off: #b9c2bb;
  --hit: #d5ead9;
  --display: Bahnschrift, "DIN Alternate", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b2926;
    --surface: #223430;
    --ink: #e7ece8;
    --muted: #a9b8b2;
    --rail: #8fa39c;
    --line: #3a4f4a;
    --link: #86d3e0;
    --code-bg: #14201d;
    --go: #62d39b;
    --caution: #f0b450;
    --stop: #ff8a78;
    --lamp-off: #48605a;
    --hit: #26463a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body); }
[hidden] { display: none !important; }
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.25rem; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

h1, h2, h3, legend, .brand, .ladder a {
  font-family: var(--display);
  font-stretch: semi-condensed;
  font-weight: 600;
  line-height: 1.15;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin: 2.25rem 0 0.6rem; }
h2 { font-size: 1.55rem; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 23rem) { h1 { font-size: 1.6rem; } }
p { margin: 0 0 1rem; max-width: 72ch; }
.lede { font-size: 1.125rem; color: var(--muted); }
ul.plain { max-width: 72ch; padding-left: 1.2rem; }
ul.plain li { margin: 0.3rem 0; }

code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.92em; background: var(--code-bg); padding: 0.08em 0.3em; border-radius: 3px; }
/* A long name in running text breaks where the line ends, on a screen too narrow for it. */
p code, li code { overflow-wrap: break-word; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
pre code { background: none; padding: 0; font-size: 0.95rem; }
pre.sample { background: var(--code-bg); padding: 0.8rem 1rem; border-radius: 4px; margin: 0 0 1rem; white-space: pre; overflow-x: auto; }

/* Header: the bottom border is the running line; the current page is the lit section. */
.top { border-bottom: 3px solid var(--rail); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 2rem; padding-top: 0.9rem; }
.brand { font-size: 1.25rem; color: var(--ink); text-decoration: none; padding-bottom: 0.75rem; }
.brand:hover { text-decoration: underline; }
.yardnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; }
.yardnav a { display: block; position: relative; padding: 0.2rem 0 0.75rem; color: var(--muted); text-decoration: none; }
.yardnav a:hover { color: var(--ink); text-decoration: underline; }
.yardnav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.yardnav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--go); }
/* A tool page marks the section it belongs to. */
.yardnav a[aria-current="true"] { color: var(--ink); }
.yardnav a[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--rail); }

/* Where a tool page sits, above its heading, and the other tools of its section, at its end. */
.crumbs { margin: 1.5rem 0 0; font-size: 0.92rem; color: var(--muted); }
.crumbs + h1 { margin-top: 0.5rem; }
.more { margin-top: 3.5rem; }
.more h2 { margin-bottom: 0; }

/* Home: the tool list drawn as a yard ladder. One running line, one siding per tool. */
.ladder { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.ladder::before { content: ""; position: absolute; left: 0.4rem; top: 0; bottom: 0; width: 4px; background: var(--rail); border-radius: 2px; }
.ladder li { position: relative; padding: 0.55rem 0 1.5rem 5.6rem; min-height: 4.6rem; }
.ladder li::before { content: ""; position: absolute; left: calc(0.4rem + 2px); top: 0.15rem; width: 2.4rem; height: 4px; background: var(--rail); border-radius: 2px; transform-origin: 0 50%; transform: rotate(35deg); }
.ladder li::after { content: ""; position: absolute; left: calc(0.4rem + 1.95rem); top: calc(0.15rem + 1.376rem); width: 2.7rem; height: 4px; background: var(--rail); border-radius: 2px; }
.ladder li:hover::before, .ladder li:hover::after,
.ladder li:focus-within::before, .ladder li:focus-within::after { background: var(--go); }
.ladder a { font-size: 1.5rem; display: inline-block; color: var(--ink); text-decoration-thickness: 2px; text-decoration-color: var(--rail); overflow-wrap: anywhere; }
@media (max-width: 23rem) { .ladder a { font-size: 1.25rem; } }
.ladder a:hover { text-decoration-color: var(--go); }
.ladder p { margin: 0.3rem 0 0; color: var(--muted); }
.ladder.short { margin-top: 1.25rem; }
.ladder.short li { padding-bottom: 1rem; min-height: 3.8rem; }
.ladder.short a { font-size: 1.2rem; }

/* Forms */
fieldset { border: 0; border-top: 3px solid var(--rail); margin: 2rem 0 0; padding: 0.6rem 0 0; min-width: 0; }
legend { padding: 0 0.7rem 0 0; font-size: 1.2rem; }
label, .label { display: block; font-weight: 600; margin: 0.9rem 0 0.25rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; font-size: 1rem; line-height: 1.4; padding: 0.5rem 0.6rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rail); border-radius: 4px;
}
input[type="text"], input[type="number"], textarea { font-family: var(--mono); }
input[type="number"], input.short, select.short { width: 9rem; }
input[type="date"], input[type="time"] { width: 12rem; font-family: var(--body); }
select { font-family: var(--body); max-width: 28rem; }
textarea { min-height: 6rem; resize: vertical; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.55rem 0; font-weight: 400; }
.choice input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0.28rem 0 0; accent-color: var(--link); }
.cols { display: grid; gap: 0 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr)); }
.inline { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: flex-end; }
.inline > div { flex: none; }

button { font: inherit; font-weight: 600; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 4px; padding: 0.42rem 0.9rem; cursor: pointer; }
button:hover { background: var(--link); border-color: var(--link); }
button.quiet { background: transparent; color: var(--link); border-color: var(--rail); }
button.quiet:hover { background: var(--surface); border-color: var(--link); }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.7rem; }

/* Output */
.out { background: var(--surface); border: 1px solid var(--rail); border-left-width: 6px; border-radius: 4px; padding: 0.8rem 1rem; margin: 1rem 0; }
.out > .label { margin: 0 0 0.35rem; font-size: 0.92rem; font-weight: 400; color: var(--muted); }
/* The command stays in view while options change, on screens with room for it. It is pinned inside
   div.builder, which ends with the form, so it does not follow the reader into the rest of the page. */
@media (min-width: 48rem) and (min-height: 40rem) {
  .out.pinned { position: sticky; top: 0.5rem; z-index: 5; box-shadow: 0 0 0 0.5rem var(--paper); }
}
.out + .out { margin-top: 0.75rem; }

.notes { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.notes li { position: relative; padding: 0.2rem 0 0.2rem 1.5rem; max-width: 76ch; }
.notes li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--lamp-off); }
.notes li[data-level="go"]::before { background: var(--go); }
.notes li[data-level="caution"]::before { background: var(--caution); }
.notes li[data-level="stop"]::before { background: var(--stop); }

/* Signal: red, amber, green from the top. The housing is black in both themes. */
.signal { display: flex; gap: 1rem; align-items: flex-start; margin: 1rem 0; }
.signal .head { flex: none; display: grid; gap: 0.32rem; padding: 0.42rem; background: #0e1614; border-radius: 0.85rem; }
.signal .head i { display: block; width: 1rem; height: 1rem; border-radius: 50%; background: #2a3835; }
.signal[data-aspect="stop"] .head i:nth-child(1) { background: #ff5b4a; box-shadow: 0 0 0.5rem #ff5b4a; }
.signal[data-aspect="caution"] .head i:nth-child(2) { background: #ffb928; box-shadow: 0 0 0.5rem #ffb928; }
.signal[data-aspect="go"] .head i:nth-child(3) { background: #3fdc8d; box-shadow: 0 0 0.5rem #3fdc8d; }
.signal .verdict { margin: 0.1rem 0 0; font-size: 1.15rem; font-weight: 600; }
.signal .detail { margin: 0.3rem 0 0; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.25rem; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-family: var(--mono); font-size: 0.95rem; overflow-wrap: anywhere; }
@media (max-width: 34rem) {
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dd { margin-bottom: 0.5rem; }
}

.ace { border-left: 6px solid var(--rail); padding: 0.1rem 0 0.1rem 1rem; margin: 1rem 0; }
.ace[data-kind="allow"] { border-left-color: var(--go); }
.ace[data-kind="deny"] { border-left-color: var(--stop); }
.ace[data-kind="audit"] { border-left-color: var(--caution); }
.ace h3 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.ace p { margin: 0.15rem 0; }
.ace .raw { color: var(--muted); }

/* Tables */
.tablewrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 1rem 0.45rem 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; border-bottom: 2px solid var(--rail); white-space: nowrap; }
td code { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.hit td { background: var(--hit); }
tr.group th { border-bottom-width: 1px; padding-top: 1.2rem; color: var(--muted); font-weight: 400; }
/* A pasted command, part by part. A part that needs a look carries a lamp-coloured bar. */
table.parts td:first-child { width: 42%; }
table.parts td code { white-space: normal; overflow-wrap: anywhere; }
table.parts tr[data-level] td:first-child { box-shadow: inset 4px 0 0 var(--rail); padding-left: 0.7rem; }
table.parts tr[data-level="caution"] td:first-child { box-shadow: inset 4px 0 0 var(--caution); }
table.parts tr[data-level="stop"] td:first-child { box-shadow: inset 4px 0 0 var(--stop); }
@media (max-width: 34rem) {
  /* On a narrow screen a part and what it does stand one above the other. */
  table.parts thead { display: none; }
  table.parts tr { display: block; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
  table.parts td, table.parts td:first-child { display: block; width: auto; border: 0; padding: 0.1rem 0; }
  table.parts tr[data-level] td:first-child { padding-left: 0.7rem; }
}
.lede code { white-space: nowrap; }
.share { margin: 0.25rem 0 1rem; }
.share .hint { margin-top: 0.5rem; max-width: 76ch; }

.foot { margin-top: 4.5rem; border-top: 1px solid var(--line); padding: 1.25rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
.foot p { margin: 0 0 0.4rem; }
.foot a { margin-right: 1.25rem; }

@media print {
  .top, .foot, button { display: none; }
  .out.pinned { position: static; box-shadow: none; }
}
