/* Modernist — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-accent-2: #e15b47;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;

  --color-accent-100: #fff2ef;
  --color-accent-200: #ffe0d9;
  --color-accent-300: #ffc4b8;
  --color-accent-400: #ff9783;
  --color-accent-500: #ff563c;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --color-accent-900: #4d170e;

  --color-accent-2-100: #fff2ef;
  --color-accent-2-200: #ffe0da;
  --color-accent-2-300: #ffc4b9;
  --color-accent-2-400: #ff9784;
  --color-accent-2-500: #ef6853;
  --color-accent-2-600: #c94b39;
  --color-accent-2-700: #9e3526;
  --color-accent-2-800: #71261b;
  --color-accent-2-900: #471d16;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4.0px;
  --space-2: 8.0px;
  --space-3: 12.0px;
  --space-4: 16.0px;
  --space-6: 24.0px;
  --space-8: 32.0px;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.grayscale{filter:grayscale(1) contrast(1.08)}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 2px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); border-color: transparent; background: none; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); justify-content: flex-start; text-align: left; }

/* — forms — */
.field { margin-bottom: var(--space-3); }
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; margin: 6px 12px 6px 0; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 2px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* ══════════════════════════════════════════════════════════════════════════
   Fiji PGA brand — overrides the tokens above. See README "Design tokens".
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --color-bg: #ffffff;
  --color-surface: #f2f1ef;
  --color-text: #40332b;
  --color-divider: color-mix(in srgb, #40332b 38%, transparent);

  --color-navy: #272c72;
  --color-sky: #2f9fd6;

  --color-accent: #1a6f9f;
  --color-accent-600: #145a82;
  --color-accent-700: #124a6b;
  --color-accent-800: #0e3a53;
  --color-accent-100: #e9f4fb;
  --color-accent-200: #cbe7f6;

  --color-accent-2: #272c72;
  --color-accent-2-100: #ebecf7;
  --color-accent-2-800: #1b1f52;

  --color-neutral-300: #d7d3d3;
  --color-neutral-700: #6b5c52;
  --color-neutral-800: #52463d;
}

/* ══════════════════════════════════════════════════════════════════════════
   Page layout — header, hero, sections, portal. Not part of the generic
   Modernist system; built for this site on top of its tokens/components.
   ══════════════════════════════════════════════════════════════════════ */

body {
  background-color: var(--color-bg);
  min-height: 100vh;
  position: relative;
}
/* A fixed pseudo-element behind everything, rather than background-attachment:fixed on
   body directly — that combined with backdrop-filter on .site-header/.card/etc. causes a
   real rendering bug in some engines (content silently disappears after scrolling). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
    url('/assets/img/natadola-aerial.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.container { max-width: 1680px; margin: 0 auto; padding: 0 32px; }
.lead { font-size: 17px; line-height: 1.5; }
.kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-accent-700); margin: 0 0 var(--space-2); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.header-row { display: flex; align-items: center; gap: 20px; padding: 20px 0; }
.brand { display: flex; }
.brand img { height: 56px; width: auto; }
.tagline { flex: 1; text-align: center; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-neutral-700); margin: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; margin: 0; }
.site-header .nav {
  display: flex; flex-wrap: wrap; gap: 10px 30px;
  padding: 14px 32px; max-width: 1680px; margin: 0 auto;
  border-top: 1px solid var(--color-divider);
}
.site-header .nav a { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 0; }

.section { padding-block: 48px; } /* block only: a shorthand here wiped the side gutters that .container gives */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }

.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 48px; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: var(--space-4); }
.hero-media { position: relative; height: 420px; overflow: hidden; background: var(--color-neutral-300); border-radius: 16px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; animation: photoZoom 22s ease-in-out infinite alternate; }
.media-badge { position: absolute; left: 0; bottom: 0; background: var(--color-accent); color: var(--color-bg); padding: 8px 14px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 0 12px 0 0; }
@keyframes photoZoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* — hero entrance: kicker, headline lines, lead, buttons rise in; media fades in — */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero .rise-item, .hero .rise-line {
  opacity: 0; animation: rise 0.75s cubic-bezier(.2, .7, .2, 1) forwards;
}
.rise-line { display: block; }
.hero-fadein { opacity: 0; animation: fadeIn 1s ease forwards; animation-delay: .3s; }

/* — scroll reveal: JS (site.js) adds .reveal/.reveal-rule then toggles .in — */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-rule { transform: scaleX(0); transform-origin: left; transition: transform 0.7s ease 0.1s; }
.reveal-rule.in { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
  .hero .rise-item, .hero .rise-line, .hero-fadein { opacity: 1; animation: none; transform: none; }
  .reveal, .reveal-rule { opacity: 1; transform: none; transition: none; }
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider); }
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
.stat-cell { padding: 24px; border-left: 1px solid var(--color-divider); }
.stat-cell:first-child { border-left: none; }
.stat-value { font-size: 40px; font-weight: 800; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-neutral-700); }

.ticker-band { background: var(--color-navy); color: #fff; overflow: hidden; padding: 12px 0; }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; width: max-content; animation: ticker 30s linear infinite; }
.ticker-track span { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.event-card { border-top: 2px solid var(--color-divider); padding: 16px 0; }
.event-card.is-open { border-top-color: var(--color-accent); }

.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li { padding: 12px 0; border-top: 1px solid var(--color-divider); }
.rule-list li:first-child { border-top: none; }
ol.rule-list { counter-reset: step; }
ol.rule-list li { counter-increment: step; }
ol.rule-list li::before { content: counter(step) ". "; font-weight: 800; color: var(--color-accent); }

.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }

/* — home page: member benefits as bold bullets, marked with a monochrome golf-ball icon — */
.benefit-bullets { list-style: none; margin: 0; padding: 0; }
.benefit-bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; font-weight: 800;
}
.benefit-bullets li::before {
  content: '';
  flex: none; width: 20px; height: 20px; margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%231a6f9f'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='13' cy='7' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='17' cy='10' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='9' cy='13' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='14' cy='14' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='18' cy='16' r='1.3' fill='white' fill-opacity='0.6'/%3E%3Ccircle cx='11' cy='18' r='1.3' fill='white' fill-opacity='0.6'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

.quote-block { border-top: 2px solid var(--color-divider); padding-top: 32px; margin: 0; font-size: clamp(26px, 3vw, 38px); font-weight: 800; font-style: normal; }
.quote-cite { display: block; margin-top: 12px; font-size: 14px; font-weight: 400; color: var(--color-neutral-700); }

.pathway-banner { background: var(--color-navy); color: #fff; padding: 48px 0; }
.pathway-banner h2 { color: #fff; }
.pathway-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }

.sponsors-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--color-divider); border-bottom: 2px solid var(--color-divider); }
.sponsor-cell { padding: 24px; border-left: 1px solid var(--color-divider); display: flex; align-items: center; justify-content: center; color: var(--color-neutral-700); text-align: center; min-height: 72px; }
.sponsor-cell:first-child { border-left: none; }
.sponsor-cell img { max-width: 100%; max-height: 40px; object-fit: contain; }

/* — home page: sponsors marquee — logos drift sideways continuously, like the ticker. — */
.sponsor-marquee { overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.sponsor-marquee-track { display: flex; align-items: center; gap: 32px; width: max-content; animation: sponsorScroll 28s linear infinite; }
.sponsor-marquee:hover .sponsor-marquee-track { animation-play-state: paused; }
.sponsor-marquee-item {
  display: flex; align-items: center; justify-content: center;
  min-width: 200px; height: 110px; padding: 20px 32px;
  background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.sponsor-marquee-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sponsor-marquee-item span { font-size: 16px; font-weight: 800; color: var(--color-neutral-700); text-align: center; }
@keyframes sponsorScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .sponsor-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .sponsor-marquee-track { animation: none; }
}

/* — sponsors page: feature cards with logo, role, blurb, and a link — */
.sponsor-hero { position: relative; height: 260px; overflow: hidden; border-radius: 16px; margin-bottom: 40px; }
.sponsor-hero img { width: 100%; height: 100%; object-fit: cover; }
.sponsor-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(39, 44, 114, 0.82), rgba(39, 44, 114, 0.1));
}
.sponsor-hero-text { position: absolute; left: 32px; bottom: 28px; z-index: 1; max-width: 560px; }
.sponsor-hero-text .kicker { color: var(--color-accent-200); }
.sponsor-hero-text h1 { color: #fff; margin: 0; }

.sponsor-tier-heading { margin-top: 40px; }
.sponsor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.sponsor-card {
  display: flex; flex-direction: column;
  background: rgba(242, 241, 239, 0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.sponsor-card-logo {
  height: 120px; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(255, 255, 255, 0.9);
}
.sponsor-card-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sponsor-card-logo .sponsor-fallback { font-size: 18px; font-weight: 800; color: var(--color-neutral-700); text-align: center; }
.sponsor-card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sponsor-card-tier { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-700); margin: 0; }
.sponsor-card-name { font-size: 18px; font-weight: 800; margin: 0; }
.sponsor-card-blurb { font-size: 14px; color: var(--color-neutral-800); flex: 1; margin: 0; }
.sponsor-card-link { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-accent); text-decoration: none; margin-top: 4px; }
.sponsor-card-link:hover { color: var(--color-accent-600); }

/* — home page: "Latest news" — deliberately its own softer, rounder shape and a
   distinct tint, so it reads as a different kind of content from the sharper-cornered
   tour/sponsor cards elsewhere. — */
.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  display: flex; flex-direction: column;
  background: rgba(233, 244, 251, 0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.news-card-media { height: 300px; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-card-date { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-700); margin: 0; }
.news-card-title { font-size: 18px; font-weight: 800; margin: 0; }
.news-card-excerpt { font-size: 14px; color: var(--color-neutral-800); margin: 0; flex: 1; }

/* — full article body on /news/{slug} — */
.prose { font-size: 16px; line-height: 1.7; }

.site-footer { border-top: 2px solid var(--color-divider); margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0; }
.footer-grid h6 { font-size: 15px; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.footer-grid p { font-size: 16px; }
.footer-grid a { display: block; color: var(--color-text); text-decoration: none; font-size: 16px; padding: 6px 0; }
.footer-grid a:hover { color: var(--color-accent); }
.footer-bottom p { font-size: 13px; color: var(--color-neutral-700); padding-bottom: 24px; margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.dl-rows { list-style: none; margin: 0; padding: 0; }
.dl-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-divider); }
.dl-rows li:first-child { border-top: none; }

.aside-panel {
  background: rgba(242, 241, 239, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 20px;
}
/* Translucent so the golf-course background shows through, matching .aside-panel/.site-header. */
.card { background: rgba(242, 241, 239, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.form-error { color: var(--color-accent-700); font-size: 13px; font-weight: 600; margin-bottom: var(--space-2); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.portal-header {
  background: rgba(242, 241, 239, 0.62);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--color-divider); padding: 24px 0 0;
}
.portal-header-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.portal-id { width: 76px; height: 76px; flex: none; background: var(--color-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; border-radius: 12px; }
.portal-name { font-size: 34px; margin: 4px 0; }
.portal-meta { color: var(--color-neutral-700); font-size: 14px; margin: 0; }
.portal-tabs { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }
.portal-tabs a { padding: 10px 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text); text-decoration: none; border-bottom: 3px solid transparent; }
.portal-tabs a[aria-current='page'] { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.login-links { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }

@media (max-width: 900px) {
  .hero-grid, .benefits-grid, .two-col, .pathway-grid { grid-template-columns: 1fr; }
  .stat-row, .cards-3, .sponsors-strip, .news-cards, .sponsor-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .tagline { display: none; }
}

/* — Installed app (PWA) — */
.app-tabbar { display: none; }
.install-box { border: 2px solid var(--color-accent); padding: 14px 16px; margin: 0 0 20px; background: var(--color-accent-100, #e9f4fb); }
.install-box[hidden], .install-box [hidden] { display: none; }
.install-box h4 { margin: 0 0 4px; }
.install-box p { margin: 0 0 10px; font-size: 14px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 28px; }
.quick-actions a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 2px solid var(--color-divider); text-decoration: none; color: var(--color-text); background: rgba(242, 241, 239, 0.62); }
.quick-actions a strong { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.quick-actions a span { font-size: 12px; color: var(--color-neutral-700); }

@media (display-mode: standalone) and (max-width: 900px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-header { padding-top: env(safe-area-inset-top); }
  .site-footer { display: none; }
  .app-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--color-neutral-300);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .app-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--color-neutral-700); text-decoration: none;
  }
  .app-tabbar a[aria-current='page'] { color: var(--color-accent); }
  /* In the installed app only the member tabs are available: the public site menu and the wrapped text tabs
     at the top of the dashboard are replaced by the bottom bar. (Admin keeps its own tab strip.) */
  .member-tabs { display: none; }
  .install-box { display: none; }
}

/* Member dashboard: upcoming events + recent results */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 0 0 8px; }
.dash-card { border: 2px solid var(--color-divider); padding: 14px 16px; margin: 0 0 12px; background: rgba(242, 241, 239, 0.62); }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; gap: 8px; } }

/* Card / bank transfer choice on member payment forms */
.pay-options { border: 1px solid var(--color-divider); padding: 10px 14px 12px; margin: 0 0 12px; }
.pay-options legend { padding: 0 6px; font-weight: 800; font-size: 13px; }
.pay-options label { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 14px; cursor: pointer; }
.pay-options input[type=radio] { margin-top: 4px; flex: none; }
.pay-panel { margin: 0 0 12px; font-size: 13px; }
.pay-panel[hidden] { display: none; }

/* Installed app, any screen size: no public-site menu (Home, About, Membership, Turn pro, Tournaments, ...), tagline or footer.
   The html.is-app class (set by pwa.js) covers iPhone/iPad, where display-mode can be unreliable. */
@media (display-mode: standalone) {
  .nav, .tagline, .site-footer { display: none; }
}
html.is-app .nav, html.is-app .tagline, html.is-app .site-footer { display: none; }

/* Same app layout keyed off the html.is-app flag (iPhone/iPad home-screen apps). */
@media (max-width: 900px) {
  html.is-app body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  html.is-app .site-header { padding-top: env(safe-area-inset-top); }
  html.is-app .app-tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--color-neutral-300);
    padding-bottom: env(safe-area-inset-bottom);
  }
  html.is-app .app-tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--color-neutral-700); text-decoration: none;
  }
  html.is-app .app-tabbar a[aria-current='page'] { color: var(--color-accent); }
  html.is-app .member-tabs, html.is-app .install-box { display: none; }
}

/* Phones / installed app: comfortable side gutters and tighter vertical rhythm */
@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .section { padding-block: 28px; }
  .section h2 { font-size: 24px; }
  .portal-name { font-size: 26px; }
  .portal-id { width: 56px; height: 56px; font-size: 18px; }
  .portal-header { padding-top: 16px; }
  .two-col { gap: 24px; }
  .install-box, .quick-actions { margin-bottom: 20px; }
}

@media (max-width: 600px) {
  .portal-header-row > div:last-child { margin-bottom: 12px; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .section-head { flex-wrap: wrap; }
}

/* Grid children may shrink below their content width, so a wide table scrolls instead of widening the page. */
.two-col > *, .dash-grid > *, .hero-grid > *, .benefits-grid > * { min-width: 0; }
@media (max-width: 600px) {
  .table th, .table td { padding: 8px 6px; font-size: 13px; }
}

/* Find a PGA Pro */
.pro-filter { margin: 24px 0 22px; max-width: 980px; }
.pro-filter-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.pro-filter .input { border-radius: 12px; }
.pro-services { border: 1px solid var(--color-neutral-300); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; background: rgba(255, 255, 255, 0.75); }
.pro-services summary { cursor: pointer; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.services-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; margin-top: 12px; }
.services-pick label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0; cursor: pointer; }
.services-pick input { margin-top: 3px; flex: none; }
.pro-filter-actions { display: flex; gap: 10px; align-items: center; }
.pro-filter-actions .btn { border-radius: 999px; }

.pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; margin: 14px 0 30px; }

/* Player card: soft rounded card, coloured banner with the photo sitting over its edge */
.pro-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--color-neutral-300); border-radius: 22px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(20, 30, 40, 0.05), 0 8px 24px rgba(20, 30, 40, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pro-card:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(20, 30, 40, 0.08), 0 16px 34px rgba(20, 30, 40, 0.12); }
.pro-banner {
  height: 84px; padding: 12px 14px; display: flex; justify-content: flex-end; align-items: flex-start;
  background:
    radial-gradient(circle at 18% 120%, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0) 55%),
    linear-gradient(125deg, var(--color-navy) 0%, var(--color-accent) 100%);
}
.pro-pill {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff;
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 4px 11px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pro-avatar {
  flex: none; width: 88px; height: 88px; border-radius: 50%; margin: -44px 0 0 20px; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none;
  background: linear-gradient(135deg, var(--color-accent), var(--color-navy)); color: #fff; font-weight: 800; font-size: 28px; letter-spacing: 0.02em;
  border: 4px solid #fff; box-shadow: 0 4px 14px rgba(20, 30, 40, 0.18);
}
.pro-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pro-avatar-lg { width: 136px; height: 136px; font-size: 44px; margin: 0; }
.pro-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 20px 20px; flex: 1; }
.pro-name { font-size: 20px; line-height: 1.15; margin: 4px 0 0; }
.pro-name a { color: inherit; text-decoration: none; }
.pro-name a:hover { color: var(--color-accent); }
.pro-role { margin: 0; font-size: 14px; font-weight: 700; color: var(--color-accent-700); }
.pro-place { margin: 2px 0 0; font-size: 13.5px; color: var(--color-neutral-700); display: flex; align-items: center; gap: 5px; }
.pro-place svg { flex: none; color: var(--color-accent); }
.pro-rate {
  margin: 8px 0 0; font-size: 13px; align-self: flex-start;
  background: var(--color-accent-100); color: var(--color-accent-800); border-radius: 999px; padding: 4px 12px;
}
.pro-line { margin: 0; font-size: 14px; }
.pro-badge { margin: 2px 0 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-accent-700); }
.pro-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 2px; }
.pro-tags li { background: var(--color-surface); color: var(--color-neutral-800); font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--color-neutral-300); }
.pro-tags li.more { background: transparent; border-color: transparent; color: var(--color-neutral-700); }
.pro-tags-lg li { font-size: 14px; padding: 6px 14px; }
.pro-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 16px; }
.pro-btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; min-height: 42px; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pro-btn-primary { flex: 1; padding: 0 18px; background: var(--color-accent); color: #fff; border: 2px solid var(--color-accent); }
.pro-btn-primary:hover { background: var(--color-accent-700); border-color: var(--color-accent-700); }
.pro-btn-icon { width: 42px; padding: 0; color: var(--color-accent); background: #fff; border: 2px solid var(--color-neutral-300); }
.pro-btn-icon:hover { border-color: var(--color-accent); background: var(--color-accent-100); }
.pro-btn:focus-visible, .pro-name a:focus-visible { outline: 3px solid var(--color-accent-200); outline-offset: 2px; }
.pro-pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 8px 0 24px; }
.pro-pager .btn { border-radius: 999px; }

/* A pro's own page */
.pro-detail-head { display: flex; gap: 26px; align-items: center; margin-top: 12px; padding: 24px; background: #fff; border: 1px solid var(--color-neutral-300); border-radius: 24px; box-shadow: 0 8px 24px rgba(20, 30, 40, 0.07); }
.pro-detail-head .pro-avatar-lg { border: 5px solid #fff; box-shadow: 0 4px 16px rgba(20, 30, 40, 0.2), 0 0 0 2px var(--color-accent-200); }
.pro-detail-head .btn { border-radius: 999px; }
@media (max-width: 700px) {
  .pro-filter-row { grid-template-columns: 1fr; gap: 0; }
  .pro-detail-head { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .pro-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pro-card, .pro-btn { transition: none; } .pro-card:hover { transform: none; } }

/* Admin → Branding: colour theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 14px 0; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid var(--color-divider); background: #fff; cursor: pointer; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card:has(input:checked) { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-200); }
.theme-card:has(input:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.theme-swatches { display: flex; height: 36px; border-radius: 4px; overflow: hidden; }
.theme-swatches i { flex: 1; }
.theme-name { font-weight: 800; font-size: 14px; }
.theme-name small { font-weight: 400; color: var(--color-neutral-700); }
.theme-blurb { font-size: 12px; color: var(--color-neutral-700); }
.theme-preview { border: 2px solid var(--color-accent); padding: 16px; background: var(--color-accent-100); }
.pro-detail-head .pro-actions { flex-wrap: wrap; }
.pro-detail-head .btn { white-space: nowrap; }

/* Phones in the browser: the logo + wrapped menu used to stay stuck to the top and covered ~40% of the screen
   while scrolling. Let it scroll away instead (the installed app hides the menu anyway). */
@media (max-width: 700px) and (not (display-mode: standalone)) {
  .site-header { position: static; }
}

/* Member directory on a phone: one small card per member instead of a table that runs off the screen. */
@media (max-width: 700px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--color-divider); }
  .table-stack td { display: flex; gap: 12px; justify-content: space-between; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  .table-stack td::before { content: attr(data-label); flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-neutral-700); text-align: left; padding-top: 2px; }
  .table-stack td[data-label="Member"] { font-weight: 800; font-size: 16px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Member app polish (v2): clean light-blue surfaces instead of the foggy photo background, rounded white
   cards, a compact app bar, and a floating light-blue tab bar. Everything is built from theme variables
   (accent / accent-100 / accent-200 / navy) so it follows the colour theme picked in Admin > Branding.
   ══════════════════════════════════════════════════════════════════════ */
/* Member area (signed-in pages) and the installed app: no photo behind the pages, a clean light-blue colour wash and solid surfaces.
   The public website pages keep their photo background. */
html.is-app body::before, body.is-portal::before { background: linear-gradient(180deg, color-mix(in srgb, var(--color-accent-100, #e9f4fb) 85%, #fff) 0, color-mix(in srgb, var(--color-accent-100, #e9f4fb) 40%, #fff) 420px, #fbfcfe 100%); }
html.is-app .site-header, body.is-portal .site-header { background: rgba(255, 255, 255, 0.96); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.is-portal .header-row { padding: 20px 32px; }
@media (max-width: 600px) { body.is-portal .header-row { padding: 12px 18px; } }
html.is-app .card, html.is-app .aside-panel, html.is-app .dash-card, html.is-app .sponsor-card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.is-app .news-card { background: var(--color-accent-100, #e9f4fb); backdrop-filter: none; -webkit-backdrop-filter: none; }
html.is-app .qa-ic, body.is-portal .qa-ic { display: inline-flex; }

/* Member header: a navy-to-blue banner card */
body.is-portal .portal-header {
  background: linear-gradient(135deg, var(--color-navy, #272c72) 0%, var(--color-accent, #1a6f9f) 100%);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 0; border-radius: 0 0 26px 26px; padding: 22px 0 0; color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-navy, #272c72) 25%, transparent);
}
body.is-portal .portal-header .kicker { color: color-mix(in srgb, #fff 72%, transparent); margin-bottom: 2px; }
body.is-portal .portal-header .portal-name { color: #fff; }
body.is-portal .portal-header .portal-meta { color: color-mix(in srgb, #fff 80%, transparent); }
body.is-portal .portal-id { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 18px; color: #fff; }
body.is-portal .portal-header .tag { background: rgba(255, 255, 255, 0.18); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 4px 12px; font-weight: 700; }
body.is-portal .portal-header-row { flex-wrap: nowrap; align-items: flex-start; }
body.is-portal .portal-tabs { margin-top: 12px; gap: 22px; }
body.is-portal .portal-tabs a { color: color-mix(in srgb, #fff 78%, transparent); }
body.is-portal .portal-tabs a[aria-current='page'] { color: #fff; border-bottom-color: #fff; }
body.is-portal .portal-header-row > div:last-child { margin-bottom: 0; }
html.is-app body.is-portal .portal-header { padding-bottom: 18px; }

/* Cards: white, rounded, soft shadow, no heavy grey outlines */
body.is-portal .dash-card, body.is-portal .card, body.is-portal .aside-panel, body.is-portal .install-box {
  background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
  border: 1px solid color-mix(in srgb, var(--color-accent) 10%, #e6ebf0); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.04), 0 8px 24px rgba(20, 30, 50, 0.06);
}
body.is-portal .dash-card { padding: 18px; margin-bottom: 14px; }
body.is-portal .install-box { background: var(--color-accent-100, #e9f4fb); border-color: var(--color-accent-200, #cbe7f6); }
body.is-portal .dash-card h4 { font-size: 18px; }
body.is-portal .section h2, body.is-portal .section-head h2 { font-size: 22px; letter-spacing: -0.01em; }

/* Quick actions: icon tiles */
body.is-portal .quick-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
body.is-portal .quick-actions a {
  position: relative; gap: 2px; padding: 14px; min-height: 108px; justify-content: flex-end;
  background: #fff; border: 1px solid color-mix(in srgb, var(--color-accent) 10%, #e6ebf0); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.04), 0 8px 20px rgba(20, 30, 50, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.is-portal .quick-actions a:active { transform: scale(0.98); }
body.is-portal .quick-actions a strong { font-size: 15px; text-transform: none; letter-spacing: 0; }
body.is-portal .quick-actions a span { font-size: 12.5px; line-height: 1.3; }
.qa-ic { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 14px; margin-bottom: 10px; background: var(--color-accent-100, #e9f4fb); color: var(--color-accent-700, #124a6b); font-style: normal; }

/* Buttons and inputs */
body.is-portal .btn { border-radius: 14px; min-height: 44px; padding-inline: 18px; }
body.is-portal .btn-primary { background: var(--color-accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--color-accent) 30%, transparent); }
body.is-portal .btn-primary:disabled { box-shadow: none; opacity: 0.5; }
body.is-portal .btn-secondary { border-color: color-mix(in srgb, var(--color-accent) 30%, #fff); color: var(--color-accent-700, #124a6b); background: #fff; }
body.is-portal .input, body.is-portal select.input { font-size: 16px; border-radius: 12px; background: #fff; min-height: 46px; }
body.is-portal textarea.input { font-size: 16px; border-radius: 12px; background: #fff; min-height: 90px; }
body.is-portal .tag { border-radius: 999px; }

/* Payment choice: two tappable option cards */
body.is-portal .pay-options { border: 0; padding: 0; margin: 0 0 12px; }
body.is-portal .pay-options legend { padding: 0 0 8px; font-size: 14px; }
body.is-portal .pay-options label {
  margin: 0 0 8px; padding: 12px 14px; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4;
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 18%, #dfe5ea); border-radius: 14px; background: #fff;
}
body.is-portal .pay-options label:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-100, #e9f4fb); }
body.is-portal .pay-options input[type=radio] { accent-color: var(--color-accent); width: 20px; height: 20px; margin-top: 1px; }
body.is-portal .pay-panel { background: color-mix(in srgb, var(--color-accent-100, #e9f4fb) 60%, #fff); border-radius: 12px; padding: 10px 12px; }

/* Compact app bar when installed: logo + sign out only (the Profile tab replaces My profile) */
html.is-app .site-header { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 12%, #e6ebf0); }
html.is-app .site-header .header-row { padding-block: 8px; gap: 12px; justify-content: space-between; }
html.is-app .brand img { height: 38px; }
html.is-app .header-actions .btn-secondary { display: none; }
html.is-app .header-actions .btn-ghost { font-size: 14px; min-height: 40px; }

/* The floating tab bar (installed app, any screen size, so iPad landscape has navigation too) */
html.is-app body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
html.is-app .app-tabbar {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  position: fixed; z-index: 60; left: 50%; right: auto; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 580px); padding: 6px;
  background: color-mix(in srgb, var(--color-accent-200, #cbe7f6) 55%, rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid color-mix(in srgb, #fff 70%, var(--color-accent-200, #cbe7f6));
  border-radius: 28px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--color-navy, #272c72) 24%, transparent), 0 2px 6px color-mix(in srgb, var(--color-navy, #272c72) 14%, transparent);
}
html.is-app .app-tabbar a {
  min-height: 54px; gap: 3px; padding: 7px 0 6px; border-radius: 22px;
  font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1;
  color: var(--color-accent-700, #124a6b);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
html.is-app .app-tabbar a svg { width: 23px; height: 23px; opacity: 0.8; }
html.is-app .app-tabbar a:active { transform: scale(0.94); }
html.is-app .app-tabbar a[aria-current='page'] {
  background: #fff; color: var(--color-accent-700, #124a6b);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--color-navy, #272c72) 16%, transparent);
}
html.is-app .app-tabbar a[aria-current='page'] svg { opacity: 1; stroke-width: 2.1; }
html.is-app .member-tabs { display: none; }
@supports not (color: color-mix(in srgb, red, blue)) {
  html.is-app .app-tabbar { background: rgba(214, 235, 248, 0.92); }
}
@media (max-width: 380px) { html.is-app .app-tabbar a { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { html.is-app .app-tabbar a, body.is-portal .quick-actions a { transition: none; } }

/* Phones: tighter, calmer */
@media (max-width: 600px) {
  body.is-portal .portal-name { font-size: 24px; }
  body.is-portal .portal-id { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
  body.is-portal .portal-header { padding-top: 16px; padding-bottom: 18px; }
  body.is-portal .portal-header-row { gap: 10px; flex-wrap: wrap; }
  body.is-portal .portal-header-row > div:last-child { margin: 0 0 0 70px; }
  body.is-portal .section { padding-top: 22px; }
  body.is-portal .quick-actions { grid-template-columns: 1fr 1fr; }
}

/* Member pages on a phone in the browser: header buttons stay on one line, banner tabs scroll sideways instead of wrapping. */
@media (max-width: 600px) {
  body.is-portal .header-actions .btn { white-space: nowrap; min-height: 38px; padding-inline: 12px; font-size: 13px; }
  body.is-portal .header-row { gap: 8px; }
  body.is-portal .portal-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -18px; padding-inline: 18px; }
  body.is-portal .portal-tabs::-webkit-scrollbar { display: none; }
  body.is-portal .portal-tabs a { white-space: nowrap; flex: none; }
}

/* Admin + member pages: dashboard figures as soft cards, lighter dividers */
body.is-portal .stat-row { border: 0; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
body.is-portal .stat-cell { background: #fff; border: 1px solid color-mix(in srgb, var(--color-accent) 10%, #e6ebf0); border-radius: 20px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.04), 0 8px 24px rgba(20, 30, 50, 0.06); }
body.is-portal .hr { height: 1px; background: color-mix(in srgb, var(--color-accent) 14%, #dfe5ea); }
