/**
 * Instagram DP Downloader – Stylesheet
 * Pure CSS3 with CSS Variables for Dark & Light Themes
 * Mobile-First, Accessible, Zero External Frameworks
 */

:root {
  /* Light Theme Colors */
  --bg-color: #f8fafc;
  --surface-card: #ffffff;
  --surface-elevated: #f1f5f9;
  --surface-hover: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* Instagram-inspired Gradient Accents */
  --ig-gradient: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --ig-gradient-soft: linear-gradient(135deg, rgba(240, 148, 51, 0.1) 0%, rgba(220, 39, 67, 0.1) 50%, rgba(188, 24, 136, 0.1) 100%);
  --ig-gradient-border: linear-gradient(135deg, #f09433, #dc2743, #bc1888);
  
  /* Brand & Status Colors */
  --primary-color: #dc2743;
  --primary-hover: #c41e3a;
  --primary-text: #ffffff;
  --success-color: #10b981;
  --success-bg: #ecfdf5;
  --error-color: #ef4444;
  --error-bg: #fef2f2;
  --warning-color: #f59e0b;
  --warning-bg: #fffbeb;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px -5px rgba(220, 39, 67, 0.25);

  /* Radius & Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --container-max: 1100px;
  --tool-max: 680px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
  /* Dark Charcoal Theme Colors */
  --bg-color: #0b0f17;
  --surface-card: #151c28;
  --surface-elevated: #1e293b;
  --surface-hover: #263346;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #243042;
  --border-focus: #60a5fa;

  --ig-gradient-soft: linear-gradient(135deg, rgba(240, 148, 51, 0.15) 0%, rgba(220, 39, 67, 0.15) 50%, rgba(188, 24, 136, 0.15) 100%);
  --success-bg: rgba(16, 185, 129, 0.15);
  --error-bg: rgba(239, 68, 68, 0.15);
  --warning-bg: rgba(245, 158, 11, 0.15);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px -5px rgba(220, 39, 67, 0.35);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Focus Visible Accessibility */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Site Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--surface-card);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 39, 67, 0.3);
}

.brand-text-accent {
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-full);
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.theme-toggle:hover {
  background-color: var(--surface-hover);
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Main Content Area */
main {
  flex: 1;
}

/* Hero Section */
.hero-section {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--ig-gradient-soft);
  border: 1px solid rgba(220, 39, 67, 0.2);
  color: var(--text-main);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary-color);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2rem;
}

/* Tool Box Container */
.tool-box {
  max-width: var(--tool-max);
  margin: 0 auto;
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tool-box:focus-within {
  border-color: rgba(220, 39, 67, 0.4);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Search Form */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-prefix {
  position: absolute;
  left: 1rem;
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 3.5rem;
  padding: 0 5.5rem 0 2.75rem;
  font-size: 1rem;
  color: var(--text-main);
  background-color: var(--surface-elevated);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--surface-card);
}

.input-actions {
  position: absolute;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-icon-action:hover {
  background-color: var(--surface-hover);
  color: var(--text-main);
}

.btn-submit {
  width: 100%;
  height: 3.25rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--ig-gradient);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.4);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.trust-badges {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.trust-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-badge-item svg {
  color: var(--success-color);
  width: 1rem;
  height: 1rem;
}

/* Status & Alert Messages */
.status-container {
  max-width: var(--tool-max);
  margin: 1.5rem auto 0;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.alert-error {
  background-color: var(--error-bg);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert-error {
  color: #fca5a5;
}

.alert-info {
  background-color: var(--surface-elevated);
  color: var(--text-main);
  border-color: var(--border-color);
}

.alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

/* Loading Spinner */
.loading-box {
  padding: 2rem;
  text-align: center;
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--surface-hover);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

.loading-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Results Card */
.results-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.avatar-preview-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  padding: 4px;
  background: var(--ig-gradient);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.avatar-preview-wrap:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.avatar-preview-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--surface-elevated);
  border: 3px solid var(--surface-card);
  display: block;
}

.avatar-zoom-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 2.25rem;
  height: 2.25rem;
  background-color: var(--surface-card);
  color: var(--text-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.profile-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.profile-username-tag {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-external-link {
  font-size: 0.875rem;
  color: var(--primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-external-link:hover {
  text-decoration: underline;
}

.metadata-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.meta-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.meta-pill.verified-hd {
  background: var(--ig-gradient-soft);
  color: var(--primary-color);
  border-color: rgba(220, 39, 67, 0.3);
}

.results-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}

.btn-action-primary {
  flex: 1 1 200px;
  height: 3rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--ig-gradient);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn-action-primary:hover {
  transform: translateY(-1px);
}

.btn-action-secondary {
  flex: 1 1 160px;
  height: 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--surface-elevated);
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-action-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-muted);
}

.btn-search-again {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
}

.btn-search-again:hover {
  color: var(--text-main);
}

/* Modal for Image Enlarging */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.modal-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #111827;
}

.modal-close-btn {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Ad Placement Containers (Ready for future ad units without CLS) */
.ad-slot-container {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 2.5rem auto;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.01);
}

/* Informational Content Sections */
.info-section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 0.95rem;
}

/* How to Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: rgba(220, 39, 67, 0.3);
}

.step-number {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--ig-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

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

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
}

.feature-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--ig-gradient-soft);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Explanation / Callout Box */
.explanation-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.explanation-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.explanation-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.explanation-card ul {
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* FAQ Accordion */
.faq-grid {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(220, 39, 67, 0.25);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-icon-chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.is-open .faq-icon-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.faq-item.is-open .faq-answer {
  max-height: 350px;
  padding-bottom: 1.25rem;
}

/* Disclaimer Banner */
.disclaimer-banner {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 3rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.disclaimer-banner strong {
  color: var(--text-main);
}

/* Legal / Static Documentation Pages */
.legal-page-header {
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--surface-card);
}

.legal-page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-content-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

.legal-prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
}

.legal-prose p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-prose ul {
  padding-left: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--surface-card);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 380px;
  margin-top: 0.75rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

/* Contact Form Specifics */
.contact-form {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--surface-elevated);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--surface-card);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .header-inner {
    height: 3.5rem;
  }
  .tool-box {
    padding: 1.25rem;
  }
  .hero-section {
    padding: 2rem 0 1.5rem;
  }
  .results-card {
    padding: 1.5rem 1rem;
  }
  .avatar-preview-wrap {
    width: 160px;
    height: 160px;
  }
  .nav-links {
    gap: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
