@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

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

:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface2: #1a2236;
  --border: #1f2d45;
  --text: #e8edf5;
  --text-muted: #6b7a99;
  --green: #10d4a0;
  --green-dim: rgba(16, 212, 160, 0.12);
  --red: #f05252;
  --red-dim: rgba(240, 82, 82, 0.12);
  --blue: #3b82f6;
  --gold: #f59e0b;
  --highlight-row: rgba(16, 212, 160, 0.07);
  --highlight-border: rgba(16, 212, 160, 0.4);
  --deduct-color: #ff8080;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Header ─── */
header {
  background: linear-gradient(135deg, #0d1628 0%, #131f3a 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  flex-wrap: wrap;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--green), #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo span {
  font-size: 20px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-tab.active {
  background: var(--green-dim);
  color: var(--green);
}

.nav-tab:hover:not(.active) {
  background: var(--surface);
  color: var(--text);
}

.year-switcher {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.year-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Pretendard', sans-serif;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.year-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
}

/* ─── Main layout ─── */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.page {
  display: none;
  max-width: 100%;
}

.page.active {
  display: block;
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.card-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.card-row .card {
  flex: 1;
  min-width: 200px;
}

/* ─── Controls bar (Feature 1) ─── */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.control-group label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* 연봉 입력 래퍼 */
.salary-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.salary-hint {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  min-height: 16px;
  letter-spacing: -0.2px;
  position: absolute;
  bottom: -18px;
  left: 0;
  white-space: nowrap;
}

.salary-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 7px 12px;
  font-size: 14px;
  width: 160px;
  font-family: 'Pretendard', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.salary-input:focus {
  border-color: var(--green);
}

select.salary-input {
  width: auto;
  cursor: pointer;
}

.btn-jump {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: #0a0e1a;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Pretendard', sans-serif;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-jump:hover {
  opacity: 0.85;
}

.fomo-banner {
  margin-left: auto;
  background: var(--red-dim);
  border: 1px solid rgba(240, 82, 82, 0.3);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.fomo-banner:hover {
  background: rgba(240, 82, 82, 0.2);
  border-color: rgba(240, 82, 82, 0.5);
}

/* ─── Table ─── */
.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  max-height: 70vh;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0d1628;
  padding: 12px 10px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

#salaryTable thead th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 20;
  background: #0d1628;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
}

tbody tr {
  border-bottom: 1px solid rgba(31, 45, 69, 0.5);
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr.highlighted {
  background: var(--highlight-row) !important;
  box-shadow: inset 3px 0 0 var(--green);
}

td {
  padding: 10px 10px;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#salaryTable td:first-child {
  text-align: left;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
}

#salaryTable tbody tr.highlighted td:first-child {
  background: #0d1a14;
}

#salaryTable tbody tr:hover td:first-child {
  background: #0c111e;
}

.td-net {
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
}

.td-deduct {
  color: var(--deduct-color);
  font-weight: 600;
}

.td-refund {
  color: var(--gold);
  font-weight: 700;
}

.td-rate {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

/* 공제 컬럼 헤더 강조 */
th.th-deduct {
  color: var(--deduct-color) !important;
  opacity: 0.85;
}

th.th-deduct-total {
  color: var(--red) !important;
}

/* ─── Feature 2: Simulator ─── */
.sim-layout {
  display: grid;
  grid-template-columns: min(400px, 100%) 1fr;
  gap: 20px;
}

.sim-input-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.sim-result-panel {
  min-width: 0;
}

.input-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.input-row label {
  font-size: 13px;
  color: var(--text);
  flex: 1;
}

.input-row .sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.num-input {
  width: 130px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  font-family: 'Pretendard', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.num-input:focus {
  border-color: var(--blue);
}

/* Sticky refund bar (mobile only) */
.sticky-refund-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-weight: 700;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  pointer-events: none;
}

.sticky-refund-bar.visible {
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-refund-bar.positive {
  background: rgba(10, 31, 24, 0.95);
  border-bottom: 1px solid rgba(16, 212, 160, 0.3);
}

.sticky-refund-bar.negative {
  background: rgba(31, 10, 10, 0.95);
  border-bottom: 1px solid rgba(240, 82, 82, 0.3);
}

.sticky-refund-label {
  font-size: 12px;
  color: var(--text-muted);
}

.sticky-refund-amount {
  font-size: 18px;
  font-weight: 900;
}

.sticky-refund-amount.green {
  color: var(--green);
}

.sticky-refund-amount.red {
  color: var(--red);
}

/* Results panel */
.sim-result-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.refund-card {
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.refund-card.positive {
  background: linear-gradient(135deg, #0a1f18 0%, #0f2d20 100%);
  border: 1px solid rgba(16, 212, 160, 0.3);
}

.refund-card.negative {
  background: linear-gradient(135deg, #1f0a0a 0%, #2d0f0f 100%);
  border: 1px solid rgba(240, 82, 82, 0.3);
}

.refund-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.refund-amount {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
  margin: 4px 0 8px;
}

.refund-amount.green {
  color: var(--green);
}

.refund-amount.red {
  color: var(--red);
}

.refund-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.refund-sub span {
  display: flex;
  gap: 4px;
  align-items: center;
}

.fomo-alert {
  background: var(--red-dim);
  border: 1px solid rgba(240, 82, 82, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--red);
}

.fomo-alert .fomo-big {
  font-size: 22px;
}

/* Items table */
.items-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.items-table th {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: right;
  padding: 4px 12px;
}

.items-table th:first-child {
  text-align: left;
}

.items-table td {
  background: var(--surface2);
  padding: 12px 12px;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.items-table td:last-child {
  white-space: normal;
}

.items-table td:first-child {
  border-radius: 10px 0 0 10px;
  text-align: left;
}

.items-table td:last-child {
  border-radius: 0 10px 10px 0;
}

.badge-reason {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.badge-missed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  background: var(--red-dim);
  border-radius: 6px;
  padding: 2px 8px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.65;
  }
}

/* Strategy panel */
.strategy-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strategy-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface2);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.strategy-item:hover {
  border-color: var(--gold);
}

.strategy-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #0a0e1a;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.strategy-body {
  flex: 1;
}

.strategy-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.strategy-detail {
  font-size: 12px;
  color: var(--text-muted);
}

.strategy-gain {
  font-weight: 900;
  color: var(--green);
  font-size: 15px;
}

/* Slider rows */
.slider-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-label {
  font-size: 13px;
  font-weight: 600;
}

.slider-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.slider-effect {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Number animation */
.num-anim {
  transition: color 0.3s;
}

/* ─── Responsive ─── */

/* Tablet */
@media (max-width: 1024px) {
  .sim-layout {
    grid-template-columns: 1fr;
  }

  .sim-result-panel {
    order: -1;
  }

  .sticky-refund-bar {
    display: flex;
  }
}

/* Small tablet / Large phone */
@media (max-width: 768px) {
  .header-inner {
    padding: 8px 12px;
    gap: 8px;
    height: auto;
    min-height: 52px;
  }

  .logo {
    font-size: 15px;
  }

  .logo span {
    display: none;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
  }

  .nav-tab {
    font-size: 12px;
    padding: 6px 12px;
    flex: 1;
    text-align: center;
  }

  .year-switcher {
    margin-left: auto;
  }

  .year-btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  main {
    padding: 12px;
  }

  /* Controls bar */
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 14px 28px;
  }

  .control-group {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .control-group label {
    font-size: 11px;
  }

  .salary-input {
    width: 100%;
    font-size: 14px;
  }

  select.salary-input {
    width: 100%;
  }

  .btn-jump {
    width: 100%;
    text-align: center;
  }

  .fomo-banner {
    margin-left: 0;
    font-size: 11px;
    justify-content: center;
  }

  /* Refund card */
  .refund-amount {
    font-size: 30px;
  }

  .refund-sub {
    flex-direction: column;
    gap: 4px;
  }

  .fomo-alert .fomo-big {
    font-size: 18px;
  }

  /* Simulator inputs */
  .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 12px;
  }

  .input-row label {
    font-size: 12px;
  }

  .num-input {
    width: 100%;
    text-align: left;
    font-size: 14px;
    padding: 8px 10px;
  }

  select.num-input {
    text-align: left;
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  /* Items table */
  .items-table {
    min-width: 500px;
  }

  .badge-reason {
    white-space: normal;
    line-height: 1.4;
  }

  /* Strategy panel */
  .strategy-item {
    flex-wrap: wrap;
    padding: 12px;
  }

  .strategy-gain {
    width: 100%;
    text-align: right;
    padding-top: 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }

  /* Blog */
  .blog-header {
    padding: 20px 14px;
    margin-bottom: 20px;
  }

  .blog-main-title {
    font-size: 22px;
  }

  .blog-subtitle {
    font-size: 12px;
  }

  .blog-article {
    padding: 18px;
  }

  .article-title {
    font-size: 18px;
  }

  .article-body h3 {
    font-size: 15px;
  }

  .highlight-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .comp-header .comp-cell,
  .comp-row .comp-cell {
    font-size: 11px;
    padding: 8px 8px;
  }

  .priority-item {
    padding: 12px 14px;
  }

  .priority-text {
    font-size: 13px;
  }

  /* Slider */
  .slider-row {
    padding: 10px 12px;
  }

  /* Footer */
  footer {
    padding: 16px 12px;
  }
}

/* Phone */
@media (max-width: 480px) {
  .header-inner {
    padding: 6px 8px;
    gap: 6px;
  }

  .logo {
    font-size: 14px;
  }

  .nav-tab {
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 6px;
  }

  .year-btn {
    font-size: 10px;
    padding: 3px 6px;
  }

  main {
    padding: 8px;
  }

  .controls-bar {
    padding: 10px 10px 24px;
    border-radius: 12px;
  }

  .salary-input {
    font-size: 13px;
  }

  .table-wrap {
    border-radius: 10px;
  }

  .card {
    padding: 12px;
    border-radius: 10px;
  }

  /* Refund card */
  .refund-card {
    padding: 16px;
    border-radius: 12px;
  }

  .refund-amount {
    font-size: 26px;
  }

  .refund-label {
    font-size: 11px;
  }

  .refund-sub {
    font-size: 11px;
  }

  .fomo-alert {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .fomo-alert .fomo-big {
    font-size: 16px;
  }

  /* Items table */
  .items-table {
    min-width: 420px;
  }

  .items-table td {
    padding: 8px 8px;
    font-size: 11px;
  }

  .items-table th {
    padding: 4px 8px;
    font-size: 10px;
  }

  .badge-reason,
  .badge-missed {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Strategy */
  .strategy-title {
    font-size: 13px;
  }

  .strategy-detail {
    font-size: 11px;
  }

  .strategy-gain {
    font-size: 14px;
  }

  .strategy-rank {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  /* Blog */
  .blog-header {
    padding: 16px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .blog-main-title {
    font-size: 20px;
  }

  .blog-article {
    padding: 14px;
    border-radius: 12px;
  }

  .article-title {
    font-size: 16px;
  }

  .article-meta {
    font-size: 12px;
  }

  .article-body p,
  .article-body ul,
  .article-body ol {
    font-size: 13px;
  }

  .comparison-table {
    border-radius: 8px;
  }

  .comp-header .comp-cell,
  .comp-row .comp-cell {
    font-size: 10px;
    padding: 6px 6px;
  }

  /* Slider */
  .slider-label {
    font-size: 12px;
  }

  .slider-value {
    font-size: 12px;
  }

  .slider-effect {
    font-size: 10px;
  }

  /* Input section */
  .input-section-title {
    font-size: 10px;
  }

  .input-row {
    padding: 8px 10px;
    border-radius: 8px;
  }

  .num-input {
    font-size: 13px;
    padding: 7px 8px;
  }
}

/* ─── Blog ─── */
.blog-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 32px 20px;
  background: linear-gradient(135deg, #0d1628 0%, #131f3a 100%);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.blog-main-title {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--green), #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.blog-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.blog-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
}

.article-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--green-dim);
  color: var(--green);
  margin-bottom: 12px;
}

.article-badge.pension-badge {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
}

.article-badge.housing-badge {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
}

.article-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 24px 0 10px;
}

.article-body h3:first-child {
  margin-top: 0;
}

.article-body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 12px;
}

.article-body ul,
.article-body ol {
  margin: 8px 0 16px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

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

.article-highlight {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.highlight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(31, 45, 69, 0.5);
}

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

.highlight-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.highlight-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.highlight-value.green {
  color: var(--green);
}

.highlight-value.gold {
  color: var(--gold);
}

.article-tip {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
}

.tip-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.article-tip ol {
  margin: 0 0 0 20px;
}

/* Comparison table */
.comparison-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 16px 0;
}

.comp-header {
  display: grid;
  background: #0d1628;
}

.comp-row {
  display: grid;
  border-top: 1px solid var(--border);
}

.comp-header,
.comp-row {
  grid-template-columns: repeat(3, 1fr);
}

.comp-header .comp-cell {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 10px 14px;
  letter-spacing: 0.3px;
}

.comp-row .comp-cell {
  font-size: 13px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface2);
}

.comp-row .comp-cell:first-child {
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
}

/* 4-column comparison */
#article-housing .comp-header,
#article-housing .comp-row {
  grid-template-columns: repeat(4, 1fr);
}

.comp-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Priority box */
.priority-box {
  padding: 0;
  overflow: hidden;
}

.priority-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.priority-item:last-child {
  border-bottom: none;
}

.priority-num {
  font-size: 12px;
  font-weight: 900;
  color: #0a0e1a;
  background: linear-gradient(135deg, var(--gold), #d97706);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.priority-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.blog-disclaimer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.blog-disclaimer a {
  color: var(--blue);
  text-decoration: none;
}

.blog-disclaimer a:hover {
  text-decoration: underline;
}

/* ─── Footer ─── */
footer {
  margin-top: 40px;
  padding: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

footer p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-disclaimer {
  font-size: 11px;
}

footer a {
  color: var(--blue);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ─── Visual Polish ─── */

/* Refund glow */
.refund-amount.green {
  text-shadow: 0 0 24px rgba(16, 212, 160, 0.3);
}

.refund-amount.red {
  text-shadow: 0 0 24px rgba(240, 82, 82, 0.3);
}

/* Input focus ring */
.salary-input:focus,
.num-input:focus {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Card hover lift */
.sim-input-panel .card {
  transition: border-color 0.2s, transform 0.2s;
}

.sim-input-panel .card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

/* Table row animation */
tbody tr {
  transition: background 0.15s, box-shadow 0.15s;
}

/* Strategy badge animation */
.strategy-gain {
  transition: transform 0.2s;
}

.strategy-item:hover .strategy-gain {
  transform: scale(1.05);
}

/* Highlighted row pulse on first appear */
tbody tr.highlighted {
  animation: highlightPulse 0.6s ease-out;
}

@keyframes highlightPulse {
  0% {
    background: rgba(16, 212, 160, 0.2);
  }

  100% {
    background: var(--highlight-row);
  }
}