@font-face {
  font-family: Inter;
  src: url('/fonts/inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #192c28;
  --muted: #50635e;
  --paper: #f6f6ef;
  --surface: #fffffb;
  --line: #d5ded4;
  --action: #1b5a48;
  --action-hover: #144737;
  --error: #883b2e;
  font: 16px/1.55 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--action); text-underline-offset: .2em; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 3px solid #a86011; outline-offset: 3px; }

.masthead { border-bottom: 1px solid var(--line); padding: 1rem clamp(1.25rem, 5vw, 4rem); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 750; text-decoration: none; }
.mark { display: grid; place-items: center; width: 2rem; height: 2rem; background: var(--action); color: white; border-radius: .55rem; }

main { width: min(70rem, 100% - 2.5rem); margin: 0 auto; padding: clamp(2rem, 7vw, 6rem) 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(2rem, 7vw, 6rem); align-items: center; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(2rem, 5.5vw, 3.4rem)/1.1 'Instrument Serif', Georgia, serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.intro h1 { font-size: clamp(2.75rem, 7vw, 5.7rem); }
.intro > p { margin-top: 1.7rem; max-width: 26rem; color: var(--muted); font-size: 1.12rem; }
h2 { font-size: 1.32rem; line-height: 1.2; }
h3 { font-size: .95rem; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(1.3rem, 4vw, 2.25rem); border-radius: 1rem; min-width: 0; }
.panel > p { margin-top: .8rem; }
.panel > h3 { margin-top: 1.6rem; }
.narrow { max-width: 31rem; margin: 0 auto; }
.panel > a { display: inline-block; margin-top: 1rem; }

form { margin: 0; }
.panel > form { margin-top: 1.5rem; }
label { display: block; margin: 1rem 0 .25rem; font-size: .92rem; font-weight: 650; }
input, textarea, select { width: 100%; padding: .65rem .75rem; border: 1px solid #aebfb5; border-radius: .45rem; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
small, .muted, .secondary { color: var(--muted); }
.muted { font-weight: 400; }
.secondary { font-size: .9rem; }
.code { letter-spacing: .25em; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
button { padding: .65rem .9rem; border: 1px solid transparent; border-radius: .45rem; background: var(--action); color: white; cursor: pointer; font: inherit; font-weight: 600; }
button:hover { background: var(--action-hover); }
.panel > form > button { margin-top: 1.2rem; }
button.quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
button.quiet:hover { background: #eaf1e9; }
.error { color: var(--error); background: #fff0eb; padding: .6rem .8rem; border-radius: .45rem; }

.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.eyebrow { color: var(--muted); font-size: .88rem; margin-bottom: .35rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1rem; margin: 1.2rem 0; font-size: .92rem; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary { white-space: pre-wrap; overflow-wrap: anywhere; }
.endpoint { margin-top: 1rem; padding: .7rem; background: #edf2e9; border-radius: .45rem; overflow-wrap: anywhere; }
.endpoint code { font-size: .87rem; }
.connections { padding: 0; margin: .6rem 0 0; list-style: none; }
.connections li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.connections span { overflow-wrap: anywhere; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.actions > button { margin-top: 0 !important; }

@media (max-width: 45rem) {
  .split, .grid { grid-template-columns: 1fr; }
  .desktop { display: none; }
  .workspace-heading { align-items: flex-start; }
}
