/* Pulpit IQ - Premium Analyzer Shell */
:root {
  --bg: #080b19;
  --bg-soft: #121838;
  --surface: rgba(20, 29, 62, 0.78);
  --surface-solid: #161f43;
  --surface-2: rgba(28, 38, 76, 0.9);
  --text: #f8f9ff;
  --muted: #a2accf;
  --border: rgba(165, 178, 233, 0.2);
  --primary: #8f7cff;
  --primary-strong: #6f57ff;
  --accent: #35d6ff;
  --danger: #ff7a9b;
  --shadow: 0 22px 55px rgba(4, 8, 24, 0.45);
  --radius: 16px;
  --font-sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background:
    linear-gradient(180deg, rgba(20, 28, 61, 0.28) 0%, rgba(10, 14, 31, 0.1) 48%, rgba(8, 11, 25, 0.62) 100%),
    radial-gradient(1300px 900px at 10% -10%, rgba(87, 119, 255, 0.28), transparent 60%),
    radial-gradient(1400px 900px at 90% 10%, rgba(143, 124, 255, 0.23), transparent 62%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: min(1200px, 94%);
  margin: 0 auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 38vw;
  height: 38vw;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.16;
  z-index: -1;
  animation: shellGlow 16s ease-in-out infinite alternate;
  pointer-events: none;
}

body::before {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  top: -14vw;
  left: -12vw;
}

body::after {
  background: linear-gradient(120deg, #6cf6c3, #4c8bff);
  bottom: -14vw;
  right: -10vw;
  animation-delay: 1.6s;
}

@keyframes shellGlow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2vw, -2vw, 0) scale(1.08); }
}

.app-shell {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding-bottom: 40px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 10, 22, 0.66);
  border-bottom: 1px solid rgba(180, 190, 240, 0.12);
  margin-bottom: 28px;
}

.app-header-inner {
  width: min(1200px, 94%);
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: #dce4ff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.back-home-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.auth-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#auth-user-email {
  color: #a8b6ea;
  font-size: 0.82rem;
}

#logout-btn {
  border: 1px solid rgba(165, 178, 233, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}

#logout-btn:hover {
  border-color: rgba(143, 124, 255, 0.58);
  background: rgba(143, 124, 255, 0.15);
  transform: translateY(-1px);
}

.app-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: #d8deff;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.back-home-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.logout-btn {
  border: 1px solid rgba(255, 140, 165, 0.44);
  color: #ffdbe3;
  background: rgba(255, 122, 155, 0.14);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 122, 155, 0.22);
  transform: translateY(-1px);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 10, 22, 0.88);
  backdrop-filter: blur(5px);
}

.auth-overlay.visible {
  display: flex;
}

.auth-overlay-card {
  width: min(520px, 92%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(17, 24, 54, 0.95);
  padding: 22px;
  box-shadow: var(--shadow);
}

.auth-overlay-card h2 {
  margin: 0 0 8px;
}

.auth-overlay-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.brand-block h1 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  margin-bottom: 3px;
}

.brand-block p {
  color: var(--muted);
  font-size: 0.95rem;
}

.brand-pill {
  border: 1px solid var(--border);
  color: #d8deff;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#app-auth-shell {
  display: none;
}

#app-auth-shell.auth-ready {
  display: block;
}

#app-auth-loading {
  width: min(820px, 94%);
  margin: 18px auto 26px;
}

#app-auth-loading .status-shell {
  align-items: center;
}

#app-auth-loading .status-copy {
  gap: 2px;
}

#app-auth-loading h2 {
  margin: 0;
}

main {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: 22px;
  align-items: start;
}

.main-column,
.side-column {
  display: grid;
  gap: 18px;
}

section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}

h2 {
  font-size: clamp(1.28rem, 1.8vw, 1.6rem);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.panel-heading p,
.section-note {
  color: #b8c4ee;
  font-size: 0.92rem;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

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

.field {
  min-width: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.42rem;
  margin-top: 0.95rem;
  color: #d9e0ff;
  font-size: 0.93rem;
}

input[type="text"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(176, 188, 238, 0.32);
  background: rgba(11, 16, 35, 0.9);
  color: #f7f9ff;
  border-radius: 10px;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8f9aca;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(143, 124, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(143, 124, 255, 0.22);
  background: rgba(12, 18, 39, 0.98);
}

select option {
  color: #f7f9ff;
  background: #121936;
}

select option:checked {
  color: #ffffff;
  background: #2a3570;
}

select option:hover {
  color: #ffffff;
  background: #37458a;
}

textarea {
  font-family: inherit;
  resize: vertical;
  min-height: 188px;
}

.field-helper {
  margin: 0 0 8px;
  color: #a8b6e4;
  font-size: 0.82rem;
}

.field-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
  border: 1px solid transparent;
}

.field-badge.required {
  color: #d3ffe9;
  border-color: rgba(89, 231, 180, 0.54);
  background: rgba(89, 231, 180, 0.16);
}

.field-badge.optional {
  color: #dde5ff;
  border-color: rgba(165, 178, 233, 0.44);
  background: rgba(255, 255, 255, 0.08);
}

.billing-status-card {
  border: 1px solid rgba(114, 132, 206, 0.35);
  background: linear-gradient(160deg, rgba(33, 45, 95, 0.5), rgba(16, 24, 55, 0.8));
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px;
}

.billing-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.billing-status-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bdc9f3;
}

.billing-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(153, 170, 236, 0.45);
  background: rgba(170, 184, 239, 0.14);
  color: #dbe3ff;
}

.billing-plan-badge.pro {
  border-color: rgba(94, 235, 206, 0.45);
  background: rgba(94, 235, 206, 0.16);
  color: #c4fff1;
}

.billing-plan-badge.free {
  border-color: rgba(153, 170, 236, 0.45);
  background: rgba(170, 184, 239, 0.14);
  color: #dbe3ff;
}

.billing-usage-text,
.billing-period-text {
  margin: 8px 0 0;
  color: #c6d2ff;
  font-size: 0.86rem;
}

.billing-period-text {
  color: #aab8e8;
  font-size: 0.8rem;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.billing-actions .sample-btn {
  margin-top: 0;
  min-height: 36px;
  padding: 0.42rem 0.9rem;
  font-size: 0.82rem;
}

.billing-actions .sample-btn.primary {
  background: linear-gradient(135deg, #7d66ff, #5e4bff 46%, #3ec5ff);
  border-color: rgba(133, 162, 255, 0.85);
  color: #f8fbff;
}

.submit-btn,
button[type="submit"] {
  margin-top: 1.35rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 30px rgba(111, 87, 255, 0.34);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.submit-btn:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(111, 87, 255, 0.45);
}

.analyze-btn {
  min-height: 54px;
  margin-top: 6px;
  font-size: 1.02rem;
  background: linear-gradient(130deg, #7d66ff, #5e4bff 46%, #3ec5ff 100%);
  box-shadow: 0 16px 36px rgba(94, 75, 255, 0.46), 0 0 0 1px rgba(193, 202, 255, 0.12) inset;
}

.analyze-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(94, 75, 255, 0.52), 0 0 0 1px rgba(205, 213, 255, 0.18) inset;
}

.compare-btn {
  margin-top: 0;
  min-height: 44px;
  font-size: 0.92rem;
  background: rgba(139, 152, 205, 0.2);
  border: 1px solid rgba(165, 178, 233, 0.42);
  color: #dfe6ff;
  box-shadow: none;
}

.compare-btn:hover {
  box-shadow: none;
  background: rgba(139, 152, 205, 0.3);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.mode-tab {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(166, 179, 238, 0.24);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  color: #c9d1f4;
  transition: all 0.2s;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(143, 124, 255, 0.35), rgba(53, 214, 255, 0.22));
  border-color: rgba(154, 169, 236, 0.5);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.founder-page {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding-bottom: 32px;
}

.founder-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.founder-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.1vw, 1.9rem);
  letter-spacing: -0.02em;
}

.founder-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.founder-status {
  margin-top: 8px;
  font-size: 0.86rem;
  color: #9be7c8;
}

.founder-status.error {
  color: #ffb3c4;
}

.founder-grid {
  display: grid;
  gap: 14px;
}

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

.kpi-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.78);
  padding: 12px;
}

.kpi-card h3 {
  margin: 0 0 4px;
  font-size: 0.82rem;
  color: #b8c7f7;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kpi-value {
  font-size: 1.5rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f7ff;
}

.kpi-note {
  margin-top: 5px;
  color: #a7b5e2;
  font-size: 0.78rem;
}

.founder-section h2 {
  margin: 0 0 10px;
  font-size: 1.04rem;
}

.founder-table-wrap {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  overflow: auto;
  background: rgba(11, 16, 35, 0.74);
}

.founder-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
}

.founder-table th,
.founder-table td {
  text-align: left;
  border-bottom: 1px solid rgba(166, 180, 240, 0.16);
  padding: 10px 12px;
  font-size: 0.83rem;
  vertical-align: top;
}

.founder-table th {
  color: #c7d4ff;
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
}

.founder-table td {
  color: #e3eaff;
}

.empty-row {
  color: #a9b6e0 !important;
  text-align: center !important;
  font-style: italic;
}

.founder-table tbody tr:last-child td {
  border-bottom: none;
}

.metric-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-chip {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  font-size: 0.79rem;
  color: #d7e1ff;
}

.metric-chip.unavailable {
  border-style: dashed;
  color: #b8c5ec;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.funnel-step {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 35, 0.74);
  padding: 10px;
}

.funnel-step h3 {
  margin: 0 0 4px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #b6c5f8;
}

.funnel-step .value {
  font-size: 1.2rem;
  font-weight: 800;
}

.founder-muted {
  color: #a7b5e2;
  font-size: 0.8rem;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.qa-stat-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.78);
  padding: 12px;
}

.qa-stat-card h3 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #b8c7f7;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.qa-stat-card p {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.qa-coverage-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.72);
  padding: 10px;
}

.qa-coverage-card h3 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #c7d4ff;
}

.qa-chip-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.qa-chip {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  font-size: 0.77rem;
  color: #dbe4ff;
}

.qa-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.qa-recent-title {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

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

.qa-review-group {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.72);
  padding: 10px;
}

.qa-review-group h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #dbe4ff;
}

.qa-radio-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: #dbe4ff;
}

.qa-radio input {
  accent-color: #8f7cff;
}

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

.qa-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8rem;
  color: #dbe4ff;
}

.qa-tag input {
  accent-color: #8f7cff;
}

.qa-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.qa-meta-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 10px;
}

.qa-meta-card h4 {
  margin: 0 0 3px;
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: #b8c7f7;
  text-transform: uppercase;
}

.qa-meta-card p {
  margin: 0;
  font-size: 0.82rem;
  color: #e2e8ff;
}

.qa-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(166, 180, 240, 0.24);
  padding: 4px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #dce4ff;
  background: rgba(255, 255, 255, 0.03);
}

.qa-status-pill.pending {
  border-color: rgba(255, 190, 102, 0.48);
  color: #ffe5ba;
  background: rgba(255, 190, 102, 0.14);
}

.qa-status-pill.in_review {
  border-color: rgba(120, 212, 253, 0.5);
  color: #d7f4ff;
  background: rgba(53, 214, 255, 0.14);
}

.qa-status-pill.reviewed {
  border-color: rgba(89, 231, 180, 0.52);
  color: #d3ffe9;
  background: rgba(89, 231, 180, 0.15);
}

.qa-status-pill.excluded {
  border-color: rgba(255, 141, 170, 0.5);
  color: #ffd6df;
  background: rgba(255, 122, 155, 0.16);
}

.qa-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.qa-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.72);
  padding: 12px;
}

.qa-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.qa-tag-list {
  margin: 0;
  padding-left: 18px;
  color: #dbe4ff;
  font-size: 0.84rem;
}

.qa-tag-list li {
  margin-bottom: 6px;
}

.qa-tag-list li:last-child {
  margin-bottom: 0;
}

.qa-sample-list-wrap {
  margin-top: 14px;
}

.qa-sample-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qa-sample-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.72);
  padding: 12px;
}

.qa-sample-card.selected {
  border-color: rgba(120, 212, 253, 0.5);
  box-shadow: 0 0 0 1px rgba(120, 212, 253, 0.18) inset;
}

.qa-sample-card h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.qa-sample-card p {
  margin: 0 0 8px;
  font-size: 0.84rem;
  color: #dce6ff;
}

.qa-sample-card p:last-child {
  margin-bottom: 0;
}

.qa-sample-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.qa-review-btn {
  margin-top: 6px;
}

.qa-review-panel {
  margin-top: 14px;
}

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

.qa-rubric-grid label,
.qa-review-form > label {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.qa-tags-fieldset {
  margin-top: 12px;
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  padding: 10px;
}

.qa-tags-fieldset legend {
  padding: 0 6px;
  font-size: 0.8rem;
  color: #c7d4ff;
}

.qa-tag-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qa-tag-options label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #dbe4ff;
}

.qa-tag-options input[type="checkbox"] {
  accent-color: #8f7cff;
}

.qa-review-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.qa-review-actions .sample-btn {
  margin-top: 0;
}

.qa-review-message {
  font-size: 0.84rem;
  color: #c7d4ff;
}

.qa-review-message.success {
  color: #bdf7da;
}

.qa-review-message.error {
  color: #ffbdcb;
}

.qa-loop-list {
  margin-top: 8px;
}

.qa-concern-list {
  margin: 0;
  padding-left: 18px;
  color: #dbe4ff;
  font-size: 0.8rem;
}

.qa-concern-list li {
  margin-bottom: 4px;
}

.qa-concern-list li:last-child {
  margin-bottom: 0;
}

.account-shell {
  width: min(1200px, 94%);
  margin: 24px auto 36px;
  display: grid;
  gap: 18px;
}

.account-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-kpi {
  border: 1px solid rgba(165, 178, 233, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.account-kpi-label {
  margin: 0;
  color: #b8c4ee;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-kpi-value {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.account-panel {
  position: relative;
}

.account-panel h2 {
  margin-top: 0;
  margin-bottom: 4px;
}

.account-subtitle {
  margin: 0 0 12px;
  color: #a8b6e4;
  font-size: 0.86rem;
}

.account-note {
  margin: 10px 0 0;
  color: #a8b6e4;
  font-size: 0.82rem;
}

.account-danger {
  margin-top: 12px;
  border: 1px solid rgba(255, 122, 155, 0.38);
  background: rgba(255, 122, 155, 0.08);
  color: #ffd5df;
}

.account-danger:hover {
  background: rgba(255, 122, 155, 0.16);
}

.account-feedback {
  min-height: 1.2rem;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #c5d1fc;
}

.account-feedback.error {
  color: #ffb8c8;
}

.account-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(153, 170, 236, 0.45);
  background: rgba(170, 184, 239, 0.14);
  color: #dbe3ff;
}

.account-plan-badge.pro {
  border-color: rgba(94, 235, 206, 0.45);
  background: rgba(94, 235, 206, 0.16);
  color: #c4fff1;
}

.account-plan-badge.free {
  border-color: rgba(153, 170, 236, 0.45);
  background: rgba(170, 184, 239, 0.14);
  color: #dbe3ff;
}

.account-list {
  margin: 0;
  padding-left: 18px;
  color: #dbe4ff;
  font-size: 0.9rem;
}

.account-list li {
  margin-bottom: 6px;
}

.account-main {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(280px, 0.68fr);
  gap: 18px;
  align-items: start;
}

.account-column,
.account-side-column {
  display: grid;
  gap: 16px;
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-summary-card {
  border: 1px solid rgba(165, 178, 233, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.account-summary-card h3 {
  margin: 0;
  color: #b8c4ee;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-summary-card p {
  margin: 6px 0 0;
  font-size: 1.02rem;
  font-weight: 700;
}

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

.sample-btn.danger {
  border-color: rgba(255, 122, 155, 0.38);
  background: rgba(255, 122, 155, 0.08);
  color: #ffd5df;
}

.sample-btn.danger:hover {
  background: rgba(255, 122, 155, 0.16);
}

.account-status-box {
  min-height: 70px;
  border: 1px solid rgba(165, 178, 233, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  color: #d3ddff;
  font-size: 0.9rem;
}

.account-status-box.ok {
  border-color: rgba(94, 235, 206, 0.45);
  color: #c7ffe9;
}

.account-status-box.error {
  border-color: rgba(255, 122, 155, 0.45);
  color: #ffd7e2;
}

.app-auth-loading[hidden] {
  display: none !important;
}

#account-auth-shell {
  display: none;
}

#account-auth-shell.auth-ready {
  display: block;
}

.text-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sample-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #dce3ff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sample-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.sample-flow-btn {
  border-color: rgba(120, 212, 253, 0.42);
  background: linear-gradient(135deg, rgba(53, 214, 255, 0.28), rgba(111, 87, 255, 0.24));
  color: #eff8ff;
  box-shadow: 0 10px 24px rgba(37, 166, 205, 0.28);
}

.sample-flow-btn:hover {
  background: linear-gradient(135deg, rgba(53, 214, 255, 0.38), rgba(111, 87, 255, 0.32));
}

.text-counters {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #a9b3d8;
  font-size: 0.82rem;
}

.text-limit-warning {
  margin-top: 8px;
  color: #ffb3c4;
  font-size: 0.84rem;
}

.first-run-shell {
  margin-bottom: 16px;
  border: 1px solid rgba(173, 187, 243, 0.3);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 21, 45, 0.86), rgba(11, 16, 35, 0.72));
  padding: 16px;
}

.first-run-shell h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.first-run-shell p {
  margin: 0;
  color: #c4cff4;
  font-size: 0.9rem;
}

.analyzer-panel .submit-btn {
  margin-top: 1rem;
}

.guided-analyzer-form {
  display: grid;
  gap: 14px;
}

.step-progress-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.step-progress-chip {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  color: #b7c4f2;
  background: rgba(255, 255, 255, 0.03);
}

.step-progress-chip.active {
  color: #f0f4ff;
  border-color: rgba(120, 212, 253, 0.46);
  background: rgba(53, 214, 255, 0.14);
}

.guided-step {
  border: 1px solid rgba(173, 187, 243, 0.25);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(14, 20, 44, 0.84), rgba(11, 16, 35, 0.72));
}

.guided-step + .guided-step {
  margin-top: 2px;
}

.guided-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.guided-step-head h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid rgba(120, 212, 253, 0.52);
  background: rgba(53, 214, 255, 0.14);
  color: #e6f9ff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.step-helper {
  margin: 0 0 12px;
  color: #aebbe7;
  font-size: 0.85rem;
  line-height: 1.45;
}

.guided-step-submit {
  border-color: rgba(137, 119, 255, 0.42);
  background: linear-gradient(180deg, rgba(30, 26, 58, 0.74), rgba(13, 16, 37, 0.78));
}

.guided-step .mode-tabs {
  margin-bottom: 0;
}

.guided-step .field label {
  margin-top: 0;
}

.guided-step .mode-input:first-of-type label {
  margin-top: 0;
}

.mode-input + .mode-input {
  margin-top: 8px;
}

.first-run-audience {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  color: #a9b8ea !important;
  font-size: 0.85rem !important;
}

.mode-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mode-explainer-card {
  border: 1px solid rgba(166, 180, 240, 0.22);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.mode-explainer-card h3 {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.mode-explainer-card p {
  margin: 0;
  font-size: 0.78rem;
  color: #b3bfeb;
  line-height: 1.45;
}

.first-run-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.first-run-actions .sample-btn {
  margin-top: 0;
}

.inline-text-link {
  color: #d8e1ff;
  font-size: 0.84rem;
  text-decoration: none;
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
}

.inline-text-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

#status-section {
  border: 1px solid rgba(88, 214, 255, 0.36);
  background: linear-gradient(180deg, rgba(18, 25, 54, 0.94), rgba(11, 16, 37, 0.96));
}

#status-section h2 {
  margin-bottom: 8px;
}

#status-message {
  color: #d6deff;
  font-size: 0.95rem;
}

.status-shell {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.status-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(161, 177, 236, 0.35);
  border-top-color: var(--accent);
  animation: loadingSpin 0.9s linear infinite;
  flex-shrink: 0;
}

.status-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#status-title {
  font-weight: 700;
  color: #edf2ff;
}

#status-progress,
#status-eta {
  color: #aebde8;
  font-size: 0.8rem;
}

.status-message-error {
  color: #ffd9e2 !important;
}

.status-message-ok {
  color: #d9fce8 !important;
}

@keyframes loadingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#results-section {
  background: var(--surface-2);
}

#results-content {
  white-space: normal;
  font-size: 0.95rem;
  line-height: 1.65;
}

#results-content h3 {
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  font-size: 1.12rem;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(176, 189, 242, 0.2);
  border-radius: 12px;
  background: rgba(10, 14, 31, 0.62);
}

.result-header-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb0f5;
  font-weight: 700;
}

.result-header-title {
  margin: 0;
  font-size: 1.08rem !important;
}

.result-header-meta {
  margin: 4px 0 0;
  color: #b8c5f0;
  font-size: 0.84rem;
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.result-actions-prominent {
  border: 1px solid rgba(166, 180, 240, 0.32);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.result-action-btn {
  border: 1px solid rgba(165, 178, 233, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}

.result-action-btn:hover {
  border-color: rgba(143, 124, 255, 0.58);
  background: rgba(143, 124, 255, 0.15);
  transform: translateY(-1px);
}

.result-action-feedback {
  min-height: 22px;
  font-size: 0.83rem;
  color: #9be7c8;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.result-action-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.result-action-feedback.error {
  color: #ffb3c4;
}

.report-print-header {
  display: none;
}

.result-score-hero {
  text-align: center;
  margin-bottom: 22px;
  padding: 24px 18px;
  border-radius: 16px;
  border: 1px solid rgba(176, 189, 242, 0.25);
  background: rgba(9, 13, 28, 0.46);
}

.score-value {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.score-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a9b6ea;
  font-weight: 700;
}

.score-why-link {
  margin-top: 8px;
}

.score-why-link a {
  color: #d7e4ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(167, 184, 242, 0.5);
}

.score-why-link a:hover {
  text-decoration: underline;
}

.score-lens {
  margin-top: 10px;
  color: #d5ddff;
  font-weight: 600;
  font-size: 0.92rem;
}

.score-high .score-value { color: #66efba; }
.score-mid .score-value { color: #ffd27f; }
.score-low .score-value { color: #ff9db6; }

.category-assessment-panel {
  border-color: rgba(125, 206, 246, 0.36);
  background: rgba(8, 28, 44, 0.56);
}

.category-assessment-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.category-assessment-header p {
  margin: 0;
  color: #dbe5ff;
  font-size: 0.86rem;
}

.category-assessment-grid {
  display: grid;
  gap: 14px;
}

.category-assessment-row {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.78);
  padding: 14px;
}

.category-assessment-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #f2f6ff;
}

.category-assessment-detail-row {
  margin-bottom: 8px;
}

.category-assessment-section {
  margin-bottom: 12px;
}

.category-assessment-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa0cc;
  margin-bottom: 4px;
}

.category-assessment-value {
  display: block;
  font-size: 0.95rem;
  color: #e8eefc;
  font-weight: 600;
  line-height: 1.4;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(166, 180, 240, 0.34);
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #eff4ff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.category-assessment-why-label {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #b6c3ee;
}

.category-grade-A,
.grade-badge-A {
  background: rgba(77, 199, 150, 0.22);
  border-color: rgba(100, 232, 175, 0.5);
}

.category-grade-B,
.grade-badge-B {
  background: rgba(111, 165, 245, 0.2);
  border-color: rgba(123, 183, 255, 0.46);
}

.category-grade-C,
.grade-badge-C {
  background: rgba(255, 195, 112, 0.2);
  border-color: rgba(255, 209, 136, 0.5);
}

.category-grade-D,
.grade-badge-D {
  background: rgba(255, 140, 130, 0.2);
  border-color: rgba(255, 165, 150, 0.5);
}

.category-grade-F,
.grade-badge-F {
  background: rgba(255, 110, 138, 0.2);
  border-color: rgba(255, 142, 164, 0.5);
}

.category-assessment-explanation {
  margin: 0;
  color: #dce5ff;
  font-size: 0.92rem;
  line-height: 1.5;
}

.compare-category-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.compare-category-row {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 35, 0.72);
  padding: 10px;
}

.compare-category-row h5 {
  margin: 0 0 6px;
  font-size: 0.86rem;
  color: #ecf2ff;
}

.score-breakdown-panel {
  border-color: rgba(125, 206, 246, 0.36);
  background: rgba(8, 28, 44, 0.56);
}

.score-breakdown-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.score-breakdown-header p {
  margin: 0;
  color: #dbe5ff;
  font-size: 0.86rem;
}

.score-breakdown-grid {
  display: grid;
  gap: 10px;
}

.score-breakdown-row {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 35, 0.78);
  padding: 10px;
}

.score-breakdown-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.score-breakdown-top h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #f0f4ff;
}

.score-breakdown-metrics {
  font-size: 0.78rem;
  color: #bac8f3;
}

.score-breakdown-bar-shell {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(164, 179, 238, 0.16);
  overflow: hidden;
}

.score-breakdown-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.score-breakdown-summary {
  margin-top: 8px !important;
  color: #d6defa !important;
  font-size: 0.84rem !important;
  line-height: 1.45;
}

.result-block {
  margin-bottom: 20px;
}

.result-block:last-child {
  margin-bottom: 0;
}

.legal-disclaimer-panel {
  border-color: rgba(255, 197, 133, 0.4);
  background: rgba(40, 28, 11, 0.52);
}

.legal-disclaimer-panel p {
  color: #f5e7d3;
  font-size: 0.87rem;
}

.result-block > p {
  margin: 0;
  color: #dfe7ff;
}

.result-grid {
  display: grid;
  gap: 10px;
}

.report-card {
  border: 1px solid rgba(176, 189, 242, 0.24);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.78);
  padding: 12px;
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.report-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #f0f4ff;
  letter-spacing: -0.01em;
}

.report-card p {
  margin: 0;
  color: #d6defa;
  font-size: 0.9rem;
}

.severity-badge {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border: 1px solid transparent;
}

.severity-high,
.severity-critical {
  color: #ffd7df;
  background: rgba(255, 122, 155, 0.18);
  border-color: rgba(255, 122, 155, 0.45);
}

.severity-medium,
.severity-warning {
  color: #ffe6bb;
  background: rgba(255, 190, 102, 0.17);
  border-color: rgba(255, 190, 102, 0.38);
}

.severity-low {
  color: #d2ffe7;
  background: rgba(89, 231, 180, 0.16);
  border-color: rgba(89, 231, 180, 0.36);
}

.scripture-verdict {
  font-size: 0.76rem;
  color: #c8d4ff;
  border-radius: 999px;
  border: 1px solid rgba(166, 180, 240, 0.3);
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.03);
}

.positives-list {
  margin: 0;
  padding-left: 18px;
}

.positives-list li {
  color: #dce5ff;
  margin-bottom: 7px;
}

.positives-list li:last-child {
  margin-bottom: 0;
}

.transcript-panel {
  border: 1px solid rgba(176, 189, 242, 0.22);
  border-radius: 12px;
  background: rgba(11, 16, 35, 0.74);
  padding: 12px;
  color: #dde5ff;
  white-space: pre-wrap;
}

.recommendation-panel {
  border: 1px solid rgba(141, 124, 255, 0.4);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: rgba(111, 87, 255, 0.08);
  padding: 12px 14px;
  color: #e5ebff;
}

.insight-panel {
  border: 1px solid rgba(171, 189, 255, 0.28);
  border-radius: 12px;
  background: rgba(14, 20, 44, 0.78);
  padding: 12px 14px;
}

.insight-panel p {
  margin: 0 0 8px;
  color: #dbe5ff;
}

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

.text-handling-panel {
  border-color: rgba(118, 214, 182, 0.36);
  background: rgba(10, 36, 34, 0.58);
}

.explainability-panel {
  border-color: rgba(151, 169, 246, 0.34);
}

.explainability-lead {
  margin: 0 0 10px;
  color: #dbe5ff;
}

.explainability-muted {
  color: #b9c5ec;
  font-size: 0.88rem;
}

.density-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.density-metrics span {
  border: 1px solid rgba(165, 178, 233, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(9, 14, 31, 0.58);
  color: #d7e1ff;
  font-size: 0.8rem;
}

.explainability-details {
  margin-top: 8px;
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(10, 14, 30, 0.48);
  padding: 8px 10px;
}

.explainability-details summary {
  cursor: pointer;
  color: #dfe6ff;
  font-weight: 600;
  font-size: 0.88rem;
}

.explainability-details[open] {
  background: rgba(9, 13, 28, 0.64);
}

.explainability-details.nested {
  margin-top: 8px;
}

.confidence-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.confidence-card {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 35, 0.78);
  padding: 10px;
}

.confidence-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.confidence-card h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #f0f4ff;
}

.confidence-badge {
  border-radius: 999px;
  border: 1px solid rgba(166, 180, 240, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6ff;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  padding: 3px 8px;
}

.confidence-low {
  color: #ffd6df;
  border-color: rgba(255, 141, 170, 0.5);
  background: rgba(255, 122, 155, 0.16);
}

.confidence-medium {
  color: #ffe5ba;
  border-color: rgba(255, 190, 102, 0.48);
  background: rgba(255, 190, 102, 0.14);
}

.confidence-high {
  color: #d3ffe9;
  border-color: rgba(89, 231, 180, 0.52);
  background: rgba(89, 231, 180, 0.15);
}

.confidence-meta-label {
  margin: 8px 0 6px;
  color: #b8c7f7;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.explainability-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.explainability-pill {
  border: 1px solid rgba(166, 180, 240, 0.26);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #dce5ff;
  font-size: 0.76rem;
}

.explainability-empty {
  color: #aebbe8;
  font-size: 0.82rem;
}

.traceability-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.traceability-item {
  border: 1px solid rgba(166, 180, 240, 0.24);
  border-radius: 10px;
  background: rgba(11, 16, 35, 0.78);
  padding: 10px;
}

.traceability-item h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #f0f4ff;
}

.traceability-item p {
  margin: 0 0 6px;
  font-size: 0.86rem;
  color: #d6defa;
}

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

.explainability-inline-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.explainability-inline-list li {
  color: #d6defa;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.explainability-inline-list li:last-child {
  margin-bottom: 0;
}

.inconsistency-panel {
  border-color: rgba(255, 162, 183, 0.4);
  background: rgba(42, 13, 26, 0.45);
}

.consistency-panel.stable {
  border-color: rgba(112, 221, 179, 0.34);
  background: rgba(11, 38, 32, 0.5);
}

.consistency-panel.potential {
  border-color: rgba(255, 162, 183, 0.44);
  background: rgba(42, 13, 26, 0.52);
}

.consistency-header {
  margin-bottom: 8px;
}

.consistency-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(166, 180, 240, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.consistency-badge.ok {
  color: #d2ffe8;
  border-color: rgba(89, 231, 180, 0.5);
  background: rgba(89, 231, 180, 0.14);
}

.consistency-badge.warn {
  color: #ffd6df;
  border-color: rgba(255, 141, 170, 0.52);
  background: rgba(255, 122, 155, 0.17);
}

.precision-summary-panel {
  border-color: rgba(125, 206, 246, 0.36);
  background: rgba(8, 28, 44, 0.56);
}

.precision-summary-label {
  margin-bottom: 8px;
}

.precision-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(166, 180, 240, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.precision-badge.precision-generally_precise {
  color: #d1ffec;
  border-color: rgba(89, 231, 180, 0.52);
  background: rgba(89, 231, 180, 0.16);
}

.precision-badge.precision-mixed_precision {
  color: #ffe6bf;
  border-color: rgba(255, 190, 102, 0.48);
  background: rgba(255, 190, 102, 0.14);
}

.precision-badge.precision-heightened_review {
  color: #ffd9e2;
  border-color: rgba(255, 141, 170, 0.54);
  background: rgba(255, 122, 155, 0.18);
}

.precision-badge.precision-insufficient_evidence {
  color: #d8e1ff;
  border-color: rgba(166, 180, 240, 0.34);
  background: rgba(255, 255, 255, 0.05);
}

#saved-reports-section h2,
#compare-section h2 {
  margin-bottom: 8px;
}

#saved-reports-section > p,
#compare-section > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

#saved-reports-list .saved-report-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(165, 178, 233, 0.26);
  border-radius: 12px;
  background: rgba(13, 19, 43, 0.82);
  color: #eef2ff;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

#saved-reports-list .saved-report-item:hover {
  border-color: rgba(143, 124, 255, 0.65);
  background: rgba(15, 21, 47, 0.94);
  transform: translateY(-1px);
}

.empty-state-card {
  border: 1px dashed rgba(166, 180, 240, 0.35);
  border-radius: 12px;
  padding: 16px;
  background: rgba(10, 16, 34, 0.58);
}

.empty-state-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.empty-state-card p {
  margin: 0 0 10px;
  color: #bcc8ee;
  font-size: 0.9rem;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state-actions .sample-btn {
  margin-top: 0;
}

.inline-link-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8ff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inline-link-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.empty-state-card .sample-btn {
  margin-top: 0;
}

#compare-section {
  background: var(--surface-2);
}

.compare-panel-secondary {
  border-style: dashed;
  border-color: rgba(156, 170, 230, 0.38);
  background: rgba(20, 27, 57, 0.74);
}

.compare-heading {
  margin-bottom: 6px;
}

.section-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #99acd9;
  font-weight: 700;
}

.compare-controls {
  display: grid;
  gap: 10px;
}

.compare-button-wrap {
  margin-top: 2px;
}

#compare-section .compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: end;
}

#compare-content {
  margin-top: 14px;
}

#compare-content > div {
  border: 1px solid rgba(165, 178, 233, 0.26);
  border-radius: 12px;
  padding: 12px;
  background: rgba(13, 19, 43, 0.82);
  color: #dfe6ff !important;
}

#compare-content .compare-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

@media print {
  @page {
    margin: 0.6in;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  body::after,
  .app-header,
  #upload-section,
  #status-section,
  #saved-reports-section,
  #compare-section,
  .app-footer {
    display: none !important;
  }

  main,
  .app-main,
  .container,
  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  section {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  #results-section {
    display: block !important;
    padding: 0 !important;
  }

  #results-section > h2,
  .result-header,
  .result-action-feedback {
    display: none !important;
  }

  #results-content {
    color: #111 !important;
    font-size: 10.5pt !important;
    line-height: 1.45 !important;
  }

  #results-content h3 {
    color: #000 !important;
    font-size: 14pt !important;
    margin-bottom: 8px !important;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  .report-print-header {
    display: block !important;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
  }

  .report-print-header h1 {
    margin: 0 0 8px;
    font-size: 20pt;
    color: #000;
    letter-spacing: -0.01em;
  }

  .report-print-header p {
    margin: 2px 0;
    color: #222;
    font-size: 10.5pt;
  }

  .result-score-hero {
    margin-bottom: 14px !important;
    border: 1px solid #bbb !important;
    background: transparent !important;
    padding: 12px !important;
  }

  .score-value,
  .score-label,
  .score-lens {
    color: #111 !important;
  }

  .result-block {
    margin-bottom: 12px !important;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .result-block:first-of-type {
    border-top: none;
    padding-top: 0;
  }

  .report-card,
  .transcript-panel,
  .recommendation-panel {
    border: 1px solid #ccc !important;
    background: transparent !important;
    color: #111 !important;
  }

  .report-card h4,
  .report-card p,
  .positives-list li {
    color: #111 !important;
  }

  .severity-badge,
  .scripture-verdict {
    color: #111 !important;
    background: #f2f2f2 !important;
    border-color: #bbb !important;
  }
}

footer {
  text-align: center;
  padding: 18px 0 34px;
  color: #8792bf;
  font-size: 0.88rem;
}

.app-footer p,
.legal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.app-footer a,
.legal-footer a {
  color: #c6cff3;
  text-decoration: none;
}

.app-footer a:hover,
.legal-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .app-header {
    position: static;
  }

  .app-header-inner {
    min-height: 74px;
  }

  main {
    grid-template-columns: 1fr;
  }

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

  .account-main {
    grid-template-columns: 1fr;
  }

  .account-summary-grid,
  .privacy-actions {
    grid-template-columns: 1fr;
  }

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

  .qa-coverage-grid,
  .qa-review-grid,
  .qa-tag-grid,
  .qa-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: 94%;
  }

  section {
    padding: 18px;
    border-radius: 14px;
  }

  .brand-pill {
    display: none;
  }

  .app-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .back-home-link,
  .logout-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }

  .guided-step {
    padding: 12px;
  }

  .guided-step-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .step-progress-chips {
    gap: 6px;
  }

  .step-progress-chip {
    width: 100%;
    text-align: center;
  }

  .mode-explainer-grid {
    grid-template-columns: 1fr;
  }

  .first-run-actions .sample-btn {
    width: 100%;
    text-align: center;
  }

  .inline-text-link {
    width: 100%;
    justify-content: center;
  }

  .text-counters {
    flex-direction: column;
    gap: 4px;
  }

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

  .result-actions {
    width: 100%;
  }

  .result-action-btn {
    width: 100%;
    text-align: center;
  }

  .inline-link-btn {
    width: 100%;
  }

  .empty-state-actions {
    flex-direction: column;
  }

  .analyze-btn,
  .compare-btn {
    min-height: 48px;
  }
}
