/* Hallmark · shape: app screen · genre: modern-minimal · theme: Dusk (by request, the el zone system of the life and admin apps, set flat) · redesign: full
 * nav: one top bar, the wordmark, the app label, two actions · signature: the recipe, a numbered chain of tools on one spine, each step showing its own result · states: empty, full, error, waiting
 * axes: dark/grotesk-sans/cool · posture: committed · contrast: pass · finish-review: subagent · 8 findings · 7 resolved 1 partial (4: the fill, the repeated label and the dead buttons are gone, the el zone error colour stays on the text) · gap: none · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, a column of mono sheets could be any converter; the numbered spine and the step results place it */
/* Hallmark · reworded "Search tools..." to "Add a tool", "187 tools available" to "Browse all 187 tools", "Input..." to "Paste or type the text to work on" · the owner chose example B, where the search is the add row and the list is the browse index */
/* Hallmark · dropped .tool-input per step · the owner chose example B: one input feeds the chain, each step reads the result above it */
:root {
  color-scheme: dark;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px;
  --text-xs: 0.75rem; --text-code: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.2rem; --text-xl: 1.44rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;
  --bar-h: 56px; --ctl-h: 32px; --hit: 44px; --gutter: var(--space-lg); --page-width: 880px; --textarea-height: 120px;
  --z-raised: 10; --z-toast: 500;
  --color-paper: oklch(17.5% 0.014 268); --color-paper-2: oklch(21% 0.016 268); --color-paper-3: oklch(25% 0.017 268); --color-sunk: oklch(14.5% 0.014 268);
  --color-ink: oklch(96% 0.006 75); --color-ink-2: oklch(85% 0.010 262); --color-muted: oklch(72% 0.016 262);
  --color-rule: oklch(30% 0.016 266); --color-edge: oklch(56% 0.02 266);
  --color-split: oklch(100% 0 0 / 0.07); --color-lift: oklch(100% 0 0 / 0.05); --color-lift-2: oklch(100% 0 0 / 0.1); --color-scrim: oklch(8% 0.014 268 / 0.6);
  --color-accent: oklch(77% 0.10 274); --color-accent-hi: oklch(84% 0.085 274); --color-accent-ink: oklch(19% 0.035 274); --color-accent-dim: oklch(30% 0.05 274); --color-accent-text: var(--color-accent-hi); --color-focus: oklch(80% 0.10 274);
  --color-accent-2: oklch(83% 0.095 62); --color-accent-2-dim: oklch(30% 0.04 62); --color-accent-2-text: var(--color-accent-2);
  --color-error: oklch(76% 0.13 27);
  --font-display: "Wix Madefor Display", ui-sans-serif, system-ui, sans-serif; --font-body: "Wix Madefor Text", ui-sans-serif, system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius-card: 10px; --radius-inner: 8px; --radius-pill: 999px; --radius-ctl: var(--radius-inner);
  --tracking-display: -0.022em; --display-weight: 500;
  --primary-bg: var(--color-ink); --primary-bg-hover: var(--color-ink-2); --primary-ink: var(--color-paper);
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2314162b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 8.4 6.9 11l5-5.6'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b4b8c8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E");
}
:root[data-theme="light"] {
  color-scheme: light;
  --color-paper: oklch(98.6% 0.005 274); --color-paper-2: oklch(95.5% 0.012 274); --color-paper-3: oklch(92.5% 0.016 274); --color-sunk: oklch(99.6% 0.003 274);
  --color-ink: oklch(22% 0.03 268); --color-ink-2: oklch(35% 0.03 268); --color-muted: oklch(46% 0.03 268);
  --color-rule: oklch(89% 0.018 274); --color-edge: oklch(62% 0.03 272);
  --color-split: oklch(22% 0.03 268 / 0.1); --color-lift: oklch(22% 0.03 268 / 0.04); --color-lift-2: oklch(22% 0.03 268 / 0.08); --color-scrim: oklch(22% 0.03 268 / 0.35);
  --color-accent: oklch(44% 0.13 274); --color-accent-hi: oklch(38% 0.13 274); --color-accent-ink: oklch(98% 0.01 274); --color-accent-dim: oklch(93% 0.035 274); --color-accent-text: oklch(40% 0.13 274); --color-focus: oklch(44% 0.13 274);
  --color-accent-2: oklch(72% 0.13 62); --color-accent-2-dim: oklch(93% 0.05 70); --color-accent-2-text: oklch(42% 0.09 55);
  --color-error: oklch(48% 0.17 27);
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f7f7fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.2 8.4 6.9 11l5-5.6'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23565b72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5l3-3'/%3E%3C/svg%3E");
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-rule) var(--color-paper); scroll-padding-top: var(--space-xl); }
body { margin: 0; min-height: 100vh; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); font-synthesis: none; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--display-weight); letter-spacing: var(--tracking-display); line-height: 1.2; color: var(--color-ink); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-ctl); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.skip:focus-visible { top: var(--space-md); }

/* top bar */
.bar { display: flex; align-items: center; gap: var(--space-md); min-width: 0; height: var(--bar-h); padding-inline: var(--gutter); border-bottom: 1px solid var(--color-rule); }
.brand { display: inline-flex; align-items: baseline; gap: var(--space-2xs); border-radius: var(--radius-ctl); font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: var(--tracking-display); line-height: 1.2; color: var(--color-muted); text-decoration: none; white-space: nowrap; transition: color var(--dur-micro) var(--ease-out); }
.brand b { font-weight: 600; color: var(--color-ink); }
.brand small { margin-left: var(--space-2xs); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; }
.brand:hover { color: var(--color-ink-2); }
.bar-acts { display: flex; align-items: center; gap: var(--space-xs); margin-left: auto; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-ctl); background: transparent; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-lift); }
.btn:active { background: var(--color-lift-2); transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; background: transparent; }
.btn-primary { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-ink); }
.btn-primary:hover, .btn-primary:active { border-color: var(--primary-bg-hover); background: var(--primary-bg-hover); }
.btn-primary:disabled { border-color: var(--primary-bg); background: var(--primary-bg); }
.btn-quiet { border-color: transparent; color: var(--color-ink-2); }
.btn-quiet:hover { color: var(--color-ink); }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-icon::after { content: ""; position: absolute; inset: calc((var(--ctl-h) - var(--hit)) / 2) 0; }
.btn-icon svg { width: 16px; height: 16px; }

/* fields */
.field { width: 100%; min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 1px solid var(--color-edge); border-radius: var(--radius-inner); background-color: var(--color-sunk); color: var(--color-ink); font-size: var(--text-sm); transition: border-color var(--dur-micro) var(--ease-out); }
.field::placeholder { color: var(--color-muted); opacity: 1; }
.field:hover { border-color: var(--color-ink-2); }
.field:disabled { opacity: 0.55; cursor: not-allowed; }
select.field { appearance: none; padding-right: var(--space-lg); background-image: var(--i-chev); background-repeat: no-repeat; background-position: right var(--space-xs) center; background-size: 12px; cursor: pointer; }
textarea.field { min-height: var(--textarea-height); padding-block: var(--space-xs); font-family: var(--font-code); font-size: var(--text-code); line-height: 1.6; resize: vertical; }
input[type="search"]::-webkit-search-cancel-button { appearance: none; }
.search { position: relative; display: block; min-width: 0; }
.search .field { padding-right: var(--space-xl); }
.kbd { position: absolute; right: var(--space-xs); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--space-2xs); font-family: var(--font-code); font-size: var(--text-xs); line-height: 1; color: var(--color-muted); pointer-events: none; }
.lab { font-size: var(--text-sm); color: var(--color-ink-2); }
.check { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--ctl-h); font-size: var(--text-sm); color: var(--color-ink-2); cursor: pointer; }
.check input { appearance: none; flex-shrink: 0; width: 16px; height: 16px; margin: 0; border: 1px solid var(--color-edge); border-radius: var(--space-2xs); background: var(--color-sunk) center / 14px no-repeat; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.check input:hover { border-color: var(--color-ink-2); }
.check input:checked { border-color: var(--color-accent); background-color: var(--color-accent); background-image: var(--i-tick); }
.check input:disabled { opacity: 0.55; cursor: not-allowed; }

/* text sheets */
.code { display: block; width: 100%; min-width: 0; margin: 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-inner); background: var(--color-sunk); color: var(--color-ink); font-family: var(--font-code); font-size: var(--text-code); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
textarea.code { min-height: var(--textarea-height); resize: vertical; transition: border-color var(--dur-micro) var(--ease-out); }
textarea.code:hover { border-color: var(--color-edge); }
textarea.code::placeholder { color: var(--color-muted); opacity: 1; }
pre.code { max-height: calc(var(--textarea-height) * 3); overflow: auto; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-sm); min-height: var(--hit); min-width: 0; }
.meta { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.acts { display: flex; align-items: center; gap: var(--space-2xs); margin-left: auto; }

/* the page: one column */
.tools-container { width: 100%; max-width: var(--page-width); margin-inline: auto; padding: var(--space-lg) var(--gutter) var(--space-3xl); }

/* the recipe: numbered steps on one spine */
.flow { position: relative; margin-top: var(--space-md); }
.flow::before { content: ""; position: absolute; left: 15px; top: var(--space-md); bottom: 0; width: 1px; background: var(--color-rule); }
.flow:empty { display: none; }
.step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--space-md); padding-block: var(--space-sm) var(--space-md); border-top: 1px solid var(--color-split); }
.flow-n { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: var(--space-2xs) auto 0; border: 1px solid var(--color-rule); border-radius: var(--radius-inner); background: var(--color-paper); font-size: var(--text-xs); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--color-ink-2); }
.flow-n svg { width: 12px; height: 12px; }
.step-body { min-width: 0; }
.step-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 0 var(--space-md); margin-bottom: var(--space-xs); }
.step-head h3 { display: flex; align-items: center; min-height: var(--ctl-h); }
.step-head .acts { grid-column: 3; grid-row: 1; }
.opts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-md); min-width: 0; }
.step-head.has-many .opts, .step-head.is-wrapped .opts { grid-column: 1 / -1; grid-row: 2; margin-top: var(--space-2xs); }
.opt { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; }
.opt .field { width: auto; max-width: 100%; }
.opt input[type="number"].field { width: 80px; }
.opt input[type="text"].field { width: 144px; }
.opt-wide { display: grid; gap: var(--space-2xs); margin-bottom: var(--space-xs); }
.opt-wide .opt-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: var(--ctl-h); }
.step:not(.is-last) pre.code { color: var(--color-muted); }
.step.is-error pre.code { border-color: color-mix(in oklab, var(--color-error) 45%, var(--color-rule)); color: var(--color-error); }
.step.is-running pre.code { color: var(--color-muted); }
.step.is-running .flow-n, .step.is-blocked .flow-n { border-color: var(--color-accent-2); color: var(--color-accent-2-text); }
.step-note { min-height: var(--ctl-h); padding-block: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.result-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-xs); }
.state { margin-top: var(--space-lg); padding-block: var(--space-md); border-top: 1px solid var(--color-split); font-size: var(--text-sm); color: var(--color-muted); }

/* add a step: the search, its hits, and the whole catalogue as an index */
.add { border-bottom: 0; }
.add::before { content: ""; position: absolute; left: 15px; top: 0; height: var(--space-md); width: 1px; background: var(--color-rule); }
.flow:empty + .add::before { display: none; }
.hits { scroll-margin-bottom: var(--space-lg); margin-top: var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-inner); background: var(--color-paper-2); overflow: clip; }
.hits li + li { border-top: 1px solid var(--color-split); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); width: 100%; min-height: var(--ctl-h); padding: 0 var(--space-sm); border: 0; background: transparent; font-size: var(--text-sm); color: var(--color-ink-2); text-align: left; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:hover, .row[aria-selected="true"] { background: var(--color-lift-2); color: var(--color-ink); }
.row:active { background: var(--color-lift); }
.row:focus-visible { outline-offset: -2px; }
.hits-none { padding: var(--space-xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.browse { display: flex; margin: var(--space-xs) 0 0 calc(-1 * var(--space-sm)); }
.browse .btn svg { width: 12px; height: 12px; color: var(--color-muted); transition: transform var(--dur-micro) var(--ease-out); }
.browse .btn[aria-expanded="true"] svg { transform: rotate(90deg); }
.index { margin-top: var(--space-2xs); border-top: 1px solid var(--color-split); }
.group { border-bottom: 1px solid var(--color-split); }
.group summary { display: flex; align-items: center; gap: var(--space-xs); min-height: var(--hit); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); list-style: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.group summary::-webkit-details-marker { display: none; }
.group summary:hover { background: var(--color-lift); }
.group summary:active { background: var(--color-lift-2); }
.group summary:focus-visible { outline-offset: -2px; }
.group summary svg { width: 12px; height: 12px; margin-left: var(--space-2xs); color: var(--color-muted); transition: transform var(--dur-micro) var(--ease-out); }
.group[open] summary svg { transform: rotate(90deg); }
.group summary .meta { margin-left: auto; padding-right: var(--space-xs); }
.group-tools { columns: 3; column-gap: var(--space-lg); padding: 0 0 var(--space-sm) var(--space-lg); }
.tool { display: block; width: 100%; min-height: 28px; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-inner); background: transparent; font-size: var(--text-sm); color: var(--color-ink-2); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.tool:hover { background: var(--color-lift-2); color: var(--color-ink); }
.tool:active { background: var(--color-lift); }
.tool:focus-visible { outline-offset: -2px; }

/* settings */
.sheet { width: min(420px, calc(100% - 2 * var(--space-md))); max-height: calc(100% - 2 * var(--space-md)); padding: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-2); color: var(--color-ink); }
.sheet::backdrop { background: var(--color-scrim); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg); border-bottom: 1px solid var(--color-split); }
.sheet-head h2 { font-size: var(--text-lg); }
.sheet-body { display: grid; gap: var(--space-md); padding: var(--space-lg); }
.setting { display: grid; gap: var(--space-2xs); }
.setting .lab { font-weight: 500; }

@media (max-width: 720px) {
  :root { --gutter: var(--space-md); }
  .step { grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-sm); }
  .flow::before, .add::before { left: 11px; }
  .step-head { grid-template-columns: minmax(0, 1fr) auto; }
  .step-head .opts { grid-column: 1 / -1; grid-row: 2; }
  .step-head .acts { grid-column: 2; gap: var(--space-xs); }
  .btn-icon::after { inset: calc((var(--ctl-h) - var(--hit)) / 2) calc(-1 * var(--space-2xs)); }
  .io .acts { flex-basis: 100%; }
  .io .acts, .result-foot .acts { margin-left: calc(-1 * var(--space-sm)); }
  .group-tools { columns: 2; padding-left: var(--space-xs); }
}
@media (max-width: 420px) {
  .group-tools { columns: 1; }
  .bar-acts .btn:not(.btn-quiet) { padding-inline: var(--space-xs); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
