/* =========================
   TheDailyo - Global CSS
   Light Theme v3 (visual refresh)
   - Stronger typography + atmosphere
   - Keeps calculator/table/layout system
   ========================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

/* Theme tokens */
:root {
  --bg: #f2f7f6;
  --bg-card: #ffffff;
  --bg-column: #ffffff;

  /* Teal / ink — finance-forward, not generic blue */
  --accent: #0f766e;
  --accent-soft: #115e59;
  --accent-bright: #14b8a6;
  --accent-glow: rgba(15, 118, 110, 0.16);
  --accent-tint: rgba(15, 118, 110, 0.09);

  --text-main: #10231f;
  --text-muted: #5a6b66;

  --border-subtle: rgba(16, 35, 31, 0.1);
  --border-strong: rgba(16, 35, 31, 0.16);

  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --radius-control: 12px;

  --shadow-soft: 0 10px 30px rgba(16, 35, 31, 0.07);
  --shadow-hover: 0 16px 40px rgba(16, 35, 31, 0.11);

  --focus-ring: 0 0 0 3px rgba(20, 184, 166, 0.28);

  --font-sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --container: 1100px;
}

/* Reset + base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(20, 184, 166, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 18%, rgba(15, 118, 110, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 60%, rgba(16, 35, 31, 0.04), transparent 45%),
    linear-gradient(180deg, #f6faf9 0%, #eef5f3 48%, #f8faf9 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  padding: 28px 16px 56px;
  display: flex;
  justify-content: center;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  width: 100%;
}

.page {
  width: 100%;
  max-width: var(--container);
  animation: tdy-page-in 0.45s ease both;
}

@keyframes tdy-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page,
  .card,
  .list-item,
  .nav-pill,
  .btn,
  .btn-primary,
  .btn-ghost {
    animation: none !important;
    transition: none !important;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 0.12s ease;
  z-index: 9999;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--focus-ring);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(15, 118, 110, 0.5);
}

/* Common text helpers */
p {
  color: var(--text-muted);
  line-height: 1.65;
}

a {
  color: var(--accent-soft);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text-main);
}

/* Header (shared) */
.site-header {
  text-align: center;
  margin-top: 28px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -48px;
  width: 320px;
  height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.brand-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--accent-soft);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
}

.site-subtitle {
  margin-top: 12px;
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 550;
  line-height: 1.55;
}

.header-gradient-line {
  height: 3px;
  width: 120px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 999px;
  opacity: 0.95;
}

/* Nav pills */
.nav-pills {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    background 0.14s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow-soft);
  background: #ffffff;
}

/* Search */
.search-wrap {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.search-input {
  width: min(720px, 100%);
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.search-input::placeholder {
  color: rgba(71, 85, 105, 0.75);
}

.search-button {
  padding: 10px 18px;
  border-radius: var(--radius-control);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.search-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

@media (max-width: 900px) {
  .search-wrap {
    flex-direction: column;
  }

  .search-button {
    width: min(720px, 100%);
    margin: 0 auto;
  }
}

/* Sections */
.section-title {
  margin-top: 30px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
}

.section-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 46rem;
}

/* Grids + cards */
.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 118, 110, 0.28);
}

.card:hover::after {
  opacity: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-meta {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-soft);
}

/* Info boxes */
.info-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.info-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.info-box h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.info-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Lists */
.list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.list-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(15, 118, 110, 0.25);
}

.li-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-main);
}

.li-desc {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Notes */
.note {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  border: 1px solid rgba(15, 118, 110, 0.18);
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.5;
}

.note-inline {
  margin-top: 12px;
}

/* FAQ */
details.faq {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

details.faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text-main);
  list-style: none;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Forms + buttons */
label {
  display: block;
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.05);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(71, 85, 105, 0.75);
}

select {
  cursor: pointer;
}

button {
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-ghost {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--border-subtle);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.btn-ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.3);
}

/* Calculator layout kit */
.calculator {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

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

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

.result {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.9));
  color: var(--text-main);
  font-weight: 750;
  line-height: 1.5;
}

.result h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.help-text {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hint {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  margin-left: 6px;
}

.warn {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.25);
  color: var(--text-main);
  font-weight: 700;
  display: none;
}

/* Calculator/page layout helpers */
.two-col {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text-main);
}

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

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

/* KPI blocks */
.kpi-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.kpi {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 14px;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.08);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpi-value {
  font-family: var(--font-display);
  color: var(--text-main);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

/* Tables */
.table-wrap {
  margin-top: 12px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.06);
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #ffffff;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #ffffff;
  color: var(--text-main);
  font-weight: 900;
  z-index: 1;
}

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

tbody tr:hover td {
  background: var(--accent-tint);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer-links a {
  color: var(--accent-soft);
  text-decoration: none;
  margin: 0 4px;
}

.site-footer-links a:hover {
  text-decoration: underline;
  color: var(--text-main);
}

/* Utility */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Search error banner */
.error-banner {
  display: none;
  margin: 12px auto 0;
  width: min(720px, 100%);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  font-weight: 800;
  text-align: left;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.06);
}

.tradingview-widget-container {
  margin: 18px auto 0;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.08);
}

/* Breadcrumbs */
.breadcrumbs {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--accent-soft);
  text-decoration: none;
}

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

.crumb-sep {
  color: rgba(71, 85, 105, 0.75);
}

/* Disabled / non-clickable cards */
.tool-card[data-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
  box-shadow: none;
}
.prose p,
.prose li {
  color: var(--text-muted);
  line-height: 1.72;
}
.prose ul,
.prose ol {
  margin-top: 10px;
  margin-left: 20px;
}
.prose h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
}
.prose h3 {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 8px;
  margin-bottom: 8px;
} /* ========================= Tutorial TOC ========================= */
.toc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 840px) {
  .toc {
    grid-template-columns: 1fr;
  }
}
.toc a {
  display: block;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}
.toc a:hover {
  border-color: rgba(15, 118, 110, 0.35);
} /* ========================= Inline code variant ========================= */
code.k {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  background: rgba(2, 6, 23, 0.06);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 850;
  color: var(--text-main);
} /* ========================= Optional guide table helper ========================= */
.prose-table th,
.prose-table td {
  text-align: left;
  vertical-align: top;
}


/* =========================
   AdSense placement containers
   ========================= */
.ad-container {
  text-align: center;
  margin: 1.5rem 0;
  min-height: 90px;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.ad-container ins.adsbygoogle {
  display: block;
  width: 100%;
}

.ad-header {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.ad-results {
  position: sticky;
  top: 1rem;
  z-index: 2;
  margin-top: 1rem;
  min-height: 100px;
}

.ad-article {
  margin: 1.75rem 0;
}

/* Keep two-col calculator layouts intact if an in-article unit is a grid child */
.two-col > .ad-article {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .ad-container {
    margin: 1rem 0;
    min-height: 50px;
  }

  .ad-header,
  .ad-article {
    min-height: 50px;
  }

  .ad-results {
    position: static;
    top: auto;
    min-height: 50px;
  }
}

/* =========================
   Lead capture + network promo
   ========================= */
.tdy-lead-host {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.tdy-lead-cta {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.tdy-lead-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.1);
}

.tdy-lead-cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tdy-network-banner {
  display: block;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.08),
    rgba(255, 255, 255, 0.95)
  );
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.05);
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}

.tdy-network-banner:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
}

.tdy-network-banner__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tdy-network-banner__text {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
  color: var(--text-main);
}

body.tdy-lead-open {
  overflow: hidden;
}

.tdy-lead-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tdy-lead-modal[hidden] {
  display: none !important;
}

.tdy-lead-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.tdy-lead-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 22px 20px 18px;
}

.tdy-lead-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.tdy-lead-modal__close:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.06);
}

.tdy-lead-modal__title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 0 28px 6px 0;
}

.tdy-lead-modal__sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 650;
  line-height: 1.45;
  margin-bottom: 14px;
}

.tdy-lead-form__label {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.tdy-lead-form__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.tdy-lead-form__input:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(15, 118, 110, 0.45);
}

.tdy-lead-form__error {
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.tdy-lead-form__submit {
  width: 100%;
  margin-top: 4px;
  border-radius: 8px;
  padding: 11px 16px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

.tdy-lead-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tdy-lead-success {
  text-align: center;
  padding: 18px 8px 8px;
}

.tdy-lead-success__check {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 1.4rem;
  font-weight: 900;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.tdy-lead-success__text {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .tdy-lead-cta,
  .tdy-network-banner__text {
    font-size: 0.9rem;
  }

  .tdy-lead-modal__panel {
    padding: 18px 16px 16px;
  }
}

/* =========================
   Home page layout
   ========================= */
body.home-page {
  padding-top: 0;
}

.home-hero {
  position: relative;
  text-align: center;
  margin: 0 -16px 36px;
  padding: 22px 20px 48px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(20, 184, 166, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-subtle);
}

.home-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-bottom: 40px;
}

.home-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 4px 2px;
}

.home-nav a:hover {
  color: var(--accent-soft);
}

.home-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-main);
  margin: 0 0 14px;
}

.home-headline {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 650;
  color: var(--text-muted);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.45;
}

.home-lede {
  margin: 12px auto 0;
  max-width: 24rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.home-cta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-cta .btn {
  min-width: 160px;
}

.home-section {
  margin-top: 8px;
  margin-bottom: 28px;
}

.home-section .section-title {
  margin-top: 0;
}

.home-browse {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 800px) {
  .home-browse {
    grid-template-columns: 1fr 1fr;
  }
}

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

.home-browse__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.home-browse__link:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: var(--shadow-soft);
}

.home-browse__name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-main);
}

.home-browse__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.home-popular {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.home-popular a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 13px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  color: var(--text-main);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}

.home-popular a:hover {
  background: #ffffff;
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
  color: var(--text-main);
}

.home-popular__title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--text-main);
}

.home-popular__desc {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .home-hero {
    margin-left: -16px;
    margin-right: -16px;
    padding: 16px 16px 36px;
  }

  .home-nav {
    margin-bottom: 28px;
  }

  .home-cta .btn {
    width: 100%;
  }
}

/* Shared calculator helpers (replaces per-page <style> overrides) */
.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 750;
  color: var(--text-main);
  user-select: none;
}

.check input {
  width: auto;
  box-shadow: none;
}

.small-note,
.subtle,
.muted {
  color: var(--text-muted);
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.55;
}

.small-note {
  margin-top: 10px;
}

.narrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.content-section {
  margin-top: 18px;
}

.content-list {
  margin: 10px 0 0 18px;
  color: var(--text-muted);
  line-height: 1.65;
}

.content-list a {
  font-weight: 700;
}

/* Tutorial / guide helpers */
.code-block {
  margin-top: 12px;
  background: #10231f;
  color: #e8f5f2;
  border-radius: var(--radius-md);
  padding: 14px;
  overflow: auto;
  box-shadow: var(--shadow-soft);
}

.code-block pre,
.prose pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.65;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.prose pre {
  margin-top: 12px;
  background: #10231f;
  color: #e8f5f2;
  border-radius: var(--radius-md);
  padding: 14px;
  overflow: auto;
}

.callout {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  color: var(--text-main);
  line-height: 1.65;
}

.lesson-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.lesson-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.lesson-item strong {
  color: var(--text-main);
}

/* Compact hub heroes (category indexes) */
.home-hero--compact {
  padding-bottom: 36px;
  margin-bottom: 28px;
}

.home-hero--compact .home-nav {
  margin-bottom: 28px;
}

.home-brand--sm {
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  margin-bottom: 10px;
}

.home-crumbs {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.home-crumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.home-crumbs a:hover {
  color: var(--accent-soft);
}

.home-crumbs span {
  margin: 0 6px;
  opacity: 0.55;
}
