.paid-page {
  min-height: 100vh;
}

.paid-header {
  padding-bottom: 18px;
}

.paid-header-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.paid-back-link {
  color: var(--muted);
}

.paid-main {
  display: grid;
  gap: 24px;
}

.paid-search-panel,
.paid-query-strip,
.paid-results,
.paid-module-stage,
.paid-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.paid-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  padding: 34px;
}

.paid-search-panel.is-locked {
  opacity: 0.72;
}

.paid-search-copy h1,
.paid-results-head h2,
.paid-query-summary h2,
.paid-stage-head h3,
.paid-stage-section h4,
.paid-stage-subsection h5,
.paid-empty-state h3,
.paid-pending-state h3,
.paid-error-state h3 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.paid-search-copy h1 {
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 0.98;
}

.paid-search-lead,
.paid-search-note,
.paid-results-summary,
.paid-query-meta,
.paid-stage-banner,
.paid-stage-note,
.paid-field-label,
.paid-field-value,
.paid-empty-state p,
.paid-pending-state p,
.paid-error-state p,
.paid-sidebar-group-title,
.paid-status-caption {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.paid-search-lead {
  margin-top: 18px;
  font-size: 1.04rem;
}

.paid-search-note {
  margin-top: 12px;
  font-size: 0.94rem;
}

.paid-search-form {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
  border: 1px solid rgba(79, 62, 38, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(250, 244, 233, 0.9)),
    radial-gradient(circle at top right, rgba(35, 74, 120, 0.08), transparent 40%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.paid-search-form .lookup-label {
  color: #4b4033;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paid-search-form .lookup-input {
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(79, 62, 38, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.paid-search-form .lookup-input::placeholder {
  color: rgba(75, 64, 51, 0.52);
}

.paid-search-form .lookup-input:hover {
  border-color: rgba(35, 74, 120, 0.24);
  background: rgba(255, 255, 255, 0.95);
}

.paid-search-form .lookup-input:focus {
  outline: none;
  border-color: rgba(35, 74, 120, 0.42);
  box-shadow: 0 0 0 4px rgba(35, 74, 120, 0.08);
  background: #fffdf9;
}

.paid-search-form .lookup-form-feedback {
  min-height: 1.6em;
  margin-top: 2px;
  font-size: 0.9rem;
}

.paid-search-panel.is-locked .lookup-input,
.paid-search-panel.is-locked .paid-submit {
  cursor: not-allowed;
}

.paid-search-panel.is-locked .lookup-input {
  background: rgba(239, 234, 223, 0.8);
  border-color: rgba(79, 62, 38, 0.08);
  color: rgba(60, 51, 41, 0.72);
}

.paid-search-panel.is-locked .paid-submit {
  background: rgba(31, 77, 58, 0.62);
  transform: none;
}

.paid-label-gap {
  margin-top: 4px;
}

.paid-search-actions {
  margin-top: 8px;
}

.paid-submit {
  width: 100%;
  min-height: 54px;
}

.paid-query-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
}

.paid-query-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.paid-query-actions > * {
  margin: 0;
}

.paid-query-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.paid-results {
  padding: 30px;
}

.paid-results-head {
  display: block;
}

.paid-results-head h2 {
  margin-top: 18px;
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  line-height: 1.08;
}

.paid-results-summary {
  margin-top: 14px;
  color: #7a3f2c;
  font-size: 0.95rem;
  font-weight: 600;
}

.paid-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.paid-sidebar {
  padding: 22px;
  align-self: start;
  position: static;
}

.paid-sidebar-group + .paid-sidebar-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.paid-sidebar-group-title {
  margin-bottom: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.paid-module-nav-list {
  display: grid;
  gap: 10px;
}

.paid-module-nav-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.paid-module-nav-button.is-active {
  border-color: rgba(31, 77, 58, 0.35);
  background: rgba(31, 77, 58, 0.09);
}

.paid-module-nav-label {
  min-width: 0;
  font-weight: 600;
  line-height: 1.45;
  padding-right: 4px;
}

.paid-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.paid-status-success {
  background: rgba(31, 77, 58, 0.1);
  color: var(--accent-strong);
}

.paid-status-pending {
  background: rgba(35, 74, 120, 0.1);
  color: var(--accent-alt);
}

.paid-status-empty {
  background: rgba(103, 92, 71, 0.1);
  color: #6f6354;
}

.paid-status-error {
  background: rgba(145, 54, 35, 0.1);
  color: #8b341e;
}

.paid-module-stage {
  padding: 28px;
}

.paid-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.paid-stage-head h3 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1;
}

.paid-stage-banners {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.paid-stage-banner {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 241, 0.92);
  font-size: 0.94rem;
}

.paid-stage-banner.is-warning {
  color: #7a3f2c;
}

.paid-stage-banner.is-muted {
  color: var(--muted);
}

.paid-stage-notes {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.paid-stage-note {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(35, 74, 120, 0.14);
  background: rgba(35, 74, 120, 0.06);
}

.paid-stage-note strong {
  color: var(--text);
  font-size: 0.92rem;
}

.paid-stage-sections {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.paid-stage-section {
  padding: 0;
}

.paid-stage-section h4 {
  font-size: 1.4rem;
  line-height: 1;
}

.paid-bilingual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.paid-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.68);
  padding: 18px;
}

.paid-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.paid-column-head h5 {
  margin: 0;
  font-size: 1rem;
  line-height: 1;
}

.paid-field-list,
.paid-record-list,
.paid-group-list,
.paid-metric-list {
  display: grid;
  gap: 12px;
}

.paid-field-row {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(79, 62, 38, 0.08);
  border-radius: 0;
  background: transparent;
}

.paid-field-row:first-child {
  padding-top: 0;
}

.paid-field-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.paid-field-label {
  font-size: 0.82rem;
}

.paid-field-value {
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.paid-stage-subsection + .paid-stage-subsection {
  margin-top: 20px;
}

.paid-stage-subsection h5 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.paid-summary-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.72);
}

.paid-record-list {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.paid-record-card {
  border: 1px solid rgba(79, 62, 38, 0.09);
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.82);
  padding: 18px;
}

.paid-record-columns-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(79, 62, 38, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paid-record-grid {
  display: grid;
  gap: 0;
}

.paid-record-grid-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(79, 62, 38, 0.08);
  align-items: stretch;
}

.paid-record-grid-row:first-child {
  padding-top: 0;
}

.paid-record-grid-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.paid-record-grid-cell {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.paid-record-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 77, 58, 0.08);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
}

.paid-empty-state,
.paid-pending-state,
.paid-error-state {
  margin-top: 26px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(79, 62, 38, 0.09);
  background: rgba(255, 252, 246, 0.72);
}

.paid-empty-state h3,
.paid-pending-state h3,
.paid-error-state h3 {
  font-size: 1.8rem;
  line-height: 1;
}

.paid-empty-state p,
.paid-pending-state p,
.paid-error-state p {
  margin-top: 12px;
}

.paid-skeleton {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.paid-skeleton-bar {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(35, 74, 120, 0.08),
    rgba(35, 74, 120, 0.16),
    rgba(35, 74, 120, 0.08)
  );
  background-size: 220% 100%;
  animation: paid-shimmer 1.6s linear infinite;
}

.paid-skeleton-bar.is-short {
  width: 42%;
}

.paid-skeleton-bar.is-medium {
  width: 64%;
}

.paid-skeleton-bar.is-long {
  width: 100%;
}

.paid-has-more {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(35, 74, 120, 0.2);
  background: rgba(35, 74, 120, 0.05);
  color: var(--accent-alt);
  font-size: 0.94rem;
  line-height: 1.7;
}

@keyframes paid-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -20% 0;
  }
}

@media (max-width: 1100px) {
  .paid-search-panel,
  .paid-workspace,
  .paid-bilingual-grid {
    grid-template-columns: 1fr;
  }

  .paid-record-columns-head,
  .paid-record-grid-row {
    grid-template-columns: 1fr;
  }

  .paid-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .paid-search-panel,
  .paid-query-strip,
  .paid-results,
  .paid-module-stage,
  .paid-sidebar {
    padding: 24px;
    border-radius: 24px;
  }

  .paid-query-strip,
  .paid-results-head,
  .paid-stage-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .paid-query-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .paid-query-actions > * + * {
    margin-top: 6px;
  }

  .paid-query-actions .button {
    width: 100%;
  }

  .paid-header-links {
    flex-wrap: wrap;
  }
}
