/* ============================================================
   Aircraft Mechanic Tools — Global Stylesheet
   ============================================================ */

/* ---- CSS Custom Properties (easy to theme later) ---- */
:root {
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2128;
  --bg-card-hover: #21262d;
  --border:        #30363d;
  --border-light:  #3d444d;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #6e7681;

  --accent:        #2f81f7;   /* aviation blue */
  --accent-hover:  #388bfd;
  --accent-light:  rgba(47, 129, 247, 0.15);
  --accent-orange: #f0883e;
  --accent-green:  #3fb950;

  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --nav-height: 60px;

  --transition: 0.18s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text-secondary); }

/* ---- Layout Containers ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.container--narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

main { flex: 1; padding-top: var(--nav-height); }

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  line-height: 1;
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--bg-card); }

/* Mobile nav menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
  gap: 2px;
}

.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-mobile a:hover { color: var(--text-primary); background: var(--bg-card); }

/* ---- Nav Search ---- */
.nav-search {
  position: relative;
  margin-left: 12px;
  flex-shrink: 0;
}

.nav-search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  padding: 7px 10px 7px 32px;
  width: 180px;
  transition: border-color var(--transition), width var(--transition);
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.nav-search-input::placeholder { color: var(--text-secondary); }

.nav-search-input:focus {
  border-color: var(--accent);
  width: 240px;
}

.nav-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 2000;
  overflow: hidden;
}

.nav-search-result {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 9px 14px;
  transition: all var(--transition);
}

.nav-search-result:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-search-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 10px 14px;
}

/* Mobile search inside the hamburger menu */
.nav-mobile-search-wrap {
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.nav-mobile-search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 8px 12px;
  width: 100%;
  outline: none;
}

.nav-mobile-search-input::placeholder { color: var(--text-muted); }
.nav-mobile-search-input:focus { border-color: var(--accent); }

/* ---- Ad Placeholders ---- */
/* TO SHOW ADS: remove the display:none line below */
/* TO HIDE ADS: keep display:none — placeholders are invisible but still in the HTML */
.ad-placeholder {
  display: none; /* REMOVE THIS LINE when AdSense is approved */
  background: var(--bg-secondary);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 10px;
  transition: border-color var(--transition);
}

.ad-placeholder:hover { border-color: var(--accent); }

.ad-placeholder .ad-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Common ad sizes */
.ad-leaderboard  { min-height: 90px; width: 100%; }
.ad-banner       { min-height: 60px; width: 100%; }
.ad-rectangle    { min-height: 250px; min-width: 300px; width: 100%; }
.ad-in-content   { min-height: 90px; width: 100%; margin: 24px 0; }
.ad-sidebar      { min-height: 250px; width: 100%; }

.ad-wrap { padding: 0; } /* Restored to 12px 0 when ads go live */
.ad-wrap--section { padding: 0; } /* Restored to 32px 0 when ads go live */

/* ---- Hero / Page Header ---- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(47,129,247,0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(47,129,247,0.3);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero h1 { margin-bottom: 12px; }

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

/* Page header (inner pages) */
.page-header {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.page-header h1 { margin-bottom: 8px; }
.page-header p  { font-size: 1rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--border-light); }

/* ---- Tool Cards Grid ---- */
.tools-section { padding: 48px 0; }
.tools-section h2 { margin-bottom: 8px; }
.tools-section > .container > p { margin-bottom: 28px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.tool-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-card-icon {
  width: 48px; height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.tool-card h3 { font-size: 1.05rem; margin: 0; }

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

.tool-card-arrow {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ---- Search & Filter ---- */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-bar input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  padding: 12px 16px 12px 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.search-bar select:focus {
  outline: none;
  border-color: var(--accent);
}

.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-secondary);
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
}

thead th {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

thead th:hover { color: var(--accent); }
thead th .sort-icon { margin-left: 4px; opacity: 0.5; }
thead th.sorted .sort-icon { opacity: 1; color: var(--accent); }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-card-hover); }

tbody td {
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: nowrap;
}

tbody td.text { font-family: var(--font-main); white-space: normal; }

.table-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
}

.no-results {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- Converter / Tool Panel ---- */
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.tool-panel h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1.1rem;
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-mono);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Result display */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}

.result-card.highlight {
  border-color: var(--accent);
  background: var(--accent-light);
}

.result-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.result-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.result-card-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  min-height: 46px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); }

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ---- Quick Reference Cards ---- */
.ref-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ref-card-header {
  background: var(--bg-secondary);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ref-card table { font-size: 0.85rem; }
.ref-card thead th { font-size: 0.72rem; }
.ref-card tbody td { padding: 10px 16px; }

/* ---- Affiliate / Recommended ---- */
.affiliate-section { padding: 48px 0; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.affiliate-section h2 { margin-bottom: 8px; }
.affiliate-section > .container > p { margin-bottom: 28px; }

.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.affiliate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition);
}

.affiliate-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.affiliate-card .icon {
  font-size: 2rem;
}

.affiliate-card h4 { font-size: 1rem; }
.affiliate-card p  { font-size: 0.85rem; flex: 1; }

.affiliate-card .btn {
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.85rem;
  padding: 10px 16px;
}
.affiliate-card .btn:hover { background: #e07832; color: #fff; }

/* ---- Blog Section ---- */
.blog-section { padding: 48px 0; }
.blog-section h2 { margin-bottom: 8px; }
.blog-section > .container > p { margin-bottom: 28px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition);
}

.blog-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); }

.blog-tag {
  display: inline-flex;
  padding: 3px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.blog-card h3 { font-size: 1rem; }
.blog-card p  { font-size: 0.875rem; flex: 1; }
.blog-card .meta { font-size: 0.78rem; color: var(--text-muted); }

/* ---- Section Divider ---- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---- Placeholder sections ---- */
.placeholder-section {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  margin: 24px 0;
}

.placeholder-section .ph-icon { font-size: 2.5rem; margin-bottom: 16px; }
.placeholder-section h3 { margin-bottom: 8px; }
.placeholder-section p { font-size: 0.9rem; max-width: 420px; margin: 0 auto; }

/* ---- Stats Banner ---- */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 32px 0;
}

.stat-item {
  background: var(--bg-card);
  padding: 20px 16px;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand h3 { font-size: 1rem; margin-bottom: 10px; }
.footer-brand p  { font-size: 0.85rem; line-height: 1.7; }

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

/* ---- Utility ---- */
.text-accent   { color: var(--accent); }
.text-orange   { color: var(--accent-orange); }
.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 20px; }
.mt-lg  { margin-top: 32px; }
.mb-sm  { margin-bottom: 8px; }
.mb-md  { margin-bottom: 20px; }
.mb-lg  { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ---- Printable Worksheets / Checklists ---- */
.print-hide {}

.note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.note-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.note-card p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.plain-list {
  list-style: disc;
  padding-left: 18px;
  color: var(--text-secondary);
}

.plain-list li {
  margin-bottom: 8px;
}

.print-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sheet-title-block h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.sheet-title-block p {
  font-size: 0.9rem;
}

.sheet-meta-grid {
  flex: 1;
  min-width: 280px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
}

.meta-line,
.signature-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-line span,
.signature-line span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.meta-line strong,
.signature-line strong {
  min-height: 32px;
  border-bottom: 1px solid var(--border-light);
  display: block;
  color: var(--text-primary);
  font-weight: 600;
}

.worksheet-table tbody td {
  height: 46px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.checklist-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  padding: 18px;
}

.checklist-card h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-list li {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-light);
  border-radius: 3px;
  flex: 0 0 16px;
  margin-top: 2px;
}

.notes-block {
  margin-top: 16px;
}

.note-line {
  border-bottom: 1px solid var(--border-light);
  height: 28px;
}

@media print {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border: #d0d7de;
    --border-light: #8c959f;
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-muted: #555555;
    --accent: #111111;
    --accent-hover: #111111;
    --accent-light: rgba(0, 0, 0, 0.03);
  }

  body {
    background: #ffffff;
    color: #111111;
  }

  main {
    padding-top: 0;
  }

  .print-hide,
  .site-nav,
  .site-footer,
  .ad-wrap,
  .ad-wrap--section,
  .btn-group {
    display: none !important;
  }

  .page-header {
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom-color: #d0d7de;
  }

  .page-header .breadcrumb {
    display: none;
  }

  .table-wrap,
  .print-sheet,
  .note-card,
  .checklist-card,
  .tool-panel {
    border-color: #d0d7de;
    box-shadow: none;
    background: #ffffff;
  }

  thead {
    position: static;
  }

  table,
  th,
  td,
  p,
  li,
  span,
  strong,
  h1,
  h2,
  h3 {
    color: #111111 !important;
  }

  .checkbox {
    border-color: #111111;
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-search { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .tool-grid { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .ref-cards { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .sheet-meta-grid { grid-template-columns: 1fr; }

  .hero { padding: 36px 0 28px; }

  tbody td { font-size: 0.82rem; padding: 11px 12px; }
  thead th { padding: 12px 12px; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .affiliate-grid { grid-template-columns: 1fr; }
  .print-sheet,
  .note-card { padding: 18px; }

  .tool-panel { padding: 20px; }
  .result-card-value { font-size: 1.25rem; }
}

/* ============================================================
   FEEDBACK / SUGGESTIONS SECTION
   ============================================================ */

.feedback-section {
  padding: 60px 0;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.feedback-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.feedback-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.feedback-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feedback-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

.feedback-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: left;
}

.feedback-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-field--full {
  grid-column: 1 / -1;
}

.feedback-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.feedback-field .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.feedback-field .required {
  color: var(--accent-orange);
}

.feedback-field input,
.feedback-field textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.feedback-field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.feedback-field input:focus,
.feedback-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.feedback-field input::placeholder,
.feedback-field textarea::placeholder {
  color: var(--text-muted);
}

.feedback-btn {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.feedback-success {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--accent-green);
  margin-top: 8px;
}

.feedback-success span {
  font-size: 1.4rem;
}

@media (max-width: 600px) {
  .feedback-fields {
    grid-template-columns: 1fr;
  }

  .feedback-form {
    padding: 20px;
  }
}
