/* UK Broadband Market 2000-2030 — Authority Report
   Light-only layout (mirrors Connected Nations 2025).  Do not add prefers-color-scheme: dark. */

html:has(.ukmarket-report-page) {
  color-scheme: only light;
}

.ukmarket-report-page {
  color-scheme: only light;
  background: #ffffff;
  color: #1a1a2e;
}

.ukmarket-report-page .report--authority {
  --brand-primary: #0c5b8e;
  --brand-accent: #e91e63;
  --brand-green: #0f7b5a;
  --brand-gold: #b8860b;
  --brand-teal: #1f9d8a;
  --brand-purple: #7b3f99;
  --brand-grey: #6b6b7c;
  --text: #1a1a2e;
  --grid: #e5e5eb;
  --surface: #ffffff;
  --bg-soft: #f7fafc;
  --bg-blue: #eaf2f8;
  --header-offset: 5.5rem;
}

/* Layout shell (Connected Nations pattern) */
.ukmarket-layout {
  display: grid;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 1024px) {
  .ukmarket-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: start;
    gap: 2rem;
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

.ukmarket-layout__article {
  min-width: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  line-height: 1.65;
  color: #1a1a2e;
}

/* Report hero */
.ukmarket-report-page .report-hero .eyebrow {
  color: #0f7b5a;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.ukmarket-report-page .report-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
  color: #1a1a2e;
}

.ukmarket-report-page .report-hero h1 em {
  color: #e91e63;
  font-style: italic;
  font-weight: 700;
}

.ukmarket-report-page .report-hero .meta-line {
  font-size: 0.85rem;
  color: #6b6b7c;
}

.ukmarket-report-page .short-answer {
  background: #eaf2f8;
  border-left: 3px solid #e91e63;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 8px;
}

.ukmarket-report-page .short-answer p {
  margin: 0;
  font-weight: 500;
  color: #1a1a2e;
}

.ukmarket-report-page .byline-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #e5e5eb;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.ukmarket-report-page .byline-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e91e63;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.ukmarket-report-page .byline-card p {
  margin: 0.15rem 0;
  font-size: 0.9rem;
  color: #1a1a2e;
}

.ukmarket-report-page .byline-card .creds {
  color: #e91e63;
  font-weight: 500;
}

/* KPI cards */
.ukmarket-report-page .kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0;
}

.ukmarket-report-page .kpi {
  background: #ffffff;
  border: 1px solid #e5e5eb;
  border-top: 3px solid;
  padding: 1rem;
  border-radius: 8px;
  text-align: left;
}

.ukmarket-report-page .kpi--pink { border-top-color: #e91e63; }
.ukmarket-report-page .kpi--green { border-top-color: #0f7b5a; }
.ukmarket-report-page .kpi--gold { border-top-color: #b8860b; }
.ukmarket-report-page .kpi--blue { border-top-color: #0c5b8e; }
.ukmarket-report-page .kpi-figure { font-size: 1.8rem; font-weight: 700; margin: 0; color: #e91e63; }
.ukmarket-report-page .kpi--green .kpi-figure { color: #0f7b5a; }
.ukmarket-report-page .kpi--gold .kpi-figure { color: #b8860b; }
.ukmarket-report-page .kpi--blue .kpi-figure { color: #0c5b8e; }
.ukmarket-report-page .kpi-caption { font-size: 0.78rem; margin: 0.3rem 0 0; color: #6b6b7c; }

/* Download bar */
.ukmarket-report-page .download-bar {
  background: #eaf2f8;
  border-left: 3px solid #0c5b8e;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0 2rem;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.ukmarket-report-page .download-bar-text h2 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  color: #1a1a2e;
}

.ukmarket-report-page .download-bar-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b6b7c;
}

.ukmarket-report-page .download-bar-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ukmarket-report-page .btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ukmarket-report-page .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ukmarket-report-page .btn--primary {
  background: #e91e63;
  color: #fff;
}

.ukmarket-report-page .btn--secondary {
  background: #ffffff;
  color: #1a1a2e;
  border: 1px solid #e5e5eb;
}

.ukmarket-report-page .btn--large {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
}

/* Flowing sections */
.ukmarket-report-page .ukmarket-section {
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid #e5e5eb;
  scroll-margin-top: var(--header-offset);
}

.ukmarket-report-page .ukmarket-section:nth-of-type(even) {
  background: #f7fafc;
}

.ukmarket-report-page .ukmarket-section h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  color: #0c5b8e;
}

.ukmarket-report-page .ukmarket-section > p,
.ukmarket-report-page .ukmarket-section > ol:not(.reference-list),
.ukmarket-report-page .ukmarket-section > ul {
  max-width: 68ch;
}

.ukmarket-report-page .ukmarket-layout__article a {
  color: #0c5b8e;
}

.ukmarket-report-page a.btn,
.ukmarket-report-page a.btn--primary,
.ukmarket-report-page .download-bar a.btn--primary,
.ukmarket-report-page .pre-footer-cta a.btn,
.ukmarket-report-page .pre-footer-cta a.btn--primary,
.ukmarket-report-page .pre-footer-cta a.btn--large {
  color: #ffffff;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ukmarket-report-page a.btn--secondary {
  color: #1a1a2e;
}

/* Callouts: calm unified style for in-section quick answer and so what */
.ukmarket-report-page .quick-answer,
.ukmarket-report-page .so-what {
  background: #f7fafc;
  border-left: 3px solid #0c5b8e;
  padding: 0.9rem 1.2rem;
  margin: 1.25rem 0;
  border-radius: 8px;
  max-width: none;
}

.ukmarket-report-page .quick-answer .qa-label,
.ukmarket-report-page .so-what .sw-label {
  font-weight: 700;
  color: #0c5b8e;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.ukmarket-report-page .quick-answer p:last-child,
.ukmarket-report-page .so-what p:last-child {
  margin: 0;
  color: #1a1a2e;
}

/* Charts */
.ukmarket-report-page .chart-figure {
  margin: 1.5rem 0;
  max-width: none;
}

.ukmarket-report-page .chart-container {
  aspect-ratio: 16 / 9;
  min-height: 260px;
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e5eb;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

@media (max-width: 767px) {
  .ukmarket-report-page .chart-container {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }
}

@media (min-width: 768px) {
  .ukmarket-report-page .chart-container {
    min-height: 380px;
  }
}

.ukmarket-report-page .chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.ukmarket-report-page .chart-container[aria-busy='true']::before {
  content: 'Loading chart…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6b7c;
  font-size: 0.85rem;
  background: #ffffff;
  border-radius: 8px;
}

.ukmarket-report-page .chart-container table {
  display: none;
}

.ukmarket-report-page .chart-figure figcaption {
  font-size: 0.85rem;
  color: #555555;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Data tables */
.ukmarket-report-page .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  max-width: none;
}

.ukmarket-report-page .data-table caption {
  text-align: left;
  font-weight: 600;
  padding: 0.5rem 0;
  color: #1a1a2e;
}

.ukmarket-report-page .data-table th,
.ukmarket-report-page .data-table td {
  padding: 0.5rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #e5e5eb;
}

.ukmarket-report-page .data-table thead th {
  background: #0c5b8e;
  color: #fff;
  border-bottom: 2px solid #e91e63;
}

.ukmarket-report-page .data-table tbody tr:nth-child(even) {
  background: #eaf2f8;
}

/* Findings / action lists */
.ukmarket-report-page .findings-list {
  list-style: none;
  padding: 0;
  max-width: none;
}

.ukmarket-report-page .findings-list > li {
  margin: 1.2rem 0;
}

.ukmarket-report-page .findings-list h3 {
  color: #0c5b8e;
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.ukmarket-report-page .action-list {
  padding-left: 1.2rem;
  max-width: none;
}

.ukmarket-report-page .action-list h3 {
  color: #0c5b8e;
  font-size: 1.05rem;
  margin: 0.5rem 0 0.3rem;
}

/* References */
.ukmarket-report-page .ref-intro {
  max-width: 68ch;
  color: #555555;
}

.ukmarket-report-page .reference-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: none;
}

.ukmarket-report-page .reference-list li {
  margin: 0 0 0.65rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e5eb;
}

.ukmarket-report-page .reference-list li:last-child {
  border-bottom: none;
}

.ukmarket-report-page .reference-list em {
  color: #1a1a2e;
  font-style: italic;
}

.ukmarket-report-page .reference-list a {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0c5b8e;
  text-decoration: none;
}

.ukmarket-report-page .reference-list a:hover {
  text-decoration: underline;
}

.ukmarket-report-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Publication cards */
.ukmarket-report-page .publication-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: none;
}

.ukmarket-report-page .pub-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e5e5eb;
  border-left: 3px solid;
  padding: 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  color: #1a1a2e;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ukmarket-report-page .pub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.ukmarket-report-page .pub-card--pink { border-left-color: #e91e63; }
.ukmarket-report-page .pub-card--green { border-left-color: #0f7b5a; }
.ukmarket-report-page .pub-card--gold { border-left-color: #b8860b; }
.ukmarket-report-page .pub-eyebrow {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #e91e63;
  margin: 0 0 0.3rem;
}

.ukmarket-report-page .pub-card--green .pub-eyebrow { color: #0f7b5a; }
.ukmarket-report-page .pub-card--gold .pub-eyebrow { color: #b8860b; }
.ukmarket-report-page .pub-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #1a1a2e;
}

.ukmarket-report-page .pub-card p {
  margin: 0;
  font-size: 0.85rem;
  color: #6b6b7c;
}

/* Pre-footer CTA */
.ukmarket-report-page .pre-footer-cta {
  background: linear-gradient(135deg, #eaf2f8, #f7fafc);
  padding: 2rem 1.5rem;
  margin: 2rem 0 0;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e5e5eb;
}

.ukmarket-report-page .pre-footer-cta h2 {
  color: #0c5b8e;
  margin: 0 0 0.5rem;
  font-style: normal;
}

.ukmarket-report-page .pre-footer-cta p {
  color: #1a1a2e;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.ukmarket-report-page .pre-footer-cta .cta-meta {
  font-size: 0.8rem;
  color: #6b6b7c;
  font-style: italic;
  margin-top: 0.8rem;
}

/* Table of contents */
.ukmarket-toc__panel {
  border: 1px solid #e5e5eb;
  border-radius: 12px;
  background: #f7fafc;
  overflow: hidden;
}

.ukmarket-toc__summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.875rem;
  color: #0c5b8e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.ukmarket-toc__summary::-webkit-details-marker {
  display: none;
}

.ukmarket-toc__summary::after {
  content: '';
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #0c5b8e;
  border-bottom: 2px solid #0c5b8e;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.ukmarket-toc__panel[open] .ukmarket-toc__summary::after {
  transform: rotate(-135deg);
}

.ukmarket-toc nav {
  padding: 0 0.75rem 0.75rem;
}

.ukmarket-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ukmarket-toc li {
  margin: 0 0 0.15rem;
}

.ukmarket-toc a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  min-height: 44px;
  transition: background 160ms ease, color 160ms ease;
}

.ukmarket-toc a:hover {
  background: #eaf2f8;
  color: #0c5b8e;
}

.ukmarket-toc a:focus-visible {
  outline: 3px solid #0c5b8e;
  outline-offset: 2px;
}

.ukmarket-toc a.is-active {
  background: rgba(12, 91, 142, 0.12);
  color: #0c5b8e;
  font-weight: 600;
}

@media (min-width: 1024px) {
  .ukmarket-toc {
    position: sticky;
    top: calc(var(--header-offset) + 1rem);
    align-self: start;
    max-height: calc(100vh - var(--header-offset) - 2rem);
  }

  .ukmarket-toc__panel {
    border: 1px solid #e5e5eb;
    background: #f7fafc;
    max-height: inherit;
    overflow: auto;
  }

  .ukmarket-toc__summary {
    display: none;
  }

  .ukmarket-toc__panel[open] nav,
  .ukmarket-toc nav {
    padding: 1rem;
  }

  .ukmarket-toc__panel::before {
    content: 'On this page';
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    color: #0c5b8e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1rem 1rem 0.5rem;
  }
}

@media (max-width: 1023px) {
  .ukmarket-toc {
    order: -1;
    margin-bottom: 0.5rem;
  }
}

/* Method note */
.ukmarket-report-page .method-note {
  font-size: 0.9rem;
  color: #555555;
}

.ukmarket-report-page .method-meta {
  font-style: italic;
  font-size: 0.8rem;
}

/* Breadcrumb */
.ukmarket-report-page .breadcrumb {
  font-size: 0.85rem;
  color: #6b6b7c;
  padding: 0.8rem 0;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.ukmarket-report-page .breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ukmarket-report-page .breadcrumb li::after {
  content: '›';
  margin-left: 0.4rem;
  color: #6b6b7c;
}

.ukmarket-report-page .breadcrumb li:last-child::after {
  content: '';
}

.ukmarket-report-page .breadcrumb a {
  color: #0c5b8e;
  text-decoration: none;
}

.ukmarket-report-page .breadcrumb [aria-current='page'] {
  color: #1a1a2e;
  font-weight: 500;
}

html:has(.ukmarket-report-page) .ukmarket-main {
  max-width: none;
  margin: 0;
  padding: 0 0 3rem;
}

@media (prefers-reduced-motion: reduce) {
  .ukmarket-report-page .btn:hover,
  .ukmarket-report-page .pub-card:hover {
    transform: none;
  }
}
