/* ============================================
   Zygaena — zygaena.org
   Ported from the brand/website handoff. The markup is inline-styled with the
   teal-on-ink palette; this sheet carries the reset, base type, container,
   divider, and the nav/button hover states (converted from the design tool's
   style-hover attributes to real CSS).
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #060D10;
    color: #E2EEEB;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: #3FE0BC; text-decoration: none; }
a:hover { color: #7CFFE3; }

::selection { background: rgba(63, 224, 188, .25); }
:focus-visible { outline: 2px solid #3FE0BC; outline-offset: 2px; }

/* Page container */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px 120px; }

/* Fading hairline divider under the header */
.rule {
    height: 1px;
    background: linear-gradient(90deg, rgba(30,58,64,0) 0, #1E3A40 48px, #1E3A40 calc(100% - 48px), rgba(30,58,64,0) 100%);
}

/* Wordmark (Nunito 600) */
.logo { font-family: Nunito, sans-serif; line-height: 1; white-space: nowrap; text-decoration: none; }
.logo .logo-mark { display: inline-block; vertical-align: baseline; }
.logo .logo-word { font-weight: 600; letter-spacing: .005em; }

/* Nav links */
.nav-link { color: #9DB8B5; transition: color .15s; }
.nav-link:hover { color: #E2EEEB; }
.nav-link.active { color: #3FE0BC; }
.nav-link.active:hover { color: #7CFFE3; }

/* Buttons — 1px outlines on transparent, never filled */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 13px 26px;
    border-radius: 8px;
    font-size: 16px;
    border: 1px solid transparent;
    transition: color .15s, border-color .15s, background .15s;
}
.btn-primary { border-color: #3FE0BC; color: #3FE0BC; }
.btn-primary:hover { background: rgba(63,224,188,.12); border-color: #7CFFE3; color: #7CFFE3; }
.btn-ghost { border-color: #1E3A40; color: #9DB8B5; }
.btn-ghost:hover { border-color: #3FE0BC; color: #E2EEEB; }

/* Footer column links stay muted (overriding the global teal link color) */
.site-footer a { color: #9DB8B5; }
.site-footer a:hover { color: #E2EEEB; }
.site-footer .upstream a { color: #3FE0BC; }
.site-footer .upstream a:hover { color: #7CFFE3; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
    .wrap { padding: 0 22px 90px; }
    .h-hero { font-size: 52px !important; }
    .h-sub { font-size: 44px !important; }
    .h2-section { font-size: 34px !important; }
}
@media (max-width: 520px) {
    .h-hero { font-size: 40px !important; }
    .h-sub { font-size: 34px !important; }
    .h2-section { font-size: 28px !important; }
    .site-header nav { gap: 16px !important; }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ports-page { padding: 52px 0 0; display: flex; flex-direction: column; gap: 14px; }
.ports-kicker {
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #3FE0BC;
}
.ports-title {
    margin: 0;
    font-size: 60px;
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: -.03em;
    color: #E2EEEB;
    text-wrap: balance;
}
.ports-lead {
    margin: 0;
    font-size: 21px;
    line-height: 1.55;
    color: #9DB8B5;
    max-width: 720px;
    text-wrap: pretty;
}
.ports-count, .ports-snapshot, .ports-status {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    color: #7C9B99;
}
.ports-snapshot { color: #3D6B67; }
.ports-noscript, .ports-banner {
    margin: 0;
    font-size: 15px;
    color: #E8A33D;
}
.ports-banner-error { color: #E8A33D; }
.ports-tools {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 10px;
}
.ports-filter-label { flex: none; }
.ports-q-label { flex: 1; min-width: 0; }
.ports-filter, .ports-q {
    width: 100%;
    background: #081115;
    border: 1px solid #1E3A40;
    color: #E2EEEB;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-size: 15px;
}
.ports-filter:focus, .ports-q:focus { border-color: #3FE0BC; }
.ports-filter:disabled, .ports-q:disabled { color: #7C9B99; }
.ports-split {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 1px;
    background: #1E3A40;
    border: 1px solid #1E3A40;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 8px;
}
.ports-list, .ports-detail { background: #060D10; min-width: 0; }
.ports-list { padding: 0 0 16px; }
.ports-status { padding: 12px 16px 0; }
.ports-banner { padding: 12px 16px; }
.ports-table { width: 100%; border-collapse: collapse; }
.ports-table th {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #3D6B67;
    font-weight: 400;
    text-align: left;
    padding: 10px 16px;
    border-bottom: 1px solid #1E3A40;
}
.ports-table td {
    padding: 8px 16px;
    border-bottom: 1px solid rgba(30, 58, 64, .55);
    color: #7C9B99;
    font-size: 14.5px;
    vertical-align: top;
}
.ports-table td.name, .ports-table td.ver {
    font-family: "IBM Plex Mono", monospace;
    white-space: nowrap;
}
.ports-table td.name { color: #E2EEEB; font-size: 14px; }
.ports-table td.ver { color: #7CFFE3; font-size: 13px; }
.ports-table td.desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0; /* allow ellipsis inside a table */
    width: 100%;
}
.ports-table tbody tr { cursor: pointer; }
.ports-table tbody tr:hover td { background: rgba(63, 224, 188, .04); }
.ports-table tbody tr.is-selected td {
    background: rgba(63, 224, 188, .07);
}
.ports-table tbody tr.is-selected td:first-child {
    box-shadow: inset 2px 0 0 #3FE0BC;
}
.ports-detail { padding: 20px 22px 28px; }
.ports-detail-empty { margin: 0; color: #7C9B99; }
.ports-detail-kicker {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #3D6B67;
}
.ports-detail h2 {
    margin: 6px 0 0;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -.02em;
}
.ports-detail-ver {
    font-family: "IBM Plex Mono", monospace;
    color: #7CFFE3;
    font-size: 15px;
}
.ports-detail-desc { color: #9DB8B5; margin: 12px 0 16px; font-size: 15.5px; line-height: 1.6; }
.ports-dl {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 8px 12px;
    margin: 0;
    font-size: 14.5px;
    color: #9DB8B5;
}
.ports-dl dt {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #3D6B67;
    margin: 0;
    padding-top: 3px;
}
.ports-dl dd { margin: 0; }
.ports-cmd {
    margin-top: 18px;
    background: #081115;
    border: 1px solid #1E3A40;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
    color: #7CFFE3;
}
.ports-dep[data-port] {
    background: none;
    border: 0;
    padding: 0;
    color: #3FE0BC;
    font: inherit;
    cursor: pointer;
}
.ports-dep[data-port]:hover { color: #7CFFE3; }

@media (max-width: 820px) {
    .ports-title { font-size: 44px; }
    .ports-tools { flex-direction: column; }
    .ports-split { grid-template-columns: 1fr; }
    .ports-table th:nth-child(3),
    .ports-table td.desc { display: none; }
    .ports-list { max-height: min(50vh, 28rem); overflow: auto; }
}
@media (max-width: 520px) {
    .ports-title { font-size: 34px; }
}
