/* The public welcome page (19 Nov 2026; templates/welcome/index.html). Its own tokens, because the staff pages'
   style.css is behind the sign-in. Dark by default, as the staff tools are; light only when someone has chosen it
   (data-theme, set before paint from the shared kl_theme cookie; the top bar's switch flips it), never from the
   device's setting (20 Nov 2026). The hub colours come from _theme.html's block,
   written into the page by app/welcome.py. Mobile first; phone or desktop is decided by the pointer, never width alone
   (Darren's Pixel runs Edge in desktop-site mode). */

:root {
  --bg: #0d1117; --bg2: #11161d; --card: #161b22; --border: #30363d; --text: #e6edf3; --muted: #9da7b3;
  --kl: #d9172a; --kl-dark: #990f1b; --kl-text: #ff6b70; --on-kl: #ffffff;
  --road: #2a3038; --dash: #6e7681; --shadow: rgba(0, 0, 0, .45);
  --glow: radial-gradient(55% 50% at 50% 40%, rgba(217, 23, 42, .16), transparent 72%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fbfaf7; --bg2: #f3f1ec; --card: #ffffff; --border: #d8dbe0; --text: #1f2328; --muted: #57606a;
  --kl-text: #b3121f; --road: #d5d9df; --dash: #8c959f; --shadow: rgba(31, 35, 40, .16);
  --glow: radial-gradient(55% 50% at 50% 40%, rgba(217, 23, 42, .08), transparent 72%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.wl { margin: 0; color: var(--text); overflow-x: clip;
  background: var(--glow) no-repeat 50% 0 / 100% min(1400px, 150vw), var(--bg);
  font: 1.1rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.wl a { color: var(--kl-text); text-underline-offset: .18em; }
.wl a:focus-visible, .ms-btn:focus-visible { outline: 3px solid var(--hub-blue); outline-offset: 3px; border-radius: 4px; }
.wl h1, .wl h2, .wl h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
.wl p { margin: 0 0 1rem; }
.wl .ic { flex: 0 0 auto; }
/* Darren, 19 Nov 2026: "use more of the width", and paragraphs run the full width of the red lines */
main, .wl-top, .wl-foot-in { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 16px; }

/* --- the top: the logo on its white plate, three links ----------------------------------------------------- */
.wl-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 14px; padding-bottom: 6px; }
.wl-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 6px 10px;
  box-shadow: 0 0 0 1px var(--border);
  /* in proportion to the heading (Darren, 19 Nov 2026: "too small ... in relation to the size of the font") */
  height: 60px; flex: 0 1 auto; min-width: 0; padding: 8px 12px; border-radius: 10px; }
.wl-logo .kl-lockup { display: block; height: 100%; width: auto; max-width: 100%; overflow: visible; }
.wl-topnav { display: flex; gap: 1.2rem; align-items: center; font-size: 1rem; }
.wl-topnav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.wl-topnav a:hover { color: var(--text); }
.wl-topnav a:not(.wl-topnav-cta) { display: none; }
.wl-topnav-cta { border: 1px solid var(--border); border-radius: 999px; padding: .3rem .85rem; }
/* the light/dark switch, as on the staff tools' top bar (style.css .theme-toggle); a bigger target on touch */
.theme-toggle { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 3px solid var(--hub-blue); outline-offset: 3px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (hover: hover) and (pointer: fine) { .theme-toggle { width: 34px; height: 34px; border-radius: 8px; } }

/* --- the hero -------------------------------------------------------------------------------------------- */
.wl-hero { position: relative; padding: 1.6rem 0 1rem; }
.wl-kicker { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.45rem); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem !important; }
.wl h1 { font-size: clamp(2.1rem, 7.4vw, 4.6rem); font-weight: 800; letter-spacing: -.02em; }
.wl h1 span { color: var(--kl-text); display: inline-block; }
.wl-sub { font-size: clamp(1.15rem, 3.6vw, 1.55rem); color: var(--muted); max-width: 52ch; margin-top: 1rem !important; }
.wl-sub strong { color: var(--text); }

.wl-stage { position: relative; margin: .4rem -16px 0; }
.wl-ring { display: block; width: 100%; height: auto; }
.wl-stage canvas { display: none; }
.wl-stage.has-3d .wl-ring { display: none; }
.wl-stage.has-3d { height: clamp(420px, 44vw, 660px); }
.wl-stage.has-3d canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }

/* the drawing (phones, reduced motion, and until three.js is ready) */
.r-road rect, .r-road path { fill: var(--road); }
.r-lane { fill: none; stroke: var(--road); stroke-width: 72; }
.r-island { fill: var(--bg); }
.r-dash path { fill: none; stroke: var(--dash); stroke-width: 3; stroke-dasharray: 16 14; opacity: .7; }
.r-ring { fill: none; stroke: var(--kl); stroke-width: 50; }
.r-dot { fill: var(--kl-dark); }
.r-shadow { fill: var(--shadow); }
.r-paper { fill: #f7f3ea; stroke: rgba(31, 35, 40, .15); stroke-width: 1.5; }
.r-body, .r-tab { stroke: rgba(0, 0, 0, .18); stroke-width: 1.5; }
.r-tab { filter: brightness(.88); }
.r-label { fill: #fbfaf6; stroke: rgba(31, 35, 40, .2); stroke-width: 1.5; }
.r-name { fill: #1f2328; font: 700 29px -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  text-anchor: middle; dominant-baseline: middle; }
.r-ifp { fill: var(--hub-orange); }
.hub-yellow { --c: var(--hub-yellow); } .hub-blue { --c: var(--hub-blue); } .hub-purple { --c: var(--hub-purple); }
.hub-red { --c: var(--hub-red); } .hub-green { --c: var(--hub-green); }
.r-folder .r-body, .r-folder .r-tab { fill: var(--c); }

/* the five kinds of matter, under the roundabout */
.wl-hubs { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: 1fr; }
.wl-hubs li { background: var(--card); border: 1px solid var(--border); border-left: 6px solid var(--c);
  border-radius: 10px; padding: .85rem 1.05rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wl-hubs strong { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.wl-hubs strong i { width: .8rem; height: .8rem; border-radius: 3px; background: var(--c); flex: 0 0 auto; }
.wl-hubs span { display: block; color: var(--muted); font-size: 1.08rem; line-height: 1.45; margin-top: .15rem; }
.wl-hubs li.is-lit { border-color: var(--c); transform: translateY(-3px); box-shadow: 0 8px 24px var(--shadow); }
.wl .wl-hint { color: var(--muted); font-size: 1.05rem; margin: 1.1rem 0 0; }

/* --- the sections ------------------------------------------------------------------------------------------ */
.wl-section { padding: 2.6rem 0 .6rem; }
.wl h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 800; display: flex; align-items: center; gap: .6rem;
  padding-top: .9rem; border-top: 3px solid var(--kl); margin-bottom: 1rem; }
.wl h2 .ic { color: var(--kl-text); }
.wl-lead { font-size: clamp(1.2rem, 3.6vw, 1.5rem); }
.wl-principle { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--border);
  border-left: 6px solid var(--kl); border-radius: 10px; padding: 1rem 1.1rem; font-size: clamp(1.1rem, 3vw, 1.3rem); }
.wl-principle .ic { color: var(--kl-text); width: 36px; height: 36px; }

.wl-two { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.wl-point { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.2rem .3rem 4.4rem; }
.wl-num { position: absolute; left: 1.1rem; top: 1.05rem; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--kl); color: var(--on-kl); font-weight: 800; font-size: 1.25rem; display: grid; place-items: center; }
.wl-point h3 { font-size: 1.35rem; margin: .25rem 0 .5rem; }
.wl-team-h { font-size: 1.4rem; margin: 2rem 0 .8rem !important; }
.wl-team { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: 1fr; }
.wl-team li { display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: start; align-content: start;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.wl-team .ic { grid-row: span 2; color: var(--hub-green-text); }
.wl-team li:nth-child(2) .ic { color: var(--hub-blue-text); }
.wl-team li:nth-child(3) .ic { color: var(--hub-purple-text); }
.wl-team strong { font-size: 1.15rem; }
.wl-team span { color: var(--muted); }

/* See it in action: the tour mounts here (tour.css styles the film); until it does, the line stands on its own */
.wl-tour-line { color: var(--muted); }

/* --- the call to action: Microsoft's own sign-in button ---------------------------------------------------- */
.wl-cta { text-align: left; }
.wl-cta-btn { margin: 1.2rem 0 1rem !important; }
.wl-small { color: var(--muted); font-size: 1.05rem; }
.ms-btn { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 41px; padding: 0 12px;
  font: 600 15px/1 "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #5e5e5e !important; background: #ffffff; border: 1px solid #8c8c8c; border-radius: 0;
  text-decoration: none !important; cursor: pointer; user-select: none; }
:root:not([data-theme="light"]) .ms-btn { color: #ffffff !important; background: #2f2f2f; border-color: #5e5e5e; }
.ms-btn:hover { filter: brightness(.96); }
:root:not([data-theme="light"]) .ms-btn:hover { filter: brightness(1.15); }
.ms-logo { flex: 0 0 auto; }
.ms-spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: ms-spin .8s linear infinite; }
.ms-btn.is-busy { opacity: .7; pointer-events: none; cursor: progress; }
.ms-btn.is-busy .ms-spin { display: inline-block; }
@keyframes ms-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ms-spin { animation-duration: 2.4s; } }

/* --- the foot: Darren's details ---------------------------------------------------------------------------- */
.wl-foot { margin-top: 3rem; background: var(--bg2); border-top: 1px solid var(--border); padding: 2.4rem 0 1.4rem; }
.wl-foot-in { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
.wl-foot h2 { border-top: 0; padding-top: 0; }
.wl-foot-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.wl-btn { display: inline-block; padding: .55rem 1.05rem; border-radius: 8px; background: var(--kl); color: var(--on-kl) !important;
  font-weight: 700; text-decoration: none; border: 2px solid var(--kl); }
.wl-btn:hover { filter: brightness(1.08); }
.wl-btn-quiet { background: transparent; color: var(--text) !important; border-color: var(--border); }
.wl-btn-quiet:hover { border-color: var(--kl); }
.wl-card { font-style: normal; background: var(--card); border: 1px solid var(--border); border-top: 5px solid var(--kl);
  border-radius: 12px; padding: 1.1rem 1.2rem; min-width: 0; }
.wl-card-name { font-size: 1.25rem; margin: 0 !important; }
.wl-card-role { color: var(--muted); margin-bottom: .8rem !important; }
.wl-card dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: 0; font-size: 1rem; }
.wl-card dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .15rem; }
.wl-card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.wl-legal { text-align: center; color: var(--muted); font-size: 1rem; margin: 2rem 0 0 !important; padding: 0 16px; }

/* --- bigger screens ---------------------------------------------------------------------------------------- */
@media (min-width: 560px) {
  .wl-hubs { grid-template-columns: repeat(2, 1fr); }
  .wl-logo { height: 72px; }
}
@media (min-width: 760px) {
  main, .wl-top, .wl-foot-in { padding-left: 32px; padding-right: 32px; }
  .wl-stage { margin: .4rem 0 0; }
  .wl-topnav a:not(.wl-topnav-cta) { display: inline; }
  .wl-two { grid-template-columns: 1fr 1fr; }
  .wl-team { grid-template-columns: repeat(3, 1fr); }
  .wl-foot-in { grid-template-columns: 1.1fr 1fr; align-items: start; }
}
@media (min-width: 1000px) {
  body.wl { font-size: 1.2rem; }
  .wl-logo { height: clamp(84px, 7vw, 110px); padding: 10px 16px; }
  .wl-topnav { font-size: 1.1rem; }
  .wl-top { padding-top: 20px; }
  .wl-hubs { grid-template-columns: repeat(5, 1fr); gap: .9rem; }
  .wl-hubs span { font-size: 1.12rem; }
  .wl-hero { padding-top: 2.6rem; }
  .wl-ring { max-width: 1100px; margin: 0 auto; }
}
@media (min-width: 1400px) {
  main, .wl-top, .wl-foot-in { padding-left: 48px; padding-right: 48px; }
  .wl-hubs strong { font-size: 1.3rem; }
  .wl-hubs span { font-size: 1.2rem; }
}

/* a desktop (by pointer): the hero words beside more room for the roundabout */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .wl-hero-words { text-align: center; }
  .wl .wl-sub { margin-left: auto; margin-right: auto; }
  /* the 3D roundabout runs the full width of the window, its roads fading out at both edges */
  .wl-stage.has-3d { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
}

@media print {
  .wl-stage, .wl-topnav, .wl-tour, .ms-btn { display: none !important; }
  body.wl { background: #fff; color: #000; }
  .wl-in, .wl-in * { opacity: 1 !important; transform: none !important; }
}
