/* ============================================================
   GUToolkit static product site
   Left: content column. Right: sticky download/contact rail.
   Neutral surface, one accent, hairline rules. Light + dark.
   ============================================================ */

/* ---------- self-hosted fonts (no external requests) ---------- */
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/lato-700.woff2") format("woff2");
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400 700;   /* variable font — covers 400/500/700 */
  font-display: swap;
  src: url("fonts/roboto-var.woff2") format("woff2");
}

:root {
  --accent: #2bae66;
  --accent-strong: #1f8f52;
  --accent-ink: #ffffff;

  --bg: #fcf6f5;
  --ink: #1d1a18;
  --ink-soft: #56514e;
  --ink-faint: #8c847f;
  --rule: #ece2df;
  --field-bg: #ffffff;
  --field-border: #ddd2ce;

  --font-sans: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Lato", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --measure: 40rem;
  --rail-w: 22rem;
  --gap: clamp(2rem, 5vw, 4.5rem);
  --header-h: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --accent: #4ece88;
    --accent-strong: #6bd89e;
    --accent-ink: #06251a;
    --bg: #14140f;
    --ink: #ecebe6;
    --ink-soft: #b4afa5;
    --ink-faint: #7f7a70;
    --rule: #2b2a24;
    --field-bg: #1f1e1a;
    --field-border: #37352e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #4ece88;
  --accent-strong: #6bd89e;
  --accent-ink: #06251a;
  --bg: #14140f;
  --ink: #ecebe6;
  --ink-soft: #b4afa5;
  --ink-faint: #7f7a70;
  --rule: #2b2a24;
  --field-bg: #1f1e1a;
  --field-border: #37352e;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; letter-spacing: -0.018em; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: .84em;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: 4px;
  padding: .06em .35em;
}
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* mono label used throughout */
.kicker, .eyebrow, .rail-label, .form-status, .footer-inner, .header-download {
  font-family: var(--font-sans);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 74rem; margin: 0 auto;
  height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 2rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--font-display);
  color: var(--ink); font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.05rem; text-decoration: none;
}
.header-right { display: flex; align-items: center; gap: .6rem; }
.header-download {
  font-size: .8rem; letter-spacing: .02em;
  color: var(--accent); border: 1px solid currentColor;
  padding: .32rem .8rem; border-radius: 6px; text-decoration: none;
}
.header-download:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.theme-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--rule); border-radius: 7px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .icon-sun { display: none; }
  html:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ---------- two-column layout ---------- */
.layout {
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: var(--gap);
  align-items: start;
}
#top { position: absolute; }

/* ---------- left: content ---------- */
.content { min-width: 0; max-width: var(--measure); }

.kicker {
  color: var(--accent);
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
  margin: 0 0 1.4rem;
}
.intro { padding-top: .5rem; }
.intro h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.25rem);
  margin: 0 0 1.3rem;
  max-width: 17ch;
}
.lead { font-size: 1.16rem; margin: 0; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: clamp(2.5rem, 5vw, 3.5rem) 0;
}

.block-intro { color: var(--ink-soft); margin: 0 0 1.6rem; }
.eyebrow {
  color: var(--ink-faint);
  font-size: .78rem; letter-spacing: .03em; text-transform: uppercase;
  margin: 0 0 .5rem;
}
.block h2 { font-size: clamp(1.5rem, 3.5vw, 1.9rem); margin: 0 0 .7rem; }

/* install steps — numbered, minimal */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps > li {
  counter-increment: s;
  position: relative;
  padding: 0 0 2rem 3rem;
  border-left: 1px solid var(--rule);
  margin-left: .9rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(s);
  position: absolute; left: -0.95rem; top: -0.1rem;
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  font-family: var(--font-mono); font-size: .85rem; font-weight: 700;
}
.steps h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.steps p { margin: 0 0 .5rem; color: var(--ink-soft); }
.aside-note {
  font-size: .93rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-left: .85rem;
  color: var(--ink-soft);
}
.aside-note strong { color: var(--ink); }

/* collapsible install steps */
.steps-toggle { margin: 0; }
.steps-toggle > summary {
  cursor: pointer; list-style: none; width: fit-content;
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-sans);
  font-weight: 600; font-size: .9rem;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  padding: .55rem 1.2rem;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}
.steps-toggle > summary::-webkit-details-marker { display: none; }
/* chevron drawn from borders — thinner and cleaner than a glyph */
.steps-toggle > summary::after {
  content: ""; width: .48rem; height: .48rem; margin-top: -.16rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  border-radius: 1px;
  transform: rotate(45deg);
  transition: transform .18s ease, margin-top .18s ease;
}
.steps-toggle[open] > summary::after { transform: rotate(-135deg); margin-top: .12rem; }
.steps-toggle > summary:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.steps-toggle > summary:active { transform: translateY(1px); }
.steps-toggle[open] > summary { margin-bottom: 1.6rem; }
.steps-toggle .when-open { display: none; }
.steps-toggle[open] .when-closed { display: none; }
.steps-toggle[open] .when-open { display: inline; }
@media (prefers-reduced-motion: reduce) {
  .steps-toggle > summary::after { transition: none; }
}

.shot { margin: .8rem 0 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 6px;
}
.shot figcaption { display: none; }
.shot-empty {
  border: 1px dashed var(--field-border); border-radius: 6px;
  min-height: 6.5rem; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
}
.shot-empty img { display: none; }
.shot-empty figcaption {
  display: block; color: var(--ink-faint);
  font-family: var(--font-mono); font-size: .78rem;
}

/* feature disclosure list */
.app-head {
  font-family: var(--font-sans);
  font-size: .8rem; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent);
  margin: 2.2rem 0 .2rem;
}
.tools { margin: 0 0 .5rem; }
.tool { border-top: 1px solid var(--rule); }
.tools .tool:last-child { border-bottom: 1px solid var(--rule); }
.tool summary {
  cursor: pointer; list-style: none;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem;
  padding: .85rem 1.6rem .85rem 0;
  position: relative;
}
.tool summary::-webkit-details-marker { display: none; }
.tool summary::after {
  content: "+";
  position: absolute; right: .1rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint);
  font-family: var(--font-mono); font-size: 1.1rem; line-height: 1;
}
.tool[open] summary::after { content: "–"; color: var(--accent); }
.tool summary dt { font-weight: 700; display: inline; }
.tool summary span { color: var(--ink-faint); font-size: .95rem; }
.tool dd { margin: 0; padding: 0 0 1rem; }
.tool ul {
  margin: 0; padding-left: 1.1rem;
  color: var(--ink-soft); font-size: .96rem;
  display: grid; gap: .4rem;
}
.tool ul b { color: var(--ink); font-weight: 600; }

/* keyboard shortcut chips */
.tool .sc {
  display: inline-flex; align-items: center; gap: .16rem;
  vertical-align: baseline; margin: 0 .12rem;
}
.tool kbd {
  font-family: var(--font-mono);
  font-size: .68rem; line-height: 1.4;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 5%, var(--field-bg));
  border: 1px solid var(--field-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .12em .38em;
  white-space: nowrap;
}

.block-last .block-intro { margin-bottom: 0; }

/* ---------- right: sticky rail ---------- */
/* stretch the cell to the full row height so the sticky child has room to travel */
.rail { min-width: 0; align-self: stretch; }
.rail-sticky {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.rail-card { padding: 0; }
.rail-card + .rail-card {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.rail-label {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.05rem; letter-spacing: -0.01em;
  font-weight: 700;
  margin: 0 0 .7rem;
}
.rail-note { color: var(--ink-soft); font-size: .92rem; margin: 0 0 .9rem; }
.rail-meta { color: var(--ink-faint); font-size: .82rem; margin: .8rem 0 0; line-height: 1.5; }
.rail-download .btn { margin-top: .2rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.1rem;
  border-radius: 7px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, transform .06s ease;
  font-family: var(--font-sans);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary[disabled] { opacity: .6; cursor: default; }

/* rainbow flowing download button */
.btn-rainbow {
  background-color: #f4511e;          /* warm orange standby (complements the green + cream) */
  background-image: none;
  background-size: 200% 100%;
  color: #fff;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transition: background-color .25s ease;
}
.btn-rainbow svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
/* goes rainbow on hover / keyboard focus */
.btn-rainbow:hover,
.btn-rainbow:focus-visible {
  background-image: linear-gradient(90deg,
    #ff0040, #ff8c00, #ffee00, #00d158, #00b7ff, #8b5cff, #ff0040);
  animation: rainbow-flow 4s linear infinite;
}
@keyframes rainbow-flow {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-rainbow:hover, .btn-rainbow:focus-visible { animation: none; }
}

/* ---------- forms ---------- */
.field { display: grid; gap: .35rem; margin-bottom: .85rem; }
.field label {
  font-family: var(--font-sans);
  font-size: .74rem; letter-spacing: .02em; color: var(--ink-soft);
  text-transform: uppercase;
}
.field .opt { text-transform: none; color: var(--ink-faint); }
.field input,
.field select,
.field textarea {
  width: 100%; font: inherit; font-size: .95rem;
  color: var(--ink); background: var(--field-bg);
  border: 1px solid var(--field-border); border-radius: 6px;
  padding: .55rem .65rem;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.form-status { margin: .7rem 0 0; font-size: .82rem; min-height: 1.1em; letter-spacing: .01em; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-err { color: #c0392b; }
:root[data-theme="dark"] .form-status.is-err { color: #ff9384; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  max-width: 74rem; margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  justify-content: space-between; align-items: center;
  color: var(--ink-faint); font-size: .8rem;
}
.footer-inner a { color: var(--ink-faint); }
.footer-inner a:hover { color: var(--accent); }

/* hidden iframe target */
.gu-hidden-iframe { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }

/* ---------- image lightbox ---------- */
.shot img.is-zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, #000 78%, transparent);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .18s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  cursor: zoom-out;
  transform: scale(.97);
  transition: transform .18s ease;
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-img { transition: none; }
}

/* ---------- responsive: collapse to one column ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .content { max-width: none; }
  .rail-sticky {
    position: static;
    max-height: none;
    overflow: visible;
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: color-mix(in srgb, var(--ink) 2.5%, transparent);
  }
  .rail-card + .rail-card { margin-top: 0; padding-top: 1.25rem; }
  .rail-download { border-top: 0; padding-top: 0; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .header-download { display: none; }
}
