body.query-page,
body.query-summary-page {
  background:
    radial-gradient(circle at 14% 10%, rgba(192, 40, 45, 0.07), transparent 22%),
    radial-gradient(circle at 82% 6%, rgba(205, 169, 124, 0.16), transparent 18%),
    linear-gradient(180deg, #fffaf8 0%, #f9f0ee 38%, #f6efee 100%);
  color: #231918;
}

body.modal-open {
  overflow: hidden;
}

.query-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 0.85rem;
  overflow-y: auto;
}

.query-modal[hidden] {
  display: none;
}

.query-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 20, 19, 0.38);
  backdrop-filter: blur(8px);
}

.query-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 31rem);
  padding: 1.4rem 1.4rem 1.1rem;
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.96), rgba(250, 243, 240, 0.96));
  box-shadow: 0 24px 80px rgba(44, 28, 25, 0.22);
  text-align: center;
  max-height: calc(100vh - 1.7rem);
  overflow-y: auto;
}

.query-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: #6a4845;
  cursor: pointer;
}

.query-modal-badge {
  position: relative;
  width: 3.7rem;
  height: 3.7rem;
  margin: 0 auto 0.7rem;
}

.query-modal-badge-core {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(158, 47, 47, 0.24);
  color: #9e2f2f;
  font-size: 1.3rem;
  background: rgba(255, 252, 249, 0.8);
}

.query-modal-badge-lock {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #fffaf8;
  color: #9e2f2f;
  box-shadow: 0 8px 20px rgba(61, 37, 34, 0.12);
}

.query-modal-dialog h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.85rem, 2.7vw, 2.5rem);
  line-height: 0.94;
  color: #231918;
}

.query-modal-intro {
  margin: 0.35rem auto 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(62, 44, 42, 0.68);
}

.query-modal-price {
  margin: 0.9rem 0 0.8rem;
  padding: 0.7rem 0.8rem;
  border-block: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(244, 241, 234, 0.72);
}

.query-modal-price-label {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(91, 64, 62, 0.8);
}

.query-modal-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.18rem;
}

.query-modal-price-row strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
  color: #9e2f2f;
}

.query-modal-price-row span {
  font-family: "Hanken Grotesk", sans-serif;
  color: rgba(91, 64, 62, 0.72);
  font-size: 0.78rem;
}

.query-modal-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.query-modal-profiles {
  margin-top: 0.8rem;
  padding: 0.7rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 250, 247, 0.82);
  text-align: left;
}

.query-modal-profiles[hidden] {
  display: none;
}

.query-modal-profiles-head {
  display: block;
}

.query-modal-profiles-label {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(91, 64, 62, 0.8);
}

.query-modal-profiles-head p,
.query-modal-profile-empty {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(62, 44, 42, 0.78);
}

.query-modal-profile-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.query-modal-profile-option {
  display: grid;
  grid-template-columns: 1.15rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  padding: 0.6rem 0.65rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
}

.query-modal-profile-option input {
  margin-top: 0.2rem;
  accent-color: #9e2f2f;
}

.query-modal-profile-copy {
  display: grid;
  gap: 0.18rem;
}

.query-modal-profile-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.query-modal-profile-title-row strong {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.85rem;
  color: #231918;
}

.query-modal-profile-meta {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.76rem;
  line-height: 1.3;
  color: rgba(62, 44, 42, 0.76);
}

.query-modal-profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(158, 47, 47, 0.08);
  color: #9e2f2f;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.query-modal-actions[hidden],
.query-modal-login[hidden] {
  display: none;
}

.query-modal-confirm,
.query-modal-cancel,
.query-modal-login-submit {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border: 0;
  cursor: pointer;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.query-modal-confirm,
.query-modal-login-submit {
  background: linear-gradient(180deg, #9e2f2f 0%, #8d2626 100%);
  color: #fffaf8;
}

.query-modal-cancel {
  border: 1px solid rgba(152, 107, 93, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #5f4442;
}

.query-modal-login {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(152, 107, 93, 0.12);
  text-align: left;
}

.query-modal-login-head h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  line-height: 1.05;
  color: #231918;
}

.query-modal-login-head p {
  margin: 0.55rem 0 0;
  font-family: "Literata", serif;
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(62, 44, 42, 0.8);
}

.query-modal-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.query-modal-login-field {
  display: grid;
  gap: 0.45rem;
}

.query-modal-login-form label span {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(91, 64, 62, 0.82);
}

.query-modal-login-form input {
  width: 100%;
  padding: 0.92rem 0.95rem;
  border: 1px solid rgba(152, 107, 93, 0.18);
  background: rgba(255, 255, 255, 0.78);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1rem;
  color: #231918;
}

.query-modal-login-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.query-modal-login-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.query-modal-login-links a {
  color: #8f1118;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.88rem;
  text-decoration: none;
}

.query-modal-login-message {
  grid-column: 1 / -1;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: rgba(255, 250, 248, 0.9);
  font-family: "Literata", serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(62, 44, 42, 0.84);
}

.query-modal-login-message[data-error="true"] {
  border-color: rgba(143, 17, 24, 0.22);
  color: #8f1118;
}

.query-modal-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.7rem;
  color: rgba(91, 64, 62, 0.66);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.72rem;
}

.query-modal-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.query-modal-trust-divider {
  width: 1px;
  height: 1rem;
  background: rgba(152, 107, 93, 0.18);
}

.query-modal-google-submit {
  width: 100%;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(152, 107, 93, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #5f4442;
  cursor: pointer;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.query-main,
.query-summary-main {
  width: min(1320px, calc(100vw - 72px));
  margin: 0 auto;
  padding: 8.75rem 0 5.5rem;
}

.query-summary-main {
  width: min(1140px, calc(100vw - 80px));
  padding-top: 7.2rem;
}

.query-kicker,
.query-summary-eyebrow,
.query-result-eyebrow {
  margin: 0 0 0.75rem;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8f1118;
}

.query-summary-eyebrow,
.query-result-eyebrow {
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.query-hero {
  display: grid;
  gap: 2.75rem;
  margin-bottom: 5.5rem;
}

.query-hero-copy {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.query-hero-copy h1,
.query-summary-hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.4rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: #6d0c12;
}

.query-summary-hero h1 {
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.query-lede,
.query-summary-hero p {
  max-width: 46rem;
  margin: 1.5rem auto 0;
  font-family: "Literata", serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(52, 36, 34, 0.82);
}

.query-summary-hero p {
  max-width: 38rem;
  margin-top: 0.9rem;
  font-size: 0.96rem;
  line-height: 1.65;
}

.query-form-card {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  padding: 2.25rem 2.3rem 2rem;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 249, 246, 0.92), rgba(247, 238, 236, 0.94));
  border: 1px solid rgba(152, 107, 93, 0.12);
  box-shadow:
    0 24px 60px rgba(107, 45, 37, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.query-form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 38%),
    radial-gradient(circle at top right, rgba(190, 147, 101, 0.13), transparent 22%);
  pointer-events: none;
}

.query-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
}

.query-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}

.query-field {
  display: grid;
  gap: 0.7rem;
}

.query-field span {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5b403e;
}

.query-field input[type="date"],
.query-field input[type="time"],
.query-location-row input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(35, 25, 24, 0.34);
  background: transparent;
  padding: 0.72rem 0;
  border-radius: 0;
  font-family: "Literata", serif;
  font-size: 1.1rem;
  color: #231918;
}

.query-field input:focus,
.query-location-row input:focus {
  outline: none;
  border-bottom-color: #8f1118;
}

.query-location-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(35, 25, 24, 0.34);
}

.query-location-row i {
  color: rgba(91, 64, 62, 0.8);
  font-size: 0.95rem;
}

.query-location-row input {
  border-bottom: 0;
}

.query-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.query-sex-group {
  display: grid;
  gap: 0.95rem;
  flex: 1 1 31rem;
}

.query-sex-group p {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5b403e;
}

.query-pill-row {
  display: flex;
  gap: 0.95rem;
  flex-wrap: wrap;
}

.query-pill {
  position: relative;
}

.query-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.query-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 7.25rem;
  padding: 0.92rem 1.15rem;
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: rgba(255, 255, 255, 0.62);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #513b39;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.query-pill input:checked + span {
  background: #8f1118;
  border-color: #8f1118;
  color: #fff7f5;
}

.query-switch {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.15rem;
}

.query-switch-copy {
  display: grid;
  gap: 0.2rem;
  text-align: right;
}

.query-switch-copy strong {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1rem;
  color: #231918;
}

.query-switch-copy span {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(91, 64, 62, 0.74);
}

.query-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.query-switch-track {
  position: relative;
  width: 3.2rem;
  height: 1.82rem;
  border-radius: 999px;
  background: rgba(143, 17, 24, 0.25);
  transition: background 160ms ease;
}

.query-switch-track::after {
  content: "";
  position: absolute;
  top: 0.22rem;
  left: 0.22rem;
  width: 1.38rem;
  height: 1.38rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(42, 24, 21, 0.18);
  transition: transform 160ms ease;
}

.query-switch input:checked + .query-switch-track {
  background: #8f1118;
}

.query-switch input:checked + .query-switch-track::after {
  transform: translateX(1.38rem);
}

.query-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  border: 0;
  border-radius: 0.35rem;
  padding: 1.25rem 1.6rem;
  background: linear-gradient(180deg, #8f1118 0%, #790d14 100%);
  box-shadow: 0 18px 35px rgba(143, 17, 24, 0.16);
  color: #fff9f7;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  cursor: pointer;
}

.query-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(143, 17, 24, 0.22);
  filter: brightness(1.02);
}

.query-archive {
  padding: 4.5rem 0 1rem;
  border-top: 1px solid rgba(152, 107, 93, 0.14);
}

.query-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.query-section-head h2,
.query-summary-card h2,
.query-summary-panel h2,
.query-empty-archive h3,
.query-archive-lock-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3.3vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: #231918;
}

.query-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.2rem;
  border: 1px solid rgba(152, 107, 93, 0.16);
  color: #5d4240;
  text-decoration: none;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.query-view-all:hover {
  color: #8f1118;
  border-color: rgba(143, 17, 24, 0.24);
  transform: translateY(-1px);
}

.query-archive-frame {
  position: relative;
}

.query-archive-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 30rem;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 255, 255, 0.4);
}

.query-archive-panel {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 30rem;
  padding: 1.9rem 1.7rem;
  border: 0;
  border-right: 1px solid rgba(152, 107, 93, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 240, 238, 0.94)),
    radial-gradient(circle at top left, rgba(212, 174, 123, 0.12), transparent 32%);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: transform 220ms ease, filter 220ms ease;
}

.query-archive-panel:last-child {
  border-right: 0;
}

.query-archive-panel:hover {
  transform: translateY(-2px);
}

.query-archive-panel img {
  position: absolute;
  inset: auto -4% 0 auto;
  width: 82%;
  height: 88%;
  object-fit: contain;
  opacity: 0.2;
  filter: grayscale(0.18);
  transition: transform 400ms ease, opacity 220ms ease;
}

.query-archive-panel:hover img {
  transform: scale(1.04);
  opacity: 0.32;
}

.query-archive-panel[data-blurred="true"] img,
.query-archive-panel[data-blurred="true"] .query-archive-copy {
  filter: blur(2.8px);
}

.query-archive-copy {
  position: relative;
  z-index: 1;
  max-width: 14rem;
  display: grid;
  gap: 0.7rem;
}

.query-archive-date {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b28c2f;
}

.query-archive-copy h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 2.3vw, 2.95rem);
  line-height: 0.94;
  color: #7d1017;
}

.query-archive-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.4rem;
}

.query-archive-meta span {
  display: inline-flex;
  align-items: center;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(108, 79, 70, 0.82);
  white-space: nowrap;
}

.query-archive-meta span + span::before {
  content: "•";
  margin-right: 0.55rem;
  color: rgba(178, 140, 47, 0.82);
}

.query-archive-copy p {
  margin: 0;
  font-family: "Literata", serif;
  font-size: 0.91rem;
  line-height: 1.56;
  color: rgba(62, 44, 42, 0.68);
  display: -webkit-box;
  min-height: 4.68em;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.query-archive-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(252, 246, 244, 0.42), rgba(252, 246, 244, 0.78));
  backdrop-filter: blur(2px);
}

.query-archive-lock[hidden] {
  display: none;
}

.query-archive-lock-card,
.query-empty-archive {
  max-width: 33rem;
  padding: 2rem 2.15rem;
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: rgba(255, 252, 251, 0.9);
  box-shadow: 0 20px 38px rgba(96, 48, 43, 0.08);
  text-align: center;
}

.query-archive-lock-card p,
.query-empty-archive p {
  margin: 1rem 0 0;
  font-family: "Literata", serif;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(62, 44, 42, 0.78);
}

.query-archive-lock-link,
.query-empty-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.4rem;
  padding: 0.9rem 1.3rem;
  border: 1px solid rgba(143, 17, 24, 0.15);
  text-decoration: none;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8f1118;
  background: rgba(255, 255, 255, 0.72);
}

.query-empty-archive {
  margin: 0 auto;
}

body.query-modal-open {
  overflow: hidden;
}

.query-library-modal[hidden] {
  display: none;
}

.query-library-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.query-library-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 24, 23, 0.42);
  backdrop-filter: blur(12px);
}

.query-library-shell {
  position: relative;
  width: min(1320px, calc(100vw - 72px));
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  overflow: auto;
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: linear-gradient(180deg, rgba(255, 252, 250, 0.97), rgba(252, 244, 241, 0.98));
  box-shadow: 0 32px 80px rgba(63, 31, 28, 0.16);
}

.query-library-close {
  position: sticky;
  top: 1.25rem;
  left: calc(100% - 4rem);
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  margin: 1.25rem 1.25rem 0 auto;
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: rgba(255, 255, 255, 0.84);
  color: #7f3f39;
  cursor: pointer;
}

.query-library-panel {
  display: grid;
  grid-template-columns: 17.5rem minmax(0, 1fr);
  gap: 1.7rem;
  padding: 1rem 1.7rem 1.85rem;
}

.query-library-panel[hidden],
.query-library-login-panel[hidden] {
  display: none;
}

.query-library-summary {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

.query-library-art {
  width: 12rem;
  height: 12rem;
  padding: 0.35rem;
  border: 1px solid rgba(178, 130, 114, 0.28);
  box-shadow: 0 14px 34px rgba(96, 48, 43, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.query-library-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.query-library-meta {
  display: grid;
  gap: 0.75rem;
}

.query-library-meta article {
  display: grid;
  gap: 0.28rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(152, 107, 93, 0.12);
}

.query-library-meta span,
.query-library-item-meta,
.query-library-login-form label span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(97, 70, 67, 0.76);
}

.query-library-meta strong {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1.24rem;
  font-weight: 600;
  color: #2a1d1b;
}

.query-library-content {
  display: grid;
  gap: 1.5rem;
}

.query-library-head {
  display: grid;
  gap: 0.8rem;
}

.query-library-head h2,
.query-library-login-head h2,
.query-library-empty h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.25rem, 3.6vw, 3.7rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: #231918;
}

.query-library-intro,
.query-library-login-head p,
.query-library-item p,
.query-library-empty p {
  margin: 0;
  font-family: "Literata", serif;
  font-size: 1rem;
  line-height: 1.82;
  color: rgba(62, 44, 42, 0.78);
}

.query-library-list {
  display: grid;
  gap: 1rem;
}

.query-library-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1.2rem;
  align-items: center;
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.query-library-item-copy {
  display: grid;
  gap: 0.7rem;
  max-width: 48rem;
}

.query-library-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.query-library-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.52rem;
  border: 1px solid rgba(143, 17, 24, 0.2);
  background: rgba(143, 17, 24, 0.04);
  color: #8f1118;
}

.query-library-item h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 2.5vw, 3rem);
  line-height: 0.98;
  color: #241917;
}

.query-library-item em {
  font-family: "Hanken Grotesk", sans-serif;
  font-style: normal;
  color: rgba(91, 64, 62, 0.7);
}

.query-library-item-side {
  display: grid;
  justify-items: end;
  gap: 1rem;
}

.query-library-item-side img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  opacity: 0.8;
}

.query-library-open,
.query-library-primary,
.query-library-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.9rem 1.35rem;
  border: 1px solid rgba(0, 86, 83, 0.75);
  background: transparent;
  color: #005653;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.query-library-open:hover,
.query-library-primary:hover,
.query-library-secondary:hover {
  transform: translateY(-1px);
}

.query-library-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #8f1118 0%, #790d14 100%);
  color: #fff9f7;
}

.query-library-unavailable {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(97, 70, 67, 0.64);
}

.query-library-login-panel {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem 1.7rem 1.85rem;
  display: grid;
  gap: 1.6rem;
}

.query-library-login-grid,
.query-library-login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.query-library-login-form {
  display: grid;
  gap: 1rem;
}

.query-library-login-form label {
  display: grid;
  gap: 0.55rem;
}

.query-library-login-form input {
  min-height: 3.35rem;
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.95rem 1rem;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 1rem;
  color: #241917;
}

.query-library-login-message {
  margin: 0;
  font-family: "Literata", serif;
  color: #8f1118;
}

.query-library-empty {
  padding: 1.8rem 1.9rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.query-back-link {
  position: fixed;
  left: 1.5rem;
  top: 8.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 30px rgba(89, 53, 47, 0.08);
  text-decoration: none;
  color: #8f1118;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.query-summary-hero {
  max-width: 38rem;
  margin: 0 auto 1rem;
  text-align: center;
}

.query-summary-layout {
  display: grid;
  gap: 0.85rem;
}

.query-summary-primary,
.query-summary-secondary {
  display: grid;
  gap: 1rem;
}

.query-summary-primary {
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.82fr);
  align-items: stretch;
}

.query-summary-secondary {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
}

.query-summary-card,
.query-summary-panel,
.query-recent-card,
.query-premium-card {
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: rgba(255, 252, 251, 0.78);
  box-shadow: 0 18px 38px rgba(96, 48, 43, 0.05);
  border-radius: 0.65rem;
}

.query-summary-card,
.query-summary-panel,
.query-recent-card {
  padding: 1.35rem;
}

.query-summary-card {
  display: grid;
  gap: 1rem;
}

.query-profile-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.query-profile-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #8f1118;
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.query-profile-title h2,
.query-recent-head h3,
.query-summary-panel h2,
.query-premium-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  line-height: 0.96;
  color: #231918;
}

.query-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.8rem;
}

.query-profile-row {
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(152, 107, 93, 0.1);
  background: rgba(255, 248, 245, 0.72);
}

.query-profile-row:last-child {
  border-bottom: 1px solid rgba(152, 107, 93, 0.1);
}

.query-profile-row label,
.query-recent-meta,
.query-summary-mini-label,
.query-premium-note {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(91, 64, 62, 0.72);
}

.query-profile-row strong,
.query-recent-item strong,
.query-summary-value {
  display: block;
  margin-top: 0.3rem;
  font-family: "Literata", serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: #231918;
}

.query-recalculate-btn,
.query-summary-cta,
.query-summary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.95rem 1.15rem;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, color 160ms ease;
}

.query-recalculate-btn,
.query-summary-cta {
  background: linear-gradient(180deg, #8f1118 0%, #790d14 100%);
  color: #fff9f7;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.query-summary-outline {
  border: 1px solid rgba(152, 107, 93, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #5d4240;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.query-recalculate-btn:hover,
.query-summary-cta:hover,
.query-summary-outline:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.query-recent-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.query-recent-list {
  display: grid;
  gap: 0.65rem;
}

.query-recent-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.68rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 247, 245, 0.8);
  text-align: left;
  cursor: pointer;
}

.query-recent-item img {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.45rem;
  background: rgba(226, 214, 212, 0.8);
}

.query-recent-item i {
  color: rgba(91, 64, 62, 0.5);
}

.query-recent-empty {
  padding: 1rem 0;
  font-family: "Literata", serif;
  color: rgba(62, 44, 42, 0.76);
  line-height: 1.8;
}

.query-summary-center {
  display: grid;
  gap: 1rem;
}

.query-summary-panel {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.query-summary-spark {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: rgba(120, 107, 101, 0.18);
  font-size: 3rem;
}

.query-summary-panel h2 {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(152, 107, 93, 0.16);
}

.query-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(152, 107, 93, 0.12);
  border-left: 1px solid rgba(152, 107, 93, 0.12);
}

.query-summary-meta {
  min-height: 6.6rem;
  padding: 1rem 1.05rem;
  border-right: 1px solid rgba(152, 107, 93, 0.12);
  border-bottom: 1px solid rgba(152, 107, 93, 0.12);
}

.query-summary-value {
  font-size: 1.08rem;
  line-height: 1.32;
}

.query-preview-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.query-preview-story,
.query-preview-traits-card {
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: linear-gradient(180deg, rgba(255, 249, 247, 0.92), rgba(249, 241, 239, 0.88));
}

.query-preview-story p {
  margin: 0.45rem 0 0;
  font-family: "Literata", serif;
  font-size: 0.92rem;
  line-height: 1.58;
  color: rgba(52, 36, 34, 0.84);
}

.query-preview-highlight {
  color: #7a4a45;
}

.query-preview-traits-card {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.query-preview-traits-copy {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(91, 64, 62, 0.74);
}

.query-preview-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.query-preview-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.44rem 0.68rem;
  border: 1px solid rgba(152, 107, 93, 0.14);
  background: rgba(255, 253, 252, 0.92);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #734946;
}

.query-summary-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.6rem;
}

.query-color-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1px solid rgba(35, 25, 24, 0.08);
}

.query-premium-card {
  position: relative;
  padding: 1.5rem;
  overflow: hidden;
  color: #fff2ec;
  background:
    linear-gradient(180deg, rgba(94, 43, 39, 0.96), rgba(112, 52, 47, 0.95)),
    radial-gradient(circle at top right, rgba(236, 194, 167, 0.15), transparent 28%);
  border-color: rgba(141, 86, 74, 0.28);
  min-height: 100%;
}

.query-premium-card::after {
  content: "";
  position: absolute;
  right: -4.2rem;
  bottom: -6rem;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(255, 196, 176, 0.12), transparent 66%);
}

.query-premium-card h2 {
  color: #ffe1d7;
  max-width: 26rem;
}

.query-premium-intro {
  max-width: 28rem;
  margin: 0.7rem 0 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 240, 234, 0.84);
}

.query-premium-benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 1.1rem 0;
}

.query-benefit {
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 226, 214, 0.12);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.query-benefit i {
  color: #ffe1d7;
  margin-top: 0.18rem;
}

.query-benefit h3 {
  margin: 0 0 0.18rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  line-height: 0.98;
  color: #fff6f2;
}

.query-benefit p {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.8rem;
  line-height: 1.42;
  color: rgba(255, 241, 236, 0.82);
}

.query-benefit-featured {
  background: rgba(255, 244, 238, 0.12);
}

.query-premium-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 214, 200, 0.1);
}

.query-summary-cta[disabled] {
  cursor: progress;
  opacity: 0.8;
}

.query-premium-note {
  color: rgba(255, 235, 230, 0.58);
}

.query-summary-message {
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 250, 248, 0.92);
  font-family: "Literata", serif;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(62, 44, 42, 0.82);
}

.query-summary-message[data-error="true"] {
  border-color: rgba(143, 17, 24, 0.2);
  color: #8f1118;
}

.query-premium-summary {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.query-paid-spotlight,
.query-paid-panel {
  border: 1px solid rgba(255, 226, 214, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.query-paid-spotlight {
  padding: 1rem 1.05rem;
}

.query-paid-spotlight strong {
  display: block;
  margin-top: 0.4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  line-height: 1.08;
  color: #fff6f2;
}

.query-paid-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.query-paid-panel {
  padding: 0.9rem 0.95rem;
}

.query-paid-panel p {
  margin: 0.45rem 0 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.84rem;
  line-height: 1.48;
  color: rgba(255, 241, 236, 0.84);
}

.query-summary-loading {
  max-width: 34rem;
  margin: 5rem auto 0;
  padding: 2.2rem;
  border: 1px solid rgba(152, 107, 93, 0.12);
  background: rgba(255, 252, 251, 0.86);
  text-align: center;
}

.query-processing-main {
  width: min(1180px, calc(100vw - 96px));
  margin: 0 auto;
  padding: 72px 0 128px;
}

.query-processing-hero {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}

.query-processing-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(3.2rem, 5vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.query-processing-intro {
  margin: 0 auto;
  max-width: 640px;
  color: rgba(58, 33, 28, 0.76);
  font-size: 1.02rem;
  line-height: 1.8;
}

.query-processing-card {
  position: relative;
  display: grid;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 48px;
  border: 1px solid rgba(170, 136, 120, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9), transparent 34%),
    linear-gradient(180deg, rgba(255, 251, 247, 0.97), rgba(253, 247, 242, 0.98));
  box-shadow: 0 34px 80px rgba(97, 53, 40, 0.11);
  overflow: hidden;
}

.query-processing-card::before,
.query-processing-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.28;
}

.query-processing-card::before {
  top: -10%;
  right: -6%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(220, 197, 180, 0.22), transparent 65%);
}

.query-processing-card::after {
  left: -12%;
  bottom: -18%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(180, 51, 51, 0.08), transparent 68%);
}

.query-processing-orbit {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto;
}

.query-processing-orbit-ring,
.query-processing-orbit-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.query-processing-orbit-ring {
  border: 1px solid rgba(143, 17, 24, 0.2);
  animation: query-orbit-spin 9s linear infinite;
}

.query-processing-orbit-ring::before,
.query-processing-orbit-ring::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(143, 17, 24, 0.18);
}

.query-processing-orbit-ring::before {
  top: 8px;
  left: calc(50% - 6px);
}

.query-processing-orbit-ring::after {
  bottom: 8px;
  left: calc(50% - 6px);
}

.query-processing-orbit-core {
  display: grid;
  place-items: center;
  inset: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 242, 236, 0.96));
  border: 1px solid rgba(143, 17, 24, 0.16);
  color: #8f1118;
  font-size: 1.4rem;
  box-shadow: 0 18px 40px rgba(143, 17, 24, 0.08);
}

.query-processing-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.query-processing-copy h2 {
  margin: 12px auto 16px;
  max-width: 620px;
  font-size: clamp(2.5rem, 4vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.query-processing-copy p:last-child {
  margin: 0 auto;
  max-width: 560px;
  color: rgba(58, 33, 28, 0.78);
  font-size: 1rem;
  line-height: 1.8;
}

.query-processing-status {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.query-processing-progress {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(143, 17, 24, 0.08);
  overflow: hidden;
}

.query-processing-progress span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b22e2f, #d66a66);
  box-shadow: 0 0 20px rgba(178, 46, 47, 0.26);
  transition: width 280ms ease;
}

.query-processing-status-line {
  margin: 0;
  text-align: center;
  color: rgba(58, 33, 28, 0.68);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.query-processing-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.query-processing-primary,
.query-processing-secondary {
  min-width: 214px;
  border-radius: 999px;
}

.query-processing-primary {
  justify-content: center;
  text-decoration: none;
}

.query-processing-secondary {
  padding: 14px 24px;
  border: 1px solid rgba(143, 17, 24, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #6a1b1b;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.query-processing-secondary:hover {
  border-color: rgba(143, 17, 24, 0.3);
  transform: translateY(-1px);
}

@keyframes query-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .query-summary-primary,
  .query-summary-secondary {
    grid-template-columns: 1fr;
  }

  .query-back-link {
    position: static;
    margin: 1rem auto 0;
  }
}

@media (max-width: 920px) {
  .query-main,
  .query-summary-main,
  .query-processing-main {
    width: min(100vw - 32px, 1320px);
    padding-top: 7.4rem;
  }

  .query-form-grid,
  .query-summary-grid,
  .query-premium-benefits,
  .query-paid-grid,
  .query-preview-copy,
  .query-archive-stage {
    grid-template-columns: 1fr;
  }

  .query-modal-dialog {
    padding: 2rem 1.4rem 1.6rem;
    max-height: calc(100vh - 1.5rem);
  }

  .query-modal-login-form,
  .query-modal-login-actions {
    grid-template-columns: 1fr;
  }

  .query-modal-trust {
    flex-direction: column;
  }

  .query-modal-trust-divider {
    display: none;
  }

  .query-archive-stage {
    min-height: auto;
  }

  .query-archive-panel {
    min-height: 18rem;
    border-right: 0;
    border-bottom: 1px solid rgba(152, 107, 93, 0.12);
  }

  .query-archive-panel:last-child {
    border-bottom: 0;
  }

  .query-library-shell {
    width: min(calc(100vw - 24px), 1320px);
    max-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .query-library-panel,
  .query-library-item,
  .query-library-login-grid,
  .query-library-login-actions {
    grid-template-columns: 1fr;
  }

  .query-library-panel {
    padding-top: 0.6rem;
  }

  .query-library-item-side {
    justify-items: start;
  }

  .query-processing-card {
    padding: 34px 24px;
    border-radius: 28px;
  }

  .query-processing-actions {
    flex-direction: column;
  }

  .query-processing-primary,
  .query-processing-secondary {
    width: 100%;
  }
}
