/* urashyl.dev */

:root {
  color-scheme: light;
  --bg: #eef0eb;
  --surface: #f7f8f4;
  --surface-2: #e4e8e1;
  --ink: #18201b;
  --ink-soft: #36403a;
  --muted: #5d6a62;
  --rule: #d3d9d0;
  --rule-strong: #b3bcb1;
  --accent: #2b5e4f;
  --accent-ink: #f4f7f3;
  --accent-soft: rgba(43, 94, 79, 0.1);
  --up: #2c7a4b;
  --warn: #9a6812;
  --down: #b2442a;
  --idle: #8a958d;

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;

  --radius: 10px;
  --wrap: 62rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141916;
    --surface: #1a201c;
    --surface-2: #222a25;
    --ink: #e2e8e2;
    --ink-soft: #c3ccc5;
    --muted: #93a098;
    --rule: #2a332d;
    --rule-strong: #3d4840;
    --accent: #8fc7af;
    --accent-ink: #11201a;
    --accent-soft: rgba(143, 199, 175, 0.12);
    --up: #6fc492;
    --warn: #e0b35a;
    --down: #ec8467;
    --idle: #6d7a72;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141916;
  --surface: #1a201c;
  --surface-2: #222a25;
  --ink: #e2e8e2;
  --ink-soft: #c3ccc5;
  --muted: #93a098;
  --rule: #2a332d;
  --rule-strong: #3d4840;
  --accent: #8fc7af;
  --accent-ink: #11201a;
  --accent-soft: rgba(143, 199, 175, 0.12);
  --up: #6fc492;
  --warn: #e0b35a;
  --down: #ec8467;
  --idle: #6d7a72;
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-3);
  letter-spacing: -0.022em;
}

h2 {
  font-size: var(--step-1);
}

h3 {
  font-size: var(--step-0);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.86em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.tabular {
  font-variant-numeric: lining-nums;
}

.muted {
  color: var(--muted);
}

.err-text {
  color: var(--down);
}

.icon {
  flex: none;
  vertical-align: -0.15em;
}

.icon-ext {
  margin-left: 0.2em;
  vertical-align: 0;
  opacity: 0.7;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.25rem;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-name img {
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.45em;
}

.header-tools {
  display: flex;
  gap: 0.25rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .header-tools {
    margin-left: auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.25rem;
    overflow-x: auto;
  }
}

/* State dots */

.state-dot {
  display: inline-block;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--idle);
}

.state-live .state-dot,
.state-dot.state-live {
  background: var(--up);
}

.state-degraded .state-dot,
.state-dot.state-degraded {
  background: var(--warn);
}

.state-error .state-dot,
.state-dot.state-error {
  background: var(--down);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button-quiet {
  border-color: var(--rule-strong);
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  filter: none;
  background: var(--surface-2);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: var(--step--1);
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

/* Home */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) 2.5rem;
}

.hero-title {
  max-width: 23ch;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.hero-sub {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.55;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.live {
  margin-block: 1rem 0;
}

.trace-svg {
  display: block;
  width: 100%;
  height: clamp(72px, 12vw, 128px);
  overflow: visible;
}

.trace-base {
  stroke: var(--rule-strong);
  stroke-width: 1;
}

.trace-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trace-area {
  fill: var(--accent-soft);
}

.live figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: var(--step--1);
}

.live figcaption .state-dot {
  margin-right: 0.5rem;
  vertical-align: 0.08em;
}

.live figcaption a {
  margin-left: 0.25rem;
  white-space: nowrap;
}

.section {
  padding-block: 3.5rem 0;
}

.section-tight {
  padding-block: 1.5rem 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head a {
  color: var(--muted);
  font-size: var(--step--1);
}

.section-lead {
  max-width: 40rem;
  margin: -0.4rem 0 1.5rem;
  color: var(--ink-soft);
}

/* Work list */

.work-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.work-row {
  border-top: 1px solid var(--rule);
}

.work-link {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: 0.25rem 2rem;
  align-items: baseline;
  padding: 1.1rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.work-link:hover {
  background: var(--surface);
}

.work-link:hover .work-name {
  color: var(--accent);
}

.work-name {
  font-size: var(--step-1);
}

.work-desc {
  color: var(--ink-soft);
}

.work-note {
  color: var(--warn);
  white-space: nowrap;
}

.work-meta {
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .work-link {
    grid-template-columns: 1fr auto;
  }

  .work-desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .work-meta {
    grid-row: 1;
    grid-column: 2;
  }
}

.work-list-full {
  border-bottom: 0;
}

.work-entry {
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}

.work-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.work-entry h2 {
  font-size: var(--step-2);
}

.work-entry h2 a {
  text-decoration: none;
}

.work-entry h2 a:hover {
  color: var(--accent);
}

.work-tagline {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
}

.work-body {
  max-width: 44rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
  font-weight: 550;
}

.work-actions a {
  color: var(--accent);
}

/* Service list (home) */

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--rule);
}

.service-name {
  font-weight: 600;
}

.service-role {
  flex: 1;
  color: var(--muted);
  font-size: var(--step--1);
}

@media (max-width: 640px) {
  .service-list {
    grid-template-columns: 1fr;
  }
}

/* Probe status */

.probe {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
}

.probe::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--idle);
}

.probe-up {
  color: var(--up);
}

.probe-up::before {
  background: var(--up);
}

.probe-down {
  color: var(--down);
}

.probe-down::before {
  background: var(--down);
}

.probe-unknown::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--idle);
}

/* Page heads */

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0.5rem;
}

.page-head h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.page-lead {
  max-width: 42rem;
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
}

.page-lead.small {
  font-size: var(--step-0);
  color: var(--muted);
}

.filter {
  display: flex;
  gap: 0.35rem;
  margin-top: 2rem;
}

.filter a {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.filter a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.filter a[aria-current="page"] {
  background: var(--ink);
  color: var(--bg);
}

.filter-note {
  margin-top: 1rem;
  color: var(--muted);
}

.empty {
  padding: 3rem 0;
}

.empty p {
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Case study */

.case {
  padding-top: 2rem;
}

.back a {
  color: var(--muted);
  font-size: var(--step--1);
  text-decoration: none;
}

.back a::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.5em;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1em) rotate(45deg);
}

.back a:hover {
  color: var(--ink);
}

.case-head {
  padding-block: 1.75rem 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.case-head h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.25rem);
  letter-spacing: -0.03em;
}

.case-tagline {
  max-width: 36rem;
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 4rem;
  padding-top: 2.25rem;
}

.case-side {
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.case-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

@media (max-width: 860px) {
  .case-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .case-side {
    position: static;
    order: -1;
  }

  .case-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .case-side .facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
  }

  .case-side .facts > div:nth-last-child(2) {
    border-bottom: 1px solid var(--rule);
  }
}

.prose {
  max-width: 40rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: var(--step-2);
}

.prose h3 {
  margin-top: 2rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--muted);
}

.callout {
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--warn);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.layers {
  margin-block: 1.25rem 0;
}

.layers > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}

.layers dt {
  font-weight: 600;
}

.layers dd {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .layers > div {
    grid-template-columns: 1fr;
  }
}

.facts {
  margin: 0;
}

.facts > div {
  padding-block: 0.7rem;
  border-top: 1px solid var(--rule);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  color: var(--muted);
  font-size: var(--step--1);
}

.facts dd {
  margin: 0.1rem 0 0;
}

.facts.compact > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}

.facts.compact dd {
  margin: 0;
  text-align: right;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.pager a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.pager-next {
  margin-left: auto;
  text-align: right;
}

.pager-dir {
  color: var(--muted);
  font-size: var(--step--1);
}

.pager-name {
  font-size: var(--step-1);
  font-weight: 600;
}

.pager a:hover .pager-name {
  color: var(--accent);
}

/* Homelab */

.topology {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}

.topology-scroll {
  overflow-x: auto;
}

.topology-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.topo-title {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
}

.topo-sub {
  fill: var(--muted);
  font-family: var(--font);
  font-size: 13px;
}

.topo-link {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.25;
}

.topo-link.dashed {
  stroke-dasharray: 4 4;
}

.topology figcaption {
  max-width: 44rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: var(--step--1);
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc {
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.svc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.svc-head h3 {
  font-size: var(--step-1);
}

.svc-role {
  color: var(--muted);
  font-size: var(--step--1);
}

.svc-desc {
  margin-top: 0.6rem;
  color: var(--ink-soft);
}

.svc-meta {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: var(--step--1);
}

/* Status page */

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 1rem;
  font-size: var(--step-1);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
}

.sse:empty {
  display: none;
}

.error-banner {
  max-width: 42rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--down);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--step--1);
  overflow-wrap: anywhere;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr));
  gap: 1rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}

.metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.metric-head h2 {
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 500;
}

.metric-now {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chart-wrap {
  position: relative;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 7.5rem;
  overflow: visible;
}

.chart-grid {
  stroke: var(--rule);
  stroke-dasharray: 2 4;
}

.chart-base {
  stroke: var(--rule-strong);
}

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-area {
  fill: var(--accent-soft);
}

.chart-dot {
  fill: var(--accent);
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 1rem;
  color: var(--muted);
  font-size: var(--step--1);
  text-align: center;
}

.metric-range {
  color: var(--muted);
  font-size: var(--step--1);
}

.metric-facts .facts {
  margin-top: auto;
  font-size: var(--step--1);
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.two-up h2 {
  margin-bottom: 0.9rem;
}

.two-up h2.spaced {
  margin-top: 2.5rem;
}

@media (max-width: 820px) {
  .two-up {
    grid-template-columns: 1fr;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.table th {
  padding: 0 0.75rem 0.5rem 0;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
}

.table td {
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-top: 1px solid var(--rule);
  vertical-align: baseline;
}

.table td:first-child {
  font-weight: 600;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list > li {
  padding-block: 0.65rem;
  border-top: 1px solid var(--rule);
}

.alert p {
  margin-top: 0.3rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.events li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  font-size: var(--step--1);
}

.dash-list {
  columns: 2 16rem;
  column-gap: 2.5rem;
}

.dash-list li {
  break-inside: avoid;
}

.setup {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}

.setup summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

.setup-body {
  padding: 0 1.25rem 1.5rem;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1.5rem;
}

pre {
  margin: 0.5rem 0 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--surface-2);
  line-height: 1.6;
}

.diagnostics {
  font-size: var(--step--1);
  color: var(--muted);
}

/* About */

.about-head {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.about-avatar {
  flex: none;
  border-radius: 50%;
}

@media (max-width: 560px) {
  .about-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.prose-wrap .prose p {
  color: var(--ink-soft);
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 1.25rem;
}

.principles > div {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.principles h3 {
  font-size: var(--step-1);
}

.principles p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.stack {
  max-width: 48rem;
  margin: 1.25rem 0 0;
}

.stack > div {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 0.25rem 1.5rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--rule);
}

.stack dt {
  font-weight: 600;
}

.stack dd {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .stack > div {
    grid-template-columns: 1fr;
  }
}

.endpoints {
  list-style: none;
  padding-left: 0 !important;
}

.not-found {
  padding-bottom: 4rem;
}

/* Footer */

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--step--1);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem 2.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* Search palette */

.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh var(--gutter) 1rem;
  background: rgba(10, 14, 12, 0.45);
}

.cmd-dialog {
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35);
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}

.cmd-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.cmd-esc {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.cmd-results {
  max-height: min(60vh, 26rem);
  overflow-y: auto;
  padding: 0.4rem;
}

.cmd-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cmd-item.selected,
.cmd-item:hover {
  background: var(--accent-soft);
}

.cmd-item-title {
  font-weight: 600;
}

.cmd-item-sub {
  color: var(--muted);
  font-size: var(--step--1);
}

.cmd-item-kind {
  flex: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.cmd-empty {
  padding: 1rem 0.75rem;
  color: var(--muted);
}

/* One deliberate moment: the server trace sweeps in on first load. */
@media (prefers-reduced-motion: no-preference) {
  .live .trace-svg {
    animation: sweep 1.4s cubic-bezier(0.35, 0.6, 0.2, 1) 0.1s both;
  }
}

@keyframes sweep {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
