* {
  box-sizing: border-box;
}

:root {
  --paper: #f7f8f4;
  --surface: #ffffff;
  --surface-warm: #fbfbf6;
  --ink: #172033;
  --muted: #657083;
  --line: #dce3dc;
  --blue: #163f75;
  --green: #0a9f58;
  --green-soft: #e8f6ef;
  --gold: #b98b1f;
  --shadow: rgba(20, 38, 60, 0.08);
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(22, 63, 117, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(10, 159, 88, 0.03) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button,
select {
  font: inherit;
}

.siteShell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 56px;
}

.siteHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 14px;
}

.brandMark {
  display: inline-flex;
  align-items: center;
}

.brandMark img {
  width: 188px;
  height: auto;
  display: block;
}

.mainSiteLink {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--surface);
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.intro {
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.metaLabel,
.institution span,
.sortControls > span,
.summaryStats dt {
  margin: 0;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--blue);
  font-size: 3.25rem;
  line-height: 0.96;
}

.summaryStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 520px);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.summaryStats div {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

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

.summaryStats dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 800;
}

.reviewControls {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px var(--shadow);
}

.sortControls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

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

.sortGroup button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.sortGroup button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: #0a5d39;
  font-weight: 800;
}

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

.reviewCard {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 38px var(--shadow);
}

.reviewMeta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.reviewMeta h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.12;
}

.institution {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.institution span {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
}

.ratingBlock {
  min-width: 185px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-warm);
  text-align: right;
}

.stars {
  display: block;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.stars span {
  color: #d9d0bd;
}

.ratingBlock strong,
.ratingBlock time {
  display: block;
  margin-top: 6px;
}

.ratingBlock strong {
  font-size: 0.94rem;
}

.ratingBlock time {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.reviewText p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.55;
}

.reviewText p:last-child {
  margin-bottom: 0;
}

.promptedAnswer {
  margin-top: 12px;
}

.answerPrompt {
  margin-bottom: 5px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.productNotes {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.productNotes h3 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 1rem;
}

.productNote {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-warm);
}

.productNote:last-child {
  margin-bottom: 0;
}

.productNote div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.productCode,
.productRating {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.productCode {
  background: var(--blue);
  color: white;
}

.productRating {
  background: var(--green-soft);
  color: #0a5d39;
}

.productNote p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.productDescription::before {
  content: ": ";
}

.productNote a {
  font-weight: 800;
}

@media (max-width: 860px) {
  .siteShell {
    width: min(100% - 24px, 680px);
    padding-bottom: 36px;
  }

  .siteHeader,
  .reviewControls,
  .reviewMeta {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .brandMark img {
    width: 170px;
  }

  h1 {
    font-size: 2.65rem;
  }

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

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

  .summaryStats div {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

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

  .sortGroup {
    justify-content: flex-start;
  }

  .sortControls {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .ratingBlock {
    min-width: 0;
    text-align: left;
  }
}
