/* ── Altitude Tools Site — shared.css ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:         #1e3a5e;
  --accent:       #3b7dd8;
  --accent-hover: #2563b8;
  --accent-light: #eff6ff;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --border:       #e2e8f0;
  --bg:           #f8fafc;
  --white:        #ffffff;
  --green:        #16a34a;
  --green-light:  #f0fdf4;
  --red:          #dc2626;
  --red-light:    #fef2f2;
  --amber:        #d97706;
  --amber-light:  #fffbeb;
  --radius:       12px;
}

body { font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── NAV ── */
nav { background: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--border); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-logo img { height: 42px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; list-style: none; }
.nav-links li { position: relative; }
.nav-links a, .nav-links button { display: flex; align-items: center; gap: 4px; padding: 0 14px; height: 68px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-muted); text-decoration: none; background: none; border: none; cursor: pointer; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.nav-links a:hover, .nav-links button:hover { color: var(--navy); background: var(--bg); }
.nav-links a.nav-active { color: var(--navy); border-bottom: 2px solid var(--accent); }
.chevron { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform 0.2s; }
.dropdown { position: absolute; top: calc(100% + 1px); left: 0; background: var(--white); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.12); min-width: 230px; padding: 6px 0; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity 0.18s, transform 0.18s; list-style: none; }
.nav-links li:hover > .dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }
.nav-links li:hover > button .chevron { transform: rotate(180deg); }
.dropdown a { height: auto; padding: 9px 18px; font-size: 13.5px; font-weight: 400; color: var(--text); border-radius: 0; }
.dropdown a:hover { background: var(--accent-light); color: var(--accent); }
.dropdown a.drop-active { color: var(--accent); font-weight: 500; background: var(--accent-light); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-muted); border-radius: 2px; }
.mobile-menu { display: none; background: var(--navy); padding: 1rem 2rem 1.5rem; flex-direction: column; }
.mobile-menu.open { display: flex; }
.mobile-menu a { display: block; padding: 10px 0; font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.8); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.06); }
.mobile-menu a:hover { color: #fff; }
.mobile-section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.35); padding: 14px 0 4px; }
.mobile-sub a { padding-left: 12px; font-size: 14px; font-weight: 400; color: rgba(255,255,255,0.65); }

/* ── TOOL PAGE HERO ── */
.tool-hero { background: var(--navy); padding: 3rem 2rem 4.5rem; }
.tool-hero-inner { max-width: 860px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 1.25rem; }
.breadcrumb a { font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.85); }
.breadcrumb span { font-size: 13px; color: rgba(255,255,255,0.3); }
.tool-hero h1 { font-size: 2.1rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.6rem; }
.tool-hero p { font-size: 1rem; color: rgba(255,255,255,0.6); line-height: 1.65; max-width: 580px; }
.peak-break { background: var(--navy); line-height: 0; display: block; }
.peak-break svg { display: block; width: 100%; }

/* ── MAIN LAYOUT ── */
.tool-main { max-width: 1120px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }
.tool-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }

/* ── CALCULATOR CARD ── */
.calc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.calc-card h2 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.field-group { margin-bottom: 1.25rem; }
.field-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrap { position: relative; }
.input-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); font-weight: 500; pointer-events: none; }
.input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); pointer-events: none; }
input[type=number], input[type=text], select {
  width: 100%; padding: 10px 14px; font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s; -moz-appearance: textfield; appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=number]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,125,216,0.12); }
.has-prefix input { padding-left: 30px; }
.has-suffix input { padding-right: 42px; }
.calc-btn { width: 100%; padding: 12px; background: var(--accent); color: #fff; font-family: inherit; font-size: 15px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background 0.15s; margin-top: 0.5rem; }
.calc-btn:hover { background: var(--accent-hover); }
.section-divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── RESULTS ── */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1.5rem; }
.results-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.results-grid.one { grid-template-columns: 1fr; }
.result-card { background: var(--bg); border-radius: 10px; padding: 1rem; }
.result-card.highlight { background: var(--accent-light); }
.result-card.green { background: var(--green-light); }
.result-card.amber { background: var(--amber-light); }
.result-card.red { background: var(--red-light); }
.result-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.result-value { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.result-value.accent { color: var(--accent); }
.result-value.green { color: var(--green); }
.result-value.amber { color: var(--amber); }
.result-value.red { color: var(--red); }
.result-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.disclaimer { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: 1.25rem; padding: 10px 14px; background: var(--bg); border-left: 3px solid var(--border); border-radius: 0 6px 6px 0; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.sidebar-card.navy { background: var(--navy); border-color: var(--navy); }
.sidebar-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.6rem; }
.sidebar-card.navy h3 { color: #fff; }
.sidebar-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }
.sidebar-card.navy p { color: rgba(255,255,255,0.6); }
.sidebar-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 1rem; padding: 9px 16px; background: var(--accent); color: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600; border-radius: 7px; text-decoration: none; transition: background 0.15s; }
.sidebar-btn:hover { background: var(--accent-hover); }
.sidebar-btn.outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.sidebar-btn.outline:hover { background: var(--accent-light); }
.tool-list { list-style: none; margin-top: 0.75rem; }
.tool-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.tool-list li:last-child { border-bottom: none; }
.tool-list a { font-size: 13.5px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.15s; }
.tool-list a:hover { color: var(--accent); }
.tool-list a.current { color: var(--accent); font-weight: 600; }

/* ── INFO PAGES ── */
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.info-card h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.decision-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.decision-table th { background: var(--navy); color: #fff; padding: 10px 14px; text-align: left; font-weight: 600; font-size: 13px; }
.decision-table th:first-child { border-radius: 8px 0 0 0; }
.decision-table th:last-child { border-radius: 0 8px 0 0; }
.decision-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.decision-table tr:last-child td { border-bottom: none; }
.decision-table tr:nth-child(even) td { background: var(--bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-light); color: var(--green); }
.badge.red { background: var(--red-light); color: var(--red); }
.badge.amber { background: var(--amber-light); color: var(--amber); }

/* ── FOOTER ── */
footer { background: var(--navy); padding: 2.5rem 2rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-logo img { height: 36px; opacity: 0.85; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; list-style: none; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.85); }
.footer-legal { font-size: 12px; color: rgba(255,255,255,0.3); line-height: 1.6; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) { .tool-layout { grid-template-columns: 1fr; } .sidebar { order: -1; } }
@media (max-width: 768px) { .nav-links { display: none; } .hamburger { display: flex; } .tool-hero h1 { font-size: 1.6rem; } .nav-inner { height: 60px; } .nav-logo img { height: 36px; } }
@media (max-width: 500px) { .results-grid, .results-grid.three { grid-template-columns: 1fr 1fr; } .field-row { grid-template-columns: 1fr; } }
