.gm {
  --gm-line: rgba(217, 219, 224, .14);
  --gm-wash: rgba(246, 242, 236, .04);
  position: relative;
  max-width: 68rem;
  margin: 1.5rem auto 0;
  padding: 1.15rem clamp(1.2rem, 2.8vw, 2rem) .7rem;
  border: 1px solid rgba(177, 177, 191, .24);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 50% 130% at 16% 0%, rgba(102, 84, 147, .34), transparent 74%),
    radial-gradient(ellipse 44% 130% at 88% 100%, rgba(30, 110, 106, .26), transparent 75%),
    linear-gradient(112deg, #171920, #17151d 52%, #121b1c);
  box-shadow: inset 0 1px 0 rgba(244, 224, 191, .08), 0 16px 34px -26px #000;
  scroll-margin-top: 5rem;
}
/* Echo the analysis frame's corner marks without adding another frame. */
.gm::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px solid rgba(242, 232, 213, .36);
  border-radius: 10px;
  -webkit-mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
                linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
          mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
                linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
}
@supports not ((mask: linear-gradient(#000, #000)) or (-webkit-mask: linear-gradient(#000, #000))) {
  .gm::before { display: none; }
}
.gm + .pv-chamber { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.gm [hidden] { display: none !important; }
.gm p { margin: .35rem 0; }
.gm-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "intro intro" "snapshot action";
  gap: .7rem 1.6rem;
  align-items: center;
}
.gm-intro { grid-area: intro; }
.gm-head h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: color-mix(in srgb, var(--gilt) 88%, var(--parchment));
  font: 700 13px/1.3 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.gm-head h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 170, 110, .16), transparent 65%);
}
.gm-snapshot { grid-area: snapshot; min-width: 0; }
.gm-quotes { display: flex; align-items: stretch; flex-wrap: wrap; gap: .35rem 0; }
.gm-quote {
  position: relative;
  display: grid;
  align-content: start;
  gap: .2rem;
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 14rem;
  padding: .2rem 1rem .7rem;
  border: 0;
  border-left: 1px solid var(--gm-line);
  border-radius: 0;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-base) var(--ease);
}
.gm-quote:nth-child(1 of :not([hidden])) { padding-left: 0; border-left: 0; }
.gm-quote::after {
  content: "";
  position: absolute;
  left: 1rem;
  bottom: 0;
  width: 1.75rem;
  height: 2px;
  background: transparent;
  transition: background-color var(--dur-base) var(--ease), width var(--dur-base) var(--ease);
}
.gm-quote:nth-child(1 of :not([hidden]))::after { left: 0; }
.gm-quote span {
  color: #e4c997;
  font: 700 .84rem/1.25 var(--display);
  letter-spacing: .05em;
}
.gm-quote strong {
  color: var(--parchment);
  font: 700 clamp(1.15rem, 2vw, 1.42rem)/1.18 var(--display);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 16px rgba(155, 180, 202, .18);
}
.gm-quote small { color: var(--fg-dim); font-size: .73rem; line-height: 1.35; }
.gm-quote time { white-space: nowrap; }
.gm-quote:hover, .gm-quote[aria-pressed="true"] {
  color: var(--parchment);
  background: radial-gradient(ellipse at 32% 70%, rgba(121, 147, 166, .12), transparent 70%);
}
.gm-quote:hover::after { background: var(--gilt-soft); }
.gm-quote[aria-pressed="true"]::after {
  width: 2.5rem;
  background: linear-gradient(90deg, #d7b477, #8db9ad);
}
.gm-more {
  margin-top: .35rem;
  padding: .25rem 0;
  border: 0;
  background: transparent;
  color: var(--fg-dim);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
.gm-more:hover { color: var(--parchment); }
.gm :is(button, summary, select, a):focus-visible { outline: 2px solid var(--parchment); outline-offset: 3px; }
.gm-action {
  grid-area: action;
  display: grid;
  justify-items: end;
  gap: .2rem;
  text-align: right;
}
.gm-buy {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.6rem;
  padding: .28rem .3rem .28rem .85rem;
  border: 1px solid rgba(222, 195, 147, .43);
  border-radius: 10px;
  background: linear-gradient(180deg, #64533e, #3c322b);
  color: var(--parchment);
  box-shadow: inset 0 1px 0 rgba(255, 244, 222, .18), 0 2px 0 #211d1a,
    0 10px 24px -14px rgba(233, 193, 123, .45);
  font: 650 .83rem/1.2 var(--display);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease);
}
.gm-buy::after {
  content: "↗";
  display: grid;
  place-items: center;
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 6px;
  background: rgba(23, 21, 23, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  font-size: 1rem;
}
.gm-buy:hover {
  color: var(--parchment);
  border-color: var(--gilt);
  box-shadow: inset 0 1px 0 rgba(255, 244, 222, .2), 0 3px 0 #211d1a,
    0 12px 26px -12px rgba(233, 193, 123, .55);
  transform: translateY(-1px);
  text-decoration: none;
}
.gm-affiliate { color: var(--fg-dim); font-size: .75rem; line-height: 1.4; }
.gm-tools { margin-top: .55rem; border-top: 1px solid var(--gm-line); }
.gm-tools summary { padding-block: .55rem .15rem; color: var(--fg-dim); cursor: pointer; font-size: .8rem; }
.gm-tools summary:hover { color: var(--parchment); }
.gm-controls { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .75rem 0 .5rem; }
.gm-controls label { display: flex; align-items: center; gap: .4rem; font-size: .84rem; }
.gm-note { color: var(--fg-dim); font-size: .78rem; line-height: 1.5; }
.gm select {
  padding: .4rem;
  border: 1px solid var(--gm-line);
  border-radius: .45rem;
  background: var(--gm-wash);
  color: inherit;
  font: inherit;
}
.gm select option { color: #161a24; background: white; }
.gm-reading { font-size: .87rem; }
.gm-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gm-books h3 { font-size: .92rem; margin: .8rem 0 .35rem; }
.gm-books ul { list-style: none; padding: 0; margin: .35rem 0; font-size: .86rem; }
.gm-books li { padding: .25rem 0; }
@media (max-width: 740px) {
  .gm { padding: 1rem 1rem .7rem; }
  .gm-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "snapshot" "action";
    gap: .65rem;
  }
  .gm-action { display: flex; align-items: center; gap: .75rem; text-align: left; }
  .gm-buy { min-height: 2.25rem; }
  .gm-quote { flex: 1 1 30%; padding-inline: .65rem; }
  .gm-quote::after { left: .65rem; }
}
@media (max-width: 480px) {
  .gm-books { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 380px) {
  .gm { padding-block: .65rem .5rem; }
  .gm-head { gap: .4rem; }
  .gm-action { flex-wrap: wrap; gap: .35rem; }
  .gm-buy { gap: .4rem; padding-left: .6rem; font-size: .8rem; }
  .gm-buy::after { width: 1.5rem; height: 1.5rem; }
  .gm-quote { padding-inline: .35rem; }
  .gm-quote::after { left: .35rem; }
  .gm-quote strong { font-size: clamp(.875rem, 5vw, 1rem); }
}
@media (prefers-reduced-motion: reduce) {
  .gm-quote, .gm-quote::after, .gm-buy { transition: none; }
}
