/* duno networks, new look (4 Dec 2026). Loaded after every other stylesheet from header.php.
   Only styles: network.php and networks.php print the same HTML as before.
   To switch back: remove the net-v2.css line in header.php. */

/* ---------- the network page: header card ---------- */
.net .net-hero { padding: 0; overflow: hidden; border-radius: var(--radius-lg, 20px); box-shadow: var(--shadow-sm); border: 0; }
.net .net-cover { height: 168px; position: relative; background: linear-gradient(135deg, var(--nc), color-mix(in srgb, var(--nc) 62%, #0b1020)) center/cover no-repeat; }
.net .net-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .22)); pointer-events: none; }
.net .net-cover:not([style])::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(60% 120% at 88% 0%, rgba(255, 255, 255, .28), transparent 60%), radial-gradient(40% 90% at 8% 100%, rgba(255, 255, 255, .14), transparent 60%); }
.net .net-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 6px 18px; padding: 0 24px 16px; margin-top: -44px; position: relative; }
.net .net-head > .net-logo { --sz: 96px; width: 96px; height: 96px; border: 4px solid var(--card); border-radius: 24px; box-shadow: 0 6px 18px rgba(15, 20, 25, .14); }
.net .net-head > img.net-logo { background-color: var(--card); }
.net .net-title { min-width: 0; padding-top: 50px; }
.net .net-title h1 { margin: 0; font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.net .net-tagline { margin: 4px 0 0; color: var(--ink-2); font-size: 1rem; }
.net .net-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 8px 0 0; font-size: .86rem; color: var(--muted); }
.net .net-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.net .net-meta .net-owner { color: inherit; }
.net .net-meta .net-owner b { color: var(--ink-2); }
.net .net-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 0; align-self: end; }
.net .net-actions .btn, .net .net-actions summary.btn, .net .net-actions .btn-share { min-height: 40px; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.net .net-actions .btn-primary { background: var(--nc); border-color: var(--nc); color: #fff; }
.net .net-actions .btn-ghost, .net .net-actions .btn-share { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.net .net-actions .btn-ghost:hover, .net .net-actions .btn-share:hover { background: var(--hover); }
/* the bell: a round icon button; its state is in the icon, the words are in the menu */
.net .net-actions .net-notify > summary.btn { width: 40px; padding: 0; justify-content: center; position: relative; }
.net .net-actions .net-notify .nn-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.net .net-actions .net-notify > summary.is-muted { color: var(--muted); }
.net .net-actions .net-notify > summary.is-muted::after { content: ""; position: absolute; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px var(--card); }
.net .net-actions summary { list-style: none; }
.net .net-actions summary::-webkit-details-marker { display: none; }

/* ---------- tabs: a quiet row with a coloured line under the open one ---------- */
.net .net-tabs { display: flex; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 0 16px; border-top: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.net .net-tabs::-webkit-scrollbar { display: none; }
.net .net-tabs .tab, .net .net-tabs .tab:hover { position: relative; flex: none; padding: 14px 12px 13px; border-radius: 0 !important; background: none; color: var(--muted); font-weight: 600; font-size: .93rem; white-space: nowrap; scroll-snap-align: start; }
.net .net-tabs .tab:hover { color: var(--ink); }
.net .net-tabs .tab.active, .net .net-tabs .tab.active:hover { background: none; color: var(--ink) !important; font-weight: 700; }
.net .net-tabs .tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--nb, var(--nc)); }
.net .net-tabs .tab.staff { color: var(--faint); }
.net .net-tabs .tab:not(.staff) + .tab.staff { margin-left: 10px; }
.net .net-tabs .tab:not(.staff) + .tab.staff::before { content: ""; position: absolute; left: -6px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.net .net-tabs .nav-badge.inline { margin-left: 4px; }

/* ---------- announcement, spaces ---------- */
.net .net-announce { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 0; border-radius: var(--radius, 16px); background: color-mix(in srgb, var(--nc) 9%, var(--card)); color: var(--ink); font-weight: 550; box-shadow: none; }
.net .net-announce > svg { color: var(--nc); flex: none; margin-top: 2px; }
.net .np-spaces { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; margin: 0; }
.net .np-spaces::-webkit-scrollbar { display: none; }
.net .np-spaces .np-space { flex: none; }

/* ---------- member list ---------- */
.net .net-member { display: flex; align-items: center; gap: 10px 12px; padding: 12px 0; }
.net .net-member > a:first-child { flex: none; align-self: flex-start; }
.net .net-member > a:first-child .avatar { width: 48px; height: 48px; }
.net .net-member .person-name { flex: 1 1 0; display: block; overflow: hidden; min-width: 0; font-size: .98rem; font-weight: 650; color: var(--ink); text-decoration: none; }
.net .net-member .nm-name { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 650; text-decoration: none; }
.net .net-member .nm-name:hover { text-decoration: underline; }
.net .net-member .person-name > span.muted { display: block; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net .net-member .person-name .nm-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; font-weight: 400; }
.net .net-member .nm-meta > span { white-space: nowrap; }
.net .net-member .net-role, .net .net-member .chip-sm { flex: none; white-space: nowrap; }
.net .net-member .post-menu { flex: none; }
.net .net-member .post-menu > summary { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.net .cv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.net .cv-head h2 { margin: 0; }
.net .cv-head .net-search { flex: 1 1 200px; max-width: 320px; margin: 0; }
.net .cv-head .net-search input { width: 100%; border-radius: 999px; background: var(--field); border-color: transparent; }

/* ---------- side cards ---------- */
.net .side-col .side-card { border-radius: var(--radius, 16px); }
.net .net-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* ---------- the directory (/networks) ---------- */
.net-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border: 0; border-radius: var(--radius-lg, 20px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--card)), var(--card) 60%); }
.net-intro h1 { margin: 0 0 6px; font-size: 1.7rem; letter-spacing: -.02em; }
.net-intro > div { flex: 1 1 320px; min-width: 0; }
.net-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.net-grid .net-card { border-radius: var(--radius, 16px); transition: transform .15s ease, box-shadow .15s ease; }
.net-grid .net-card:hover { transform: translateY(-2px); }
.net-grid .net-card-cover { height: 68px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .net .net-hero { border-radius: 0; box-shadow: none; margin-bottom: 8px; }
  .net .net-cover { height: 104px; }
  .net .net-head { grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; padding: 0 var(--gut, 16px) 12px; margin-top: -30px; align-items: end; }
  .net .net-head > .net-logo { --sz: 68px; width: 68px; height: 68px; border-width: 3px; border-radius: 18px; }
  .net .net-head > .net-logo.net-logo-txt { font-size: 30px; }
  .net .net-title { display: contents; }
  .net .net-title h1 { grid-column: 2; align-self: end; font-size: 1.3rem; padding: 34px 0 2px; }
  .net .net-tagline { grid-column: 1 / -1; margin-top: 10px; font-size: .96rem; }
  .net .net-meta { grid-column: 1 / -1; margin-top: 6px; font-size: .83rem; }
  .net .net-meta { gap: 3px 12px; }
  /* one row of actions you can slide sideways: nothing wraps into a second or third line */
  .net .net-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px calc(var(--gut, 16px) * -1) 0; padding: 0 var(--gut, 16px); }
  .net .net-actions::-webkit-scrollbar { display: none; }
  .net .net-actions > * { flex: none; }
  .net .net-actions .btn-primary { order: -1; }
  .net .net-actions .net-copy span { display: none; }
  .net .net-actions .net-copy { width: 40px; padding: 0; justify-content: center; }
  .net .net-tabs { padding: 0 6px; }
  .net .net-tabs .tab, .net .net-tabs .tab:hover { padding: 13px 10px 12px; }
  .net .net-announce { margin: 0 0 8px; border-radius: 0; padding: 11px var(--gut, 16px); }
  .net .np-spaces { padding: 4px var(--gut, 16px) 10px; margin: 0; box-sizing: border-box; width: 100%; max-width: 100%; }
  .net > .layout > .main-col > *, .net > .layout > .side-col > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  /* what matters comes first: the Join card and the next event sit above the feed, the rest follows it */
  .net > .layout { display: flex; flex-direction: column; }
  .net > .layout > .main-col, .net > .layout > .side-col { display: contents; }
  .net > .layout > .side-col > .net-join-card { order: -3; }
  .net > .layout > .main-col > * { order: 0; }
  .net > .layout > .side-col > * { order: 2; margin-left: 0; margin-right: 0; width: 100%; }
  .net .net-member > a:first-child .avatar { width: 44px; height: 44px; }
  .net .net-member .nm-open, .net .net-member .chip-sm:not(.net-role) { display: none; }
  .net .cv-head .net-search { max-width: none; flex-basis: 100%; }

  .net-intro { margin: 0 0 8px !important; border-radius: 0; padding: 18px var(--gut, 16px); }
  .net-intro h1 { font-size: 1.4rem; }
  .net-intro .btn-big { width: 100%; justify-content: center; }
  /* directory on phones: one tidy row per network instead of a tall card */
  .net-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 8px !important; background: var(--card); }
  .net-grid .net-card, .sl .net-grid .card.net-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 1px; align-items: center;
    padding: 12px var(--gut, 16px); margin: 0; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; box-shadow: none; }
  .net-grid .net-card:hover { transform: none; box-shadow: none; }
  .net-grid .net-card:active { background: var(--hover); }
  .net-grid .net-card-cover { display: none; }
  .net-grid .net-card-top { grid-column: 1; grid-row: 1 / span 3; margin: 0; align-self: center; }
  .net-grid .net-card .net-logo, .net-grid .net-card .net-logo-txt { --sz: 52px; width: 52px; height: 52px; border: 0; box-shadow: none; border-radius: 14px; font-size: 22px; }
  .net-grid .net-card b { grid-column: 2; margin: 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .net-grid .net-card-tag { grid-column: 2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .86rem; }
  .net-grid .net-card-meta { grid-column: 2; margin: 0; font-size: .78rem; }
  .net-grid .net-card .chip-sm { grid-column: 3; grid-row: 1 / span 3; margin: 0; align-self: center; }
  .net-grid .net-card .net-lang-card { display: none; }
}
