:root {
  --bg: #fff7fa;
  --bg-soft: #fff2f7;
  --card: #ffffff;
  --text: #2a2430;
  --muted: #726775;
  --border: #f1dbe6;
  --border-strong: #e7bfd0;
  --shadow: 0 12px 32px rgba(181, 111, 145, 0.08);

  --primary: #e06e9f;
  --primary-dark: #c95a89;
  --secondary: #a88df3;
  --secondary-dark: #9176df;

  --success: #57b894;
  --warning: #d99962;
  --danger: #d96c7c;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #fff7fa 0%, #fff9fc 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 247, 250, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(231, 191, 208, 0.5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 28px;
}

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

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(224, 110, 159, 0.1);
  color: var(--text);
}

.user-area {
  display: flex;
  justify-content: flex-end;
}

.main-content {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
  flex: 1;
}

.section-kicker {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(168, 141, 243, 0.12);
  color: #694ec8;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.how-it-works-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,241,247,0.96));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}

.how-flow {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  align-items: center;
  gap: 0;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.how-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(224,110,159,0.15), rgba(168,141,243,0.18));
  color: #8b4371;
  font-weight: 700;
  flex-shrink: 0;
}

.how-step-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.how-step-text {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.how-line {
  height: 2px;
  border-top: 2px dashed var(--border-strong);
  margin: 0 12px;
}

.compact-actions {
  margin-top: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0;
  align-items: stretch;
}

.analysis-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
  min-height: 620px;
  display: flex;
  flex-direction: column;
}

.divider-wrap {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.vertical-divider {
  width: 2px;
  margin: 18px 0;
  border-right: 2px dashed var(--border-strong);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.card-kicker {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.card-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.file-pill {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--muted);
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(224,110,159,0.05), rgba(168,141,243,0.07));
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.upload-zone:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(224,110,159,0.08), rgba(168,141,243,0.11));
}

.upload-zone.dragover {
  border-color: var(--secondary);
  background: linear-gradient(135deg, rgba(224,110,159,0.09), rgba(168,141,243,0.16));
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.upload-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.upload-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.analysis-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.94rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d6b6c4;
  flex-shrink: 0;
}

.analysis-status.loading .status-dot {
  background: var(--secondary);
  box-shadow: 0 0 0 8px rgba(168, 141, 243, 0.12);
  animation: pulse 1.2s infinite;
}

.analysis-status.success .status-dot {
  background: var(--success);
}

.analysis-status.error .status-dot {
  background: var(--danger);
}

.card-actions {
  margin-bottom: 12px;
}

.notes-box,
.match-result-box {
  background: #fffdfd;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px;
  min-height: 300px;
  line-height: 1.6;
  overflow: auto;
  white-space: normal;
}

.notes-placeholder {
  color: var(--muted);
}

.notes-placeholder-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
}

.placeholder-title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 10px;
}

.placeholder-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.match-section {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.match-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.soft-btn {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.soft-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 14px 28px rgba(168, 141, 243, 0.24);
}

.primary-cta {
  padding: 16px 34px;
  border-radius: 999px;
  font-size: 1rem;
}

.secondary-btn {
  background: rgba(168, 141, 243, 0.12);
  color: #694ec8;
}

.ghost-btn {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}

.soft-btn {
  background: rgba(224, 110, 159, 0.1);
  color: #a13c66;
}

.full-width-btn {
  width: 100%;
}

.match-status {
  justify-content: center;
  margin-bottom: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(231, 191, 208, 0.5);
  padding: 18px 28px 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.result-block-title {
  font-weight: 700;
  margin: 16px 0 8px;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(224, 110, 159, 0.1);
  color: #9f3865;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

li {
  margin-bottom: 6px;
}

p {
  margin: 0 0 8px;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

@media (max-width: 1100px) {
  .how-flow {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .how-line {
    display: none;
  }

  .analysis-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .divider-wrap {
    display: none;
  }

  .analysis-card {
    min-height: 560px;
  }

  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .topnav {
    justify-content: flex-start;
  }

  .user-area {
    justify-content: flex-start;
  }
}

.upload-zone.has-file {
  border-color: #d7a9be;
  background: linear-gradient(135deg, rgba(224,110,159,0.10), rgba(168,141,243,0.12));
}

.upload-zone.has-file .upload-icon {
  font-size: 1.8rem;
}

.upload-zone.has-file .upload-title {
  color: var(--text);
}

.upload-zone.has-file .upload-subtitle {
  color: #8b4371;
  font-weight: 600;
}

.notes-box,
.match-result-box {
  padding: 16px 18px;
  min-height: 300px;
  line-height: 1.5;
}

.result-block-title {
  font-weight: 700;
  margin: 12px 0 6px;
  color: #2e2733;
}

.notes-box p,
.match-result-box p {
  margin: 0 0 10px;
  color: #3f3945;
}

.notes-box ul,
.match-result-box ul {
  margin: 6px 0 10px 18px;
}

.notes-box li,
.match-result-box li {
  margin-bottom: 4px;
  color: #4a4450;
}

.summary-card {
  background: linear-gradient(135deg, rgba(168,141,243,0.08), rgba(224,110,159,0.06));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.summary-card p {
  margin: 0;
}

.highlight-callout {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(224,110,159,0.08);
  border: 1px solid rgba(224,110,159,0.18);
}

.highlight-callout-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9f3865;
  margin-bottom: 8px;
}

.highlight-callout ul {
  margin: 0 0 0 18px;
}

.highlight-callout p {
  margin: 0;
}

.global-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 247, 250, 0.78);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-loading-overlay.hidden {
  display: none;
}

.global-loading-card {
  width: min(460px, calc(100% - 32px));
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(181, 111, 145, 0.18);
  padding: 28px 24px;
  text-align: center;
}

.global-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 4px solid rgba(168,141,243,0.18);
  border-top-color: var(--secondary);
  animation: spin 0.9s linear infinite;
}

.global-loading-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.global-loading-text {
  color: var(--muted);
  line-height: 1.5;
  min-height: 24px;
}

body.loading {
  overflow: hidden;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Compact result layout tuning ===== */

.notes-box,
.match-result-box {
  padding: 14px 16px;
  min-height: 300px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-box > *,
.match-result-box > * {
  margin-top: 0;
  margin-bottom: 0;
}

.result-block-title {
  font-weight: 700;
  margin: 8px 0 4px;
  color: #2e2733;
  font-size: 0.98rem;
  line-height: 1.25;
}

.notes-box p,
.match-result-box p {
  margin: 0;
  color: #3f3945;
  line-height: 1.5;
}

.notes-box ul,
.match-result-box ul {
  margin: 4px 0 6px 18px;
  padding: 0;
}

.notes-box li,
.match-result-box li {
  margin-bottom: 3px;
  color: #4a4450;
  line-height: 1.45;
}

.summary-card {
  background: linear-gradient(135deg, rgba(168,141,243,0.08), rgba(224,110,159,0.06));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.summary-card .result-block-title {
  margin-top: 0;
}

.summary-card p {
  margin: 0;
}

.highlight-callout {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(224,110,159,0.08);
  border: 1px solid rgba(224,110,159,0.18);
}

.highlight-callout-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9f3865;
  margin-bottom: 6px;
}

.highlight-callout ul {
  margin: 0 0 0 18px;
}

.highlight-callout p {
  margin: 0;
}

.notes-placeholder-left {
  min-height: 220px;
  justify-content: center;
}

.placeholder-title {
  margin-bottom: 8px;
}

.placeholder-list {
  gap: 4px;
}

/* Make analysis cards feel less vertically stretched */
.analysis-card {
  min-height: 560px;
}

/* Slightly tighter header spacing inside result cards */
.card-header {
  margin-bottom: 14px;
}

.analysis-status {
  margin: 12px 0 10px;
}

.card-actions {
  margin-bottom: 10px;
}

/* ===== Accordion result layout ===== */

.mini-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-meta-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.mini-meta-card.full-span {
  grid-column: 1 / -1;
}

.mini-meta-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.mini-meta-value {
  color: var(--text);
  line-height: 1.45;
}

.result-accordion-group {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.result-accordion-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefe;
  overflow: hidden;
}

.result-accordion-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #2e2733;
  position: relative;
  user-select: none;
}

.result-accordion-item summary::-webkit-details-marker {
  display: none;
}

.result-accordion-item summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9f3865;
  font-weight: 700;
  font-size: 1rem;
}

.result-accordion-item[open] summary::after {
  content: "–";
}

.result-accordion-content {
  padding: 0 14px 12px;
}

.result-accordion-content p,
.result-accordion-content ul {
  margin-top: 0;
}

.muted-inline {
  color: var(--muted);
  margin: 0;
}

.notes-box,
.match-result-box {
  padding: 14px 16px;
  min-height: 300px;
  line-height: 1.42;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-block-title {
  font-weight: 700;
  margin: 0 0 6px;
  color: #2e2733;
  font-size: 0.96rem;
  line-height: 1.2;
}

.notes-box p,
.match-result-box p {
  margin: 0;
  color: #3f3945;
  line-height: 1.5;
}

.notes-box ul,
.match-result-box ul {
  margin: 4px 0 0 18px;
  padding: 0;
}

.notes-box li,
.match-result-box li {
  margin-bottom: 3px;
  color: #4a4450;
  line-height: 1.42;
}

.summary-card {
  padding: 12px 14px;
  margin-bottom: 0;
}

.highlight-callout {
  margin-top: 0;
  padding: 12px 14px;
}

.highlight-callout-title {
  margin-bottom: 6px;
}

@media (max-width: 780px) {
  .mini-meta-grid {
    grid-template-columns: 1fr;
  }

  .mini-meta-card.full-span {
    grid-column: auto;
  }
}

.summary-card,
.mini-meta-card,
.highlight-callout,
.result-accordion-content {
  white-space: normal;
}

.summary-card p,
.mini-meta-value,
.highlight-callout p,
.result-accordion-content p,
.result-accordion-content li {
  white-space: normal;
  word-break: break-word;
}

.match-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(224,110,159,0.10), rgba(168,141,243,0.10));
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.match-hero-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-label {
  font-size: 1.5rem;
  font-weight: 800;
  color: #9f3865;
  line-height: 1.1;
}

.match-confidence {
  font-size: 0.92rem;
  color: var(--muted);
}

.match-score-badge {
  flex-shrink: 0;
  min-width: 90px;
  height: 90px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid rgba(224,110,159,0.20);
  box-shadow: 0 10px 30px rgba(181, 111, 145, 0.10);
  font-size: 1.5rem;
  font-weight: 800;
  color: #9f3865;
}

.match-score-badge span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

@media (max-width: 640px) {
  .match-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-score-badge {
    width: 78px;
    height: 78px;
    min-width: 78px;
    font-size: 1.25rem;
  }

  .match-label {
    font-size: 1.25rem;
  }
}

.match-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.match-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.match-label {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.match-confidence {
  font-size: 0.95rem;
  color: var(--muted);
}

.match-score-card {
  flex-shrink: 0;
  width: 110px;
  min-height: 96px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 24px rgba(80, 50, 80, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.match-score-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.match-score-max {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

/* Tone variants */
.match-hero.tone-weak {
  background: linear-gradient(135deg, rgba(217,108,124,0.14), rgba(245,220,224,0.65));
}

.match-hero.tone-weak .match-label,
.match-hero.tone-weak .match-score-value {
  color: #b44b5e;
}

.match-hero.tone-partial {
  background: linear-gradient(135deg, rgba(217,153,98,0.16), rgba(255,238,224,0.72));
}

.match-hero.tone-partial .match-label,
.match-hero.tone-partial .match-score-value {
  color: #b26a2f;
}

.match-hero.tone-good {
  background: linear-gradient(135deg, rgba(224,110,159,0.10), rgba(168,141,243,0.12));
}

.match-hero.tone-good .match-label,
.match-hero.tone-good .match-score-value {
  color: #9f3865;
}

.match-hero.tone-strong {
  background: linear-gradient(135deg, rgba(87,184,148,0.16), rgba(218,245,233,0.75));
}

.match-hero.tone-strong .match-label,
.match-hero.tone-strong .match-score-value {
  color: #2e8d68;
}

@media (max-width: 640px) {
  .match-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-score-card {
    width: 100%;
    min-height: 84px;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
  }

  .match-score-max {
    margin-top: 0;
  }
}

/* ===== Match hero clean version ===== */

.match-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.match-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.match-label {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.match-confidence {
  font-size: 0.95rem;
  color: var(--muted);
}

.match-score-card {
  flex-shrink: 0;
  width: 110px;
  min-height: 96px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 10px 24px rgba(80, 50, 80, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.match-score-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.match-score-max {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
}

/* tone variants */
.match-hero.tone-weak {
  background: linear-gradient(135deg, rgba(217,108,124,0.14), rgba(245,220,224,0.65));
}

.match-hero.tone-weak .match-label,
.match-hero.tone-weak .match-score-value {
  color: #b44b5e;
}

.match-hero.tone-partial {
  background: linear-gradient(135deg, rgba(217,153,98,0.16), rgba(255,238,224,0.72));
}

.match-hero.tone-partial .match-label,
.match-hero.tone-partial .match-score-value {
  color: #b26a2f;
}

.match-hero.tone-good {
  background: linear-gradient(135deg, rgba(224,110,159,0.12), rgba(168,141,243,0.14));
}

.match-hero.tone-good .match-label,
.match-hero.tone-good .match-score-value {
  color: #9f3865;
}

.match-hero.tone-strong {
  background: linear-gradient(135deg, rgba(87,184,148,0.16), rgba(218,245,233,0.75));
}

.match-hero.tone-strong .match-label,
.match-hero.tone-strong .match-score-value {
  color: #2e8d68;
}

@media (max-width: 640px) {
  .match-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-score-card {
    width: 100%;
    min-height: 84px;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
  }

  .match-score-max {
    margin-top: 0;
  }
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.user-card.hidden {
  display: none;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.user-email {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.2;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.history-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.history-card.full-width {
  grid-column: 1 / -1;
}

.history-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
}

.history-item-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-item-title {
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.history-item-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.history-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  color: var(--muted);
}

.status-badge.completed {
  color: #2e8d68;
  background: rgba(87,184,148,0.10);
}

.status-badge.processing {
  color: #694ec8;
  background: rgba(168,141,243,0.12);
}

.status-badge.failed {
  color: #b44b5e;
  background: rgba(217,108,124,0.12);
}

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

  .history-card.full-width {
    grid-column: auto;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-item-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.usage-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
}

.usage-banner.hidden {
  display: none;
}

.usage-banner.warning {
  background: rgba(217,153,98,0.12);
  border-color: rgba(217,153,98,0.28);
}

.usage-banner.blocked {
  background: rgba(217,108,124,0.12);
  border-color: rgba(217,108,124,0.28);
}

.usage-text {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.4;
}

.usage-banner {
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.usage-banner.updated {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 28px rgba(224, 110, 159, 0.18);
}

.demo-loader {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  max-width: 420px;
}

.demo-loader-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.demo-loader-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #5a5560;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.upload-zone.disabled {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.1);
}

.upload-zone.disabled:hover {
  transform: none;
  border-color: var(--border-strong);
  background: linear-gradient(135deg, rgba(224,110,159,0.05), rgba(168,141,243,0.07));
}

.guest-upload-note {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.demo-loader {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
}

.demo-loader-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
}

.demo-loader-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #5a5560;
  font-size: 0.95rem;
  line-height: 1.5;
}

.usage-banner {
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.usage-banner.updated {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 28px rgba(224, 110, 159, 0.18);
}

.pricing-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-page-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.pricing-page-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.pricing-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-card-pro {
  border-color: rgba(168, 141, 243, 0.35);
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(250,244,255,0.98));
}

.pricing-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(168, 141, 243, 0.12);
  color: #694ec8;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.pricing-price {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.pricing-price span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.pricing-features {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #463f4a;
}

.pricing-faq {
  margin-top: 18px;
}

.pricing-faq-list {
  display: grid;
  gap: 18px;
}

.pricing-faq-title {
  font-weight: 700;
  margin-bottom: 6px;
}

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

.usage-upgrade-link {
  margin-left: 10px;
  font-weight: 600;
  color: #6b4eff;
  text-decoration: none;
}

.usage-upgrade-link:hover {
  text-decoration: underline;
}

.wrong-doc-callout {
  background: rgba(217, 108, 124, 0.08);
  border: 1px solid rgba(217, 108, 124, 0.18);
}

.wrong-doc-callout .highlight-callout-title {
  color: #b44b5e;
}

.plan-status-label {
  width: 100%;
  padding: 13px 18px;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.pricing-card-pro .plan-status-label {
  background: rgba(168, 141, 243, 0.10);
  color: #694ec8;
  border-color: rgba(168, 141, 243, 0.20);
}

.plan-status-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  margin-top: auto;
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid var(--border);
  background: #fffdfd;
  color: var(--muted);
  box-sizing: border-box;
}

.pricing-card-pro .plan-status-label {
  background: rgba(168, 141, 243, 0.10);
  color: #694ec8;
  border-color: rgba(168, 141, 243, 0.20);
}

.brand-logo-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  line-height: 1;
}

/* Signal */
.brand-signal {
  background: linear-gradient(135deg, #7a5cff, #9d7bff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 12px;
  opacity: 0.7;
}

/* 2 (акцент) */
.brand-two {
  margin: 0 2px;
  background: linear-gradient(135deg, #ff4d8d, #ff7ab6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hire */
.brand-hire {
  background: linear-gradient(135deg, #7a5cff, #5ac8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
}
.brand-logo-text {
  letter-spacing: -0.5px;
  line-height: 1.2;
  cursor: default;
  user-select: none;
}

.brand-logo-text:hover {
  opacity: 0.9;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-wrap {
  gap: 10px;
}

.hero-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.8;
}

.demo-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.value-points {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.value-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.floating-success-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  background: #ffffff;
  color: #2b2433;
  border: 1px solid #ead8e6;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(52, 33, 58, 0.12);
  padding: 14px 18px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-success-banner.visible {
  opacity: 1;
  transform: translateY(0);
}