/* ==========================================================================
   CUBI — the product page (/software/cubi/). This page only.
   Quiet graphite page from the site's ramp; the pictures are the lit screens.
   Lime is spent twice: one word of the headline and the download button.
   Nothing here moves by itself: no entrance, no reveal, no loop.
   Spacing on a 4 px grid, two weights (500, 600), one easing curve. No text under 14 px, tap targets 44 px.
   ========================================================================== */

/* The shared header and footer keep the look they have on the CUBI pages (same values as assets/css/cubi.css). */
body.cubi {
  --lime: #c8f03c;
  --lime-2: #d7f65a;
  --lime-ink: #141a04;
  --accent: var(--lime);
  --accent-2: var(--lime-2);
  --accent-a16: rgba(200, 240, 60, 0.12);
  --accent-a35: rgba(200, 240, 60, 0.3);
  --accent-ink: var(--lime-ink);
  background: #111315;
}
body.cubi .nav.is-scrolled { background: rgba(17, 19, 21, 0.72); }
body.cubi .site-foot { background: #0d0f10; }
/* Nothing on this page moves by itself: the footer's breathing glow and beating heart are held still here only. */
body.cubi .boosty__glow, body.cubi .boosty__badge svg { animation: none; }

.cu {
  --cu-ink: #eef2ef;
  --cu-ink-2: #a9b3ae;
  --cu-ink-3: #838d88;
  --cu-surface: #171a1c;
  --cu-line: rgba(238, 242, 239, 0.08);
  --cu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--cu-ink);
  font-family: var(--f-body);
  font-weight: 500;
}
.cu-wrap { width: 100%; max-width: 1184px; margin: 0 auto; padding: 0 32px; }

/* ---------- Type ---------- */
.cu-h1 { margin: 0; font-size: 20px; line-height: 36px; font-weight: 600; }      /* the name, then the line */
.cu-h1__line { display: block; margin-top: 24px; font-size: 64px; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.cu-h1 em { font-style: normal; color: var(--lime); }
.cu-h2 { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 500; letter-spacing: 0; text-wrap: balance; }
.cu-lead { margin: 20px auto 0; max-width: 640px; font-size: 19px; line-height: 30px; color: var(--cu-ink-2); text-wrap: pretty; }
.cu-text { margin: 16px 0 0; max-width: 440px; font-size: 17px; line-height: 28px; color: var(--cu-ink-2); text-wrap: pretty; }
.cu-note { margin: 12px 0 0; max-width: 440px; font-size: 14px; line-height: 22px; color: var(--cu-ink-3); text-wrap: pretty; }
.cu-meta { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--cu-ink-3); }
.cu-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--cu-ink-2); font-size: 16px; line-height: 24px; text-decoration: underline; text-decoration-color: rgba(238, 242, 239, 0.24); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 160ms var(--cu-ease), text-decoration-color 160ms var(--cu-ease); }
.cu-link:hover { color: var(--cu-ink); text-decoration-color: var(--cu-ink-2); }

/* ---------- The one action. The markup comes from tools/cubi_versions.py (a.btn.cb-btn[data-magnetic]). ---------- */
.cu .cb-btn {
  height: 48px; padding: 0 24px 0 20px; gap: 10px; border-radius: 12px;
  background: var(--lime); color: var(--lime-ink); box-shadow: none;
  font-family: var(--f-body); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none;
  transform: none !important;              /* the site script's pointer-following stays off on this page */
  transition: background-color 160ms var(--cu-ease), scale 160ms var(--cu-ease);
}
.cu .cb-btn:hover { background: var(--lime-2); }
.cu .cb-btn:active { scale: 0.98; }
.cu .cb-btn:focus-visible { border-radius: 12px; }
.cu .cb-btn svg, .cu .cb-btn:hover svg { width: 18px; height: 18px; stroke-width: 1.5; transform: none; transition: none; }
.cu-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }

/* ---------- Hero ---------- */
.cu-hero { padding-top: calc(var(--nav-h) + 64px); text-align: center; }
.cu-brand { display: inline-flex; align-items: center; gap: 12px; }
.cu-brand img { width: 36px; height: 36px; }
.cu-hero .cu-cta { justify-content: center; }
.cu-hero .cu-screen { margin-top: 56px; }

/* ---------- A screen: the top of a desktop, the island hangs from its upper edge ---------- */
.cu-screen { margin: 0; border-radius: 24px; overflow: hidden; background: #c6c9c1; }
.cu-screen--glass { background: #4a437a; }
.cu-screen img { display: block; width: 100%; height: auto; }
.cu-shot { margin: 0; }
.cu-cap { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--cu-ink-3); }

/* ---------- Rows: words on one side, a screen on the other ---------- */
.cu-sec { margin-top: 128px; }
.cu-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.cu-row--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.cu-row--flip .cu-copy { order: 2; }

/* ---------- Also in the island: six plain rows in two columns ---------- */
.cu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; margin: 32px 0 0; }
.cu-list div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 24px; padding: 16px 0; border-top: 1px solid var(--cu-line); }
.cu-list div:nth-last-child(-n+2) { border-bottom: 1px solid var(--cu-line); }
.cu-list dt { font-size: 16px; line-height: 24px; font-weight: 600; }
.cu-list dd { margin: 0; font-size: 16px; line-height: 24px; color: var(--cu-ink-2); text-wrap: pretty; }

/* ---------- Download ---------- */
.cu-get { padding-bottom: 96px; }
.cu-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; padding: 56px; border-radius: 24px; background: var(--cu-surface); }
.cu-card__icon { width: 56px; height: 56px; margin-bottom: 24px; }
.cu-card .cu-text { margin-top: 12px; }
.cu-spec { margin: 0; }
.cu-spec div { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--cu-line); }
.cu-spec div:first-child { padding-top: 0; }
.cu-spec dt { font-size: 15px; line-height: 24px; color: var(--cu-ink-2); }
.cu-spec dd { margin: 0; font-size: 15px; line-height: 24px; font-weight: 600; text-align: right; }
.cu-card .cu-note { max-width: none; margin-top: 20px; }
.cu-author { margin: 24px 0 0; font-size: 14px; line-height: 22px; color: var(--cu-ink-3); }
.cu-author a { display: inline-block; padding: 11px 0; color: var(--cu-ink-2); transition: color 160ms var(--cu-ease); }
.cu-author a:hover { color: var(--cu-ink); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1000px) {
  .cu-h1__line { font-size: 52px; }
  .cu-row, .cu-row--flip, .cu-card { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cu-row--flip .cu-copy { order: 0; }
  .cu-row { max-width: 680px; }      /* one centred column, as wide as the pictures were made for (616 + padding) */
  .cu-list { grid-template-columns: minmax(0, 1fr); }
  .cu-list div:nth-last-child(2) { border-bottom: 0; }
  .cu-text, .cu-note { max-width: 560px; }
  .cu-sec { margin-top: 96px; }
  .cu-card { padding: 40px; }
}
@media (max-width: 640px) {
  .cu-wrap { padding: 0 16px; }
  .cu-hero { padding-top: calc(var(--nav-h) + 40px); }
  .cu-h1__line { font-size: 40px; line-height: 1.08; letter-spacing: -0.02em; }
  .cu-h2 { font-size: 28px; }
  .cu-lead { font-size: 17px; line-height: 28px; }
  .cu-text { font-size: 16px; line-height: 26px; }
  .cu-hero .cu-screen { margin-top: 40px; }
  .cu-screen { border-radius: 20px; }
  .cu-sec { margin-top: 80px; }
  .cu-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cu-card { padding: 24px; border-radius: 20px; }
  .cu-get { padding-bottom: 64px; }
}
@media (max-width: 380px) {
  .cu-h1__line { font-size: 36px; letter-spacing: 0; }
}

/* ---------- Links inside text ---------- */
.cu-a { color: var(--cu-ink-2); text-decoration: underline; text-decoration-color: rgba(238, 242, 239, 0.24); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 160ms var(--cu-ease), text-decoration-color 160ms var(--cu-ease); }
.cu-a:hover { color: var(--cu-ink); text-decoration-color: var(--cu-ink-2); }

/* ---------- Guide pages (/software/cubi/offline-ai/): one reading column, the same type, rows and lines ---------- */
.cu-guide .cu-wrap { max-width: 824px; }                 /* a 760 px column */
.cu-guide .cu-hero { text-align: left; }
.cu-back { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--cu-ink); font-size: 20px; line-height: 36px; font-weight: 600; transition: color 160ms var(--cu-ease); }
.cu-back:hover { color: var(--cu-ink-2); }
.cu-back img { width: 36px; height: 36px; }
.cu-guide .cu-h1__line { margin-top: 20px; font-size: 56px; }
.cu-guide .cu-lead { margin: 20px 0 0; }
.cu-guide .cu-sec { margin-top: 96px; }
.cu-guide .cu-text, .cu-guide .cu-note { max-width: 640px; }
.cu-guide .cu-list { grid-template-columns: minmax(0, 1fr); }
.cu-guide .cu-list div { grid-template-columns: 192px minmax(0, 1fr); }
.cu-guide .cu-list div:nth-last-child(2) { border-bottom: 0; }
.cu-guide__end { padding-bottom: 128px; }
/* The one picture of the guide: the section in CUBI's settings as CUBI draws it (a 2x render, shown at its own size) */
.cu-guide__shot { margin-top: 48px; max-width: 580px; }
.cu-guide__shot img { display: block; width: 100%; height: auto; border-radius: 16px; }

/* The table of cards and models */
.cu-nowrap { white-space: nowrap; }
.cu-table { width: 100%; margin: 32px 0 0; border-collapse: collapse; table-layout: fixed; font-size: 16px; line-height: 24px; }
.cu-table__card { width: 34%; }
.cu-table__model { width: 27%; }
.cu-table__size { width: 13%; }
.cu-table__speed { width: 26%; }
.cu-table th { padding: 0 16px 12px 0; text-align: left; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--cu-ink-3); }
.cu-table td { padding: 16px 16px 16px 0; border-top: 1px solid var(--cu-line); color: var(--cu-ink-2); vertical-align: top; }
.cu-table tr:last-child td { border-bottom: 1px solid var(--cu-line); }
.cu-table td:first-child { color: var(--cu-ink); font-weight: 600; }
.cu-table th:last-child, .cu-table td:last-child { padding-right: 0; }
.cu-table .cu-num { white-space: nowrap; }
.cu-table + .cu-note { margin-top: 20px; }

/* Steps: a plain number, a line of what to do, a line of what happens */
.cu-steps { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: cu-step; }
.cu-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); padding: 16px 0; border-top: 1px solid var(--cu-line); counter-increment: cu-step; }
.cu-steps li:last-child { border-bottom: 1px solid var(--cu-line); }
.cu-steps li::before { content: counter(cu-step); grid-row: span 2; color: var(--cu-ink-3); font-size: 16px; line-height: 24px; font-weight: 600; }
.cu-steps li > strong { font-size: 16px; line-height: 24px; font-weight: 600; }
.cu-steps li > span { margin-top: 4px; max-width: 640px; font-size: 16px; line-height: 24px; color: var(--cu-ink-2); text-wrap: pretty; }
.cu-steps + .cu-note { margin-top: 20px; }

@media (max-width: 640px) {
  .cu-guide .cu-h1__line { font-size: 40px; }
  .cu-guide .cu-sec { margin-top: 72px; }
  .cu-guide .cu-list div { grid-template-columns: minmax(0, 1fr); }
  .cu-guide__end { padding-bottom: 80px; }
  .cu-guide__shot { margin-top: 32px; }
  .cu-guide__shot img { border-radius: 12px; }
  /* The table becomes rows: the card on one line, model · size · speed under it */
  .cu-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cu-table, .cu-table tbody, .cu-table tr { display: block; }
  .cu-table tr { padding: 16px 0; border-top: 1px solid var(--cu-line); }
  .cu-table tr:last-child { border-bottom: 1px solid var(--cu-line); }
  .cu-table td, .cu-table tr:last-child td { display: inline; padding: 0; border: 0; }
  .cu-table td:first-child, .cu-table tr:last-child td:first-child { display: block; margin-bottom: 4px; }
  .cu-table td:nth-child(n+3)::before { content: " · "; }
}
@media (max-width: 380px) {
  .cu-guide .cu-h1__line { font-size: 36px; }
}

/* ---------- Windows 10: one quiet outlined block under the download card (#windows-10, linked from its GitHub release) ---------- */
.cu-w10 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; margin-top: 16px; padding: 48px 56px; border: 1px solid var(--cu-line); border-radius: 24px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.cu-h3 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; text-wrap: balance; }
.cu-w10 .cu-text { margin-top: 12px; }
.cu-w10 .cu-list { grid-template-columns: minmax(0, 1fr); margin: 0; }
.cu-w10 .cu-list div { grid-template-columns: 160px minmax(0, 1fr); }
.cu-w10 .cu-list div:nth-last-child(2) { border-bottom: 0; }
.cu-btn2 { display: inline-flex; align-items: center; gap: 10px; height: 48px; margin-top: 24px; padding: 0 20px 0 16px; border: 1px solid rgba(238, 242, 239, 0.16); border-radius: 12px; color: var(--cu-ink); font-size: 16px; line-height: 24px; font-weight: 600; transition: background-color 160ms var(--cu-ease), border-color 160ms var(--cu-ease), scale 160ms var(--cu-ease); }
.cu-btn2:hover { background: rgba(238, 242, 239, 0.06); border-color: rgba(238, 242, 239, 0.24); }
.cu-btn2:active { scale: 0.98; }
.cu-btn2:focus-visible { border-radius: 12px; }
.cu-btn2 svg { flex: none; width: 18px; height: 18px; }
@media (max-width: 1000px) {
  .cu-w10 { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px; }
}
@media (max-width: 640px) {
  .cu-w10 { gap: 24px; padding: 24px; border-radius: 20px; }
  .cu-w10 .cu-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cu-btn2 { height: auto; min-height: 48px; padding: 12px 20px 12px 16px; }
}
