/*
 * dark-theme-override.css — Premium light-theme styling system for tools & resources
 * This overrides older V1 styles and forces them to match the new Instrument Sans light theme.
 */

:root {
  /* Overrides for style.css variables to map to Pure Editorial Journal system */
  --color-bg: #f7f5f0 !important;
  --color-bg-elevated: #ffffff !important;
  --color-bg-overlay: #ffffff !important;
  --color-bg-card: #ffffff !important;
  
  --color-text-main: #111113 !important;
  --color-text-body: #4a4a52 !important;
  --color-text-muted: #71717a !important;
  --color-link: #8d5b1d !important;
  
  --color-border-soft: rgba(17, 17, 19, 0.12) !important;
  --color-border-strong: rgba(17, 17, 19, 0.22) !important;
  
  --color-primary: #111113 !important;
  --color-primary-glow: rgba(17, 17, 19, 0.04) !important;
  
  --color-accent: #8d5b1d !important;
  --color-accent-glow: rgba(141, 91, 29, 0.12) !important;
  
  --gradient-main: #111113 !important;
  --gradient-main-soft: rgba(17, 17, 19, 0.02) !important;
  --gradient-glow: none !important;
  
  --shadow-card: none !important;
  --shadow-glow: none !important;
  
  --brand-success: #8d5b1d !important;

  /* Force premium typography variable mapping */
  --font-heading: "Fraunces", serif !important;
  --font-body: "Instrument Sans", sans-serif !important;
  --font-mono: "Fragment Mono", monospace !important;
}

/* Base body style reset — Canonical Warm Parchment Ivory (#f7f5f0) */
html, body {
  background-color: #f7f5f0 !important;
  color: #111113 !important;
  font-family: "Instrument Sans", -apple-system, sans-serif !important;
}

/* Clean 56px grid background across all pages */
body {
  background-color: #f7f5f0 !important;
  background-image: 
    linear-gradient(rgba(17, 17, 19, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 19, 0.025) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
  background-position: center top !important;
}

/* Card overrides */
.glass-card, .tool-card, .resource-card, .featured-app {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  color: #0a0a0d !important;
  border-radius: 12px !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.glass-card:hover, .tool-card:hover, .resource-card:hover, .featured-app:hover {
  border-color: rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035), 0 2px 4px rgba(0, 0, 0, 0.015) !important;
}

/* Input / Form styling for light mode */
input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  background-color: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #0a0a0d !important;
  border-radius: 6px !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: #8d5b1d !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(141, 91, 29, 0.15) !important;
}

/* Metric / Result card highlights */
.tool-metric strong {
  color: #8d5b1d !important;
}

/* Buttons */
.btn-outline, .btn-ghost {
  border-color: rgba(17, 17, 19, 0.15) !important;
  color: #111113 !important;
}
.btn-outline:hover, .btn-ghost:hover {
  border-color: #8d5b1d !important;
  color: #8d5b1d !important;
  background: rgba(141, 91, 29, 0.04) !important;
}

.logo {
  color: #0a0a0d !important;
}
.nav-link {
  color: #555560 !important;
}
.nav-link:hover, .nav-link.active {
  color: #0a0a0d !important;
}

/* Highlight boxes */
.highlight-box {
  background: rgba(141, 91, 29, 0.04) !important;
  border: 1px solid rgba(141, 91, 29, 0.15) !important;
}

/* Table overrides */
table {
  border-collapse: collapse;
  width: 100%;
}
th {
  background-color: #ffffff !important;
  color: #0a0a0d !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}
td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  color: #555560 !important;
}
tr:hover td {
  background-color: rgba(0, 0, 0, 0.01) !important;
}

/* Page headers */
body.editorial-premium {
  background-color: #f9f9fb !important;
}

.editorial-premium .page-header,
.editorial-premium .article-header,
.editorial-premium .tool-hero,
.editorial-premium .careers-header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  padding: 110px 0 36px !important;
}

.editorial-premium .hero-title,
.editorial-premium .article-title,
.editorial-premium .careers-title,
.editorial-premium .error-title,
.editorial-premium .page-header .tool-title {
  color: #0a0a0d !important;
  -webkit-text-fill-color: #0a0a0d !important;
  font-size: clamp(2rem, 3.8vw, 2.6rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  max-width: 32ch !important; /* Prevents aggressive line breaks on titles */
}

.editorial-premium .hero-subtitle,
.editorial-premium .blog-subtitle {
  color: #555560 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  max-width: 58ch !important;
}

@media (max-width: 768px) {
  .editorial-premium .page-header,
  .editorial-premium .article-header,
  .editorial-premium .tool-hero,
  .editorial-premium .careers-header {
    padding: 48px 0 24px !important;
  }
}

/* Gradient text */
.editorial-premium .gradient-text,
.home-editorial .gradient-text,
.gradient-text {
  background: linear-gradient(135deg, #0a0a0d 0%, #3a3a45 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block;
}

/* Tool Page Layouts & Component styling for Light Theme */
.tool-layout {
  display: grid !important;
  grid-template-columns: 410px 1fr !important;
  gap: 32px !important;
  align-items: start !important;
  position: relative !important;
  z-index: 2 !important;
}

@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr !important;
  }
}

.tool-card {
  padding: 32px !important;
}

.tool-title {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

.tool-subtitle {
  color: var(--color-text-muted) !important;
  font-size: 0.85rem !important;
  line-height: 1.55 !important;
  margin-bottom: 24px !important;
}

.tool-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

.tool-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}

.tool-field span {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--color-text-main) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.tool-field select,
.tool-field input[type="text"],
.tool-field input[type="number"],
.tool-field input[type="email"] {
  width: 100% !important;
  border-radius: 8px !important;
  border: 1px solid var(--color-border-strong) !important;
  background: #ffffff !important;
  color: var(--color-text-main) !important;
  padding: 11px 14px !important;
  font-size: 0.88rem !important;
  font-family: inherit !important;
  outline: none !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.tool-field select:focus,
.tool-field input[type="text"]:focus,
.tool-field input[type="number"]:focus,
.tool-field input[type="email"]:focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 2px var(--color-accent-glow) !important;
}

.tool-metrics {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 12px !important;
  margin-top: 24px !important;
  margin-bottom: 0 !important;
}

.tool-metric {
  background: var(--color-bg-elevated) !important;
  border: 1px solid var(--color-border-soft) !important;
  border-radius: 10px !important;
  padding: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
  transition: transform 0.2s !important;
}

.tool-metric:hover {
  transform: scale(1.02) !important;
  border-color: var(--color-border-strong) !important;
}

.tool-metric-label {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: var(--color-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 0 !important;
}

.tool-metric strong {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: var(--color-accent) !important;
  font-family: var(--font-mono) !important;
}

.feature-list {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.feature-list li {
  font-size: 0.92rem !important;
  color: var(--color-text-body) !important;
  line-height: 1.6 !important;
  padding-left: 28px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.feature-list li::before {
  display: none !important;
}

.feature-list li i {
  position: absolute !important;
  left: 0 !important;
  color: var(--color-accent) !important;
  width: 18px !important;
  height: 18px !important;
}

/* Submit button styling */
.tool-card button[type="submit"] {
  width: 100% !important;
  justify-content: center !important;
  padding: 12px 20px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
}

