/* Vehicle Cost Tools - Global Styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1a6dd4;
  --blue-dark: #0f4a8a;
  --blue-light: #e8f0fe;
  --green: #1e8e3e;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-600: #5f6368;
  --gray-800: #202124;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --radius: 12px;
  --max-w: 720px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
  min-height: 100vh;
}

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
header h1 { font-size: 1.25rem; color: var(--blue); }
header h1 a { color: inherit; text-decoration: none; }
.header-inner { max-width: var(--max-w); margin: 0 auto; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 16px; }

.intro { margin-bottom: 24px; }
.intro h2 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; margin-bottom: 8px; }
.intro p, .helper { color: var(--gray-600); }
.breadcrumb { font-size: 0.8125rem; margin-bottom: 16px; color: var(--gray-600); }
.breadcrumb a { color: var(--blue); }

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.card h2 { font-size: 1.125rem; margin-bottom: 8px; }
.card p { color: var(--gray-600); font-size: 0.875rem; }
.prose h2:not(:first-child) { margin-top: 20px; }
.prose ul { margin: 8px 0 0 20px; color: var(--gray-600); font-size: 0.875rem; }
.prose li + li { margin-top: 6px; }
.primary-card { border-top: 4px solid var(--blue); }
.secondary-card { box-shadow: none; border: 1px solid var(--gray-200); }
.site-purpose { margin-top: 20px; }

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 560px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
}
.tool-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tool-card:hover {
  border-color: var(--blue);
  box-shadow: 0 1px 6px rgba(26,109,212,0.15);
}
.tool-card h3 { font-size: 1rem; margin-bottom: 4px; color: var(--blue); }
.tool-card p { font-size: 0.8125rem; color: var(--gray-600); }

/* Forms */
label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; color: var(--gray-800); }
select, input[type="number"], input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.15s;
  min-height: 48px;
}
select:focus, input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,109,212,0.1);
}
.form-group { margin-bottom: 16px; }
.helper { font-size: 0.75rem; margin-top: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 16px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; flex: 0 0 auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-block { width: 100%; }

/* Result */
.result-box {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  text-align: center;
  display: none;
}
.result-box.visible { display: block; }
.result-value { font-size: 2rem; font-weight: 700; color: var(--blue); }
.result-label { font-size: 0.875rem; color: var(--gray-600); margin-top: 4px; }
.result-breakdown { font-size: 0.8125rem; color: var(--gray-600); margin-top: 8px; text-align: left; }

/* Source links and notes */
.source-link {
  display: block;
  font-size: 0.75rem;
  margin-top: 8px;
  word-break: break-all;
}
.source-link a { color: var(--blue); }
.source-note {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 24px;
  padding: 12px;
  background: var(--gray-100);
  border-radius: 8px;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 16px;
  font-size: 0.8125rem;
  color: #4b5056;
  border-top: 1px solid var(--gray-200);
  margin-top: 32px;
}

/* Ad placeholder */
.ad-container {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: 1px dashed var(--gray-200);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: 16px 0;
}

@media (max-width: 359px) {
  .card { padding: 18px 16px; }
  .result-value { font-size: 1.75rem; }
}
/* Consent banner */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
  z-index: 100;
  padding: 20px;
}
.consent-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.consent-inner h2 { font-size: 1rem; margin-bottom: 4px; }
.consent-inner p { font-size: 0.8125rem; color: var(--gray-600); }
.consent-inner a { color: var(--blue); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn { flex: 1 1 auto; min-width: 160px; }
.consent-essential { background: var(--gray-100); color: var(--gray-800); }
.consent-essential:hover { background: var(--gray-200); }
.privacy-settings {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.8125rem;
  text-decoration: underline;
  padding: 0;
}
.privacy-settings:hover { color: var(--blue-dark); }
@media (min-width: 560px) {
  .consent-inner { flex-direction: row; align-items: center; }
  .consent-inner > div { flex: 1; }
  .consent-actions { flex: 0 0 auto; }
}
