/* Shed kit: the look of Shed itself, and an opt-in style for apps.
   <link rel="stylesheet" href="/_shed/kit.css">
   Paper, ink and one signal colour. Square corners, ruled lines, tape labels.
   SPDX-License-Identifier: MIT. Fonts: Archivo and IBM Plex Mono, SIL OFL 1.1 (see /_shed/fonts). */

@font-face { font-family: "Archivo"; src: url("/_shed/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/_shed/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/_shed/fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/_shed/fonts/plexmono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f4f4f0; --paper-2: #e6e6e0; --ink: #15140f; --ink-2: #47443b; --mute: #7a766b;
  --hair: rgba(21, 20, 15, .15); --signal: #f2c200; --stop: #c2331b; --go: #2c6e3f;
  --sans: "Archivo", ui-sans-serif, sans-serif; --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
/* Dark follows the system unless the page pins a theme: <html data-theme="light"> or <html data-theme="dark">. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #12110d; --paper-2: #1c1b16; --ink: #ece9df; --ink-2: #bcb8ac; --mute: #8b877b; --hair: rgba(236, 233, 223, .15); --stop: #ef6a50; --go: #7fc48f; }
}
:root[data-theme="dark"] { --paper: #12110d; --paper-2: #1c1b16; --ink: #ece9df; --ink-2: #bcb8ac; --mute: #8b877b; --hair: rgba(236, 233, 223, .15); --stop: #ef6a50; --go: #7fc48f; color-scheme: dark }
:root[data-theme="light"] { color-scheme: light }

*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); font-stretch: 100% }
::selection { background: var(--signal); color: #15140f }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px }

h1, h2, h3 { margin: 0; font-family: var(--sans); color: var(--ink) }
h1 { font-size: clamp(40px, 6.4vw, 84px); line-height: .92; font-weight: 800; font-stretch: 125%; letter-spacing: -.025em }
h2 { font-size: 26px; line-height: 1.1; font-weight: 750; font-stretch: 115%; letter-spacing: -.01em }
h3 { font-size: 17px; font-weight: 700; font-stretch: 105% }
p { margin: 0 0 12px; max-width: 62ch }
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px }
a:hover { background: var(--signal); color: #15140f; text-decoration-color: transparent }
small, .sh-mute { color: var(--mute) }
hr, .sh-rule { border: 0; border-top: 2px solid var(--ink); margin: 0 }
.sh-hair { border-top: 1px solid var(--hair) }

/* Monospace metadata: addresses, counts, timestamps */
code, kbd, .sh-mono { font-family: var(--mono); font-size: .875em }
code { background: var(--paper-2); padding: 1px 5px }
.sh-label { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute) }

/* Tape: the label-maker strip used for names and roles */
.sh-tape { display: inline-block; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--paper); padding: 5px 8px 4px; white-space: nowrap }
.sh-tape.is-signal { background: var(--signal); color: #15140f }
.sh-tape.is-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink) }

/* Controls: square, inked, with the signal colour reserved for focus and hover */
button, .sh-btn { font: 650 15px/1 var(--sans); font-stretch: 108%; letter-spacing: .005em; padding: 12px 18px; border: 1.5px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px }
button:hover, .sh-btn:hover { background: var(--signal); color: #15140f; border-color: #15140f }
button:disabled, button:disabled:hover { background: transparent; color: var(--mute); border-color: var(--hair); cursor: not-allowed }
button.is-quiet, .sh-btn.is-quiet { background: transparent; color: var(--ink) }
/* Quiet buttons keep dark ink on the signal colour when hovered, in dark mode too (their own ink is light there). */
button.is-quiet:not(:disabled):hover, .sh-btn.is-quiet:hover { background: var(--signal); color: #15140f; border-color: #15140f }
button.is-small, .sh-btn.is-small { padding: 7px 11px; font-size: 13.5px }
input, select, textarea { font: 400 16px/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 0; padding: 11px 12px; min-width: 0 }
input::placeholder, textarea::placeholder { color: var(--mute) }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--signal); outline-offset: 0 }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat }
label { font: 500 11.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); display: grid; gap: 6px }

/* Ledger: the table for lists of things */
table.sh-ledger { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink) }
.sh-ledger th { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); text-align: left; padding: 12px 12px 10px 0; border-bottom: 1px solid var(--ink) }
.sh-ledger td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--hair); vertical-align: top }
.sh-ledger tr:last-child td { border-bottom: 0 }
.sh-ledger td.num, .sh-ledger th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums }

/* Terminal strip: commands people copy */
.sh-cmd { background: #15140f; color: #f2f0e9; box-shadow: 0 0 0 1px var(--hair); font: 400 14px/1.75 var(--mono); padding: 16px 18px; margin: 0; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; position: relative }
/* Long commands wrap instead of hiding under the edge; wrapped parts hang under the command. */
.sh-cmd .l { display: block; padding-left: 2ch; text-indent: -2ch }
.sh-cmd .p { color: var(--signal); user-select: none }
.sh-cmd .c { color: #8b877b }
.sh-copy { position: absolute; top: 10px; right: 10px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px; background: #15140f; color: #f2f0e9; border: 1px solid rgba(242, 240, 233, .4) }
.sh-cmd:has(.sh-copy) { padding-right: 84px }
@media (max-width: 720px) { .sh-cmd { font-size: 13px } .sh-cmd:has(.sh-copy) { padding-top: 46px; padding-right: 18px } }
.sh-copy:hover { background: var(--signal); color: #15140f; border-color: var(--signal) }

/* Notice strip */
.sh-note { background: var(--paper-2); padding: 12px 14px; font: 400 14px/1.5 var(--mono) }
.sh-note.is-bad { color: var(--stop) }

/* Page frame used by Shed's own pages */
.sh-frame { max-width: 1180px; margin: 0 auto; padding: 0 28px }
.sh-top { border-bottom: 2px solid var(--ink) }
.sh-top .sh-frame { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px }
.sh-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--sans); font-stretch: 125%; letter-spacing: -.03em }
.sh-mark:hover { background: none; color: inherit }
.sh-mark svg { width: 28px; height: 26px; margin-top: -3px }
.sh-foot { border-top: 2px solid var(--ink); margin-top: 96px }
.sh-foot .sh-frame { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 40px }
