/* ============================================================
   Mortgage Quest — Stylesheet
   Design: Monospace developer aesthetic (Space Mono)
   Palette: Dark (#111), White (#fff), Emerald (#059669)
   ============================================================ */

/* --- Reset & Variables --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root {
  --dark: #111;
  --white: #fff;
  --bg: #fff;
  --orange: #059669;
  --text: #111;
  --text2: #555;
  --text3: #888;
  --border: #ddd;
  --green: #1a7f37;
  --green-bg: #dafbe1;
  --yellow: #9a6700;
  --yellow-bg: #fff8c5;
  --orange-bg: #ecfdf5;
  --red: #cf222e;
  --red-bg: #ffebe9;
  --radius: 6px;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 13px;
}
i[class^="ri-"] {
  font-size: inherit;
  vertical-align: middle;
  line-height: 1;
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}
.logo i { font-size: 22px; color: var(--orange); }
.logo strong { color: var(--orange); font-weight: 700; }

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 20px 14px;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.nav-link:hover { color: var(--white); }
.nav-link.active { color: var(--orange); border-bottom-color: var(--orange); }
.nav-link i { font-size: 15px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}
.header-right { display: flex; align-items: center; gap: 12px; }

/* --- Score Badge --- */
.score-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--orange);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.score-badge i { font-size: 12px; }
.score-badge:hover { opacity: .85; }

/* --- Currency Select --- */
.currency-select {
  background: transparent;
  color: var(--white);
  border: 1px solid #444;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.currency-select:focus { border-color: var(--orange); }
.currency-select option { background: var(--dark); color: var(--white); }

/* --- Layout --- */
.container { max-width: 900px; margin: 0 auto; padding: 24px 28px 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.col-right { position: sticky; top: 60px; }
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  font-weight: 700;
  margin: 0 0 12px;
}

/* --- Home Cards --- */
.homes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; }
.home-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.home-card::before { content: none; }
.home-card:hover { border-color: var(--orange); }
.home-card.active { border-color: var(--orange); background: #f0fdf4; }
.home-card .emoji {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #f5f5f5;
  color: var(--text);
}
.home-card .name { font-weight: 700; font-size: 12px; color: var(--text); margin-bottom: 4px; }
.home-card .price { color: var(--orange); font-weight: 700; font-size: 13px; }

/* --- Sliders --- */
.sliders { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.slider-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 10px;
}
.slider-group label .val { color: var(--orange); font-weight: 700; font-size: 13px; }
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
input[type=range]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

/* --- Metrics --- */
.metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}
.metric-card .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  font-weight: 700;
  margin-bottom: 6px;
}
.metric-card .value { font-size: 20px; font-weight: 700; color: var(--text); }
.metric-card .sub { font-size: 10px; color: var(--text3); margin-top: 3px; }

/* --- Verdict Bar --- */
.verdict-bar {
  border-radius: var(--radius);
  padding: 12px 20px;
  margin: 0 0 12px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  transition: all .15s;
}
.verdict-bar.comfortable { background: var(--green-bg); color: var(--green); }
.verdict-bar.manageable  { background: var(--yellow-bg); color: var(--yellow); }
.verdict-bar.tight       { background: var(--orange-bg); color: var(--orange); }
.verdict-bar.unaffordable{ background: var(--red-bg); color: var(--red); }

/* --- Challenge Box --- */
.challenge-box {
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.challenge-box::before { content: none; }
.challenge-box h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.challenge-box h3 i { font-size: 14px; }
.challenge-text {
  font-size: 13px;
  margin-bottom: 14px;
  min-height: 2rem;
  line-height: 1.6;
  color: var(--text2);
}
.challenge-status {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}
.challenge-status.pass { background: var(--green-bg); color: var(--green); }
.challenge-status.fail { background: var(--red-bg); color: var(--red); }
.pts-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  background: var(--orange-bg);
  color: var(--orange);
}

/* --- Buttons --- */
.btn-row { display: flex; gap: 8px; }
.btn {
  padding: 10px 18px;
  border-radius: 4px;
  border: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
}
.btn i { font-size: 14px; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #047857; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-outline { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

/* --- Loading Bar --- */
.loading-wrap { display: none; margin-bottom: 10px; }
.loading-wrap.active { display: block; }
.loading-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; font-weight: 700; }
.loading-track { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.loading-fill { width: 0%; height: 100%; border-radius: 2px; background: var(--orange); transition: width .1s linear; }

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  z-index: 999;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 8px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.modal-head {
  background: var(--dark);
  color: var(--white);
  padding: 18px 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.modal-head h2 i { color: var(--orange); }
.modal-close { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--white); }
.modal-body { padding: 20px; }
.modal-total {
  text-align: center;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--orange-bg);
  border-radius: var(--radius);
}
.modal-total .big { font-size: 28px; font-weight: 700; color: var(--orange); }
.modal-total .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-top: 2px;
}
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 120px; font-size: 12px; padding: 8px 12px; }

/* --- Content Section (SEO) --- */
.content-section {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.content-section h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}
.content-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.content-section h2::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}
.content-section p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text2);
  margin-bottom: 12px;
}
.content-section code {
  background: var(--orange-bg);
  color: var(--orange);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color .15s;
}
.feature-card:hover { border-color: var(--orange); }
.feature-card i {
  font-size: 24px;
  color: var(--orange);
  display: block;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text3);
  margin: 0;
}

/* --- FAQ Accordion --- */
.faq-list { margin: 16px 0 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color .15s;
}
.faq-item:hover { border-color: var(--orange); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.faq-q i {
  font-size: 18px;
  color: var(--orange);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 16px;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 16px 14px;
}
.faq-a p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text2);
  margin: 0;
}

/* --- Page Content (inner pages) --- */
.page-content { padding-top: 36px; padding-bottom: 48px; }
.page-header {
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--orange-bg);
  color: var(--orange);
  font-size: 24px;
  margin-bottom: 14px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.page-updated { font-size: 12px; color: var(--text3); }
.page-intro { font-size: 14px; color: var(--text2); line-height: 1.7; max-width: 520px; margin: 8px auto 0; }
.page-body { max-width: 720px; margin: 0 auto; }
.page-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-body h2::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}
.page-body p { font-size: 13px; line-height: 1.8; color: var(--text2); margin-bottom: 10px; }
.page-body ul {
  margin: 0 0 14px 20px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.8;
}
.page-body ul li { margin-bottom: 4px; }
.page-body a { color: var(--orange); text-decoration: none; font-weight: 700; }
.page-body a:hover { text-decoration: underline; }
.page-body code {
  background: var(--orange-bg);
  color: var(--orange);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

/* Page Callout */
.page-callout {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.7;
}
.page-callout i { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.page-callout strong { display: block; margin-bottom: 4px; font-size: 13px; }
.page-callout p { margin: 0; font-size: 12px; }
.page-callout.warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid #e6c200; }
.page-callout.info { background: var(--orange-bg); color: var(--orange); border: 1px solid #6ee7b7; }

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: border-color .15s;
}
.contact-card:hover { border-color: var(--orange); }
.contact-card i { font-size: 22px; color: var(--orange); display: block; margin-bottom: 8px; }
.contact-card h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.contact-card p { font-size: 11px; color: var(--text3); margin: 0; line-height: 1.6; }
.contact-card a { color: var(--orange); text-decoration: none; font-weight: 700; }

/* Contact Form */
.contact-form-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group select, .form-group textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: none;
  background: var(--white);
  color: var(--text);
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--orange); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-success {
  text-align: center;
  padding: 32px 16px;
}
.form-success i { font-size: 48px; color: var(--green); display: block; margin-bottom: 12px; }
.form-success h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-success p { font-size: 13px; color: var(--text3); }

/* --- About Page --- */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: border-color .15s;
}
.stat-card:hover { border-color: var(--orange); }
.stat-num { font-size: 28px; font-weight: 700; color: var(--orange); margin-bottom: 2px; }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--text3); margin-bottom: 8px; }
.stat-card p { font-size: 11px; color: var(--text3); margin: 0; line-height: 1.5; }

.about-steps { margin: 16px 0; display: flex; flex-direction: column; gap: 12px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.step:hover { border-color: var(--orange); }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}
.step h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.step p { font-size: 12px; color: var(--text3); margin: 0; line-height: 1.6; }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: #888;
  padding: 28px;
  font-size: 11px;
  margin-top: 48px;
  border-top: 1px solid #222;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-brand i { color: var(--orange); font-size: 16px; }
.footer-brand strong { color: var(--orange); }
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  color: #666;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: color .15s;
}
.footer-links a:hover { color: var(--orange); }
.footer-copy { color: #555; font-size: 10px; width: 100%; text-align: center; margin-top: 8px; }

/* --- Responsive --- */
.nav-extras { display: none; }
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
  .col-right { position: static; }
  .homes, .metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .header { padding: 0 16px; }
  .container { padding: 16px 14px; }
  .header-right { display: none; }
  .header-left { width: 100%; justify-content: space-between; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    border-top: 1px solid #222;
    padding: 4px 0;
  }
  .nav.open { display: flex; }
  .nav-link {
    padding: 12px 24px;
    border-bottom: none;
    border-left: none;
  }
  .nav-link.active { color: #888; border: none; }
  .nav-extras {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-top: 1px solid #222;
  }
  .nav-extras .currency-select {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
  }
  .nav-extras .score-badge {
    width: 100%;
    padding: 12px 24px;
    border-radius: 0;
    background: transparent;
    color: var(--orange);
    font-size: 12px;
    justify-content: flex-start;
    border-top: 1px solid #222;
  }
  .footer-inner { justify-content: center; text-align: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .homes { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
}

/* --- Tm Calculator --- */
.tm-input-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.tm-input-group label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  font-weight: 700;
  margin-bottom: 8px;
}
.tm-textarea {
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 16px;
  letter-spacing: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  resize: vertical;
  outline: none;
  background: #fafafa;
  color: var(--text);
  text-transform: uppercase;
}
.tm-textarea:focus { border-color: var(--orange); }
.tm-seq-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text3);
  font-weight: 700;
}
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}
.btn-sm:hover { border-color: var(--orange); color: var(--orange); }

.tm-details-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
}
.tm-details-box h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tm-details-box h3 i { color: var(--orange); }
.tm-bases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.tm-base-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  background: #f8f9fa;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.base {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.base-a { background: #ef4444; }
.base-t { background: #f59e0b; }
.base-g { background: #22c55e; }
.base-c { background: #3b82f6; }
.tm-formula-info p {
  font-size: 12px;
  color: var(--text2);
  margin: 4px 0;
}
.tm-formula-info strong { color: var(--text); }

/* --- Calculator Directory Cards --- */
.calc-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin: 0 0 28px;
}
.calc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
}
.calc-card:hover {
  border-color: var(--orange);
  background: #f0fdf4;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.calc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f0fdf4;
  color: var(--orange);
  font-size: 20px;
  flex-shrink: 0;
}
.calc-card:hover .calc-icon {
  background: var(--orange);
  color: #fff;
}
.calc-info { flex: 1; min-width: 0; }
.calc-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}
.calc-desc {
  font-size: 11px;
  color: var(--text3);
}
.calc-arrow {
  font-size: 18px;
  color: var(--border);
  flex-shrink: 0;
  transition: all .15s;
}
.calc-card:hover .calc-arrow {
  color: var(--orange);
  transform: translateX(2px);
}
