:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #637067;
  --line: #dfe6e1;
  --accent: #167a5b;
  --accent-strong: #0f5f47;
  --blue: #2456a6;
  --shadow: 0 14px 40px rgba(26, 39, 32, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.4fr);
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  background: #18372d;
}

.mark svg,
.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark svg {
  color: #d8fff0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

.brand p,
.statusbar,
.icon-info span,
dd {
  color: var(--muted);
}

.search {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 112px 48px;
  gap: 10px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 44px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfb;
  color: var(--ink);
}

.field input:focus {
  outline: 3px solid rgba(22, 122, 91, 0.16);
  border-color: var(--accent);
}

.icon-button,
.nav-button,
.copy-button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
}

.icon-button:hover,
.nav-button:hover,
.copy-button:hover {
  background: var(--accent-strong);
}

.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 2px;
  font-size: 14px;
}

.statusbar a,
.nav-button {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.nav-button {
  justify-self: end;
  padding: 12px 16px;
  color: #fff;
}

#meta:not(:empty)::before {
  content: " / ";
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 12px;
}

.icon-card,
.empty,
.doc-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.icon-card {
  display: grid;
  grid-template-rows: 128px minmax(56px, auto) 40px;
  overflow: hidden;
}

.icon-preview {
  width: 100%;
  height: 128px;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
  cursor: pointer;
}

.icon-preview img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.icon-info {
  min-width: 0;
  padding: 10px;
}

.icon-info strong,
.icon-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-info strong {
  font-size: 14px;
}

.icon-info span {
  margin-top: 4px;
  font-size: 12px;
}

.copy-button {
  height: 40px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
}

.empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.docs .toolbar {
  grid-template-columns: 1fr auto;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.doc-grid article {
  padding: 18px;
}

.doc-grid h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

pre {
  overflow-x: auto;
  padding: 12px;
  margin: 10px 0;
  background: #17201b;
  color: #eafff7;
  border-radius: 8px;
  font-size: 13px;
}

dl {
  margin: 0;
}

dt {
  margin-top: 12px;
  font-weight: 700;
}

dd {
  margin: 3px 0 0;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .toolbar,
  .docs .toolbar,
  .search,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .search {
    align-items: stretch;
  }

  .icon-button {
    width: 100%;
  }

  .nav-button {
    justify-self: stretch;
    text-align: center;
  }

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