/* PhilAuto Complete Standalone Stylesheet (White, Deep Navy, Subtle Orange) */
:root {
  --navy-950: #091322;
  --navy-900: #0F1E36;
  --navy-800: #172B4D;
  --accent-500: #D4551B;
  --accent-600: #B84412;
  --surface: #F7F9FC;
  --border: #E2E8F0;
  --text-main: #0F1E36;
  --text-body: #334155;
  --text-muted: #64748B;
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-sans: "Public Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--font-sans); color: var(--text-main); background: #fff; scroll-behavior: smooth; }
body { margin: 0; line-height: 1.65; color: var(--text-body); background: #fff; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); margin-top: 0; line-height: 1.2; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

/* Header with Dropdown Menus */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-mark { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.025em; color: var(--navy-900); white-space: nowrap; flex-shrink: 0; }
.desktop-nav { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 0.88rem; font-weight: 500; color: #334155; white-space: nowrap; flex-shrink: 0; padding: 8px 0; display: inline-flex; align-items: center; gap: 4px; }
.nav-link:hover, .nav-link.is-active { color: var(--accent-500); text-decoration: underline; text-underline-offset: 8px; }
.caret { font-size: 0.7rem; color: #64748B; }
.nav-dropdown { position: relative; }
.dropdown-menu { position: absolute; left: 0; top: 100%; min-width: 260px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 14px 28px rgba(15,30,54,0.12); list-style: none; padding: 6px 0; margin: 0; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 150ms ease, transform 150ms ease; z-index: 60; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { border-bottom: 1px solid #F1F5F9; }
.dropdown-menu li:last-child { border-bottom: 0; }
.dropdown-menu a { display: block; padding: 10px 16px; font-size: 0.88rem; color: #334155; }
.dropdown-menu a.is-heading { font-weight: 600; color: var(--navy-900); }
.dropdown-menu a:hover { background: var(--surface); color: var(--accent-500); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; font-size: 0.9rem; font-weight: 600; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; white-space: nowrap; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-primary { background: var(--accent-500); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline { background: #fff; color: var(--navy-900); border-color: #CBD5E1; }
.btn-outline:hover { border-color: var(--navy-900); background: var(--surface); }

.mobile-menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; }
.mobile-menu-btn span { width: 20px; height: 2px; background: var(--navy-900); display: block; }
.mobile-nav { border-top: 1px solid var(--border); background: #fff; padding: 12px 24px 20px; display: flex; flex-direction: column; gap: 4px; max-height: 80vh; overflow-y: auto; }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 9px 8px; font-weight: 500; color: var(--navy-900); border-radius: 6px; }
.mobile-nav a:hover { background: var(--surface); }
.mobile-sub-title { margin-top: 12px; padding: 8px 8px 4px; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-top: 1px solid var(--border); }
.mobile-sub-link { font-size: 0.9rem; font-weight: 400 !important; color: #334155 !important; }
.mobile-cta { margin-top: 12px; text-align: center; }

/* Sections & Surfaces */
.section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.section-surface { background: var(--surface); }
.section-navy { background: var(--navy-900); color: #E2E8F0; border-bottom: 0; }
.section-navy h2, .section-navy h3 { color: #fff; }
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 48px 0; }
.page-header h1 { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; }
.page-lead { font-size: 1.08rem; color: #475569; max-width: 68ch; margin: 0; }
.kicker { font-size: 0.85rem; font-weight: 600; color: var(--accent-500); margin-bottom: 10px; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 20px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--navy-900); text-decoration: underline; }
.crumb-sep { margin-right: 8px; color: #94A3B8; }
.breadcrumbs [aria-current="page"] { color: var(--text-body); font-weight: 500; }

/* Hero */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--border); background: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.15rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin-bottom: 18px; }
.hero-desc { font-size: 1.08rem; color: #475569; max-width: 56ch; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-meta { padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--navy-900); min-height: 320px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Search */
.search-wrap { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); max-width: 760px; }
.search-input { width: 100%; padding: 13px 16px; font-size: 0.95rem; border: 1px solid #CBD5E1; border-radius: 6px; font-family: inherit; color: var(--navy-900); background: #fff; }
.search-input:focus { border-color: var(--navy-900); outline: none; }
.search-results { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 10px 24px rgba(15,30,54,0.08); overflow: hidden; }
.search-results[hidden] { display: none; }
.search-result-item { display: block; padding: 14px 16px; border-bottom: 1px solid #F1F5F9; }
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: var(--surface); }
.search-result-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.search-result-title { font-weight: 600; color: var(--navy-900); font-size: 0.94rem; }

/* Grids & Cards */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 8px; }
.section-head p { margin: 0; color: #475569; max-width: 64ch; }
.text-link { font-size: 0.9rem; font-weight: 600; color: var(--accent-500); white-space: nowrap; }
.text-link:hover { color: var(--accent-600); text-decoration: underline; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 160ms ease; }
.card:hover { border-color: var(--navy-900); }
.card-img-wrap { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-900); border-bottom: 1px solid var(--border); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.card:hover .card-img-wrap img { transform: scale(1.02); }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-num { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--accent-500); margin-bottom: 6px; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.card h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 0.9rem; color: #475569; margin: 0 0 16px; }
.card-cta { font-size: 0.88rem; font-weight: 600; color: var(--navy-900); }
.card:hover .card-cta { color: var(--accent-500); }

/* Filter Bar */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { padding: 8px 14px; font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border); background: #fff; color: #334155; border-radius: 6px; cursor: pointer; font-family: inherit; }
.filter-btn:hover { border-color: var(--navy-900); color: var(--navy-900); }
.filter-btn.is-active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* Editorial Content Layout */
.content-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
.prose { max-width: 74ch; }
.prose section { scroll-margin-top: 84px; }
.prose p { font-size: 1.03rem; line-height: 1.75; margin: 0 0 1.2rem; color: #334155; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 0.9rem; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.18rem; margin: 1.6rem 0 0.65rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.45rem; }

.figure-block { margin: 28px 0; }
.figure-frame { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--navy-900); }
.figure-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.figure-frame.is-svg img { aspect-ratio: auto; object-fit: contain; }
.figure-block figcaption { margin-top: 8px; font-size: 0.86rem; color: var(--text-muted); }

.safety-box, .editorial-box { margin: 32px 0; padding: 24px; border: 1px solid #CBD5E1; border-radius: 8px; background: var(--surface); }
.safety-box h3, .editorial-box h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--navy-900); }
.safety-box ul { margin: 0; padding-left: 1.3rem; font-size: 0.94rem; }
.editorial-box p { font-size: 0.9rem; margin-bottom: 12px; }
.editorial-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.84rem; font-weight: 600; }
.editorial-links a { text-decoration: underline; color: var(--navy-900); }
.editorial-links a:hover { color: var(--accent-500); }

.table-card { margin: 24px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.table-caption { padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 0.84rem; font-weight: 600; color: var(--navy-900); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
th { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); background: #fff; }
tbody tr:last-child td { border-bottom: 0; }

/* Sidebar */
.sidebar-box { border: 1px solid var(--border); border-radius: 10px; padding: 24px; background: #fff; margin-bottom: 24px; }
.sidebar-box.is-surface { background: var(--surface); }
.sidebar-box.is-navy { background: var(--navy-900); color: #E2E8F0; border-color: var(--navy-900); }
.sidebar-box.is-navy h2 { color: #fff; }
.sidebar-box h2 { font-size: 1.05rem; margin-bottom: 14px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { padding: 9px 0; border-bottom: 1px solid #F1F5F9; font-size: 0.9rem; }
.sidebar-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.sidebar-list a { font-weight: 600; color: var(--navy-900); }
.sidebar-list a:hover { color: var(--accent-500); }

/* FAQ Accordion */
.faq-list { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-btn { width: 100%; background: #fff; border: 0; padding: 18px 22px; text-align: left; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--navy-900); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-btn:hover { background: var(--surface); }
.faq-answer { padding: 0 22px 18px; font-size: 0.95rem; color: #475569; }
.faq-answer[hidden] { display: none; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--navy-900); margin-bottom: 6px; }
.form-control { width: 100%; padding: 11px 14px; font-size: 0.95rem; font-family: inherit; border: 1px solid #CBD5E1; border-radius: 6px; color: var(--navy-900); background: #fff; }
.form-control:focus { border-color: var(--navy-900); outline: none; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 6px; font-size: 0.9rem; font-weight: 500; }
.form-status.is-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.form-status.is-success { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.hp-field { display: none !important; }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 900px; margin: 0 auto; z-index: 60; background: var(--navy-900); color: #E2E8F0; border: 1px solid #334155; border-radius: 10px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: 0 18px 36px rgba(9,19,34,0.28); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 0.86rem; line-height: 1.5; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn-outline { padding: 8px 14px; border-radius: 6px; border: 1px solid #64748B; background: transparent; color: #E2E8F0; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.cookie-btn-primary { padding: 8px 16px; border-radius: 6px; border: 0; background: var(--accent-500); color: #fff; font-size: 0.82rem; font-weight: 600; cursor: pointer; }

/* Footer */
.site-footer { background: var(--navy-900); color: #CBD5E1; padding: 56px 0 36px; border-top: 1px solid #1E3A5F; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(148,163,184,0.22); }
.footer-logo { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: #fff; display: inline-block; margin-bottom: 12px; }
.footer-summary { font-size: 0.9rem; line-height: 1.6; margin: 0 0 16px; }
.footer-contact p { margin: 4px 0; font-size: 0.88rem; }
.site-footer h2 { color: #fff; font-size: 0.92rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 0.88rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.8rem; color: #94A3B8; }
.footer-meta-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* Key Takeaways, Archive History, Prev/Next & Maintenance Tool */
.takeaways-box { margin: 24px 0 28px; padding: 20px 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.takeaways-box h2 { margin: 0 0 10px !important; font-size: 1.05rem !important; color: var(--navy-900); }
.takeaways-box ul { margin: 0; padding-left: 1.25rem; font-size: 0.94rem; }
.ref-list { margin: 12px 0 16px; padding-left: 1.25rem; font-size: 0.88rem; }
.ref-list a { color: var(--navy-900); text-decoration: underline; }
.ref-list a:hover { color: var(--accent-500); }
.prev-next-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.prev-next-card { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 8px; background: #fff; transition: border-color 150ms ease; }
.prev-next-card:hover { border-color: var(--navy-900); }
.prev-next-label { font-size: 0.76rem; font-weight: 600; color: var(--accent-500); margin-bottom: 4px; }
.prev-next-title { font-size: 0.94rem; font-weight: 700; color: var(--navy-900); line-height: 1.35; }
.print-btn { padding: 6px 12px; font-size: 0.82rem; font-weight: 600; border: 1px solid #CBD5E1; background: #fff; color: var(--navy-900); border-radius: 6px; cursor: pointer; font-family: inherit; }
.print-btn:hover { border-color: var(--navy-900); background: var(--surface); }
.year-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.year-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.tool-panel { border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 24px; }
.tool-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.tool-task-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tool-task-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; background: var(--surface); }
.tool-task-card.is-due { background: #FFF7ED; border-color: #FDBA74; }
.tool-task-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.tool-task-title { font-weight: 700; color: var(--navy-900); font-size: 0.96rem; }
.tool-task-status { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--accent-500); white-space: nowrap; }
.tool-task-card p { margin: 0 0 8px; font-size: 0.88rem; color: #475569; }
.obd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.obd-card { border: 1px solid var(--border); border-radius: 8px; padding: 18px; background: #fff; }
.obd-code { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--accent-500); }
.obd-system { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

@media (max-width: 1120px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
}

@media (max-width: 1024px) {
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-controls { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-cta { display: none; }
  .grid-4, .grid-3, .grid-2, .footer-grid, .prev-next-grid, .tool-task-list, .obd-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header, .site-footer, .cookie-banner, aside, .print-btn, .prev-next-grid { display: none !important; }
  .content-layout { grid-template-columns: 1fr !important; }
  body { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
