/* reportsgateway.com: the switchboard. One family (Archivo, width axis), one signal colour for live routes. */
@font-face { /* Archivo variable (weight and width), self-hosted; SIL Open Font License, assets/fonts/OFL.txt */
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("fonts/archivo-wdth.woff2") format("woff2");
}
:root {
  --paper: #E9EDF2;
  --surface: #F6F8FB;
  --ink: #14213A;
  --ink-2: #3B4860;
  --muted: #5F6B80;
  --line: #A3AEBF;
  --signal: #1F5FD1;
  --signal-soft: rgba(31, 95, 209, .10);
  --font: "Archivo", system-ui, sans-serif;
  /* One colour per report site: tile top border, icon, live route; also the Reports bar on each site */
  --mark-up: #1A7F37; /* the Reports mark's rising bar */
  --c-ad: #4C5BD4; --c-windows: #0F8B8D; --c-entra: #8B3FD9; --c-m365: #D45A1F; --c-azure: #0B84C6; --c-aws: #B7791F;
  --bus: 52px;            /* gap between the bus and each destination */
  color-scheme: light;
}
/* Dark: by system setting unless the visitor picked light; or when they picked dark (theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101828; --surface: #172238; --ink: #E6ECF5; --ink-2: #B7C2D3;
    --muted: #8D99AE; --line: #3E4C68; --signal: #78A6FF; --signal-soft: rgba(120, 166, 255, .12);
    --mark-up: #3FB950;
   --c-ad: #9AA5FF; --c-windows: #5ED3D0; --c-entra: #C79BFF; --c-m365: #FF9B66; --c-azure: #5CC4F5; --c-aws: #F6C35B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101828; --surface: #172238; --ink: #E6ECF5; --ink-2: #B7C2D3;
  --muted: #8D99AE; --line: #3E4C68; --signal: #78A6FF; --signal-soft: rgba(120, 166, 255, .12);
  --mark-up: #3FB950;
  --c-ad: #9AA5FF; --c-windows: #5ED3D0; --c-entra: #C79BFF; --c-m365: #FF9B66; --c-azure: #5CC4F5; --c-aws: #F6C35B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55; font-variation-settings: "wdth" 100;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 12px; padding: 8px 12px; background: var(--ink); color: var(--paper); z-index: 10; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top, main, .foot { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 650; font-size: 18px; font-variation-settings: "wdth" 112; }
.mark { display: block; flex: none; color: var(--ink); } /* Reports mark, no tile: follows the theme */
.mark .mark-up { fill: var(--mark-up); }
.signin {
  display: inline-flex; align-items: center; height: 42px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: 21px; text-decoration: none;
  font-weight: 600; font-size: 15px; font-variation-settings: "wdth" 108; white-space: nowrap;
}
.signin:hover { background: var(--ink); color: var(--paper); }
.demo-btn { /* private switchboard: back to the public demo site */
  display: inline-flex; align-items: center; gap: 8px; flex: none; height: 42px; padding: 0 16px 0 14px;
  border: 1.5px solid var(--line); border-radius: 21px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 15px; font-variation-settings: "wdth" 108; white-space: nowrap;
}
.demo-btn:hover { border-color: var(--ink); }
.who .who-short { display: none; }
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; padding: 0;
  border: 1.5px solid var(--line); border-radius: 21px; background: transparent; color: var(--ink); cursor: pointer;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* Signed-in user (private switchboard only; filled by identity.js from Cloudflare Access) */
.account { display: flex; align-items: center; gap: 16px; min-width: 0; }
.who { margin: 0; min-width: 0; text-align: right; font-size: 14px; line-height: 1.3; color: var(--muted); }
.who strong { display: block; color: var(--ink); font-weight: 600; font-variation-settings: "wdth" 108; }
.who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Intro: the wordmark is the one loud element */
.intro { padding: 56px 0 40px; }
.wordmark {
  margin: 0; font-weight: 800; line-height: .9; letter-spacing: -.02em;
  font-size: clamp(56px, 11vw, 148px); font-variation-settings: "wdth" 125;
}
.wordmark-app { font-size: clamp(44px, 7vw, 92px); } /* "Reports Gateway" on one line, with a subtitle beneath */
.wordmark-sub { display: flex; align-items: flex-start; gap: .3em; margin-top: .22em; font-size: .5em; font-weight: 700; letter-spacing: -.01em; color: var(--ink-2); }
.wordmark-sub .lock { flex: none; width: .92em; height: .92em; margin-top: -.06em; } /* open padlock on the public page, closed on the private one */
/* Signed-in organisation under the subtitle (private switchboard only; filled by identity.js) */
.org { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font-size: 17px; color: var(--muted); }
.org-icon { flex: none; color: var(--ink-2); }
.org strong { color: var(--ink); font-weight: 600; font-variation-settings: "wdth" 108; }
.lead { max-width: 60ch; margin: 40px 0 0; font-size: 19px; color: var(--ink-2); }

/* Routes: gateway node, a bus, and a branch to each destination */
.routes { display: grid; grid-template-columns: 220px 1fr; column-gap: 0; align-items: center; padding: 24px 0 64px; }
.node {
  position: relative; align-self: center; padding: 22px 20px; background: var(--surface);
  border: 1.5px solid var(--ink); border-radius: 14px; text-align: left;
}
.node::after { /* link from the node to the bus */
  content: ""; position: absolute; top: 50%; left: 100%; width: 40px; height: 2px; background: var(--ink);
}
.node .mark { display: block; }
.node-name { margin: 14px 0 2px; font-weight: 650; font-size: 15px; font-variation-settings: "wdth" 108; }
.node-meta { margin: 0; font-size: 14px; color: var(--muted); }

.dest { position: relative; list-style: none; margin: 0 0 0 40px; padding: 0 0 0 var(--bus); display: grid; gap: 12px; }
.dest li { position: relative; --c: var(--signal); }
.dest li[data-site="ad"] { --c: var(--c-ad); }
.dest li[data-site="windows"] { --c: var(--c-windows); }
.dest li[data-site="entra"] { --c: var(--c-entra); }
.dest li[data-site="m365"] { --c: var(--c-m365); }
.dest li[data-site="azure"] { --c: var(--c-azure); }
.dest li[data-site="aws"] { --c: var(--c-aws); }
.dest li::after { /* the bus: each row carries its own segment, from row centre to the next */
  content: ""; position: absolute; left: calc(-1 * var(--bus)); top: 0; bottom: -12px; width: 2px; background: var(--ink);
}
.dest li:first-child::after { top: 50%; }
.dest li:last-child::after { bottom: 50%; }
.dest li::before { /* branch from the bus */
  content: ""; position: absolute; top: 50%; left: calc(-1 * var(--bus)); width: var(--bus); height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px);
}
.dest li.live::before { height: 3px; margin-top: -.5px; background: var(--c); transform-origin: left center; animation: route 900ms cubic-bezier(.2, .7, .2, 1) 250ms both; }
@keyframes route { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.dest a, .dest div {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon title state" "icon site site" "icon covers covers";
  column-gap: 16px; row-gap: 2px; padding: 16px 20px; border-radius: 10px; text-decoration: none;
}
.dest .icon { /* original line icons, one per site (not brand logos) */
  grid-area: icon; align-self: start; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin: 2px 4px 0 0; border-radius: 12px; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
}
.dest .icon svg { width: 28px; height: 28px; }
.dest li.soon .icon { background: color-mix(in srgb, var(--c) 9%, transparent); }
.dest .title { grid-area: title; font-weight: 650; font-size: 20px; font-variation-settings: "wdth" 112; }
.dest .site { grid-area: site; font-weight: 500; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.dest .covers { margin-top: 4px; }
.dest .covers { grid-area: covers; max-width: 62ch; font-size: 15px; color: var(--ink-2); }
.dest .state { grid-area: state; align-self: center; font-size: 14px; font-weight: 600; white-space: nowrap; }
/* Private switchboard: where each site is hosted, under its app. address */
.dest.hosted a, .dest.hosted div { grid-template-areas: "icon title state" "icon site site" "icon host host" "icon covers covers"; }
.dest .host { grid-area: host; font-size: 14px; color: var(--muted); }
.dest .host strong { font-weight: 600; color: var(--ink-2); }

.dest li.live a { background: var(--surface); border: 1.5px solid var(--c); border-top-width: 5px; }
.dest li.live a:hover { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.dest li.live .state { color: var(--c); }
.dest li.soon div { border: 1.5px dashed var(--line); border-top: 5px solid var(--c); }
.dest li.soon .title { color: var(--ink-2); }
.dest li.soon .state { color: var(--muted); font-weight: 500; }

/* Private sites */
.private { padding: 40px 0 72px; border-top: 1.5px solid var(--line); }
.private-in { max-width: 640px; }
.private h2 { margin: 0 0 8px; font-size: 28px; font-weight: 700; font-variation-settings: "wdth" 112; }
.private p { margin: 0 0 20px; color: var(--ink-2); }
.private code { font-family: inherit; font-weight: 650; color: var(--ink); }
.signin-lg { height: 48px; padding: 0 24px; border-radius: 24px; font-size: 16px; background: var(--ink); color: var(--paper); }
.signin-lg:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.note { margin: 12px 0 0 !important; font-size: 14px; color: var(--muted) !important; }

.foot { padding-top: 20px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0; }

/* Narrow screens: the node sits above, the bus runs down the left */
@media (max-width: 760px) {
  .top, main, .foot { padding-left: 16px; padding-right: 16px; }
  .account { gap: 10px; }
  .theme-btn { width: 38px; height: 38px; }
  .demo-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .demo-btn span { display: none; }
  .who .who-full { display: none; }
  .who .who-short { display: inline; }
  .who .who-label, .who .who-email { display: none; }
  .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .has-account .brand span { display: none; } /* logo only, to make room for the signed-in name */
  .intro { padding: 32px 0 28px; }
  .lead { font-size: 17px; }
  .org { margin-top: 14px; font-size: 15px; }
  .routes { grid-template-columns: 1fr; padding-bottom: 48px; }
  .node { justify-self: start; display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
  .node .mark { width: 40px; height: 40px; }
  .node-name { margin: 0; }
  .node::after { top: 100%; left: 34px; width: 2px; height: 24px; }
  .dest { --bus: 22px; margin: 24px 0 0 34px; }
  .dest li:first-child::after { top: -24px; }
  .dest a, .dest div { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon title" "site site" "covers covers" "state state"; column-gap: 12px; padding: 14px 16px; }
  .dest .title { font-size: 17px; }
  .dest .icon { align-self: center; width: 32px; height: 32px; margin: 0; border-radius: 8px; }
  .dest .icon svg { width: 20px; height: 20px; }
  .dest .site { margin-top: 4px; }
  .dest .state { margin-top: 6px; }
  .dest.hosted a, .dest.hosted div { grid-template-areas: "icon title" "site site" "host host" "covers covers" "state state"; }
}

@media (prefers-reduced-motion: reduce) {
  .dest li.live::before { animation: none; }
}
