:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft-muted: #86868b;
  --line: rgba(29, 29, 31, 0.12);
  --paper: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --navy: #111827;
  --blue: #0071e3;
  --teal: #00a88f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
  --soft-shadow: 0 12px 34px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.3);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 700;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.market-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 32px;
  align-items: end;
  padding: 64px 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
}

.intro-actions,
.contact-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-actions {
  margin-top: 24px;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--soft-shadow);
}

.intro-stats span {
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
}

.intro-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.catalog-section,
.authors-section,
.contact-section {
  padding: 38px 0 64px;
}

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

.outline-link,
.primary-action,
.text-action,
.card-action,
.filter-button,
.dialog-close {
  min-height: 42px;
  border-radius: 8px;
}

.outline-link,
.primary-action,
.text-action,
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.outline-link,
.card-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.outline-link {
  padding: 0 16px;
}

.primary-action,
.card-action.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.2);
}

.text-action {
  padding: 0 4px;
  color: var(--blue);
}

.card-action {
  padding: 0 13px;
  cursor: pointer;
}

.outline-link:hover,
.outline-link:focus-visible,
.card-action:hover,
.card-action:focus-visible {
  border-color: rgba(0, 113, 227, 0.5);
}

.primary-action:hover,
.primary-action:focus-visible,
.card-action.primary:hover,
.card-action.primary:focus-visible {
  background: #0066cc;
  border-color: #0066cc;
}

.text-action:hover,
.text-action:focus-visible {
  color: #005bb5;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.search-field {
  display: grid;
  gap: 7px;
  min-width: 280px;
  color: var(--soft-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.search-field input:focus {
  border-color: rgba(0, 113, 227, 0.55);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 13px;
  font-weight: 800;
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 548px;
  padding: 18px;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--accent, var(--blue));
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 29, 31, 0.18);
  box-shadow: var(--shadow);
}

.cover-frame {
  width: min(214px, 82%);
  aspect-ratio: 0.707;
  margin: 6px auto 18px;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.12);
  border-radius: 8px;
  background: #eef0f4;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
}

.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-card h3 {
  margin-bottom: 8px;
}

.product-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.product-actions {
  margin-top: auto;
}

.empty-state,
.noscript-catalog {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

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

.noscript-catalog {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.noscript-catalog a {
  color: var(--blue);
  font-weight: 700;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.author-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 330px;
  padding: 22px;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.author-card img {
  width: 168px;
  height: 214px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.author-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.author-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.author-tags li {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-section p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(29, 29, 31, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.product-dialog {
  width: min(900px, calc(100% - 28px));
  max-height: min(720px, calc(100vh - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  border-color: var(--ink);
}

.dialog-content {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  padding: 30px;
}

.dialog-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef0f4;
  box-shadow: var(--soft-shadow);
}

.dialog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-copy {
  padding-right: 36px;
}

.dialog-copy p {
  color: var(--muted);
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.detail-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .market-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .authors-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .toolbar,
  .section-heading,
  .contact-section,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav,
  .filter-group,
  .contact-actions,
  .intro-actions {
    justify-content: flex-start;
  }

  .site-header {
    position: relative;
  }

  .brand span {
    white-space: normal;
  }

  .market-intro {
    padding-top: 34px;
  }

  .intro-copy {
    font-size: 18px;
  }

  .intro-stats,
  .catalog-grid,
  .authors-grid {
    grid-template-columns: 1fr;
  }

  .search-field {
    min-width: 0;
  }

  .product-card,
  .author-card,
  .dialog-content {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 0;
  }

  .cover-frame {
    width: min(210px, 84%);
  }

  .author-card img {
    width: 144px;
    height: 184px;
  }

  .dialog-copy {
    padding-right: 0;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main {
    width: min(100% - 24px, 1200px);
  }

  .main-nav,
  .filter-group {
    gap: 6px;
  }

  .main-nav a,
  .filter-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .primary-action,
  .text-action,
  .card-action {
    width: 100%;
  }

  .intro-stats span,
  .toolbar,
  .product-card,
  .author-card,
  .dialog-content {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
