/* EasyEngine MCP connect page. Self-hosted only: the page's CSP allows nothing but this origin. */
@font-face {
  font-family: "Reddit Sans";
  src: url("fonts/reddit-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Reddit Mono";
  src: url("fonts/reddit-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

/* easyengine.io and rtcamp.com brand colours */
:root {
  --berry: #ab3a6c;
  --ember: #e6533a;
  --ground: #fdf5ed;
  --ink: #2a2226;
  --muted: #5a4e54;
  --line: rgba(85, 30, 55, 0.16);
  --field: rgba(255, 255, 255, 0.7);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 60px -28px rgba(85, 30, 55, 0.35);
  --tab-active: #ffffff;
  --link: #ab3a6c;
  --code-bg: #1d141b;
  --code-ink: #fdf5ed;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #140e13; --ink: #f6eee6; --muted: #c9bcc2; --line: rgba(255, 255, 255, 0.14);
    --field: rgba(255, 255, 255, 0.06); --glass: rgba(32, 22, 30, 0.55); --glass-edge: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.6);
    --tab-active: rgba(255, 255, 255, 0.1); --link: #e88bb2; --code-bg: #0b070a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #140e13; --ink: #f6eee6; --muted: #c9bcc2; --line: rgba(255, 255, 255, 0.14);
  --field: rgba(255, 255, 255, 0.06); --glass: rgba(32, 22, 30, 0.55); --glass-edge: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px -28px rgba(0, 0, 0, 0.6);
  --tab-active: rgba(255, 255, 255, 0.1); --link: #e88bb2; --code-bg: #0b070a; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  font-family: "Reddit Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
a { color: var(--link); font-weight: 600; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
.mono { font-family: "Reddit Mono", ui-monospace, Menlo, monospace; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 600; }

/* Fixed and clipped, so the glows can never widen the page (overflow: hidden on body still scrolls by script). */
.backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.glow-ember { top: -20%; right: -10%; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(230, 83, 58, 0.3), rgba(230, 83, 58, 0) 65%); }
.glow-berry { top: 30%; left: -15%; width: 680px; height: 680px;
  background: radial-gradient(circle, rgba(171, 58, 108, 0.28), rgba(171, 58, 108, 0) 65%); }

.page {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.top-actions a { min-height: 44px; display: inline-flex; align-items: center; }

.hero { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.eyebrow { font-family: "Reddit Mono", ui-monospace, monospace; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--link); font-weight: 500; }
h1 { margin: 0; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.03em;
  font-weight: 800; text-wrap: balance; }
.gradient-text { background: linear-gradient(90deg, var(--berry), var(--ember)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.panel-title { margin: 0; font-size: 16px; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
.panel { border-radius: 22px; padding: 22px; }
.url-panel, .stack, .tab-panel { display: flex; flex-direction: column; gap: 14px; }
.stack { gap: 16px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }

.field {
  flex: 999 1 320px; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--field); color: inherit; font-size: 16px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
  padding: 0 20px; border-radius: 14px; font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 0; color: inherit;
}
.btn:focus-visible, .tab:focus-visible, .tab-panel:focus-visible, .theme-toggle:focus-visible, .field:focus-visible {
  outline: 3px solid var(--ember); outline-offset: 2px;
}
.btn-primary {
  flex: 1 1 140px; color: #fff; background: linear-gradient(135deg, var(--berry), var(--ember));
  box-shadow: 0 10px 24px -10px rgba(171, 58, 108, 0.7);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }
.btn-quiet { flex: 1 1 120px; background: var(--field); border: 1px solid var(--line); }

.installs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.install { justify-content: flex-start; min-height: 64px; color: var(--ink); }
.install:hover { color: var(--ink); border-color: var(--berry); }
/* Official marks, unmodified, with clear space around them (the VS Code guideline asks for 25% of the icon). */
.logo { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.logo img { display: block; max-width: 24px; max-height: 24px; }
.logo .on-dark { display: none; }
:root[data-theme="dark"] .logo .on-light { display: none; }
:root[data-theme="dark"] .logo .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo .on-light { display: none; }
  :root:not([data-theme="light"]) .logo .on-dark { display: block; }
}
.trademarks { flex-basis: 100%; font-size: 12px; line-height: 1.5; }

/* Equal, centred segments that share the width: a long label wraps inside its own tab instead of the row. */
.tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px;
  border-radius: 14px; background: var(--field);
}
.tab {
  min-height: 44px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; text-align: center; cursor: pointer;
  color: inherit;
}
.tab[aria-selected="true"] { background: var(--tab-active); border-color: rgba(171, 58, 108, 0.35); color: var(--link); }
.tabs:not([hidden]) ~ .tab-panel .panel-title { display: none; }
.tab-panel p { margin: 0; font-size: 15px; line-height: 1.6; }
.code {
  flex: 999 1 360px; min-width: 0; margin: 0; padding: 16px; border-radius: 14px; background: var(--code-bg);
  color: var(--code-ink); font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
}
code.mono { font-size: 0.92em; }
.callout {
  margin-top: 6px; padding: 16px 18px; border-radius: 14px; background: var(--field);
  border: 1px solid rgba(171, 58, 108, 0.35); display: flex; flex-direction: column; gap: 10px;
}
.callout-title { font-size: 17px; color: var(--link); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px;
  font-size: 15px; line-height: 1.6; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feature { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.feature strong { font-size: 16px; }
.feature span { font-size: 14px; line-height: 1.55; }

.theme-toggle {
  width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; flex: none; border-radius: 12px;
  border: 1px solid var(--line); background: var(--field); color: inherit; cursor: pointer;
}
/* Show the icon for the theme a click switches to. */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.help-foot { display: none; }

/* Phones: the header keeps one row (help moves to the footer) and the app tabs become an even 2 x 2 grid. */
@media (max-width: 560px) {
  .top { flex-wrap: nowrap; }
  .brand { min-width: 0; }
  .help-top { display: none !important; }
  .help-foot { display: inline; }
  .panel { padding: 18px; }
  .tabs { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
