@charset "utf-8";
/* /assets/css/site.css v1.0 — base site styles */

::root {
  --page-max-width: 1200px;   /* header width */
  --content-max-width: 950px; /* columns width (your old value) */
}

.page-width {                 /* already used by header */
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* new: for the main columns area */
.page-width--content {
  /*max-width: var(--content-max-width);*/
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}


* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: #111;
}

/* Shared max-width wrapper (used by header and main) */
.page-width {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.tw7-header {
  background: #a853b3;
  color: #fff;
}
.tw7-header__title {
  margin: 0;
  padding: 16px 0 8px;
  font-size: 1.6rem;
  text-align: center;
}
.tw7-header__subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.tw7-header__date {
  font-size: 0.95rem;
  opacity: 0.95;
}
.tw7-header__auth {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 0.95rem;
}
.tw7-header__welcome {
  font-weight: 600;
}
.tw7-link {
  color: #fff;
  text-decoration: underline;
}
.tw7-link:hover { text-decoration: none; }

/* Footer (govuk-lite shim as before) */
.govuk-width-container { max-width: 960px; margin: 0 auto; padding: 0 15px; }
.govuk-footer {
  background: #0b0c0c;
  color: #fff;
  padding: 32px 0;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}
.govuk-footer a { color: #fff; text-decoration: underline; }
.govuk-footer a:hover { text-decoration: none; }
.govuk-footer__inline-list {
  list-style: none; margin: 0 0 12px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: center;
}
.govuk-footer__inline-list li { display: inline; }
.govuk-footer__licence { margin: 0; color: #d0d0d0; font-size: 14px; }

/* Cookie banner/dialog (kept from your inline styles) */
#tw7-cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; text-align: center; }
.govuk-notification-banner {
  background: #f3f2f1; border-top: 5px solid #1d70b8; padding: 16px 0;
  box-shadow: 0 -1px 6px rgba(0,0,0,.1);
}
.govuk-notification-banner__header { display: none; }
.govuk-notification-banner__content { font-size: 16px; margin: 0 auto; }
.govuk-button-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }
.govuk-button, .govuk-button--secondary {
  appearance: none; border: 0; cursor: pointer;
  padding: 8px 14px; border-radius: 4px; font-weight: 600;
}
.govuk-button { background: #1d70b8; color: #fff; }
.govuk-button:hover { background: #165e9c; }
.govuk-button--secondary { background: #d0d0d0; color: #0b0c0c; }
.govuk-link { color: #1d70b8; text-decoration: underline; background: transparent; border: 0; padding: 0; }
.govuk-body-s { font-size: 14px; color: #505a5f; }
#tw7-cookie-dialog[hidden] { display: none !important; }
#tw7-cookie-dialog {
  position: fixed; z-index: 10000; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(680px, calc(100% - 32px));
  background: #fff; color: #0b0c0c; border: 1px solid #b1b4b6; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); padding: 18px;
}
.govuk-panel__title { margin: 0 0 8px; font-size: 20px; }
.govuk-form-group { margin-top: 8px; }
.govuk-fieldset__legend--m { font-size: 18px; margin-bottom: 8px; }
.govuk-hint { color: #505a5f; font-size: 14px; margin: 4px 0 8px; }
.govuk-checkboxes--small .govuk-checkboxes__item { margin: 8px 0; }
.govuk-checkboxes__input { margin-right: 8px; }
.govuk-!-margin-top-4 { margin-top: 16px; }

/* Responsive: stack the subbar items on narrow screens */
@media (max-width: 720px) {
  .tw7-header__subbar {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
}
/* === TW7 Article Modal === */
.tw7-modal[aria-hidden="true"] { display: none; }
.tw7-modal {
  position: fixed; inset: 0; z-index: 2000;
}
.tw7-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
}
.tw7-modal__dialog {
  position: relative;
  background: #fff;
  width: min(1000px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: 16px auto;
  border-radius: 10px;
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.tw7-modal__close {
  position: sticky; top: 0; right: 0; float: right;
  margin: 8px; border: 0; background: #a853b3; color: #fff;
  border-radius: 6px; padding: 6px 10px; font-weight: 700; cursor: pointer;
}
.tw7-modal__content { padding: 16px; }
.tw7-modal__loading, .tw7-modal__error { padding: 24px; text-align: center; color: #505a5f; }
/* Consistent vertical rhythm between stacked cards */
:root { --tw7-card-gap: 12px; } /* tweak to match your Weather↔Alerts gap */

.tw7-card { margin: 0; }                  /* reset any per-box margins */
.tw7-card + .tw7-card { margin-top: var(--tw7-card-gap); }  /* uniform gap */

/* Keep the modal content from creating a horizontal scrollbar */
.tw7-modal__content {
  overflow-x: hidden; /* no change to vertical */
}

/* Make the hero image shrink to fit the modal width */
.article-wrap img.hero {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Safety: any images inside the article body also fit */
.article-wrap .content img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Optional: long URLs (e.g. the source link) won’t force horizontal scroll */
.article-wrap,
.article-wrap a {
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
