@font-face {
  font-family: "Paper Mono";
  src: url("./fonts/paper-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --rail: #f5f5f5;
  --ink: #151515;
  --muted: #505050;
  --rule: #dddddd;
  --rim: #ababab;
  --accent: #171717;
  --accent-wash: #eaeaea;
  --selected: #f0f0f0;
  --button: #151515;
  --button-ink: #ffffff;
  --error: #151515;
  --glass: rgb(255 255 255 / 94%);
  --shade: rgb(0 0 0 / 33%);
  --mono: "Paper Mono", ui-monospace, monospace;
  font-family: var(--mono);
  font-synthesis: none;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #141414;
  --surface: #202020;
  --rail: #101010;
  --ink: #f5f5f5;
  --muted: #c0c0c0;
  --rule: #424242;
  --rim: #767676;
  --accent: #f0f0f0;
  --accent-wash: #343434;
  --selected: #2b2b2b;
  --button: #eeeeee;
  --button-ink: #141414;
  --error: #f5f5f5;
  --glass: rgb(32 32 32 / 95%);
  --shade: rgb(0 0 0 / 65%);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { display: block; width: 20px; height: 20px; flex: none; }
.icon-button {
  display: grid; place-items: center; width: 38px; height: 38px;
  padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 4px;
}
.icon-button:hover { background: var(--selected); color: var(--accent); }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 214px minmax(0, 1fr); }
.rail {
  display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0;
  height: 100dvh; overflow: auto; padding: 24px 19px; border-right: 1px solid var(--rule); background: var(--rail);
}
.rail-label {
  padding-left: 9px; margin: 0 0 8px; color: var(--muted);
  font: 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em;
}
.rail nav { display: grid; gap: 2px; }
.nav-button {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 6px 9px; background: transparent; border: 1px solid transparent; border-radius: 4px;
  color: var(--muted); font-size: 14px;
}
.nav-button svg { width: 16px; height: 16px; }
.nav-button:hover, .nav-button[aria-current] { background: var(--selected); color: var(--ink); }
.nav-button[aria-current] { border-color: color-mix(in srgb, var(--accent) 23%, transparent); font-weight: 650; }
.nav-button[aria-current] svg { color: var(--accent); }
.topbar {
  min-height: 66px; padding: 0 clamp(22px, 4vw, 66px); display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border-bottom: 1px solid var(--rule); background: var(--paper);
}
.breadcrumb {
  display: flex; gap: 9px; align-items: center; color: var(--muted); font: 13px/1.3 var(--mono); white-space: nowrap;
}
.breadcrumb span { color: var(--accent); }
.breadcrumb strong { color: var(--ink); font-weight: 400; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 10px; min-width: 195px;
  color: var(--muted); font-size: 14px; text-align: left;
  border: 1px solid var(--rim); border-radius: 4px; background: var(--surface);
}
.search-trigger:hover { color: var(--ink); }
.search-trigger svg, .theme-toggle svg { width: 17px; height: 17px; }
kbd {
  margin-left: auto; border: 1px solid var(--rule); border-radius: 3px; padding: 2px 4px; background: var(--rail);
  color: var(--muted); font: 12px/1.2 var(--mono); white-space: nowrap;
}
.mobile-menu { display: none; }
main { max-width: 1390px; margin-inline: auto; padding: 37px clamp(22px, 4vw, 66px) 30px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(220px, .85fr);
  align-items: center; gap: clamp(24px, 4vw, 65px); min-height: 285px;
  padding: 18px 0 30px; border-bottom: 1px solid var(--rim);
}
.hero-copy { container-type: inline-size; }
.hero h1 {
  margin: 0 0 15px; color: var(--ink); font-size: clamp(1.9rem, 4.8vw, 4.4rem);
  font-size: clamp(1.9rem, 12cqi, 4.4rem);
  font-weight: 700; line-height: 1.06; letter-spacing: -.05em;
}
.hero h1 em { color: var(--muted); font-style: normal; }
.hero-copy p { max-width: 32ch; margin: 0; font-size: clamp(1rem, 1.55vw, 1.125rem); color: var(--muted); }
.browser-note {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: 15px;
  padding: 6px 10px 5px 7px; border: 1px solid var(--rule); border-radius: 3px;
  background: var(--rail); color: var(--muted); font: 12px/1.3 var(--mono);
}
.browser-note::before, .browser-note::after {
  content: ""; position: absolute; width: 6px; height: 6px; border: solid var(--rim); pointer-events: none;
}
.browser-note::before { inset: -1px auto auto -1px; border-width: 1px 0 0 1px; }
.browser-note::after { inset: auto -1px -1px auto; border-width: 0 1px 1px 0; }
.browser-note svg { width: 15px; height: 15px; color: var(--ink); }
.file-station {
  --cross-ink: color-mix(in srgb, var(--accent) 44%, transparent);
  position: relative; min-width: 0; display: grid; padding-left: 14px;
  overflow: hidden; border: 1px solid var(--rim); border-radius: 5px;
  background: var(--surface); transition: background-color .16s, border-color .16s;
}
.file-station::before {
  content: ""; position: absolute; inset: 1px 0 0 14px; pointer-events: none; opacity: .54;
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.file-station::after {
  content: ""; position: absolute; inset: 10px 10px auto auto; width: 12px; height: 12px;
  border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); opacity: .65; pointer-events: none;
}
.hero.dragging .file-station {
  background: var(--selected); outline: 2px dashed var(--accent); outline-offset: -5px; border-color: var(--accent);
}
.station-ruler {
  position: absolute; inset: 0 auto 0 0; width: 14px; border-right: 1px solid var(--rule);
  background:
    repeating-linear-gradient(transparent 0 8px, var(--rim) 8px 9px) 100% 0 / 5px 100% no-repeat,
    repeating-linear-gradient(transparent 0 35px, var(--rim) 35px 36px) 100% 0 / 10px 100% no-repeat,
    var(--rail);
}
.station-content {
  position: relative; display: grid; align-content: center; justify-items: center;
  min-height: 207px; padding: 12px 14px 17px;
}
.station-privacy {
  z-index: 1; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px;
  margin: 0; padding: 9px 11px; border-top: 1px solid var(--rule); background: var(--rail);
  color: var(--muted); font-size: 13px; line-height: 1.35;
}
.privacy-stamp {
  position: relative; display: grid; place-items: center; height: 24px; color: var(--ink);
}
.privacy-stamp::before, .privacy-stamp::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  border: solid var(--muted);
}
.privacy-stamp::before { inset: 0 auto auto 0; border-width: 1px 0 0 1px; }
.privacy-stamp::after { inset: auto 0 0 auto; border-width: 0 1px 1px 0; }
.privacy-stamp svg { width: 15px; height: 15px; }
.privacy-copy { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 9px; }
.privacy-copy strong { color: var(--ink); font: 12px/1.35 var(--mono); }

.draft { position: relative; width: min(100%, 205px); height: 130px; display: grid; place-items: center; }
.draft-cross {
  position: absolute; inset: 13px 6px 12px; border: 1px dashed var(--cross-ink);
  background: linear-gradient(90deg, transparent calc(50% - .5px), var(--cross-ink) 50%, transparent calc(50% + .5px)),
              linear-gradient(transparent calc(50% - .5px), var(--cross-ink) 50%, transparent calc(50% + .5px));
}
.sheet {
  position: absolute; width: 65px; height: 83px; border: 1px solid var(--accent); border-radius: 3px;
}
.sheet-back { background: var(--rail); transform: translate(-11px, -3px) rotate(-13deg); }
.sheet-front {
  display: grid; place-items: center; color: var(--accent); background: var(--accent-wash);
  transform: translate(11px, 0) rotate(10deg); box-shadow: 2px 4px 0 rgb(0 0 0 / 13%);
}
.sheet-front::before, .sheet-front::after {
  content: ""; position: absolute; width: 11px; height: 11px;
  border: solid var(--accent); opacity: .64;
}
.sheet-front::before { inset: 7px auto auto 7px; border-width: 1px 0 0 1px; }
.sheet-front::after { inset: auto 7px 7px auto; border-width: 0 1px 1px 0; }
.sheet-front svg { width: 26px; height: 26px; stroke-width: 1.35; }
.hero-actions { z-index: 1; display: grid; justify-items: center; gap: 7px; }
.hero-actions > span { color: var(--muted); font: 12px/1.25 var(--mono); }
.primary, .secondary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid transparent; border-radius: 4px; font: 14px/1.45 var(--mono);
}
.primary { background: var(--button); color: var(--button-ink); }
.primary:hover { background: var(--accent); color: var(--surface); }
.secondary { border-color: var(--rim); background: var(--surface); color: var(--ink); }
.secondary:hover { background: var(--selected); border-color: var(--accent); }
.primary svg, .secondary svg { width: 16px; height: 16px; }
.directory { padding-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.section-head h2 { margin: 0; font-size: 29px; line-height: 1.1; letter-spacing: -.055em; }
.tool-count { color: var(--muted); font: 13px/1.3 var(--mono); white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 7px; margin-bottom: 15px; }
.filter {
  background: transparent; border: 1px solid transparent; border-radius: 3px;
  padding: 4px 8px; color: var(--muted); font: 13px/1.45 var(--mono); white-space: nowrap;
}
.filter:hover, .filter[aria-pressed=true] { background: var(--selected); border-color: var(--rule); color: var(--accent); }
.tool-grid { display: grid; border-top: 1px solid var(--rim); }
.tool-card { position: relative; min-width: 0; border-bottom: 1px solid var(--rule); }
.tool-card:hover, .tool-card:focus-within { background: var(--selected); }
.card-open {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 9px 56px 9px 7px; border: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none;
}
.card-open:focus-visible { outline-offset: -2px; }
.tool-name { min-width: 0; display: grid; grid-template-columns: minmax(145px, .78fr) minmax(0, 1.25fr); gap: 8px; align-items: baseline; }
.tool-name strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; font-weight: 700; }
.tool-name small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.tool-detail { display: grid; justify-items: end; gap: 2px; }
.tool-group, .tool-source { font: 12px/1.3 var(--mono); color: var(--muted); }
.tool-source { font-size: 11px; text-decoration: underline; text-underline-offset: 2px; }
.more-tools { margin-top: 15px; }
.tool-icon {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; flex: none;
  color: var(--accent); background: var(--accent-wash);
}
.tool-icon svg { width: 16px; height: 16px; }
.favorite { position: absolute; inset: 50% 8px auto auto; transform: translateY(-50%); }
.favorite svg { width: 16px; height: 16px; }
.favorite[aria-pressed=true] { color: var(--accent); }
.favorite[aria-pressed=true] svg { fill: var(--accent-wash); stroke-width: 2.3; }
.empty { margin: 0; padding: 18px 7px; color: var(--muted); }
.dialog {
  width: min(92vw, 674px); max-height: 88dvh; padding: 24px; border: 1px solid var(--rim);
  border-radius: 9px; color: var(--ink); background: var(--surface); box-shadow: 0 18px 56px var(--shade);
}
.dialog::backdrop { background: var(--shade); }
@supports (backdrop-filter: blur(6px)) {
  .dialog { background: var(--glass); backdrop-filter: blur(10px); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  .dialog { background: var(--surface); backdrop-filter: none; }
}
.file-dialog { width: min(92vw, 530px); }
.dialog-heading {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.dialog-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.055em; }
.dialog-heading p { margin: 2px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.search-results { display: grid; max-height: 54dvh; overflow: auto; margin-top: 10px; scrollbar-color: var(--rim) transparent; }
.result {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; text-decoration: none; border: 0; border-bottom: 1px solid var(--rule);
  background: transparent; padding: 7px; color: var(--ink);
}
.result:hover, .result:focus-visible { background: var(--selected); }
.result .tool-name { display: block; }
.result strong, .result small { display: block; }
.result small { color: var(--muted); font-size: 14px; }
.tool-body, .native-form, #native-output { display: grid; gap: 13px; }
.native-run { justify-self: start; }
.native-audio { width: 100%; }
.tool-body label { display: grid; gap: 5px; font: 14px/1.4 var(--mono); }
.tool-body textarea, .tool-body select, .tool-body input:not([type=range], [type=checkbox]) {
  max-width: 100%; min-width: 0; color: var(--ink); border: 1px solid var(--rim);
  background: var(--paper); border-radius: 4px; padding: 8px 9px;
}
.tool-body textarea { min-height: 103px; resize: vertical; font: 14px/1.5 var(--mono); }
.tool-body textarea[readonly] { background: var(--rail); }
.tool-body .actions { display: flex; flex-wrap: wrap; gap: 7px; }
.tool-body .check { display: flex; align-items: center; gap: 8px; }
.tool-body ol { margin: 0; padding-left: 22px; font: 14px/1.4 var(--mono); overflow-wrap: anywhere; }
.tool-body input[type=range], .tool-body input[type=checkbox] { accent-color: var(--accent); }
.tool-status { margin: 0; color: var(--muted); font: 13px/1.45 var(--mono); }
.tool-status[data-error=true] { color: var(--error); font-weight: 700; }
.media-preview { display: block; max-width: 100%; max-height: 220px; border-radius: 4px; object-fit: contain; margin: auto; }
.swatch { width: 100%; height: 63px; border: 1px solid var(--rule); border-radius: 4px; }
button:disabled { opacity: .56; cursor: default; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 178px minmax(0, 1fr); }
  .rail { padding-inline: 14px; }
  .tool-name { display: block; }
  .tool-name strong, .tool-name small { display: block; }
  .tool-name small { margin-top: 2px; }
}
@media (max-width: 745px) {
  .shell { display: block; }
  .rail {
    display: none; position: fixed; z-index: 5; top: 58px; left: 0; width: min(80vw, 220px);
    height: calc(100dvh - 58px); box-shadow: 11px 0 30px var(--shade);
  }
  .rail[data-open=true] { display: flex; }
  .mobile-menu { display: grid; flex: none; margin-left: -6px; width: 33px; }
  .topbar { min-height: 58px; padding: 0 14px; gap: 9px; }
  .breadcrumb { margin-right: auto; min-width: 0; }
  .header-actions { gap: 3px; }
  .search-trigger { min-width: 0; padding: 6px 8px; }
  .search-trigger kbd { display: none; }
  .theme-toggle { width: 33px; }
  main { padding: 24px 17px; }
  .hero { padding: 9px 0 24px; min-height: 0; grid-template-columns: minmax(0, 1.15fr) minmax(170px, .85fr); gap: 16px; }
  .station-content { min-height: 168px; padding: 8px 11px 14px; }
  .draft { height: 110px; }
}
@media (max-width: 480px) {
  .breadcrumb { font-size: 12px; gap: 5px; }
  .breadcrumb .crumb-root, .breadcrumb > span:not(.crumb-root) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .hero h1 { margin-bottom: 9px; }
  .hero-copy p { max-width: 34ch; }
  .station-content { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 118px; }
  .draft { width: 114px; height: 94px; }
  .sheet { width: 46px; height: 58px; }
  .sheet-front::before, .sheet-front::after { width: 7px; height: 7px; }
  .sheet-front svg { width: 21px; height: 21px; }
  .card-open { grid-template-columns: 28px minmax(0, 1fr) auto; padding-right: 48px; }
  .tool-detail:not(:has(.tool-source)) { display: none; }
  .tool-group { display: none; }
  .section-head { flex-wrap: wrap; }
  .tool-count { white-space: normal; }
  .favorite { right: 2px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
