/* Hallmark · redesign · macrostructure: Product Console (the page dressed as the app's 10-foot UI)
 * tone: utilitarian-dark · anchor hue: the app's green #2FB88C · nav: Console top bar (LB/RB tabs) · footer: hint bar
 * Console Mode page. Its own look, taken from the app itself: the WinUI dark
 * greys and the brand green (src/ConsoleMode/App.xaml, docs/explainer/theme.ts),
 * the Console interface's tiles, white focus ring, LB/RB tabs and the
 * controller hints at the bottom. Inter, like the app's videos. */
:root {
  --bg: #141417;
  --bg-2: #0b0b0e;
  --surface: #1d1d21;
  --card: #232329;
  --tile: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  --tile-hi: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .06));
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --ink: #ededf0;
  --ink-2: #b4b4be;
  --ink-3: #8a8a96;
  --green: #3ecfa0;          /* SystemAccentColorLight1-ish, the green on dark */
  --green-btn: #2fb88c;      /* SystemAccentColor */
  --green-deep: #15805f;     /* SystemAccentColorDark2 */
  --on-green: #04140e;
  --focus: #fff;
  --radius: 16px;            /* ConsoleCard */
  --radius-s: 8px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --sans: Inter, "Segoe UI Variable Text", "Segoe UI", -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur: .16s;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body.cm { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip;
  background: radial-gradient(90% 60% at 15% 0%, rgba(47, 184, 140, .13), transparent 60%), linear-gradient(180deg, #10201b 0, var(--bg) 760px) no-repeat, var(--bg); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-s); }
.cm-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.cm-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* controller badges (HintBadge in the app) */
kbd { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); font: 600 .75rem/1 var(--sans); color: var(--ink); white-space: nowrap; }

/* top bar: brand, LB · tabs · RB, round buttons and the clock */
.cm-top { position: sticky; top: 0; z-index: 10; background: rgba(16, 22, 20, .78); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px); border-bottom: 1px solid var(--line); }
.cm-top-in { height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.cm-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.0625rem; white-space: nowrap; }
.cm-brand img { width: 32px; height: 32px; border-radius: 50%; }
.cm-brand.small { font-size: .9375rem; }
.cm-brand.small img { width: 22px; height: 22px; }
.cm-tabs { display: flex; align-items: center; gap: 4px; }
.cm-tabs kbd { margin: 0 8px; color: var(--ink-2); }
.cm-tabs a { position: relative; padding: 8px 16px; border-radius: 22px; font-size: 1rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: color var(--dur) var(--ease-out); }
.cm-tabs a:hover, .cm-tabs a.on { color: var(--ink); }
.cm-tabs a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -2px; height: 3px; border-radius: 2px; background: var(--green); transform: scaleX(0); transition: transform .2s var(--ease-out); }
.cm-tabs a.on::after { transform: none; }
.cm-top-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.cm-round { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink-2); transition: background var(--dur), color var(--dur); }
.cm-round svg { width: 18px; height: 18px; fill: currentColor; }
.cm-round:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cm-lang { display: grid; place-items: center; height: 40px; min-width: 40px; padding: 0 10px; border-radius: 20px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.cm-lang:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cm-clock { margin-left: 6px; font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.cm-clock:empty { display: none; }

/* tiles: the Console interface's cards */
.cm-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--radius); background: var(--tile); border: 1px solid var(--line); }
a.cm-tile { transition: transform var(--dur) var(--ease-out), background var(--dur); }
a.cm-tile:hover { background: var(--tile-hi); transform: scale(1.015); }
a.cm-tile:hover, a.cm-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--radius); }
a.cm-tile:active { transform: scale(.995); }
.cm-tile .cm-ico { color: var(--ink); margin-bottom: auto; }
.cm-tile-name { margin-top: 26px; font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.cm-tile-name small { margin-left: 4px; font-weight: 500; font-size: .875rem; color: var(--ink-3); }
.cm-tile-note { font-size: .875rem; color: var(--ink-2); }
.cm-tile-label { font-size: .8125rem; color: var(--ink-3); }

/* hero */
.cm-hero { padding: clamp(40px, 6vw, 80px) 0 0; }
.cm-hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.cm-badge { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: .8125rem; color: var(--ink-2); }
.cm-badge span { padding: 2px 10px; border-radius: 999px; background: var(--green); color: var(--on-green); font-weight: 600; font-size: .75rem; }
.cm-hero h1 { margin-top: 20px; font-weight: 700; font-size: clamp(2.375rem, 1.5rem + 3.2vw, 4rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; min-width: 0; }
.cm-lead { margin-top: 20px; font-size: 1.125rem; color: var(--ink-2); max-width: 32em; }
.cm-tour { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.cm-tour video { width: 100%; aspect-ratio: 16 / 9; }

.cm-label { margin-top: clamp(40px, 5vw, 64px); font-weight: 600; font-size: 1.125rem; color: var(--ink-2); }
.cm-dl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; margin-top: 12px; }
.cm-dl .cm-tile { min-height: 168px; }
.cm-tile-go { background: linear-gradient(160deg, #2a9d77, var(--green-deep)); border-color: transparent; outline: 3px solid var(--focus); outline-offset: 4px; }
.cm-tile-go:hover { background: linear-gradient(160deg, #31b087, #188c68); }
.cm-tile-go .cm-tile-name small, .cm-tile-go .cm-tile-note { color: rgba(255, 255, 255, .78); }
.cm-pill { position: absolute; top: 18px; right: 18px; padding: 3px 12px; border-radius: 999px; background: #9beacf; color: var(--on-green); font-size: .8125rem; font-weight: 600; }
.cm-winget-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-winget code { font-family: var(--mono); font-size: .8125rem; padding: 6px 10px; border-radius: var(--radius-s); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); overflow-wrap: anywhere; }
.cm-winget button { font: 600 .8125rem var(--sans); color: var(--ink); background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 6px 12px; cursor: pointer; transition: background var(--dur); }
.cm-winget button:hover { background: rgba(255, 255, 255, .14); }
.cm-winget button:active { background: rgba(255, 255, 255, .06); }
.cm-winget button.done { color: var(--green); border-color: rgba(62, 207, 160, .5); }
.cm-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; font-size: .8125rem; color: var(--ink-3); }
.cm-meta a:hover { color: var(--ink); }

/* sections */
.cm-sec { padding: clamp(64px, 9vw, 112px) 0 0; }
.cm-sec h2, .cm-end h2 { font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); line-height: 1.12; letter-spacing: -.025em; overflow-wrap: anywhere; }
.cm-sub { margin-top: 12px; color: var(--ink-2); max-width: 40em; }
.cm-sub a { color: var(--green); }
.cm-sub a:hover { text-decoration: underline; }

.cm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; counter-reset: s; }
.cm-steps .cm-ico { margin-bottom: 22px; color: var(--green); }
.cm-steps h3, .cm-feats h3 { font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.cm-steps p, .cm-feats p { color: var(--ink-2); font-size: .9375rem; }
.cm-steps .cm-tile-label { position: absolute; top: 18px; right: 20px; }

/* controller shortcuts: the app's dialog */
.cm-pad-in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.cm-dialog { border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); overflow: hidden; }
.cm-pad li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 18px 24px; }
.cm-pad li + li { border-top: 1px solid var(--line); }
.cm-hold { font-weight: 600; }
.cm-does { grid-column: 1; font-size: .9375rem; color: var(--ink-2); }
.cm-keys { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 15em; }
.cm-keys i { font-style: normal; color: var(--ink-3); }
.cm-keys small { width: 100%; text-align: right; font-size: .75rem; color: var(--ink-3); }

.cm-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.cm-feats .cm-ico { margin-bottom: 26px; }
.cm-feats li:nth-child(6) { background: linear-gradient(160deg, rgba(47, 184, 140, .32), rgba(21, 128, 95, .18)); border-color: rgba(62, 207, 160, .3); }

.cm-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 28px; }
.cm-shots figure:first-child { grid-column: 1 / -1; }
.cm-shots img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.cm-shots figcaption { margin-top: 10px; font-size: .875rem; color: var(--ink-3); }

.cm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.cm-news { margin-top: 20px; }
.cm-news li { position: relative; padding-left: 24px; color: var(--ink-2); font-size: .9375rem; }
.cm-news li + li { margin-top: 10px; }
.cm-news li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.cm-faq { margin-top: 20px; display: grid; gap: 8px; }
.cm-faq details { border-radius: 12px; background: var(--tile); border: 1px solid var(--line); }
.cm-faq details[open] { background: var(--tile-hi); }
.cm-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; border-radius: 12px; }
.cm-faq summary:hover { background: rgba(255, 255, 255, .04); }
.cm-faq summary::-webkit-details-marker { display: none; }
.cm-faq summary::after { content: "+"; flex: none; color: var(--green); font-weight: 400; font-size: 1.375rem; line-height: 1; transition: transform .2s var(--ease-out); }
.cm-faq details[open] summary::after { transform: rotate(45deg); }
.cm-faq p { padding: 0 18px 16px; color: var(--ink-2); font-size: .9375rem; }

/* closing call */
.cm-end { margin-top: clamp(72px, 10vw, 128px); padding: clamp(56px, 8vw, 96px) 0; text-align: center; background: radial-gradient(50% 90% at 50% 0%, rgba(47, 184, 140, .18), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); }
.cm-end img { margin: 0 auto 20px; width: 64px; height: 64px; border-radius: 50%; }
.cm-end p { margin: 14px auto 28px; max-width: 34em; color: var(--ink-2); }
.cm-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; background: var(--green-btn); color: var(--on-green); font-weight: 700; white-space: nowrap; transition: background var(--dur), transform var(--dur) var(--ease-out); }
.cm-btn small { font-weight: 500; opacity: .7; }
.cm-btn:hover { background: var(--green); }
.cm-btn:active { transform: scale(.98); }

.cm-foot { padding: 32px 0 96px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-3); background: var(--bg-2); }
.cm-foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.cm-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.cm-foot a { white-space: nowrap; }
.cm-foot a:hover { color: var(--ink); }
.cm-foot p { margin-left: auto; }
.cm-foot p a { color: var(--ink-2); }

/* the controller hints at the bottom, as in the app */
.cm-hints { position: fixed; right: var(--gutter); bottom: 18px; z-index: 9; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(20, 20, 23, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); font-size: .875rem; }
.cm-hints a { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; transition: background var(--dur), color var(--dur); }
.cm-hints a:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cm-hints kbd { min-width: 28px; height: 28px; padding: 0; }
.cm-hints kbd.a { background: var(--green-btn); border-color: transparent; color: var(--on-green); }

@media (max-width: 1080px) {
  .cm-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-tabs kbd { display: none; }
}
@media (max-width: 900px) {
  .cm-top-in { grid-template-columns: 1fr auto; }
  .cm-tabs { display: none; }
  .cm-clock { display: none; }
  .cm-hero-in, .cm-two, .cm-pad-in { grid-template-columns: minmax(0, 1fr); }
  .cm-dl, .cm-steps { grid-template-columns: minmax(0, 1fr); }
  .cm-dl .cm-tile { min-height: 0; }
  .cm-tile-name { margin-top: 14px; }
  .cm-shots { grid-template-columns: minmax(0, 1fr); }
  .cm-foot p { margin-left: 0; }
}
@media (max-width: 560px) {
  .cm-feats { grid-template-columns: minmax(0, 1fr); }
  .cm-pad li { grid-template-columns: minmax(0, 1fr); }
  .cm-keys { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 6px; }
  .cm-keys small { text-align: left; }
  .cm-hints { left: var(--gutter); justify-content: space-between; }
  .cm-hints a { padding-right: 8px; }
  .cm-pill { position: static; align-self: flex-start; order: -1; margin-bottom: 4px; }
  .cm-feats .cm-ico, .cm-steps .cm-ico { margin-bottom: 10px; }
  .cm-tile { padding: 18px; }
}
@media (max-width: 400px) {
  .cm-hints a:last-child { display: none; }
  .cm-hints { justify-content: flex-start; }
}
@media not all {
  html { scroll-behavior: auto; }
  a.cm-tile, .cm-btn, .cm-tabs a::after { transition: none; }
  a.cm-tile:hover { transform: none; }
}

/* ── arriving from the lippdev site (render.mjs sets html.cm-from-site) ──
   The page starts on the same frame the site's transition ended on, the icon
   centred on the app background, then that screen fades away and the hero
   rises into place. */
html.cm-from-site::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: url("icon.png") center / 72px 72px no-repeat, radial-gradient(50% 45% at 50% 50%, rgba(54, 202, 144, .14), transparent 70%), #0a1414; animation: cm-veil-out .5s .08s cubic-bezier(.4, 0, .2, 1) forwards; }
html.cm-from-site .cm-hero-text > *, html.cm-from-site .cm-tour { animation: cm-rise .7s cubic-bezier(.2, .8, .2, 1) backwards; }
html.cm-from-site .cm-hero-text > :nth-child(2) { animation-delay: .16s; }
html.cm-from-site .cm-hero-text > :nth-child(3) { animation-delay: .22s; }
html.cm-from-site .cm-hero-text > :nth-child(n+4) { animation-delay: .28s; }
html.cm-from-site .cm-tour { animation-delay: .3s; }
html.cm-from-site .cm-hero-text > :first-child { animation-delay: .1s; }
@keyframes cm-veil-out { to { opacity: 0; visibility: hidden; } }
@keyframes cm-rise { from { opacity: 0; transform: translateY(14px); } }
@media not all { html.cm-from-site::after { display: none; } html.cm-from-site * { animation: none !important; } }
