/* GigWallet Tool Pages — Shared Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f1f38; --navy-mid: #162b4d; --navy-light: #1e3a63;
  --green: #2ecc8a; --green-dark: #22a872; --green-pale: #e8faf3;
  --cream: #f7f5f0; --white: #ffffff;
  --text: #1a1a2e; --text-mid: #3d3d5c; --text-muted: #6b6b8a; --border: #e2e0db;
  --font-head: 'Nunito', sans-serif; --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius: 12px; --radius-sm: 8px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--text); line-height: 1.65; font-size: 16.5px; }

/* NAV */
nav { background: var(--navy); border-bottom: 1px solid var(--navy-light); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--white); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-dot { display: inline-block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }

/* PAGE HEADER */
.page-header { background: var(--navy); padding: 48px 24px 56px; }
.page-header-inner { max-width: 1100px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.breadcrumb a:hover { color: white; }
.page-header h1 { font-family: var(--font-head); font-size: clamp(28px, 4vw, 46px); font-weight: 800; color: var(--white); letter-spacing: -0.5px; margin-bottom: 12px; }
.page-header p { font-size: 16px; font-weight: 300; color: rgba(255,255,255,0.6); max-width: 520px; line-height: 1.7; }

/* LAYOUT */
.main { max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

/* CALCULATOR CARD */
.calc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.calc-card h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin-bottom: 28px; }

/* FORM */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 8px; }
.field-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.input-wrap { position: relative; }
.input-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--text-muted); pointer-events: none; }
.input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); pointer-events: none; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; padding: 13px 14px 13px 30px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 16px; color: var(--text); background: var(--cream); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; -moz-appearance: textfield; appearance: textfield;
}
.field input[type="number"].no-prefix, .field input[type="text"].no-prefix { padding-left: 14px; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.field input:focus, .field select:focus { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(46,204,138,0.12); background: var(--white); }
.field select { padding-left: 14px; cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--cream); border-radius: var(--radius-sm); border: 1px solid var(--border); margin-bottom: 22px; cursor: pointer; }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--text-mid); }
.toggle-sublabel { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.toggle { width: 44px; height: 24px; background: var(--border); border-radius: 12px; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--green); }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 3px; left: 3px; transition: left 0.2s; }
.toggle.on::after { left: 23px; }

.calc-btn { width: 100%; padding: 15px; background: var(--green); color: var(--navy); font-family: var(--font-body); font-size: 16px; font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.2s, transform 0.15s; margin-top: 8px; }
.calc-btn:hover { background: var(--green-dark); transform: translateY(-1px); }

/* RESULTS */
.results { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); display: none; }
.results.visible { display: block; }
.results h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.result-card { background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.result-card.highlight { background: var(--navy); border-color: var(--navy); }
.result-card.alert { background: #fff8e1; border-color: #f0c040; }
.result-card.success { background: var(--green-pale); border-color: #b2ddd0; }
.result-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.result-card.highlight .result-label { color: rgba(255,255,255,0.5); }
.result-card.alert .result-label { color: #7a5f00; }
.result-card.success .result-label { color: var(--green-dark); }
.result-val { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--text); }
.result-card.highlight .result-val { color: var(--green); }
.result-card.alert .result-val { color: #7a5f00; font-size: 20px; }
.result-card.success .result-val { color: var(--navy); }
.result-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.result-card.highlight .result-sub { color: rgba(255,255,255,0.4); }

.breakdown-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 20px; }
.breakdown-table tr { border-bottom: 1px solid var(--border); }
.breakdown-table tr:last-child { border-bottom: none; }
.breakdown-table td { padding: 10px 4px; color: var(--text-mid); }
.breakdown-table td:last-child { text-align: right; font-weight: 600; color: var(--text); }
.breakdown-table .total-row td { font-weight: 700; padding-top: 14px; font-size: 15px; border-top: 2px solid var(--border); border-bottom: none; color: var(--text); }
.breakdown-table .sub-row td { color: var(--text-muted); font-size: 13px; }

.set-aside-bar { margin-top: 20px; background: var(--green-pale); border: 1px solid #c5ede0; border-radius: var(--radius-sm); padding: 16px 18px; }
.set-aside-label { font-size: 13px; color: var(--green-dark); font-weight: 600; margin-bottom: 6px; }
.set-aside-val { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--navy); }
.set-aside-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* EXPLAINER */
.explainer { margin-top: 48px; }
.explainer h2 { font-family: var(--font-head); font-size: 26px; font-weight: 700; margin-bottom: 16px; }
.explainer h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.explainer p { font-size: 15.5px; color: var(--text-mid); line-height: 1.8; margin-bottom: 14px; }
.explainer a { color: var(--green-dark); text-decoration: none; font-weight: 600; }
.callout { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 20px 0; font-size: 14.5px; color: var(--text-mid); line-height: 1.65; }
.callout-green { background: var(--green-pale); border-left: 3px solid var(--green); }
.callout-amber { background: #fff8e1; border-left: 3px solid #f0c040; color: #5a4500; }

/* RELATED */
.related { margin-top: 48px; }
.related h2 { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.related-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: inherit; transition: transform 0.2s, border-color 0.2s; display: block; }
.related-card:hover { transform: translateY(-2px); border-color: #bbb; }
.related-icon { font-size: 22px; margin-bottom: 10px; }
.related-name { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.related-desc { font-size: 12px; color: var(--text-muted); }

/* AD */
.ad-banner { background: var(--border); border-radius: var(--radius-sm); height: 90px; display: flex; align-items: center; justify-content: center; margin: 32px 0; }
.ad-banner span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.info-card h3 { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card a { color: var(--green-dark); text-decoration: none; font-weight: 600; font-size: 13px; }
.ad-sidebar { background: var(--border); border-radius: var(--radius-sm); height: 260px; display: flex; align-items: center; justify-content: center; }
.ad-sidebar span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.affiliate-cta-card { background: var(--navy); border-radius: var(--radius); padding: 22px; text-decoration: none; display: block; transition: opacity 0.2s; }
.affiliate-cta-card:hover { opacity: 0.9; }
.aff-tag { font-size: 11px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.aff-name { font-family: var(--font-head); font-size: 17px; font-weight: 800; color: var(--white); margin-bottom: 6px; }
.aff-desc { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.55; margin-bottom: 14px; }
.aff-btn { display: inline-block; background: var(--green); color: var(--navy); font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 6px; }

/* FOOTER */
footer { background: var(--navy); padding: 40px 24px 28px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: white; }
.footer-disclaimer { font-size: 12px; color: rgba(255,255,255,0.25); margin-top: 16px; line-height: 1.6; max-width: 700px; }

@media (max-width: 820px) {
  .main { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .ad-sidebar { height: 100px; }
}
@media (max-width: 480px) {
  .calc-card { padding: 24px 18px; }
  .result-grid { grid-template-columns: 1fr; }
}
