/* tn2 layout and component styles. Plain CSS, no build step. */

/* Container width bump for upgraded pages. */
.container-tn.tn2-wrap { max-width: 1200px; }

/* ------------------------------------------------------------------ */
/* Article layout                                                      */
/* ------------------------------------------------------------------ */

.tn2-article { margin-left: auto; margin-right: auto; max-width: 100%; }
.tn2-article * { min-width: 0; }
.tn2-article img { max-width: 100%; height: auto; }

/* Head: title block left, hero right on wide screens. */
.tn2-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .tn2-head {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
  }
}
.tn2-head-text { min-width: 0; }
.tn2-hero {
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.tn2-hero img { width: 100%; display: block; }

/* Disclosure note under the byline. */
.tn2-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}
.tn2-note a { color: #1d5cf0; text-decoration: underline; }

/* Two column grid: main + aside. */
.tn2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 1024px) {
  .tn2-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
  }
}
.tn2-main { min-width: 0; }

/* Aside: sticky on wide screens, stacked below. */
.tn2-aside { min-width: 0; }
@media (min-width: 1024px) {
  .tn2-aside {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow: auto;
  }
}
@media (max-width: 1023px) {
  .tn2-aside { display: contents; }
  .tn2-toc { order: -1; }
  .tn2-main { order: 1; }
  .tn2-rel { order: 2; }
}

/* Contents box. */
.tn2-toc {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
  margin-bottom: 24px;
}
.tn2-aside-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.tn2-toc ul { list-style: none; margin: 0; padding: 0; }
.tn2-toc li { margin: 0 0 6px; }
.tn2-toc a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1d5cf0;
  text-decoration: none;
  padding: 2px 0;
}
.tn2-toc a:hover { text-decoration: underline; }
.tn2-toc a.is-active {
  color: #0f172a;
  font-weight: 700;
  border-left: 3px solid #1d5cf0;
  padding-left: 8px;
  margin-left: -11px;
}

/* Related tools block. */
.tn2-rel {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}
.tn2-rel-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: #0f172a;
}
.tn2-rel-item:hover { border-color: #1d5cf0; }
.tn2-rel-item b { display: block; font-size: 15px; }
.tn2-rel-item span {
  display: block;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.tn2-rel-more {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1d5cf0;
  text-decoration: none;
}
.tn2-rel-more:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Word-break rules: never break product names inside a word.          */
/* ------------------------------------------------------------------ */

.lx-t td, .lx-t th, .lx-n, .lx-tn, .lx-head h3, .lx-tp {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
ol.sources li, ol.sources a { overflow-wrap: anywhere; word-break: break-word; }

/* ------------------------------------------------------------------ */
/* Mobile comparison table as stacked cards (below 641px).             */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .lx-tbl { overflow-x: visible; border: 0; background: transparent; }
  .lx-tbl table.lx-t { min-width: 0; width: 100%; display: block; }
  .lx-tbl table.lx-t thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .lx-tbl table.lx-t tbody { display: block; }
  .lx-tbl table.lx-t tr {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #fff;
  }
  .lx-tbl table.lx-t td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 0;
    padding: 6px 0;
    text-align: right;
  }
  .lx-tbl table.lx-t td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    text-align: left;
    flex: none;
  }
  .lx-tbl table.lx-t td:first-child {
    display: block;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    margin-bottom: 4px;
  }
  .lx-tbl table.lx-t td:first-child::before { display: none; }
  .lx-tbl table.lx-t td:last-child { display: block; }
  .lx-tbl table.lx-t td:last-child::before { display: none; }
  .lx-tbl table.lx-t td:last-child .lx-btn { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* Wide screens: pick cards and table use the full column width.       */
/* ------------------------------------------------------------------ */

@media (min-width: 1024px) {
  .tn2-main .lx-top { width: 100%; }
  .tn2-main .lx-tbl { width: 100%; }
}

/* home */
.tn2h-hero {
  border-bottom: 1px solid #e2e8f0;
  padding: 18px 0 14px;
  text-align: center;
}
.tn2h-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d5cf0;
  font-size: 12px;
  font-weight: 600;
}
.tn2h-h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
}
@media (min-width: 768px) { .tn2h-h1 { font-size: 32px; } }
.tn2h-sub {
  margin: 0 auto 10px;
  max-width: 620px;
  font-size: 14px;
  color: #475569;
}
.tn2h-search { position: relative; max-width: 560px; margin: 0 auto 0; }
.tn2h-search .field { width: 100%; }
.tn2h-results {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 30;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 4px;
  text-align: left;
  max-height: 320px;
  overflow: auto;
}
.tn2h-results.hidden { display: none; }
.tn2h-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.tn2h-chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
}
.tn2h-chip:hover { border-color: #1d5cf0; color: #1d5cf0; }

.tn2h-section { padding: 28px 0; }
#quick-tools { padding: 16px 0; }
#quick-tools .tn2h-h2 { font-size: 18px; margin: 0 0 10px; }
.tn2h-h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

/* Six tool cards. */
.tn2h-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 640px) {
  .tn2h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tn2h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  #quick-tools .tn2h-card { padding: 9px 12px; gap: 4px; }
  #quick-tools .tn2h-card-desc { font-size: 12px; margin: 0; }
  #quick-tools .tn2h-field input,
  #quick-tools .tn2h-field select {
    padding: 4px 8px;
    font-size: 13px;
    height: 30px;
  }
  #quick-tools .tn2h-field span { font-size: 11px; }
  #tn2h-words { height: 44px; min-height: 44px; }
  #quick-tools .tn2h-result { margin-top: 2px; }
  #quick-tools .tn2h-open { display: inline-block; margin-top: 0; }
  #quick-tools .tn2h-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, auto);
  }
}
.tn2h-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tn2h-card-title { margin: 0; font-size: 15px; font-weight: 700; color: #0f172a; }
.tn2h-card-desc { margin: 0; font-size: 12px; color: #64748b; }
.tn2h-row, .tn2h-row2 { display: grid; gap: 8px; }
.tn2h-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tn2h-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn2h-field span { font-size: 11px; font-weight: 600; color: #64748b; }
.tn2h-field input, .tn2h-field select, .tn2h-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}
.tn2h-field textarea { resize: vertical; }
.tn2h-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  font-size: 12px;
  color: #334155;
}
.tn2h-checks label { display: flex; align-items: center; gap: 4px; }
.tn2h-btn {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}
.tn2h-btn:hover { border-color: #1d5cf0; color: #1d5cf0; }
.tn2h-result {
  font-size: 13px;
  color: #334155;
  min-height: 20px;
  padding: 4px 0;
  border-top: 1px dashed #e2e8f0;
}
.tn2h-result b { font-size: 16px; color: #0f172a; }
.tn2h-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.tn2h-hint { margin: 0; font-size: 11px; color: #94a3b8; }
.tn2h-open {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: #1d5cf0;
  text-decoration: none;
}
.tn2h-open:hover { text-decoration: underline; }

/* Mobile: single column, first two cards plus a "More tools" strip. */
.tn2h-grid.tn2h-collapsed > .tn2h-card:nth-child(n+3) { display: none; }
.tn2h-morebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  margin-top: 10px;
}
.tn2h-morebar[hidden] { display: none; }
.tn2h-morebar-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.tn2h-morechip {
  display: inline-block;
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}
.tn2h-morechip:hover { border-color: #1d5cf0; color: #1d5cf0; }

/* Popular pills. */
.tn2h-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tn2h-pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
}
.tn2h-pill:hover { border-color: #1d5cf0; color: #1d5cf0; }
.tn2h-more { margin: 12px 0 0; font-size: 13px; }
.tn2h-more a { color: #1d5cf0; font-weight: 600; text-decoration: none; }
.tn2h-more a:hover { text-decoration: underline; }

/* Topic cards. */
.tn2h-topics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .tn2h-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tn2h-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tn2h-topic {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
}
.tn2h-topic:hover { border-color: #1d5cf0; }
.tn2h-topic b { display: block; font-size: 15px; }
.tn2h-topic span { display: block; font-size: 12px; color: #1d5cf0; font-weight: 600; }
.tn2h-topic em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* How it works strip. */
.tn2h-how {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 768px) {
  .tn2h-how { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tn2h-how > div {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}
.tn2h-how b { display: block; font-size: 14px; color: #0f172a; }
.tn2h-how p { margin: 4px 0 0; font-size: 12px; color: #475569; line-height: 1.5; }
.tn2h-how a { color: #1d5cf0; font-weight: 600; text-decoration: none; }
.tn2h-how a:hover { text-decoration: underline; }

/* blog index */
.tn2-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.tn2-chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
}
.tn2-chip:hover { border-color: var(--color-brand-600, #1d5cf0); color: var(--color-brand-600, #1d5cf0); }

.tn2-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 32px 0 8px;
}
.tn2-pager-link,
.tn2-pager-current,
.tn2-pager-gap {
  display: inline-block;
  min-width: 34px;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  text-decoration: none;
}
.tn2-pager-link:hover { border-color: var(--color-brand-600, #1d5cf0); color: var(--color-brand-600, #1d5cf0); }
.tn2-pager-current {
  background: var(--color-brand-600, #1d5cf0);
  border-color: var(--color-brand-600, #1d5cf0);
  color: #fff;
}
.tn2-pager-gap { border: 0; background: transparent; color: #94a3b8; }

/* pages */
.tn2-topics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .tn2-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .tn2-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tn2-topic {
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
}
.tn2-topic:hover { border-color: #1d5cf0; }
.tn2-topic b { display: block; font-size: 15px; }
.tn2-topic span { display: block; font-size: 12px; color: #1d5cf0; font-weight: 600; }
.tn2-topic em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
.tn2-list {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}
.tn2-list li { margin: 0 0 6px; font-size: 14px; }
.tn2-list a { color: #1d5cf0; text-decoration: none; }
.tn2-list a:hover { text-decoration: underline; }

/* tool guides */
.tn2-guides {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}
.tn2-guides-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.tn2-guides a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1d5cf0;
  text-decoration: none;
}
.tn2-guides a:hover { border-color: #1d5cf0; }

/* tablet table fit */
@media (min-width: 768px) and (max-width: 1279px) {
  .lx-tbl { overflow-x: auto; }
  .lx-tbl table.lx-t { min-width: 0 !important; }
  .lx-tbl table.lx-t th, .lx-tbl table.lx-t td {
    padding-left: 5px;
    padding-right: 5px;
    font-size: 13px;
  }
  .lx-tbl table.lx-t td img { max-width: 28px; height: auto; }
  .lx-tbl table.lx-t td:last-child {
    padding-right: 10px;
    white-space: nowrap;
  }
  .lx-tbl .lx-btn {
    padding: 5px 9px;
    font-size: 12px;
    white-space: nowrap;
  }
}
