/* The member profile pages (network/<slug>.html) and the member not-found page (network/not-found.html), fix stage 2.
   A's world: sea-salt grounds, ink type, the brand green for words and marks, the network's own quay plate as the
   branded default cover. Semantic and component tokens only. The blurred "Members only" lines (.locked-list,
   .locked, .blur-bar, .mo-tag) and the join pop-up (.join-sheet) are styled in site.css and not restyled here. */

/* ---------- the top: breadcrumb, cover, identity ---------- */
.p-top { padding-top: 24px; }
.p-crumbs ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: var(--fs-s); color: var(--c-text-muted); }
.p-crumbs li { display: flex; align-items: center; min-width: 0; }
/* repair 1: the "/" travels with the crumb BEFORE it, so a trail that wraps never starts a line with it (it did at 320
   once m20 made the third crumb "Members directory") */
.p-crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 8px; opacity: .7; }
.p-crumbs a { display: inline-flex; align-items: center; min-height: 36px; color: var(--c-text); text-underline-offset: 3px; }
/* the last crumb is the name, printed in full in the H1 just below. Repair 1: it keeps its own width, so where the
   trail has no room left for it (a phone) it takes a line of its own and shows whole; only a name longer than the
   whole line is cut, with an ellipsis (900108). It used to shrink to the space left: "Torva…" in 48 px at 390. */
.p-crumbs li:last-child { flex: 0 1 auto; min-width: min(100%, 14ch); }
/* repair 2 (closure r1, new 3): no 48ch cap. It cut Vaurélienne's name at 1440 with about 500 px of the line still
   free; the ellipsis now comes only where the name is longer than the whole line */
.p-crumbs li:last-child span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-cover { position: relative; height: clamp(184px, 19vw, 288px); border-radius: var(--p-radius-3); overflow: hidden; isolation: isolate; background: var(--c-bg-alt); }
/* the branded default cover (gap pass N4: member-cover, container ends in ink and green, profiles only). A felt
   counter-drift: the layer is 125% of the cover's height, its extra quarter above the cover, and it sinks 20% of its own
   height (25% of the cover's) as the cover is scrolled away (data-scene="member-cover", exit mode, 0.8 screen), so the
   picture moves at about three quarters of the page's speed; transform only; reduced motion: at rest. The M1 idle drift
   (data-idle, the individual translate/scale properties) composes with it and never shows an edge. */
.p-cover-move { position: absolute; inset: -25% 0 0; transform: translate3d(0, calc(var(--p, 0) * 20%), 0); }
.p-cover-move .pair, .p-cover-move .pair > picture.light { height: 100%; }
/* final polish m19: the member's own view of the wall (member.js coverView: --cv-s scale, --cv-f mirror, --cv-x shift
   inside the margin the scale adds, object-position y for the tier); static, under the scroll and idle moves. A phone
   takes half the scale and shift (--cv-k), so its 780 w source is not blown up. */
.p-cover-view { --cv-sk: calc(1 + (var(--cv-s, 1) - 1) * var(--cv-k, 1)); position: absolute; inset: 0;
  transform: translateX(calc(var(--cv-x, 0%) * var(--cv-k, 1))) scale(calc(var(--cv-sk) * var(--cv-f, 1)), var(--cv-sk)); }
@media (max-width: 767px) { .p-cover-view { --cv-k: .5; } }
.is-moving .p-cover-move { will-change: transform; }
.p-cover::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, color-mix(in srgb, var(--p-ink-900) 30%, transparent), transparent 60%); }

.p-id { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 28px; align-items: start; padding-inline: 32px; }
/* the logo tile: always a light tile (members' logos are drawn for a light ground), in both themes; at dusk a softer
   one (final polish m15, below: the white plate was the brightest object on every dark card) */
.p-logo { margin-top: -64px; height: 136px; min-width: 136px; max-width: 300px; padding: 18px; border-radius: var(--p-radius-3); background: var(--logo-plate); box-shadow: var(--shadow-soft), 0 0 0 1px var(--c-line); display: grid; place-items: center; }
.p-logo img { height: 100px; width: auto; max-width: 264px; object-fit: contain; border-radius: 10px; }
.p-initials { background: var(--c-accent-wash); }
.p-initials span { font: var(--fw-display) 44px/1 var(--f-display); letter-spacing: .02em; color: var(--c-accent-text); }
.p-name { min-width: 0; padding-top: 22px; }
.p-name h1 { font-size: clamp(32px, 3vw, 46px); line-height: 1.08; max-width: 26ch; text-wrap: balance; overflow-wrap: break-word; }
.p-where { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: var(--fs-m); color: var(--c-text-muted); }
.p-where svg { width: 18px; height: 18px; flex: none; color: var(--c-accent-text); }
.p-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.p-pro { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--c-text); color: var(--c-bg); font: 700 12px/1 var(--f-text); letter-spacing: .08em; }
.p-trust { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px; border: 1px solid var(--c-line-strong); border-radius: var(--p-radius-pill); font: var(--fw-ui) var(--fs-xs)/1 var(--f-text); color: var(--c-text); }
.pips { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.pips i { width: 4px; border-radius: 1px; background: var(--c-line-strong); }
.pips i:nth-child(1) { height: 6px; } .pips i:nth-child(2) { height: 9px; } .pips i:nth-child(3) { height: 12px; }
.pips i.on { background: var(--c-accent-text); }
.p-act { padding-top: 26px; }
.p-sample { margin: 22px 0 0; padding-inline: 32px; max-width: none; }

/* words rise at parse (the first-screen rule: text never waits for the picture): 500 ms, 50 ms apart */
.rise { animation: af-rise .5s var(--p-ease-out) both; animation-delay: calc(var(--li, 0) * 50ms); }

/* ---------- the body: the member's words on the left, facts and the blurred lines on the right ---------- */
.p-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gutter); align-items: start; padding-top: 40px; padding-bottom: var(--p-space-13); }
.p-main, .p-side { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.p-card { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: var(--p-radius-3); padding: 28px 32px 30px; }
.p-card h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: var(--fs-xl); line-height: var(--lh-snug); letter-spacing: var(--tr-h3); margin-bottom: 16px; }
.p-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--c-line-strong); border-radius: var(--p-radius-pill); font: var(--fw-ui) var(--fs-xs)/1 var(--f-text); letter-spacing: 0; color: var(--c-text-muted); }
.p-prose { max-width: 62ch; color: var(--c-text); }
.p-prose p + p, .p-prose ul, .p-prose ol { margin-top: .9em; }
.p-prose a { color: var(--c-accent-text); text-underline-offset: 3px; }
.p-svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); }
.p-svc li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--c-line); font-weight: var(--fw-ui); }
.p-svc svg { width: 20px; height: 20px; flex: none; color: var(--c-accent-text); }
.p-cert { list-style: none; margin: 0; padding: 0; }
.p-cert li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--c-line); }
.p-cert svg { width: 20px; height: 20px; color: var(--c-text-muted); }
.c-name { font-weight: var(--fw-ui); }
.c-open { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-s); font-weight: var(--fw-ui); color: var(--c-accent-text); text-underline-offset: 3px; }
.p-facts dl { margin: 0; }
.p-facts dl > div { display: grid; grid-template-columns: minmax(9em, 2fr) minmax(0, 3fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--c-line); }
.p-facts dt { font-size: var(--fs-s); color: var(--c-text-muted); padding-top: 2px; }
.p-facts dd { margin: 0; font-weight: var(--fw-ui); overflow-wrap: anywhere; }
.p-facts dd .pips { vertical-align: -1px; margin-inline-end: 4px; }
.p-flag { display: inline-block; margin-inline-start: 6px; padding: 1px 7px; border: 1px dashed var(--c-line-strong); border-radius: var(--p-radius-pill); font: var(--fw-text) var(--fs-xs)/1.5 var(--f-text); color: var(--c-text-muted); white-space: nowrap; }
/* final polish m11: the website link is a 44 px target (it was 19 px tall on a phone) without moving its row: the
   padding grows the box, the equal negative margin gives the space back */
.p-site { display: inline-block; padding-block: 12px; margin-block: -12px; color: var(--c-accent-text); text-underline-offset: 3px; }
.p-hint { margin-top: 14px; font-size: var(--fs-xs); color: var(--c-text-muted); }
.p-team .locked-list { gap: 6px; }
/* final polish m18: when the two columns end closest without them, the Team block (or Contact and Team) is a band
   across both columns, under them (member.js lockedPlace), its rows side by side */
.p-band { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--gutter); padding-top: var(--gutter); }
.p-card.is-band .locked-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px var(--gutter); }

/* ---------- a thin profile (no About, no services; noindex): a quieter page ---------- */
.is-thin .p-cover { height: clamp(128px, 11vw, 168px); }
.is-thin .p-cover::after { background: color-mix(in srgb, var(--c-bg) 28%, transparent); }
.p-empty { background: transparent; border-style: dashed; }
.p-empty h2 { font-size: var(--fs-b); font-family: var(--f-text); font-weight: var(--fw-ui); letter-spacing: 0; margin-bottom: 6px; }
.p-empty p { color: var(--c-text-muted); font-size: var(--fs-m); }

/* ---------- the member not-found page ---------- */
.nf { padding: 40px 0 var(--p-space-14); }
.nf-wrap > .p-crumbs ol { margin-bottom: 56px; }
.nf-code { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--p-radius-pill); background: var(--c-accent-wash); color: var(--c-accent-text); font: var(--fw-ui) var(--fs-s)/1 var(--f-text); margin-bottom: 22px; }
.nf h1 { font-size: var(--fs-h1); max-width: 15ch; text-wrap: balance; }
.nf-sub { margin-top: 22px; max-width: 50ch; font-size: var(--fs-l); line-height: 1.5; color: var(--c-text-muted); }
.nf-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.nf-note { margin-top: 28px; }
/* gap pass N6: the right half holds the day's three PRO members (directory cards, one column) */
.nf-pro h2 { font-size: var(--fs-xl); line-height: var(--lh-snug); letter-spacing: var(--tr-h3); margin-bottom: 16px; }
.nf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nf-list .d-card { padding: 18px 20px; }
.nf-pro .sample-note { margin-top: 14px; }
@media (min-width: 1001px) {
  .nf-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: calc(var(--gutter) * 2); align-items: start; }
  .nf-wrap > .p-crumbs { grid-column: 1 / -1; }
  .nf-pro { padding-top: 6px; }
}
@media (max-width: 1000px) { .nf-pro { margin-top: 56px; } }

/* ---------- the members directory (network/directory.html, final stage) ---------- */
.dir { padding: 24px 0 var(--p-space-13); }
.dir-head { margin: 28px 0 40px; display: grid; gap: 18px; }
.dir h1 { font-size: var(--fs-h1); max-width: 16ch; text-wrap: balance; }
.dir-sub { max-width: 56ch; font-size: var(--fs-l); line-height: 1.5; color: var(--c-text-muted); }
.dir-count { margin: 0; }
.dir-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.d-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px; background: var(--card-bg); border: 1px solid var(--card-line); border-radius: var(--p-radius-3); transition: border-color .2s var(--p-ease-ui), transform .2s var(--p-ease-ui); }
/* final polish F1: the shared tile (site.css .logo-tile) in one fixed slot, 88 x 56 (72 x 48 on a phone), the logo
   contained in it at its own proportions (a square mark 44 px, a 2.5:1 wordmark 76 x 30): every card's text starts at
   one x (the gap pass let wordmarks widen the tile to 2:1, which moved each card's text to its own x). The network
   page's teaser uses the same slot (network.css). */
.logo-tile.logo-slot { width: 88px; min-width: 88px; max-width: none; }
.logo-tile.logo-slot img { width: auto; height: auto; max-width: 76px; max-height: 44px; }
/* final polish m15: at dusk every member logo stands on a softer plate (the logo itself stays full colour and
   unaltered); --logo-plate feeds the shared tile and the profile's own plate */
:root[data-theme="dark"] .member-page { --logo-plate: var(--p-mist-300); }
/* gap pass N3: search and filters over the listed members (assets/pages/directory.js). Final polish F2: in the page at
   its final size from the first paint; without script (no :root.js, set by the head's inline script) it is hidden by
   this rule, so the list never moves */
:root:not(.js) .dir-find, :root:not(.js) .dir-result { display: none; }
.dir-find { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px var(--gutter); align-items: end; margin: 0 0 18px; }
.df-field { display: grid; gap: 6px; min-width: 0; }
.df-field label { font-size: var(--fs-s); font-weight: var(--fw-ui); color: var(--c-text); }
/* the same field as the schedules search (schedules.css .field): one form style on the site */
.df-field input, .df-field select { box-sizing: border-box; width: 100%; height: var(--btn-h); padding: 0 14px; border: 1.5px solid var(--field-line); border-radius: var(--p-radius-2); background: var(--field-bg); color: var(--c-text); font: var(--fw-ui) var(--fs-b)/1 var(--f-text); }
.df-field select { appearance: none; padding-inline-end: 38px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.df-field input::placeholder { color: var(--c-text-muted); opacity: 1; }
.df-field input:focus-visible, .df-field select:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-color: var(--c-focus); }
.dir-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 44px; margin: 0 0 18px; }
.dir-result p { font-size: var(--fs-s); color: var(--c-text-muted); font-variant-numeric: tabular-nums; }
.dir-clear { min-height: 44px; padding: 0 16px; font-size: var(--fs-s); }
.dir-empty { padding: 28px 24px; border: 1px dashed var(--c-line-strong); border-radius: var(--p-radius-3); color: var(--c-text-muted); }
.d-name { font-size: var(--fs-l); line-height: 1.2; letter-spacing: var(--tr-h3); overflow-wrap: break-word; }
.d-name a { color: var(--c-text); text-decoration: none; }
/* final polish F1: a name two members share carries its city on a line of its own (site.css .twin-city), so the two
   cards look alike ("Penvarra Shipping · Durban" fitted on one line, "· Melbourne" broke onto two) */
.d-name .twin-city { display: block; }
/* the whole card is the link's target area; the name is the link a screen reader hears */
.d-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.d-name a:focus-visible { outline: none; }
.d-card:has(a:focus-visible) { outline: 2px solid var(--c-focus); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .d-card:hover { border-color: var(--c-accent-fill); transform: translateY(-1px); } .d-card:hover .d-name a { text-decoration: underline; text-underline-offset: 4px; } }
.d-where { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-s); color: var(--c-text-muted); }
.d-where svg { width: 16px; height: 16px; flex: none; color: var(--c-accent-text); }
.d-card .p-marks { margin-top: 12px; }
.d-svc { margin-top: 12px; font-size: var(--fs-s); line-height: 1.5; color: var(--c-text); }
.d-thin { color: var(--c-text-muted); font-style: italic; }
.dir-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--c-line); }
.dir-join p { max-width: 56ch; font-size: var(--fs-m); color: var(--c-text-muted); }
.dir-join b { color: var(--c-text); font-weight: var(--fw-ui); }
@media (max-width: 1100px) { .dir-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .d-card { transition: none; } }

/* ---------- tablet and phone ---------- */
@media (max-width: 1000px) {
  .p-body { display: flex; flex-direction: column; align-items: stretch; gap: var(--gutter); }
  /* one column: the facts first, then the member's words, then the blurred lines; a thin profile's "still being filled
     in" note comes before the facts (final polish m17), as it heads the page on a desktop. The Team band (m18) joins
     the one column like the others. */
  .p-main, .p-side, .p-band { display: contents; }
  .p-empty { order: 0; } .p-facts { order: 1; } .p-about { order: 2; } .p-services { order: 3; } .p-certs { order: 4; } .p-contact { order: 5; } .p-team { order: 6; }
  .p-id { grid-template-columns: auto minmax(0, 1fr); padding-inline: 24px; }
  .p-act { grid-column: 1 / -1; padding-top: 22px; }
  .p-sample { padding-inline: 24px; }
}
@media (max-width: 767px) {
  .p-top { padding-top: 10px; }
  .p-crumbs ol { margin-bottom: 8px; }
  .p-crumbs a { min-height: 44px; }
  .p-crumbs li:last-child span { max-width: 100%; }
  .p-cover { height: 156px; margin-inline: calc(-1 * var(--margin)); border-radius: 0; }
  .is-thin .p-cover { height: 112px; }
  .p-id { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  .p-logo { justify-self: start; margin-top: -48px; height: 96px; min-width: 96px; max-width: 220px; padding: 12px; border-radius: var(--p-radius-2); }
  .p-logo img { height: 72px; max-width: 196px; }
  .p-initials span { font-size: 32px; }
  .p-name { padding-top: 16px; }
  .p-name h1 { font-size: 30px; line-height: 1.12; max-width: none; }
  .p-act { padding-top: 20px; }
  .p-act .btn { width: 100%; justify-content: space-between; }
  .p-sample { padding-inline: 0; margin-top: 16px; }
  .p-body { padding-top: 24px; gap: 16px; }
  .p-card { padding: 22px 18px 24px; border-radius: var(--p-radius-2); }
  .p-svc { grid-template-columns: minmax(0, 1fr); }
  .p-facts dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; }
  .nf { padding: 16px 0 var(--p-space-12); }
  .nf-wrap > .p-crumbs ol { margin-bottom: 32px; }
  .nf h1 { font-size: 38px; }
  .nf-act { flex-direction: column; align-items: stretch; }
  .nf-act .btn { justify-content: space-between; }
  .nf-act .btn-quiet { justify-content: center; }
  .dir { padding: 10px 0 var(--p-space-12); }
  .dir-head { margin: 16px 0 28px; gap: 14px; }
  .dir h1 { font-size: 38px; }
  .dir-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .d-card { padding: 18px; gap: 14px; border-radius: var(--p-radius-2); }
  .logo-tile.logo-slot { width: 72px; min-width: 72px; }
  .logo-tile.logo-slot img { max-width: 62px; max-height: 38px; }
  .dir-find { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
  .df-q { grid-column: 1 / -1; }
  .dir-join .btn { width: 100%; justify-content: space-between; }
}
/* gap pass N5: on the narrowest phones "Open the file" goes under the certificate's name, which keeps its line (final
   polish: still a 44 px target there) */
@media (max-width: 360px) {
  .p-cert li { grid-template-columns: auto minmax(0, 1fr); row-gap: 0; padding-top: 8px; }
  .p-cert .c-open { grid-column: 2; }
  .dir-find { grid-template-columns: minmax(0, 1fr); }
}
/* final polish F1: below 360 px the slot beside the name would leave the name, the marks and the services about 165 px:
   the slot sits above the name instead, so the text of every card still starts at one x (the card's own edge) */
@media (max-width: 359px) {
  .d-card { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
}
