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

:root {
  --bg:              #0D1117;
  --card:            #161B22;
  --border:          #30363D;
  --border-strong:   #484F58;

  --text:            #E6EDF3;
  --text-2:          #C9D1D9;
  --text-3:          #8B949E;
  --text-4:          #484F58;

  --accent:          #8B5CF6;
  --accent-light:    #2D1B69;

  --strength:        #3FB950;
  --strength-bg:     #0B2414;
  --strength-border: #1A3A20;

  --critical:        #F85149;
  --critical-bg:     #2D0F0E;
  --critical-badge:  #3D1210;

  --high:            #F0883E;
  --high-bg:         #2D1500;
  --high-badge:      #3D1E00;

  --medium:          #D29922;
  --medium-bg:       #2D2000;
  --medium-badge:    #3D2C00;

  --header-bg:       #010409;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.5), 0 4px 6px rgba(0,0,0,.3);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.hidden { display: none !important; }

/* ─── Header ─────────────────────────────────────────── */
.header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark     { font-size: 20px; color: #A78BFA; }
.brand-name     { font-size: 16px; font-weight: 600; color: #F0F6FF; letter-spacing: -.2px; }
.brand-tagline  { font-size: 13px; color: #3D444D; }

/* ─── Screens ─────────────────────────────────────────── */
.screen    { min-height: calc(100vh - 58px); }
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ─── Input Screen ────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 72px 0 48px;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--text);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-3);
  max-width: 460px;
  margin: 0 auto;
}

.input-form {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 100px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-current { background: var(--text-4); }
.dot-new     { background: var(--accent); }

.url-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}

.url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,.2);
}

.url-input::placeholder { color: var(--text-4); }

.input-arrow {
  font-size: 22px;
  color: var(--text-4);
  padding-bottom: 4px;
  line-height: 52px;
}

.analyze-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 12px rgba(139,92,246,.4);
}

.analyze-btn:hover  { background: #7C3AED; }
.analyze-btn:active { transform: scale(.99); }
.analyze-btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-icon { font-size: 18px; transition: transform .2s; }
.analyze-btn:hover .btn-icon { transform: translateX(4px); }

/* ─── Loading Screen ──────────────────────────────────── */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 58px);
}

.loading-content { text-align: center; }

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 28px;
}

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

.loading-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
}

.loading-steps {
  display: inline-flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-4);
  transition: color .3s;
}

.loading-step.active { color: var(--text-2); }
.loading-step.done   { color: var(--strength); }

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background .3s;
}

.loading-step.active .step-dot {
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}

.loading-step.done .step-dot { background: var(--strength); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.75); }
}

/* ─── Results Screen ──────────────────────────────────── */
.results-container {
  padding-top: 40px;
  padding-bottom: 80px;
}

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

.audit-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
  line-height: 1.2;
}

.audit-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 5px;
}

.audit-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.new-audit-btn,
.export-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.new-audit-btn {
  color: var(--text-3);
  background: var(--card);
  border: 1.5px solid var(--border);
}

.new-audit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.export-btn {
  color: var(--text-2);
  background: var(--card);
  border: 1.5px solid var(--border);
}

.export-btn:hover {
  border-color: var(--strength);
  color: var(--strength);
}

/* Site tabs */
.site-tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.site-tab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  transition: background .15s;
  font-family: inherit;
  text-align: left;
}

.site-tab:hover  { background: rgba(255,255,255,.04); }
.site-tab.active { background: #1C2128; }

.tab-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 2px 8px;
  border-radius: 4px;
}

.tab-badge-current                  { background: #21262D; color: #8B949E; }
.site-tab.active .tab-badge-current { background: #30363D; color: #C9D1D9; }

.tab-badge-new                  { background: var(--accent-light); color: #A78BFA; }
.site-tab.active .tab-badge-new { background: #3D2B8E; color: #C4B5FD; }

.tab-domain {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-4);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-tab.active .tab-domain { color: var(--text-3); }

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex: 1;
  box-shadow: var(--shadow);
}

.stat-num   { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 13px; font-weight: 500; color: var(--text-3); }

.stat-strength { border-left: 3px solid var(--strength); }
.stat-strength .stat-num { color: var(--strength); }

.stat-weakness { border-left: 3px solid var(--border-strong); }
.stat-weakness .stat-num { color: var(--text-2); }

.stat-critical { border-left: 3px solid var(--critical); }
.stat-critical .stat-num { color: var(--critical); }

/* Audit sections */
.audit-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.section-header-strength {
  background: var(--strength-bg);
  border-bottom-color: var(--strength-border);
}

.section-header-weakness { background: #1C2128; }

.section-icon  { font-size: 17px; font-weight: 700; }
.section-header-strength .section-icon { color: var(--strength); }
.section-header-weakness .section-icon { color: var(--critical); }
.section-title { font-size: 14px; font-weight: 600; color: var(--text); }

/* Strengths grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.strength-item {
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.strength-item:last-child {
  border-right: none;
  border-bottom: none;
}

.item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.item-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.55;
}

/* Weakness filters */
.weakness-filters {
  display: flex;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: #1C2128;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }

.filter-btn.active                 { background: var(--text-2);  color: var(--header-bg); border-color: var(--text-2); }
.filter-btn.filter-critical.active { background: var(--critical); color: #fff; border-color: var(--critical); }
.filter-btn.filter-high.active     { background: var(--high);     color: #fff; border-color: var(--high); }
.filter-btn.filter-medium.active   { background: var(--medium);   color: #fff; border-color: var(--medium); }

.filter-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,.12);
  padding: 1px 6px;
  border-radius: 10px;
}

.filter-btn:not(.active) .filter-count { background: var(--border); color: var(--text-4); }

/* Weakness list */
.weakness-item {
  display: flex;
  gap: 14px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.weakness-item:last-child  { border-bottom: none; }
.weakness-item:hover       { background: #1C2128; }
.weakness-item.hidden-item { display: none; }

.severity-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  margin-top: 2px;
  height: fit-content;
  white-space: nowrap;
}

.badge-critical { background: var(--critical-badge); color: var(--critical); }
.badge-high     { background: var(--high-badge);     color: var(--high); }
.badge-medium   { background: var(--medium-badge);   color: var(--medium); }

/* Bottom row */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.verdict-card {
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.verdict-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-4);
  margin-bottom: 12px;
}

.verdict-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
}

.upselling-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.upselling-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upselling-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upselling-item {
  font-size: 13px;
  color: var(--text-2);
  padding: 10px 14px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

/* Error toast */
.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #21262D;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 500px;
  width: calc(100% - 48px);
  animation: slideUp .25s ease;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(16px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.error-icon { font-size: 18px; color: var(--critical); flex-shrink: 0; }
.error-msg  { font-size: 14px; flex: 1; }

.error-close {
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}

.error-close:hover { color: var(--text); }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 680px) {
  .input-row             { grid-template-columns: 1fr; }
  .input-arrow           { display: none; }
  .hero-title            { font-size: 30px; }
  .stats-bar             { flex-direction: column; }
  .bottom-row            { grid-template-columns: 1fr; }
  .audit-header          { flex-direction: column; align-items: stretch; }
  .audit-header-actions  { align-self: flex-start; }
  .site-tabs             { width: 100%; }
  .site-tab              { flex: 1; }
}

/* ─── Mode Selector ──────────────────────────────────── */
.mode-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}

.mode-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.mode-btn.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(139,92,246,.08);
}

.mode-icon { font-size: 15px; }

/* ─── SEO Toggle ──────────────────────────────────────── */
.seo-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s;
  user-select: none;
}

.seo-toggle:hover { border-color: var(--border-strong); }

.seo-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.seo-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.seo-toggle-hint {
  font-size: 12px;
  color: var(--text-4);
  margin-left: auto;
}

/* ─── Security Note ───────────────────────────────────── */
.security-note {
  font-size: 13px;
  color: var(--text-4);
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  line-height: 1.55;
}

/* ─── SEO Section ─────────────────────────────────────── */
.section-header-seo {
  background: #091A2A;
  border-bottom-color: #0D2A40;
}

.section-header-seo .section-icon { color: #38BDF8; }

.seo-score-badge {
  margin-left: auto;
  font-size: 18px;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(56,189,248,.12);
  border: 1px solid rgba(56,189,248,.25);
  padding: 2px 12px;
  border-radius: 6px;
  min-width: 48px;
  text-align: center;
}

.seo-finding {
  display: flex;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.seo-finding:last-child { border-bottom: none; }
.seo-finding:hover      { background: #1C2128; }

.seo-status {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  margin-top: 2px;
  height: fit-content;
  white-space: nowrap;
}

.seo-pass { background: var(--strength-bg); color: var(--strength); }
.seo-warn { background: var(--medium-badge); color: var(--medium); }
.seo-fail { background: var(--critical-badge); color: var(--critical); }

.seo-category {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 3px;
}

.seo-recs-area {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: #0D1117;
}

.seo-recs-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-4);
  margin-bottom: 12px;
}

.seo-recs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-rec-item {
  font-size: 13px;
  color: var(--text-2);
  padding: 9px 14px;
  background: var(--card);
  border-left: 3px solid #38BDF8;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

/* ─── Security Panel ──────────────────────────────────── */
.risk-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  border: 1px solid;
}

.risk-banner.risk-low      { background: #0B2414; border-color: #1A3A20; }
.risk-banner.risk-medium   { background: var(--medium-bg); border-color: #3D2C00; }
.risk-banner.risk-high     { background: var(--high-bg); border-color: #3D1E00; }
.risk-banner.risk-critical { background: var(--critical-bg); border-color: #3D1210; }

.risk-level-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid;
}

.risk-banner.risk-low      .risk-level-badge { background: var(--strength-bg); color: var(--strength); border-color: var(--strength); }
.risk-banner.risk-medium   .risk-level-badge { background: var(--medium-badge); color: var(--medium); border-color: var(--medium); }
.risk-banner.risk-high     .risk-level-badge { background: var(--high-badge); color: var(--high); border-color: var(--high); }
.risk-banner.risk-critical .risk-level-badge { background: var(--critical-badge); color: var(--critical); border-color: var(--critical); }

.risk-summary {
  font-size: 14px;
  line-height: 1.6;
}

.risk-banner.risk-low      .risk-summary { color: #86EFAC; }
.risk-banner.risk-medium   .risk-summary { color: #FDE68A; }
.risk-banner.risk-high     .risk-summary { color: #FDBA74; }
.risk-banner.risk-critical .risk-summary { color: #FCA5A5; }

.section-header-sec-headers { background: #0D1A2D; border-bottom-color: #112236; }
.section-header-sec-headers .section-icon { color: #60A5FA; }

.header-score {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}

.header-check {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.header-check:last-child { border-bottom: none; }
.header-check:hover      { background: #1C2128; }

.hc-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.hc-pass { background: var(--strength-bg); color: var(--strength); }
.hc-fail { background: var(--critical-badge); color: var(--critical); }
.hc-warn { background: var(--high-badge); color: var(--high); }
.hc-info { background: #1A2A3A; color: #60A5FA; }

.hc-body { min-width: 0; }

.hc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.hc-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.45;
}

.hc-value {
  font-size: 11px;
  color: var(--text-4);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.sec-finding {
  display: flex;
  gap: 14px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.sec-finding:last-child { border-bottom: none; }
.sec-finding:hover      { background: #1C2128; }

/* ─── Print / PDF Export ──────────────────────────────── */
@media print {
  /* Light theme for print */
  :root {
    --bg:              #FFFFFF;
    --card:            #FFFFFF;
    --border:          #DEE2E8;
    --border-strong:   #C5CCD6;
    --text:            #0F172A;
    --text-2:          #334155;
    --text-3:          #64748B;
    --text-4:          #94A3B8;
    --strength:        #047857;
    --strength-bg:     #F0FDF4;
    --strength-border: #BBF7D0;
    --critical:        #B91C1C;
    --critical-badge:  #FEE2E2;
    --high:            #C2410C;
    --high-badge:      #FFEDD5;
    --medium:          #92400E;
    --medium-badge:    #FEF3C7;
    --header-bg:       #F8FAFC;
    --accent:          #6D28D9;
    --shadow:          none;
    --shadow-md:       none;
  }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  body { background: #fff; }

  .header           { position: static; border-bottom: 2px solid #0F172A; background: #fff !important; }
  .brand-name       { color: #0F172A !important; }
  .brand-tagline    { color: #64748B !important; }
  .brand-mark       { color: #6D28D9 !important; }

  .audit-header-actions,
  .site-tabs,
  .weakness-filters,
  .error-toast      { display: none !important; }

  .screen           { min-height: unset; }
  #inputScreen,
  #loadingScreen    { display: none !important; }
  #resultsScreen    { display: block !important; }

  .results-container { padding-top: 24px; padding-bottom: 24px; }

  /* Show all weaknesses regardless of filter */
  .weakness-item.hidden-item { display: flex !important; }

  .audit-section,
  .stat-item,
  .verdict-card,
  .upselling-card   { box-shadow: none; border: 1px solid #DEE2E8; }

  .section-header-weakness { background: #F8FAFC !important; }
  .weakness-item:hover     { background: transparent !important; }
  .upselling-item          { background: #F8FAFC !important; }

  .verdict-card  { background: #F8FAFC !important; }
  .verdict-label { color: #94A3B8 !important; }
  .verdict-text  { color: #334155 !important; }

  .bottom-row { page-break-inside: avoid; }
  .audit-section { page-break-inside: avoid; }

  .header-auth,
  #historyScreen { display: none !important; }
}

/* ─── Hero extras ────────────────────────────────────── */
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-ai-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #A78BFA;
  background: var(--accent-light);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 4px;
  padding: 1px 7px;
  vertical-align: middle;
  margin-left: 2px;
}

.hero-sample-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-3);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.hero-sample-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Features strip ──────────────────────────────────── */
.features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 60px;
  padding-top: 8px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.4;
}

.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 12px;
  color: var(--text-4);
  line-height: 1.55;
}

@media (max-width: 680px) {
  .features-strip { grid-template-columns: 1fr; }
}

/* ─── Sample badge ────────────────────────────────────── */
.sample-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--medium-badge);
  color: var(--medium);
  border: 1px solid var(--medium);
  flex-shrink: 0;
  align-self: center;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}

.footer-text {
  font-size: 13px;
  color: var(--text-4);
}

.footer-link {
  color: var(--text-4);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .15s;
}

.footer-link:hover { color: var(--accent); }

@media print {
  .footer { display: none; }
}

/* ─── Header Auth Area ────────────────────────────────── */
.header-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.header-btn-ghost {
  color: var(--text-3);
  background: none;
  border: 1px solid var(--border);
}
.header-btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.header-btn-solid {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
}
.header-btn-solid:hover { background: #7C3AED; }

.header-user-email {
  font-size: 13px;
  color: var(--text-3);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Auth Modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all .15s;
}
.modal-close:hover { color: var(--text); background: var(--bg); }

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 16px 24px 0;
  gap: 4px;
}

.modal-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.modal-form { padding: 24px; }

.modal-field { margin-bottom: 16px; }

.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.modal-input::placeholder { color: var(--text-4); }

.modal-error {
  font-size: 13px;
  color: var(--critical);
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--critical-bg);
  border: 1px solid var(--critical-badge);
  border-radius: 6px;
  line-height: 1.5;
}

.modal-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.modal-submit:hover    { background: #7C3AED; }
.modal-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ─── History Screen ──────────────────────────────────── */
.history-container {
  padding-top: 40px;
  padding-bottom: 80px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.history-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text);
}

.history-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--text-4);
  font-size: 15px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.history-item:hover { border-color: var(--border-strong); }

.history-mode-icon {
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-urls {
  font-size: 13px;
  color: var(--text-2);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 5px;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-4);
}

.history-mode-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-light);
  color: #A78BFA;
}

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

.history-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-3);
  white-space: nowrap;
}
.history-btn:hover              { border-color: var(--border-strong); color: var(--text); }
.history-btn-view:hover         { border-color: var(--accent);   color: var(--accent); }
.history-btn-download:hover     { border-color: var(--strength); color: var(--strength); }
.history-btn-delete:hover       { border-color: var(--critical); color: var(--critical); }

@media (max-width: 680px) {
  .history-actions { flex-wrap: wrap; }
  .header-user-email { display: none; }
}
