/* ============================================================
   Solar Calculators — Shared Design System (GeneratePress style)
   solarcalculators.online — reused across homepage + all tool pages
   ============================================================ */

/* ===================== GENERATEPRESS-STYLE THEME ===================== */
:root {
  --accent: #f6a01a;
  --accent-dark: #d9860a;
  --contrast: #1b1b1b;
  --contrast-2: #3a3a3a;
  --contrast-3: #575760;
  --base: #ffffff;
  --base-2: #f7f8f9;
  --base-3: #eef0f2;
  --border: #e2e5e9;
  --dark: #0d2233;
  --dark-2: #143650;
  --green: #16a34a;
  --green-dark: #15803d;
  --link: #1a6fb5;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 6px 24px rgba(0, 0, 0, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --container: 1100px;
  --content: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--contrast-2);
  line-height: 1.7;
  background: var(--base);
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: var(--content); }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Skip link: hidden until keyboard-focused */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0; font-weight: 700; z-index: 999; }
.skip-link:focus { left: 0; text-decoration: none; }

h1, h2, h3, h4 { color: var(--contrast); line-height: 1.25; font-weight: 700; }

/* ===================== HEADER / NAV (GeneratePress style) ===================== */
.site-header {
  background: var(--base);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }
.site-logo img { display: block; height: 34px; width: auto; }

.main-nav { display: flex; }
.main-nav > ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 10px 14px;
  color: var(--contrast-2);
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 6px;
}
.main-nav > ul > li > a:hover { color: var(--accent-dark); background: var(--base-2); text-decoration: none; }
.main-nav .has-sub > a::after { content: " ▾"; font-size: 11px; color: var(--contrast-3); }

.sub-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all .16s ease;
}
/* keep dropdowns near the right edge from overflowing the viewport */
.main-nav > ul > li:nth-last-child(-n+2) .sub-menu { left: auto; right: 0; }
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sub-menu a {
  display: block;
  padding: 9px 12px;
  color: var(--contrast-2);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 6px;
}
.sub-menu a:hover { background: var(--base-2); color: var(--accent-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
  color: var(--contrast);
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--contrast);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

/* ===================== BREADCRUMB ===================== */
.breadcrumb-bar { background: var(--base-2); border-bottom: 1px solid var(--border); }
.breadcrumb { font-size: 14px; color: var(--contrast-3); padding: 10px 0; }
.breadcrumb a { color: var(--link); }
.breadcrumb span { margin: 0 8px; color: #aab; }

/* ===================== HERO ===================== */
.hero {
  background: linear-gradient(160deg, var(--dark) 0%, var(--dark-2) 100%);
  color: #fff;
  padding: 46px 0 40px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(246, 160, 26, .16);
  color: #ffce7a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 44px); font-weight: 800; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero p { color: rgba(255, 255, 255, .82); font-size: 18px; max-width: 680px; margin: 0 auto; }

/* ===================== CALCULATOR ===================== */
.calc-section { background: var(--base-2); padding: 34px 0 46px; }
.calc-card {
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
}
.calc-step { padding: 24px 28px; border-bottom: 1px solid var(--base-3); }
.calc-step:last-child { border-bottom: none; }
.step-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.step-header h2 { font-size: 19px; font-weight: 700; margin: 0; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 12px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 14px; font-weight: 600; color: var(--contrast-3); }
.input-group select,
.input-group input[type="number"] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-family: inherit; background: var(--base); color: var(--contrast);
  width: 100%; outline: none; transition: border-color .2s;
}
.input-group select:focus, .input-group input:focus { border-color: var(--accent); }
.input-note { font-size: 14px; color: var(--contrast-3); margin-top: 6px; line-height: 1.55; }

.usage-tabs { display: flex; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.usage-tab { flex: 1; padding: 11px 12px; text-align: center; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--base-2); color: var(--contrast-3); border: none; font-family: inherit; }
.usage-tab.active { background: var(--base); color: var(--accent-dark); box-shadow: inset 0 -2px 0 var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.bill-slider-group { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.bill-slider-group input[type="range"] { flex: 1; accent-color: var(--accent); height: 6px; cursor: pointer; }
.bill-amount-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bill-amount-input:focus-within { border-color: var(--accent); }
.bill-prefix { background: var(--accent); color: #fff; padding: 10px 13px; font-weight: 700; }
.bill-amount-input input { width: 110px; padding: 10px 12px; border: none; font-size: 16px; font-weight: 700; outline: none; color: var(--contrast); font-family: inherit; }
.bill-result { font-size: 14px; color: var(--contrast-3); margin-top: 4px; }
.bill-result strong { color: var(--contrast); }

.appliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.appliance-item { background: var(--base-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.appliance-header { display: flex; justify-content: space-between; align-items: center; }
.appliance-name { font-size: 14px; font-weight: 600; color: var(--contrast); }
.appliance-controls { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; color: var(--contrast-3); }
.appliance-input { width: 62px; padding: 5px; border: 1px solid var(--border); border-radius: 4px; text-align: center; font-family: inherit; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-btn { width: 26px; height: 26px; border: none; background: var(--base); cursor: pointer; font-size: 14px; font-weight: 700; color: var(--contrast); }
.qty-btn:hover { background: var(--accent); color: #fff; }
.qty-val { width: 30px; text-align: center; font-size: 14px; font-weight: 700; color: var(--contrast); background: var(--base); border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 3px 0; }
.appliance-total { margin-top: 14px; padding: 12px 16px; background: rgba(246, 160, 26, .08); border-radius: var(--radius); font-size: 14px; }
.appliance-total strong { color: var(--accent-dark); }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.option-group { display: flex; flex-direction: column; gap: 6px; }
.option-group label { font-size: 14px; font-weight: 600; color: var(--contrast-3); }
.toggle-group { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.toggle-btn { flex: 1; padding: 10px 8px; text-align: center; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--base); color: var(--contrast-3); border: none; font-family: inherit; }
.toggle-btn.active { background: var(--dark); color: #fff; }
.toggle-btn:hover:not(.active) { background: var(--base-2); }

.calc-btn { width: 100%; padding: 15px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .2s; }
.calc-btn:hover { background: var(--accent-dark); }
.validation-msg { display: none; margin-top: 12px; padding: 13px 16px; background: #fff3e0; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: #8b5e00; }
.validation-msg.show { display: block; }

/* ===================== RESULTS ===================== */
.results-section { display: none; margin-top: 26px; }
.results-section.show { display: block; }
.results-header { text-align: center; margin-bottom: 22px; }
.results-header h2 { font-size: 24px; font-weight: 800; }
.results-header p { font-size: 14px; color: var(--contrast-3); margin-top: 4px; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.result-card { background: var(--base); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.result-card .rc-icon { font-size: 26px; margin-bottom: 6px; display: block; }
.result-card .rc-label { font-size: 12px; color: var(--contrast-3); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; display: block; }
.result-card .rc-value { font-size: 21px; font-weight: 800; color: var(--contrast); display: block; line-height: 1.2; }
.result-card .rc-sub { font-size: 12.5px; color: var(--contrast-3); margin-top: 5px; display: block; }
.result-card.highlight { background: var(--dark); border-color: transparent; }
.result-card.highlight .rc-label { color: rgba(255, 255, 255, .6); }
.result-card.highlight .rc-value { color: var(--accent); }
.result-card.highlight .rc-sub { color: rgba(255, 255, 255, .55); }
.result-card.green-card { background: var(--green-dark); border-color: transparent; }
.result-card.green-card .rc-label { color: rgba(255, 255, 255, .65); }
.result-card.green-card .rc-value { color: #6ee7a0; }
.result-card.green-card .rc-sub { color: rgba(255, 255, 255, .6); }

.results-sub-section { margin-top: 22px; }
.results-sub-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.table-responsive { width: 100%; overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; background: var(--base); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.results-table th { background: var(--dark); color: #fff; padding: 11px 15px; font-size: 14px; text-align: left; font-weight: 600; }
.results-table td { padding: 11px 15px; font-size: 14px; border-bottom: 1px solid var(--base-3); }
.results-table tr:last-child td { border-bottom: none; }
.td-label { color: var(--contrast-3); }
.td-value { font-weight: 700; color: var(--contrast); text-align: right; }
.table-note { display: block; font-size: 13px; color: var(--contrast-3); line-height: 1.5; margin-top: 5px; font-weight: normal; }
.table-note.highlight { color: var(--accent-dark); }
.td-full-warning { background: #fff8e1 !important; border-left: 4px solid var(--accent); color: #7a5b00 !important; padding: 12px 15px !important; font-size: 13.5px !important; }
.td-full-error { background: #fdecea !important; border-left: 4px solid #e57373; color: #8a1c12 !important; padding: 12px 15px !important; font-size: 13.5px !important; }
.disclaimer-box { margin-top: 20px; padding: 16px; background: rgba(246, 160, 26, .05); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; font-size: 13.5px; color: var(--contrast-3); line-height: 1.7; }

/* ===================== ESTIMATOR NOTE ===================== */
.estimator-note { background: #fff8e1; border: 1px solid #ffe1a8; border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; font-size: 14px; color: #6b5220; margin: 24px auto 0; max-width: 960px; line-height: 1.6; }
.estimator-note strong { color: #4d3b12; }

/* ===================== CONTENT ===================== */
.content { padding: 46px 0; }
.content.alt { background: var(--base-2); }
.content h2 { font-size: clamp(23px, 3.2vw, 30px); margin-bottom: 14px; }
.content h3 { font-size: 19px; margin: 26px 0 8px; }
.content p { margin-bottom: 15px; }
.content ul, .content ol { margin: 0 0 15px 22px; }
.content li { margin-bottom: 7px; }
.content .lead { font-size: 19px; color: var(--contrast-2); }

.formula-block { background: var(--base-3); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; margin: 14px 0; font-family: 'Courier New', monospace; font-size: 14px; color: var(--contrast); line-height: 1.7; overflow-x: auto; }
.assumptions { background: var(--base-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-top: 22px; }
.assumptions h3 { margin-top: 0; font-size: 16px; }
.assumptions ul { margin-bottom: 0; }
.assumptions li { font-size: 14px; color: var(--contrast-3); }
.assumptions li strong { color: var(--contrast-2); }

table.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; background: var(--base); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
table.data-table th { background: var(--dark); color: #fff; padding: 12px 14px; text-align: left; font-weight: 600; }
table.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--base-3); }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--base-2); }
.green-text { color: var(--green); font-weight: 700; }

/* ===================== TOOL CARDS (hub) ===================== */
.cat-block { margin-bottom: 38px; }
.cat-block > h3 { font-size: 20px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.cat-block > p { color: var(--contrast-3); font-size: 15px; margin-bottom: 16px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card { display: block; background: var(--base); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); text-decoration: none; }
.tool-card .tc-icon { font-size: 22px; }
.tool-card h4 { font-size: 16.5px; margin: 8px 0 5px; color: var(--contrast); }
.tool-card p { font-size: 13.5px; color: var(--contrast-3); margin: 0; line-height: 1.55; }
.tool-card .tc-soon { font-size: 11px; font-weight: 700; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .5px; }

/* ===================== FAQ ===================== */
.faq-section { padding: 46px 0; }
.faq-section h2 { font-size: clamp(24px, 3.5vw, 32px); text-align: center; margin-bottom: 28px; }
.faq-section .lead { color: var(--contrast-3); margin-bottom: 22px; }
.faq-item { background: var(--base); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-q { width: 100%; padding: 15px 18px; font-size: 16px; font-weight: 600; color: var(--contrast); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: none; background: var(--base); text-align: left; font-family: inherit; }
.faq-q:hover { background: var(--base-2); }
.faq-q.active { background: var(--base-2); color: var(--accent-dark); }
.faq-t { font-size: 22px; font-weight: 700; flex-shrink: 0; color: var(--accent); line-height: 1; }
.faq-a { display: none; padding: 4px 18px 16px; font-size: 15px; color: var(--contrast-2); line-height: 1.7; }
.faq-a.open { display: block; }

/* ===================== SECTION HEADERS & MISC ===================== */
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); }
.section-head p { color: var(--contrast-3); font-size: 16px; margin-top: 8px; max-width: 640px; margin-left: auto; margin-right: auto; }
.tools-section { padding: 46px 0; background: var(--base-2); }
.cat-title { font-size: 20px; margin: 36px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.cat-title:first-of-type { margin-top: 0; }
.hero-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; padding: 13px 26px; border-radius: 50px; margin-top: 22px; box-shadow: var(--shadow); transition: background .15s, transform .15s; }
.hero-btn:hover { background: var(--accent-dark); text-decoration: none; transform: translateY(-1px); }
.link-btn { display: inline-block; margin-top: 10px; color: var(--link); font-weight: 600; }
.tool-ico { font-size: 22px; display: block; }
.tool-name { font-size: 16.5px; font-weight: 700; color: var(--contrast); display: block; margin: 8px 0 5px; }
.tool-desc { font-size: 13.5px; color: var(--contrast-3); display: block; line-height: 1.55; }
.mono { font-family: 'Courier New', monospace; font-size: 14px; background: var(--base-3); padding: 2px 6px; border-radius: 4px; color: var(--contrast); }
.tip { display: block; margin-top: 10px; font-size: 14px; color: var(--accent-dark); background: rgba(246,160,26,.08); border-radius: var(--radius); padding: 10px 14px; }
.opt-hint { font-weight: 400; font-size: 13px; color: var(--contrast-3); }
.nudge { margin-top: 10px; padding: 10px 14px; background: #fff8e1; border: 1px solid #ffe1a8; border-radius: var(--radius); font-size: 13.5px; color: #7a5b00; }
.acc-note { font-size: 13px; color: var(--contrast-3); margin-top: 6px; }
.why-size { margin-top: 12px; font-size: 14px; color: var(--contrast-3); }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, .72); padding: 40px 0 26px; font-size: 14.5px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; margin-bottom: 30px; }
.footer-featured { text-align: center; margin-bottom: 26px; }
.footer-featured h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; }
.footer-links li { margin: 0; }
.footer-links a { color: rgba(255, 255, 255, .78); font-size: 14px; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-cols h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-cols h4 a { color: #fff; padding: 0; font-size: 15px; display: inline; }
.footer-cols a { color: rgba(255, 255, 255, .72); display: block; padding: 3px 0; font-size: 14px; }
.footer-cols a:hover { color: var(--accent); text-decoration: none; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.footer-brand .sun { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .55); }
.footer-bottom a { color: var(--accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 960px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--base); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px; }
  .main-nav > ul > li > a { padding: 12px 14px; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 2px solid var(--base-3); margin: 0 0 6px 14px; padding: 0; min-width: 0; }
  .main-nav .has-sub > a::after { content: " +"; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .input-row, .options-grid, .appliance-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .calc-step { padding: 20px 16px; }
  .bill-slider-group { flex-direction: column; align-items: stretch; }
  .usage-tabs { flex-direction: column; }
}

/* ============================================================
   TOOL-PAGE (SPOKE) LAYOUT — 2-col calculator shell
   Used by /solar-panel-cost-calculator/, /solar-loan-emi-calculator/, etc.
   Scoped so it never collides with the homepage calculator.
   ============================================================ */
.logo { display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; color: var(--contrast); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo .sun { color: var(--accent); font-size: 24px; }

main.wrap { padding-top: 8px; padding-bottom: 40px; }

.calc-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 32px; }
.calc-inputs, .calc-results { background: var(--base); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.calc-inputs h2 { font-size: 19px; margin-bottom: 18px; }
.calc-results h2 { font-size: 19px; margin-bottom: 14px; }
.calc-results { position: sticky; top: 88px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--contrast); margin-bottom: 7px; font-size: 14.5px; }
.field .hint { font-size: 13px; color: var(--contrast-3); font-weight: 400; display: block; margin-top: 5px; }
.field select, .field input[type="number"], .field input[type="text"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px; font-family: inherit; color: var(--contrast);
  background: var(--base); outline: none; transition: border-color .15s;
}
.field select:focus, .field input:focus { border-color: var(--accent); }

/* horizontal ₹-prefixed input (scoped to tool pages so it doesn't hit the homepage's column .input-group) */
.calc-inputs .input-group { display: flex; align-items: stretch; flex-direction: row; }
.calc-inputs .input-group .prefix { display: grid; place-items: center; padding: 0 13px; background: var(--accent); color: #fff; font-weight: 700; border-radius: var(--radius) 0 0 var(--radius); }
.calc-inputs .input-group input { border-radius: 0 var(--radius) var(--radius) 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* results readout */
.result-hero { text-align: center; padding: 8px 0 16px; border-bottom: 1px dashed var(--border); margin-bottom: 16px; }
.result-hero .big { font-size: 2.4rem; font-weight: 800; color: var(--green); line-height: 1.1; }
.result-hero .big small { font-size: 1rem; color: var(--contrast-3); font-weight: 600; }
.result-row { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--border); }
.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--contrast-2); font-size: 14.5px; }
.result-row .v { font-weight: 700; color: var(--contrast); font-size: 15.5px; text-align: right; }
.result-row .v small { display: block; font-weight: 400; font-size: 12px; color: var(--contrast-3); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.pill-green { background: #e8f8ef; color: var(--green-dark); }
.pill-blue { background: #e8f1fb; color: var(--link); }

/* details-based FAQ (tool pages) */
.faq { padding: 20px 0 0; }
.faq details { background: var(--base); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq summary { padding: 15px 18px; font-weight: 600; color: var(--contrast); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { color: var(--accent); font-size: 22px; line-height: 1; flex: 0 0 auto; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq .faq-body { padding: 4px 18px 16px; color: var(--contrast-2); font-size: 15px; }

/* related tools strip */
.related-tools { background: var(--base); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-top: 8px; }
.related-tools ul { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-tools li { margin: 0; }
.related-tools a { display: block; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--contrast); font-weight: 600; font-size: 14px; }
.related-tools a:hover { border-color: var(--accent); background: var(--base-2); text-decoration: none; }

/* footer grid alias (tool pages use .footer-grid; homepage uses .footer-cols) */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 30px; }

@media (max-width: 820px) {
  .calc-shell { grid-template-columns: 1fr; }
  .calc-results { position: static; }
  .related-tools ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
