/* NRI Alpha — calculators.css */
:root {
  --navy: #0b1f3a;
  --navy-dark: #061228;
  --gold: #c5a64f;
  --ink: #1a1a2e;
  --muted: #606b7a;
  --surface: #ffffff;
  --surface-alt: #f5f5ef;
  --border: #d9d7cf;
  --ok: #2f8a4a;
  --warn: #b8860b;
  --bad: #b43b3b;
  --radius: 8px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body.nri-tools {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--surface-alt);
  color: var(--ink);
  line-height: 1.55;
}
.container { max-width: 900px; margin: 0 auto; padding: 0 1.2rem; }

/* Header */
.nri-header { background: var(--navy); color: #fff; padding: 0.8rem 0; }
.nri-header .container { display: flex; align-items: center; gap: 1.2rem; }
.nri-header .brand { color: var(--gold); font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; text-decoration: none; }
.nri-header nav { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }
.nri-header nav a { color: #dcdcdc; text-decoration: none; font-size: 0.92rem; }
.nri-header nav a:hover, .nri-header nav a[aria-current="page"] { color: var(--gold); }
.nri-header nav a.primary { background: var(--gold); color: var(--navy); padding: 0.3rem 0.8rem; border-radius: var(--radius); font-weight: 600; }

/* Main */
.calc-page { padding: 1.6rem 0 3rem; }
.calc-page h1 { font-family: var(--font-serif); font-size: 1.9rem; margin: 0 0 0.4rem; color: var(--navy); }
.calc-page p.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.6rem; }

section { margin-bottom: 1.5rem; }
section.calculator-form, section.calculator-result {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem;
}
section.calculator-result:empty, section.calculator-result:has(:empty) { display: none; }
section h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin: 0 0 0.8rem; }
section.sources ul { margin: 0; padding-left: 1.2rem; font-size: 0.92rem; }
section.sources a { color: var(--navy); }

/* Calculator form */
.calc-form { display: grid; gap: 0.9rem; }
.calc-form label { display: block; font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.calc-form input, .calc-form select, .calc-form textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 1rem; background: #fff;
}
.calc-form button { padding: 0.7rem 1.1rem; background: var(--navy); color: #fff; border: 0; border-radius: var(--radius); font-weight: 600; cursor: pointer; }
.calc-form button:hover { background: var(--navy-dark); }
.calc-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.stub-note { color: var(--muted); font-size: 0.9rem; border-left: 3px solid var(--gold); padding: 0.5rem 0.8rem; background: var(--surface-alt); border-radius: 4px; }

/* Result */
.calc-alert { padding: 0.8rem 1rem; border-radius: var(--radius); background: #eef4ec; border: 1px solid var(--ok); }

/* How it works */
.how-it-works details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 1rem; }
.how-it-works summary { cursor: pointer; padding: 0.8rem 0; font-weight: 600; color: var(--navy); }

/* Subscribe bar */
.subscribe-bar { background: var(--navy); color: #fff; padding: 1.2rem; border-radius: var(--radius); }
.subscribe-bar h3 { color: #fff; margin: 0 0 0.5rem; }
.subscribe-bar small { color: #cbd0d8; }
.subscribe-inline { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.subscribe-inline input { flex: 1 1 220px; padding: 0.55rem 0.7rem; border: 0; border-radius: var(--radius); }
.subscribe-inline button { background: var(--gold); color: var(--navy); border: 0; padding: 0.55rem 1rem; border-radius: var(--radius); font-weight: 700; cursor: pointer; }
#subscribe_msg { margin-top: 0.5rem; font-size: 0.9rem; min-height: 1.2rem; }
#subscribe_msg.ok { color: #b4ffb4; }
#subscribe_msg.err { color: #ffb4b4; }

/* Share + Related */
.share button {
  background: #fff; border: 1px solid var(--border); padding: 0.45rem 0.9rem;
  border-radius: var(--radius); margin-right: 0.4rem; cursor: pointer; font-weight: 600;
}
.share button:hover { background: var(--surface-alt); }

/* Hub grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.tool-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.2rem; transition: transform 120ms ease, box-shadow 120ms ease;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(11,31,58,0.08); border-color: var(--navy); }
.tool-card .tool-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.tool-card h3 { margin: 0 0 0.3rem; color: var(--navy); font-family: var(--font-serif); font-size: 1.15rem; }
.tool-card p { margin: 0 0 0.6rem; color: var(--muted); font-size: 0.92rem; }
.usage-badge { color: var(--ok); font-size: 0.78rem; font-weight: 600; }
.usage-badge.usage-badge-new { color: var(--warn); }

/* FAQ */
.faq dl { display: grid; gap: 0.8rem; }
.faq dt { font-weight: 700; color: var(--navy); }
.faq dd { margin: 0.2rem 0 0.8rem; color: #2a2e38; }

/* Footer */
.nri-footer { background: var(--navy-dark); color: #aeb3be; padding: 1.1rem 0; font-size: 0.88rem; text-align: center; margin-top: 2rem; }
.nri-footer a { color: var(--gold); text-decoration: none; margin: 0 0.4rem; }

/* Print / dark mode etc. keep it simple */
@media (max-width: 600px) {
  .nri-header .container { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .nri-header nav { margin-left: 0; }
}
