:root {
  --bg: #eef1f7;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --line: rgba(180, 145, 45, 0.18);
  --text: #0b2346;
  --muted: #5e6f90;
  --brand: #0b2346;
  --brand-dark: #07182f;
  --brand-soft: #eef3ff;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --shadow: 0 18px 48px rgba(11, 35, 70, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.12), transparent 28%),
    radial-gradient(circle at right 15%, rgba(11, 35, 70, 0.14), transparent 30%),
    linear-gradient(180deg, #eef1f7 0%, #f7f8fb 42%, #edf1f8 100%);
  min-height: 100vh;
}

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 20px auto;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(244, 247, 255, 0.72);
  backdrop-filter: blur(22px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 26px;
  background: linear-gradient(90deg, #07182f 0%, #0b2346 45%, #07182f 100%);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.brand-lockup strong {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--gold);
}

.brand-lockup span {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  letter-spacing: 0.22em;
  color: #ffffff;
  font-weight: 600;
}

.content {
  padding: 34px;
}

.legal-notice {
  margin-bottom: 28px;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 248, 241, 0.94));
  border: 1px solid rgba(212, 175, 55, 0.24);
  box-shadow: 0 16px 36px rgba(11, 35, 70, 0.08);
  position: relative;
}

.legal-notice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), #b8921e);
}

.legal-header {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding-left: 14px;
}

.legal-kicker {
  color: #8c6b10;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
}

.legal-header strong {
  font-size: 1.3rem;
  line-height: 1.2;
}

.legal-list {
  display: grid;
  gap: 14px;
  padding-left: 14px;
}

.legal-list p {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-left: 5px solid var(--gold);
  color: #1c2f57;
  line-height: 1.72;
}

.catalog-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 20px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.88));
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow:
    0 14px 28px rgba(11, 35, 70, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  justify-content: space-between;
  flex-wrap: wrap;
}

.summary-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.summary-copy {
  display: grid;
  gap: 4px;
}

.summary-copy p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text);
}

.summary-copy strong {
  font-size: 2rem;
  line-height: 1;
  color: var(--brand);
  letter-spacing: -0.04em;
}

.summary-overline {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8d6a12;
  font-weight: 800;
}

.summary-password-box {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7f7, #fff0f0);
  border: 1px solid rgba(198, 40, 40, 0.16);
  box-shadow: 0 8px 20px rgba(198, 40, 40, 0.08);
}

.summary-password-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9f3a3a;
  font-weight: 800;
}

.summary-password-code {
  color: #c62828;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

.summary-badge {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f5d97f, #d4af37);
  color: var(--brand);
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.hero {
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.77rem;
  font-weight: 800;
  color: #8d6a12;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 14px 0 28px;
  font-size: 1.18rem;
  line-height: 1.7;
  max-width: 860px;
  color: var(--muted);
}

.searchbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 255, 0.82));
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow:
    0 14px 34px rgba(11, 35, 70, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.search-input,
.search-select {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 22px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.14);
  background: linear-gradient(180deg, #ffffff, #fcfcfe);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

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

.search-select {
  min-width: 220px;
}

.search-input input,
.search-select {
  width: 100%;
  font: inherit;
  color: var(--text);
  outline: none;
}

.search-input input {
  border: 0;
  padding: 0;
  background: transparent;
}

.search-select {
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand) 50%),
    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.search-icon {
  font-size: 1.1rem;
  color: #5f76a8;
}

.search-input:focus-within,
.search-select:focus {
  border-color: rgba(11, 35, 70, 0.22);
  box-shadow:
    0 0 0 4px rgba(11, 35, 70, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.search-input:hover,
.search-select:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.24);
}

.search-btn,
.assistant-card button {
  border: 0;
  cursor: pointer;
  font: inherit;
  color: #fff;
  background: linear-gradient(135deg, #13396f 0%, #0b2346 100%);
  box-shadow: 0 12px 20px rgba(11, 35, 70, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.search-btn {
  min-height: 56px;
  border-radius: 16px;
  font-weight: 800;
}

a.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.search-btn:hover,
.assistant-card button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 24px rgba(21, 68, 165, 0.26);
}

.tabs {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.tab {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(44, 85, 170, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: #35508f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.tab.active,
.tab:hover {
  background: linear-gradient(135deg, #13396f 0%, #0b2346 100%);
  color: #fff;
}

.cards-section {
  margin-top: 26px;
}

.assistant-grid {
  display: grid;
  gap: 26px;
}

.assistant-group {
  display: grid;
  gap: 18px;
}

.group-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 43, 87, 0.12);
}

.group-header h2 {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.1;
  color: var(--brand);
}

.group-count {
  color: #7a5c0a;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.assistant-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  min-height: 270px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.96)),
    linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0));
  border: 1px solid rgba(212, 175, 55, 0.14);
  box-shadow: 0 18px 34px rgba(11, 35, 70, 0.08);
}

.assistant-card h3 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.4;
}

.assistant-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.assistant-card button {
  margin-top: auto;
  min-height: 52px;
  border-radius: 14px;
  font-weight: 800;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #5570a8;
  font-size: 0.92rem;
  font-weight: 700;
}

.card-category {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5c0a;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px 28px;
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(44, 85, 170, 0.12);
  color: var(--muted);
  line-height: 1.7;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 24, 58, 0.55);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(520px, calc(100% - 24px));
  margin: 10vh auto 0;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 64px rgba(11, 35, 70, 0.24);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 95, 208, 0.08);
  color: var(--brand-dark);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-eyebrow {
  margin: 0 0 8px;
  color: #8d6a12;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 800;
}

.modal-dialog h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
}

.modal-description {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.modal-options {
  display: grid;
  gap: 12px;
}

.modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: linear-gradient(180deg, #fff, #fbf8ef);
}

.modal-option strong {
  display: block;
  margin-bottom: 4px;
}

.modal-option span {
  color: var(--muted);
  font-size: 0.94rem;
}

.modal-option small {
  display: block;
  margin-top: 4px;
  color: #8d6a12;
  font-size: 0.84rem;
  font-weight: 700;
}

.modal-option a {
  min-width: 118px;
}

.site-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 24px 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, #0b2346, #07182f);
  color: #fff;
  border-top: 4px solid var(--gold);
}

.site-footer p {
  margin: 8px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.footer-meta {
  display: grid;
  gap: 8px;
  text-align: right;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

@media (max-width: 1180px) {
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
    margin: 8px auto;
    border-radius: 24px;
  }

  .content {
    padding: 20px;
  }

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

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

  .hero h1 {
    font-size: 2rem;
  }

  .group-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-dialog {
    margin-top: 4vh;
    padding: 22px;
  }
}
