/* Financial Calculators — shared styles */
:root {
  --bg: #0f1419;
  --bg-elevated: #1a2332;
  --surface: #243044;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font);
  --max: 1100px;
  --tap: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(56, 189, 248, 0.18), transparent),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(52, 211, 153, 0.06), transparent);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 20, 25, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  max-width: min(100%, 22rem);
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main a {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

.nav-main a:hover,
.nav-main a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-link {
  display: block;
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  text-decoration: none;
}

.card-link h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.card-link p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 42rem;
}

.calculator-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field input,
.field select {
  width: 100%;
  min-height: var(--tap);
  padding: 0.55rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.field input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.field small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

button[type="submit"],
.btn {
  min-height: var(--tap);
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

button[type="submit"]:hover,
.btn:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.result-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
}

.result-box h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.result-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--success);
  margin: 0;
}

.result-breakdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.result-breakdown dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.result-breakdown dt {
  font-weight: 600;
  color: var(--text);
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose ul {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

[hidden] {
  display: none !important;
}
