/*
Theme Name: BAREX
Version: 2.0.0
Text Domain: barex
Description: SQE guides and news in the same frame as every public barex.uk page (the app's PublicPageShell, SiteFooter and guide styles).
*/

/* Public Barex pages are designed light and stay light in dark appearance,
   like the app's .public-doc pages. */
:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ffffff; color: #374151; font-family: "Roboto", system-ui, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }

.ps-root {
  --ps-cream: #f6f1e7;
  --ps-teal: #103736;
  --ps-ink: #0a2322;
  --ps-orange: #f97316;
  --ps-glow: #ffb067;
}

.ps-skip {
  position: absolute; z-index: 50; top: 0.5rem; left: 0.5rem;
  padding: 0.5rem 0.9rem; border-radius: 9999px;
  background: var(--ps-cream); color: var(--ps-teal); font-weight: 600;
  translate: 0 -200%;
}
.ps-skip:focus { translate: 0 0; outline: 2px solid var(--ps-orange); }

/* Logo lockup: the B mark followed by "arex"; --lockup-h is its height. */
.lockup { --lockup-h: 40px; display: inline-flex; align-items: center; height: var(--lockup-h); }
.lockup svg { flex: none; width: auto; height: var(--lockup-h); }

/* Nav */
.ps-nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  height: clamp(60px, 5.5vw, 76px);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: var(--ps-ink);
  border-bottom: 1px solid rgba(246, 241, 231, 0.08);
}
.ps-nav-logo { display: flex; flex: 0 1 auto; min-width: 0; min-height: 44px; align-items: center; color: var(--ps-cream); }
.ps-nav-logo .lockup { --lockup-h: clamp(30px, 2.6vw, 36px); opacity: 0.92; }
.ps-nav-links { display: flex; flex: none; align-items: center; gap: clamp(0.15rem, 0.8vw, 0.5rem); }
.ps-nav-link, .ps-nav-start {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ps-nav-link { color: rgba(246, 241, 231, 0.78); }
.ps-nav-link:hover { background: rgba(246, 241, 231, 0.08); color: var(--ps-cream); }
.ps-nav-start { margin-left: 0.25rem; padding: 0 1.05rem; background: var(--ps-cream); color: var(--ps-teal); }
.ps-nav-start:hover { background: #ffffff; }
.ps-nav a:focus-visible, .ps-crumbs a:focus-visible { outline: 2px solid var(--ps-orange); outline-offset: 3px; }
@media (max-width: 720px) { .ps-nav-wide { display: none; } }
@media (max-width: 400px) {
  .ps-nav-logo .lockup { --lockup-h: 28px; }
  .ps-nav-link, .ps-nav-start { padding: 0 0.7rem; font-size: 0.8rem; }
  .ps-nav-login { display: none; }
}

/* Phone menu: the wide links fold in here under 720px. */
.ps-menu { display: none; }
@media (max-width: 720px) { .ps-menu { display: block; } }
.ps-menu > summary { gap: 0.45rem; cursor: pointer; list-style: none; }
.ps-menu > summary::-webkit-details-marker { display: none; }
.ps-menu-icon, .ps-menu-icon::before, .ps-menu-icon::after { display: block; width: 14px; height: 1.5px; border-radius: 1px; background: currentColor; }
.ps-menu-icon { position: relative; }
.ps-menu-icon::before, .ps-menu-icon::after { content: ""; position: absolute; left: 0; }
.ps-menu-icon::before { top: -4.5px; }
.ps-menu-icon::after { top: 4.5px; }
.ps-menu[open] > summary { background: rgba(246, 241, 231, 0.1); color: var(--ps-cream); }
.ps-menu-panel {
  position: absolute; z-index: 40; top: calc(100% + 1px); right: 0; left: 0;
  margin: 0; padding: 0.5rem clamp(1rem, 3vw, 2.5rem) 1rem; list-style: none;
  background: var(--ps-ink); border-bottom: 1px solid rgba(246, 241, 231, 0.12);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
}
.ps-menu-panel a { display: block; padding: 0.8rem 0; border-bottom: 1px solid rgba(246, 241, 231, 0.08); color: rgba(246, 241, 231, 0.85); font-size: 1rem; font-weight: 600; }
.ps-menu-panel li:last-child a { border-bottom: 0; }
.ps-menu-panel a:hover { color: #ffa45c; }
.ps-menu a:focus-visible, .ps-menu summary:focus-visible { outline: 2px solid var(--ps-orange); outline-offset: 3px; }

/* Header: a still echo of the landing hero. */
.ps-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(2.25rem, 5vw, 4rem) 1.5rem clamp(2.25rem, 4.5vw, 3.5rem);
  background:
    radial-gradient(90% 120% at 88% 30%, rgba(249, 115, 22, 0.1) 0%, transparent 45%),
    radial-gradient(120% 140% at 80% 0%, #1b4f4d 0%, var(--ps-teal) 45%, var(--ps-ink) 100%);
  color: var(--ps-cream);
}
.ps-hero-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.ps-mark {
  position: absolute; z-index: 0; top: 50%;
  right: max(2rem, calc((100vw - 820px) / 2 - 22rem));
  width: auto; height: clamp(200px, 22vw, 300px); max-height: calc(100% - 3rem);
  translate: 0 -50%; overflow: visible;
  color: rgba(246, 241, 231, 0.13); pointer-events: none;
}
.ps-mark-accent { fill: var(--ps-orange); opacity: 0.85; filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.7)) drop-shadow(0 0 14px rgba(255, 176, 103, 0.4)); }
@media (max-width: 1150px) { .ps-mark { top: 1.5rem; right: 1.5rem; height: 120px; translate: none; opacity: 0.85; } }
@media (max-width: 720px) { .ps-mark { top: 1rem; right: 1rem; height: 68px; opacity: 0.75; } }

.ps-crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: 0.78rem; }
.ps-crumbs li { display: inline-flex; align-items: center; gap: 0.35rem; }
.ps-crumbs li + li::before { content: "/"; color: rgba(246, 241, 231, 0.3); }
.ps-crumbs a { color: rgba(246, 241, 231, 0.62); text-underline-offset: 3px; }
.ps-crumbs a:hover { color: var(--ps-cream); text-decoration: underline; }
.ps-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem;
  color: #ffa45c; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.ps-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ps-orange); box-shadow: 0 0 10px rgba(249, 115, 22, 0.9); }
.ps-title {
  max-width: 16ch; margin: 0;
  font-family: "Barlow Condensed", "Roboto", sans-serif;
  font-size: clamp(2.5rem, 6.4vw, 4.4rem); font-weight: 700; line-height: 0.95; letter-spacing: 0.005em;
  text-transform: uppercase; color: var(--ps-cream); text-wrap: balance;
}
.ps-title[data-compact] { max-width: 24ch; font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1; }
.ps-lead { max-width: 60ch; margin: 1.1rem 0 0; font-size: clamp(0.95rem, 1.2vw, 1.05rem); line-height: 1.6; color: rgba(246, 241, 231, 0.74); }
.ps-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.ps-meta li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: rgba(246, 241, 231, 0.6); }
.ps-meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ps-orange); }

/* The orange pill call to action used across barex.uk. */
.ps-action {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 0.5rem;
  height: 48px; padding: 0 1.4rem; border-radius: 9999px;
  background: var(--ps-orange); color: var(--ps-teal);
  font-size: 0.95rem; font-weight: 700; white-space: nowrap;
  transition: background-color 0.2s ease;
}
.ps-action:hover { background: var(--ps-glow); }
.ps-action:focus-visible { outline: 2px solid var(--ps-teal); outline-offset: 3px; }

/* Reading column */
.ps-body { width: 100%; max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem; }
@media (min-width: 640px) { .ps-body { padding-top: 3rem; } }
.ps-back { display: inline-block; margin-bottom: 2rem; color: #1a5250; font-size: 0.85rem; font-weight: 600; text-underline-offset: 2px; }
.ps-back:hover { text-decoration: underline; }

/* Article typography, as the app's guides and its Privacy and Terms pages. */
.blog-article { counter-reset: blog-section; color: #374151; overflow-wrap: break-word; }
.blog-article h2 {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 2.5rem 0 0.85rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e8f0ef;
  font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: #103736;
}
.blog-article h2::before {
  counter-increment: blog-section; content: counter(blog-section);
  display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 9999px; background: #103736; color: #ffffff;
  font-size: 0.78rem; font-weight: 700; line-height: 1;
}
.blog-article > h2:first-child, .blog-article > figure:first-child + h2 { margin-top: 0; }
.blog-article h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; font-weight: 700; color: #103736; }
.blog-article p, .blog-article ul, .blog-article ol { font-size: 1rem; line-height: 1.75; color: #374151; }
.blog-article p { margin-bottom: 1rem; }
.blog-article ul, .blog-article ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.blog-article ul { list-style: disc; }
.blog-article ol { list-style: decimal; }
.blog-article li { margin-bottom: 0.4rem; padding-left: 0.2rem; }
.blog-article li::marker { color: #1a5250; font-weight: 700; }
.blog-article a { color: #1a5250; text-decoration: underline; text-underline-offset: 2px; }
.blog-article a:hover { color: #103736; text-decoration-thickness: 2px; }
.blog-article strong { color: #103736; }
.blog-article code { padding: 0.1rem 0.35rem; border-radius: 0.25rem; background: #e8f0ef; color: #103736; font-size: 0.88em; }
.blog-article blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid #103736; border-radius: 0 0.5rem 0.5rem 0; background: #e8f0ef; }
.blog-article blockquote p:last-child { margin-bottom: 0; }
.blog-article figure, .blog-article .wp-block-image { margin: 1.75rem 0; }
.blog-article figure img { display: block; border-radius: 10px; }
.blog-article figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: #4b5563; }
.blog-featured { margin: 0 0 2rem; }
.blog-table-wrap, .blog-article .wp-block-table {
  overflow-x: auto; margin: 0.75rem 0 1.5rem;
  border: 1px solid #e5e7eb; border-radius: 0.5rem;
}
.blog-article table { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.9rem; color: #374151; }
.blog-article th, .blog-article td { padding: 0.75rem 1rem; border: 0; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.blog-article thead { background: #103736; color: #ffffff; }
.blog-article thead th { font-weight: 600; border-bottom: 0; }
.blog-article tbody tr:nth-child(odd) { background: #ffffff; }
.blog-article tbody tr:nth-child(even) { background: #e8f0ef; }
.blog-article tbody tr:last-child td { border-bottom: 0; }
.blog-article :focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }

/* Personalised SQE1 Coaching card, as on the app's guides. */
.cp {
  margin-top: 2.5rem; padding: 1.4rem 1.6rem;
  border: 1px solid #f1e2d1; border-top: 4px solid #f97316; border-radius: 14px;
  background: #faf9f5; color: #374151;
  box-shadow: 0 1px 2px rgba(16, 55, 54, 0.04), 0 12px 32px -18px rgba(16, 55, 54, 0.22);
}
@media (max-width: 560px) { .cp { padding: 1.2rem 1rem; } }
.cp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.1rem 1.5rem; }
.cp-text { flex: 1 1 18rem; min-width: 0; }
.sm-hours { display: flex; align-items: center; gap: 4px; height: 18px; margin-bottom: 0.55rem; }
.sm-hours i { width: 12px; height: 8px; border-radius: 3px; background: #f97316; }
.cp-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9a3f08; }
.cp-title { margin-top: 0.2rem; font-size: 1.3rem; font-weight: 800; line-height: 1.3; color: #103736; }
.cp-body { margin-top: 0.35rem; font-size: 0.95rem; line-height: 1.6; }
.cp-meta { margin-top: 0.45rem; font-size: 0.92rem; }
.cp-meta strong { color: #9a3f08; font-weight: 800; }
.cp-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.5rem;
  border-radius: 10px; background: #c6530d; color: #ffffff; font-size: 1rem; font-weight: 700; white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cp-button:hover { background: #ad470c; transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(173, 71, 12, 0.7); }
.cp-button:focus-visible { outline: 2px solid #103736; outline-offset: 3px; }
@media (max-width: 560px) { .cp-button { width: 100%; } }

/* Free account card */
.try-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
  margin-top: 2rem; padding: 1.4rem 1.6rem;
  border: 2px solid #cddedd; border-radius: 14px; background: #e8f0ef;
}
.try-card > div { flex: 1 1 18rem; min-width: 0; }
.try-title { font-family: "Barlow Condensed", "Roboto", sans-serif; font-size: 1.6rem; font-weight: 700; line-height: 1.05; text-transform: uppercase; color: #103736; }
.try-body { margin-top: 0.4rem; font-size: 0.95rem; line-height: 1.6; color: #374151; }
@media (max-width: 560px) { .try-card { padding: 1.2rem 1rem; } .try-card .ps-action { width: 100%; } }

.blog-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e5e7eb; }
.blog-pager a { max-width: 45%; color: #1a5250; font-size: 0.88rem; font-weight: 600; line-height: 1.45; text-underline-offset: 2px; text-wrap: balance; }
.blog-pager a[rel="next"] { margin-left: auto; text-align: right; }
.blog-pager a:hover { text-decoration: underline; }
@media (max-width: 560px) { .blog-pager a { max-width: none; } }

/* Guide list */
.info-box { margin-bottom: 2.5rem; padding: 1rem 1.25rem; border-left: 4px solid #103736; border-radius: 0 0.5rem 0.5rem 0; background: #e8f0ef; font-size: 0.92rem; line-height: 1.65; }
.info-box strong { color: #103736; }
.link-grid { margin-bottom: 2.5rem; }
.link-grid-explore { padding-top: 2rem; border-top: 1px solid #e5e7eb; }
.grid-label { margin-bottom: 0.75rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #103736; }
.grid-two, .grid-three, .post-list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.link-card { display: block; height: 100%; padding: 1rem; border: 1px solid #cddedd; border-radius: 10px; background: #ffffff; transition: border-color 0.2s ease, background-color 0.2s ease; }
.link-card-quiet { background: #f9fafb; }
.link-card:hover { border-color: #f97316; background: #fff9f0; }
.link-card-title { display: block; font-weight: 700; line-height: 1.35; color: #103736; }
.link-card-text { display: block; margin-top: 0.25rem; font-size: 0.85rem; line-height: 1.6; color: #4b5563; }
.post-card {
  display: flex; gap: 1.25rem; padding: 1.25rem 1.5rem;
  border: 1px solid #e5e7eb; border-left: 4px solid #103736; border-radius: 10px; background: #f9fafb;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.post-card:hover { border-left-color: #f97316; background: #e8f0ef; }
.post-card h2 { margin-bottom: 0.3rem; font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: #103736; }
.post-card p { font-size: 0.95rem; line-height: 1.7; color: #374151; }
.post-card-image { flex: 0 0 26%; align-self: flex-start; }
.post-card-image img { display: block; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.post-card-text { min-width: 0; }
.post-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin-top: 0.6rem; font-size: 0.82rem; color: #4b5563; }
.post-card-read { font-weight: 600; color: #c2410c; }
.link-card:focus-visible, .post-card:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }
@media (max-width: 560px) { .post-card { flex-direction: column; padding: 1.1rem 1.1rem 1.1rem 1.25rem; } .post-card-image { flex-basis: auto; } }
.empty a { color: #1a5250; text-decoration: underline; }

/* Site footer, shared with every barex.uk page. */
.site-footer {
  --sf-cream: #f6f1e7; --sf-ink: #0a2322; --sf-orange: #f97316;
  position: relative; display: flex; flex-direction: column;
  background: var(--sf-ink); color: rgba(246, 241, 231, 0.7);
  font-size: 0.875rem; user-select: none;
}
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; width: 100%; max-width: 1120px; margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem; }
@media (min-width: 900px) { .site-footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); } }
.site-footer-logo { display: inline-flex; color: var(--sf-cream); }
.site-footer-logo .lockup { --lockup-h: 36px; opacity: 0.9; }
.site-footer-brand p { max-width: 30ch; margin-top: 1rem; line-height: 1.55; color: rgba(246, 241, 231, 0.6); }
.site-footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
@media (min-width: 640px) { .site-footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-footer-heading { margin-bottom: 0.9rem; font-family: "Barlow Condensed", "Roboto", sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sf-cream); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 0.55rem; }
.site-footer a { display: inline-flex; align-items: center; gap: 0.4rem; color: rgba(246, 241, 231, 0.7); overflow-wrap: anywhere; transition: color 0.2s ease; }
.site-footer a:hover { color: #ffa45c; }
.site-footer a:focus-visible { outline: 2px solid var(--sf-orange); outline-offset: 3px; }
.site-footer-base {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
  width: 100%; max-width: 1120px; margin: 0 auto; padding: 1.25rem 1.5rem 1.75rem;
  border-top: 1px solid rgba(246, 241, 231, 0.08); font-size: 0.8rem; color: rgba(246, 241, 231, 0.6);
}
.site-footer-wave { height: 72px; overflow: hidden; }
.site-footer-wave > div { margin-top: -2px; background: var(--sf-cream); transition: transform 0.1s ease; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
