:root {
  --ph-blue-700: #1d4ed8;
  --ph-blue-600: #2563eb;
  --ph-blue-100: #dbeafe;
  --ph-blue-50: #eff6ff;
  --ph-slate-50: #f8fafc;
  --ph-slate-100: #f1f5f9;
  --ph-slate-200: #e2e8f0;
  --ph-slate-600: #475569;
  --ph-slate-900: #0f172a;
  --ph-green: #16a34a;
  --ph-red: #dc2626;
  --bs-primary: var(--ph-blue-600);
  --bs-body-font-family: 'Inter', -apple-system, sans-serif;
}

body { color: var(--ph-slate-900); background: #fff; }
h1, h2, h3, h4, .ph-logo { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

.ph-navbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--ph-slate-200); }
.ph-navbar nav a { color: var(--ph-slate-600); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.ph-logo { font-weight: 700; font-size: 20px; color: var(--ph-slate-900); }

.btn-primary { background: linear-gradient(135deg, var(--ph-blue-600), var(--ph-blue-700)); border: none; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 20px rgba(37,99,235,.35); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline-primary { border-radius: 999px; font-weight: 600; }

.ph-card { background: var(--ph-slate-50); border: 1px solid var(--ph-slate-200); border-radius: 18px; padding: 26px; }
.ph-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--ph-blue-50); color: var(--ph-blue-700); border: 1px solid var(--ph-blue-100); }

.ph-mono { font-family: 'IBM Plex Mono', 'Courier New', monospace; }

table.ph-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ph-table th { background: var(--ph-blue-600); color: #fff; text-align: left; padding: 10px 12px; }
table.ph-table td { padding: 9px 12px; border-bottom: 1px solid var(--ph-slate-200); }
table.ph-table tr:nth-child(even) td { background: var(--ph-slate-50); }

.ph-hero { padding: 72px 0 40px; text-align: center; }
.ph-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; max-width: 820px; margin: 0 auto; }

.ph-dropzone { border: 2px dashed var(--ph-slate-200); border-radius: 18px; padding: 60px; text-align: center; cursor: pointer; background: var(--ph-slate-50); transition: .15s; }
.ph-dropzone.dragover { border-color: var(--ph-blue-600); background: var(--ph-blue-50); }

.ph-chart-locked { position: relative; }
.ph-chart-locked canvas { filter: blur(5px); }
.ph-watermark-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-20deg, rgba(37,99,235,.08) 0 2px, transparent 2px 140px);
  pointer-events: none;
}
.ph-watermark-overlay span {
  color: rgba(37,99,235,.55); font-weight: 700; font-size: 22px; transform: rotate(-18deg);
  font-family: 'Space Grotesk', sans-serif;
}

.ph-footer { border-top: 1px solid var(--ph-slate-200); margin-top: 80px; background: var(--ph-slate-50); }
.ph-footer a { display: block; color: var(--ph-slate-600); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.ph-footer-heading { font-weight: 700; font-size: 13px; margin-bottom: 14px; color: var(--ph-slate-600); text-transform: uppercase; letter-spacing: .06em; }
.ph-footer-bottom { border-top: 1px solid var(--ph-slate-200); }

.ph-field-btn { padding: 8px 14px; border-radius: 8px; font-size: 13px; border: 1px solid var(--ph-slate-200); background: #fff; }
.ph-field-btn.active { background: var(--ph-blue-600); color: #fff; border-color: var(--ph-blue-600); }

.ph-suggestion-card { display: block; text-align: left; width: 100%; height: 100%; background: #fff; border: 1px solid var(--ph-slate-200); border-radius: 14px; padding: 18px; cursor: pointer; transition: .15s; }
.ph-suggestion-card:hover { border-color: var(--ph-blue-600); box-shadow: 0 6px 18px rgba(37,99,235,.15); transform: translateY(-2px); }
.ph-suggestion-icon { font-size: 26px; margin-bottom: 8px; }
.ph-suggestion-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ph-suggestion-desc { font-size: 13px; color: var(--ph-slate-600); }

.ph-link-btn { background: none; border: none; padding: 0; color: var(--ph-blue-600); text-decoration: underline; font-size: inherit; cursor: pointer; }

.ph-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
  background: #fff; border-top: 1px solid var(--ph-slate-200);
  box-shadow: 0 -4px 24px rgba(15,23,42,.08); padding: 18px 16px;
}
.ph-cookie-banner-inner {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.ph-cookie-banner-inner p { font-size: 13.5px; color: var(--ph-slate-600); max-width: 640px; margin: 0; }
.ph-cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ph-cookie-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ph-cookie-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.5); }
.ph-cookie-modal-dialog {
  position: relative; background: #fff; border-radius: 16px; padding: 28px;
  max-width: 460px; width: 100%; box-shadow: 0 24px 60px rgba(15,23,42,.25);
}
.ph-cookie-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ph-slate-100); }
.ph-cookie-row:last-of-type { border-bottom: none; }
.ph-cookie-row input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; }

#ph-sample-format-table { background: #fff; border-radius: 8px; overflow: hidden; font-size: 12.5px; }

@media (max-width: 576px) {
  .ph-cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .ph-cookie-banner-actions { justify-content: stretch; }
  .ph-cookie-banner-actions .btn { flex: 1; }
}

/* Upload validation workflow */
.ph-upload-page { max-width: 880px; margin: 0 auto; padding-bottom: 24px; }
.ph-upload-intro { margin-bottom: 18px; }
.ph-upload-intro .ph-badge { margin-bottom: 18px; }
.ph-upload-icon { width: 60px; height: 60px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 18px; background: var(--ph-blue-100); color: var(--ph-blue-700); font-size: 34px; font-weight: 700; }
.ph-progress-card { padding: clamp(20px, 4vw, 38px); background: linear-gradient(145deg, #f8fbff, #fff); }
.ph-progress-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.ph-progress-heading h2 { font-size: clamp(24px, 4vw, 32px); }
.ph-progress-percent { color: var(--ph-blue-700); font: 700 24px 'IBM Plex Mono', monospace; white-space: nowrap; }
.ph-file-details { display: flex; align-items: center; gap: 12px; margin: 28px 0 20px; padding: 14px; background: #fff; border: 1px solid var(--ph-slate-200); border-radius: 12px; }
.ph-file-type-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--ph-blue-600); color: #fff; font-size: 11px; font-weight: 800; }
.ph-progress-track { height: 12px; overflow: hidden; background: var(--ph-blue-100); border-radius: 99px; }
.ph-progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ph-blue-600), #60a5fa); transition: width .35s ease; position: relative; overflow: hidden; }
.ph-progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: ph-shimmer 1.4s infinite; }
@keyframes ph-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ph-progress-stage { margin-top: 12px; color: var(--ph-slate-600); font-size: 14px; font-weight: 600; }
.ph-stage-list { display: grid; gap: 10px; list-style: none; padding: 20px 0 0; margin: 0; color: var(--ph-slate-600); font-size: 14px; }
.ph-stage-list li { display: flex; gap: 10px; align-items: center; transition: color .2s ease; }
.ph-stage-list li.is-complete { color: var(--ph-green); font-weight: 600; }
.ph-stage-list li.is-active { color: var(--ph-blue-700); font-weight: 700; }
.ph-stage-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; font-weight: 800; }
.ph-validation-error, .ph-validation-success { padding: clamp(20px, 4vw, 34px); }
.ph-validation-error { border-color: #fecaca; background: #fffafa; }
.ph-validation-success { border-color: #bbf7d0; background: #f6fff8; }
.ph-validation-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.ph-validation-icon-error { color: #991b1b; background: #fee2e2; }
.ph-validation-icon-success { color: #166534; background: #dcfce7; }
.ph-validation-error h2, .ph-validation-success h2 { font-size: clamp(22px, 4vw, 30px); }
.ph-error-detail { padding: 12px 14px; margin-bottom: 8px; color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; border-radius: 10px; font-size: 14px; }
.ph-format-guidance { padding: clamp(18px, 3vw, 26px); background: #fff; border: 1px solid var(--ph-slate-200); border-radius: 14px; }
.ph-format-guidance h3 { font-size: 19px; margin-bottom: 8px; }
.ph-format-guidance p { color: var(--ph-slate-600); font-size: 14px; }
.ph-example-figure { margin: 22px 0 0; text-align: center; }
.ph-example-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--ph-slate-200); border-radius: 12px; box-shadow: 0 8px 25px rgba(15,23,42,.10); }
.ph-example-figure figcaption { margin-top: 9px; color: var(--ph-slate-600); font-size: 13px; }
.ph-checklist-heading { font-size: 16px; margin: 24px 0 10px; }
.ph-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; list-style: none; padding: 0; margin: 0; color: var(--ph-slate-600); font-size: 14px; }
.ph-checklist li::before { content: '✓'; color: var(--ph-green); font-weight: 800; margin-right: 8px; }
.ph-stat-card { padding: 12px; background: #fff; border: 1px solid var(--ph-slate-200); border-radius: 10px; }
.ph-stat-card .ph-mono { font-size: 18px; color: var(--ph-blue-700); }
.ph-detected-columns { margin-bottom: 20px; }
.ph-detected-columns h3 { font-size: 17px; margin-bottom: 10px; }
.ph-column-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; background: #fff; border: 1px solid var(--ph-slate-200); border-radius: 9px; font-size: 14px; }
.ph-column-card strong { color: var(--ph-blue-700); font-size: 13px; white-space: nowrap; }
@media (max-width: 576px) { .ph-dropzone { padding: 38px 20px; } .ph-progress-heading { flex-direction: column; gap: 6px; } .ph-progress-percent { font-size: 20px; } .ph-checklist { grid-template-columns: 1fr; } .ph-validation-actions .btn { width: 100%; } .ph-column-card { align-items: flex-start; flex-direction: column; gap: 4px; } }

/* Locked preview chart presentation */
.ph-preview-chart-frame { overflow: hidden; border: 1px solid var(--ph-slate-200); border-radius: 16px; background: #f8fafc; box-shadow: 0 10px 28px rgba(15,23,42,.07); }
.ph-preview-chart-frame img { display: block; width: 100%; height: auto; }

/* Suggested-report chart previews */
.ph-suggestion-card { min-height: 280px; }
.ph-suggestion-chart { height: 126px; margin: 14px -2px 8px; padding: 8px; border: 1px solid var(--ph-slate-200); border-radius: 10px; background: linear-gradient(180deg, #fff, var(--ph-slate-50)); }
.ph-suggestion-chart canvas { display: block; width: 100% !important; height: 110px !important; }
.ph-suggestion-type { color: var(--ph-blue-700); font: 600 11px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .04em; }

/* Trustpilot-ready social proof and report feedback */
.ph-trustpilot-card { padding: 18px; border: 1px solid #d9e2f0; border-radius: 14px; background: linear-gradient(145deg, #fff, #f8fbff); }
.ph-trustpilot-stars { color: #00b67a; font-size: 22px; letter-spacing: 2px; line-height: 1; margin-bottom: 10px; }
.ph-trustpilot-link { color: #126b52; font-weight: 700; text-decoration: none; font-size: 14px; }
.ph-trustpilot-link:hover { color: #0b4f3d; text-decoration: underline; }
.ph-feedback-card { background: linear-gradient(145deg, #ffffff, #f8fbff); border-color: var(--ph-blue-100); }
.ph-feedback-eyebrow { color: var(--ph-blue-700); font: 700 11px 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.ph-rating-options { display: flex; align-items: flex-start; gap: 8px; }
.ph-rating-options label { display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; color: #cbd5e1; }
.ph-rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.ph-rating-options span { font-size: 34px; line-height: 1; transition: color .15s ease, transform .15s ease; }
.ph-rating-options label:hover span, .ph-rating-options label:has(input:checked) span { color: #f59e0b; transform: translateY(-2px); }
.ph-rating-options small { min-height: 16px; color: var(--ph-slate-600); font-size: 10px; white-space: nowrap; }
.ph-feedback-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
@media (max-width: 576px) {
  .ph-rating-options { justify-content: space-between; width: 100%; }
  .ph-rating-options span { font-size: 30px; }
}

/* SEO landing pages */
.ph-seo-page { background: #fff; }
.ph-seo-breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--ph-slate-600); }
.ph-seo-breadcrumb a { color: var(--ph-blue-600); text-decoration: none; }
.ph-seo-breadcrumb a:hover { text-decoration: underline; }
.ph-seo-hero { max-width: 850px; }
.ph-seo-eyebrow { color: var(--ph-blue-700); font: 700 12px 'IBM Plex Mono', monospace; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 12px; }
.ph-seo-hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 18px; }
.ph-seo-lede { color: var(--ph-slate-600); font-size: clamp(18px, 2.4vw, 22px); line-height: 1.6; max-width: 800px; }
.ph-seo-section { max-width: 850px; padding: 28px 0; border-top: 1px solid var(--ph-slate-200); }
.ph-seo-section h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin-bottom: 14px; }
.ph-seo-section p, .ph-seo-section li { color: var(--ph-slate-600); font-size: 16px; line-height: 1.75; }
.ph-seo-section ul { padding-left: 22px; }
.ph-seo-section .table-responsive { margin-top: 18px; }
.ph-seo-section .ph-table { background: #fff; }
.ph-seo-step { height: 100%; display: flex; gap: 14px; padding: 18px; border: 1px solid var(--ph-slate-200); border-radius: 14px; background: var(--ph-slate-50); }
.ph-seo-step > span { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--ph-blue-600); color: #fff; font-weight: 700; }
.ph-seo-step h3 { font-size: 17px; margin: 2px 0 6px; }
.ph-seo-step p { font-size: 14px; line-height: 1.6; margin: 0; }
.ph-seo-faq { padding: 18px 0; border-bottom: 1px solid var(--ph-slate-200); }
.ph-seo-faq h3 { font-size: 18px; margin-bottom: 7px; }
.ph-seo-faq p { margin: 0; }
.ph-seo-cta { margin: 34px 0; padding: clamp(26px, 5vw, 52px); border: 1px solid var(--ph-blue-100); border-radius: 18px; background: linear-gradient(145deg, var(--ph-blue-50), #fff); }
.ph-seo-cta h2 { font-size: clamp(24px, 3.5vw, 36px); }
.ph-seo-cta p { color: var(--ph-slate-600); font-size: 16px; }
.ph-seo-related { padding-top: 28px; border-top: 1px solid var(--ph-slate-200); }
.ph-seo-related h2 { font-size: 22px; margin-bottom: 14px; }
.ph-seo-related a { display: block; padding: 13px 15px; border: 1px solid var(--ph-slate-200); border-radius: 10px; color: var(--ph-blue-700); text-decoration: none; font-weight: 600; }
.ph-seo-related a:hover { border-color: var(--ph-blue-600); background: var(--ph-blue-50); }
@media (max-width: 576px) {
  .ph-seo-page .container { padding-top: 30px !important; }
  .ph-seo-hero h1 { font-size: 36px; }
  .ph-seo-section p, .ph-seo-section li { font-size: 15px; }
}
