/* TOP Server page. Ported from Figma Make TopServerLandingPage.tsx and TopServerConnectivityArchitecture.tsx.
   Sections use Tailwind utility classes (CDN in the base layout); this file holds the section wrap, the hero button
   overrides and the connectivity architecture diagram (inline px styles in Figma, kept in px so it matches the design). */

.ts-page { background: #fff; color: #1e293b; }

/* Section content width matches the top nav: 1440px + 32px gutters */
.ts-page .ts-wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
@media (max-width: 639px) { .ts-page .ts-wrap { padding-left: 16px; padding-right: 16px; } }

/* Tailwind v4 (used by Figma) makes [hidden] win over display utilities */
.ts-page [hidden] { display: none !important; }
.ts-page h1, .ts-page h2, .ts-page h3 { font-family: inherit; }
.ts-page summary::-webkit-details-marker { display: none; }
.ts-page input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Hero primary button (Figma .ts-hero overrides) */
.ts-hero .ts-hero-actions > a:first-child { background: #fafbf5; color: #00634e; box-shadow: 0 8px 20px rgba(0,52,36,.12); }
.ts-hero .ts-hero-actions > a:first-child:hover { background: #e2eee7; }
.ts-hero .ts-hero-actions > a:first-child:focus-visible { outline: 2px solid #fafbf5; outline-offset: 4px; }

/* ---------------------------------------------------------------- Connectivity architecture (hero diagram) */
.tsh { --ink: #153e33; --muted: #48665b; --node: #fffdf7; --node-border: #cbd9cf; --dev: #008265; --dev-soft: #e1eee5;
  --srv: #00634e; --srv-soft: #d5e8df; --srv-panel: #e8eee3; --srv-border: #82ac97; --app: #32616b; --app-soft: #e0ecec;
  position: relative; min-width: 0; overflow: hidden; margin: 0; border-radius: 18px; padding: 14px; background: #f3eddf; border: 1px solid #ded7c6;
  box-shadow: 0 22px 50px -24px rgba(0,49,35,.35); font-family: inherit; line-height: 1.35; box-sizing: border-box; color: var(--ink); }
.tsh.is-wide { padding: 16px; }
.tsh *, .tsh *::before, .tsh *::after { box-sizing: border-box; }
.tsh-grid { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(0,101,78,.13) 1px, transparent 1px); background-size: 24px 24px; }
.tsh-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tsh-title { font-size: 15px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.tsh-title span { color: var(--srv); font-size: 21px; font-weight: 900; }
.tsh-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tsh-link { min-height: 32px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--srv); text-decoration: none; white-space: nowrap; }
.tsh-link:hover { text-decoration: underline; }
.tsh-link-narrow { margin-top: 4px; }
.tsh.is-wide .tsh-link-narrow { display: none; }
.tsh:not(.is-wide) .tsh-link-wide { display: none; }
.tsh-btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; background: var(--node); border: 1px solid var(--node-border); color: var(--ink); }
.tsh-btn span { display: flex; }
.tsh-focus:focus-visible { outline: 2px solid #008265; outline-offset: 3px; }
.tsh-picker { position: relative; margin: 10px 0 12px; }
.tsh-pills { display: none; flex-wrap: wrap; gap: 4px; }
.tsh.show-pills .tsh-pills { display: flex; }
.tsh.show-pills .tsh-select-wrap { display: none; }
.tsh-pill { min-height: 36px; font: inherit; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; cursor: pointer; color: var(--ink); background: var(--node); border: 1px solid var(--node-border); }
.tsh-pill[aria-checked="true"] { color: #fafbf5; background: var(--srv); border-color: var(--srv); }
.tsh-select-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink); }
.tsh-select { min-width: 0; min-height: 36px; flex: 1; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 9px; border-radius: 8px; color: var(--ink); background: var(--node); border: 1px solid var(--node-border); }
.tsh-stage { position: relative; display: flex; justify-content: space-between; align-items: stretch; min-height: 248px; }
.tsh-wires { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
@keyframes tsh-flow { to { stroke-dashoffset: -20; } }
.tsh-idle { animation: tsh-flow 1.8s linear infinite; }
@keyframes tsh-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.tsh-fade { animation: tsh-in .35s ease-out both; }
.tsh-paused .tsh-idle, .tsh-paused .tsh-fade { animation-play-state: paused; }
.tsh-col { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.tsh-colhead { font-size: 11px; line-height: 1.35; font-weight: 700; }
.tsh-examples { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.tsh-node { position: relative; z-index: 1; min-width: 0; padding: 7px 8px; border-radius: 9px; background: var(--node); border: 1.5px solid var(--node-border); transition: background-color .3s, border-color .3s, box-shadow .3s; }
.tsh-dev.is-on { background: var(--dev-soft); border-color: var(--dev); box-shadow: 0 0 14px rgba(0,130,101,.13); }
.tsh-app.is-on { background: var(--app-soft); border-color: var(--app); box-shadow: 0 0 14px rgba(50,97,107,.13); }
.tsh-dev-row { display: flex; align-items: baseline; gap: 6px; }
.tsh-dev-dot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; background: var(--dev); }
.tsh-node-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere; }
.tsh-app-if { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 999px; color: var(--srv); background: var(--srv-soft); }
.tsh-library { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; min-height: 44px; padding: 7px 8px; border-radius: 9px;
  background: var(--dev-soft); border: 1.5px solid var(--dev); color: var(--dev); text-decoration: none; }
.tsh-library span { min-width: 0; font-size: 12px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.tsh-library svg { flex-shrink: 0; }
.tsh-server { position: relative; z-index: 1; min-width: 0; align-self: center; width: auto; padding: 11px; border-radius: 14px; background: var(--srv-panel); border: 2px solid var(--srv-border);
  box-shadow: 0 8px 22px rgba(0,72,48,.09); display: flex; flex-direction: column; gap: 8px; }
.tsh.is-wide .tsh-server { width: 36%; }
.tsh-server-head { display: flex; align-items: flex-start; gap: 7px; }
.tsh-server-ico { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; background: var(--srv); display: flex; align-items: center; justify-content: center; }
.tsh-server-name { font-size: 16px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.tsh-server-sub { font-size: 11px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.tsh-layer { padding: 7px 8px; border-radius: 9px; background: var(--node); border: 1px solid var(--node-border); transition: background-color .25s, border-color .25s; }
.tsh-layer.is-on { background: var(--srv-soft); border-color: var(--srv-border); }
.tsh-layer-label { font-size: 10px; line-height: 1.35; font-weight: 800; letter-spacing: .03em; color: var(--muted); margin-bottom: 5px; }
.tsh-layer.is-on .tsh-layer-label { color: var(--srv); }
.tsh-layer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tsh-dots { display: flex; gap: 3px; }
.tsh-dots span { width: 5px; height: 5px; border-radius: 999px; background: #b6cabe; }
.tsh-dots span.is-on { background: var(--dev); }
.tsh-protocol { min-width: 0; font-size: 11px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; color: var(--ink); }
.tsh-ifaces { display: flex; gap: 3px; flex-wrap: wrap; }
.tsh-iface { font-size: 11px; font-weight: 700; padding: 3px 5px; border-radius: 999px; color: var(--ink); background: var(--node); border: 1px solid var(--node-border); }
.tsh-iface.is-on { color: #fafbf5; background: var(--srv); border-color: var(--srv); }
.tsh-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.tsh-arrow { display: flex; justify-content: center; padding: 6px 0; }
.tsh-caption { position: relative; margin-top: 12px; }
.tsh-caption-box { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 9px; background: var(--node); border: 1px solid var(--node-border); min-height: 65px; }
.tsh-badge { flex-shrink: 0; margin-top: 1px; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 999px; color: #fafbf5; background: var(--dev); }
.tsh-status { min-width: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .tsh-idle, .tsh-fade { animation: none; } }
