/* ==========================================================================
   머니체크랩 (MoneyCheck Lab) - 2026 금융·세무·정부지원금 실용 계산기 디자인 시스템
   ========================================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-accent: #eff6ff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #dbeafe;
  --emerald: #059669;
  --emerald-soft: #d1fae5;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --rose: #dc2626;
  --rose-soft: #fee2e2;
  --navy: #0f172a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.09);

  --container: 1140px;
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font-family: inherit;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--navy);
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8 0%, #059669 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 20px 16px;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* ---------- Hero Banners ---------- */
.portal-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0f766e 100%);
  color: #fff;
  padding: 52px 0 48px;
  position: relative;
  overflow: hidden;
}

.portal-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
}

.portal-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.portal-hero p {
  margin: 0 0 24px;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.hero-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 4px;
}

.hero-stat-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Tool Page Header */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.page-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.page-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 720px;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-soft);
  color: #065f46;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Portal Tool Cards Grid ---------- */
.section {
  padding: 32px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--primary-soft);
}

.tool-icon.emerald { background: var(--emerald-soft); }
.tool-icon.amber { background: var(--amber-soft); }
.tool-icon.rose { background: var(--rose-soft); }
.tool-icon.indigo { background: #e0e7ff; }
.tool-icon.teal { background: #ccfbf1; }

.tool-tag {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tool-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tool-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Calculator Workspace ---------- */
.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: start;
  margin: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sticky-result {
  position: sticky;
  top: 82px;
}

/* Preset Chips */
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.preset-btn {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-accent);
}

/* Form Elements */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.label-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input,
.select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input.has-unit {
  padding-right: 48px;
  text-align: right;
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.kor-preview {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  min-height: 17px;
  text-align: right;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.segmented button {
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.segmented button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-pill:has(input:checked) {
  border-color: var(--primary);
  background: var(--surface-accent);
  color: var(--primary);
}

.check-pill input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  margin: 0;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  flex: 1;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.24);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

.btn-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

/* ---------- Result Panels ---------- */
.result-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 16px;
}

.result-hero.emerald {
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
}

.result-hero.rose {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
}

.result-hero-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
}

.result-hero-value {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.result-hero-sub {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.kpi-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-row strong {
  font-weight: 700;
}

/* Status Badges & Bars */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok { background: var(--emerald-soft); color: #065f46; }
.badge-warn { background: var(--amber-soft); color: #92400e; }
.badge-no { background: var(--rose-soft); color: #991b1b; }
.badge-info { background: var(--primary-soft); color: #1e40af; }

.meter-wrap {
  margin: 14px 0;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.meter-track {
  height: 12px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  display: flex;
}

.meter-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.meter-fill.emerald { background: var(--emerald); }
.meter-fill.amber { background: var(--amber); }
.meter-fill.rose { background: var(--rose); }

.notice-box {
  background: var(--surface-accent);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: #1e3a8a;
  margin-top: 12px;
}

.notice-box.warn {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: #78350f;
}

.notice-box.danger {
  background: var(--rose-soft);
  border-color: #fecaca;
  color: #7f1d1d;
}

/* Subsidy Match Cards */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.match-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #fff;
}

.match-item.eligible {
  border-left: 4px solid var(--emerald);
}

.match-item.maybe {
  border-left: 4px solid var(--amber);
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.match-title {
  font-size: 15px;
  font-weight: 800;
}

.match-benefit {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.match-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Data Tables */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 14px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
}

table.data-table th,
table.data-table td {
  padding: 11px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data-table th:first-child,
table.data-table td:first-child {
  text-align: left;
}

table.data-table thead th {
  background: var(--surface-subtle);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 12.5px;
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

table.data-table tbody tr.highlight {
  background: #eff6ff;
  font-weight: 700;
}

/* ---------- Monetization: AdSense Slots & CPA Cards ---------- */
.ad-slot-wrapper {
  margin: 20px 0;
}

.ad-slot-box {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.ad-slot-box.in-result {
  min-height: 120px;
}

.ad-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cpa-card {
  margin-top: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  padding: 18px;
}

.cpa-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cpa-badge {
  font-size: 11px;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 3px 8px;
  border-radius: 6px;
}

.cpa-disclosure {
  font-size: 11px;
  color: var(--text-muted);
}

.cpa-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.cpa-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.cpa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease;
}

.cpa-cta:hover {
  background: var(--primary);
}

/* ---------- SEO Guide & FAQ ---------- */
.seo-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
}

.seo-guide h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.seo-guide h3 {
  margin: 22px 0 8px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--navy);
}

.seo-guide p,
.seo-guide li {
  color: var(--text-secondary);
  font-size: 14.5px;
}

.seo-guide ul {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 14px 16px;
}

.faq-item summary {
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

/* Related Tools */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.related-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-link:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.related-link strong {
  font-size: 14.5px;
}

.related-link span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0 32px;
  margin-top: 48px;
  font-size: 13.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.56);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Editorial Guides & Articles ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.guide-cat {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.guide-card h2,
.guide-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.guide-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
}

.guide-card-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
  margin: 24px 0;
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

.article-toc {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.article-toc-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 8px;
}

.article-toc ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
}

.article-toc a {
  color: var(--text-secondary);
}

.article-toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.article-body h2 {
  margin: 30px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.article-body h2:first-of-type {
  margin-top: 8px;
}

.article-body h3 {
  margin: 20px 0 8px;
  font-size: 16.5px;
  font-weight: 800;
  color: #1e293b;
}

.article-body p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 15.5px;
  line-height: 1.78;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: #334155;
  font-size: 15px;
  line-height: 1.75;
}

.article-body li {
  margin-bottom: 6px;
}

.calc-cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-cta-banner strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}

.calc-cta-banner span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.84);
}

.calc-cta-banner a {
  background: #10b981;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.calc-cta-banner a:hover {
  background: #059669;
}

.article-sidebar {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.sidebar-box h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.sidebar-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .tool-grid,
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sticky-result,
  .article-sidebar {
    position: static;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tool-grid,
  .guide-grid,
  .form-grid,
  .checkbox-grid,
  .related-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .card,
  .seo-guide,
  .article-body {
    padding: 18px;
  }
  .portal-hero {
    padding: 36px 0 32px;
  }
}
