/* Cookie Editor — additions for blog, categories, articles and legal pages.
   Loaded after style.css; the supplied homepage stylesheet is unchanged. */

/* Hamburger (shown only where the desktop menu no longer fits) */
.menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: .55rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: .6rem;
  cursor: pointer;
  justify-self: end;
}
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (hover: hover) { .menu-toggle { cursor: pointer; } }

@media (max-width: 47rem) {
  .menu-toggle { display: block; }
  .header-grid { grid-template-columns: minmax(0, 1fr) auto; justify-items: stretch; min-height: 4.6rem; padding-block: .5rem; }
  .header-grid .brand { justify-self: start; }
  .header-grid nav { display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .header-grid nav.open { display: flex; }
  .header-grid nav a { padding: .65rem .25rem; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle span { transition: none; }
}

/* Breadcrumbs */
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 1.1rem; }
.crumbs a { color: var(--blue); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--muted); }

/* Page + article layout */
.page-head { padding-block: clamp(1.6rem, 4vw, 2.8rem) 0; }
.page-head .lede { font-size: 1.13rem; color: var(--muted); max-width: none; }
.article { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.article .body { max-width: 78ch; margin-inline: auto; }
.article h2 { margin-top: 2.2rem; }
.article h3 { margin-top: 1.5rem; }
.article img.featured { display: block; width: min(100%, 34rem); height: auto; border-radius: 1rem; margin: 1.4rem auto 1.8rem; }
.article ul, .article ol.text-list { margin: 0 0 1rem; padding-left: 1.3rem; }
.article li { margin-bottom: .4rem; }
.article code { background: #eef1f8; padding: .08rem .35rem; border-radius: .3rem; font-size: .92em; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; margin: 1.1rem 0 1.4rem; }
.table-scroll table { min-width: 34rem; }
.meta-line { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; }
.meta-line .cat-chip { display: inline-block; background: #e8efff; color: var(--blue); font-weight: 700; border-radius: 2rem; padding: .12rem .7rem; text-decoration: none; margin-right: .5rem; }

/* Table of contents */
.toc { border: 1px solid var(--line); border-radius: .85rem; background: var(--paper); padding: 1rem 1.25rem; margin: 1.4rem auto 1.8rem; max-width: 78ch; }
.toc strong { display: block; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: .3rem; }

/* Cards (whole card is one link) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.1rem; margin: 1.4rem 0 2.4rem; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); color: var(--ink); text-decoration: none; overflow: hidden; }
.card:hover { border-color: var(--blue); }
.card:focus-visible { outline: 3px solid #ae6912; outline-offset: 3px; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.card .card-body { padding: 1rem 1.1rem 1.15rem; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card .card-cat { color: var(--blue); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 1.2rem 0 2rem; }
.cat-card { border: 1px solid var(--line); border-radius: 1rem; background: #f0f4fa; padding: 1.1rem 1.2rem; color: var(--ink); text-decoration: none; }
.cat-card:hover { border-color: var(--blue); }
.cat-card:focus-visible { outline: 3px solid #ae6912; outline-offset: 3px; }
.cat-card h3 { margin-bottom: .35rem; }
.cat-card p { color: var(--muted); margin: 0; font-size: .94rem; }

/* Call to action + related */
.cta-box { border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: .85rem; background: #fdf6e3; padding: 1.15rem 1.3rem; margin: 2rem auto; max-width: 78ch; }
.cta-box h2, .cta-box h3 { margin-top: 0; }
.related { margin-top: 2.4rem; }
.related h2 { margin-top: 0; }

/* Footer legal row */
.site-footer .footer-grid { grid-template-columns: minmax(0, 1fr) auto; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin-top: 1.3rem; padding-top: 1.05rem; border-top: 1px solid #52617d; font-size: .9rem; }
.legal-nav a { color: #e0e7f4; text-decoration: none; }
.legal-nav a:hover { text-decoration: underline; }
.site-footer .copyright { border-top: 0; margin-top: .7rem; padding-top: .35rem; }
.copyright a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.copyright a:hover { color: var(--gold); }

/* Contact form (front end only) */
.contact-form { display: grid; gap: .9rem; max-width: 36rem; margin-top: 1.2rem; }
.contact-form label { font-weight: 650; display: grid; gap: .35rem; }
.contact-form input, .contact-form textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: .5rem; background: white; color: var(--ink); width: 100%; }
.contact-form button { justify-self: start; border: 0; cursor: pointer; }
