/* ==========================================================================
   Limitrow — story landing. The frame (fonts, top buttons, settings panel,
   brand, headlines, story pin, Try it yourself, the get-it modal) is copied
   from the Keep it Split landing; the Limitrow parts follow at the end.
   ========================================================================== */

/* Medeo (SIL OFL 1.1, assets/fonts/OFL.txt): Sans is variable (wght 100–900, opsz 14–32), Serif has Regular only */
@font-face {
  font-family: "Medeo Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fonts/MedeoSansVariable.latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Medeo Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/fonts/MedeoSansVariable.latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Medeo Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/MedeoSerif-Regular.latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Medeo Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/MedeoSerif-Regular.latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --font: page text (switchable in settings); --ui-font: the mock apps inside the windows */
  --ui-font: "Medeo Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font: var(--ui-font);
  --serif: "New York", "Iowan Old Style", Georgia, serif;
  --demo-k: 1.35;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(20px, 4vw, 64px);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-raised: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #66666b;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #0071e3;
  --accent-hover: #0066cc;
  --seg-bg: rgba(0, 0, 0, 0.06);
  --seg-on: #ffffff;
  --seg-ink: #55555a;
  --seg-on-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --stage-glow: radial-gradient(50% 42% at 50% 78%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0) 70%);
  --outside-op: 0.32;
  --frame-line: rgba(0, 0, 0, 0.42);
  --frame-fill: rgba(0, 0, 0, 0.025);
  --toggle-bg: rgba(255, 255, 255, 0.7);
  --panel-bg: rgba(250, 250, 252, 0.82);

  --win-bg: #ffffff;
  --win-bar: #f6f6f7;
  --win-side: #f2f2f4;
  --win-ink: #1d1d1f;
  --win-ink-2: #6e6e73;
  --win-ink-3: #aeaeb2;
  --win-line: rgba(0, 0, 0, 0.08);
  --win-fill: #ececee;
  --canvas: #e8e8ea;
  --canvas-dot: rgba(0, 0, 0, 0.09);
  --cell-head: #f6f6f7;
  --bubble-in: #e9e9eb;
  --cover-bg: rgba(246, 246, 248, 0.6);
  --peek-bg: rgba(16, 16, 18, 0.34);
  --peek-hover: rgba(16, 16, 18, 0.18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-raised: #1c1c1e;
  --ink: #f5f5f7;
  --ink-2: #86868b;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #0a84ff;
  --accent-hover: #2997ff;
  --seg-bg: rgba(255, 255, 255, 0.1);
  --seg-on: #3a3a3c;
  --seg-ink: #a1a1a6;
  --seg-on-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  --stage-glow: none;
  --outside-op: 0.28;
  --frame-line: rgba(255, 255, 255, 0.5);
  --frame-fill: rgba(255, 255, 255, 0.03);
  --toggle-bg: rgba(40, 40, 42, 0.7);
  --panel-bg: rgba(30, 30, 32, 0.8);

  --win-bg: #1e1e20;
  --win-bar: #2a2a2c;
  --win-side: #242426;
  --win-ink: #f5f5f7;
  --win-ink-2: #98989d;
  --win-ink-3: #5c5c60;
  --win-line: rgba(255, 255, 255, 0.09);
  --win-fill: #333336;
  --canvas: #161618;
  --canvas-dot: rgba(255, 255, 255, 0.08);
  --cell-head: #262628;
  --bubble-in: #303033;
  --cover-bg: rgba(38, 38, 42, 0.6);
  --peek-bg: rgba(0, 0, 0, 0.48);
  --peek-hover: rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  transition: background-color 400ms ease, color 400ms ease;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-180%);
  transition: transform 180ms ease-out;
}

.skip-link:focus {
  transform: none;
}

/* the only chrome: appearance toggle */
.top-actions {
  position: fixed;
  z-index: 100;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
}

.round-btn {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--toggle-bg);
  box-shadow: 0 0 0 0.5px var(--line), 0 4px 14px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  transition: transform 200ms var(--ease), background-color 200ms;
}

.round-btn:hover {
  transform: scale(1.06);
}

.round-btn:active {
  transform: scale(0.95);
}

.round-btn[aria-expanded="true"] {
  background: var(--ink);
  color: var(--bg);
}

.round-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

/* ---------------------------------------------------------------- settings panel */

.tweaks {
  font-family: var(--ui-font);
  position: fixed;
  z-index: 99;
  top: calc(max(16px, env(safe-area-inset-top)) + 54px);
  right: max(16px, env(safe-area-inset-right));
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100svh - 96px);
  overflow: auto;
  padding: 6px 16px 14px;
  border-radius: 22px;
  background: var(--panel-bg);
  box-shadow: 0 0 0 0.5px var(--line), 0 24px 60px rgba(0, 0, 0, 0.22);
  color: var(--ink);
  font-size: 13px;
  overscroll-behavior: contain;
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  transform-origin: top right;
  animation: panelIn 260ms var(--ease);
}

.tweaks[hidden] {
  display: none;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

.tw-group {
  margin: 14px 0 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.tw-row {
  display: grid;
  gap: 6px;
  padding: 9px 0;
  box-shadow: inset 0 -0.5px 0 var(--line);
}

.tw-row:last-of-type {
  box-shadow: none;
}

.tw-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tw-head output {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.tw-row input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

.tw-row.is-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tw-seg {
  display: flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--seg-bg);
}

.tw-seg button {
  flex: 1;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--seg-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.tw-seg button[aria-pressed="true"] {
  background: var(--seg-on);
  box-shadow: var(--seg-on-shadow);
  color: var(--ink);
}

.tw-switch {
  position: relative;
  width: 38px;
  height: 23px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--seg-bg);
  cursor: pointer;
  transition: background-color 200ms;
}

.tw-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  content: "";
  transition: transform 220ms var(--ease);
}

.tw-switch[aria-checked="true"] {
  background: #34c759;
}

.tw-switch[aria-checked="true"]::after {
  transform: translateX(15px);
}

.tw-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 12px;
}

.tw-foot-btns {
  display: flex;
  gap: 6px;
}

.tw-dump {
  width: 100%;
  height: 180px;
  margin-top: 10px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--seg-bg);
  color: var(--ink);
  font: 11px/1.4 ui-monospace, Menlo, monospace;
}

.tw-reset {
  white-space: nowrap;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--seg-bg);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.only-dark,
:root[data-theme="dark"] .only-light,
.icon-sun,
:root[data-theme="dark"] .icon-moon {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .only-dark {
  display: inline-block;
}

/* ================================================================ STORY */

.story {
  position: relative;
  height: 1250svh;
}

.pin {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 4.5svh, 48px) var(--gutter) 0;
  overflow: hidden;
}

.pin::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--stage-glow);
  content: "";
  pointer-events: none;
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.14));
}

.headlines {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(96px, 15svh, 150px);
  flex: none;
  margin-top: clamp(14px, 2.6svh, 28px);
}

.headline {
  grid-area: 1 / 1;
  align-self: end;
  max-width: 30ch;
  margin: 0 auto;
  font-size: clamp(30px, 4.1vw, 58px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-align: center;
  text-wrap: balance;
  opacity: 0;
  will-change: opacity, transform, filter;
}

.headline span {
  color: var(--ink-2);
}

.headline-solo {
  font-size: clamp(36px, 5vw, 72px);
}

.stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 0;
  flex: 1;
  place-items: start center;
  padding-top: clamp(6px, 1.6svh, 18px);
  container-type: size;
}

/* logo that appears behind the closed laptop; anchored by its bottom so the
   gap above the closed lid stays the same (2.5× the original) */
.finale {
  position: absolute;
  z-index: 0;
  bottom: 75.5%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.2svh, 22px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.finale img {
  width: clamp(76px, 9vw, 120px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.25));
}

.finale span {
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.stage > .laptop {
  z-index: 1;
}

.island {
  position: absolute;
  z-index: 35;
  top: 0.42em;
  left: 50%;
  width: 4.6em;
  height: 1.7em;
  border-radius: 1em;
  background: #000;
  box-shadow: inset 0.9em 0 0 -0.55em rgba(40, 60, 120, 0.25);
  transform: translateX(-50%);
}

.menubar {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 2.55em;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.8em;
  background: rgba(10, 20, 50, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1em;
  font-weight: 500;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(1.4em);
  backdrop-filter: blur(1.4em);
}

:root[data-theme="light"] .menubar {
  background: rgba(255, 255, 255, 0.28);
  color: rgba(20, 20, 24, 0.88);
}

.menubar > div {
  display: flex;
  align-items: center;
  gap: 1.4em;
  font-size: 1.05em;
}

.menubar b {
  font-weight: 700;
}

.menubar svg {
  width: 1.6em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
}

/* ================================================================ WINDOWS (shared) */

.ws {
  position: absolute;
  top: 2.55em;
  right: 0;
  bottom: 0;
  left: 0;
}

.frame .ws {
  top: 0;
}

.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25em;
  background: var(--win-bg);
  box-shadow: 0 0 0 0.06em rgba(0, 0, 0, 0.22), 0 0.8em 2.4em rgba(0, 0, 0, 0.22), 0 0.2em 0.6em rgba(0, 0, 0, 0.1);
  color: var(--win-ink);
  font-size: 1em;
  line-height: 1.35;
}

:root[data-theme="dark"] .win {
  box-shadow: 0 0 0 0.06em rgba(255, 255, 255, 0.13), 0 0 0 0.12em rgba(0, 0, 0, 0.6), 0 0.9em 2.6em rgba(0, 0, 0, 0.55);
}

.win.is-front {
  box-shadow: 0 0 0 0.06em rgba(0, 0, 0, 0.25), 0 1.4em 4em rgba(0, 0, 0, 0.32), 0 0.3em 0.9em rgba(0, 0, 0, 0.14);
}

.anim .win,
.anim .divider,
.anim .peek {
  transition:
    left 420ms var(--ease),
    top 420ms var(--ease),
    width 420ms var(--ease),
    height 420ms var(--ease),
    opacity 300ms ease;
}

.bar {
  position: relative;
  display: flex;
  height: 3.5em;
  min-height: 3.5em;
  align-items: center;
  gap: 1.2em;
  padding: 0 1.3em;
  border-bottom: 0.08em solid var(--win-line);
  background: var(--win-bar);
  white-space: nowrap;
}

.lights {
  display: flex;
  flex: none;
  gap: 0.6em;
}

.lights i {
  display: block;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: #ff5f57;
}

.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.bar-title {
  position: absolute;
  left: 50%;
  overflow: hidden;
  max-width: 44%;
  color: var(--win-ink);
  font-size: 1.2em;
  font-weight: 600;
  text-overflow: ellipsis;
  transform: translateX(-50%);
}

.bar-end {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-left: auto;
}

.app-icon {
  display: grid;
  width: 7.4em;
  height: 7.4em;
  place-items: center;
  border-radius: 1.7em;
  box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.22), inset 0 0 0 0.08em rgba(255, 255, 255, 0.22);
}

.app-icon {
  position: relative;
}

.app-icon svg {
  width: 62%;
  height: 62%;
}

.app-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* a supplied PNG brings its own shape */
.app-icon:has(img) {
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 0.4em 0.8em rgba(0, 0, 0, 0.22));
}

.app-icon:has(img) svg {
  display: none;
}

.icon-files { background: linear-gradient(90deg, #8fd3ff 0 50%, #e9f6ff 50% 100%); }
.icon-browser { background: linear-gradient(180deg, #5ac8fa, #0a84ff); }
.icon-canvas { background: linear-gradient(160deg, #2c2c2e, #0c0c0d); }
.icon-sheets { background: linear-gradient(180deg, #4cd964, #1f9d3a); }
.icon-chat { background: linear-gradient(180deg, #6ee36b, #2fb12b); }
.icon-mail { background: linear-gradient(180deg, #48a9ff, #0a64d6); }
.icon-trash { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(220, 225, 232, 0.35)); }

/* Dock */
.lid .ws {
  bottom: 6.4em;
}

.dock {
  position: absolute;
  z-index: 28;
  bottom: 0.55em;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.55em 0.75em;
  border-radius: 1.9em;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 0.07em rgba(255, 255, 255, 0.45), 0 0.6em 2em rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(1.6em) saturate(1.8);
  backdrop-filter: blur(1.6em) saturate(1.8);
}

:root[data-theme="dark"] .dock {
  background: rgba(40, 40, 46, 0.4);
  box-shadow: inset 0 0 0 0.07em rgba(255, 255, 255, 0.18), 0 0.6em 2em rgba(0, 0, 0, 0.35);
}

.dock-item {
  position: relative;
  display: block;
}

.dock .app-icon {
  width: 4.3em;
  height: 4.3em;
  border-radius: 1em;
  box-shadow: 0 0.2em 0.6em rgba(0, 0, 0, 0.2), inset 0 0 0 0.06em rgba(255, 255, 255, 0.25);
}

.dock-item.on::after {
  position: absolute;
  bottom: -0.42em;
  left: 50%;
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.7);
  content: "";
  transform: translateX(-50%);
}

:root[data-theme="dark"] .dock-item.on::after {
  background: rgba(255, 255, 255, 0.8);
}

.dock-sep {
  width: 0.08em;
  height: 3.6em;
  margin: 0 0.15em;
  background: rgba(255, 255, 255, 0.5);
}

.headline.is-intro,
.brand.is-intro {
  animation: lift 1100ms 120ms var(--ease) both;
}

@keyframes lift {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(24px);
  }
}

/* ================================================================ TRY */

/* the last block: a sheet that slides up over the pinned finale
   (the story section is one screen taller to leave room for it) */
.try {
  position: relative;
  z-index: 2;
  display: flex;
  /* exactly one screen: title, controls, demo and the teaser all fit; the demo
     takes whatever height is left (short windows get a little scroll instead).
     Pinned to the top so the top padding stays exact; spare height falls below */
  height: max(100svh, 600px);
  margin-top: -100svh;
  overflow-x: clip;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(43px, 6.67svh, 80px) var(--gutter) clamp(20px, 4svh, 48px);
  border-radius: clamp(28px, 3vw, 44px) clamp(28px, 3vw, 44px) 0 0;
  background: var(--bg);
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"] .try {
  background: #0b0b0c;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section-title {
  flex: none;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-align: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  flex: none;
  margin: clamp(18px, 3.4svh, 40px) 0 clamp(20px, 3.6svh, 52px);
}

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 99px;
  background: var(--seg-bg);
}

.segmented button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 200ms ease, box-shadow 200ms ease, color 200ms ease;
}

.segmented button[aria-pressed="false"] {
  color: var(--seg-ink);
}

.segmented button[aria-pressed="false"]:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--seg-on);
  box-shadow: var(--seg-on-shadow);
  color: var(--ink);
}

/* --demo-k: "Demo size" in the settings panel */
.demo-stage {
  /* --stw: the stage width; --sww: the screen width the width allows.
     The stage is never taller than the screen plus room for "Your screen",
     so there's no empty band above or below the demo */
  --stw: min(100vw - 2 * var(--gutter), 1280px * var(--demo-k));
  --sww: min(var(--stw) * 0.58 * var(--demo-k), var(--stw) * 0.9);
  --label: 32px;
  width: 100%;
  max-width: calc(1280px * var(--demo-k));
  min-height: 200px;
  max-height: min(calc(clamp(300px, min(40vw, 56svh), 580px) * var(--demo-k)), calc(var(--sww) / 1.54 + var(--label)));
  flex: 1 1 0;
  container-type: size;
}

.frame {
  --sw: min(calc(58cqw * var(--demo-k)), 90cqw, calc((100cqh - var(--label)) * 1.54));
  position: relative;
  width: 100%;
  height: 100%;
}

.frame .outside,
.frame .screen,
.frame-edge {
  top: calc(100% - var(--sw) / 1.54);
  left: calc(50% - var(--sw) / 2);
  width: var(--sw);
  height: calc(var(--sw) / 1.54);
  font-size: calc(var(--sw) / 100);
  transform: none;
}

.frame .screen {
  border-radius: 1.4em;
  background: var(--frame-fill);
}

.frame-edge {
  position: absolute;
  z-index: 4;
  border: 2px solid var(--frame-line);
  border-radius: 1.4em;
  margin: -2px;
  box-sizing: content-box;
  pointer-events: none;
}

.frame-label {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

/* the download block, shrunk to one quiet line; opens the modal */
.get-teaser {
  display: grid;
  flex: none;
  margin: clamp(14px, 5.25svh, 60px) 0 0;
  padding: 8px 20px;
  border: 0;
  border-radius: 20px;
  background: none;
  cursor: pointer;
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  opacity: 0.3;
  transition: opacity 260ms ease, transform 260ms var(--ease);
}

.get-teaser > span {
  grid-area: 1 / 1;
  transition: opacity 220ms ease, transform 320ms var(--ease), filter 220ms ease;
}

.get-teaser-hover {
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(6px);
}

.get-teaser:hover,
.get-teaser:focus-visible {
  opacity: 1;
}

.get-teaser:hover .get-teaser-text,
.get-teaser:focus-visible .get-teaser-text {
  opacity: 0;
  transform: translateY(-0.35em);
  filter: blur(6px);
}

.get-teaser:hover .get-teaser-hover,
.get-teaser:focus-visible .get-teaser-hover {
  opacity: 1;
  transform: none;
  filter: none;
}

.get-teaser:active {
  transform: scale(0.98);
}

/* ================================================================ GET (modal) */

.get-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  background: var(--bg-raised);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 0 0 0.5px var(--line);
  color: var(--ink);
  text-align: center;
}

.get-modal[open] {
  animation: pop 360ms var(--ease);
}

/* the page behind stays put while the modal is open */
html:has(.get-modal[open]) {
  overflow: hidden;
}

.get-modal::backdrop {
  background: rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* two screens stacked in a track; only code moves it (no wheel/touch scrolling).
   The window's height follows the screen in view. */
.get-pages {
  overflow: hidden;
  transition: height 560ms var(--ease);
}

.get-track {
  transition: transform 560ms var(--ease);
}

.get-page {
  transition: opacity 420ms ease;
}

.get-page[inert] {
  opacity: 0.25;
}

.get-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(40px, 6vw, 56px) clamp(24px, 5vw, 48px) clamp(28px, 4vw, 40px);
}

.dev-page {
  padding: 68px 28px 28px;
  text-align: left;
}

.get-icon {
  width: clamp(80px, 9vw, 104px);
  height: auto;
  margin-bottom: clamp(20px, 3vw, 28px);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22));
}

.get-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.get-note {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 17px;
}

.get-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(26px, 4vw, 36px);
}

.btn {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 200ms var(--ease), background-color 200ms ease, box-shadow 200ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 36px -8px color-mix(in srgb, var(--accent) 80%, transparent);
  transform: translateY(-1px);
}

.btn-primary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.btn-secondary {
  background: var(--seg-bg);
  color: var(--ink);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--seg-bg) 100%, var(--ink) 6%);
  transform: translateY(-1px);
}

.get-toast {
  min-height: 22px;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

/* ================================================================ TYPE: serif option */

/* Medeo Serif has one weight; headings stay Regular and loosen a little */
:root[data-font="serif"] {
  --font: "Medeo Serif", "New York", Georgia, serif;
}

:root[data-font="serif"] :is(.headline, .section-title, .finale span, .brand, .get-title, .get-teaser, .dev-page h2) {
  font-weight: 400;
  letter-spacing: -0.015em;
}

/* ================================================================ DEVELOPER MODAL */

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

.dev-close-form {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  margin: 0;
}

/* back: top left, shown only on the developer screen */
.get-back {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 260ms ease, transform 420ms var(--ease);
}

.get-modal.is-dev .get-back {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.get-back svg {
  width: 15px;
  height: 15px;
  stroke-linejoin: round;
}

.dev-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--seg-bg);
  cursor: pointer;
}

.dev-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.dev-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 32px;
}

.dev-avatar {
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, #5e5ce6, #0a84ff);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.dev-page h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dev-head p,
.dev-sub {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}

.dev-sub {
  margin: 18px 0 18px;
}

.dev-links {
  display: grid;
  gap: 8px;
}

.dev-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--seg-bg);
  text-decoration: none;
  transition: transform 200ms var(--ease), background-color 200ms;
}

a.dev-link:hover {
  background: color-mix(in srgb, var(--seg-bg) 100%, var(--ink) 6%);
  transform: translateY(-1px);
}

.dev-link.is-soon {
  opacity: 0.55;
}

.dev-ico {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  color: #fff;
}

.dev-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.dev-ico-tg { background: linear-gradient(180deg, #37bbfe, #1d93d2); }
.dev-ico-mail { background: linear-gradient(180deg, #1e90ff, #0a64d6); }
.dev-ico-heart { background: linear-gradient(180deg, #ff6482, #ff2d55); }

.dev-text {
  display: grid;
  gap: 2px;
}

.dev-text b {
  font-size: 16px;
  font-weight: 600;
}

.dev-text span {
  color: var(--ink-2);
  font-size: 14px;
}

.dev-apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  box-shadow: inset 0 1px 0 var(--line);
}

.dev-apps span {
  margin-right: 4px;
  color: var(--ink-2);
  font-size: 14px;
}

.dev-apps b {
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--seg-bg);
  font-size: 14px;
  font-weight: 600;
}

/* ================================================================ RESPONSIVE */

@media (max-width: 760px) {
  /* no MacBook on phones: just the screen, no tilt */
  .laptop {
    height: calc(var(--lw) * 0.7);
    perspective: none;
    transform: none;
  }

  .laptop .deck,
  .laptop .lid-back,
  .laptop .lid-front,
  .laptop .rim,
  .laptop .glare {
    display: none;
  }

  .laptop .scene,
  .laptop .lid {
    transform-style: flat;
  }

  .laptop .lid {
    transform: none !important;
  }

  .laptop .screen {
    box-shadow: 0 0 0 0.12em rgba(0, 0, 0, 0.12), 0 2em 5em -1em rgba(0, 0, 0, 0.35);
  }

  .pin .stage {
    align-items: center;
    padding-top: 0;
  }

  :root[data-theme="light"] .pin::before {
    display: none;
  }

  .finale {
    top: 30%;
    bottom: auto;
  }

  .story {
    height: 1150svh;
  }

  .pin {
    padding-top: 22px;
  }

  .brand {
    font-size: 15px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .headlines {
    height: clamp(110px, 21svh, 160px);
  }

  .headline {
    font-size: clamp(28px, 8vw, 38px);
  }

  .headline-solo {
    font-size: clamp(34px, 10vw, 46px);
  }

  .stage {
    padding-top: 4svh;
  }

  .laptop {
    --lw: calc(min(96cqw, 132cqh) * var(--mac-size, 1));
  }

  .floor {
    display: none;
  }

  .demo-stage {
    --sww: min(var(--stw) * 0.78 * var(--demo-k) / 1.35, var(--stw) * 0.92);
  }

  .frame {
    --sw: min(calc(78cqw * var(--demo-k) / 1.35), 92cqw, calc((100cqh - var(--label)) * 1.54));
  }

  /* phones: the demo is width-bound, so the block sits in the middle of the screen */
  .try {
    justify-content: center;
  }

  .get-teaser {
    font-size: clamp(26px, 7.4vw, 34px);
  }

  .segmented button {
    padding: 0 13px;
    font-size: 13px;
  }

  .btn {
    width: 100%;
  }

  .get-actions {
    width: 100%;
    max-width: 340px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================ LIMITROW */

/* The app icon: the Icon Composer fill with the glyph layer over it. As on
   Keep it Split, the light page shows the dark icon and the dark page the light one. */
.app-glyph {
  display: inline-block;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 22.5%;
  background: url("./kit/icon/limitrow-dark.png") center / cover no-repeat, #000;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.14));
}

:root[data-theme="dark"] .app-glyph {
  background: url("./kit/icon/limitrow-light.png") center / cover no-repeat, #f3f3f3;
  box-shadow: none;
}

.finale .app-glyph.big {
  width: clamp(76px, 9vw, 120px);
  height: clamp(76px, 9vw, 120px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.25));
}

.get-icon.app-glyph {
  width: clamp(80px, 9vw, 104px);
  height: clamp(80px, 9vw, 104px);
}

/* ---------------------------------------------------------------- the board (3D) */

.stage {
  place-items: stretch;
  overflow: clip;
  overflow-clip-margin: 40px;
}

.rig {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.rig .scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.board {
  position: absolute;
  transform-style: preserve-3d;
}

.board-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform: translateZ(0.5px);
}

.board-back {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #2c2d31, #1b1c1f);
  backface-visibility: hidden;
}

/* rim: the board's side walls, built from strips around the rounded outline (as the MacBook's) */
.rim {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.rim i {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  background: color-mix(in srgb, #5d5e64 calc(var(--k) * 100%), #141517);
  transform-origin: 0 0;
}

.board-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -14%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0));
  filter: blur(8px);
  transform: translateZ(-40px);
}

:root[data-theme="dark"] .board-shadow {
  background: radial-gradient(closest-side, rgba(255, 194, 107, 0.12), rgba(0, 0, 0, 0));
}

.board-face canvas {
  position: absolute;
  z-index: 2;
}

.lr-slab.lr-flat {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.rig.is-intro .board {
  animation: rise 1200ms var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18%) rotateX(24deg) scale(0.92);
  }
}

/* ---------------------------------------------------------------- the Mac at the end */

.mac {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 0;
  width: var(--mw, 800px);
  aspect-ratio: 100 / 64.94;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.mac-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 1.6em;
  background: #c9c3b8 url("./assets/wallpaper-light.webp") center / cover no-repeat;
  box-shadow: 0 0 0 0.75em #0b0b0c, 0 0 0 0.86em rgba(255, 255, 255, 0.08), 0 3em 6em -1em rgba(0, 0, 0, 0.35);
  font-size: calc(var(--mw, 800px) / 100);
}

:root[data-theme="dark"] .mac-screen,
:root[data-theme="dark"] .demo-screen {
  background: #1a1a2a url("./assets/wallpaper-dark.webp") center / cover no-repeat;
}

.mac .lines,
.demo-screen .lines {
  display: grid;
  align-content: start;
  gap: 1.1em;
  padding: 2em 2.4em;
}

.mac .lines i {
  display: block;
  height: 0.8em;
  border-radius: 0.3em;
  background: var(--win-fill);
}

.mac .win.term {
  background: #18181b;
  color: #f5f5f7;
}

.mac .win.term .bar {
  background: #242428;
  border-color: rgba(255, 255, 255, 0.06);
}

.mac .win.term .bar-title {
  color: #e5e5ea;
}

.mac .win.term .lines i {
  background: rgba(255, 255, 255, 0.14);
}

.mac .win.term .lines i.c {
  width: 30%;
  background: #d97757;
}

/* the Dock in the middle, as macOS keeps it; the panel fills from the Dock to
   the screen edge (DockGeometry.layoutFillPanel), its left/right set in app.js */
.dockbar {
  position: absolute;
  z-index: 28;
  right: 0;
  bottom: 0.55em;
  left: 0;
  height: 5.4em;
}

.dockbar .dock {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.slot {
  position: absolute;
  bottom: 0;
  height: 5.4em;
}

.world {
  position: absolute;
  inset: 0;
}

/* ---------------------------------------------------------------- Try it yourself */

.demo-stage {
  display: flex;
  width: 100%;
  max-width: 1120px;
  min-height: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  container-type: normal;
}

.demo-screen {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 560px;
  min-height: 300px;
  overflow: hidden;
  border-radius: clamp(20px, 2.4vw, 32px);
  background: #c9c3b8 url("./assets/wallpaper-light.webp") center / cover no-repeat;
  box-shadow: 0 0 0 0.5px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.35);
  font-size: var(--de, 12px);
}

.demo-board {
  position: absolute;
  z-index: 29; /* above the Dock: it is the thing being tried */
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.demo-board.is-dragging {
  cursor: grabbing;
}

.demo-board[hidden] {
  display: none;
}

.demo-card {
  position: absolute;
  z-index: 31;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.demo-card.on {
  opacity: 1;
  pointer-events: auto;
}

.demo-hint {
  flex: none;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}



.headline .ink {
  color: var(--ink);
}

.rig canvas {
  pointer-events: auto;
}

/* ---------------------------------------------------------------- language */

.lang-btn span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.langs {
  position: fixed;
  z-index: 99;
  top: calc(max(16px, env(safe-area-inset-top)) + 54px);
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  min-width: 190px;
  padding: 6px;
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: 0 0 0 0.5px var(--line), 0 24px 60px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  transform-origin: top right;
  animation: panelIn 260ms var(--ease);
}

.langs[hidden] {
  display: none;
}

.langs button {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.langs button:hover {
  background: var(--seg-bg);
}

.langs button small {
  color: var(--ink-2);
  font-weight: 600;
}

.langs button[aria-checked="true"]::after {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.langs button[aria-checked="true"] small {
  display: none;
}

/* ---------------------------------------------------------------- type: Medeo Pixel option */

@font-face {
  font-family: "Medeo Pixel";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./kit/fonts/MedeoPixel-Square.ttf") format("truetype");
}

:root[data-font="pixel"] {
  --font: "Medeo Pixel", "Medeo Sans", -apple-system, sans-serif;
}

:root[data-font="pixel"] :is(.headline, .section-title, .finale span, .brand, .get-title, .get-teaser, .dev-page h2) {
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- More apps (reusable block) */

.more-apps {
  margin-top: 20px;
  padding-top: 18px;
  box-shadow: inset 0 1px 0 var(--line);
}

.more-apps-title {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.more-apps-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.more-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 14px;
  border-radius: 18px;
  background: var(--seg-bg);
  text-align: center;
  text-decoration: none;
  transition: transform 220ms var(--ease), background-color 200ms;
}

.more-app:hover {
  background: color-mix(in srgb, var(--seg-bg) 100%, var(--ink) 6%);
  transform: translateY(-2px);
}

.more-app:hover .more-app-icon {
  transform: scale(1.06) rotate(-3deg);
}

.more-app-icon {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
  transition: transform 320ms var(--ease);
}

.more-app-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.more-app-text b {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more-app-text span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 420px) {
  .more-app-icon {
    width: 44px;
    height: 44px;
  }
}

.segmented[hidden],
.slot[hidden] {
  display: none;
}

.demo-board canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
}

/* ---------------------------------------------------------------- headline size and place (display settings) */

.headline {
  font-size: calc(clamp(30px, 4.1vw, 58px) * var(--head-k, 1));
}

.headline-solo {
  font-size: calc(clamp(36px, 5vw, 72px) * var(--head-k, 1));
}

.headlines {
  height: calc(clamp(96px, 15svh, 150px) * var(--head-k, 1));
  margin-top: calc(clamp(14px, 2.6svh, 28px) + var(--head-y, 0svh));
}

@media (max-width: 760px) {
  .headline {
    font-size: calc(clamp(28px, 8vw, 38px) * var(--head-k, 1));
  }

  .headline-solo {
    font-size: calc(clamp(34px, 10vw, 46px) * var(--head-k, 1));
  }

  .headlines {
    height: calc(clamp(110px, 21svh, 160px) * var(--head-k, 1));
  }
}

.round-btn[hidden] {
  display: none;
}

/* All headlines share one grid cell. Left to size itself, that cell grew to the
   tallest of them (a three-line subtitle in Russian or Kazakh), and every
   bottom-aligned headline dropped below its box onto the stage. A fixed row
   keeps the cell the box's height; a longer headline grows upward instead. */
.headlines {
  grid-template-rows: minmax(0, 1fr);
}

/* a little wider than Keep it Split's 30ch: Russian and Kazakh subtitles run longer */
.headline {
  max-width: min(36ch, 100%);
}
