/* DebtOptimizerHub — Clean Finance Theme (single, consistent stylesheet) */

:root{
  --bg:      #f1f5f9;
  --card:    #ffffff;
  --text:    #0f172a;
  --muted:   #475569;
  --border:  #e2e8f0;

  --primary: #1e3a5f;
  --primary2:#1d4ed8;
  --danger:  #b91c1c;
  --ok:      #047857;

  --shadow:  0 10px 30px rgba(15, 23, 42, .08);
  --shadow2: 0 6px 18px rgba(15, 23, 42, .08);
  --radius:  16px;
  --max:     1100px;

  --sans:    'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
             "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
}

/* Prevent mystery overflow */
body, .card, .article{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Media should never blow out container width */
img, svg, video, canvas{
  max-width: 100%;
  height: auto;
}

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

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 60px;
}

/* NAV */
.nav{
  padding:16px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  font-size:22px;
  letter-spacing:-0.02em;
  line-height:1;
}

.brand a{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:inherit;
}

.brand a:hover{
  text-decoration:none;
}

.brand img{
  width:46px;
  height:46px;
  display:block;
}

.navlinks{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.navlinks a{
  color: #334155;
  font-weight: 650;
  white-space: normal;
}

.navlinks a:hover{
  color: var(--primary);
  text-decoration:none;
}

@media (max-width: 720px){
  .nav{
    align-items:flex-start;
  }

  .navlinks{
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    row-gap: 8px;
    margin-top: 6px;
  }
}

/* BREADCRUMBS */
.breadcrumbs{
  margin: -2px 0 14px;
  padding: 0 2px;
}

.breadcrumbs ol{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.breadcrumbs li{
  display: flex;
  align-items: center;
  min-width: 0;
}

.breadcrumbs li + li::before{
  content: "›";
  margin: 0 8px;
  color: #94a3b8;
  font-weight: 700;
}

.breadcrumbs a{
  color: #475569;
  text-decoration: none;
}

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

.breadcrumbs [aria-current="page"]{
  color: #334155;
  font-weight: 750;
}

@media (max-width: 640px){
  .breadcrumbs ol{
    flex-wrap: wrap;
    overflow: visible;
    font-size: 12px;
  }

  .breadcrumbs li{
    flex: 0 0 auto;
  }

  .breadcrumbs li:last-child{
    display: none;
  }
}

/* HERO */
.hero{
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 70%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.hero h1{
  margin:0 0 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}

.hero p{
  margin:0;
  color: #334155;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 550;
}

.quick-answer-box{
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: 14px;
  background: #eff6ff;
  box-shadow: 0 4px 10px rgba(15,23,42,.06);
}

.quick-answer-box p{
  margin: 0;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
}

.quick-answer-box strong{
  color: var(--text);
  font-weight: 900;
}

.quick-answer-box a{
  font-weight: 900;
  color: var(--primary);
}

.navlinks a{
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  padding: 6px 0;
}

.navlinks a:hover{
  color: var(--primary);
  text-decoration: none;
}

.navlinks a.active{
  color: var(--primary);
  position: relative;
}

.navlinks a.active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}


/* TOOL EXPLAINER CARDS */
.tool-explainer{
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: 14px;
  background: #f8fbff;
}

.tool-explainer h2{
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.tool-explainer p{
  margin: 0;
  color: rgba(15, 23, 42, 0.84);
  font-size: 14px;
  line-height: 1.6;
}

.tool-explainer p + p{
  margin-top: 8px;
}

/* COLLAPSIBLE TOOL EXPLAINERS */
details.tool-explainer{
  padding: 0 !important;
  overflow: hidden;
}

details.tool-explainer > summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

details.tool-explainer > summary::-webkit-details-marker{
  display: none;
}

details.tool-explainer > summary::marker{
  content: "";
}

details.tool-explainer > summary::after{
  content: "+";
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(30, 58, 95, 0.18);
  background: #fff;
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

details.tool-explainer[open] > summary::after{
  content: "−";
}

details.tool-explainer > summary:focus-visible{
  outline: 3px solid rgba(30, 58, 95, 0.22);
  outline-offset: -3px;
}

details.tool-explainer > .tool-explainer-content{
  padding: 0 16px 14px;
}

.tool-review-date{
  margin-top: 12px !important;
}

.tool-author-box{
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: 14px;
  background: #f8fafc;
}

.tool-author-box strong{
  display:block;
  margin-bottom: 6px;
  color: var(--text);
}

.tool-author-box p{
  margin: 0;
  color: rgba(15, 23, 42, 0.84);
  font-size: 14px;
  line-height: 1.6;
}

.tool-author-box p + p{
  margin-top: 8px;
}

/* GRID / CARDS */
.grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: start;
}

.card{
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}

@media (min-width: 900px){
  .card.two{ grid-column: span 7; }
  .card.one{ grid-column: span 5; }
}

.card.one{ align-self: start; }

.card h2{
  margin:0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.card p{
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

/* SINGLE-COLUMN TOOL LAYOUT */
.tool-layout{
  margin-top: 18px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.tool-layout .tool-main{
  width: 100%;
}

@media (max-width: 900px){
  .tool-layout{
    max-width: 100%;
  }
}

/* GUIDE GRID LAYOUT */
@media (min-width: 900px){
  .guide-grid{
    gap: 18px;
  }

  .guide-grid .guide-main{
    grid-column: span 8;
  }

  .guide-grid .guide-side{
    grid-column: span 4;
  }
}

.inline-link{
  color: #1a73e8;
  text-decoration: underline;
}

.inline-link:hover{
  text-decoration: none;
}
/* TOC */

.toc-toggle{
  background: none;
  border: none;
  color: #2d3748;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
}

.toc{
  margin-top: 10px;
  transition: all 0.2s ease;
}

.toc-collapsed{
  display: none;
}

.toc-caret{
  display:inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #333;
  transition: transform 0.2s ease;
}

.toc-toggle.toc-expanded .toc-caret{
  transform: rotate(180deg);
}

.toc a{
  color: #1a73e8; /* standard blue */
  text-decoration: none;
  display: block;
  width: 100%;
}

.toc a:hover{
  text-decoration: underline;
}

/* Unified rail section labels. These are navigation labels, not document headings. */
.guide-side .guide-rail-heading{
  margin:0 0 10px;
  color:#2d3748;
  font-size:16px;
  font-weight:800;
  line-height:1.25;
}

.guide-side hr.sep{
  margin:12px 0;
}

/* Rail table-of-contents control */
.guide-side .toc-toggle{
  margin:-4px -6px 0;
  padding:4px 6px;
  border-radius:10px;
  transition:
    background .15s ease,
    color .15s ease;
}

.guide-side .toc-toggle:hover{
  background:#f8fafc;
  color:var(--primary);
}

.guide-side .toc-toggle:focus-visible{
  outline:3px solid rgba(30,58,95,.28);
  outline-offset:2px;
}

/* Compact rail tools */
.guide-side .tool{
  position:relative;
  padding:7px 34px 7px 10px;
  border-radius:10px;
  border:1px solid #cfe0d4;
  background:linear-gradient(
    180deg,
    #fbfdfb 0%,
    #f2f8f3 100%
  );
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.guide-side .tool::after{
  content:"";
  position:absolute;
  top:50%;
  right:14px;
  width:7px;
  height:7px;
  border-top:2px solid #64748b;
  border-right:2px solid #64748b;
  transform:translateY(-50%) rotate(45deg);
  transition:
    right .15s ease,
    border-color .15s ease;
}

.guide-side .tool strong{
  font-size:13.5px;
  font-weight:800;
  line-height:1.25;
  transition:color .15s ease;
}

.guide-side .tool .meta{
  margin-top:3px;
  color:var(--muted);
  font-size:11.5px;
  font-weight:600;
  line-height:1.35;
}

.guide-side .tools{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.guide-side .tool:hover{
  background:linear-gradient(
    180deg,
    #f7fcf8 0%,
    #e5f2e8 100%
  );
  border-color:#aac8b3;
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 5px 12px rgba(15,23,42,.06);
}

.guide-side .tool:hover strong,
.guide-side .tool:focus-visible strong{
  color:var(--primary);
}

.guide-side .tool:hover::after,
.guide-side .tool:focus-visible::after{
  right:11px;
  border-color:var(--primary);
}

.guide-side .tool:focus-visible{
  outline:3px solid rgba(30,58,95,.28);
  outline-offset:2px;
  text-decoration:none;
}

/* TOOLS LIST */
.tools{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.tool{
  display:block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  border-left: 4px solid var(--primary);
  background: #f1f5f9;
  text-decoration: none;
  transition: all .15s ease;
}

.tool:hover{
  background: #e2e8f0;
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}

.tool strong{
  display:block;
  margin-bottom: 4px;
  font-weight: 850;
  color: var(--text);
}

.tool .meta{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 550;
}

/* GUIDE CARDS */
.article .guide-path-groups {
  margin-top: 30px;
}

.article .guide-path-groups h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #35506f;
}

.article .guide-path-groups h3 + p {
  margin-top: 0;
  margin-bottom: 16px;
}

.article .guide-path-groups .summary-grid {
  margin-bottom: 18px;
}

.article .guide-path-groups hr.sep {
  margin: 22px 0;
}

.article .clarifying-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid #b8cde2;
  border-radius: 12px;
  background: #f7fafd;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 400;
}

.article .clarifying-note strong {
  color: #102033;
  font-weight: 800;
}

.article .guide-path-groups .summary-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.article .guide-path-groups .summary-card:hover {
  transform: translateY(-2px);
  border-color: #b8cde2;
  background-color: #fbfdff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.article a.summary-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.article a.summary-card:hover {
  transform: translateY(-2px);
  border-color: #b8cde2;
  background-color: #fbfdff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.article .example-summary-grid {
  margin-bottom: 24px;
}

/* GUIDE TABLES */
.article .table-wrap {
  margin: 18px 0 22px;
  overflow-x: auto;
  border: 1px solid #d9e4ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.article .content-table,
.article .table-compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 560px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.article .content-table th,
.article .content-table td,
.article .table-compare th,
.article .table-compare td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e6edf5;
}

.article .content-table th,
.article .table-compare th {
  background: #f6f9fc;
  color: #102033;
  font-weight: 800;
  line-height: 1.2;
}

.article .content-table tbody tr:last-child td,
.article .table-compare tbody tr:last-child td {
  border-bottom: 0;
}

.article .content-table td:first-child,
.article .table-compare td:first-child {
  font-weight: 700;
  color: #102033;
}

.article .content-table td:not(:first-child),
.article .table-compare td:not(:first-child) {
  color: #24384f;
}

.article .comparison-table th:first-child,
.article .comparison-table td:first-child {
  width: 28%;
}

.article .comparison-table th:nth-child(2),
.article .comparison-table td:nth-child(2),
.article .comparison-table th:nth-child(3),
.article .comparison-table td:nth-child(3) {
  width: 36%;
}

.article .checkpoint-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.article .checkpoint-table th,
.article .checkpoint-table td {
  padding: 10px 10px;
  font-size: 0.9rem;
  line-height: 1.25;
  vertical-align: middle;
}

.article .checkpoint-table th {
  text-align: center;
}

.article .checkpoint-table th:first-child,
.article .checkpoint-table td:first-child {
  width: 18%;
  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.article .checkpoint-table th:not(:first-child),
.article .checkpoint-table td:not(:first-child) {
  width: 16.4%;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.article .table-wrap {
  -webkit-overflow-scrolling: touch;
}

.article .table-wrap::after {
  content: "Scroll sideways to see the full table";
  display: block;
  padding: 8px 12px 10px;
  color: #64748b;
  font-size: 0.82rem;
  border-top: 1px solid #e6edf5;
}

@media (min-width: 760px) {
  .article .table-wrap::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .article .checkpoint-table {
    min-width: 760px;
    table-layout: auto;
  }

  .article .checkpoint-table th,
  .article .checkpoint-table td {
    white-space: nowrap;
  }

  .article .checkpoint-table th:first-child,
  .article .checkpoint-table td:first-child {
    min-width: 120px;
    white-space: normal;
  }
}

/* FORMS */
.form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.field label{
  display:block;
  font-size: 13px;
  color: #334155;
  margin: 0 0 6px;
  font-weight: 650;
}

.field input,
.field select{
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text);
  padding: 11px 12px;
  font-size: 15px;
  outline: none;
  font-weight: 550;
}

.field input::placeholder,
textarea::placeholder{
  color: #9aa3ad;
  opacity: 1;
}

.field input:focus,
.field select:focus{
  border-color: rgba(30, 58, 95, .55);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, .10);
}

/* Remove number input spinners */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

input[type=number]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ACTIONS / BUTTONS */
.actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

button{
  border: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

button:hover{
  filter: brightness(0.96);
}

/* =========================
   Secondary buttons (Reset)
   ========================= */

button.secondary{
  background:#f1f5f9;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:10px;
  padding:11px 16px;
  font-weight:800;
  cursor:pointer;

  transition:background .15s ease, transform .05s ease, box-shadow .15s ease;
}

/* Hover */
button.secondary:hover{
  background:#e2e8f0;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
  transform: translateY(-1px);
}

/* Click */
button.secondary:active{
  background:#dbe2ea;
  transform:translateY(1px);
}

/* Keyboard accessibility */
button.secondary:focus-visible{
  outline:3px solid rgba(30,58,95,.35);
  outline-offset:2px;
}

/* =========================
   Calculate button styling
   ========================= */

#calcBtn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

/* Hover */
#calcBtn:hover {
  background:#1b4f85;
  transform: translateY(-1px);
}

/* Click */
#calcBtn:active {
  background: #163f6b;
  transform: translateY(1px);
}

/* Keyboard accessibility */
#calcBtn:focus-visible {
  outline: 3px solid rgba(30,58,95,.35);
  outline-offset: 2px;
}

/* =========================
   Next Step button styling
   ========================= */

#nextStepPrimaryLink {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

/* Hover */
#nextStepPrimaryLink:hover {
  background:#1b4f85;
  transform: translateY(-1px);
}

/* Click */
#nextStepPrimaryLink:active {
  background: #163f6b;
  transform: translateY(1px);
}

/* Keyboard accessibility */
#nextStepPrimaryLink:focus-visible {
  outline: 3px solid rgba(30,58,95,.35);
  outline-offset: 2px;
}


/* =========================
   Secondary Next Step button styling
   ========================= */

#nextStepSecondaryLink {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

/* Hover */
#nextStepSecondaryLink:hover {
  background:#1b4f85;
  transform: translateY(-1px);
}

/* Click */
#nextStepSecondaryLink:active {
  background: #163f6b;
  transform: translateY(1px);
}

/* Keyboard accessibility */
#nextStepSecondaryLink:focus-visible {
  outline: 3px solid rgba(30,58,95,.35);
  outline-offset: 2px;
}

.note{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 550;
}

.actions > table,
.actions > .table{
  flex: 0 0 100%;
  width: 100%;
}

/* KPI BOXES */
.kpis{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.kpi{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: #ffffff;

  /* subtle depth so results feel important */
  box-shadow: 0 1px 2px rgba(15,23,42,.05);

  transition: box-shadow .15s ease, transform .05s ease;
}

.kpi:hover{
  box-shadow: 0 4px 10px rgba(15,23,42,.08);
  transform: translateY(-1px);
}

.kpi .label{
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kpi .value{
  font-size: 24px;
  font-weight: 900;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.1;
}

.kpi .sub{
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}

/* ALERTS */
.alert{
  border: 1px solid rgba(185, 28, 28, .25);
  background: rgba(185, 28, 28, .06);
  padding: 10px 12px;
  border-radius: 14px;
  color: #7f1d1d;
  display: none;
  font-weight: 650;
}

/* TABLE — keep exported working behavior for tools/modals */
.table{
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  display: table;
}

.card .table,
.card table.table{
  width: 100%;
  max-width: 100%;
}

#schedTable{
  width: 100%;
  max-width: 100%;
}

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

.table th:first-child,
.table td:first-child{
  width: 72px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
}

.table th{
  color: #334155;
  font-weight: 800;
  background: #f1f5f9;
}

.table th:nth-child(n+2),
.table td:nth-child(n+2){
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table tr:last-child td{ border-bottom: 0; }

/* Mobile: wide tables scroll instead of collapsing */
@media (max-width: 720px){
  .table{
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    min-width: 560px;
  }

  .table th,
  .table td{
    white-space: nowrap;
  }
}

/* Table wrapper for guide tables */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  margin: 20px 0;
}

/* FOOTER + SEPARATOR */
.footer{
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 550;
}

hr.sep{
  border:0;
  height:2px;
  background:linear-gradient(
    to right,
    transparent,
    rgba(30,58,95,.35),
    transparent
  );
  margin:28px 0;
}

/* GUIDE PAGE */
.article{
  width:100%;
  padding: 4px 10px 2px;
}

@media (min-width: 900px){
  .article{
    max-width: 100%;
    margin: 0;
    padding: 6px 20px 4px;
  }
}

@media (min-width: 1200px){
  .article{
    padding-left: 24px;
    padding-right: 24px;
  }
}

.article h2{
  margin-top:20px;
  margin-bottom:12px;
  font-size:20px;
  font-weight:900;
  letter-spacing:-0.01em;
  border-left:4px solid rgba(30,58,95,.85);
  padding-left:10px;
  position:relative;
}

.article h2::after{
  content:"";
  display:block;
  width:40px;
  height:2px;
  margin-top:8px;
  background:rgba(30,58,95,.35);
}

.article p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.72;
  font-size:15.5px;
}

.article ul{
  margin: 8px 0 14px;
  padding-left: 20px;
  color: var(--muted);
}

.article li{
  margin: 8px 0;
  line-height: 1.6;
}

.article p.callout-label{
  display:flex;
  width:fit-content;
  align-items:center;
  gap:8px;
  margin:0 0 2px;
  font-weight: 850;
  color: #334155;
  font-size: 12.5px;
  line-height:1.2;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.article p.callout-label + .guide-tool{
  margin-top:0;
}

.callout-label::before{
  content:"";
  flex:0 0 auto;
  width:4px;
  height:18px;
  border-radius:999px;
  background:#2f855a;
}

.article .summary-grid + .callout-label {
  margin-top: 24px;
}

.balance-pattern-note {
  margin-top: 24px;
}

/* Example Box */
.example-box{
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary2);
  background: #eef4ff;
}

.example-box > strong{
  display:block;
  margin-bottom: 6px;
  font-weight: 900;
  color: var(--text);
}

.example-box p{
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.65;
}

.guide-tool{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:20px;
  row-gap:5px;
  overflow:hidden;
  margin: 12px 0 20px;
  padding: 20px 20px 20px 25px;
  background:linear-gradient(135deg, #ffffff 0%, #f6f9fe 48%, #eef5ff 100%);
  border-radius: 16px;
  border: 1px solid #b7cbea;
  box-shadow:
    0 8px 24px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.9);
  text-decoration: none;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.guide-tool::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, var(--primary) 0%, var(--primary2) 100%);
}

.guide-tool strong{
  display:block;
  grid-column:1;
  grid-row:1;
  min-width:0;
  font-size:17px;
  line-height:1.28;
  font-weight: 900;
  color: var(--text);
}

.guide-tool .meta{
  grid-column:1;
  grid-row:2;
  min-width:0;
  max-width:60ch;
  font-size:14px;
  color: var(--muted);
  line-height:1.5;
  font-weight: 600;
}

a.guide-tool::after{
  content:"View resource";
  grid-column:2;
  grid-row:1 / span 2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  min-width:0;
  height:auto;
  padding:7px 0;
  background:transparent;
  color:var(--primary);
  font-size:13.5px;
  font-weight:850;
  letter-spacing:.01em;
  white-space:nowrap;
  line-height:1.2;
  transition:color .15s ease;
}

a.guide-tool[href^="/tools/"]::after{
  content:"Use calculator";
}

a.guide-tool[href^="/guides/"]::after{
  content:"Read guide";
}

a.guide-tool:hover{
  background:linear-gradient(135deg, #ffffff 0%, #f2f7fd 42%, #e7f1ff 100%);
  border-color:#8eafd5;
  transform:translateY(-2px);
  box-shadow:
    0 12px 28px rgba(15,23,42,.11),
    inset 0 1px 0 rgba(255,255,255,.92);
  text-decoration:none;
}

a.guide-tool:hover::after{
  color:var(--primary2);
}

a.guide-tool:focus-visible{
  outline:3px solid rgba(37,99,235,.35);
  outline-offset:3px;
}

a.guide-tool:active{
  transform:translateY(0);
}

@media (max-width: 600px){
  .guide-tool{
    grid-template-columns:minmax(0, 1fr);
    grid-template-rows:auto auto auto;
    row-gap:7px;
    padding:18px 18px 18px 22px;
  }

  a.guide-tool::after{
    grid-column:1;
    grid-row:3;
    justify-self:start;
    margin-top:5px;
    padding:6px 0;
  }

  .guide-tool .meta{
    max-width:none;
  }
}

@media (prefers-reduced-motion: reduce){
  .guide-tool,
  a.guide-tool::after{
    transition:none;
  }

  a.guide-tool:hover,
  a.guide-tool:active{
    transform:none;
  }
}

.promo-slot{
  margin: 22px 0;
  padding: 22px 16px 14px;
  border: 1px dashed rgba(30, 58, 95, 0.22);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(30, 58, 95, 0.035),
    rgba(30, 58, 95, 0.02)
  );
  color: rgba(15, 23, 42, 0.62);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  min-height: 110px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  box-sizing:border-box;
}

.promo-slot::before{
  content:"Advertisement";
  position:absolute;
  top:6px;
  left:12px;
  font-size:10px;
  letter-spacing:.08em;
  font-weight:900;
  color:rgba(15,23,42,.45);
}

@media (max-width: 640px){
  .promo-slot{
    margin: 18px 0;
    min-height: 84px;
    padding: 12px 14px;
    font-size: 12px;
    border-radius: 12px;
  }
}

.guide-index{
  margin-top:40px;
}

.guide-index .guide-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:10px;
  margin-top:16px;
}

.guide-index .guide-grid a{
  display:block;
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  text-decoration:none;
  font-weight:700;
  color:var(--text);
  background:#f8fafc;
  line-height:1.35;
}

.guide-index .guide-grid a:hover{
  background:#eef2f7;
  transform: translateY(-1px);
}

.guide-index h3{
  margin-top:28px;
}

@media (max-width: 640px){
  .guide-index .guide-grid{
    grid-template-columns:1fr;
  }
}

.balance-jump{
  margin:32px 0;
}

.balance-jump-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(100px,1fr));
  gap:8px;
  margin-top:10px;
}

.balance-jump-grid a{
  padding:12px 14px;
  display:block;
  text-align:center;
  padding:10px;
  border:1px solid var(--border);
  border-radius:8px;
  text-decoration:none;
  font-weight:800;
  background:#f1f5f9;
  color:var(--text);
}

.balance-jump-grid a:hover{
  background:#e2e8f0;
  transform: translateY(-1px);
}

.cluster-hub-link{
  margin-top:6px;
  font-size:14px;
  color:var(--muted);
}

.minpay-examples .minpay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cluster-hub-link a{
  font-weight:700;
}

/* Sticky sidebar (desktop) */
.sticky{
  position: sticky;
  top: 14px;
}

@media (max-width: 899px){
  .sticky{ display:none; }
}

.small-note{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* Mobile shortcuts */
.mobile-shortcuts{
  display:none;
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f6f8fb;
}

.mobile-shortcuts h3{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.01em;
}

.mobile-shortcuts .links{
  display:grid;
  gap: 10px;
}

.mobile-shortcuts a{
  display:block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  text-decoration:none;
}

.mobile-shortcuts a strong{
  display:block;
  font-weight: 900;
  margin-bottom: 2px;
  color: var(--text);
}

.mobile-shortcuts a span{
  display:block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.mobile-shortcuts .mobile-shortcuts-heading{
  margin:0 0 10px;
  color:#475569;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.mobile-shortcuts .mobile-shortcuts-heading-secondary{
  margin:22px 0 10px;
}

/* Primary rail/mobile CTA */
.guide-side .tool.tool-primary,
.mobile-shortcuts a.shortcut-primary{
  border-color:#bfdbfe;
  border-left:4px solid var(--primary);
  background:linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.guide-side .tool.tool-primary:hover,
.mobile-shortcuts a.shortcut-primary:hover{
  background:#eaf3ff;
}

.guide-side .tool.tool-primary:hover{
  border-color:#93c5fd;
}

/* Secondary hub CTAs */
.guide-side .tool.tool-secondary,
.mobile-shortcuts a.shortcut-secondary{
  border-color:#dbe3ee;
  background:#ffffff;
}

.guide-side .tool.tool-secondary:hover{
  background:#f8fbff;
  border-color:#c7d5e5;
}

/* Optional: slightly stronger title color for the primary CTA */
.guide-side .tool.tool-primary strong,
.mobile-shortcuts a.shortcut-primary strong{
  color:var(--primary);
}

@media (max-width: 899px){
  .mobile-shortcuts{ display:block; }
}

/* Table of contents */
.toc{
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li{
  margin: 0;
  padding: 0;
}

.toc li + li{
  margin-top: 8px;
}

.toc a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration:none;
  transition: all .15s ease;
}

.toc a:hover{
  background: #eef3f9;
  color: var(--primary);
  text-decoration:none;
  transform: translateY(-1px);
}

/* Summary cards */
.summary-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 700px){
  .summary-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.summary-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f8fafc;
}

.summary-card strong{
  display:block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 850;
  color: var(--text);
}

.summary-card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.guide-cta-card{
  position:relative;
  border-color:#bfdbfe;
  background:linear-gradient(180deg,#ffffff 0%,#eff6ff 100%);
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.guide-cta-card:hover{
  transform:translateY(-2px);
  border-color:#93c5fd;
  box-shadow:0 12px 24px rgba(15,23,42,.12);
}

.guide-cta-card strong{
  padding-right:34px;
}

/* Guide comparison tables only */
.table-compare{
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table-compare th,
.table-compare td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.5;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.table-compare th{
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
}

.table-compare tr:last-child td{
  border-bottom: 0;
}

@media (max-width: 720px){
  .table-compare{
    min-width: 560px;
  }

  .table-compare th,
  .table-compare td{
    white-space: nowrap;
  }
}

/* CALCULATOR PREVIEW CARD */
.calc-preview{
  margin: 14px 0 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
  min-width: 0;
}

.calc-preview .bar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.calc-preview .bar strong{
  font-weight: 900;
  color: var(--text);
}

.calc-preview .bar .hint{
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  flex: 1 1 240px;
  white-space: normal;
}

@media (max-width: 420px){
  .calc-preview .bar .hint{ flex-basis: 100%; }
}

.calc-preview .body{ padding: 14px; }

.preview-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.preview-field{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  min-width: 0;
}

.preview-field .label{
  font-size: 12px;
  color: #334155;
  font-weight: 750;
  margin-bottom: 6px;
}

.preview-field .fake-input{
  height: 38px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  display:flex;
  align-items:center;
  padding: 0 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  min-width: 0;
}

.preview-kpis{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.preview-kpi{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  min-width: 0;
}

.preview-kpi .k{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.preview-kpi .v{
  margin-top: 4px;
  font-weight: 950;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.preview-actions{
  margin-top: 12px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
}

.preview-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 850;
  text-decoration:none;
  border: 0;
}

.preview-btn:hover{
  text-decoration:none;
  filter: brightness(0.96);
}

.preview-btn.secondary{
  background: #e2e8f0;
  color: var(--text);
  border: 1px solid #cbd5e1;
}

.preview-actions .note{ margin: 0; }

/* Explore more calculators */
.more-calculators{
  margin: 0 0 18px;
}

.more-calculators h2{
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.more-calculators ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.more-calculators li{
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.more-calculators a{
  width: 100%;
  min-width: 0;
  min-height: 78px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  border: 1px solid #cfe0d4;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    #fbfdfb 0%,
    #f0f7f2 100%
  );
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.035);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.more-calculators-copy{
  display: block;
  min-width: 0;
}

.more-calculators-copy strong{
  display: block;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  transition: color 0.15s ease;
}

.more-calculators-copy > span{
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.more-calculators-arrow{
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  flex: 0 0 auto;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.more-calculators-arrow svg{
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.more-calculators a:hover{
  background: linear-gradient(
    180deg,
    #f7fcf8 0%,
    #e5f2e8 100%
  );
  border-color: #aac8b3;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.more-calculators a:hover .more-calculators-copy strong{
  color: var(--primary);
}

.more-calculators a:hover .more-calculators-arrow{
  background: #173052;
  transform: translateX(2px);
}

.more-calculators a:active{
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.more-calculators a:focus-visible{
  outline: 3px solid rgba(30, 58, 95, 0.28);
  outline-offset: 2px;
  border-color: #93c5fd;
  background: #eef6ff;
  text-decoration: none;
}

.more-calculators a:focus-visible .more-calculators-copy strong{
  color: var(--primary);
}

@media (max-width: 700px){
  .more-calculators ul{
    grid-template-columns: 1fr;
  }

  .more-calculators a{
    min-height: 76px;
  }
}

@media (max-width: 420px){
  .more-calculators a{
    padding: 13px;
    gap: 10px;
  }

  .more-calculators-copy strong{
    font-size: 13.5px;
  }

  .more-calculators-copy > span{
    font-size: 12px;
  }

  .more-calculators-arrow{
    width: 28px;
    height: 28px;
  }

  .more-calculators-arrow svg{
    width: 15px;
    height: 15px;
  }
}

.guide-link-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  margin-top:14px;
}

.guide-card{
  display:block;
  padding:14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#f8fafc;
  text-decoration:none;
  transition:all .15s ease;
}

.guide-card strong{
  display:block;
  font-weight:900;
  font-size:15px;
  color:var(--text);
  margin-bottom:4px;
}

.guide-card span{
  font-size:13px;
  color:rgba(15,23,42,0.75);
}

.guide-card:hover{
  background:#eef6ff;
  transform:translateY(-1px);
}

.scenario-switcher{
  margin:18px 0;
  padding:14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8fafc;
}

.scenario-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.scenario-links a{
  display:inline-block;
  padding:6px 10px;
  border-radius:8px;
  background:#eef6ff;
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  color:#1e3a5f;
}

.scenario-links a:hover{
  background:#1e3a5f;
  color:#ffffff;
}

.methodology-block{
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
  background:#ffffff;
  margin-top:20px;
}

.author-box{
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  background:#f8fafc;
  margin-top:20px;
}

.author-box strong{
  display:block;
  font-size:14px;
  font-weight:800;
  margin-bottom:6px;
  color:var(--text);
}

.author-box p{
  font-size:14px;
  line-height:1.55;
  color:var(--muted);
  margin:6px 0;
}

.methodology-title{
  font-weight:800;
  font-size:14px;
  margin-bottom:6px;
  color:var(--text);
}

.methodology-block p{
  font-size:14px;
  line-height:1.55;
  color:var(--muted);
  margin:6px 0;
}

/* Temporarily hide ad placeholders before ad approval */
.promo-slot {
  display: none;
}

/* Approval cleanup: editorial depth and calculator defaults */
.article .evidence-grid,
.article .review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:18px 0 22px;
}

.article .evidence-card,
.article .review-card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px 18px;
  background:#f8fbff;
}

.article .evidence-card strong,
.article .review-card strong{
  display:block;
  color:var(--text);
  font-weight:900;
  margin-bottom:6px;
}

.article .evidence-card p,
.article .review-card p{
  margin:0;
}

.article .method-note{
  margin:18px 0 22px;
  padding:16px 18px;
  border:1px solid rgba(30,58,95,.16);
  border-left:4px solid var(--primary);
  border-radius:14px;
  background:#fbfdff;
}

.article .method-note p:last-child{
  margin-bottom:0;
}

.tool-example-note{
  margin:12px 0 16px;
  padding:12px 14px;
  border:1px solid rgba(30,58,95,.16);
  border-left:4px solid var(--primary2);
  border-radius:14px;
  background:#f8fbff;
  color:rgba(15,23,42,.82);
  font-size:14px;
  font-weight:700;
  line-height:1.55;
}

.tool-example-note strong{
  color:var(--text);
}

@media (max-width:700px){
  .article .evidence-grid,
  .article .review-grid{
    grid-template-columns:1fr;
  }
}


/* Quality pass: readable article tables and calculator debt rows */
.article .table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #d9e4ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
}

.article .table-wrap > table,
.article table.content-table,
.article table.table-compare{
  width:100%;
  min-width:680px;
  table-layout:auto;
  border-collapse:separate;
  border-spacing:0;
  margin:0;
}

.article .content-table th,
.article .content-table td,
.article .table-compare th,
.article .table-compare td{
  padding:13px 14px;
  text-align:left;
  vertical-align:top;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
  line-height:1.45;
}

.article .content-table th,
.article .table-compare th{
  background:#f6f9fc;
  color:#102033;
  font-weight:850;
}

.article .content-table td:first-child,
.article .table-compare td:first-child{
  color:#102033;
  font-weight:800;
}

.article .content-table td:not(:first-child),
.article .table-compare td:not(:first-child){
  color:#24384f;
  text-align:left;
}

@media (max-width:720px){
  .article .table-wrap > table,
  .article table.content-table,
  .article table.table-compare{
    min-width:720px;
  }

  .article .content-table th,
  .article .content-table td,
  .article .table-compare th,
  .article .table-compare td{
    white-space:normal;
  }
}

.debts .debt-row,
.card .debt-row{
  position:relative;
  background:#fff;
  border:1px solid rgba(30,58,95,.14);
  border-radius:16px;
  box-shadow:0 6px 16px rgba(30,58,95,.05);
}

.debts .debt-row:focus-within,
.card .debt-row:focus-within{
  border-color:#93c5fd;
  box-shadow:0 8px 20px rgba(30,58,95,.08);
}

.debt-row .field label,
.debt-row label{
  color:#334155;
  font-weight:850;
}

@media (max-width:900px){
  .debts .debt-row,
  .card .debt-row{
    padding-right:12px !important;
    padding-top:48px !important;
  }
}

/* Final polish: consistent table handling and row-based tool styling */
.article .table-wrap,
.card .table-wrap,
.tool-main .table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #d9e4ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
  margin:16px 0 20px;
}

.article .table-wrap table,
.card .table-wrap table,
.tool-main .table-wrap table,
.article table.content-table,
.article table.table-compare,
.card table.content-table,
.card table.table-compare,
.tool-main table.content-table,
.tool-main table.table-compare{
  width:100%;
  min-width:680px;
  border-collapse:separate;
  border-spacing:0;
  margin:0;
  table-layout:auto;
}

.article .table-wrap th,
.article .table-wrap td,
.card .table-wrap th,
.card .table-wrap td,
.tool-main .table-wrap th,
.tool-main .table-wrap td,
.article table.content-table th,
.article table.content-table td,
.article table.table-compare th,
.article table.table-compare td{
  padding:13px 14px;
  text-align:left;
  vertical-align:top;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
  line-height:1.45;
}

.article .table-wrap th,
.card .table-wrap th,
.tool-main .table-wrap th,
.article table.content-table th,
.article table.table-compare th{
  background:#f6f9fc;
  color:#102033;
  font-weight:850;
  border-bottom:1px solid #e2e8f0;
}

.article .table-wrap td,
.card .table-wrap td,
.tool-main .table-wrap td,
.article table.content-table td,
.article table.table-compare td{
  color:#24384f;
  border-bottom:1px solid #eef2f7;
}

.article .table-wrap tbody tr:last-child td,
.card .table-wrap tbody tr:last-child td,
.tool-main .table-wrap tbody tr:last-child td{
  border-bottom:0;
}

.article .table-wrap td:first-child,
.card .table-wrap td:first-child,
.tool-main .table-wrap td:first-child{
  color:#102033;
  font-weight:800;
}

@media (max-width:720px){
  .article .table-wrap,
  .card .table-wrap,
  .tool-main .table-wrap{
    border-radius:12px;
    margin-left:0;
    margin-right:0;
  }

  .article .table-wrap table,
  .card .table-wrap table,
  .tool-main .table-wrap table,
  .article table.content-table,
  .article table.table-compare,
  .card table.content-table,
  .card table.table-compare,
  .tool-main table.content-table,
  .tool-main table.table-compare{
    min-width:720px;
  }

  .article .table-wrap th,
  .article .table-wrap td,
  .card .table-wrap th,
  .card .table-wrap td,
  .tool-main .table-wrap th,
  .tool-main .table-wrap td{
    padding:12px;
    font-size:13px;
  }
}

.debts .debt-row,
.tool-main .debt-row,
.card .debt-row{
  position:relative;
  border:1px solid rgba(30,58,95,.16) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%) !important;
  box-shadow:0 8px 20px rgba(30,58,95,.055) !important;
}

.debts .debt-row:focus-within,
.tool-main .debt-row:focus-within,
.card .debt-row:focus-within{
  border-color:#93c5fd !important;
  box-shadow:0 10px 24px rgba(30,58,95,.09) !important;
}

.debt-row .field label,
.debt-row label{
  color:#334155;
  font-weight:850;
}

.debt-row input,
.debt-row select{
  background:#fff;
}

.strategy-row-grid{
  gap:12px;
}

.strategy-row-grid > div,
.strategy-row-grid .strategy-card,
.strategy-row-grid .mini-card{
  border-radius:16px;
}

@media (max-width:900px){
  .debts .debt-row,
  .tool-main .debt-row,
  .card .debt-row{
    padding-right:12px !important;
    padding-top:48px !important;
  }
}

/* Desktop table width fix: keep guide tables inside the article column; keep mobile/tablet scroll behavior from the existing rules. */
@media (min-width: 721px){
  .article .table-wrap,
  .card .table-wrap,
  .tool-main .table-wrap{
    overflow-x: visible !important;
  }

  .article .table-wrap > table,
  .article .table-wrap table,
  .card .table-wrap table,
  .tool-main .table-wrap table,
  .article table.content-table,
  .article table.table-compare,
  .card table.content-table,
  .card table.table-compare,
  .tool-main table.content-table,
  .tool-main table.table-compare{
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
}

/* Monetization-ready CTA and disclosure blocks */
.commercial-disclosure{
  margin:0 0 12px 0;
  padding:12px 14px;
  border:1px solid rgba(30,58,95,.16);
  border-radius:14px;
  background:#f8fbff;
  color:rgba(15,23,42,.76);
  font-size:13px;
  line-height:1.45;
}

.commercial-disclosure strong{
  color:#102033;
  font-weight:900;
}

.offer-cta{
  margin-top:16px;
  padding:18px 20px;
  border:1px solid rgba(30,58,95,.16);
  border-left:4px solid #1e3a5f;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 8px 22px rgba(15,23,42,.045);
}

.offer-cta-copy{
  max-width:76ch;
}

.offer-cta h3{
  margin:0 0 6px 0;
  color:#102033;
  font-size:18px;
  font-weight:900;
  line-height:1.25;
}

.offer-cta p{
  margin:0;
  color:rgba(15,23,42,.76);
  font-size:14px;
  line-height:1.5;
}

.offer-cta-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:14px;
}

.offer-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 14px;
  border-radius:12px;
  border:1px solid rgba(30,58,95,.22);
  background:#ffffff;
  color:#1e3a5f;
  font-size:14px;
  font-weight:900;
  line-height:1.2;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(15,23,42,.05);
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
}

.offer-link.primary{
  background:#1e3a5f;
  border-color:#1e3a5f;
  color:#ffffff;
  padding-inline:17px;
  box-shadow:0 4px 12px rgba(15,23,42,.16);
}

.offer-link:hover{
  color:#163052;
  background:#f8fbff;
  border-color:rgba(30,58,95,.34);
  box-shadow:0 4px 10px rgba(15,23,42,.08);
  transform:translateY(-1px);
  text-decoration:none;
}

.offer-link.primary:hover{
  color:#ffffff;
  background:#173052;
  border-color:#173052;
  box-shadow:0 6px 16px rgba(15,23,42,.2);
}

.offer-link:active{
  transform:translateY(1px);
  box-shadow:0 1px 3px rgba(15,23,42,.08);
}

.offer-link:focus-visible{
  outline:3px solid rgba(30,58,95,.35);
  outline-offset:2px;
}

.result-utility-panel{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(30,58,95,.12);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
}

.result-utility-panel .note{
  color:rgba(15,23,42,.58);
  font-size:13px;
  font-weight:700;
  line-height:1.35;
}

.result-utility-row,
.result-utility-buttons,
.result-utility-actions,
.compact-result-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 10px;
  margin-top:0 !important;
}

.result-utility-label{
  display:none;
}

button.result-utility-button{
  min-height:36px;
  padding:8px 12px;
  border:1px solid rgba(30,58,95,.16);
  border-radius:11px;
  background:#ffffff;
  color:#1e3a5f;
  font-size:13px;
  font-weight:900;
  line-height:1.2;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
}

button.result-utility-button:hover,
#showCurSchedBtn.result-utility-button:hover,
#showLoanSchedBtn.result-utility-button:hover{
  background:#f8fbff;
  border-color:rgba(30,58,95,.28);
  color:#163052;
  filter:none;
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(15,23,42,.07);
}

button.result-utility-button:active,
#showCurSchedBtn.result-utility-button:active,
#showLoanSchedBtn.result-utility-button:active{
  background:#eef4fb;
  transform:translateY(1px);
  box-shadow:0 1px 3px rgba(15,23,42,.06);
}

button.result-utility-button:focus-visible{
  outline:3px solid rgba(30,58,95,.35);
  outline-offset:2px;
}

.post-result-nextstep{
  display:none !important;
}

@media (max-width:720px){
  .offer-cta{
    padding:16px;
  }

  .offer-cta-actions{
    align-items:stretch;
  }

  .offer-link{
    width:100%;
  }

  .result-utility-panel,
  .result-utility-row,
  .result-utility-buttons{
    align-items:stretch;
  }

  .result-utility-panel .note{
    flex-basis:100%;
  }

  button.result-utility-button{
    flex:1 1 auto;
  }
}
/* Related guides at the bottom of calculator pages */
.tool-main > .tools{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}

/* Guide recommendation card */
.tool-main > .tools > a.tool{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  width:100%;
  min-width:0;
  min-height:100px;
  padding:16px 46px 16px 16px;

  border:1px solid #d4e0ec;
  border-left:1px solid #d4e0ec;
  border-radius:14px;

  background:linear-gradient(
    180deg,
    #fbfdff 0%,
    #eef5fb 100%
  );

  color:var(--text);
  text-decoration:none;
  box-shadow:0 2px 5px rgba(15,23,42,.035);

  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

/* CSS-drawn arrow avoids font alignment problems */
.tool-main > .tools > a.tool::after{
  content:"";
  position:absolute;
  top:50%;
  right:22px;

  width:10px;
  height:10px;

  border-width: 0 3px 3px 0;
  border-top:2px solid var(--primary);
  border-right:2px solid var(--primary);

  transform:translateY(-50%) rotate(45deg);
  transition:
    right .15s ease,
    border-color .15s ease;
}

.tool-main > .tools > a.tool strong{
  display:block;
  margin:0 0 6px;
  padding:0;

  color:var(--text);
  font-size:15px;
  font-weight:900;
  line-height:1.3;

  transition:color .15s ease;
}

.tool-main > .tools > a.tool .meta{
  margin:0;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
  line-height:1.45;
}

/* Hover */
.tool-main > .tools > a.tool:hover{
  background:linear-gradient(
    180deg,
    #f7fbff 0%,
    #e5f0fb 100%
  );

  border-color:#b8cde2;
  text-decoration:none;
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(15,23,42,.075);
}

.tool-main > .tools > a.tool:hover strong{
  color:var(--primary);
}

.tool-main > .tools > a.tool:hover::after{
  right:17px;
}

/* Click */
.tool-main > .tools > a.tool:active{
  transform:translateY(1px);
  box-shadow:0 1px 3px rgba(15,23,42,.05);
}

/* Keyboard focus */
.tool-main > .tools > a.tool:focus-visible{
  outline:3px solid rgba(30,58,95,.28);
  outline-offset:2px;
  border-color:#93c5fd;
  background:#eef6ff;
  text-decoration:none;
}

.tool-main > .tools > a.tool:focus-visible strong{
  color:var(--primary);
}

/* Tighten the heading and description directly above the guide cards */
.tool-main > h2:has(+ p.note + .tools){
  margin-bottom:6px;
}

.tool-main > p.note:has(+ .tools){
  max-width:76ch;
  margin:0 0 14px;
  color:rgba(15,23,42,.72);
  line-height:1.5;
}

.tool-main > .more-calculators + hr.sep{
  margin: 22px 0 24px;
}

/* Two columns on tablets and narrower desktop layouts */
@media (max-width:900px){
  .tool-main > .tools{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

/* One column on phones */
@media (max-width:620px){
  .tool-main > .tools{
    grid-template-columns:1fr;
    gap:10px;
  }

  .tool-main > .tools > a.tool{
    min-height:0;
    padding:14px 44px 14px 14px;
  }

  .tool-main > .tools > a.tool::after{
    right:18px;
  }

  .tool-main > .tools > a.tool:hover::after{
    right:16px;
  }
}


/* Debt Payoff Command Center product placement */
.command-center-offer{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  padding:28px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 62%,#ecfdf5 100%);
  border-color:#bfdbfe;
}
.command-center-offer h2{ margin:4px 0 8px; }
.command-center-offer p{ margin:0; max-width:760px; }
.command-center-offer > a{ white-space:nowrap; text-decoration:none; }
@media (max-width:760px){
  .command-center-offer{ grid-template-columns:1fr; }
  .command-center-offer > a{ width:100%; text-align:center; }
}

/* Debt Payoff Planner navigation badge */
.nav-product-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.nav-badge{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 7px;
  border-radius:999px;
  background:#eaf2ff;
  color:#1d4ed8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.02em;
  line-height:1;
}
