:root {
  --bg: #fafaf9;
  --card: #ffffff;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --primary: #14532d;
  --primary-hover: #0f3f22;
  --accent: #15803d;
  --soft-accent: #f0fdf4;
  --soft-accent-border: #bbf7d0;
  --text: #1c1917;
  --muted: #57534e;
  --subtle: #78716c;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;
  --slate-blue: #1d4ed8;
  --slate-blue-soft: #eff6ff;
  --danger-text: #991b1b;
  --danger-bg: #fef2f2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 6px 20px -4px rgba(28, 25, 23, 0.07), 0 2px 6px -1px rgba(28, 25, 23, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
}

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

/* Portal Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  flex-shrink: 0;
}

.brand-link {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-decoration: none;
}

.brand-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.header-nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.header-nav-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.all-tools-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--soft-accent);
  border: 1px solid var(--soft-accent-border);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.all-tools-btn:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: var(--primary);
  text-decoration: none;
}

/* Breadcrumb & Hero */
.breadcrumb-bar {
  padding: 14px 0 6px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  font-weight: 500;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.hero {
  padding: 10px 0 22px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--soft-accent);
  border: 1px solid var(--soft-accent-border);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3.1vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-lead {
  margin: 0;
  max-width: 850px;
  font-size: 1.04rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Ad Slot */
.ad-slot {
  margin: 18px 0;
  padding: 14px;
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--subtle);
  font-size: 0.8rem;
}

.ad-slot[hidden] {
  display: none !important;
}

/* Calculator Suite Wrapper */
.calc-shell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.mode-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #f5f5f4;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}

.mode-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.mode-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.mode-tab.active {
  background: var(--card);
  color: var(--primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.preset-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 20px;
  background: var(--soft-accent);
  border-bottom: 1px solid var(--soft-accent-border);
}

.preset-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.preset-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 4px;
}

.preset-chip {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--soft-accent-border);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.utility-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outline {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

/* Main 2-Column Tool Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  align-items: start;
}

@media (max-width: 1024px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.inputs-pane {
  padding: 22px 20px;
  border-right: 1px solid var(--border);
  background: #fcfcfb;
}

@media (max-width: 1024px) {
  .inputs-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.results-pane {
  padding: 22px 24px;
  background: var(--card);
}

.mode-panel[hidden] {
  display: none !important;
}

.input-section {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.input-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.section-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft-accent);
  color: var(--accent);
  border: 1px solid var(--soft-accent-border);
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

@media (max-width: 520px) {
  .field-grid-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 11px;
}

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

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text);
}

.field-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
}

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

.affix-prefix,
.affix-suffix {
  position: absolute;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}

.affix-prefix {
  left: 10px;
}

.affix-suffix {
  right: 10px;
}

.input-affix input,
.field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  font-family: var(--font-sans);
}

.input-affix.has-prefix input {
  padding-left: 24px;
}

.input-affix.has-suffix input {
  padding-right: 42px;
}

.input-affix input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.14);
}

/* Time Horizon Slider Box */
.horizon-box {
  background: var(--soft-accent);
  border: 1px solid var(--soft-accent-border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin-bottom: 16px;
}

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

.horizon-top label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
}

.horizon-pill {
  background: var(--primary);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.horizon-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  gap: 4px;
}

.tick-btn {
  appearance: none;
  border: 1px solid var(--soft-accent-border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.tick-btn:hover,
.tick-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.sync-bridge-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--soft-accent);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sync-bridge-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Results Dashboard */
.verdict-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--soft-accent);
  border: 1px solid var(--soft-accent-border);
  margin-bottom: 18px;
}

.verdict-banner.rent-wins {
  background: var(--slate-blue-soft);
  border-color: #bfdbfe;
}

.verdict-banner.caution {
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.verdict-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 3px;
}

.verdict-banner.rent-wins .verdict-eyebrow {
  color: var(--slate-blue);
}

.verdict-banner.caution .verdict-eyebrow {
  color: var(--amber-text);
}

.verdict-headline {
  margin: 0 0 4px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.verdict-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 720px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 15px;
}

.kpi-card.highlight {
  background: var(--soft-accent);
  border-color: var(--soft-accent-border);
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.kpi-card.highlight .kpi-value {
  color: var(--primary);
}

.kpi-meta {
  margin-top: 5px;
  font-size: 0.77rem;
  color: var(--muted);
}

/* SVG Chart Panel */
.chart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--card);
  margin-bottom: 20px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.chart-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.svg-chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.svg-chart-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-caption {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Comparison Split Cards */
.split-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 680px) {
  .split-compare {
    grid-template-columns: 1fr;
  }
}

.compare-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #fafaf9;
}

.compare-box h4 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.82rem;
  border-bottom: 1px dashed var(--border);
}

.compare-row:last-child {
  border-bottom: none;
  font-weight: 700;
  padding-top: 8px;
}

.compare-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Breakdown Table */
.table-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: #fafaf9;
  border-bottom: 1px solid var(--border);
}

.table-header-bar h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  max-height: 360px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

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

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

.data-table th {
  position: sticky;
  top: 0;
  background: #f5f5f4;
  color: var(--muted);
  font-weight: 700;
  z-index: 2;
}

.data-table td {
  font-family: var(--font-mono);
}

.data-table td:first-child {
  font-family: var(--font-sans);
  font-weight: 600;
}

.data-table tr.selected-row {
  background: var(--soft-accent);
  font-weight: 700;
}

.pos-val {
  color: var(--accent);
  font-weight: 700;
}

.neg-val {
  color: var(--slate-blue);
  font-weight: 700;
}

/* Affiliate Partner Cards */
.partner-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.partner-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.partner-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.ftc-disclosure {
  margin: 0 0 18px;
  font-size: 0.79rem;
  color: var(--muted);
  background: #fafaf9;
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

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

@media (max-width: 880px) {
  .affiliate-grid {
    grid-template-columns: 1fr;
  }
}

.affiliate-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fcfcfb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.affiliate-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.aff-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft-accent);
  color: var(--primary);
  border: 1px solid var(--soft-accent-border);
  margin-bottom: 10px;
}

.affiliate-card h3 {
  margin: 0 0 7px;
  font-size: 1.02rem;
  color: var(--text);
}

.affiliate-card p {
  margin: 0 0 16px;
  font-size: 0.87rem;
  color: var(--muted);
  flex-grow: 1;
}

.aff-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.aff-cta:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

/* Editorial Content & Guides */
.content-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .content-section {
    padding: 22px 18px;
  }
}

.content-section h2 {
  margin: 0 0 14px;
  font-size: 1.42rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.content-section h3 {
  margin: 24px 0 10px;
  font-size: 1.12rem;
  color: var(--primary);
}

.content-section p {
  margin: 0 0 14px;
  color: var(--text);
}

.content-section ul,
.content-section ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.content-section li {
  margin-bottom: 8px;
}

.formula-box {
  background: #fafaf9;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin: 18px 0;
  font-family: var(--font-mono);
  font-size: 0.87rem;
  line-height: 1.65;
  overflow-x: auto;
}

.benchmark-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.benchmark-table th,
.benchmark-table td {
  padding: 10px 13px;
  border: 1px solid var(--border);
  text-align: left;
}

.benchmark-table th {
  background: var(--soft-accent);
  color: var(--primary);
  font-weight: 700;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fcfcfb;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  appearance: none;
  background: transparent;
  border: none;
  padding: 15px 18px;
  text-align: left;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.62;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.faq-item:not(.open) .faq-answer {
  display: none;
}

/* Related Tools & Cross-Linking */
.crosslink-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 36px;
}

.crosslink-section h2 {
  margin: 0 0 6px;
  font-size: 1.28rem;
}

.crosslink-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.crosslink-group-title {
  margin: 18px 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.crosslink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.crosslink-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fafaf9;
  text-decoration: none;
  transition: all 0.15s ease;
}

.crosslink-card:hover {
  border-color: var(--accent);
  background: var(--soft-accent);
  text-decoration: none;
}

.crosslink-card.current-page {
  border-color: var(--primary);
  background: var(--soft-accent);
}

.crosslink-card strong {
  display: block;
  font-size: 0.92rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.crosslink-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Footer */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand strong {
  display: block;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.footer-brand p {
  margin: 0;
  max-width: 460px;
  font-size: 0.83rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
}

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

.footer-bottom {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.79rem;
}

.toast-msg {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 200;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast-msg.visible {
  opacity: 1;
  transform: translateY(0);
}
