/* /css/fflipp.css - NEW 11-Nov-2026. Shared stylesheet for every redesigned page (Fflipp Style Guide v1.0, CMO 10-Nov-2026).
   Replaces the page-only css/h_home.css with NO visual change: same rules, token names now match the style guide.
   Used by /index.php and /apps/index.php (fully redesigned pages: <body class="h-page">).
   v2 11-Nov-2026 (Order 0, stage 1): the shared site footer (includes/global_footer.php, class "ff-foot") is restyled
   on EVERY page. On old pages the file is loaded by global_footer.php itself; only the ".ff-foot" rules apply there,
   everything else is scoped to body.h-page or an "h-" class and changes nothing on an old page.
   Flat (no gradients, no shadows, no emoji). System fonts only, no outside requests.
   Icons: Material Design Icons (Pictogrammers), Apache License 2.0 - notice in includes/licenses/.
   Colours: use the tokens below, never typed-in values (owner/CMO decisions 11-Nov-2026 are included). */

body.h-page, body.ff-page, .ff-foot, .ff-bar, .ff-dash {
  /* ---- Colour tokens (style guide section 3). Also set on the shared footer so it works on old pages ---- */
  --paper: #fbfaf7;         /* page background */
  --white: #ffffff;         /* cards, search box, forms; text on navy, fern, hero-blue */
  --oak: #f2ede3;           /* icon wells, hub panels, hover */
  --sand: #e6dcc6;          /* dividers, hover on oak; never text */
  --line: #d9d2c3;          /* 1px borders on cards, covers, blog images */
  --rule: #8c8577;          /* header / menu / list rules; 3.5:1, lines only */
  --ink: #14212b;           /* all text and headings; only text colour on orange (15:1) */
  --muted: #4a5560;         /* secondary text (7.4:1) */
  --navy: #003e67;          /* icons, icon circles, paid tags, Share panel */
  --navy-text: #d6e4ef;     /* secondary text on navy (8.6:1) */
  --navy-label: #ffc48f;    /* small capital labels on navy (7.2:1) - owner 11-Nov */
  --hero-blue: #2c7cb3;     /* homepage hero band; white text 4.5:1 */
  --footer-blue: #2c7cb3;   /* site footer (same value as hero-blue) - owner 11-Nov */
  --footer-circle: #4a90c4; /* social icon circles in the footer; hover = orange with a white icon - owner 11-Nov */
  --orange: #ff9842;        /* main button fill, link underlines; never text */
  --orange-hover: #ffaa60;  /* hover of orange buttons */
  --orange-ink: #b65200;    /* dark orange for text, if ever needed. NOT the wordmark: "flip" stays brand orange (owner 11-Nov) */
  --fern: #2f5d50;          /* closing band, For all plans tag, free-books note */
  --fern-text: #e3eee9;     /* secondary text on fern */
  --focus: var(--orange);   /* 3px focus outline */
  --focus-ink: var(--ink);  /* 2px inner line of the two-tone focus ring (white on coloured bands) - guide v1.1 */
  --error: #b3261e;         /* error text, error box border and icon - guide v1.1 */
  --error-bg: #fdf0ee;      /* fill of error boxes */
  --success-bg: #e5efe9;    /* fill of success boxes (border: fern) */
  --info-bg: #e8f1f8;       /* fill of information boxes (border: navy) */
  --art-yellow: #ffd23f;    /* hero book drawing only - owner 11-Nov */
  --art-sky: #9fd3f2;       /* hero book drawing only - owner 11-Nov */
  /* ---- Type ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* ---- Spacing and layout ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;  --space-5: 22px;  --space-6: 32px;  --space-7: 44px;
  --header-height: 68px;
  --sidebar-width: 236px;
  --content-max: 1100px;
  /* ---- Radius ---- */
  --radius-cover: 10px;
  --radius-well: 12px;
  --radius-card: 16px;
  --radius-panel: 22px;
  --radius-pill: 999px;
}
body.h-page {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font-sans);
  overflow-x: hidden;
  color-scheme: light;
}
body.h-page *, body.h-page *::before, body.h-page *::after { box-sizing: border-box; }
body.h-page :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
body.h-page svg { fill: currentColor; }

.h-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h-skip { position: fixed; left: 12px; top: -80px; z-index: 300; background: var(--ink); color: var(--white); padding: 12px 18px;
  border-radius: var(--radius-pill); font-weight: 800; text-decoration: none; }
.h-skip:focus { top: 10px; }

/* ---------- Header ---------- */
.h-hd { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); z-index: 200;
  display: flex; align-items: center; gap: 18px; background: var(--paper); border-bottom: 1px solid var(--rule);
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.h-hd-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.h-menu { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.h-menu:hover { background: var(--oak); }
.h-menu svg { width: 24px; height: 24px; }
.h-logo { display: flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; color: var(--ink);
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.3px; }
.h-logo-img { height: 28px; width: auto; display: block; flex-shrink: 0; }
.h-logo b { color: var(--navy); font-weight: 800; }
.h-logo i { font-style: normal; color: var(--orange); } /* brand orange (owner 11-Nov): logos are exempt from the text-contrast rule */

.h-search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-pill); overflow: hidden; }
.h-search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.h-search input { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 20px; font: inherit; color: var(--ink); border: 0; background: transparent; }
.h-search input:focus { outline: none; }
.h-search input::placeholder { color: var(--muted); opacity: 1; }
.h-search button { width: 52px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.h-search button svg { width: 20px; height: 20px; }

.h-acts { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.h-login { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; font-weight: 700; text-decoration: none; color: var(--ink); }
.h-avatar { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }

/* Avatars */
.h-av, .h-av-lg { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.h-av { width: 18px; height: 18px; font-size: 11px; }
.h-av-lg { width: 40px; height: 40px; border: 1px solid var(--rule); font-size: 20px; }
.h-av-emoji { background: var(--white); border: 1px solid var(--line); }
.h-av-empty { background: var(--sand); }

/* ---------- Buttons ---------- */
.h-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius-pill);
  font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background .15s; }
.h-btn-main { background: var(--orange); color: var(--ink); }
.h-btn-main:hover { background: var(--orange-hover); }
.h-btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.h-btn-line:hover { background: var(--oak); }
.h-btn-xl { min-height: 58px; padding: 0 30px; font-size: 1.1rem; }

/* ---------- Left menu ---------- */
.h-side { position: fixed; top: var(--header-height); bottom: 0; left: 0; width: var(--sidebar-width); z-index: 150;
  background: var(--paper); border-right: 1px solid var(--rule); overflow-y: auto;
  padding: 14px 10px 24px max(10px, env(safe-area-inset-left, 0px));
  transition: transform .2s ease, visibility 0s linear 0s; }
.h-grp { padding: 8px 0; border-bottom: 1px solid var(--sand); display: flex; flex-direction: column; gap: 2px; }
.h-grp:last-of-type { border-bottom: 0; }
.h-gt { padding: 8px 14px 4px; font-size: 0.74rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.h-side nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 14px; border-radius: var(--radius-pill);
  text-decoration: none; color: var(--ink); font-size: 0.95rem; line-height: 1.25; }
.h-side nav a:hover { background: var(--oak); }
.h-side nav a.h-on { background: var(--ink); color: var(--white); font-weight: 700; }
.h-side nav a svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--navy); }
.h-side nav a.h-on svg { color: var(--white); }
.h-side .h-m-only { display: none; }
.h-legal { padding: 14px 14px 0; font-size: 0.82rem; color: var(--muted); }
.h-legal a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 12px; color: var(--muted); text-decoration: underline; }
.h-scrim { display: none; }

/* Desktop: the menu button folds the menu away */
body.h-collapsed .h-side { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
body.h-collapsed .h-shell { margin-left: 0; }

/* ---------- Page shell (main + closing band + site footer sit right of the menu) ---------- */
.h-shell { margin-left: var(--sidebar-width); padding-top: var(--header-height); transition: margin-left .2s ease; }
.h-wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.h-sec { padding: var(--space-7) 0; }
.h-page h1, .h-page h2, .h-page h3 { text-wrap: balance; margin: 0; color: inherit; font-family: var(--font-sans); text-align: left; }
.h-sec h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; }
.h-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.h-more { font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--orange); padding: 16px 0 2px; white-space: nowrap; }
.h-rule { border: 0; border-top: 1px solid var(--sand); margin: 0; }
.h-empty { color: var(--muted); margin: 0; }
.h-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.h-sub { margin: 0; color: var(--muted); font-size: 0.98rem; } /* CLO 10-Nov label */

/* 1. Hero: full-width band in the footer blue (darkened to #2c7cb3 for white text, 4.5:1), left-aligned, big type */
.h-hero-band { background: var(--hero-blue); color: var(--white); }
.h-hero { padding: 32px 0 28px; display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: center; } /* CMO 9-Nov: about half height */
.h-hero-text { min-width: 0; }
.h-hero--plain { display: block; padding-bottom: 8px; } /* /apps/ page: text only, no drawing */
/* Flat geometric "open book" drawing from v1 (pure CSS, no image file) */
.h-art { position: relative; aspect-ratio: 1; max-width: 220px; width: 100%; justify-self: end; }
.h-art div { position: absolute; border: 2px solid var(--ink); }
.h-a1 { left: 0; top: 8%; width: 46%; height: 70%; background: var(--navy); border-radius: 6px 0 0 6px; }
.h-a2 { left: 46%; top: 8%; width: 46%; height: 70%; background: var(--white); border-radius: 0 6px 6px 0; }
.h-a2::before { content: ""; position: absolute; left: 18%; top: 16%; width: 64%; height: 10px; background: var(--ink);
  box-shadow: 0 22px 0 var(--ink), 0 44px 0 var(--ink); } /* three flat text lines, not a drop shadow */
.h-a3 { left: 46%; top: 8%; width: 30%; height: 70%; background: var(--orange); transform-origin: left center;
  transform: perspective(600px) rotateY(-38deg); border-radius: 0 6px 6px 0; }
.h-a4 { right: 0; bottom: 0; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--art-yellow); }
.h-a5 { left: 6%; bottom: 2%; width: 22%; aspect-ratio: 1; background: var(--art-sky); }
.h-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fern); font-size: 0.95rem; }
.h-eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--fern); flex-shrink: 0; }
.h-hero-band .h-eyebrow { color: var(--ink); background: var(--white); padding: 4px 14px 4px 12px; border-radius: var(--radius-pill); }
.h-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.h-hero h1 { margin-top: 12px; font-size: clamp(1.9rem, 3.2vw, 2.6rem); line-height: 1.1; font-weight: 900; letter-spacing: -0.8px; max-width: 24ch; }
.h-hero-band .h-hero h1 { color: var(--white); }
.h-hero p { font-size: 1.1rem; color: var(--muted); max-width: 52ch; margin: 10px 0 0; }
.h-hero-band .h-hero p { color: var(--white); }
.h-hero-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.h-hero-band .h-btn-main { border-color: var(--white); }
.h-hero-band .h-btn-line { background: transparent; color: var(--white); border-color: var(--white); }
.h-hero-band .h-btn-line:hover { background: rgba(255, 255, 255, .14); }
.h-stat { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.h-stat b { color: var(--ink); }
.h-hero-band .h-stat, .h-hero-band .h-stat b { color: var(--white); }
.h-hero-band :focus-visible { outline-color: var(--white); }

/* 2. Start cards */
.h-start { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.h-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius-card); background: var(--white); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: background .15s, border-color .15s; }
.h-card:hover { background: var(--oak); border-color: var(--rule); }
.h-well { width: 48px; height: 48px; border-radius: var(--radius-well); background: var(--oak); color: var(--navy); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.h-card:hover .h-well { background: var(--white); }
.h-well svg { width: 24px; height: 24px; }
.h-card > span:last-child { display: flex; flex-direction: column; gap: 6px; }
.h-card strong { font-size: 1.08rem; }
.h-card .h-t { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* 3. Featured flipbooks */
.h-books { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.h-browse { margin: 18px 0 0; }
.h-browse .h-more { display: inline-flex; align-items: flex-end; min-height: 44px; padding: 0 0 2px; }
.h-bk { text-decoration: none; color: var(--ink); min-width: 0; }
.h-cover { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-cover); border: 1px solid var(--line); overflow: hidden; background: var(--oak); }
.h-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.h-bk b { display: block; margin-top: 10px; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-bk:hover b { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.h-by { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 0.85rem; }
.h-by > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* 4. Explore hubs */
.h-hubs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h-hub { display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--oak); text-decoration: none; color: var(--ink);
  overflow: hidden; transition: background .15s; }
.h-hub:hover { background: var(--sand); }
.h-strip { display: flex; gap: 10px; padding: 22px 22px 0; }
.h-strip img { flex: 1; min-width: 0; width: 30%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--white); }
.h-strip-icon { align-items: center; justify-content: center; min-height: 140px; color: var(--navy); }
.h-strip-icon svg { width: 56px; height: 56px; }
.h-hub-body { display: flex; flex-direction: column; padding: 18px 22px 22px; margin-top: auto; }
.h-hub-body strong { font-size: 1.1rem; }
.h-hub-body > span { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.h-hub-body em { align-self: flex-start; margin-top: 12px; font-style: normal; font-weight: 700; border-bottom: 2px solid var(--orange); }

/* 5. Share it your way: columns under a rule, no cards */
/* 5. Share it your way: columns under a rule, no cards */
/* White cards on an orange panel; navy icon discs; solid tags: fern = all plans, navy = paid */
/* CMO 10-Nov: navy panel (22px corners), statement left, six cards right in 3 x 2; tags pinned to the card bottom */
.h-sharebox { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 32px; align-items: center;
  padding: 36px; border-radius: var(--radius-panel); background: var(--navy); color: var(--white); }
.h-share-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.h-kicker { font-size: 0.8rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy-label); } /* 7.2:1 on navy */
.h-sharebox h2 { color: var(--white); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.h-share-intro p { margin: 0; color: var(--navy-text); font-size: 1.02rem; line-height: 1.6; }  /* 8.6:1 on navy */
.h-share-intro .h-btn-line { margin-top: 6px; color: var(--white); border-color: var(--white); }
.h-share-intro .h-btn-line:hover { background: rgba(255, 255, 255, .12); }
.h-sharebox :focus-visible { outline-color: var(--focus); }
.h-share { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.h-sh { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px; border-radius: 12px; background: var(--white); color: var(--ink); min-width: 0; }
.h-sh-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.h-sh-ic svg { width: 20px; height: 20px; }
.h-sh strong { font-size: 1.02rem; }
.h-sh p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.h-tag { display: inline-block; margin-top: auto; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 700; color: var(--white); }
.h-sh p { margin-bottom: 10px; } /* gap above the tag; the tag itself sits at the bottom (margin-top: auto) */
.h-tag-free { background: var(--fern); }  /* white on fern 7.5:1 */
.h-tag-paid { background: var(--navy); }  /* white on navy 11:1 */

/* 6. Free tools: plain rows */
.h-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--rule); }
.h-tool { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 0; border-bottom: 1px solid var(--sand); text-decoration: none; color: var(--ink); }
.h-tool svg { width: 24px; height: 24px; color: var(--navy); flex-shrink: 0; }
.h-tool > span { display: flex; flex-direction: column; min-width: 0; }
.h-tool strong { font-size: 1rem; }
.h-tool > span > span { color: var(--muted); font-size: 0.88rem; }
.h-tool:hover strong { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* 7. Tips and guides: image + text, no card box */
.h-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.h-post { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.h-post-img { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius-well); border: 1px solid var(--line); background: var(--oak); }
.h-post-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.h-post strong { font-size: 1.05rem; line-height: 1.35; }
.h-post > span:last-child { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.h-post:hover strong { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* 8. Closing band (fern), outside the content column, directly above the footer */
.h-band { background: var(--fern); color: var(--white); margin-top: 28px; }
.h-band .h-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 52px; padding-bottom: 52px; }
.h-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.4px; line-height: 1.2; }
.h-band p { margin: 6px 0 0; color: var(--fern-text); }
.h-band-acts { display: flex; gap: 12px; flex-wrap: wrap; }
.h-band .h-btn-line { color: var(--white); border-color: var(--white); }
.h-band .h-btn-line:hover { background: rgba(255, 255, 255, .12); }

/* Free tools page (/apps/) */
.h-page-title { font-size: clamp(2.2rem, 4.8vw, 3.2rem); line-height: 1.08; font-weight: 900; letter-spacing: -1.2px; }
.h-lead { color: var(--muted); font-size: 1.1rem; margin: 10px 0 0; max-width: 46ch; }

/* ---------- Top bar on OLD pages (includes/public_header.php -> fflipp_h_header(..., 'bar')) ----------
   Order 0 stage 2 (11-Nov-2026). The header + menu sit inside <div class="ff-bar">. The wrapper keeps 68px free for the
   fixed bar; the menu is closed on EVERY screen size and opens over the page (CMO 11-Nov). The old page's own
   stylesheet stays in charge of everything outside .ff-bar. */
.ff-bar { height: var(--header-height); margin: 0; padding: 0; text-align: left; color: var(--ink);
  font: 400 17px/1.6 var(--font-sans); letter-spacing: normal; }
.ff-bar *, .ff-bar *::before, .ff-bar *::after { box-sizing: border-box; }
.ff-bar svg { fill: currentColor; }
.ff-bar :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.ff-bar .h-hd, .ff-bar .h-side { margin: 0; float: none; box-shadow: none; border-radius: 0; text-align: left; }
.ff-bar .h-side nav { display: block; position: static; width: auto; height: auto; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.ff-bar .h-hd { flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; } /* free tool pages style every <header> */
.ff-bar .h-search { margin: 0 auto; padding: 0; box-shadow: none; flex-direction: row; gap: 0; } /* ... and every <form> */
.ff-bar .h-search input { width: auto; border-radius: 0; box-shadow: none; font: inherit; }
.ff-bar .h-search button, .ff-bar .h-menu { box-shadow: none; min-width: 0; font: inherit; }
.ff-bar .h-side { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
body.h-open .ff-bar .h-side { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s linear 0s; }
body.h-open .ff-bar .h-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 33, 43, .4); z-index: 140; }
#h-main:focus { outline: none; } /* skip-link target */
@media (prefers-reduced-motion: reduce) {
  .ff-bar *, .ff-bar *::before, .ff-bar *::after { transition: none !important; }
}

/* ---------- Dashboard top bar (includes/admin_header.php, <header class="header ff-dash">) ----------
   Order 0 stage 4 (11-Nov-2026, CMO 11-Nov): the bar keeps its own parts (credits, bell, profile menu); only colours,
   type and the logo change. Flat: no shadows, no gradients. These rules sit on top of login/css/admin_style.css.
   No box-sizing reset here on purpose: the upgrade and credit pop-ups live inside this <header>. */
.header.ff-dash { background: var(--paper); box-shadow: none; border-bottom: 1px solid var(--rule); min-height: var(--header-height);
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); gap: 12px;
  color: var(--ink); font-family: var(--font-sans); }
.ff-dash :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.ff-dash .logo .h-logo { min-height: 48px; }
.ff-dash .logo .h-logo-img { height: 28px; width: auto; display: block; }
/* Profile button */
.ff-dash .menu-btn { width: 48px; height: 48px; padding: 0; background: var(--white); border: 1px solid var(--rule); }
.ff-dash .menu-btn:hover, .ff-dash .dropdown:hover .menu-btn { background: var(--oak); }
.ff-dash .header-avatar { width: 40px; height: 40px; }
.ff-dash .header-avatar.default-avatar { background: var(--sand); color: var(--navy); }
/* Credits pill */
.ff-dash .credit-balance-widget a { min-height: 40px; background: var(--white); border: 1px solid var(--line); box-shadow: none; transform: none; }
.ff-dash .credit-balance-widget a:hover { background: var(--oak); border-color: var(--rule); box-shadow: none; transform: none; }
.ff-dash .credit-balance-widget .credit-icon-svg, .ff-dash .credit-balance-widget a:hover .credit-icon-svg { fill: var(--navy); }
.ff-dash .credit-amount { color: var(--ink); }
.ff-dash .credit-label { color: var(--muted); }
.ff-dash .buy-plus, .ff-dash .credit-balance-widget a:hover .buy-plus { background: var(--navy); color: var(--white); }
/* Notification bell */
.ff-dash .notif-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.ff-dash .notif-btn:hover { background: var(--oak); color: var(--ink); }
.ff-dash .notif-dropdown { box-shadow: none; border: 1px solid var(--rule); border-radius: var(--radius-well); overflow: hidden; color: var(--ink); }
.ff-dash .notif-header { background: var(--oak); border-bottom: 1px solid var(--sand); border-radius: 0; }
.ff-dash .notif-item { color: var(--ink); }
.ff-dash .notif-item:hover { background: var(--oak); }
.ff-dash .notif-msg, .ff-dash .notif-date, .ff-dash .notif-empty { color: var(--muted); }
/* Profile menu */
.ff-dash .dropdown-content { box-shadow: none; border: 1px solid var(--rule); border-radius: var(--radius-card); }
.ff-dash .dropdown-header { border-bottom: 1px solid var(--sand); }
.ff-dash .dropdown-header .user-info strong { color: var(--ink); }
.ff-dash .dropdown-header .user-info span { color: var(--muted); }
.ff-dash .dropdown-content a { color: var(--ink); }
.ff-dash .dropdown-content a:hover { background: var(--oak); color: var(--ink); }
.ff-dash .menu-icon, .ff-dash .dropdown-content a:hover .menu-icon { fill: var(--navy); }
.ff-dash .dropdown-content a.logout-link, .ff-dash .dropdown-content a.logout-link:hover { color: var(--ink); } /* guide v1.3: Log out is an ordinary ink link (one red only) */
.ff-dash .dropdown-content a.logout-link .menu-icon, .ff-dash .dropdown-content a.logout-link:hover .menu-icon { fill: var(--navy); }
.ff-dash .dropdown-content a.header-upgrade-btn { display: inline-flex; align-items: center; min-height: 28px; margin-left: 8px; padding: 2px 14px;
  border-radius: var(--radius-pill); background: var(--orange); color: var(--ink); font-size: 0.8rem; font-weight: 800; line-height: 1.4; text-decoration: none; }
.ff-dash .dropdown-content a.header-upgrade-btn:hover { background: var(--orange-hover); color: var(--ink); }
@media (max-width: 768px) {
  .header.ff-dash { padding: 0 12px; gap: 6px; }
  .ff-dash .menu-btn { width: 44px; height: 44px; }
  .ff-dash .header-avatar { width: 36px; height: 36px; }
  .ff-dash .notif-dropdown { top: var(--header-height); border-radius: 0; border-left: 0; border-right: 0; }
}

/* ---------- Dashboard pop-ups (includes/admin_header.php: profile menu icons, notifications, credit and upgrade pop-ups) ----------
   Order 0 stage 4b (12-Nov-2026, CMO 12-Nov + Style Guide v1.1): navy icons instead of emoji and mixed colours, token
   colours, flat (no shadows), left-aligned, standing-alone text links. Wording, amounts and prices unchanged.
   "!important" only where the header prints inline colours (menu icons, notification icons). */
.ff-dash .dropdown-content a:not(.logout-link) svg { fill: var(--navy) !important; }
/* Notifications */
.ff-dash .notif-badge { background: var(--error); color: var(--white); }
.ff-dash .notif-header strong { color: var(--ink); }
.ff-dash .notif-item svg { fill: var(--navy) !important; }
.ff-dash .notif-item.unread { border-left: 3px solid var(--navy); }
.ff-dash .notif-title { color: var(--ink); font-weight: 700; }
.ff-dash .notif-empty { margin: 0; color: var(--muted); font-style: normal; text-align: left; }
.ff-dash .notif-footer { padding: 0 15px; background: var(--white); border-top: 1px solid var(--sand); text-align: left; }
.ff-dash .notif-mark-all, .ff-dash .notif-all-link { align-items: flex-end; min-height: 44px; padding: 0 0 2px; color: var(--ink); font-size: 0.9rem;
  font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); cursor: pointer; }
.ff-dash .notif-all-link { display: inline-flex; }
.ff-dash .notif-mark-all { min-height: 0; } /* sits in the header row */
/* Pop-up windows (credit choice + upgrade) */
.ff-dash .modal-overlay { background: rgba(20, 33, 43, .5); }
.ff-dash .modal-content, .ff-dash .modal-content *, .ff-dash .modal-content *::before, .ff-dash .modal-content *::after { box-sizing: border-box; }
.ff-dash .modal-content { padding: 28px; background: var(--white); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-panel);
  box-shadow: none; font: 400 17px/1.6 var(--font-sans); text-align: left; }
.ff-dash .modal-content h3 { margin: 0 48px 20px 0; color: var(--ink); font: 800 1.4rem/1.25 var(--font-sans); letter-spacing: -0.3px; text-align: left; }
.ff-dash .modal-content p { color: var(--muted); }
.ff-dash .modal-close-btn { top: 12px; right: 12px; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: var(--ink); font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center; }
.ff-dash .modal-close-btn:hover { background: var(--oak); }
.ff-dash .ff-credit-modal { max-width: 520px; }
.ff-dash .ff-credit-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ff-dash .creation-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: none; transform: none; text-align: left; text-decoration: none; transition: background .15s; }
.ff-dash .creation-card:hover { background: var(--oak); border-color: var(--rule); box-shadow: none; transform: none; }
.ff-dash .ff-well { width: 48px; height: 48px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-well); background: var(--oak); color: var(--navy); }
.ff-dash .creation-card:hover .ff-well { background: var(--white); }
.ff-dash .ff-well svg { width: 24px; height: 24px; fill: currentColor; }
.ff-dash .creation-card h4 { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.ff-dash .creation-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ff-dash .ff-credit-balance { margin: 18px 0 0; font-size: 15px; }
.ff-dash .ff-credit-balance strong { color: var(--ink); }
.ff-dash #upgrade-modal .modal-content { max-width: 440px; text-align: left; }
.ff-dash #upgrade-modal .ff-well { margin-bottom: 16px; }
.ff-dash #upgrade-modal h3 { margin-bottom: 8px; }
.ff-dash #upgrade-modal p { margin: 0 0 22px; line-height: 1.6; }
.ff-dash #upgrade-modal .modal-actions { justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
.ff-dash #upgrade-modal .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-pill); font: 800 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer; }
.ff-dash #upgrade-modal .btn-primary { background: var(--orange); color: var(--ink); border: 2px solid transparent; }
.ff-dash #upgrade-modal .btn-primary:hover { background: var(--orange-hover); }
.ff-dash #upgrade-modal .btn-secondary { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.ff-dash #upgrade-modal .btn-secondary:hover { background: var(--oak); }
@media (max-width: 560px) {
  .ff-dash .modal-content { padding: 22px 18px; }
  .ff-dash .ff-credit-modal, .ff-dash #upgrade-modal .modal-content { max-width: calc(100% - 24px); }
  .ff-dash .ff-credit-choices { grid-template-columns: 1fr; }
  .ff-dash #upgrade-modal .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ff-dash .modal-overlay, .ff-dash .modal-content, .ff-dash .creation-card { transition: none; }
}

/* ---------- Plain bar (includes/plain_header.php, <header class="header ff-dash ff-plain">) ----------
   Order 0 stage 5 (12-Nov-2026, CMO 11-Nov): sign-up, login and checkout pages show the logo only. The bar takes its
   colours from the dashboard bar rules above; these lines make it work on pages without login/css/admin_style.css
   and keep the word "Fflipp" visible on phones (there is nothing else on this bar). */
.header.ff-plain { display: flex; align-items: center; justify-content: flex-start; position: sticky; top: 0; z-index: 100; margin: 0; }
.header.ff-plain .h-logo-text { display: inline; }

/* ---------- Restyled page body on a page that keeps the dashboard bar (<body class="ff-page"> + <main class="ff-main">) ----------
   12-Nov-2026: first used by login/verification_success.php. The page still loads login/css/admin_style.css for the bar;
   the body background picture of that stylesheet is switched off here. Existing parts only: h-wrap, h-sec,
   h-page-title, h-lead, h-btn. The box-sizing rule covers <main> only (the pop-ups inside the bar keep their own). */
body.ff-page { margin: 0; background: var(--paper); color: var(--ink); }
.ff-main { color: var(--ink); text-align: left; font: 400 17px/1.6 var(--font-sans); letter-spacing: normal; }
.ff-main *, .ff-main *::before, .ff-main *::after { box-sizing: border-box; }
.ff-main :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.ff-main h1, .ff-main h2 { margin: 0; color: var(--ink); font-family: var(--font-sans); text-align: left; text-wrap: balance; }
.ff-main h2 { margin-top: var(--space-6); font-size: 1.55rem; font-weight: 800; letter-spacing: -0.4px; line-height: 1.25; }
.ff-main p { max-width: 60ch; }
.ff-main .h-hero-acts { margin-top: var(--space-5); }

/* ---------- Forms and messages (Style Guide v1.1, section 6b) - <body class="ff-page ff-auth"> ----------
   Order 0 stage 5 (12-Nov-2026): sign-up, login, password and checkout-confirmation pages. LOOK ONLY: these rules sit
   on top of login/css/admin_style.css, login/css/edit_form_style.css and the small style blocks printed by
   includes/social_signup.php and includes/checkout_terms.php. No wording, field, tick-box or date-of-birth layout is
   changed. "!important" is used only where an old stylesheet or an inline style uses it first.
   Icons: Material Design Icons (same set and licence as the menu), embedded here - no extra request. */
body.ff-auth main.container, body.ff-auth main.co-wrap { max-width: var(--content-max); margin: 0 auto; padding: var(--space-6) 16px var(--space-7);
  color: var(--ink); text-align: left; font: 400 17px/1.6 var(--font-sans); letter-spacing: normal; }
body.ff-auth main, body.ff-auth main *, body.ff-auth main *::before, body.ff-auth main *::after { box-sizing: border-box; }
body.ff-auth main .form-container, body.ff-auth main .co-card { max-width: 420px; margin: 0; padding: 0 !important; background: none; border: 0; border-radius: 0; box-shadow: none; }
body.ff-auth main .co-card { max-width: 600px; }
body.ff-auth main h1 { margin: 0; color: var(--ink); font: 800 clamp(1.75rem, 4vw, 2.1rem)/1.15 var(--font-sans) !important; letter-spacing: -0.4px; text-align: left; text-wrap: balance; }
body.ff-auth main .form-header { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0 0 var(--space-5); padding: 0; border: 0; text-align: left; }
body.ff-auth main p { margin: 0 0 var(--space-3); }
body.ff-auth main .form-description { margin: 0 0 var(--space-5); color: var(--muted); font-size: 1rem; text-align: left; }
/* Links: inside a sentence = navy underlined; standing alone = ink, bold, 2px orange underline */
body.ff-auth main a, body.ff-auth main .checkbox-section label a { color: var(--navy); font-weight: inherit; text-decoration: underline; border: 0; }
body.ff-auth main a:hover, body.ff-auth main .checkbox-section label a:hover { color: var(--ink); }
body.ff-auth main .form-header a, body.ff-auth main .forgot-password-link, body.ff-auth main .co-card form > a { display: inline-flex; align-items: flex-end;
  min-height: 44px; padding: 0 0 2px; color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--orange); }
body.ff-auth main .forgot-password-link { display: flex; width: fit-content; margin: 0 0 var(--space-5); }
body.ff-auth main .message-link { display: inline; margin: 0; font-weight: inherit; }
/* Two-tone focus ring: 2px ink line + 3px orange ring outside it */
body.ff-auth main :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-ink); }
/* Field groups, labels, fields */
body.ff-auth main fieldset { min-width: 0; margin: 0 0 var(--space-5); padding: 0; border: 0; }
body.ff-auth main legend { margin: 0 0 var(--space-3); padding: 0; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
body.ff-auth main .form-section { margin: 0 0 var(--space-4); }
body.ff-auth main .form-section > label, body.ff-auth main .su-label-row label { display: block; margin: 0 0 6px; color: var(--ink); font-size: 15px !important; font-weight: 700 !important; line-height: 1.4; }
body.ff-auth main .su-label-row { align-items: center; margin: 0 0 6px; }
body.ff-auth main .su-label-row label { margin: 0; }
body.ff-auth main .text-input, body.ff-auth main .dob-container select { display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px !important;
  background-color: var(--white); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-well); box-shadow: none;
  font: 400 17px/1.2 var(--font-sans) !important; transition: none; }
body.ff-auth main .dob-container { display: flex; gap: 10px; }
body.ff-auth main .dob-container select { flex: 1; min-width: 0; padding: 0 8px !important; }
body.ff-auth main .text-input:focus, body.ff-auth main .dob-container select:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink);
  outline: 3px solid var(--focus); outline-offset: 0; }
body.ff-auth main [aria-invalid="true"] { border-color: var(--error) !important; box-shadow: inset 0 0 0 1px var(--error); }
body.ff-auth main .char-limit-note { margin: 6px 0 0; color: var(--muted); font-size: 15px !important; text-align: left; }
/* Message under a field */
body.ff-auth main .su-msg { display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0; color: var(--error); font-size: 15px; line-height: 1.5; }
body.ff-auth main .su-msg:empty { display: none; }
body.ff-auth main .su-msg::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 2px; background: var(--error);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Tick-box rows: 22px box, 2px ink border, 6px corners; ticked = navy with a white tick; the label fills the row */
body.ff-auth main .form-section.checkbox-section, body.ff-auth main .su-tick, body.ff-auth main .su-mkt, body.ff-auth main .co-tick { display: flex;
  align-items: flex-start; gap: 12px; min-height: 44px; margin: 0 0 var(--space-2); padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--ink); font-size: 1rem; line-height: 1.5; }
body.ff-auth main .su-tick { margin-top: 18px; }
body.ff-auth main .su-mkt { margin-top: var(--space-3); }
body.ff-auth main .co-tick { margin: 18px 0; cursor: pointer; }
body.ff-auth main input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: 0 0 22px; width: 22px; height: 22px; margin: 2px 0 0; padding: 0;
  background: var(--white) center / 18px no-repeat; border: 2px solid var(--ink); border-radius: 6px; cursor: pointer; }
body.ff-auth main input[type="checkbox"]:checked { background-color: var(--navy); border-color: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z'/%3E%3C/svg%3E"); }
body.ff-auth main .checkbox-section label, body.ff-auth main .su-tick label, body.ff-auth main .su-mkt label { flex: 1; min-height: 44px; margin: 0;
  color: var(--ink); font-size: 17px !important; font-weight: 400 !important; line-height: 1.5; cursor: pointer; }
body.ff-auth main .su-mkt, body.ff-auth main .su-mkt label, body.ff-auth main #marketing_opt_in + label { color: var(--muted); font-size: 15px !important; } /* optional marketing box */
/* Main button: one orange pill per form */
body.ff-auth main .save-btn, body.ff-auth main .co-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 0;
  min-height: 48px; margin: 0; padding: 0 26px !important; background: var(--orange); color: var(--ink) !important; border: 2px solid transparent;
  border-radius: var(--radius-pill); box-shadow: none; font: 800 1rem/1.2 var(--font-sans) !important; text-decoration: none; cursor: pointer; transition: background .15s; }
body.ff-auth main .save-btn:hover, body.ff-auth main .co-btn:hover { background: var(--orange-hover); }
body.ff-auth main .form-actions { margin: var(--space-5) 0 0; text-align: left !important; }
body.ff-auth main .form-actions br { display: none; }
body.ff-auth main .recaptcha-section { justify-content: flex-start; margin: var(--space-4) 0; }
/* Message boxes: icon + ink text */
body.ff-auth main .message, body.ff-auth main .su-banner, body.ff-auth main .co-err { display: block; position: relative; margin: 0 0 var(--space-5);
  padding: 12px 14px 12px 44px; color: var(--ink); background: var(--info-bg); border: 1px solid var(--navy); border-radius: var(--radius-well);
  box-shadow: none; font-size: 1rem; line-height: 1.5; text-align: left; }
body.ff-auth main .message::before, body.ff-auth main .su-banner::before, body.ff-auth main .co-err::before { content: ""; position: absolute; left: 14px; top: 14px;
  width: 20px; height: 20px; background: var(--navy); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E") center / contain no-repeat; }
body.ff-auth main .message.error, body.ff-auth main .co-err { background: var(--error-bg); border-color: var(--error); }
body.ff-auth main .message.error::before, body.ff-auth main .co-err::before { background: var(--error); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z'/%3E%3C/svg%3E"); }
body.ff-auth main .message.success { background: var(--success-bg); border-color: var(--fern); }
body.ff-auth main .message.success::before { background: var(--fern); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z'/%3E%3C/svg%3E"); }
/* Social sign-in buttons: white pill, 1px rule border; the provider logos are not touched */
body.ff-auth main .social-login-container { align-items: stretch; gap: var(--space-3); margin: 0 0 var(--space-5); }
body.ff-auth main .social-login-btn { width: 100%; min-height: 48px; padding: 6px 20px; background: var(--white); color: var(--ink); border: 1px solid var(--rule);
  border-radius: var(--radius-pill); box-shadow: none; transform: none; font: 700 1rem/1.25 var(--font-sans); text-decoration: none; transition: background .15s; }
body.ff-auth main .social-login-btn:hover { background: var(--oak); color: var(--ink); border-color: var(--rule); box-shadow: none; transform: none; }
body.ff-auth main .form-separator-text { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0; color: var(--muted); text-align: left; }
body.ff-auth main .form-separator-text::before { display: none; }
body.ff-auth main .form-separator-text::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
body.ff-auth main .form-separator-text span { padding: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: lowercase; } /* CMO 12-Nov: 15px muted "or" */
/* Date of birth "Why do we ask?" note and the line under the form (layout as approved by the CLO, colours only) */
body.ff-auth main .dob-why { font-size: 15px; }
body.ff-auth main .dob-why summary { color: var(--navy); text-decoration: underline; }
body.ff-auth main .dob-why-box { background: var(--white); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-well); box-shadow: none; }
body.ff-auth main .dob-why-x { color: var(--ink); }
body.ff-auth main .su-foot { margin: 18px 0 0; font-size: 1rem; text-align: left; }
body.ff-auth main .limit-reached-message { padding: 0 !important; text-align: left; }
body.ff-auth main .limit-reached-message p { max-width: 60ch; margin: 0 0 var(--space-3); color: var(--ink); line-height: 1.6; }
/* Checkout confirmation (includes/checkout_terms.php) */
body.ff-auth main .co-card h1 { margin-bottom: var(--space-4); }
body.ff-auth main .co-plan { margin: var(--space-4) 0 var(--space-2); color: var(--ink); font-weight: 800; }
body.ff-auth main .co-sum { padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-well); line-height: 1.55; }
body.ff-auth main .co-small { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 680px) {
  body.ff-auth main.container, body.ff-auth main.co-wrap { padding-top: var(--space-5); }
  body.ff-auth main .save-btn, body.ff-auth main .co-btn { width: 100% !important; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.ff-auth main * { transition: none !important; }
}

/* ---------- Site footer (includes/global_footer.php, <footer class="site-footer ff-foot">) - EVERY page ----------
   Order 0 stage 1 (11-Nov-2026). The footer's content, links and wording are unchanged; this is the look only.
   These rules sit on top of the old footer styles (homepage_style.css / freepage_footer_style.css / page styles),
   so each value an old stylesheet may set is set again here. */
.ff-foot, .ff-foot *, .ff-foot *::before, .ff-foot *::after { box-sizing: border-box; }
footer.site-footer.ff-foot { margin: 48px 0 0; padding: 40px 0 32px; background: var(--footer-blue); color: var(--white);
  border: 0; border-radius: 0; box-shadow: none; text-align: left; font: 400 0.92rem/1.6 var(--font-sans); letter-spacing: normal; }
body.h-page footer.site-footer.ff-foot { margin: 0; } /* redesigned pages: the closing band sits directly above */
.site-footer.ff-foot .footer-content.container { max-width: var(--content-max); width: auto; margin: 0 auto; background: none; box-shadow: none;
  border: 0; border-radius: 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 18px; text-align: left; }
.site-footer.ff-foot .footer-social-links { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.site-footer.ff-foot .social-icon-link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--footer-circle); border: 0; color: var(--white); transform: none; transition: background .15s; } /* white icons 3.5:1 */
.site-footer.ff-foot .social-icon-link:hover { background: var(--orange); color: var(--white); transform: none; }
.site-footer.ff-foot .social-icon { width: 22px; height: 22px; }
.site-footer.ff-foot .footer-line-button { margin: 0; text-align: left; }
.site-footer.ff-foot .footer-line-button a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer.ff-foot .footer-links { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 0 22px;
  margin: 0; padding: 10px 0 0; border-top: 1px solid rgba(255, 255, 255, .35); width: 100%; }
.site-footer.ff-foot .footer-links a,
.site-footer.ff-foot .footer-links .fflipp-link-button { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0;
  color: var(--white); font: inherit; font-weight: 600; text-decoration: none; background: none; border: 0; cursor: pointer; }
.site-footer.ff-foot .footer-links a:hover,
.site-footer.ff-foot .footer-links .fflipp-link-button:hover { color: var(--white); text-decoration: underline;
  text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.site-footer.ff-foot p { margin: 0; padding: 0; color: var(--white); font: inherit; text-align: left; }
.site-footer.ff-foot .footer-dbip-credit { opacity: 1 !important; font-size: 0.8rem !important; margin: 0 !important; } /* inline style in the footer */
.site-footer.ff-foot .footer-dbip-credit a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-decoration: underline; }
.site-footer.ff-foot :focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 6px; } /* white ring: 4.5:1 on the blue */
/* Floating LINE / support buttons: flat (no drop shadow, no pulsing) on the redesigned pages only */
body.h-page .line-chat-btn, body.h-page .support-chat-btn { animation: none; }
body.h-page .line-chat-btn img, body.h-page .support-chat-btn img { filter: none; }
@media (max-width: 680px) {
  footer.site-footer.ff-foot { padding: 32px 0 28px; }
  .site-footer.ff-foot .footer-links { flex-direction: row; gap: 0 18px; }
  .site-footer.ff-foot .social-icon-link { width: 44px; height: 44px; }
  .site-footer.ff-foot .social-icon { width: 22px; height: 22px; }
  .site-footer.ff-foot .footer-content.container { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ff-foot *, .ff-foot *::before, .ff-foot *::after { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .h-sharebox { grid-template-columns: 1fr; gap: 24px; } /* statement above the cards */
  .h-books { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .h-side { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  body.h-open .h-side { transform: none; visibility: visible; transition: transform .2s ease, visibility 0s linear 0s; }
  body.h-open .h-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 33, 43, .4); z-index: 140; }
  .h-shell, body.h-collapsed .h-shell { margin-left: 0; }
  .h-start, .h-hubs, .h-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-hero { grid-template-columns: 1fr; gap: 24px; }
  .h-art { display: none; } /* tablet/phone: hero stays short, buttons stay above the fold */
}
@media (max-width: 680px) {
  .h-search, .h-login, .h-logo-text { display: none; }
  .h-acts { margin-left: auto; }
  .h-side .h-m-only { display: flex; }
  .h-hero { padding: 24px 0 24px; }
  .h-hero-acts .h-btn { width: 100%; }
  .h-start, .h-hubs, .h-tools, .h-posts { grid-template-columns: 1fr; }
  .h-sharebox { padding: 22px 14px; }
  .h-share { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .h-sh { padding: 14px 12px; }
  .h-card { flex-direction: row; align-items: center; gap: 16px; padding: 16px 18px; }
  .h-card .h-well { margin: 0; }
  .h-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-books > .h-bk:nth-child(n+7) { display: none; } /* CMO 9-Nov: 6 books on phones; "Browse all" link stays */
  .h-band-acts .h-btn { width: 100%; }
  .h-sec { padding: 32px 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.h-page *, body.h-page *::before, body.h-page *::after { transition: none !important; }
}


/* ---------- Two-tone focus ring on every redesigned part (Style Guide v1.2 section 10) ----------
   12-Nov-2026: a 2px focus-ink line (ink, or white on coloured bands) with the 3px orange ring outside it, so the ring is
   visible on paper, white AND the blue / navy / fern bands. Keyboard focus only (:focus-visible) - mouse clicks show nothing.
   Placed last on purpose so it wins over the older one-colour rules above. */
body.h-page :focus-visible, .ff-bar :focus-visible, .ff-dash :focus-visible, .ff-main :focus-visible,
.site-footer.ff-foot :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus-ink); border-radius: 6px; }
.h-search:focus-within { box-shadow: 0 0 0 2px var(--focus-ink); }
.h-hero-band, .h-sharebox, .h-band, .site-footer.ff-foot { --focus-ink: var(--white); }