:root {
  color-scheme: light;
  --background: #f6f7f9;
  --surface: #ffffff;
  --text: #20242a;
  --muted: #69717d;
  --border: #e2e5e9;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

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

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 22px 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 3px;
  font-size: clamp(25px, 4vw, 32px);
  line-height: 1.2;
}

h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.site-description,
.muted {
  color: var(--muted);
}

.site-description {
  max-width: 680px;
  margin-bottom: 0;
}

.main-content {
  padding: 22px 0 90px;
}

.notice {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 12px;
  margin-bottom: 16px;
  padding: 7px 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
}

.notice-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.notice h2 {
  flex: none;
  margin: 0;
  color: #92400e;
  font-size: 14px;
}

.notice p {
  margin-bottom: 0;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
}

.notice-link {
  flex: none;
  color: #b45309;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.notice-link:hover {
  color: #92400e;
  text-decoration: underline;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading p {
  margin-bottom: 0;
}

.search-field input {
  width: min(320px, 100%);
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 12%);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-button {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}

.category-button {
  color: var(--muted);
  background: var(--surface);
}

.category-button:hover,
.category-button.active {
  color: var(--accent);
  background: #eef4ff;
  border-color: #bfd3ff;
}

.resource-list {
  display: grid;
  gap: 6px;
}

.resource-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.resource-item:hover {
  background: #f8fbff;
  border-color: #bfd3ff;
}

.resource-name {
  margin: 0;
  font-size: 16px;
}

.resource-content {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  white-space: nowrap;
}

.resource-content > * + *::before {
  margin: 0 8px;
  color: var(--border);
  content: "/";
}

.resource-meta,
.resource-description {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.resource-description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-price {
  min-width: 76px;
  color: #dc2626;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.action-link {
  color: var(--accent);
  font-size: 14px;
  justify-self: end;
  white-space: nowrap;
}

.action-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.action-link-primary {
  font-weight: 600;
}

.empty-state {
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-bar {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgb(15 23 42 / 12%);
}

.contact-bar strong,
.contact-bar span {
  display: block;
}

.contact-bar span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin-bottom: 0;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  padding: 9px 14px;
  color: #fff;
  background: #20242a;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .site-header {
    padding: 18px 0 15px;
  }

  .notice,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .notice {
    display: flex;
    gap: 4px;
  }

  .notice-content {
    flex-wrap: wrap;
  }

  .search-field input {
    width: 100%;
  }

  .resource-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 12px;
  }

  .resource-content {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    white-space: normal;
  }

  .resource-description {
    white-space: normal;
  }

  .resource-price {
    min-width: auto;
  }

  .resource-item > .action-link {
    justify-self: end;
  }

  .contact-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    justify-content: space-between;
  }
}
