/* Temdam editorial visuals v5.  The visual is a reading aid, not a dashboard:
   quiet rules, a deep-green accent, and enough type to read on a phone. */
.td-visuals,
.td-visuals *,
.td-visuals *::before,
.td-visuals *::after {
  box-sizing: border-box;
}

.td-visuals {
  --td-forest: #123b30;
  --td-lime: #c9ed69;
  --td-ink: #19372e;
  --td-muted: #5b6d64;
  --td-line: #d6e1da;
  --td-soft: #f3f7f3;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 56px 0;
  padding: 34px 0 0;
  border-top: 2px solid var(--td-forest);
  color: var(--td-ink);
  font-size: 1.08rem;
  line-height: 1.55;
}

.td-visual-header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.td-visual-header h2,
.td-visual-header p,
.td-route-intro h3,
.td-route-intro p,
.td-monitor-selection p,
.td-monitor-product h3,
.td-monitor-product p {
  margin: 0;
}

.td-visual-header h2 {
  max-width: 25ch;
  color: var(--td-forest);
  font-size: clamp(1.65rem, 3.3vw, 2.35rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.td-visual-header p {
  max-width: 58ch;
  margin-top: 12px;
  color: var(--td-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.td-visual-kicker,
.td-visual-eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: #416e55;
  font-size: 0.9rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  line-height: 1.25;
}

.td-route-tabs,
.td-monitor-use-tabs {
  display: flex;
  min-width: 0;
  gap: 24px;
  margin-top: 31px;
  border-bottom: 1px solid var(--td-line);
}

.td-visuals button {
  min-width: 0;
  min-height: 48px;
  padding: 9px 0 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--td-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.35;
  text-align: left;
}

.td-visuals button:hover {
  color: var(--td-forest);
}

.td-visuals button:focus-visible {
  outline: 3px solid rgba(201, 237, 105, 0.8);
  outline-offset: 3px;
}

.td-route-tab[aria-selected="true"],
.td-monitor-use-tabs button[aria-selected="true"] {
  border-bottom-color: var(--td-lime);
  color: var(--td-forest);
}

.td-route-panels {
  margin-top: 0;
}

.td-route-panel[hidden],
.td-route-panel[aria-hidden="true"],
.td-monitor-fit[hidden] {
  display: none;
}

.td-route-panel {
  min-width: 0;
  padding: 30px 0 0;
}

.td-route-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.45fr);
  gap: 30px;
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--td-line);
}

.td-route-intro h3 {
  color: var(--td-forest);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.td-route-intro p {
  margin-top: 9px;
  color: var(--td-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.td-route-lodging {
  margin: 0 !important;
  padding-left: 17px;
  border-left: 4px solid var(--td-lime);
  color: var(--td-ink) !important;
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
}

.td-route-lodging span {
  display: block;
  margin-bottom: 3px;
  color: #416e55;
  font-size: 0.9rem;
  font-weight: 760;
}

.td-geo-map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 0.27fr);
  gap: 28px;
  align-items: center;
  min-width: 0;
  margin-top: 28px;
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--td-line);
}

.td-geo-map {
  display: block;
  width: 100%;
  max-width: 100%;
  height: clamp(210px, 24vw, 320px);
  min-width: 0;
  object-fit: contain;
  object-position: center;
  overflow: hidden;
  background: #edf5f5;
}

.td-geo-sea {
  fill: #edf5f5;
}

.td-geo-context {
  fill: #eff6ef;
  stroke: #8eab9a;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.td-geo-context--open {
  fill: none;
  stroke: #8eab9a;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.td-geo-connection {
  fill: none;
  stroke: var(--td-forest);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 6;
  opacity: 0.76;
}

.td-geo-pin {
  fill: var(--td-lime);
  stroke: var(--td-forest);
  stroke-width: 3;
}

.td-geo-pin-number {
  fill: var(--td-forest);
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.td-geo-legend {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--td-lime);
  list-style: none;
}

.td-geo-legend li:not(.td-geo-caption) {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.td-geo-legend li > span:not(.td-geo-caption) {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 2px solid var(--td-forest);
  border-radius: 50%;
  color: var(--td-forest);
  font-size: 0.9rem;
  font-weight: 800;
}

.td-geo-legend strong {
  min-width: 0;
  color: var(--td-ink);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.td-geo-caption {
  color: #416e55;
  font-size: 0.95rem;
  font-weight: 760;
  line-height: 1.4;
}

.td-route-map-wrap {
  margin-top: 29px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--td-line);
}

.td-route-flow {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.td-route-stop {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--td-forest);
  text-align: center;
}

.td-route-stop:not(:first-child)::before {
  position: absolute;
  top: 18px;
  right: 50%;
  width: 100%;
  border-top: 2px solid var(--td-lime);
  content: "";
  z-index: 0;
}

.td-route-stop-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--td-forest);
  border-radius: 50%;
  color: var(--td-forest);
  background: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.td-route-stop:last-child .td-route-stop-dot {
  border-color: var(--td-lime);
  color: var(--td-forest);
  background: var(--td-lime);
}

.td-route-stop-name {
  max-width: 12ch;
  color: var(--td-ink);
  font-size: 1rem;
  font-weight: 740;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.td-route-days {
  margin: 0;
  padding: 0;
  list-style: none;
}

.td-route-day {
  display: grid;
  grid-template-columns: 7rem minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--td-line);
}

.td-route-day-index {
  color: #416e55;
  font-size: 1rem;
  font-weight: 780;
}

.td-route-day strong {
  min-width: 0;
  color: var(--td-ink);
  font-size: 1.05rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.td-route-day > span:last-child {
  min-width: 0;
  color: var(--td-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.td-route-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 29px;
}

.td-route-choice-grid > div {
  min-width: 0;
  padding-top: 14px;
  border-top: 3px solid var(--td-forest);
}

.td-route-choice-grid h4 {
  margin: 0;
  color: var(--td-forest);
  font-size: 1rem;
  font-weight: 800;
}

.td-route-choice-grid ul {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  color: var(--td-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.td-monitor-use {
  margin-top: 30px;
}

.td-monitor-use-tabs {
  margin-top: 0;
}

.td-monitor-use-note {
  min-height: 1.7em;
  margin-top: 15px !important;
  color: var(--td-muted);
  font-size: 1.05rem;
}

.td-monitor-stage {
  margin-top: 35px;
  padding: 23px 0 0;
  border-top: 1px solid var(--td-line);
  border-bottom: 1px solid var(--td-line);
}

.td-screen-proportion {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.td-screen-proportion rect {
  fill: var(--td-soft);
  stroke: var(--td-forest);
  stroke-width: 3;
}

.td-screen-proportion rect[data-screen-active="true"] {
  fill: var(--td-lime);
  stroke-width: 5;
}

.td-screen-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 15px;
  padding-bottom: 22px;
}

.td-screen-legend-item {
  min-width: 0;
}

.td-screen-legend-item strong,
.td-screen-legend-item span {
  display: block;
}

.td-screen-legend-item strong {
  color: var(--td-forest);
  font-size: 1.05rem;
}

.td-screen-legend-item[data-screen-active="true"] {
  border-left: 4px solid var(--td-lime);
  padding-left: 12px;
}

.td-screen-legend-item span {
  margin-top: 4px;
  color: var(--td-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.td-monitor-grid {
  display: grid;
  gap: 0;
  margin-top: 28px;
  border-top: 2px solid var(--td-forest);
}

.td-monitor-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--td-line);
}

.td-monitor-card[data-td-monitor-active="true"] {
  background: linear-gradient(90deg, rgba(201, 237, 105, 0.2), transparent 70%);
}

.td-monitor-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.td-monitor-card-head h3 {
  color: var(--td-forest);
  font-size: 1.1rem;
  font-weight: 760;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.td-monitor-card-head p {
  margin-top: 4px !important;
  color: var(--td-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.td-monitor-card-head strong {
  display: block;
  grid-column: 2;
  margin-top: 3px;
  color: var(--td-forest);
  font-size: 1rem;
}

.td-monitor-number {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-bottom: 3px solid var(--td-lime);
  color: var(--td-forest);
  font-size: 0.95rem;
  font-weight: 800;
}

.td-monitor-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
}

.td-monitor-facts > div {
  min-width: 0;
}

.td-monitor-facts dt {
  color: #416e55;
  font-size: 0.9rem;
  font-weight: 740;
}

.td-monitor-facts dd {
  min-width: 0;
  margin: 3px 0 0;
  color: var(--td-ink);
  font-size: 1.05rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.td-monitor-footprint {
  min-width: 0;
  margin: 0 !important;
  color: var(--td-muted) !important;
  font-size: 1.05rem;
  line-height: 1.55;
}

.td-monitor-fit {
  grid-column: 2 / -1;
  margin-top: -5px;
}

.td-monitor-fit p {
  margin: 0;
  padding-left: 16px;
  border-left: 4px solid var(--td-lime);
  color: var(--td-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .td-visuals {
    margin: 42px 0;
    padding-top: 26px;
  }

  .td-visual-header h2 {
    font-size: 1.65rem;
  }

  .td-visual-header p {
    font-size: 1rem;
  }

  .td-route-tabs,
  .td-monitor-use-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .td-visuals button {
    min-height: 50px;
    font-size: 0.95rem;
  }

  .td-route-intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .td-geo-map-wrap {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 18px;
  }

  .td-geo-map {
    height: 200px;
    object-position: center;
  }

  .td-geo-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 0 0;
    border-top: 3px solid var(--td-lime);
    border-left: 0;
  }

  .td-geo-caption {
    grid-column: 1 / -1;
  }

  .td-route-flow {
    display: block;
    padding-left: 19px;
  }

  .td-route-stop {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 15px;
    align-items: center;
    min-height: 58px;
    text-align: left;
  }

  .td-route-stop:not(:first-child)::before {
    top: auto;
    right: auto;
    bottom: 50%;
    left: 17px;
    width: 2px;
    height: 100%;
    border-top: 0;
    border-left: 2px solid var(--td-lime);
  }

  .td-route-stop-dot {
    width: 36px;
    height: 36px;
  }

  .td-route-stop-name {
    max-width: none;
    font-size: 1rem;
  }

  .td-route-day {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 8px 15px;
  }

  .td-route-day strong,
  .td-route-day > span:last-child {
    grid-column: 2;
    font-size: 1.05rem;
  }

  .td-route-day-index {
    grid-row: 1 / span 2;
    font-size: 0.95rem;
  }

  .td-route-choice-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .td-screen-legend {
    gap: 12px;
  }

  .td-screen-legend-item strong {
    font-size: 1rem;
  }

  .td-screen-legend-item span {
    font-size: 0.9rem;
  }

  .td-monitor-card {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 23px 0;
  }

  .td-monitor-facts {
    gap: 13px 16px;
  }

  .td-monitor-fit {
    grid-column: 1;
    margin-top: 0;
  }
}

@media (max-width: 390px) {
  .td-route-tabs,
  .td-monitor-use-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .td-visuals button {
    min-height: 46px;
    padding: 8px 3px 10px;
    font-size: 1.0125rem;
    line-height: 1.25;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .td-screen-legend {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .td-monitor-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-visuals button {
    transition: none;
  }
}
