/* Water technology showcase: problem-first catalogue of proven methods.
   Uses the site-refine tokens (--r-*) only. */
.ts-page { --ts-gap: clamp(16px, 2vw, 24px); }
.ts-shell { width: var(--r-shell); margin: 0 auto; }

.ts-intro { padding: var(--r-section) 0 calc(var(--r-section) * .55); background: var(--r-white); }
.ts-intro__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.ts-intro h2 { font-family: var(--r-display); font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; color: var(--r-ink); margin: 0 0 14px; }
.ts-intro p { color: var(--r-text); line-height: 1.75; margin: 0; max-width: 68ch; }

.ts-scale-key { margin: 0; display: grid; gap: 10px; border-top: 1px solid var(--r-line); padding-top: 14px; }
.ts-scale-key div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; }
.ts-scale-key dt, .ts-scale-key dd { margin: 0; }
.ts-scale-key dd { color: var(--r-muted); font-size: .92rem; }

.ts-trl { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--r-line); color: var(--r-ink-2); background: var(--r-mist); }
.ts-trl--9 { background: var(--r-ink); border-color: var(--r-ink); color: var(--r-white); }
.ts-trl--8 { background: var(--r-blue); border-color: var(--r-blue); color: var(--r-white); }
.ts-trl--7 { background: var(--r-white); border-color: var(--r-blue); color: var(--r-blue); }
.ts-trl--6 { background: var(--r-paper); border-color: var(--r-line); color: var(--r-muted); }

.ts-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 3vw, 40px); }
.ts-index a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--r-line); color: var(--r-ink); text-decoration: none; font-size: .9rem; font-weight: 500; background: var(--r-white); transition: border-color .2s var(--r-ease), background .2s var(--r-ease); }
.ts-index a span { font-size: .75rem; color: var(--r-muted); font-variant-numeric: tabular-nums; }
.ts-index a:hover, .ts-index a:focus-visible { border-color: var(--r-blue); background: var(--r-mist); }

.ts-group { padding: calc(var(--r-section) * .7) 0; scroll-margin-top: 90px; }
.ts-group:nth-of-type(odd) { background: var(--r-paper); }
.ts-group__head { max-width: 760px; margin-bottom: clamp(22px, 2.4vw, 32px); }
.ts-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .12em; color: var(--r-blue); margin: 0 0 8px; }
.ts-group__head h2 { font-family: var(--r-display); font-size: clamp(1.45rem, 2.3vw, 2rem); line-height: 1.15; letter-spacing: -.02em; color: var(--r-ink); margin: 0 0 10px; }
.ts-group__head p { color: var(--r-text); line-height: 1.7; margin: 0 0 12px; }
.ts-guide, .ts-card__more { color: var(--r-blue); font-weight: 600; font-size: .92rem; text-decoration: none; }
.ts-guide:hover, .ts-card__more:hover { text-decoration: underline; text-underline-offset: 3px; }

.ts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--ts-gap); }
.ts-card { background: var(--r-white); border: 1px solid var(--r-line-soft); border-radius: var(--r-radius); box-shadow: var(--r-shadow); padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 100px; transition: box-shadow .25s var(--r-ease); }
.ts-card:hover { box-shadow: var(--r-shadow-hover); }
.ts-card:target { outline: 2px solid var(--r-blue); outline-offset: 2px; }
.ts-card__top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.ts-scale { font-size: .78rem; color: var(--r-muted); }
.ts-card h3 { font-family: var(--r-display); font-size: 1.12rem; line-height: 1.3; color: var(--r-ink); margin: 0; text-wrap: balance; }
.ts-card dl { margin: 0; display: grid; gap: 10px; }
.ts-card dt { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--r-muted); margin-bottom: 2px; }
.ts-card dd { margin: 0; font-size: .94rem; line-height: 1.6; color: var(--r-text); }
.ts-card__more { margin-top: auto; padding-top: 4px; }

@media (max-width: 860px) {
  .ts-intro__grid { grid-template-columns: 1fr; }
  .ts-index { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .ts-index a { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .ts-card, .ts-index a { transition: none; } }

/* Segment cards on the technologies hub */
.ts-seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--ts-gap, 20px); margin-top: clamp(28px, 3vw, 40px); }
.ts-seg { display: flex; flex-direction: column; background: var(--r-white); border: 1px solid var(--r-line-soft); border-radius: var(--r-radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--r-shadow); transition: box-shadow .25s var(--r-ease); }
.ts-seg:hover, .ts-seg:focus-visible { box-shadow: var(--r-shadow-hover); }
.ts-seg img { width: 100%; height: 170px; object-fit: cover; }
.ts-seg__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.ts-seg__body small { font-size: .74rem; font-weight: 600; letter-spacing: .08em; color: var(--r-blue); text-transform: uppercase; }
.ts-seg__body strong { font-family: var(--r-display); font-size: 1.2rem; line-height: 1.25; color: var(--r-ink); }
.ts-seg__body > span { color: var(--r-text); font-size: .94rem; line-height: 1.6; }
.ts-seg__body em { font-style: normal; font-size: .82rem; color: var(--r-muted); }

/* Technology lists per segment on the hub */
.ts-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 22px 36px; }
.ts-list { scroll-margin-top: 100px; }
.ts-list h3 { font-family: var(--r-display); font-size: 1.02rem; color: var(--r-ink); margin: 0 0 6px; }
.ts-list ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--r-line); }
.ts-list li a { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--r-line); color: var(--r-ink); text-decoration: none; font-size: .95rem; }
.ts-list li a:hover span:first-child { color: var(--r-blue); text-decoration: underline; text-underline-offset: 3px; }
.ts-list li a .ts-trl { flex: 0 0 auto; }

/* Existing system cards on segment pages */
.ts-sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--ts-gap, 20px); }
.ts-sys { display: flex; flex-direction: column; background: var(--r-white); border: 1px solid var(--r-line-soft); border-radius: var(--r-radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--r-shadow); }
.ts-sys:hover { box-shadow: var(--r-shadow-hover); }
.ts-sys img { width: 100%; height: 150px; object-fit: cover; }
.ts-sys__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.ts-sys__body small { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--r-blue); }
.ts-sys__body strong { font-family: var(--r-display); font-size: 1.08rem; color: var(--r-ink); }
.ts-sys__body > span { font-size: .92rem; line-height: 1.55; color: var(--r-text); }

/* Cards and tables on segment and technology pages */
.ts-card h3 a { color: inherit; text-decoration: none; }
.ts-card h3 a:hover { color: var(--r-blue); text-decoration: underline; text-underline-offset: 3px; }
.ts-glance th { width: 34%; }
@media (max-width: 860px) { .ts-glance th { width: 42%; } }
