/* MyIndiaSpeedPost site-wide visual consistency layer.
   Loaded after shared and page-specific styles. Intentionally avoids changing layout internals,
   tracking states, form behaviour, scripts, or content structure. */
:root {
  --misp-orange: #e87518;
  --misp-orange-dark: #b74608;
  --misp-orange-deep: #7c2d12;
  --misp-ink: #27313b;
  --misp-muted: #596574;
  --misp-canvas: #f8fafc;
  --misp-warm-border: #efcfb9;
  --misp-soft-border: #f0dfd2;
  --misp-warm-surface: #fffaf5;
}
html { scroll-behavior: smooth; }
body { background-color: var(--misp-canvas); color: var(--misp-ink); }
/* Match index.php's outer page frame while retaining each page's own internal layout. */
main[role="main"] {
  width: calc(100% - 32px) !important;
  max-width: 1120px !important;
  margin: 24px auto 40px !important;
  border: 1px solid var(--misp-warm-border) !important;
  border-radius: 24px !important;
  background-color: #fff;
  box-shadow: 0 16px 42px rgba(112, 58, 21, .08) !important;
}
main.homepage-frame { width: calc(100% - 32px) !important; max-width: 1120px !important; margin: 24px auto 40px !important; }
main[role="main"] h1 { color: var(--misp-ink); letter-spacing: -.025em; text-wrap: balance; }
main[role="main"] h2, main[role="main"] h3 { text-wrap: balance; }
main[role="main"] p { line-height: 1.7; }
main[role="main"] img { max-width: 100%; }
main[role="main"] a, footer a { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
main[role="main"] a:focus-visible, main[role="main"] button:focus-visible,
footer a:focus-visible, footer button:focus-visible {
  outline: 3px solid rgba(232, 117, 24, .5) !important; outline-offset: 3px; border-radius: 5px;
}
/* Re-map off-brand blue/pink/purple utility text to the warm orange/slate brand palette.
   Red/green status and validation colors are deliberately preserved. */
main[role="main"] [class*="text-blue-"], main[role="main"] [class*="text-sky-"],
main[role="main"] [class*="text-cyan-"], main[role="main"] [class*="text-indigo-"],
main[role="main"] [class*="text-violet-"], main[role="main"] [class*="text-purple-"],
main[role="main"] [class*="text-pink-"], main[role="main"] [class*="text-rose-"] { color: var(--misp-orange-dark) !important; }
main[role="main"] [class*="hover:text-blue-"]:hover, main[role="main"] [class*="hover:text-sky-"]:hover,
main[role="main"] [class*="hover:text-cyan-"]:hover, main[role="main"] [class*="hover:text-indigo-"]:hover,
main[role="main"] [class*="hover:text-violet-"]:hover, main[role="main"] [class*="hover:text-purple-"]:hover,
main[role="main"] [class*="hover:text-pink-"]:hover, main[role="main"] [class*="hover:text-rose-"]:hover { color: var(--misp-orange-dark) !important; }
main[role="main"] [class*="hover:border-blue-"]:hover, main[role="main"] [class*="hover:border-sky-"]:hover,
main[role="main"] [class*="hover:border-indigo-"]:hover, main[role="main"] [class*="hover:border-purple-"]:hover,
main[role="main"] [class*="hover:border-pink-"]:hover, main[role="main"] [class*="hover:border-rose-"]:hover { border-color: #efb58e !important; }
main[role="main"] [class*="bg-blue-"], main[role="main"] [class*="bg-sky-"],
main[role="main"] [class*="bg-cyan-"], main[role="main"] [class*="bg-indigo-"],
main[role="main"] [class*="bg-violet-"], main[role="main"] [class*="bg-purple-"],
main[role="main"] [class*="bg-pink-"], main[role="main"] [class*="bg-rose-"] { background-color: #fff3e8 !important; }
main[role="main"] [class*="border-blue-"], main[role="main"] [class*="border-sky-"],
main[role="main"] [class*="border-cyan-"], main[role="main"] [class*="border-indigo-"],
main[role="main"] [class*="border-violet-"], main[role="main"] [class*="border-purple-"],
main[role="main"] [class*="border-pink-"], main[role="main"] [class*="border-rose-"] { border-color: #f2d3be !important; }
/* Footer is shared across the site: consistent warm dark background, readable text, and clear hover/click states. */
footer.sp-bg-orange-900, footer {
  border-color: transparent;
}
footer.sp-bg-orange-900 { background-color: var(--misp-orange-deep) !important; color: #ffedd5 !important; }
footer.sp-bg-orange-900 nav, footer.sp-bg-orange-900 nav span,
footer.sp-bg-orange-900 nav a, footer.sp-bg-orange-900 p { color: #ffedd5 !important; }
footer.sp-bg-orange-900 nav a:hover, footer.sp-bg-orange-900 nav a:focus,
footer.sp-bg-orange-900 nav a:focus-visible { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
footer.sp-bg-orange-900 nav a:active { color: #fed7aa !important; text-decoration: underline; }
footer.sp-bg-orange-900 .border { border-color: rgba(255, 237, 213, .35) !important; }
/* Avoid image overflow and horizontal page scroll on narrow devices. */
@media (max-width: 640px) {
  main[role="main"], main.homepage-frame { width: calc(100% - 16px) !important; margin: 14px auto 24px !important; border-radius: 18px !important; }
  main[role="main"] { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main[role="main"] a, footer a { transition: none !important; }
}
