/* BananaIP Counsels - news and staff posts (server-rendered pages).
   Plain CSS, no framework. Mirrors the main site's fonts, colours and spacing. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #2B3A5C;
  --navy-dark: #1e2438;
  --navy-tint: #f0f3f7;
  --gold: #C8944A;
  --gold-text: #8a652e;
  --gold-light: #e7ab67;
  --text: #1F2937;
  --text-soft: #56637a;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.container--narrow {
  max-width: 47rem;
}

.container--medium {
  max-width: 58rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  position: relative;
}

.site-logo img {
  width: 113px;
  height: 40px;
}

.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
}

.site-nav__list a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current] {
  color: var(--gold-text);
}

.site-nav__list a[aria-current] {
  box-shadow: inset 0 -2px 0 var(--gold);
}

.site-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu__icon,
.site-menu__icon::before,
.site-menu__icon::after {
  display: block;
  width: 1.375rem;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.2s, background-color 0.2s;
}

.site-menu__icon {
  position: relative;
}

.site-menu__icon::before,
.site-menu__icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.site-menu__icon::before {
  top: -7px;
}

.site-menu__icon::after {
  top: 7px;
}

.site-menu[open] .site-menu__icon {
  background: transparent;
}

.site-menu[open] .site-menu__icon::before {
  transform: translateY(7px) rotate(45deg);
}

.site-menu[open] .site-menu__icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

.site-menu nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px -12px rgba(30, 36, 56, 0.25);
}

.site-menu__list {
  list-style: none;
  padding: 0.5rem 1rem 1rem;
}

.site-menu__list a {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.site-menu__list a:hover,
.site-menu__list a[aria-current] {
  background: var(--bg-soft);
  color: var(--gold-text);
}

@media (min-width: 1024px) {
  .site-header__inner {
    min-height: 5rem;
  }

  .site-logo img {
    width: 136px;
    height: 48px;
  }

  .site-nav {
    display: block;
  }

  .site-menu {
    display: none;
  }
}

/* ---------- shared pieces ---------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.5rem;
  color: var(--border-dark);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.breadcrumb [aria-current] {
  color: var(--text);
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  text-decoration: none;
}

a.eyebrow:hover {
  text-decoration: underline;
}

.text-link {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--gold-text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.button:hover {
  background: var(--navy-tint);
  border-color: var(--navy);
}

.section {
  padding-block: 2.5rem 3.5rem;
}

.section--ruled {
  border-top: 1px solid var(--border);
}

.section__title {
  margin-bottom: 1.5rem;
  font-size: 1.375rem;
  font-weight: 600;
}

.section__title::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.625rem;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- listing pages ---------- */

.page-head {
  padding-block: 1.5rem 0;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.page-head > .container > :last-child {
  margin-bottom: 2rem;
}

.page-head > .container > nav.tabs:last-child {
  margin-bottom: 0;
}

.page-head h1 {
  margin-top: 1.25rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  font-weight: 700;
}

.page-head__role {
  margin-top: 0.375rem;
  font-weight: 500;
  color: var(--gold-text);
}

.page-head__intro {
  max-width: 44rem;
  margin-top: 0.75rem;
  color: var(--text-soft);
}

.page-head__intro + p {
  margin-top: 0.875rem;
}

.tabs {
  margin-top: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.tabs a {
  display: block;
  padding: 0.625rem 0 0.75rem;
  border-bottom: 3px solid transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--navy);
}

.tabs a[aria-current] {
  border-bottom-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
}

.topics {
  margin-top: 1.25rem;
}

.tabs + .topics {
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1rem !important;
}

.topics ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.topics a {
  display: block;
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--border-dark);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.topics a:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.topics a[aria-current] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  list-style: none;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-dark);
  box-shadow: 0 8px 20px -12px rgba(30, 36, 56, 0.3);
}

.card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--navy-tint);
  overflow: hidden;
  text-decoration: none;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media--empty {
  display: none;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  background: var(--navy-tint);
  border-bottom: 2px solid var(--gold);
}

.card__media--empty span {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

/* In a multi-column grid the panel keeps cards aligned; in one column it is only empty space. */
@media (min-width: 640px) {
  .card__media--empty {
    display: flex;
  }
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.125rem 1.25rem 1.25rem;
}

.card__title {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.card__body > .card__title:first-child {
  margin-top: 0;
}

.card__title a {
  text-decoration: none;
}

.card__title a:hover {
  color: var(--gold-text);
}

.card__excerpt {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.card__meta a {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.card__meta a:hover {
  color: var(--gold-text);
  text-decoration: underline;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.pagination__status {
  font-size: 0.875rem;
  color: var(--text-soft);
  text-align: center;
}

.pagination > :first-child {
  justify-self: start;
}

.pagination > :last-child {
  justify-self: end;
}

.empty {
  padding: 2.5rem 0;
  color: var(--text-soft);
}

/* ---------- post ---------- */

.post__header {
  padding-top: 1.5rem;
}

.post__header .eyebrow {
  margin-top: 1.75rem;
}

.post__header h1 {
  margin-top: 0.625rem;
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.post__header .breadcrumb + h1 {
  margin-top: 1.75rem;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 1.125rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-soft);
}

.post__meta a {
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.post__meta a:hover {
  color: var(--gold-text);
  text-decoration: underline;
}

.post__figure {
  margin-block: 2rem 0;
}

.post__figure img {
  width: 100%;
  border-radius: var(--radius);
}

.post__body {
  padding-block: 2rem 2.5rem;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.5rem;
  font-weight: 600;
}

.prose h3 {
  margin-top: 1.75em;
  font-size: 1.25rem;
  font-weight: 600;
}

.prose h4 {
  margin-top: 1.5em;
  font-size: 1.0625rem;
  font-weight: 600;
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.75em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--gold-text);
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li + li,
.prose li > ul,
.prose li > ol {
  margin-top: 0.5em;
}

.prose li::marker {
  color: var(--gold-text);
  font-weight: 600;
}

.prose li > p + p {
  margin-top: 0.75em;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--gold);
  font-size: 1.125rem;
  color: var(--navy);
}

.prose blockquote > * + * {
  margin-top: 0.75em;
}

.prose hr {
  height: 1px;
  margin-block: 2.5em;
  border: 0;
  background: var(--border);
}

.prose img {
  margin-inline: auto;
  border-radius: var(--radius);
}

.prose code {
  padding: 0.125em 0.375em;
  border-radius: 4px;
  background: var(--navy-tint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.prose pre {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--navy-dark);
  color: #f1f5f9;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--navy);
}

.prose th > p,
.prose td > p {
  margin: 0;
}

.prose [data-youtube-video] {
  aspect-ratio: 16 / 9;
}

.prose [data-youtube-video] iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

.post__footer {
  padding-bottom: 3.5rem;
}

.author-box {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.author-box__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.author-box__name {
  margin-top: 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}

.author-box__role {
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.author-box__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
  margin-top: 0.875rem;
  font-size: 0.9375rem;
}

/* ---------- error pages ---------- */

.error-page {
  max-width: 40rem;
  padding-block: 4rem 5rem;
}

.error-page h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
}

.error-page h1 + p {
  margin-top: 0.875rem;
  color: var(--text-soft);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #d1d5db;
  font-size: 0.875rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-block: 3rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3rem;
    padding-block: 4rem;
  }
}

.site-footer__logo {
  display: inline-block;
}

.site-footer__logo img {
  width: 144px;
  height: 64px;
}

.site-footer__about {
  margin-top: 1rem;
  line-height: 1.65;
}

.site-footer h2 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0;
}

.site-footer ul {
  list-style: none;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--gold-light);
}

.site-footer address {
  font-style: normal;
}

.site-footer address p + p {
  margin-top: 0.75rem;
}

.site-footer__social {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.site-footer__social a {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.site-footer__bar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-block: 1.5rem;
  text-align: center;
}

.site-footer__bar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.site-footer__bar li + li {
  margin-top: 0;
}

@media (min-width: 768px) {
  .site-footer__bar-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .pagination,
  .tabs,
  .topics {
    display: none;
  }
}
