@layer zw-reset, zw-tokens, zfb-hi, base, components;
@layer zw-reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: currentColor;
  }
  html {
    line-height: 1.5;
    font-family: ui-sans-serif, system-ui, sans-serif;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
  }
  body {
    line-height: inherit;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    text-decoration: inherit;
  }
  b,
  strong {
    font-weight: bolder;
  }
  code,
  kbd,
  samp,
  pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1em;
  }
  ol,
  ul,
  menu {
    list-style: none;
  }
  button,
  input,
  optgroup,
  select,
  textarea {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
  }
  button,
  input:where([type="button"], [type="reset"], [type="submit"]) {
    background-color: transparent;
    background-image: none;
  }
  textarea {
    resize: vertical;
  }
  img,
  svg,
  video,
  canvas,
  audio,
  iframe,
  embed,
  object {
    display: block;
    vertical-align: middle;
  }
  img,
  video {
    max-width: 100%;
    height: auto;
  }
  table {
    border-collapse: collapse;
    border-color: inherit;
    text-indent: 0;
  }
  summary {
    display: list-item;
  }
  hr {
    height: 0;
    border-top-width: 1px;
  }
}
:root {
  --color-bg: #f7f8f5;
  --color-surface: #fff;
  --color-ink: #202521;
  --color-muted: #64716a;
  --color-border: #d8ded6;
  --color-border-strong: #bbc6bd;
  --color-accent: #0f766e;
  --color-accent-strong: #0a5f59;
  --color-warm: #a15c00;
  --color-danger: #b42318;
  --color-focus: #2563eb;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  background-color: #0000;
}

button {
  appearance: button;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
}

small {
  font-size: 80%;
}

sub, sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

hr {
  color: inherit;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-ink);
}

a {
  color: var(--color-accent-strong);
}

button, input {
  font: inherit;
}

button {
  min-height: 2.5rem;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-accent);
  color: #fff;
  padding: .45rem .85rem;
  font-weight: 650;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-focus), transparent 55%);
  outline-offset: 2px;
}

.button-secondary {
  border-color: var(--color-border-strong);
  background: #fff;
  color: var(--color-ink);
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #fffefb;
}

.header-inner, .site-main {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  color: var(--color-ink);
  font-size: 1rem;
  font-weight: 760;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  font-size: .925rem;
}

.site-nav a {
  text-decoration: none;
}

.site-main {
  padding-block: 1.75rem 2.5rem;
}

.page-heading, .not-found {
  max-width: 760px;
  margin-block-end: 1.25rem;
}

.eyebrow {
  margin: 0 0 .35rem;
  color: var(--color-accent-strong);
  font-size: .78rem;
  font-weight: 760;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-block-start: 0;
}

h1 {
  max-width: 820px;
  margin-block-end: .5rem;
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  margin-block-end: .15rem;
  font-size: 1rem;
}

h3 {
  margin-block-end: .35rem;
  font-size: 1rem;
  line-height: 1.25;
}

.page-heading p:not(.eyebrow), .not-found p:not(.eyebrow) {
  color: var(--color-muted);
  font-size: 1rem;
}

.api-console {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 1px 2px #20252114;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: end;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: #fbfcf9;
}

.toolbar label {
  display: grid;
  gap: .35rem;
  color: var(--color-muted);
  font-size: .8rem;
  font-weight: 700;
}

.toolbar input {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  color: var(--color-ink);
  padding: .5rem .65rem;
}

.toolbar-actions, .pager {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.error-note {
  margin: 0;
  padding: .75rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-danger), transparent 75%);
  background: #fff5f3;
  color: var(--color-danger);
  font-weight: 650;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--color-border);
}

.metric-strip div {
  min-width: 0;
  padding: .85rem 1rem;
  border-right: 1px solid var(--color-border);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip span {
  display: block;
  color: var(--color-muted);
  font-size: .78rem;
  font-weight: 700;
}

.metric-strip strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
}

.result-panel {
  min-width: 0;
  background: #fff;
}

.panel-header {
  display: flex;
  min-height: 4.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.panel-header p {
  margin: 0;
  color: var(--color-muted);
  font-size: .86rem;
}

.item-list {
  display: grid;
  gap: .75rem;
  min-height: 12rem;
  margin: 0;
  padding: 1rem;
  list-style: none;
}

.item-card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: .85rem;
  background: #fffefb;
}

.item-card p {
  color: var(--color-muted);
  font-size: .9rem;
}

.item-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-block-end: .55rem;
  color: var(--color-muted);
  font-size: .78rem;
  font-weight: 720;
}

.status {
  border-radius: 999px;
  padding: .1rem .45rem;
  text-transform: uppercase;
}

.status--ready {
  background: #e2f6ee;
  color: #0b6b52;
}

.status--review {
  background: #fff2d6;
  color: var(--color-warm);
}

.status--draft {
  background: #ecefec;
  color: #525c55;
}

.item-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .75rem;
  margin: .75rem 0;
}

.item-facts div {
  min-width: 0;
}

.item-facts dt {
  color: var(--color-muted);
  font-size: .72rem;
  font-weight: 720;
}

.item-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: .86rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag-row span {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .1rem .45rem;
  color: var(--color-muted);
  font-size: .76rem;
}

.match-terms {
  margin: .65rem 0 0;
  color: var(--color-accent-strong);
  font-size: .82rem;
  font-weight: 650;
}

.text-link {
  font-weight: 700;
}

@media (width <= 860px) {
  .toolbar, .result-grid, .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .metric-strip div:last-child {
    border-bottom: 0;
  }
}

@media (width <= 620px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: .9rem;
  }

  h1 {
    font-size: 1.55rem;
  }

  .toolbar-actions, .pager {
    width: 100%;
  }

  .toolbar-actions button, .pager button {
    flex: 8rem;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-facts {
    grid-template-columns: 1fr;
  }
}

