/* Crohn's UK brand layer (loaded after site.css): the "clinical clean" design.
   In the tradition of NHS.uk and GOV.UK: one highly legible typeface, strong solid
   brand bar, flat white blocks on a pale grey page, square corners, yellow focus
   rings, big tap targets. No gradients, shadows, pills or hover effects. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

:root {
  --page: #f0f2f4; --white: #fff; --ink: #1c2126; --ink-2: #3d4650; --muted: #5d6874;
  --line: #d4d9de; --brand: #582ab5; --brand-dark: #3c1a82; --focus: #ffd60a;
  --font: "Atkinson Hyperlegible", system-ui, sans-serif; --serif: var(--font);
  --radius: 0; --shadow: none;
}
body { background: var(--page); color: var(--ink); font-family: var(--font); font-size: 18px; }
a { color: var(--brand); text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 3px; }
*, *::before, *::after { border-radius: 0 !important; box-shadow: none !important; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 0; background-color: var(--focus); color: var(--ink) !important; box-shadow: 0 4px 0 var(--ink) !important; text-decoration: none; }

/* header: solid brand bar */
.masthead { position: sticky; top: 0; background: var(--brand); border: 0; backdrop-filter: none; }
.masthead__inner { min-height: 72px; }
.logo__text { color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
.logo__mark { background: #fff; padding: 3px; width: 36px; height: 36px; }
.mainnav a { color: #fff; border-radius: 0; font-weight: 700; padding: 10px 12px; }
.mainnav a:hover { background: none; color: #fff; text-decoration: underline; }
.mainnav a[aria-current] { background: none; color: #fff; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 4px; }
.iconbtn, .menu summary { color: #fff; }
.iconbtn:hover, .menu summary:hover { background: none; text-decoration: underline; }
.menu__panel { top: 72px; background: var(--white); border: 0; border-bottom: 4px solid var(--brand); }
.menu__panel .mega a { color: var(--brand); text-decoration: underline; font-weight: 400; }
.menu__panel .mega a:hover { background: none; text-decoration-thickness: 3px; }
.mega__hub { color: var(--ink) !important; text-decoration: none !important; font-size: 1.15rem; }
.mega ul ul { border-left: 0; padding-left: 16px; }

/* buttons and fields */
.btn, button { border-radius: 0; background: var(--brand); color: #fff; font-weight: 700; padding: 13px 20px; border-bottom: 3px solid var(--brand-dark); }
.btn:hover, button:hover { background: var(--brand-dark); color: #fff; }
input, select, textarea { border: 2px solid var(--ink); border-radius: 0; background: #fff; padding: 11px 12px; }
input:focus, select:focus, textarea:focus { outline: 4px solid var(--focus); border-color: var(--ink); }

/* home */
/* Hero gradient starts at the header purple so header and hero read as one block. */
.hero { color: #fff; padding: 48px 0 60px;
  background: radial-gradient(800px 380px at 85% 75%, rgb(140 98 230 / .30) 0%, transparent 70%),
              linear-gradient(180deg, #582ab5 0%, #4b21a4 40%, #381686 100%); }
.hero__inner { max-width: 760px; }
.eyebrow { display: none; }
.hero h1 { font-family: var(--font); font-weight: 700; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.15; letter-spacing: 0; }
.hero__lead { color: #fff; font-size: 1.2rem; }
.hero__search { background: none; padding: 0; gap: 0; border-radius: 0; box-shadow: none; }
.hero__search input { border: 0; border-radius: 0; padding: 14px; }
.hero__search button, .hero__search button:hover { background: var(--brand-dark); color: #fff; border: 2px solid #fff; border-left: 0; }
.hero__popular { color: #e3dcf5; }
.hero__popular a { color: #fff; }

.topics { margin-top: 32px; }
.topics__grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.topic a { background: var(--white); border: 0; padding: 22px 24px; transform: none !important; }
.topic strong { color: var(--brand) !important; text-decoration: underline; font-size: 1.25rem; }
.topic a:hover strong { text-decoration-thickness: 3px; }
.topic span { color: var(--ink); }
.topic em { display: none; }

.feature { background: var(--white); border: 0; margin: 32px 0; padding: 40px 0; }
.feature .eyebrow { display: none; }
.feature h2, .posts h2, .author h2 { font-family: var(--font); font-weight: 700; }
.feature__list { gap: 0; }
.feature__list a { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--brand); text-decoration: underline; font-weight: 400; }

.posts__grid { gap: 16px; }
.post-card a { background: var(--white); border: 0; }
.post-card a:hover { border: 0; }
.post-card strong { color: var(--brand); text-decoration: underline; }
.home-article { background: var(--white); padding: 40px 48px; border: 0; }
.home .layout--single { grid-template-columns: minmax(0, 1fr); }
.home-article.prose { max-width: none; }
@media (min-width: 1000px) {
  .home-article.prose { columns: 2; column-gap: 56px; }
  .home-article.prose h2 { column-span: all; break-after: avoid; }
  .home-article.prose p, .home-article.prose li { break-inside: avoid; }
}
@media (max-width: 600px) { .home-article { padding: 24px 20px; } }

/* inner pages: white content area on grey */
.pagehead { background: var(--white); border-top: 0; border-bottom: 1px solid var(--line); padding: 20px 0 26px; }
.crumbs, .crumbs a { color: var(--ink-2); font-size: 1rem; }
.crumbs a { text-decoration: underline; }
.pagehead h1 { font-family: var(--font); font-weight: 700; font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: 0; }
.meta { color: var(--muted); font-size: 1rem; }
.layout { padding-top: 32px; }
.prose { font-size: 1.12rem; line-height: 1.6; }
.prose h2 { font-family: var(--font); font-weight: 700; font-size: 1.6rem; }
.prose h3 { font-weight: 700; }
.prose li::marker { color: var(--ink); }
.prose th { background: #e4e8eb; }

.toc { background: var(--white); border: 0; border-left: 0; }
.toc summary { font-weight: 700; }

.cards { gap: 16px; }
.card a { background: var(--white); border: 0; }
.card a:hover { border: 0; }
.card strong { color: var(--brand); text-decoration: underline; }

.notice { background: #e4e8eb; border: 0; color: var(--ink); }
.notice--warn { background: #fff4c2; border: 0; }

.sidenav { background: var(--white); border-top: 0; padding: 16px 8px 8px; }
.sidenav h2 { text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
.sidenav h2 a { color: var(--ink); }
.sidenav li a { color: var(--brand); text-decoration: underline; border-bottom: 1px solid var(--line); }
.sidenav li a:hover { background: none; text-decoration-thickness: 3px; }
.sidenav li a[aria-current] { background: none; box-shadow: none !important; color: var(--ink); text-decoration: none; font-weight: 700; }

.signup { background: var(--white); color: var(--ink); }
.signup p { color: var(--ink-2); }
.signup input { border: 2px solid var(--ink); }
.signup button, .signup button:hover { background: var(--brand); color: #fff; }

.postlist li { background: var(--white); padding: 20px 24px; border: 0; margin-bottom: 12px; }

/* footer */
.footer { background: #e4e8eb; color: var(--ink-2); border-top: 4px solid var(--brand); }
.footer h2 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
.footer a { color: var(--brand); text-decoration: underline; }
.footer__tag, .footer__disclaimer, .footer__copy { color: var(--ink-2); }
.footer__disclaimer { border-top-color: #c7ced4; max-width: none; }
.logo--light .logo__text { color: var(--ink); }
.footer .logo, .footer .logo:hover { text-decoration: none; }
