/* Port Hedland Pilots heritage – component styles.
   Colours and fonts come from the theme (theme.json presets) with fallbacks. */

:root {
	--phph-red: var(--wp--preset--color--brand-red, #DA251C);
	--phph-red-dark: var(--wp--preset--color--brand-red-dark, #B81E16);
	--phph-navy: var(--wp--preset--color--navy, #0B1F33);
	--phph-navy-2: var(--wp--preset--color--navy-2, #1B3350);
	--phph-ink: var(--wp--preset--color--ink, #14202B);
	--phph-sand: var(--wp--preset--color--sand, #F5F0E8);
	--phph-sand-2: var(--wp--preset--color--sand-2, #EFE8DC);
	--phph-rule: var(--wp--preset--color--rule, #E3DACB);
	--phph-muted: var(--wp--preset--color--muted, #5A6470);
	--phph-display: var(--wp--preset--font-family--display, 'Barlow Condensed', 'Arial Narrow', sans-serif);
	--phph-body: var(--wp--preset--font-family--body, 'IBM Plex Sans', system-ui, sans-serif);
	--phph-mono: var(--wp--preset--font-family--mono, 'IBM Plex Mono', ui-monospace, monospace);
	--phph-serif: var(--wp--preset--font-family--serif, 'Source Serif 4', Georgia, serif);
	--phph-radius: 6px;
}

.phph-mono { font-family: var(--phph-mono); }
.phph-eyebrow { font-family: var(--phph-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--phph-red-dark); margin: 0 0 6px; display: block; }
.phph-h1 { font-family: var(--phph-display); font-weight: 700; text-transform: uppercase; font-size: clamp(34px, 4vw, 44px); line-height: 1; margin: 0 0 24px; }
.phph-lead { font-size: 18px; }
.phph-empty { color: var(--phph-muted); }
.phph-hint, .phph-optional { color: var(--phph-muted); font-size: 14px; font-weight: 400; }
.phph-icon { flex-shrink: 0; vertical-align: middle; }
.phph-hp { position: absolute !important; left: -9999px; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Notices */
.phph-notice { padding: 14px 18px; border-radius: var(--phph-radius); margin: 0 0 20px; font-weight: 500; }
.phph-notice--success { background: #E7F3EA; color: #1D4D2B; border: 1px solid #B9DAC1; }
.phph-notice--error { background: #FBE9E7; color: #8E1510; border: 1px solid #F0C4BF; }

/* Buttons & forms */
.phph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 4px; background: var(--phph-red); color: #fff; font: 600 16px/1 var(--phph-body); cursor: pointer; text-decoration: none; }
.phph-btn:hover, .phph-btn:focus-visible { background: var(--phph-red-dark); color: #fff; }
.phph-btn--dark { background: var(--phph-navy); }
.phph-btn[disabled] { opacity: .7; cursor: progress; }
.phph-form { display: flex; flex-direction: column; gap: 16px; margin: 0 0 24px; }
.phph-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.phph-form input[type=text], .phph-form input[type=email], .phph-form input[type=password], .phph-form input[type=url], .phph-form input[type=search], .phph-form input[type=file], .phph-form select, .phph-form textarea {
	min-height: 46px; border: 1px solid #C9BFAE; border-radius: 4px; padding: 10px 12px; font: 400 16px/1.4 var(--phph-body); background: #fff; color: var(--phph-ink); width: 100%; box-sizing: border-box;
}
.phph-form input:focus-visible, .phph-form select:focus-visible, .phph-form textarea:focus-visible { outline: 2px solid var(--phph-red); outline-offset: 1px; }
.phph-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.phph-form__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.phph-form label.phph-check, .phph-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 15px; }
.phph-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--phph-red); flex-shrink: 0; }
.phph-radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
@media (max-width: 700px) { .phph-form__grid { grid-template-columns: 1fr; } }

.phph-box { background: #fff; border: 1px solid var(--phph-rule); border-radius: var(--phph-radius); padding: 20px; margin: 0 0 16px; }
.phph-box p { margin: 6px 0 10px; font-size: 15px; color: #4A5562; }
.phph-magic summary { cursor: pointer; font-weight: 600; }
.phph-magic .phph-form { margin: 16px 0 0; }
.phph-strong-link { font-weight: 600; }

/* Chips & filters */
.phph-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; }
.phph-chip { padding: 9px 18px; border-radius: 999px; border: 1px solid #D9CFBE; background: #fff; color: var(--phph-ink); text-decoration: none; font-size: 15px; }
.phph-chip:hover { border-color: var(--phph-ink); color: var(--phph-ink); }
.phph-chip.is-on { background: var(--phph-ink); border-color: var(--phph-ink); color: #fff; }
.phph-filter-note { margin: -16px 0 24px; }

/* Gallery */
.phph-masonry { columns: 4 260px; column-gap: 20px; }
.phph-figure { break-inside: avoid; margin: 0 0 20px; }
.phph-figure a { display: block; position: relative; }
.phph-figure img { width: 100%; height: auto; display: block; border-radius: 4px; }
.phph-figure figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 13px; color: var(--phph-muted); }
.phph-figure figcaption strong { color: var(--phph-ink); font-weight: 500; font-size: 14px; }
.phph-badge { position: absolute; top: 8px; right: 8px; background: rgba(11,31,51,.85); color: #fff; border-radius: 999px; width: 28px; height: 28px; display: grid; place-items: center; }
.phph-pager { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.phph-pager .page-numbers { padding: 8px 14px; border: 1px solid var(--phph-rule); border-radius: 4px; background: #fff; text-decoration: none; }
.phph-pager .current { background: var(--phph-ink); color: #fff; border-color: var(--phph-ink); }
.phph-grid-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.phph-grid-preview img { width: 100%; height: 260px; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 700px) { .phph-grid-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); } .phph-grid-preview img { height: 150px; } }

/* Moments (home) */
.phph-moments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; border-top: 2px solid var(--phph-ink); padding-top: 28px; }
.phph-moment { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--phph-ink); }
.phph-moment img, .phph-moment__ph { width: 100%; height: 180px; object-fit: cover; border-radius: 4px; display: block; background: var(--phph-sand-2); }
.phph-moment__year { font-family: var(--phph-display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--phph-red-dark); }
.phph-moment__text { font-size: 15px; line-height: 1.5; color: #34404D; }
.phph-moment:hover .phph-moment__text { text-decoration: underline; }
@media (max-width: 1000px) { .phph-moments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .phph-moments { grid-template-columns: 1fr; } .phph-moment img, .phph-moment__ph { display: none; } .phph-moment { flex-direction: row; align-items: baseline; gap: 16px; } .phph-moment__year { font-size: 28px; width: 72px; flex-shrink: 0; } }

/* Timeline (Our story) */
.phph-timeline { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #D9CFBE; }
.phph-timeline__item { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 48px; padding: 32px 0; border-top: 1px solid #D9CFBE; align-items: start; }
.phph-timeline__date { font-family: var(--phph-display); font-weight: 700; font-size: 36px; line-height: 1; color: var(--phph-red-dark); text-transform: uppercase; }
.phph-timeline__body h3 { margin: 0 0 10px; font: 600 22px/1.3 var(--phph-body); }
.phph-timeline__body p { margin: 0 0 8px; font-size: 17px; line-height: 1.6; color: #34404D; }
.phph-timeline__img img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 900px) { .phph-timeline__item { grid-template-columns: 1fr; gap: 12px; } .phph-timeline__img--empty { display: none; } .phph-timeline__date { font-size: 30px; } }

/* Records (on navy) */
.phph-records { border-bottom: 1px solid #22384F; }
.phph-records__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px 0; border-top: 1px solid #22384F; font-size: 16px; color: #B9C4D0; }
.phph-records__row strong { color: #fff; font-weight: 600; }
.phph-records__row .phph-mono { font-size: 14px; }
@media (max-width: 700px) { .phph-records__row { grid-template-columns: 1fr; gap: 2px; } }

/* Honour roll */
.phph-roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 40px; border-top: 2px solid var(--phph-ink); }
.phph-roll li { padding: 11px 0; border-bottom: 1px solid var(--phph-rule); font-size: 17px; display: flex; justify-content: space-between; gap: 8px; }
.phph-roll__years { font-family: var(--phph-mono); font-size: 13px; color: var(--phph-muted); }
@media (max-width: 900px) { .phph-roll { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .phph-roll { grid-template-columns: 1fr; } }

/* Press */
.phph-press { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #D9CFBE; }
.phph-press__item { display: grid; grid-template-columns: 150px 240px minmax(0, 1fr) 24px; gap: 24px; align-items: center; padding: 20px 0; border-top: 1px solid #D9CFBE; text-decoration: none; color: var(--phph-ink); }
.phph-press__date { font-size: 14px; color: var(--phph-muted); }
.phph-press__source { font-weight: 600; }
.phph-press__title { font-family: var(--phph-serif); font-size: 20px; line-height: 1.35; }
.phph-press__go { color: var(--phph-red-dark); }
a.phph-press__item:hover .phph-press__title { text-decoration: underline; }
@media (max-width: 800px) { .phph-press__item { grid-template-columns: 1fr 24px; gap: 4px 12px; } .phph-press__date, .phph-press__source { grid-column: 1; } .phph-press__title { grid-column: 1; } .phph-press__go { grid-row: 1 / span 3; grid-column: 2; } }

/* Story cards */
.phph-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.phph-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--phph-rule); border-radius: var(--phph-radius); overflow: hidden; text-decoration: none; color: var(--phph-ink); }
.phph-card img, .phph-card__ph { width: 100%; height: 220px; object-fit: cover; display: block; background: var(--phph-sand-2); }
.phph-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
.phph-card__title { font-family: var(--phph-serif); font-size: 24px; line-height: 1.25; }
.phph-card__meta { font-size: 14px; color: var(--phph-muted); }
.phph-card:hover .phph-card__title { text-decoration: underline; }
@media (max-width: 900px) { .phph-cards { grid-template-columns: 1fr; } }

/* Single photo / story details */
.phph-details { margin: 0 0 20px; display: grid; gap: 0; border-top: 1px solid var(--phph-rule); }
.phph-details > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--phph-rule); }
.phph-details dt { font-family: var(--phph-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--phph-muted); padding-top: 3px; }
.phph-details dd { margin: 0; }
.phph-help { display: flex; gap: 8px; align-items: center; background: #FFF6E5; border: 1px solid #F1DDB3; padding: 12px 14px; border-radius: var(--phph-radius); font-size: 15px; }
.phph-story-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.phph-story-photos img { width: 100%; height: 180px; object-fit: cover; border-radius: 4px; display: block; }

/* ---------- Members area ---------- */
.phph-mnav { display: flex; flex-direction: column; gap: 28px; min-height: 100%; color: #B9C4D0; font-size: 15px; }
.phph-mnav a { color: #B9C4D0; text-decoration: none; }
.phph-mnav__brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: #fff !important; }
.phph-mnav__brand strong { display: block; font-family: var(--phph-display); font-size: 20px; text-transform: uppercase; color: #fff; line-height: 1; }
.phph-mnav__brand em { font-style: normal; font-family: var(--phph-mono); font-size: 11px; }
.phph-mnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.phph-mnav ul a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 4px; }
.phph-mnav ul a:hover { background: rgba(255,255,255,.06); color: #fff; }
.phph-mnav ul a[aria-current] { background: var(--phph-navy-2); color: #fff; font-weight: 500; }
.phph-count { margin-left: auto; background: var(--phph-red); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.phph-mnav__public { display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 14px; }
.phph-mnav__me { margin-top: auto; display: flex; gap: 12px; align-items: center; padding: 16px 8px 0; border-top: 1px solid #22384F; font-size: 14px; }
.phph-mnav__me strong { display: block; color: #fff; font-weight: 500; }
.phph-avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--phph-red); color: #fff; display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }

.phph-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
.phph-action { display: flex; gap: 20px; align-items: center; border-radius: var(--phph-radius); padding: 26px; text-decoration: none; color: #fff !important; }
.phph-action strong { display: block; font-family: var(--phph-display); font-size: 30px; text-transform: uppercase; line-height: 1; margin-bottom: 6px; }
.phph-action span { font-size: 15px; }
.phph-action--red { background: var(--phph-red); }
.phph-action--red:hover { background: var(--phph-red-dark); }
.phph-action--navy { background: var(--phph-navy); }
.phph-action--navy:hover { background: var(--phph-navy-2); }
.phph-action__icon { width: 56px; height: 56px; border-radius: 6px; background: rgba(255,255,255,.15); display: grid; place-items: center; flex-shrink: 0; }
.phph-split { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin: 0 0 20px; }
@media (max-width: 900px) { .phph-actions, .phph-split { grid-template-columns: 1fr; } }
.phph-panel { background: #fff; border: 1px solid var(--phph-rule); border-radius: var(--phph-radius); padding: 26px; margin: 0 0 20px; }
.phph-panel--navy { background: var(--phph-navy); border-color: var(--phph-navy); color: #D7DEE6; }
.phph-panel--navy .phph-panel__title { color: #fff; }
.phph-panel__title { font: 600 19px/1.3 var(--phph-body); margin: 0 0 12px; }
.phph-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.phph-panel__head p { margin: 0; font-size: 14px; color: var(--phph-muted); }
.phph-activity { list-style: none; margin: 0; padding: 0; }
.phph-activity li { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid #EDE6DA; }
.phph-activity img, .phph-activity__ph { width: 72px; height: 56px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--phph-sand-2); }
.phph-activity small { display: block; color: var(--phph-muted); font-size: 13px; margin-top: 2px; }
.phph-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.phph-stats strong { display: block; font-family: var(--phph-display); font-size: 40px; line-height: 1; }
.phph-stats span { font-size: 14px; color: var(--phph-muted); }
.phph-identify { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.phph-identify a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--phph-muted); font-size: 13px; }
.phph-identify img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 700px) { .phph-identify { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Upload */
.phph-drop { position: relative; border: 2px dashed #C9BFAE; border-radius: var(--phph-radius); background: #fff; min-height: 170px; display: flex !important; flex-direction: column; align-items: center !important; justify-content: center; gap: 10px; text-align: center; color: #4A5562; cursor: pointer; padding: 20px; }
.phph-drop .phph-icon { color: var(--phph-red-dark); }
.phph-drop span { font-size: 17px; font-weight: 400; }
.phph-drop strong { color: var(--phph-ink); }
.phph-drop small { font-weight: 400; }
.phph-drop.is-over { border-color: var(--phph-red); background: #FFF8F7; }
.phph-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; bottom: 0; left: 50%; }
.phph-drop:focus-within { outline: 2px solid var(--phph-red); outline-offset: 2px; }
.phph-upload__count { margin: 0; color: var(--phph-muted); font-size: 14px; }
.phph-upload__rows { display: flex; flex-direction: column; gap: 16px; }
.phph-upload__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; background: #fff; border: 1px solid var(--phph-rule); border-radius: var(--phph-radius); padding: 16px; }
.phph-upload__row > img { width: 200px; height: 170px; object-fit: cover; border-radius: 4px; }
.phph-upload__row.is-too-big { border-color: var(--phph-red); opacity: .6; }
@media (max-width: 700px) { .phph-upload__row { grid-template-columns: 1fr; } .phph-upload__row > img { width: 100%; } }
.phph-submitbar { display: flex; flex-direction: column; gap: 14px; }
.phph-submitbar .phph-btn { align-self: flex-start; }
.phph-agree { font-size: 14px !important; color: #34404D; }

.phph-people__box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 46px; border: 1px solid #C9BFAE; border-radius: 4px; padding: 5px 8px; background: #fff; }
.phph-people__box input[type=text] { border: 0 !important; min-height: 34px !important; padding: 4px !important; flex: 1 1 140px; width: auto !important; }
.phph-people__box input:focus-visible { outline: none !important; }
.phph-people__box:focus-within { outline: 2px solid var(--phph-red); outline-offset: 1px; }
.phph-people__chips { display: contents; }
.phph-chiptag { background: var(--phph-sand-2); padding: 4px 4px 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; }
.phph-chiptag button { border: 0; background: none; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 6px; color: var(--phph-muted); }

/* Story form */
.phph-story { display: grid !important; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.phph-story__main { display: flex; flex-direction: column; gap: 16px; }
.phph-story__title { font-family: var(--phph-serif) !important; font-size: 32px !important; border: 0 !important; border-bottom: 1px solid var(--phph-rule) !important; border-radius: 0 !important; padding: 8px 0 !important; }
.phph-story__meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.phph-story__body { font-family: var(--phph-serif) !important; font-size: 19px !important; line-height: 1.7 !important; min-height: 380px; }
.phph-story__side .phph-panel { display: flex; flex-direction: column; gap: 12px; }
.phph-prompts { list-style: none; margin: 0; padding: 0; }
.phph-prompts li { border-top: 1px solid #22384F; }
.phph-prompts button { background: none; border: 0; color: #D7DEE6; text-align: left; padding: 12px 0; width: 100%; font: 400 15px/1.4 var(--phph-body); cursor: pointer; }
.phph-prompts button:hover { color: #fff; text-decoration: underline; }
@media (max-width: 1000px) { .phph-story { grid-template-columns: 1fr; } .phph-story__meta { grid-template-columns: 1fr; } }

/* Members' roll */
.phph-roll-head { align-items: flex-end; }
.phph-roll-head p { font-size: 15px; }
.phph-search { display: flex; align-items: center; gap: 10px; width: 340px; max-width: 100%; height: 48px; background: #fff; border: 1px solid #D9CFBE; border-radius: 4px; padding: 0 14px; color: var(--phph-muted); }
.phph-search input { border: 0; outline: none; font: 400 15px var(--phph-body); flex: 1; background: transparent; min-width: 0; }
.phph-pilots { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.phph-pilots li { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--phph-rule); border-radius: var(--phph-radius); padding: 14px 16px; }
.phph-pilots li.is-me { border: 2px solid var(--phph-red); }
.phph-pilots strong { display: block; font-size: 16px; }
.phph-pilots small { font-size: 13px; color: var(--phph-muted); }
.phph-pid { width: 48px; height: 48px; flex-shrink: 0; border-radius: 4px; background: var(--phph-navy); color: #fff; display: grid; place-items: center; font-family: var(--phph-mono); font-size: 15px; }
.phph-pilots li.is-me .phph-pid { background: var(--phph-red); }
.phph-you { margin-left: auto; font-size: 12px; font-weight: 600; color: #8E1510; background: #FBE9E7; padding: 3px 8px; border-radius: 4px; }
@media (max-width: 1200px) { .phph-pilots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .phph-pilots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .phph-pilots { grid-template-columns: 1fr; } .phph-panel__head { flex-direction: column; align-items: stretch; } }
