/* Editorial block at the top of a hub archive.
   Colours follow the site's existing TastyDaily palette. */

.tmf-hub {
  --tmf-green: #5EAD39;
  --tmf-dark: #243F2F;
  --tmf-grey: #858585;
  --tmf-line: #e4e7e4;
  --tmf-surface: #f6f8f5;

  margin: 0 0 34px;
  padding: 26px 28px;
  background: #fff;
  border: 1px solid var(--tmf-line);
  border-radius: 20px;
}

@media (max-width: 880px) {
  .tmf-hub { padding: 20px; }
}

.tmf-hub__eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tmf-green);
}

.tmf-hub__intro {
  margin: 0 0 22px;
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--tmf-dark);
}

/* Two columns so the distinction is visible before it is read. Collapsing to
   one column keeps the specialists first, which is the useful order. */
.tmf-hub__split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.tmf-hub__group {
  padding: 18px 20px;
  background: var(--tmf-surface);
  border: 1px solid var(--tmf-line);
  border-radius: 16px;
}

/* The group that answers the query most directly carries the accent. */
.tmf-hub__group--accent {
  border-color: var(--tmf-green);
}

.tmf-hub__group-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--tmf-dark);
}

.tmf-hub__group-note {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tmf-grey);
}

.tmf-hub__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tmf-hub__list li {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--tmf-line);
  font-size: 15px;
  line-height: 1.45;
}

.tmf-hub__list li:last-child { border-bottom: 0; }

.tmf-hub__list a {
  display: block;
  font-weight: 700;
  color: var(--tmf-dark);
  text-decoration: none;
}

.tmf-hub__list a:hover,
.tmf-hub__list a:focus-visible {
  color: var(--tmf-green);
  text-decoration: underline;
}

.tmf-hub__list span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--tmf-grey);
}

.tmf-hub__checked {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tmf-grey);
}

/* Link to a neighbouring hub. Sits between the groups and the checked line,
   because it is a route onward rather than a caveat. */
.tmf-hub__see-also {
  margin: 20px 0 0;
  font-size: 15px;
}

.tmf-hub__see-also a {
  font-weight: 700;
  color: var(--tmf-green);
  text-decoration: none;
}

.tmf-hub__see-also a:hover,
.tmf-hub__see-also a:focus-visible {
  text-decoration: underline;
}

/* ------------------------------------------------------------------
   Comparison table (correction round 17 Sep 2026).
   Desktop: one table, a heading row per group.
   Below 760px: every provider row becomes a stacked card, each cell
   labelled through data-label, so nothing scrolls sideways.
   ------------------------------------------------------------------ */

.tmf-hub__table-wrap { margin: 0 0 8px; }

.tmf-hub__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--tmf-dark);
}

.tmf-hub__table thead th {
  padding: 10px 12px;
  background: var(--tmf-dark);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  vertical-align: bottom;
}
.tmf-hub__table thead th:first-child { border-radius: 12px 0 0 0; }
.tmf-hub__table thead th:last-child  { border-radius: 0 12px 0 0; }

.tmf-hub__table td,
.tmf-hub__table tbody th {
  padding: 12px;
  border-bottom: 1px solid var(--tmf-line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.tmf-hub__section-head th {
  padding: 16px 12px 10px !important;
  background: var(--tmf-surface);
  border-bottom: 1px solid var(--tmf-line);
}
.tmf-hub__section--accent .tmf-hub__section-head th { border-left: 4px solid var(--tmf-green); }

.tmf-hub__section-title { display: block; font-size: 16px; font-weight: 700; color: var(--tmf-dark); }
.tmf-hub__section-note  { display: block; margin-top: 3px; font-size: 13.5px; color: var(--tmf-grey); font-weight: 400; }

.tmf-hub__service { min-width: 170px; }
.tmf-hub__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--tmf-dark);
  text-decoration: underline;
  text-decoration-color: var(--tmf-green);
  text-underline-offset: 3px;
}
.tmf-hub__name:hover, .tmf-hub__name:focus-visible { color: var(--tmf-green); }
.tmf-hub__type { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--tmf-green); }
.tmf-hub__line { display: block; margin-top: 4px; font-size: 13px; color: var(--tmf-grey); }

.tmf-hub__sub { display: block; margin-top: 3px; font-size: 12.5px; color: var(--tmf-grey); }
.tmf-hub__na  { color: var(--tmf-grey); font-style: italic; }

.tmf-hub__pro, .tmf-hub__con { display: block; padding-left: 16px; position: relative; }
.tmf-hub__pro::before { content: "+"; position: absolute; left: 0; font-weight: 700; color: var(--tmf-green); }
.tmf-hub__con::before { content: "\2212"; position: absolute; left: 0; font-weight: 700; color: #b0612d; }
.tmf-hub__con { margin-top: 4px; }

/* The guide link has to read as a link: a bordered button, not grey text. */
.tmf-hub__guide {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1.5px solid var(--tmf-green);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tmf-dark);
  text-decoration: none;
  white-space: nowrap;
}
.tmf-hub__guide:hover, .tmf-hub__guide:focus-visible { background: var(--tmf-green); color: #fff; }

@media (max-width: 760px) {
  .tmf-hub__table,
  .tmf-hub__table tbody,
  .tmf-hub__table tr,
  .tmf-hub__table td,
  .tmf-hub__table tbody th { display: block; width: 100%; }

  .tmf-hub__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  .tmf-hub__section-head th { margin-top: 18px; border-radius: 10px; }

  .tmf-hub__row {
    margin: 10px 0 0;
    border: 1px solid var(--tmf-line);
    border-radius: 12px;
    overflow: hidden;
  }

  .tmf-hub__table td,
  .tmf-hub__table tbody th.tmf-hub__service {
    display: grid;
    grid-template-columns: 38% 1fr;
    gap: 10px;
    padding: 9px 12px;
  }
  .tmf-hub__table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
    color: var(--tmf-grey);
  }
  .tmf-hub__table td > * { grid-column: 2; }

  /* Service cell is the card header: full width, no label. */
  .tmf-hub__table tbody th.tmf-hub__service {
    display: block;
    background: var(--tmf-surface);
  }

  /* Last cell holds pros, cons and the guide button: give it the full width. */
  .tmf-hub__table td:last-child { display: block; border-bottom: 0; }
  .tmf-hub__table td:last-child::before { display: block; margin-bottom: 4px; }
  .tmf-hub__guide { display: block; text-align: center; white-space: normal; }
}
