/* Capture the portal tokens at the root, before the marketing palette overrides them. */
:root {
  --report-ink: var(--ui-color-ink);
  --report-brand: var(--ui-color-brand);
  --report-brand-hover: var(--ui-color-brand-hover);
  --report-brand-soft: var(--ui-color-brand-soft);
  --report-brand-line: var(--ui-color-brand-line);
  --report-muted: var(--ui-color-text-muted);
  --report-focus-ring: var(--ui-focus-ring);
}
.m-clock-report-example {
  --ui-color-ink: var(--report-ink);
  --ui-color-brand: var(--report-brand);
  --ui-color-brand-hover: var(--report-brand-hover);
  --ui-color-brand-soft: var(--report-brand-soft);
  --ui-color-brand-line: var(--report-brand-line);
  --ui-color-text-muted: var(--report-muted);
  --ui-focus-ring: var(--report-focus-ring);
}
.m-clock-report-example > .ui-section-tabs a[aria-selected="true"] {
  color: var(--ui-color-text);
  font-weight: 700;
  border-bottom-color: var(--ui-color-brand);
}
.m-clock-report-example a[role="tab"]:focus-visible {
  outline: 2px solid var(--ui-color-brand);
  outline-offset: -3px;
}
.m-clock-report-example .m-clock-matrix-cards {
  max-height: min(65dvh, 36rem);
  overflow-y: auto;
}

.m-report-section {
  --report-accent: #213f73;
  --report-border: #d8e3f1;
  --report-paper: #f0f5fc;
  padding: clamp(3.5rem, 7vw, 6.75rem) max(5%, 1.125rem);
  color: var(--m-ink);
  background: white;
}
.m-report-section[id], .m-report-section [id] { scroll-margin-top: 6.5rem; }
.m-report-section h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 680;
  line-height: 1.06;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.m-report-section h3, .m-report-section h4 { font-weight: 710; line-height: 1.22; }
.m-report-section h3 { font-size: clamp(1.13rem, 2vw, 1.42rem); }
.m-report-section h4 { font-size: 1.17rem; }
.m-report-section p { color: var(--m-muted); line-height: 1.65; }
.m-report-section h2 + p, .m-report-section :is(h3, h4) + p { margin-top: .65rem; }
.m-report-section .m-cta { border-radius: .65rem; }
.m-report-heading { max-width: 55rem; margin-bottom: clamp(1.35rem, 4vw, 2.75rem); }
.m-report-heading > p { max-width: 65ch; font-size: 1.0625rem; }
.m-report-link {
  display: inline-block;
  color: var(--m-blue-hover);
  font-weight: 660;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.m-report-section :is(a, summary):focus-visible { outline: 2px solid var(--m-blue-hover); outline-offset: 4px; }
.m-report-link:hover { color: var(--m-ink); }
.m-report-section figure a { display: block; width: fit-content; max-width: 100%; }
.m-report-section figure img { display: block; width: auto; max-width: 100%; height: auto; }
.m-report-section figcaption { margin-top: .65rem; color: var(--m-muted); font-size: .875rem; line-height: 1.45; }

.m-report-hero {
  background: radial-gradient(ellipse at 86% 88%, #e1e9fa 0, transparent 56%),
              radial-gradient(ellipse at 15% 8%, #fff 0, transparent 61%), #f9f4eb;
}
.m-report-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(2.25rem, 5vw, 5.25rem);
  align-items: center;
}
.m-report-section .m-report-kicker { margin-bottom: .8rem; color: var(--report-accent); font-size: .9rem; font-weight: 750; }
.m-report-hero h1 {
  max-width: 12ch;
  font-size: clamp(2.65rem, 6.1vw, 5.7rem);
  line-height: .99;
  letter-spacing: -.06em;
  font-weight: 690;
  text-wrap: balance;
}
.m-report-hero .m-report-lead { max-width: 42ch; margin: 1.2rem 0 1.6rem; font-size: clamp(1.04rem, 1.4vw, 1.25rem); }
.m-report-hero-art { width: 100%; height: auto; border-radius: clamp(1rem, 2.2vw, 1.75rem); box-shadow: 0 1.25rem 3rem #15254230; }

.m-report-origins-grid, .m-report-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 6vw, 6rem);
  align-items: start;
}
.m-report-origins header p { max-width: 48ch; }
.m-report-sources { display: grid; gap: 1rem; }
.m-report-sources li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .85rem; }
.m-report-sources li + li { border-top: 1px solid var(--report-border); padding-top: 1rem; }
.m-report-sources h3 + p { margin-top: .2rem; }
.m-report-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .7rem;
  color: var(--report-accent);
  background: #e3edfb;
}
.m-report-section svg { width: 1.18rem; height: 1.18rem; flex: none; }

.m-report-example { background: var(--report-paper); }
.m-report-tip {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  max-width: 52rem;
  padding: .75rem .95rem;
  margin-bottom: 1.35rem;
  border-radius: .65rem;
  background: #e2ebf9;
}
.m-report-section .m-report-tip { color: var(--report-accent); }
.m-report-tip svg { margin-top: .25rem; }
.m-report-example .m-clock-report-example { min-width: 0; }
.m-report-example .m-clock-report-example .m-report-case-link {
  outline: 2px solid var(--report-accent);
  outline-offset: -3px;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.m-report-example .m-clock-report-example .m-report-case-link:hover { background: #c8daf5; }
.m-report-example .m-clock-report-example .m-report-case-link:focus-visible { outline: 3px solid var(--m-blue-hover); }
#report-case-day { background: #e9f2ff; }
#report-case-day:focus-visible { outline: 2px solid var(--report-accent); outline-offset: -2px; }
.m-report-next { margin-top: 1.2rem; }

.m-report-case-tabs {
  display: flex;
  width: fit-content;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .3rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  border: 1px solid var(--report-border);
  border-radius: .85rem;
  background: var(--report-paper);
}
.m-report-case-tabs a { padding: .63rem .9rem; border-radius: .63rem; color: var(--report-accent); font-weight: 660; }
.m-report-case-tabs a:hover { background: #dde8fa; }
.m-report-case-tabs a[aria-selected="true"] { color: white; background: var(--report-accent); }
.m-report-case-stage, .m-report-history, .m-report-export, .m-report-summary {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(1.3rem, 4vw, 4.25rem);
  align-items: center;
}
.m-report-case-stage {
  min-width: 0;
  padding: clamp(1rem, 3.4vw, 2.7rem);
  min-height: 16rem;
  border: 1px solid var(--report-border);
  border-radius: 1.2rem;
  background: #f7f9fd;
}
.m-report-case-stage[hidden] { display: none; }
.m-report-case-stage + .m-report-case-stage:not([role="tabpanel"]) { margin-top: .8rem; }
.m-report-case-stage h3 { font-size: clamp(1.55rem, 3vw, 2.65rem); letter-spacing: -.04em; }
.m-report-case-stage .m-report-link { margin-top: .95rem; }
.m-report-case-stage figure img, .m-report-history figure img, .m-report-export figure img, .m-report-summary figure img {
  border: 1px solid var(--report-border);
  border-radius: .7rem;
  box-shadow: 0 .45rem 1.15rem #182b4511;
}
@media (prefers-reduced-motion: no-preference) {
  .m-report-case-stage[role="tabpanel"]:not([hidden]) figure { animation: m-report-reveal .28s ease-out; }
  @keyframes m-report-reveal {
    from { opacity: .65; transform: translateY(.35rem); }
    to { opacity: 1; transform: none; }
  }
}
.m-report-history, .m-report-summary { margin-top: clamp(2rem, 4vw, 3.75rem); }
.m-report-history p + p { margin-top: .65rem; }

.m-report-metrics { background: #faf6ee; }
.m-report-metric-grid, .m-report-documents { display: grid; gap: 1rem; }
.m-report-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-report-metric-grid article, .m-report-documents article {
  padding: clamp(1rem, 2.6vw, 1.7rem);
  border: 1px solid var(--report-border);
  border-radius: 1rem;
  background: white;
}
.m-report-metric-grid article { border-color: #e9dfce; }
.m-report-metric-grid h3 { margin-top: .8rem; }

.m-report-export {
  padding: clamp(1rem, 3.4vw, 2.7rem);
  border-radius: 1.15rem;
  background: var(--report-paper);
}
.m-report-export h3, .m-report-documents-title { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.028em; }
.m-report-documents-title { margin-top: clamp(2rem, 5vw, 3.75rem); }
.m-report-documents-lead { margin-bottom: 1.4rem; }
.m-report-documents { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.m-report-documents article > p { margin-bottom: .9rem; }
.m-report-documents figure a { padding: .45rem; background: var(--report-paper); border-radius: .65rem; }

.m-report-faq { border-top: 1px solid var(--report-border); }
.m-report-faq details { border-bottom: 1px solid var(--report-border); }
.m-report-faq summary { padding: .9rem .15rem; cursor: pointer; font-weight: 690; }
.m-report-faq details p { padding: 0 .2rem 1rem 1rem; }
.m-report-closing { text-align: center; color: white; background: #172f50; }
.m-report-closing .m-inner { max-width: 45rem; }
.m-report-closing p { color: #dce8fc; }
.m-report-closing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem 1.4rem;
  margin-top: 1.35rem;
}
.m-report-closing .m-cta { background: #e7efff; color: #182c4d; }
.m-report-closing .m-cta:hover { background: white; }
.m-report-closing .m-report-sales {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #e7efff;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.m-report-closing .m-report-sales:hover { color: white; }
.m-report-closing a:focus-visible { outline-color: #e7efff; }

@media (max-width: 850px) {
  .m-report-hero-grid, .m-report-origins-grid, .m-report-faq-grid,
  .m-report-case-stage, .m-report-history, .m-report-export, .m-report-summary { grid-template-columns: 1fr; }
  .m-report-hero h1 { max-width: 16ch; }
  .m-report-case-stage { min-height: auto; }
}
@media (max-width: 660px) {
  .m-report-metric-grid, .m-report-documents { grid-template-columns: 1fr; }
  .m-report-case-tabs { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; }
  .m-report-case-tabs a { padding: .55rem .4rem; font-size: .835rem; overflow-wrap: anywhere; }
}
