:root {
  --ink: #1e252b;
  --muted: #5a6570;
  --line: #dbe1e6;
  --paper: #ffffff;
  --wash: #f6f8f5;
  --deep: #153f3a;
  --blue: #245f9f;
  --amber: #d98b2b;
  --coral: #b94f43;
  --green: #2f7668;
  --shadow: 0 18px 45px rgba(30, 37, 43, 0.08);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 240px;
}

.brand span {
  display: grid;
  line-height: 1.2;
}

.brand strong {
  font-size: 1.08rem;
}

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

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a {
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.94rem;
}

nav a:hover,
nav a[aria-current="page"] {
  background: var(--wash);
  color: var(--deep);
}

.hero {
  background: #edf5f1;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 52px;
  padding-block: 72px;
}

.hero-copy {
  max-width: 650px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: 3.4rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.12rem;
}

.lead {
  max-width: 620px;
  color: #33414c;
  font-size: 1.15rem;
}

.hero-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 6px;
  background: var(--deep);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid var(--deep);
}

.btn:hover {
  background: #0f312d;
}

.btn.secondary {
  background: #fff;
  color: var(--deep);
}

.btn.secondary:hover {
  background: var(--wash);
}

.btn.small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.hero-covers {
  min-height: 390px;
  position: relative;
}

.hero-covers a {
  position: absolute;
  width: 44%;
  max-width: 230px;
  filter: drop-shadow(0 16px 25px rgba(30, 37, 43, 0.18));
}

.hero-covers a:nth-child(1) {
  left: 3%;
  top: 14%;
  transform: rotate(-5deg);
}

.hero-covers a:nth-child(2) {
  left: 31%;
  top: 2%;
  z-index: 2;
}

.hero-covers a:nth-child(3) {
  right: 4%;
  top: 18%;
  transform: rotate(5deg);
}

.hero-covers img,
.book-card img,
.product-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(30, 37, 43, 0.12);
  border-radius: 6px;
}

.band {
  background: var(--ink);
  color: #fff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.metrics div {
  min-height: 132px;
  padding: 28px 22px;
  background: var(--ink);
}

.metrics strong {
  display: block;
  font-size: 1.45rem;
}

.metrics span {
  color: #cbd4da;
}

.split-section,
.content-grid,
.details-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 48px;
  padding-block: 76px;
}

.split-section p,
.prose p,
.fact-panel p {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 24px;
}

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

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

.service-grid article {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.featured-grid {
  padding-bottom: 76px;
}

.book-card {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 18px;
  min-height: 310px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cover-link {
  text-decoration: none;
}

.book-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-tags a,
.footer-tags a {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.book-card h2 {
  font-size: 1rem;
  line-height: 1.22;
}

.book-card h2 a {
  text-decoration: none;
}

.authors {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.price {
  margin: 10px 0;
  color: var(--coral);
  font-weight: 850;
}

.price.large {
  font-size: 1.55rem;
}

.mini-specs {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
  font-size: 0.84rem;
}

.mini-specs div,
.product-specs div,
.inline-specs div,
.fact-panel dl div,
.scholar-panel dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
}

dt {
  color: var(--muted);
  font-weight: 650;
}

dd {
  margin: 0;
}

.page-header {
  background: #edf5f1;
  border-bottom: 1px solid var(--line);
  padding-block: 72px;
}

.page-header.compact {
  padding-block: 52px;
}

.page-header p {
  max-width: 760px;
  color: #40505a;
  font-size: 1.06rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  padding-block: 38px 76px;
}

.catalog-sidebar {
  align-self: start;
  display: grid;
  gap: 22px;
}

.catalog-sidebar section,
.catalog-search,
.fact-panel,
.scholar-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.catalog-sidebar h2,
.fact-panel h2,
.scholar-panel h2 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.catalog-search label {
  display: block;
  margin-bottom: 8px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.category-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
}

.category-pill:hover,
.category-pill.active {
  color: var(--deep);
  font-weight: 760;
}

.category-pill span {
  color: var(--green);
}

.catalog-sidebar p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.catalog-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.catalog-toolbar p {
  margin: 0;
}

.catalog-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.catalog-toolbar select {
  width: auto;
}

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

.empty-state {
  padding: 28px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.publication-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 44px;
  padding-block: 34px 66px;
  align-items: start;
}

.publication-main {
  max-width: 820px;
}

.publication-main h1 {
  max-width: 780px;
  font-size: 2.65rem;
}

.publication-main section {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.publication-main h2 {
  margin-bottom: 12px;
  font-size: 1.38rem;
}

.publication-type {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.publication-authors {
  margin: 14px 0 22px;
  color: var(--blue);
  font-size: 1.12rem;
  font-weight: 760;
}

.publication-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.publication-summary div,
.publication-sidebar dl div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
}

.abstract-block {
  font-size: 1.03rem;
}

.abstract-note {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-list a {
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--deep);
  font-size: 0.88rem;
  font-weight: 760;
  text-decoration: none;
}

.citation-box {
  padding: 16px;
  border-left: 4px solid var(--green);
  background: #f5f8f7;
  color: #2f3d43;
}

.citation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publication-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 16px;
}

.publication-cover {
  width: min(100%, 240px);
  height: auto;
  margin-inline: auto;
  border-radius: 6px;
  border: 1px solid rgba(30, 37, 43, 0.12);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.side-card h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.publication-sidebar dl {
  display: grid;
  gap: 9px;
  margin: 0;
  font-size: 0.92rem;
}

.stacked {
  display: grid;
}

.scholar-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.scholar-note code {
  color: var(--deep);
  font-size: 0.86rem;
}

.compact-related .book-card {
  min-height: 0;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(260px, 370px) minmax(0, 1fr);
  gap: 46px;
  padding-block: 30px 60px;
}

.product-cover {
  align-self: start;
}

.product-cover img {
  box-shadow: var(--shadow);
}

.stock {
  display: inline-flex;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
  font-size: 0.82rem;
}

.subtitle {
  margin: 12px 0;
  color: var(--muted);
  font-size: 1.16rem;
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 28px;
  margin: 22px 0 0;
}

.fine-print {
  color: var(--muted);
  font-size: 0.92rem;
}

.prose {
  max-width: 780px;
}

.prose h2 {
  margin: 28px 0 12px;
  font-size: 1.45rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.inline-specs,
.fact-panel dl,
.scholar-panel dl {
  display: grid;
  gap: 9px;
}

.notice {
  padding: 12px;
  border-left: 4px solid var(--amber);
  background: #fff8eb;
}

.scholar-panel {
  align-self: start;
}

.related-section {
  padding-top: 10px;
}

.redirect-page,
.not-found {
  padding-block: 80px;
}

.site-footer {
  color: #fff;
  background: var(--ink);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 36px;
  padding-block: 48px;
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer address,
.site-footer a {
  color: #dbe3e8;
}

address {
  display: grid;
  gap: 5px;
  font-style: normal;
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd4da;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 980px) {
  .nav-wrap,
  .row-heading,
  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero-grid,
  .split-section,
  .content-grid,
  .details-layout,
  .catalog-layout,
  .publication-layout,
  .product-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding-block: 48px;
  }

  .hero-covers {
    min-height: 340px;
  }

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

@media (max-width: 680px) {
  .wrap {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .site-header {
    position: static;
  }

  nav a {
    padding-inline: 8px;
  }

  .hero-covers {
    min-height: 280px;
  }

  .hero-covers a {
    max-width: 170px;
  }

  .metrics,
  .service-grid,
  .book-grid,
  .catalog-grid,
  .publication-summary,
  .product-specs {
    grid-template-columns: 1fr;
  }

  .publication-main h1 {
    font-size: 2rem;
  }

  .publication-sidebar {
    position: static;
  }

  .publication-cover {
    width: min(100%, 210px);
  }

  .book-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .book-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .mini-specs div,
  .publication-summary div,
  .publication-sidebar dl div,
  .product-specs div,
  .inline-specs div,
  .fact-panel dl div,
  .scholar-panel dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
