/* ==========================================================================
   Kettle - site stylesheet.

   Built on the Metromedya app site family's stylesheet (HeicConverter/web,
   heica.css, September 2026): the same fonts, link rule, language picker,
   sub page heads, prose and footer. The front page keeps Kettle's own
   landing: a white page, black type, one narrow column, a big headline, the
   app on a desktop, an eight item feature grid and a dark download button.

   Light page; the app demo follows its own light and dark switch. Loaded after Bootstrap 5.2.0,
   the one external dependency, used for nothing visible; everything with a
   look of its own is written here.
   ========================================================================== */

/* ── Fonts ───────────────────────────────────────────────
   Self hosted, licence files next to the files themselves:
   ZalandoSans-OFL.txt, ZalandoSansExpanded-OFL.txt, IBMPlexMono-OFL.txt.
   Same files and same pairing as the rest of the family: Zalando Sans for
   body copy, Zalando Sans Expanded for headings, IBM Plex Mono for labels.
   ─────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Zalando Sans';
  src: url('../assets/fonts/ZalandoSans-VariableFont_wdth_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Zalando Sans';
  src: url('../assets/fonts/ZalandoSans-Italic-VariableFont_wdth_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Zalando Sans Expanded';
  src: url('../assets/fonts/ZalandoSansExpanded-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Zalando Sans Expanded';
  src: url('../assets/fonts/ZalandoSansExpanded-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────── */

:root {
  /* A barely warm white: Kettle's cream, far lighter than the panel's #F4EFE6. */
  --ground: #F9F5EE;
  --raised: #ffffff;
  --raised-2: #F2EDE4;
  --ink: #0b0b0c;
  --ink-2: #3a3a3e;
  --muted: rgba(11, 11, 12, 0.66);
  --faint: rgba(11, 11, 12, 0.60);
  --rule: rgba(11, 11, 12, 0.12);
  --rule-strong: rgba(11, 11, 12, 0.26);
  --chip-bg: rgba(255, 255, 255, 0.85);
  --pill: #EFE9DF;

  --sans: 'Zalando Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    'Helvetica Neue', 'Noto Sans', 'Hiragino Sans', 'Yu Gothic', 'Apple SD Gothic Neo',
    'Malgun Gothic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
  --font-heading: 'Zalando Sans Expanded', 'Zalando Sans', -apple-system, BlinkMacSystemFont,
    'Helvetica Neue', 'Segoe UI', 'Hiragino Sans', 'Apple SD Gothic Neo', 'PingFang SC',
    Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas,
    'Liberation Mono', monospace;

  --app-icon-size: clamp(7rem, 17vw, 9.75rem);
  --column: 900px;
  --measure: 46rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 14px;
}

/* ── Reset and base ────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links hold their ink and answer the pointer with a heavier rule, the way the
   whole family does. Semibold at rest; the weight never changes on hover. */
a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.05s ease, text-decoration-thickness 0.05s ease;
}

/* Bootstrap styles a and a:hover and loads before this file, so every state
   is named here or its blue comes through. */
a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
  color: var(--ink);
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

/* Links that are already a shape of their own. */
a[aria-label],
a.icon-link,
a.skip-link,
a.footer-name,
a.publisher-link,
a.brand,
a.text-link,
a.pill-btn,
a.dark-btn,
.site-footer a,
.language-selector a,
.language-menu a {
  font-weight: inherit;
  text-decoration: none;
}

/* The publisher's name: a link, but not one the page asks anyone to press.
   No hover response, the family rule. */
a.publisher-link,
a.publisher-link:link,
a.publisher-link:visited,
a.publisher-link:hover,
a.publisher-link:focus {
  color: inherit;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}

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

hr.trail {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
  opacity: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ground);
  padding: 0.75rem 1.25rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
  color: var(--ground);
}

/* ── Layout ────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.wrap--wide {
  max-width: 72rem;
}

.wrap--flush {
  padding-block: 0;
}

/* ── Type ──────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 40rem;
  margin-top: 1rem;
}

/* ── Language selector ─────────────────────────────────────
   A <details> element, not a Bootstrap dropdown, and no flag emoji: the
   family picker. On sub pages it floats at the top right. On the front page
   it sits in the header row instead, next to Contact.
   ─────────────────────────────────────────────────────── */

.language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.site-header .language-selector {
  position: relative;
  top: auto;
  right: auto;
}

.language-selector summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  white-space: nowrap;
  background: var(--chip-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.language-selector summary::-webkit-details-marker {
  display: none;
}

.language-selector summary:hover,
.language-selector[open] summary {
  color: var(--ink);
  border-color: var(--rule-strong);
}

.language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  min-width: 11rem;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(11, 11, 12, 0.14);
}

.language-menu a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.language-menu a:hover,
.language-menu a:focus-visible {
  background: var(--raised-2);
  color: var(--ink);
}

.language-menu a[aria-current='true'] {
  color: var(--ink);
}

/* ── Store buttons ─────────────────────────────────────── */

.pill-btn,
.dark-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 12px;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pill-btn,
a.pill-btn,
a.pill-btn:hover {
  background: var(--pill);
  color: var(--ink);
  font-size: 15px;
  padding: 11px 18px;
}

a.pill-btn:hover {
  background: #e6e6e9;
}

.dark-btn,
a.dark-btn,
a.dark-btn:link,
a.dark-btn:visited,
a.dark-btn:hover {
  background: var(--ink);
  color: #ffffff;
  font-size: 17px;
  padding: 16px 26px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
}

a.dark-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -10px rgba(0, 0, 0, 0.5);
}

/* The hero's two calls: download, and the tour that plays the story on its own. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 14px;
}

.tour-btn,
a.tour-btn,
a.tour-btn:link,
a.tour-btn:visited {
  /* Kettle's own primary button (the Save button, WelcomePrimaryButtonStyle: the accented
     FSSurface, 36 pt tall, 13 pt semibold), enlarged to the Mac App Store badge beside it:
     its height, its width (--badge-r, the badge's width over its height in the page's
     language, build.js) and its corner. One flat fill (AccentColor), a hairline
     border (toggleOnBorder), ink on yellow (onTint) and the controls' soft shadow; under
     the pointer it lifts 3%, a press takes it down 4%. Its corner is continuous where the
     browser draws one, as SwiftUI's .continuous (below). */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--cta-h, 56px);
  min-width: calc(var(--cta-h, 56px) * var(--badge-r, 3.9025));
  padding: 0 calc(var(--cta-h, 56px) * 0.4);
  border-radius: calc(var(--cta-h, 56px) * 0.2384);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', var(--sans);
  font-size: calc(var(--cta-h, 56px) * 13 / 36);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: #221f18;
  text-decoration: none;
  background: #ffb900;
  box-shadow: inset 0 0 0 1px #d99a00, 0 calc(var(--cta-h, 56px) / 36) calc(var(--cta-h, 56px) / 9) rgba(0, 0, 0, 0.12);
  transition: filter 0.14s ease-out, box-shadow 0.16s ease-out;
}
@supports (corner-shape: superellipse(2)) {
  .tour-btn { border-radius: calc(var(--cta-h, 56px) * 0.2384 * 1.52866); corner-shape: superellipse(1.71); }
}
a.tour-btn:hover { filter: brightness(1.03); }
a.tour-btn:active {
  filter: brightness(0.96);
  box-shadow: inset 0 0 0 1px #d99a00, 0 0 3px rgba(0, 0, 0, 0.12);
}
a.tour-btn:focus-visible { outline: 2px solid #d99a00; outline-offset: 3px; }


.apple {
  width: 15px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

/* No Mac App Store record yet: the button is shown, not linked, and says so.
   Same treatment as the family's pending badge. */
.store-pending {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.packshot .store-pending {
  align-items: center;
}

.store-pending .dark-btn,
.pill-btn--pending {
  opacity: 0.55;
  cursor: default;
}
/* Apple's badge stays as Apple draws it (the marketing guidelines allow no change to its
   colour or opacity): while the store link is pending it is only not a link. */
.store-pending .store-badge { cursor: default; }

/* Apple's Mac App Store badge at the family's size (NetTop, HeicConverter, Faster), and the
   tour button beside it at the same height, width and corner, so the two read as one pair. */
.hero-actions,
.packshot {
  --cta-h: clamp(56px, 8vw, 76px);
}
.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: calc(var(--cta-h, 56px) * 0.22);
  transition: transform 0.15s ease;
}
.store-badge img {
  height: var(--cta-h, 56px);
  width: auto;
}
a.store-badge:hover { transform: translateY(-1px); }
a.store-badge:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.store-pending-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.pending {
  color: var(--faint);
  border-bottom: 1px dashed var(--rule-strong);
}

/* ── Front page: header ────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Named with its element so it outranks the link exemption list above,
   which resets link weight to inherit. */
.site-header a.brand {
  font-weight: 700;
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.text-link {
  font-weight: 600;
  font-size: 15px;
}

a.text-link:hover {
  opacity: 0.6;
}

/* ── Front page: hero ──────────────────────────────────── */

.hero {
  max-width: var(--column);
  margin: 0 auto;
  padding: 64px 28px 56px;
}

/* Headings in the app's title face, Zalando Sans Expanded bold (Theme.kettleTitle). It is
   wider than Zalando Sans, so sizes sit a step lower and the tracking is looser. */
.hero h1 {
  font-family: var(--font-heading);
  /* Two lines: sized so the longer one fits the column on a wide screen; narrower windows
     wrap it, balanced. */
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 36px;
  text-wrap: balance;
}

/* ── Front page: showcase (the app on a desktop) ───────── */

.showcase {
  /* A wide desktop where the window allows it. Its contents are never scaled up: showcase.js
     keeps the panel and menu at the app's own size and widens the desktop's inside instead. */
  /* As wide as the MacBook's screen at the app's own points (1683, see showcase.js), so the
     panel shows at its own size where the window allows it. */
  max-width: 2109px;
  margin: 0 auto;
  padding: 0 28px;
}

/* A MacBook Pro 16 around the desktop. The frame image (3407 x 2080) is drawn over the
   desktop; its screen opening starts 310 x 44 in and is 2787 x 1804. The desktop reaches 3px
   under the bezel on every side so no seam shows. */
.mac {
  position: relative;
  aspect-ratio: 3407 / 2080;
}

.mac::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/images/macbook-frame.webp") 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}

.desktop {
  position: absolute;
  left: 9.011%;
  top: 1.971%;
  width: 81.978%;
  height: 87.019%;
  overflow: hidden;
  background: var(--night-wallpaper);
}

.menubar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  /* A fixed translucent tint per theme rather than a backdrop blur: browsers
     repaint a backdrop late, so a theme switch left the bar in the old colour. */
  background: rgba(255, 255, 255, 0.12);
}

.menubar .apple {
  width: 13px;
  height: 15px;
}

.mb-right {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.mb-kettle {
  padding: 3px 9px;
  border-radius: 6px;
  transition: background-color 0.12s ease-out;
}

/* The status item is lit while its menu is open, as on macOS. */
.is-menu .mb-kettle {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Front page: feature grid ──────────────────────────── */

.features {
  max-width: var(--column);
  margin: 96px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 56px;
  column-gap: 24px;
  text-align: center;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  font-family: var(--font-heading);
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: initial;
}

.soon {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--pill);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ── Front page: footer ────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 0 28px 64px;
  color: var(--muted);
}

.site-footer .heart {
  width: 18px;
  height: 18px;
  margin: 0 auto 4px;
  fill: #8a8a90;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer .made {
  font-weight: 700;
  color: #6e6e74;
  font-size: 16px;
}

.site-footer .sub,
.site-footer .copyright {
  font-size: 14px;
}

.site-footer .copyright {
  margin-top: 18px;
  color: var(--faint);
}

.site-footer .links,
.site-footer .langs {
  font-size: 14px;
  margin-top: 14px;
}

.site-footer a {
  color: #6e6e74;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer .made a.publisher-link {
  font-weight: 700;
}

.site-footer .dot {
  margin: 0 8px;
}

.lang-current {
  color: var(--ink);
  font-weight: 600;
}

/* ── Sub pages: head and prose (the family's) ──────────── */

.app-icon {
  position: relative;
  display: block;
  width: var(--app-icon-size);
  line-height: 0;
}

.app-icon img {
  display: block;
  width: 100%;
  height: auto;
}

.subhead {
  text-align: center;
  padding-top: clamp(4.5rem, 9vw, 6.5rem);
  padding-bottom: 2rem;
}

.subhead-icon {
  display: block;
  width: var(--app-icon-size);
  margin: 0 auto 1.5rem;
}

.page-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.85rem;
}

.prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  margin: 0 0 1.1em;
  padding-left: 1.2rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--ink);
}

.faq-item {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
}

.faq-item p {
  color: var(--muted);
  margin: 0;
}

.faq-item ul {
  margin: 0.6rem 0 0;
}

.faq-item ul + p {
  margin-top: 0.6rem;
}

/* ── Sub pages: footer (the family's) ──────────────────── */

footer.family-footer {
  padding-bottom: 3rem;
}

.footer-inner {
  /* Three columns with equal sides, so the app name sits at the true centre
     whatever the widths of the copyright line and the links. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2.5rem;
}
.footer-inner > p { justify-self: start; }
.footer-inner > .footer-name { justify-self: center; }
.footer-inner > .footer-nav { justify-self: end; }

.footer-inner p {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.footer-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--faint);
  font-size: 0.78rem;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--ink);
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 820px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-nav .text-link {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-inner > p,
  .footer-inner > .footer-name,
  .footer-inner > .footer-nav { justify-self: start; }
}

@media (max-width: 480px) {
  .site-header {
    padding: 16px 18px;
  }

  .header-nav {
    gap: 10px;
  }

  /* The header carries the brand, the picker and the store pill. At phone
     width the pill gives way; the hero's own button is right below. */
  .header-nav .pill-btn {
    display: none;
  }

  .hero,
  .features,
  .showcase {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Front page: light and dark showcase ───────────────── */
/* The visitor's system theme picks the look; the switch under the desktop
   overrides it (data-theme on .showcase, remembered by site.js). The demo
   panel's own colors follow the same switch further down.

   Daylight wallpaper and a light menu bar for the light look. */
@media (prefers-color-scheme: light) {
  .showcase:not([data-theme]) .desktop { background: var(--day-wallpaper); }
  .showcase:not([data-theme]) .menubar { color: #1f1d1a; background: rgba(255, 255, 255, 0.5); }
  .showcase:not([data-theme]) .is-menu .mb-kettle { background: rgba(0, 0, 0, 0.08); }
}
.showcase[data-theme="light"] .desktop { background: var(--day-wallpaper); }
.showcase[data-theme="light"] .menubar { color: #1f1d1a; background: rgba(255, 255, 255, 0.5); }
.showcase[data-theme="light"] .is-menu .mb-kettle { background: rgba(0, 0, 0, 0.08); }

.showcase {
  /* A photo goes on top when assets/images/wallpaper-{light,dark}.jpg exist;
     the gradient underneath shows until then. */
  /* The demo's desktop: layered paper waves in Kettle's browns and creams (GoldenGate). */
  --day-wallpaper:
    url("../assets/images/wallpaper-golden.jpg") center / cover no-repeat,
    linear-gradient(160deg, #c9a46e 0%, #e9dcc7 55%, #8a8fa3 100%);
}

/* The switch, in the app's segmented control language: a recessed track and
   a raised knob behind the chosen side. */
.theme-switch {
  display: flex;
  width: max-content;
  margin: 22px auto 0;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.09);
}
.theme-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a857c;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
/* Animate only after the first paint, so the chosen side is shown at once. */
.theme-switch.is-ready button { transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.theme-switch button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.theme-switch button[data-theme-choice="dark"] svg { fill: currentColor; stroke: none; }
.theme-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: #1f1d1a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.theme-switch button:focus-visible { outline: 2px solid #f5b83d; outline-offset: 2px; }

/* ── Front page: the scroll story ──────────────────────────
   The app, drawn in HTML and CSS, on the desktop. A tall track holds a
   sticky stage; showcase.js reads the scroll position and moves one cursor
   through four steps (idle, press play, open a project, Insights), setting
   is-running, is-open and is-insights on the panel. Measures are the app's
   points: panel 355 x 532, header 40, cards 60 with radius 16, emoji well 34,
   play disc 30, day rows 56 apart, day pills 72 x 30, system font 13/12.
   The desktop's inside is laid out at 1120 x 658 and scaled to fit (--s).

   Without script, under 821 px or with reduced motion the track is not
   shown; .story-static gives each step its words and a still panel instead.
   ─────────────────────────────────────────────────────── */

.showcase {
  /* The app spring (response 0.28, damping 0.72), sampled. */
  --spring: cubic-bezier(0.3, 1.25, 0.5, 1);
  /* The same waves, dimmed so the dark panel and the lit switch stand off them. */
  --night-wallpaper:
    linear-gradient(rgba(18, 14, 10, 0.5), rgba(18, 14, 10, 0.5)),
    url("../assets/images/wallpaper-golden.jpg") center / cover no-repeat,
    linear-gradient(160deg, #3a2a1c 0%, #5a4a3a 55%, #2e3040 100%);

  /* Dark is the default look, as for the wallpaper above (KettleColor dark). */
  --kp-panel: #2a2a28;
  --kp-card: #333331;
  --kp-card-hover: #373735;
  --kp-card-border: rgba(255, 255, 255, 0.04);
  --kp-footer: #1e1e1d;
  --kp-dot: #1e1e1d;
  --kp-title: #dfdfdf;
  --kp-ink: #ffffff;
  --kp-date: #dddddd;
  --kp-daydate: #626261;
  --kp-chev-off: #444443;
  --kp-tool: #aaaaa9;
  --kp-tool-hover: #3d3d3c;
  --kp-divider: rgba(255, 255, 255, 0.045);
  --kp-ctl: rgba(255, 255, 255, 0.07);
  --kp-ctl-hover: rgba(255, 255, 255, 0.12);
  --kp-ctl-border: rgba(255, 255, 255, 0.08);
  --kp-ctl-border-hover: rgba(255, 255, 255, 0.14);
  --kp-ctl-shadow: rgba(0, 0, 0, 0.44);
  --kp-well: rgba(0, 0, 0, 0.3);
  --kp-well-shadow: rgba(0, 0, 0, 0.28);
  --kp-well-hi: rgba(255, 255, 255, 0.09);
  --kp-edge: rgba(255, 255, 255, 0.12);
  --kp-accent: #f5bc41;
  --kp-accent-border: #dfa531;
  --kp-on-accent: #221f18;
  --ki-bg: #2a2928;
  --ki-track: #3b3a3a;
  --ki-knob: #e6e6e5;
  --ki-off: #9c9b9a;
  --ki-empty: #555453;
  --ki-day: #555554;
  --ki-range: #797878;
  --ki-caption: #6a6a69;
  --ki-title: #dfdede;
  --km-bg: rgba(40, 40, 42, 0.58);
  --km-ink: #efefef;
  --km-sep: rgba(255, 255, 255, 0.16);
  --kc-ring: rgba(255, 255, 255, 0.9);
  --kt-bg: rgba(42, 42, 40, 0.62);
}

@supports (transition-timing-function: linear(0, 1)) {
  .showcase {
    --spring: linear(0, 0.0582, 0.1929, 0.3578, 0.5227, 0.6699, 0.7911, 0.8842, 0.9509, 0.9951, 1.0214, 1.0344, 1.0384, 1.0366, 1.0316, 1.0253, 1.019, 1.0132, 1.0085, 1.0048, 1.0021, 1.0003, 0.9993, 0.9987, 0.9985, 0.9986, 0.9988, 0.999, 0.9992, 0.9995, 1);
  }
}

/* Light (KettleColor light), for the system's light look or the switch. */
@media (prefers-color-scheme: light) {
  .showcase:not([data-theme]) {
    --kp-panel: #f4efe6; --kp-card: #ebe4d7; --kp-card-hover: #e6ded0;
    --kp-card-border: rgba(107, 90, 60, 0.10); --kp-footer: #f9f6f0; --kp-dot: #e2dacb;
    --kp-title: #2a2620; --kp-ink: #2a2620; --kp-date: #2a2620; --kp-daydate: #9c968a;
    --kp-chev-off: #d2cabb; --kp-tool: #6b655b; --kp-tool-hover: #e6ded0;
    --kp-divider: rgba(107, 90, 60, 0.07); --kp-ctl: rgba(255, 255, 255, 0.7);
    --kp-ctl-hover: #ffffff; --kp-ctl-border: rgba(0, 0, 0, 0.08);
    --kp-ctl-border-hover: rgba(0, 0, 0, 0.12); --kp-ctl-shadow: rgba(0, 0, 0, 0.12);
    --kp-well: rgba(0, 0, 0, 0.06); --kp-well-shadow: rgba(0, 0, 0, 0.07);
    --kp-well-hi: rgba(255, 255, 255, 0.5); --kp-edge: rgba(0, 0, 0, 0.09);
    --ki-bg: #f7f4ee; --ki-track: #dfdcd8; --ki-knob: #ffffff; --ki-off: #8a857c;
    --ki-empty: #e3ded4; --ki-day: #a39e94; --ki-range: #8a857c; --ki-caption: #9a958b;
    --ki-title: #1f1d1a; --km-bg: rgba(244, 244, 244, 0.6); --km-ink: #262626;
    --km-sep: rgba(0, 0, 0, 0.11); --kc-ring: rgba(0, 0, 0, 0.55);
    --kt-bg: rgba(244, 239, 230, 0.62);
  }
}
.showcase[data-theme="light"] {
  --kp-panel: #f4efe6; --kp-card: #ebe4d7; --kp-card-hover: #e6ded0;
  --kp-card-border: rgba(107, 90, 60, 0.10); --kp-footer: #f9f6f0; --kp-dot: #e2dacb;
  --kp-title: #2a2620; --kp-ink: #2a2620; --kp-date: #2a2620; --kp-daydate: #9c968a;
  --kp-chev-off: #d2cabb; --kp-tool: #6b655b; --kp-tool-hover: #e6ded0;
  --kp-divider: rgba(107, 90, 60, 0.07); --kp-ctl: rgba(255, 255, 255, 0.7);
  --kp-ctl-hover: #ffffff; --kp-ctl-border: rgba(0, 0, 0, 0.08);
  --kp-ctl-border-hover: rgba(0, 0, 0, 0.12); --kp-ctl-shadow: rgba(0, 0, 0, 0.12);
  --kp-well: rgba(0, 0, 0, 0.06); --kp-well-shadow: rgba(0, 0, 0, 0.07);
  --kp-well-hi: rgba(255, 255, 255, 0.5); --kp-edge: rgba(0, 0, 0, 0.09);
  --ki-bg: #f7f4ee; --ki-track: #dfdcd8; --ki-knob: #ffffff; --ki-off: #8a857c;
  --ki-empty: #e3ded4; --ki-day: #a39e94; --ki-range: #8a857c; --ki-caption: #9a958b;
  --ki-title: #1f1d1a; --km-bg: rgba(244, 244, 244, 0.6); --km-ink: #262626;
  --km-sep: rgba(0, 0, 0, 0.11); --kc-ring: rgba(0, 0, 0, 0.55);
  --kt-bg: rgba(244, 239, 230, 0.62);
}

/* Which rendering shows. */
.story-track { display: none; }

/* Sixteen steps about 55vh apart; showcase.js starts the story while the stage
   is still coming in, so there is no dead scroll before the first click.
   Height: 100vh of stage + story end (16 x 55vh - 110vh lead) + 20vh hold on
   the last step before the stage scrolls away. */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .js:not(.legacy) .story-track {
    display: block;
    position: relative;
    height: 890vh;
  }
  .js:not(.legacy) .story-static { display: none; }
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-inner {
  /* As wide as the column allows, but never taller than the window minus the
     caption above and the theme switch below. */
  width: min(100%, calc((100vh - 215px) * 1.638));
  width: min(100%, calc((100svh - 215px) * 1.638));
}

.story-captions {
  display: grid;
  margin-bottom: 26px;
}

.story-caption {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.story-caption.is-active {
  opacity: 1;
  transform: none;
}

.story-caption h2,
.story-step h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  text-wrap: balance;
}

/* The story's titles fill as the scroll moves through their steps, letter by letter, grey
   to ink: a loading bar made of the words. showcase.js sets --p (0 to 1) on the active
   one; each letter (--k of --n) turns as --p passes it, over one letter's width. --p is
   registered so it can ease between scroll positions; without script it stays 1 (ink).
   Browsers without color-mix keep the plain ink title. */
@property --p { syntax: '<number>'; inherits: true; initial-value: 1; }
.story-fill { transition: --p 0.35s ease-out; }
.story-fill .sf-w { white-space: nowrap; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .story-fill span span {
    color: color-mix(in srgb, var(--ink) calc(clamp(0, var(--p, 1) * var(--n) - var(--k), 1) * 100%), rgba(11, 11, 12, 0.2));
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-fill { transition: none; }
}

.story-caption p,
.story-step p {
  margin: 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.4;
  color: var(--muted);
}

/* The desktop's inside: laid out at 1120 x 658 and scaled down to narrower frames; in wider
   ones showcase.js keeps the scale at 1 and sizes this to the whole frame. */
.screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1120px;
  height: 658px;
  transform: scale(var(--s, 1));
  transform-origin: 0 0;
}

.screen .menubar,
.ss-bar .menubar {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: auto;
}

.mb-kettle {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

.mb-kettle-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
}

.mb-run { display: none; }
.screen.is-running .mb-run { display: inline; }
.screen.is-running .mb-kettle-icon { display: none; }

/* The menu bar's time (MenuBarStyle): hours and minutes, or, set so in Settings, to the
   second. The same switch turns Settings' preview, popup label and menu check. */
.mb-sec { display: none; }
.mb-hms { font-variant-numeric: tabular-nums; }
.bar-sec .mb-full { display: none; }
.bar-sec .mb-sec { display: inline; }
.no-name .mb-name,
.no-name .mb-paren { display: none; }

/* A change made in Settings goes off where it shows: the item flashes amber, jumps and sends
   two rings out, so the eye finds the menu bar (and the preview) as they change. */
.mb-kettle,
.kw-item { position: relative; }

.is-pop { animation: kettle-pop 0.75s var(--spring); }

.is-pop::before,
.is-pop::after {
  content: '';
  position: absolute;
  inset: -1px -3px;
  border-radius: 8px;
  border: 2px solid #ffb900;
  pointer-events: none;
  animation: kettle-ring 0.9s ease-out forwards;
}

.is-pop::after {
  border-width: 1.5px;
  animation-delay: 0.16s;
  opacity: 0;
}

@keyframes kettle-pop {
  0% { transform: none; background-color: rgba(255, 185, 0, 0); }
  18% { transform: scale(1.14); background-color: rgba(255, 185, 0, 0.6); }
  100% { transform: none; background-color: rgba(255, 185, 0, 0); }
}

@keyframes kettle-ring {
  0% { opacity: 1; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(1.35, 2.4); }
}

/* ── Settings, General tab, at its Menu bar section (SettingsView) ── */

.kw {
  position: absolute;
  left: calc(50% - 150px);
  top: 120px;
  width: 480px;
  border-radius: 12px;
  overflow: visible;
  background: var(--kp-panel);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--kp-edge), 0 30px 60px -16px rgba(0, 0, 0, 0.5);
  color: var(--kp-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: normal;
  text-align: left;
  -webkit-font-smoothing: auto;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transition: opacity 0.2s ease-out, transform 0.3s var(--spring), visibility 0s linear 0.3s;
  z-index: 5;
}

.screen.is-settings .kw {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease-out, transform 0.3s var(--spring), visibility 0s;
}

.kw svg { display: block; max-width: none; }

.kw-top {
  position: relative;
  height: 82px;
  display: flex;
  justify-content: center;
}

.kw-lights {
  position: absolute;
  left: 14px;
  top: 12px;
  display: flex;
  gap: 8px;
}

.kw-lights i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #febc2e;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}

.kw-lights .kw-red { background: #ff5f57; }
.kw-lights i:last-child { background: #28c840; }
.kw-red.is-pressed { filter: brightness(0.85); }

.kw-title {
  position: absolute;
  top: 9px;
  font-weight: 700;
}

.kw-tabs {
  position: absolute;
  top: 32px;
  display: flex;
  gap: 2px;
  font-size: 11px;
  color: var(--kp-tool);
}

.kw-tab {
  width: 72px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 7px;
}

.kw-tab svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.kw-tab.is-on {
  background: var(--kp-ctl);
  color: #d99a00;
}

.kw-body {
  padding: 6px 20px 22px;
}

.kw-head {
  display: block;
  margin: 0 0 7px 4px;
  font-weight: 600;
}

.kw-card {
  border-radius: 12px;
  background: var(--kp-card);
  box-shadow: inset 0 0 0 1px var(--kp-card-border);
}

.kw-row {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.kw-row--preview { min-height: 54px; }

.kw-rule {
  display: block;
  height: 1px;
  margin-left: 14px;
  background: var(--kp-divider);
}

.kw-preview {
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border);
}

.kw-item {
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.14);
  white-space: pre;
}

/* The family's switch: amber with a check and a white knob on the right when on. */
.kw-toggle {
  position: relative;
  width: 54px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  background: #ffb900;
  box-shadow: inset 0 0 0 1px #e0a300, 0 1px 2px rgba(0, 0, 0, 0.15);
  color: #221f18;
}

.kw-toggle svg {
  position: absolute;
  left: 9px;
  top: 7px;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kw-toggle i {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.kw-toggle,
.kw-toggle i,
.kw-toggle svg { transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out, transform 0.3s var(--spring), opacity 0.15s ease-out; }
.kw-toggle.is-pressed { transform: scale(0.95); }

/* Off: the neutral track, the knob gone left, no check. */
.no-name .kw-toggle--name {
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.no-name .kw-toggle--name i { transform: translateX(-28px); }
.no-name .kw-toggle--name svg { opacity: 0; }

.kw-popup {
  position: relative;
  min-width: 150px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 3px 0 11px;
  border-radius: 8px;
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2.5px var(--kp-ctl-shadow);
  font-weight: 500;
  transition: filter 0.14s ease-out;
}

.kw-popup.is-hover { filter: brightness(1.03); }

.kw-chev {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #ffb900;
  box-shadow: inset 0 0 0 1px #e0a300;
  color: #221f18;
}

.kw-chev svg {
  width: 9px;
  height: 6px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The popup's menu opens over the button, the chosen item right on it, as macOS lays it. */
.kw-menu {
  position: absolute;
  left: -15px;
  top: -45px;
  width: 190px;
  padding: 5px 0;
  border-radius: 8px;
  background: var(--km-bg);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.28), inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 16px 36px -8px rgba(0, 0, 0, 0.4);
  color: var(--km-ink);
  font-weight: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
  z-index: 2;
}

.screen.is-popup .kw-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.05s linear, visibility 0s;
}

.kw-mi {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  padding-left: 26px;
}

.kw-mi::before {
  content: '';
  position: absolute;
  inset: 0 5px;
  border-radius: 5px;
  background: #ffb900;
  opacity: 0;
}

.kw-mi.is-hover::before { opacity: 1; }
.kw-mi.is-hover { color: #221f18; }
.kw-mi > * { position: relative; }

.kw-tick {
  position: absolute;
  left: 10px;
  top: 5px;
  visibility: hidden;
}

.kw-tick svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kw-mi--hm .kw-tick,
.bar-sec .kw-mi--sec .kw-tick { visibility: visible; }
.bar-sec .kw-mi--hm .kw-tick { visibility: hidden; }

/* The still for .story-static: the window as it stands, With seconds chosen. */
.story-step-shot--settings .kw {
  position: relative;
  left: auto;
  top: auto;
  max-width: 100%;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* A picture file on the desktop, Finder's way: a 64pt thumbnail over its name. Picked up, it
   stays put, selected, while a see-through copy rides under the cursor. */
.kf {
  position: absolute;
  right: 64px;
  top: 150px;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 12px;
  -webkit-font-smoothing: auto;
}

.kf-thumb {
  width: 64px;
  height: 64px;
  padding: 3px;
  border-radius: 7px;
  transition: background-color 0.12s ease-out;
}

.kf-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.kf-name {
  padding: 1px 5px;
  border-radius: 4px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.screen.is-dragging .kf-thumb { background: rgba(0, 0, 0, 0.22); }
.screen.is-dragging .kf-name { background: #0a64d8; text-shadow: none; }

.kf-ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 58px;
  height: 58px;
  margin: -24px 0 0 -30px;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  will-change: transform;
  transition: opacity 0.12s ease-out;
}

.screen.is-dragging .kf-ghost { opacity: 0.72; }

/* Kettle's own notice at the daily limit (LimitToast): 300pt, radius 16, the panel's ground
   thinned over a blur, a light rim. showcase.js hangs it under the menu bar item. */
.kt {
  position: absolute;
  left: 0;
  top: 40px;
  width: 300px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--kt-bg);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: inset 0 0 0 0.8px rgba(255, 255, 255, 0.3), 0 12px 30px -8px rgba(0, 0, 0, 0.4);
  color: var(--kp-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  -webkit-font-smoothing: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px) scale(0.94);
  transform-origin: 50% 0;
  transition: opacity 0.3s ease-out, transform 0.55s var(--spring), visibility 0s linear 0.55s;
  z-index: 7;
  pointer-events: none;
}

.screen.is-toast .kt {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease-out, transform 0.55s var(--spring), visibility 0s;
}

.kt-icon {
  flex: none;
  width: 32px;
  height: 32px;
  max-width: none;
}

.kt-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kt-text b {
  font-size: 12.5px;
  font-weight: 600;
}

.screen-panel {
  position: absolute;
  left: 73px;
  top: 99px;
  /* The panel shows with alpha and a touch of scale, as the app's does. */
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transform-origin: 50% 0;
  transition: opacity 0.22s ease-out, transform 0.3s var(--spring), visibility 0s linear 0.3s;
}

.screen.is-panel .screen-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.22s ease-out, transform 0.3s var(--spring), visibility 0s;
}

/* Menus open at once and fade out, the macOS way. showcase.js lines its
   left edge up with the status item. */
.screen-menu {
  position: absolute;
  right: 50px;
  top: 35px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
}

.screen.is-menu .screen-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.05s linear, visibility 0s;
}

/* ── The panel ─────────────────────────────────────────── */

/* The panel fits its cards, as the app's does: three projects make 324pt; a project's days
   open or Insights take it to the full 532pt. It hangs from its top edge and grows down. */
.kp {
  position: relative;
  width: 355px;
  height: 324px;
  transition: height 0.42s var(--spring), transform 0.22s cubic-bezier(0.32, 1.1, 0.42, 1);
  overflow: hidden;
  border-radius: 18px;
  background: var(--kp-panel);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35), 0 26px 50px -14px rgba(0, 0, 0, 0.45);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
  text-align: left;
  color: var(--kp-ink);
  /* macOS draws app text with stem darkening; "antialiased" (the page's
     choice) would make the panel's type thinner than the app's. */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  -webkit-user-select: none;
  user-select: none;
  isolation: isolate;
}

/* The window's rim, over everything inside it. */
.kp::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--kp-edge);
  pointer-events: none;
  z-index: 5;
}

.kp svg {
  display: block;
  max-width: none;
}

.kp-screen {
  position: absolute;
  inset: 0;
  background: var(--kp-panel);
  transition: transform 0.55s var(--spring);
}

.kp-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.kp-title {
  font-size: 12px;
  color: var(--kp-title);
}

.kp-dot {
  position: absolute;
  left: 16px;
  top: 13px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--kp-dot);
}

.kp-tool {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kp-tool);
}

.kp-tool::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: transparent;
  transition: background-color 0.14s ease-out;
}

.kp-tool.is-hover::before { background: var(--kp-tool-hover); }
.kp-tool > * { position: relative; }

.kp-gear {
  position: absolute;
  right: 8px;
  top: 5px;
}

.kp-gear svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linejoin: round;
}

.kp-scroll {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  height: 466px;
  overflow: hidden;
  /* The app's scroll edge fade: 20 pt at the top, 40 at the bottom, cosine. */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.31) 4px, rgba(0, 0, 0, 0.59) 8px, rgba(0, 0, 0, 0.81) 12px, rgba(0, 0, 0, 0.95) 16px, #000 20px, #000 calc(100% - 40px), rgba(0, 0, 0, 0.95) calc(100% - 32px), rgba(0, 0, 0, 0.81) calc(100% - 24px), rgba(0, 0, 0, 0.59) calc(100% - 16px), rgba(0, 0, 0, 0.31) calc(100% - 8px), rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.31) 4px, rgba(0, 0, 0, 0.59) 8px, rgba(0, 0, 0, 0.81) 12px, rgba(0, 0, 0, 0.95) 16px, #000 20px, #000 calc(100% - 40px), rgba(0, 0, 0, 0.95) calc(100% - 32px), rgba(0, 0, 0, 0.81) calc(100% - 24px), rgba(0, 0, 0, 0.59) calc(100% - 16px), rgba(0, 0, 0, 0.31) calc(100% - 8px), rgba(0, 0, 0, 0) 100%);
}

.kp-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 12px 40px;
}

.kp-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--kp-card);
  transition: background-color 0.14s ease-out;
}

.kp-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--kp-card-border);
  pointer-events: none;
}

.kp-card.is-hover { background: var(--kp-card-hover); }

.kp-row {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.kp-well {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  background: var(--kp-well);
  box-shadow: inset 0 1.5px 2.5px var(--kp-well-shadow), inset 0 -0.5px 0 var(--kp-well-hi);
}

/* A custom picture sits at 82% of its well, corners 20% of the well (ProjectIconView). */
.kp-pic {
  display: block;
  width: 28px;
  height: 28px;
  max-width: none;
  border-radius: 7px;
  object-fit: contain;
}

/* The project a dropped picture starts: folded away until it is saved. */
.kp-card[data-project="dropped"] {
  height: 0;
  margin-top: -8px;
  opacity: 0;
  transition: height 0.42s var(--spring), margin-top 0.42s var(--spring), opacity 0.25s ease-out, background-color 0.14s ease-out;
}

.kp.has-dropped .kp-card[data-project="dropped"] {
  height: 60px;
  margin-top: 0;
  opacity: 1;
}

.kp-name {
  flex: 1;
  min-width: 0;
  margin-left: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The Kettle switch, the app's default design (Amber Tab), exported from the app at 3x with
   room for its shadow and glow (the PNG is 64x60 around a 40x36 switch). The running time
   sits to its left, as in the app, and shows only while the timer runs. */
.kp-play {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 8px;
  transition: transform 0.16s ease-out, filter 0.14s ease-out;
}

.kp-play.is-hover { filter: brightness(1.04); }

.kp-play.is-pressed,
.kp-card.is-pressed .kp-row,
.kp-tool.is-pressed {
  transform: scale(0.94);
}

.kp-card .kp-row,
.kp-tool { transition: transform 0.16s ease-out; }
.kp-card.is-pressed .kp-row { transform: scale(0.985); }

.kp-switch {
  position: relative;
  width: 40px;
  height: 36px;
}

.kp-sw {
  position: absolute;
  left: -12px;
  top: -12px;
  width: 64px;
  height: 60px;
  /* The page's img rule caps width at the parent's (40px) and squashed the switch. */
  max-width: none;
  pointer-events: none;
}

.kp-sw--on { opacity: 0; transition: opacity 0.22s ease-out; }

.kp-time {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--kp-ink);
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: opacity 0.22s ease-out, max-width 0.45s var(--spring);
}

.kp.is-running [data-project="mobile"] .kp-sw--on { opacity: 1; }
.kp.is-running [data-project="mobile"] .kp-time { max-width: 80px; opacity: 1; transition-delay: 0.08s, 0s; }

/* A month of days unfolds from under the card's header. */
.kp-history {
  height: 0;
  overflow: hidden;
  transition: height 0.55s var(--spring);
}

.kp-history-in {
  background: var(--kp-footer);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.55s var(--spring), opacity 0.3s ease-out;
}

.kp.has-dropped { height: 392px; }

.kp.is-open,
.kp.is-insights,
.kp.is-sheet { height: 532px; }

/* The switch springs up at the limit. */
.kp.is-tripped [data-project="mobile"] .kp-switch { animation: kp-trip 0.4s var(--spring); }

@keyframes kp-trip {
  from { transform: translateY(2px) scale(0.96); }
  to { transform: none; }
}
.kp.is-open [data-project="client"] .kp-history { height: 278px; }

.kp.is-open [data-project="client"] .kp-history-in {
  transform: none;
  opacity: 1;
}

.kp-rule {
  display: block;
  height: 1px;
  background: var(--kp-divider);
}

.kp-rule--inset { margin: 0 24px; }
.kp-rule--day { margin: 12.5px 24px; }

.kp-month {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 17px;
  color: var(--kp-date);
}

.kp-chev {
  width: 30px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kp-chev svg,
.ki-btn svg,
.kp-back svg {
  width: 8.5px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kp-chev--off {
  color: var(--kp-chev-off);
  transform: scaleX(-1);
}

.kp-days { padding: 10px 0 14px; }

.kp-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24.5px 0 24px;
}

.kp-day-text {
  display: flex;
  flex-direction: column;
  line-height: 16px;
}

.kp-day-date {
  margin-top: -0.5px;
  color: var(--kp-daydate);
}

.kp-pill {
  width: 72px;
  height: 30px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2.5px var(--kp-ctl-shadow);
}

.kp-toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13.5px 0 13px;
}

.kp-plus svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.kp-chart {
  align-items: flex-end;
  gap: 0.5px;
  padding-bottom: 9.5px;
}

.kp-chart i {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: currentColor;
}

.kp-chart i:nth-child(1) { height: 7.5px; }
.kp-chart i:nth-child(2) { height: 9px; }
.kp-chart i:nth-child(3) { height: 11px; }

.kp-dim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease-out;
  z-index: 3;
}

.kp-back {
  position: absolute;
  left: 8px;
  top: 5px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kp-tool);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 4;
}

.kp-back svg { width: 9px; height: 15px; stroke-width: 2; }

/* A drop hovering: the panel swells 3.5% and its rim lights up in Kettle's colours, slowly
   travelling round (PanelSwell, KettleEdgeGlow). */
@property --kg {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.kp-glow {
  position: absolute;
  inset: 0;
  padding: 2.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--kg), #f5bd40, #ff6b4d, #ff73ad, #59d9d1, #f5bd40);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.22s ease-out;
  animation: kp-glow 3s linear infinite paused;
  pointer-events: none;
  z-index: 6;
}

.screen-panel.is-drop .kp { transform: scale(1.035); }
.screen-panel.is-drop .kp-glow { opacity: 1; animation-play-state: running; }

@keyframes kp-glow { to { --kg: 360deg; } }

/* The new project sheet (SheetCard 426pt with ProjectDetailsView): it rises from the bottom
   over the list, which blurs under a dim. The blur is the dim's backdrop, cut to the panel's
   corners; a filter on the list itself is drawn past the rounded clip and squares them. */
.kp-scrim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  z-index: 3;
}

.kp.is-sheet .kp-scrim { opacity: 1; }

.ks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 426px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  border-radius: 22px 22px 0 0;
  background: var(--kp-panel);
  box-shadow: inset 0 0 0 1px var(--kp-card-border), 0 -2px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(104%);
  transition: transform 0.45s var(--spring);
  z-index: 4;
}

.kp.is-sheet .ks { transform: none; }

.ks-grabber {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 36px;
  height: 5px;
  margin-left: -18px;
  border-radius: 3px;
  background: var(--kp-ink);
  opacity: 0.18;
}

.ks-head {
  position: relative;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ks-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--kp-title);
}

.ks-close {
  position: absolute;
  right: 8px;
  top: 3px;
}

.ks-close svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.ks-well {
  margin-top: 14px;
  width: 96px;
  height: 96px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--kp-well);
  box-shadow: inset 0 2px 4px var(--kp-well-shadow), inset 0 -0.5px 0 var(--kp-well-hi);
}

.ks-pic {
  display: block;
  width: 79px;
  height: 79px;
  max-width: none;
  border-radius: 20px;
  object-fit: contain;
}

.ks-form {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}

.ks-label {
  margin-top: 20px;
  padding-left: 1px;
}

.ks-label--limit { margin-top: 16.5px; }

.ks-field,
.ks-sq {
  height: 36px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2.5px var(--kp-ctl-shadow);
}

.ks-field {
  margin-top: 8.5px;
  padding: 0 21px;
}

.ks-stepper {
  margin-top: 8.5px;
  display: flex;
  gap: 8.5px;
}

.ks-stepper .ks-field {
  flex: 1;
  margin-top: 0;
  justify-content: center;
  font-size: 19px;
}

.ks-sq {
  flex: none;
  width: 36px;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
}

.ks-save {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 31px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--kp-accent);
  box-shadow: inset 0 0 0 1px var(--kp-accent-border), 0 1px 2.5px var(--kp-ctl-shadow);
  color: var(--kp-on-accent);
  font-size: 12px;
  transition: transform 0.16s ease-out, filter 0.14s ease-out;
}

.ks-save.is-hover { filter: brightness(1.05); }
.ks-save.is-pressed { transform: scale(0.97); }

/* Insights, pushed in from the right as in the app (the list drifts 118 pt
   left and dims). */
.ki {
  display: flex;
  flex-direction: column;
  padding: 40px 21px 0 20px;
  background: var(--ki-bg);
  transform: translateX(100%);
  box-shadow: -6px 0 18px rgba(0, 0, 0, 0);
}

.ki .kp-title { color: var(--ki-title); }

.kp.is-insights .ki { transform: none; }
.kp.is-insights .kp-list { transform: translateX(-118px); }
.kp.is-insights .kp-dim { opacity: 0.1; }
.kp.is-insights .kp-back { opacity: 1; }

.ki-select {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--kp-well);
  box-shadow: inset 0 1.5px 2.5px var(--kp-well-shadow), inset 0 -0.5px 0 var(--kp-well-hi);
}

.ki-tray {
  width: 24px;
  display: flex;
  justify-content: center;
}

.ki-tray svg {
  width: 17px;
  height: 15px;
  fill: var(--kp-ink);
  stroke: var(--kp-ink);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.ki-down {
  margin-left: auto;
  color: var(--kp-tool);
}

.ki-down svg {
  width: 11px;
  height: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ki-seg {
  margin-top: 9px;
  height: 35px;
  display: flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--ki-track);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2.5px var(--kp-ctl-shadow);
  font-size: 12.5px;
  color: var(--ki-off);
}

.ki-seg span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ki-seg .ki-knob {
  border-radius: 6px;
  background: var(--ki-knob);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  color: #1f1d1a;
  font-weight: 600;
}

.ki-nav {
  margin-top: 9px;
  height: 35px;
  display: flex;
  gap: 8px;
}

.ki-btn,
.ki-range {
  border-radius: 12px;
  background: var(--kp-ctl);
  box-shadow: inset 0 0 0 1px var(--kp-ctl-border), 0 1px 2.5px var(--kp-ctl-shadow);
}

.ki-btn {
  flex: none;
  width: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ki-btn svg { width: 7px; height: 12px; stroke-width: 1.8; }
.ki-btn--next svg { transform: scaleX(-1); }

.ki-range {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5px;
  line-height: 1.12;
}

.ki-sub {
  font-size: 11px;
  color: var(--ki-range);
}

.ki-chart {
  margin-top: 1.5px;
  height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.ki-bar {
  display: block;
  flex: 1;
  height: var(--h);
  border-radius: 11px;
  background: var(--kp-ink);
}

.ki-bar--empty { background: var(--ki-empty); }

.ki-labels {
  margin-top: 10.5px;
  height: 15px;
  display: flex;
  gap: 7px;
  font-size: 12px;
  line-height: 15px;
  color: var(--ki-day);
}

.ki-labels span {
  flex: 1;
  text-align: center;
}

.ki-download {
  margin-top: 28.5px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-radius: 10px;
  background: var(--kp-accent);
  box-shadow: inset 0 0 0 1px var(--kp-accent-border), 0 1px 2.5px var(--kp-ctl-shadow);
  color: var(--kp-on-accent);
  font-size: 13px;
  font-weight: 500;
}

.ki-download svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ki-caption {
  margin-top: 5.5px;
  height: 15px;
  text-align: center;
  font-size: 11.5px;
  line-height: 15px;
  color: var(--ki-caption);
}

/* ── The menu bar menu ─────────────────────────────────── */

.km {
  width: 250px;
  padding: 5.5px 0;
  border-radius: 10px;
  background: var(--km-bg);
  /* Translucent like a macOS menu: the wallpaper shows through, blurred and
     a little more saturated. */
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.28), inset 0 0 0 0.5px rgba(255, 255, 255, 0.25), 0 16px 36px -8px rgba(0, 0, 0, 0.4);
  color: var(--km-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

.km-row {
  position: relative;
  height: 35px;
  display: flex;
  align-items: center;
  padding-right: 13px;
}

.km-lead {
  position: absolute;
  left: 14px;
  top: 0;
  height: 35px;
  display: flex;
  align-items: center;
}

.km-label { margin-left: 39.5px; position: relative; }
.km-lead { z-index: 1; }

/* The row under the pointer: the accent, inset 5 pt, radius 8, accent ink
   (StatusMenuRowView). */
.km-row::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  background: #ffb900;
  opacity: 0;
}

.km-row.is-hover::before { opacity: 1; }
.km-row.is-hover { color: #221f18; }
.km-row--sym .km-lead { left: 13px; }
.km-row--sym .km-label { margin-left: 36px; }

.km-row--sym svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.km-pause,
.km-time { display: none; }

.km-pause { gap: 3px; padding-left: 1px; }

.km-pause i {
  display: block;
  width: 4px;
  height: 13px;
  border-radius: 1px;
  background: currentColor;
}

.km-time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.screen.is-running .km-mobile .km-emoji { display: none; }
.screen.is-running .km-mobile .km-pause { display: flex; }
.screen.is-running .km-mobile .km-time { display: block; }

.km-sep {
  display: block;
  height: 1px;
  margin: 4.5px 14px;
  background: var(--km-sep);
}

/* ── The cursor ────────────────────────────────────────── */

.kc-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 28px;
  margin: -1.5px 0 0 -1.5px;
  pointer-events: none;
  z-index: 10;
  will-change: transform;
  filter: drop-shadow(0 2px 2.5px rgba(0, 0, 0, 0.35));
}

.kc-cursor svg {
  width: 20px;
  height: 28px;
  transform-origin: 1.5px 1.5px;
  transition: transform 0.12s ease-out;
}

.kc-cursor.is-down svg,
.kc-cursor.is-hold svg { transform: scale(0.84); }

.kc-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 1.5px solid var(--kc-ring);
  opacity: 0;
  pointer-events: none;
  z-index: 9;
}

.kc-ring.is-on { animation: kc-ring 0.5s ease-out; }

@keyframes kc-ring {
  from { opacity: 0.85; transform: scale(0.3); }
  to { opacity: 0; transform: scale(1); }
}

/* ── Static steps (narrow screens, reduced motion, no script) ── */

.story-static {
  max-width: 1064px;
  margin: 0 auto;
}

.story-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 48px;
  align-items: center;
  padding: 28px 0;
}

.story-step-shot {
  display: flex;
  justify-content: center;
  padding: 32px;
  border-radius: 24px;
  background: var(--night-wallpaper);
}

@media (prefers-color-scheme: light) {
  .showcase:not([data-theme]) .story-step-shot { background: var(--day-wallpaper); }
}
.showcase[data-theme="light"] .story-step-shot { background: var(--day-wallpaper); }

.story-step-shot .kp {
  width: 100%;
  max-width: 355px;
}

.story-static .theme-switch { margin-top: 28px; }

/* Static steps 0 and 1: the menu bar, then with its menu open. */
.story-step-shot--bar {
  position: relative;
  display: block;
  padding: 0;
  min-height: 200px;
  overflow: hidden;
}

.story-step-shot--menu { min-height: 340px; }

.ss-bar .menubar { border-radius: 24px 24px 0 0; }
.ss-bar .mb-run { display: none; }
.ss-bar.is-running .mb-run { display: inline; }
.ss-bar.is-running .mb-kettle-icon { display: none; }

/* The daily limit: the notice over the panel it speaks of. */
.story-step-shot--toast {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.story-step-shot .kt {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  max-width: 100%;
}

.ss-menu {
  position: absolute;
  top: 35px;
  right: 24px;
}

@media (max-width: 820px) {
  .story-step {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 24px 0;
  }

  .story-step-shot { padding: 18px 16px; }
}

/* ── Front page: packshot ──────────────────────────────── */

.packshot {
  max-width: var(--column);
  margin: 0 auto;
  padding: 48px 28px 24px;
  text-align: center;
}

.packshot-icon {
  width: clamp(168px, 24vw, 272px);
  height: auto;
  margin: 0 auto;
  /* The icon's own tight shadow is cut out of the image (AppIcon-1024-flat); this one is
     wide, soft and warm, as on the cream ground. */
  filter: drop-shadow(0 18px 28px rgba(92, 64, 24, 0.20)) drop-shadow(0 4px 8px rgba(92, 64, 24, 0.12));
  transform: scale(var(--ps, 1));
  will-change: transform;
}

.packshot-name {
  font-family: var(--font-heading);
  font-size: clamp(54px, 9.4vw, 112px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 12px 0 16px;
}

.packshot-tagline {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 500;
  color: var(--muted);
  margin: 0 auto 36px;
  max-width: 30rem;
  text-wrap: balance;
}

.packshot .store-pending { align-items: center; }

.features { margin-bottom: 128px; }

/* ── Mobile: two versions (the head's script sets html.m1 where the browser can run the
   live story, html.m2 under reduced motion or in an old browser; ?m=1, ?m=2 or ?m=0 force
   one, or neither). ─────────────────────────────────────────────────────────────────── */

/* Version 1: the live story under 821 px too, through a camera. The Mac is drawn at the
   app's own size (--mac-w, showcase.js) and the window shows only the part the story is
   about: --cam-x, --cam-y and --cam-k move and scale it there. The stage runs edge to
   edge, the caption on top, the theme switch at the bottom. */
@media (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  html.m1.js:not(.legacy) .story-track {
    display: block;
    position: relative;
    height: 890vh;
  }
  html.m1.js:not(.legacy) .story-static { display: none; }
  html.m1.js .story:not(.is-ready) .story-track .mac { opacity: 0; }
  html.m1.js .story.is-ready .story-track .mac { transition: opacity 0.25s ease, transform 0.9s cubic-bezier(0.3, 0, 0.15, 1); }
  html.m1 .story-track { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
  html.m1 .story-stage { overflow: hidden; align-items: flex-start; }
  html.m1 .story-inner { width: 100%; height: 100%; }
  /* The caption stays over the Mac: the camera moves the Mac up under it. */
  html.m1 .story-captions {
    position: relative;
    z-index: 3;
    margin-bottom: 0;
    padding: 24px 20px 18px;
    background: var(--ground);
  }
  html.m1 .story-caption h2 { font-size: 28px; }
  html.m1 .story-caption p { font-size: 16px; }
  html.m1 .story-track .mac {
    width: var(--mac-w, 100%);
    transform-origin: 0 0;
    transform: translate(var(--cam-x, 0px), var(--cam-y, 0px)) scale(var(--cam-k, 1));
  }
  html.m1 .story.is-still .story-track .mac { transition: none; }
  /* The menu bar as tall as the frame's notch at this layout (--mb-h, showcase.js). */
  html.m1 .story-track .menubar { height: var(--mb-h, 32px); }
  html.m1 .story-inner > .theme-switch {
    position: absolute;
    left: 50%;
    bottom: 14px;
    margin: 0;
    transform: translateX(-50%);
    z-index: 5;
  }
}

/* Version 2: the static steps, each playing its part as it comes into view (.is-in,
   showcase.js): the picture rises in, the menu opens, the limit notice drops in. */
html.m2 .story-step-shot {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.m2 .story-step.is-in .story-step-shot { opacity: 1; transform: none; }
html.m2 .story-step-shot--menu .ss-menu {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s ease 0.5s, transform 0.5s cubic-bezier(0.3, 1.25, 0.5, 1) 0.5s;
}
html.m2 .story-step.is-in .story-step-shot--menu .ss-menu { opacity: 1; transform: none; }
html.m2 .story-step-shot--toast .kt {
  opacity: 0;
  translate: 0 -12px;
  transition: opacity 0.4s ease 0.45s, translate 0.6s cubic-bezier(0.3, 1.25, 0.5, 1) 0.45s;
}
html.m2 .story-step.is-in .story-step-shot--toast .kt { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  html.m2 .story-step-shot,
  html.m2 .story-step-shot--menu .ss-menu,
  html.m2 .story-step-shot--toast .kt { opacity: 1; transform: none; translate: none; transition: none; }
}

/* The static Settings window (435 pt) on a phone: drawn smaller so it fits the column. */
@media (max-width: 480px) {
  .story-step-shot--settings .ss-settings { zoom: 0.8; }
}

/* Long single words (German page titles, feature names) break rather than run off a
   phone's edge. */
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 480px) {
  :lang(de) h1, :lang(de) h2, :lang(de) h3 { hyphens: auto; }
}
