/*
 * ReleaseKit stylesheet.
 *
 * Apple-style: system font (SF Pro on Apple devices), one blue for actions,
 * pill buttons, hairlines, generous type, no shadows.
 * Every color, size and radius in a rule comes from the tokens below.
 * See docs/ui.md.
 */

:root {
  /* Palette */
  --ink: #1d1d1f;
  --gray: #86868b;
  --gray-2: #6e6e73;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --on-blue: #ffffff;
  --canvas: #ffffff;
  --off-white: #fbfbfd;
  --parchment: #f5f5f7;
  --danger: #ff3b30;
  --success: #248a3d;
  --warning: #b25000;

  /* Layout */
  --content: 980px;
  --gutter: 22px;
  --nav-height: 52px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 20px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-xxxl: 48px;
  --space-huge: 64px;

  /* Radius */
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 980px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, monospace;
  --size-title2: 40px;
  --size-title3: 28px;
  --size-headline: 20px;
  --size-body: 17px;
  --size-callout: 15px;
  --size-caption: 13px;
  --size-nav: 12px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Shown at the top while a page loads in place, if it takes a moment. */
.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 8s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.2s;
}

.page-progress.is-loading {
  width: 90%;
}

.page-progress.is-done {
  width: 100%;
  opacity: 0;
  transition: width 0.15s, opacity 0.2s 0.1s;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Room for the scrollbar on every page, so moving between a short page
     and a long one (an app's Settings, the account's Storage) never
     shifts the layout sideways. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
p,
pre {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.stack-loose {
  gap: var(--space-xl);
}

/* --- Navigation bar ------------------------------------------------------- */

/* Sticky and frosted, like the product bar on apple.com. The negative margin
   lets the page start underneath it, so content shows through the blur. */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  margin-bottom: calc(-1 * var(--nav-height));
}

.nav-material {
  position: absolute;
  inset: 0;
  /* Fallback where backdrop-filter is unavailable. */
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.16);
}

@supports ((-webkit-backdrop-filter: initial) or (backdrop-filter: initial)) {
  .nav-material {
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  height: var(--nav-height);
  max-width: var(--content);
  margin: 0 auto;
  padding-inline: var(--gutter);
  white-space: nowrap;
}

/* The brand, then "Apps", on the left. */
.nav-lead {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  font-size: var(--size-nav);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  min-width: 0;
  font-size: var(--size-nav);
  line-height: 1;
}

.nav-link {
  color: var(--ink);
  line-height: 22px;
  opacity: 0.88;
}

.nav-link:hover {
  color: var(--link);
  text-decoration: none;
}

/* "Sign out" is a form button that reads as a nav link. */
.nav-link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.nav-user {
  overflow: hidden;
  color: var(--gray-2);
  text-overflow: ellipsis;
}

/* The small blue pill on the right of the bar. */
.nav-pill {
  padding: var(--space-xs) 11px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--on-blue);
  line-height: 1.33;
  transition: background 0.24s var(--ease);
}

.nav-pill:hover {
  background: var(--blue-hover);
  text-decoration: none;
}

/* --- Collapsible bar (the homepage) -------------------------------------- */

/* Wide: the links sit in the bar. On phones they fold into a tray under it,
   opened by a chevron (.menu-open on the nav), as on apple.com. */
.nav-tray,
.nav-actions {
  display: flex;
  align-items: center;
}

.nav-items {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-actions {
  gap: var(--space-xs);
}

/* Shown in the bar on wide screens only, or in the tray on phones only. */
.nav-narrow-only {
  display: none;
}

.nav-menucta {
  display: none;
  width: 40px;
  height: 30px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-chevron {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0.8;
  transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-chevron::before,
.nav-chevron::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 11px;
  height: 1px;
  background: var(--ink);
  transition:
    transform 1s cubic-bezier(0.86, 0, 0.07, 1),
    transform-origin 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-chevron::before {
  right: 50%;
  border-radius: 0.5px 0 0 0.5px;
  transform-origin: 100% 100%;
  transform: rotate(40deg) scaleY(1.1);
}

.nav-chevron::after {
  left: 50%;
  border-radius: 0 0.5px 0.5px 0;
  transform-origin: 0% 100%;
  transform: rotate(-40deg) scaleY(1.1);
}

/* Open: the chevron flips to point up. */
.menu-open .nav-chevron {
  transform: translateY(-8px);
}

.menu-open .nav-chevron::before {
  transform-origin: 100% 0%;
  transform: rotate(-40deg) scaleY(1.1);
}

.menu-open .nav-chevron::after {
  transform-origin: 0% 0%;
  transform: rotate(40deg) scaleY(1.1);
}

.nav-menucta:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  /* A shorter bar on phones, as on apple.com. */
  :root {
    --nav-height: 48px;
  }

  /* The material grows with the tray. */
  .nav-collapsible .nav-material {
    bottom: auto;
    min-height: 100%;
  }

  .nav-collapsible.menu-open .nav-material {
    background-color: rgba(255, 255, 255, 0.92);
  }

  .nav-collapsible .nav-inner {
    position: relative;
    gap: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    min-height: var(--nav-height);
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
  }

  .nav-collapsible .nav-brand {
    height: var(--nav-height);
    font-size: 19px;
  }

  .nav-collapsible .nav-menu {
    display: block;
    width: 100%;
  }

  .nav-collapsible .nav-actions {
    position: absolute;
    top: 0;
    right: max(14px, env(safe-area-inset-right));
    height: var(--nav-height);
  }

  .nav-menucta {
    display: block;
  }

  .nav-items .nav-narrow-only {
    display: block;
  }

  .nav-tray {
    display: block;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    transition:
      max-height 0.5s cubic-bezier(0.28, 0.11, 0.32, 1) 0.4s,
      visibility 0s linear 1s;
  }

  .menu-open .nav-tray {
    max-height: calc(100vh - 2 * var(--nav-height));
    overflow-y: auto;
    pointer-events: auto;
    visibility: visible;
    transition-delay: 0.2s, 0s;
  }

  .nav-items {
    display: block;
    width: 100%;
    padding: 4px 4px 24px;
    opacity: 0;
    transform: translate3d(0, -150px, 0);
    transition:
      transform 1s cubic-bezier(0.23, 1, 0.32, 1) 0.5s,
      opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
  }

  .menu-open .nav-items {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.2s, 0.4s;
  }

  .nav-items li {
    height: 44px;
  }

  .nav-items .nav-link,
  .nav-items form {
    width: 100%;
    height: 100%;
  }

  .nav-items .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.18);
    font-size: 17px;
    line-height: 1.3;
    opacity: 0;
    transform: translate3d(0, -25px, 0);
    transition: 0.5s ease;
    transition-property: transform, opacity;
  }

  .nav-items li:first-child .nav-link {
    border: 0;
  }

  .nav-items .nav-user {
    color: var(--ink);
  }

  .nav-wide-only {
    display: none;
  }

  .menu-open .nav-items .nav-link {
    opacity: 0.92;
    transform: translate3d(0, 0, 0);
  }

  /* A cascade, in on open and out on close. */
  .nav-items li:nth-child(1) .nav-link { transition-delay: 0.07s; }
  .nav-items li:nth-child(2) .nav-link { transition-delay: 0.14s; }
  .nav-items li:nth-child(3) .nav-link { transition-delay: 0.21s; }
  .nav-items li:nth-child(4) .nav-link { transition-delay: 0.28s; }
  .menu-open .nav-items li:nth-child(1) .nav-link { transition-delay: 0.63s; }
  .menu-open .nav-items li:nth-child(2) .nav-link { transition-delay: 0.56s; }
  .menu-open .nav-items li:nth-child(3) .nav-link { transition-delay: 0.49s; }
  .menu-open .nav-items li:nth-child(4) .nav-link { transition-delay: 0.42s; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-collapsible *,
  .nav-collapsible *::before,
  .nav-collapsible *::after {
    transition: none !important;
  }
}

/* --- Buttons: pills ------------------------------------------------------ */

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), opacity 0.25s var(--ease);
}

.button:hover {
  text-decoration: none;
  opacity: 0.88;
}

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

.button-primary {
  background: var(--blue);
  color: var(--on-blue);
}

.button-primary:hover {
  background: var(--blue-hover);
  opacity: 1;
}

.button-danger {
  background: var(--danger);
  color: var(--on-blue);
}

.button-apple {
  background: var(--ink);
  color: var(--on-blue);
}

.button-neutral {
  background: var(--off-white);
  border-color: var(--hairline);
  color: var(--ink);
}

/* Sized to its label instead of the container. */
.button-inline {
  width: auto;
}

/* A compact pill for page headers and empty states. */
.button-small {
  width: auto;
  padding: var(--space-sm) var(--space-base);
  font-size: var(--size-callout);
}

.button-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* A button that reads as a link, e.g. Cancel. */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: var(--size-callout);
  letter-spacing: inherit;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

/* The large call to action on the homepage. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--on-blue);
  font-size: 1.2rem;
  white-space: nowrap;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.cta:hover {
  background: var(--blue-hover);
  text-decoration: none;
  transform: scale(1.03);
}

.cta:active {
  transform: scale(0.98);
}

/* A text link with Apple's trailing chevron. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.link-arrow::after {
  content: "›";
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* --- Type scale for marketing pages --------------------------------------- */

.display {
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.lede {
  color: var(--gray-2);
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  line-height: 1.35;
}

/* --- Form fields --------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.field-label {
  font-size: var(--size-callout);
  font-weight: 600;
}

.field-hint {
  color: var(--gray);
  font-size: var(--size-caption);
}

.input {
  width: 100%;
  padding: var(--space-md) var(--space-base);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s var(--ease);
}

.input:focus {
  border-color: var(--blue);
  outline: none;
}

.input::placeholder {
  color: var(--gray);
}

/* For identifiers the developer must type exactly. */
.input-mono {
  font-family: var(--mono);
  font-size: var(--size-callout);
  letter-spacing: 0;
}

/* A fixed prefix joined to the left of an input. */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-prefix {
  display: flex;
  align-items: center;
  padding-inline: var(--space-base) var(--space-md);
  border: 1px solid var(--hairline);
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--parchment);
  color: var(--gray-2);
  font-family: var(--mono);
  font-size: var(--size-callout);
  letter-spacing: 0;
  white-space: nowrap;
}

.input-group .input {
  min-width: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-top: var(--space-sm);
}

.notice {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-base);
  border-radius: var(--radius-md);
  background: var(--parchment);
  color: var(--danger);
  font-size: var(--size-callout);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--gray);
  font-size: var(--size-caption);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* --- Sign-in and sign-up -------------------------------------------------- */

/* The card is lifted by the surface change (parchment to white), not a shadow. */
.auth {
  background: var(--parchment);
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  min-height: 100vh;
  padding: calc(var(--nav-height) + var(--space-xxxl)) var(--gutter) var(--space-xxxl);
}

.card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-xxl);
  border-radius: var(--radius-xl);
  background: var(--canvas);
}

.title {
  margin-bottom: var(--space-xl);
  font-size: var(--size-title3);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.auth-footer {
  color: var(--gray-2);
  font-size: var(--size-callout);
}

/* Confirming the email: the code page, and the page the email's link opens. */
.verify .title {
  margin-bottom: var(--space-md);
}

.verify-text {
  margin-bottom: var(--space-xl);
  color: var(--gray-2);
  font-size: var(--size-callout);
  line-height: 1.47;
}

.verify-text strong {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.field-link {
  align-self: flex-end;
  color: var(--link);
}

.verify-junk {
  margin: calc(-1 * var(--space-md)) 0 var(--space-xl);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--off-white);
  color: var(--gray-2);
  font-size: var(--size-caption);
  line-height: 1.38;
}

.verify .notice {
  margin-bottom: var(--space-lg);
}

.input-code {
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 28px;
  letter-spacing: 0.3em;
  text-align: center;
}

.verify-resend {
  margin-top: var(--space-md);
}

.verify-address {
  margin-top: var(--space-xl);
}

.verify-address form {
  margin-top: var(--space-md);
}

/* A section reached by a link (#address, #upload) stops below the
   sticky bar, its title in view, instead of hiding under it. */
[id] {
  scroll-margin-top: calc(var(--nav-height) + var(--space-xl));
}

/* --- Signed-in pages ----------------------------------------------------- */

.page {
  max-width: var(--content);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-xxxl)) var(--gutter) var(--space-huge);
}

.page-narrow {
  max-width: 600px;
}

/* Title on the left, the page's main action on the right. */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  margin-bottom: var(--space-xxl);
}

.page-head .large-title {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  font-size: var(--size-callout);
}

.back-link::before {
  content: "‹";
}

.large-title.large-title-tight {
  margin-bottom: var(--space-xs);
}

.page-subtitle {
  margin-bottom: var(--space-xxl);
  color: var(--gray-2);
  font-family: var(--mono);
  font-size: var(--size-callout);
  letter-spacing: 0;
}

.section {
  margin-top: var(--space-xxxl);
}

/* The first section under a view's title: the title's margin is enough. */
.section.section-first {
  margin-top: 0;
}

/* --- App views: sidebar menu on the left, the view on the right ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-huge);
  max-width: calc(var(--content) + 200px + var(--space-huge));
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-xxxl)) var(--gutter) var(--space-huge);
}

.app-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xxxl));
  align-self: start;
}

.app-sidebar-name {
  font-size: var(--size-headline);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.app-sidebar-id {
  margin-top: 2px;
  color: var(--gray);
  font-family: var(--mono);
  font-size: var(--size-caption);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-xl);
}

/* Like a Finder or System Settings sidebar row. */
.app-menu-item {
  padding: 7px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-size: var(--size-callout);
  text-decoration: none;
}

.app-menu-item:hover {
  background: var(--parchment);
  text-decoration: none;
}

.app-menu-item[aria-current="page"] {
  background: var(--hairline-soft);
  font-weight: 600;
}

/* The legal pages, small and quiet under the Account menu. */
.app-sidebar-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-xxl);
  padding: 0 var(--space-md);
  font-size: var(--size-caption);
}

.app-sidebar-legal a {
  color: var(--gray-2);
}

/* Narrow screens: the menu becomes a row of tabs above the view. */
@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .app-sidebar {
    position: static;
  }

  .app-menu {
    flex-direction: row;
    gap: var(--space-xs);
    margin-top: var(--space-base);
    overflow-x: auto;
  }

  .app-menu-item {
    flex: none;
    border-radius: var(--radius-pill);
  }
}

.section-title {
  margin-bottom: var(--space-md);
  font-size: var(--size-title3);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.section-text {
  margin-bottom: var(--space-base);
  color: var(--gray-2);
}

.section-note {
  margin-top: var(--space-md);
  color: var(--gray);
  font-size: var(--size-caption);
}

/* A block of text the developer copies verbatim. */
.code {
  padding: var(--space-lg) var(--space-xl);
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  font-family: var(--mono);
  font-size: var(--size-caption);
  line-height: 1.85;
  letter-spacing: 0;
}

.t-tag {
  color: var(--gray);
}

/* --- Setup guide --------------------------------------------------------- */

/* Numbered steps joined by a hairline down the left. */
.steps {
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 0 0 var(--space-xxl) calc(28px + var(--space-lg));
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-blue);
  font-size: var(--size-callout);
  font-weight: 600;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: var(--space-sm);
  left: 13.5px;
  width: 1px;
  background: var(--hairline);
}

.step-pending::before {
  background: var(--parchment);
  color: var(--gray);
}

/* A step's title, with its video or picture beside it (guide_media.html). */
.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  margin: 2px 0 var(--space-sm);
}

.step-head .step-title {
  margin: 0;
}

.step-media {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 113, 227, 0.1);
  color: var(--link);
  font-size: var(--size-caption);
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.step-media:hover {
  background: rgba(0, 113, 227, 0.16);
  text-decoration: none;
}

.step-media svg {
  width: 13px;
  height: 13px;
}

.dialog.media-dialog {
  width: min(1100px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  padding: var(--space-md) var(--space-md) var(--space-md);
}

.media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 var(--space-xs) var(--space-md);
}

.media-head .dialog-title {
  margin: 0;
}

.media-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--parchment);
  color: var(--gray-2);
  cursor: pointer;
}

.media-close:hover {
  background: var(--hairline-soft);
  color: var(--ink);
}

.media-close svg {
  width: 14px;
  height: 14px;
}

.media-view {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 140px);
  border-radius: var(--radius-md);
  background: var(--parchment);
  object-fit: contain;
}

.step-title {
  margin: 2px 0 var(--space-sm);
  font-size: var(--size-headline);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.step-body p,
.step-body ul,
.step-body ol {
  margin: 0;
}

.step-pending .step-body {
  color: var(--gray-2);
}

.step-note {
  color: var(--gray);
  font-size: var(--size-caption);
}

.menu-path {
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: 0;
}

.code code {
  font-size: inherit;
}

/* Key and value pairs to type into Xcode. */
.kv {
  width: 100%;
  overflow: hidden;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  background: var(--parchment);
  font-size: var(--size-callout);
}

.kv th,
.kv td {
  padding: var(--space-md) var(--space-base);
  text-align: left;
  vertical-align: top;
}

/* Inside a box whose items keep their own width (.subsection), code and
   tables still take at most the box's width, and code scrolls. */
.step-body,
.subsection {
  min-width: 0;
}

.subsection > .code,
.subsection > .kv {
  align-self: stretch;
  max-width: 100%;
}

.kv th {
  color: var(--gray);
  font-size: var(--size-caption);
  font-weight: 600;
}

.kv td {
  border-top: 1px solid var(--hairline);
  overflow-wrap: anywhere;
}

/* Rows are separated by a line; a table without a header row has none
   above its first row. */
.kv > tbody:first-child > tr:first-child > td {
  border-top: 0;
}

.kv td:first-child {
  white-space: nowrap;
  word-break: normal;
}

/* On phones long keys (SUEnableInstallerLauncherService) wrap rather than
   widen the page. */
@media (max-width: 600px) {
  .kv td:first-child {
    white-space: normal;
  }
}

/* Optional detail, collapsed by default. */
.disclosure summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  color: var(--link);
  font-size: var(--size-callout);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

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

/* A fixed-size chevron that turns, so the label never moves. */
.disclosure summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.disclosure[open] summary::before {
  transform: rotate(45deg);
}

.disclosure summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

.disclosure[open] summary {
  margin-bottom: var(--space-md);
}

.disclosure > p {
  margin-bottom: var(--space-md);
}

/* Two or more options side by side; the chosen one has a blue outline. */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-base);
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.choice-selected {
  border: 2px solid var(--blue);
  padding: calc(var(--space-lg) - 1px);
}

.choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  width: 100%;
}

.choice-title {
  margin: 0;
  font-size: var(--size-body);
  font-weight: 600;
}

.choice-badge {
  padding: 2px var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: var(--on-blue);
  font-size: var(--size-caption);
  font-weight: 600;
}

.choice-text {
  color: var(--gray-2);
  font-size: var(--size-callout);
}

.choice-url {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: var(--size-caption);
}

/* Moving with a last update: a domain of the developer's as the new
   address (templates/import.html). */
.new-domain {
  margin: var(--space-base) 0 var(--space-xl);
}

.new-domain > summary {
  display: inline-block;
  color: var(--link);
  font-size: var(--size-callout);
  cursor: pointer;
  list-style: none;
}

.new-domain > summary::-webkit-details-marker {
  display: none;
}

.new-domain-body {
  margin-top: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.new-domain-body .section-text {
  margin-top: 0;
}

.new-domain-back {
  margin: calc(-1 * var(--space-md)) 0 var(--space-xl);
}

/* A live check's answer, under its "Check now" button. */
.check-result {
  margin-top: var(--space-base);
}

/* Changing how users move, after the import: the choices, then the
   button. */
.switch-change {
  margin-top: var(--space-base);
}

.choice .notice {
  width: 100%;
  margin: 0;
}

/* An input and its button on one line. */
.inline-form {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
  margin-top: auto;
}

.inline-form .button {
  flex: none;
  white-space: nowrap;
}

.inline-form .input {
  min-width: 0;
  padding-block: var(--space-sm);
}

.subsection {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--off-white);
  border: 1px solid var(--hairline-soft);
}

.subsection > * {
  margin: 0;
}

.subsection-title {
  font-size: var(--size-body);
  font-weight: 600;
}

/* The setup guide's offer of a custom domain, under the update address. */
.own-domain {
  gap: var(--space-sm);
}

.own-domain-text {
  color: var(--gray-2);
  font-size: var(--size-callout);
  line-height: 1.47;
}

.own-domain .button {
  margin-top: var(--space-xs);
}

.substeps {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  width: 100%;
  padding-left: var(--space-lg);
}

.substeps .kv {
  margin-top: var(--space-sm);
  background: var(--canvas);
}

.notice-success {
  color: var(--success);
}

.subsection .notice {
  width: 100%;
  margin: 0;
}

@media (max-width: 734px) {
  .choices {
    grid-template-columns: 1fr;
  }
}

/* --- Releases ------------------------------------------------------------ */

.upload {
  margin-bottom: var(--space-xl);
}

/* Folded until "New Release" opens it: the script marks it open in place
   (no jump); without the script, the link makes it the page's target. */
.upload.upload-folded:not(:target):not(.upload-open) {
  display: none;
}

.app-content:has(.upload-folded:target) .new-release-button,
.app-content:has(.upload-open) .new-release-button {
  visibility: hidden;
}

.upload-cancel {
  display: inline-block;
  margin-top: var(--space-md);
}

.is-busy .upload-cancel {
  display: none;
}

/* Under the setup guide, the dropzone is the guide's last step. */
.upload.upload-after-guide {
  margin-top: var(--space-xl);
}

/* A value to copy, with its Copy button. */
.copy-field {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-base);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.copy-field-value {
  flex: 1;
  min-width: 0;
  font-size: var(--size-callout);
  overflow-wrap: anywhere;
}

/* Settings: the custom domain, once added. */
.domain {
  padding: var(--space-xl);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.domain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.domain-name {
  font-size: var(--size-body);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.domain-text {
  margin-top: var(--space-md);
  color: var(--gray-2);
}

.domain-addresses {
  margin-top: var(--space-sm);
}

.domain .steps {
  margin-top: var(--space-xl);
}

.domain-remove {
  margin-top: var(--space-lg);
}

/* Settings: how much the app's files take. */
/* Storage, like iCloud's: the quota, a bar with a coloured part per app,
   and the apps below it. */
.storage-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.storage-quota {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--canvas);
  font-size: var(--size-headline);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.storage-summary {
  margin: 0;
  color: var(--ink);
  font-size: var(--size-body);
}

.storage-free {
  color: var(--gray-2);
}

.storage-bar {
  display: flex;
  gap: 1px;
  height: 12px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--parchment);
  margin-bottom: var(--space-xl);
}

/* An app using a few kilobytes still shows as a sliver. */
.storage-part {
  flex: none;
  min-width: 3px;
}

.storage-over .storage-bar {
  background: var(--danger);
}

.storage-over .storage-summary strong {
  color: var(--danger);
}

.storage-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--hairline-soft);
}

.storage-list-title {
  margin: 0;
  font-size: var(--size-body);
  font-weight: 600;
}

.storage-list-total {
  font-weight: 600;
}

.storage-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.storage-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto 8px;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.storage-name {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-detail {
  color: var(--gray);
  font-size: var(--size-callout);
}

.storage-size {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.storage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

@media (max-width: 600px) {
  .storage-row {
    grid-template-columns: 32px minmax(0, 1fr) auto 8px;
  }

  .storage-detail {
    display: none;
  }
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xxl) var(--space-xl);
  border: 1.5px dashed var(--hairline);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--blue);
  background: var(--off-white);
}

.is-busy .dropzone {
  pointer-events: none;
  opacity: 0.6;
}

/* Visually hidden but still reachable from the keyboard. */
.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dropzone:focus-within {
  border-color: var(--blue);
}

.dropzone-title {
  font-weight: 600;
}

.dropzone-hint {
  color: var(--gray);
  font-size: var(--size-callout);
}

.upload-progress {
  margin-top: var(--space-md);
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--hairline-soft);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--blue);
  transition: width 0.2s linear;
}

.upload-status {
  margin-top: var(--space-sm);
  color: var(--gray-2);
  font-size: var(--size-callout);
}

.upload-status.upload-failed {
  color: var(--danger);
}

.releases {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  list-style: none;
}

.release {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
}

.release + .release {
  border-top: 1px solid var(--hairline);
}

/* Version and date on the left, the release's actions on the right. */
.release-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
}

.release-main {
  min-width: 0;
}

.release-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
}

.release-version {
  font-size: var(--size-headline);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.release-detail {
  margin: 2px 0 0;
  color: var(--gray);
  font-size: var(--size-caption);
}

.release-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-base);
}

.release-actions form {
  margin: 0;
}

.release-pending {
  color: var(--gray);
  font-size: var(--size-callout);
}

.release-link {
  font-size: var(--size-callout);
  white-space: nowrap;
}

.release .notice {
  margin: 0;
}

.notice-warning {
  color: var(--warning);
}

/* Release notes, folded by default; a quiet aside once opened. */
.release-notes > summary {
  font-size: var(--size-callout);
}

.release-notes[open] > summary {
  margin-bottom: 0;
}

.release-notes-text {
  margin: var(--space-sm) 0 0;
  padding: var(--space-xs) 0 var(--space-xs) var(--space-base);
  border-left: 2px solid var(--hairline);
  color: var(--gray-2);
  font-size: var(--size-callout);
}

/* Formatted notes (Markdown rendered to HTML). Browser margins are reset;
   blocks are spaced evenly, a heading sits closer to what follows it. */
.release-notes-text * {
  margin: 0;
}

.release-notes-text > * + * {
  margin-top: var(--space-sm);
}

.release-notes-text > * + :is(h1, h2, h3, h4) {
  margin-top: var(--space-base);
}

.release-notes-text > :is(h1, h2, h3, h4) + * {
  margin-top: var(--space-xs);
}

.release-notes-text h1,
.release-notes-text h2,
.release-notes-text h3,
.release-notes-text h4 {
  color: var(--ink);
  font-size: var(--size-body);
  font-weight: 600;
  line-height: 1.3;
}

.release-notes-text h1 {
  font-size: var(--size-headline);
}

.release-notes-text strong {
  color: var(--ink);
}

.release-notes-text ul,
.release-notes-text ol {
  padding-left: var(--space-xl);
}

.release-notes-text ul {
  list-style: disc;
}

.release-notes-text ol {
  list-style: decimal;
}

.release-notes-text blockquote {
  margin: 0;
  padding-left: var(--space-md);
  border-left: 2px solid var(--hairline-soft);
}

.release-notes-text pre {
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--parchment);
}

.release-notes-text code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.release-notes-text hr {
  border: none;
  border-top: 1px solid var(--hairline);
}

/* The publish form's notes: label and Write/Preview on one line. */
.notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.notes-preview {
  min-height: 140px;
  margin: 0;
  padding: var(--space-md) var(--space-base);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}

.notes-empty {
  color: var(--gray);
}

/* Two or three options in a pill, like a macOS segmented control. */
.segmented {
  display: inline-flex;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--hairline-soft);
}

.segmented[hidden] {
  display: none;
}

.segmented-item {
  padding: 3px var(--space-md);
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--size-caption);
  cursor: pointer;
}

.segmented-item[aria-pressed="true"] {
  background: var(--canvas);
  font-weight: 600;
}

/* A release's actions: Publish, What's new, Delete, each opening a dialog. */
.release-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-xl);
}

/* A published release's notes, read and edited in one dialog. */
.release-notes-link {
  margin-top: var(--space-xs);
  font-size: var(--size-callout);
}

.dialog-editor .notes-preview {
  min-height: 96px;
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--space-md);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}

/* A destructive action that opens its confirmation: red text, no pill. */
.release-delete-link {
  color: var(--danger);
}

/* A centered sheet for confirmations, like a macOS alert. */
.dialog {
  width: min(420px, calc(100vw - 2 * var(--space-base)));
  padding: var(--space-xl);
  border: none;
  border-radius: var(--radius-xl);
  background: var(--canvas);
  color: var(--ink);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog-title {
  margin-bottom: var(--space-sm);
  font-size: var(--size-headline);
  font-weight: 600;
}

.dialog-text {
  margin-bottom: var(--space-md);
  color: var(--gray-2);
  font-size: var(--size-callout);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

/* A dialog to write in (Publish, What's new): wider, its title first. */
.dialog.dialog-editor {
  width: min(600px, calc(100vw - 2 * var(--space-base)));
}

.dialog-editor .dialog-title {
  margin-bottom: 0;
}

.dialog-editor .dialog-text {
  margin: 0;
}

.dialog-editor .dialog-actions {
  margin-top: var(--space-sm);
}

.textarea {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

.badge {
  flex: none;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--parchment);
  color: var(--gray-2);
  font-size: var(--size-caption);
  font-weight: 600;
}

.badge-live {
  background: var(--blue);
  color: var(--on-blue);
}

.badge-pending {
  color: var(--warning);
}

.badge-failed {
  color: var(--danger);
}

/* Grouped rows, each a link, divided by hairlines. */
.list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--parchment);
  list-style: none;
}

.list li + li {
  border-top: 1px solid var(--hairline);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  padding: var(--space-base) var(--space-xl);
  color: var(--ink);
  transition: background 0.2s var(--ease);
}

.list-row:hover {
  background: var(--hairline-soft);
  text-decoration: none;
}

.list-lead {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

/* An app's icon (its latest build's, or the generic one). macOS icons
   carry their own shape and margin, so it is shown as is. */
.app-icon {
  flex: none;
  object-fit: contain;
}

/* A macOS icon's artwork fills 824 of its 1024 points: the 100-point
   transparent margin is pulled out so the artwork lines up with the
   app's name below. */
.app-sidebar-icon {
  display: block;
  margin-bottom: var(--space-xs);
  margin-left: calc(64px * -100 / 1024);
}

.list-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.list-title {
  font-weight: 600;
}

.list-detail {
  overflow: hidden;
  color: var(--gray-2);
  font-family: var(--mono);
  font-size: var(--size-caption);
  letter-spacing: 0;
  text-overflow: ellipsis;
}

.list-chevron {
  color: var(--gray);
  font-size: var(--size-headline);
}

.large-title {
  margin-bottom: var(--space-xxl);
  font-size: var(--size-title2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.empty {
  padding: var(--space-huge) var(--space-xl);
  border-radius: var(--radius-xl);
  background: var(--parchment);
  text-align: center;
}

.empty-title {
  font-size: var(--size-headline);
  font-weight: 600;
}

.empty-text {
  margin-top: var(--space-xs);
  color: var(--gray-2);
}

.empty-action {
  display: inline-flex;
  margin-top: var(--space-lg);
}

/* --- Homepage (the landing, templates/home.html) -------------------------- */

.landing section { padding: 112px 0; }
/* Wider than the app's pages: a landing uses the screen, bar included. */
.landing .container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.landing-body .nav-inner, .landing-footer .container { max-width: 1200px; padding-inline: 32px; }

/* The hero sits on a light glass painting (the "paper" look), washed
   with white behind the headline and fading into the page below. */
/* `.landing` too, to win over `.landing section`'s padding. */
.landing .landing-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  padding: calc(var(--nav-height) + 80px) 0 120px;
  text-align: center;
  background: var(--off-white);
}
.landing-hero .plan-shader { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(42% 38% at 50% 45%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, var(--canvas) 100%);
  pointer-events: none;
}
.landing-hero .container { width: 100%; }
/* The 404 page: the hero alone, its number larger than a headline. */
.landing .not-found { min-height: 100vh; }
.landing-hero.not-found .display { font-size: clamp(96px, 16vw, 200px); }
.landing-hero .display { margin: 0; font-size: clamp(48px, 7vw, 96px); line-height: 1.02; letter-spacing: -0.035em; }
.landing-hero .lede { max-width: 58ch; margin: 0.9em auto 0; font-size: clamp(19px, 1.9vw, 25px); }
/* A soft white glow keeps the lighter text readable on the glass. */
.landing-hero .lede, .landing-hero .landing-note {
  color: #3a3a3e;
  text-shadow: 0 0 2px #fff, 0 0 10px #fff, 0 0 24px rgba(255, 255, 255, 0.9), 0 0 48px rgba(255, 255, 255, 0.8);
}
.landing-actions { display: flex; align-items: center; justify-content: center; gap: 1.6rem; margin-top: 1.7em; }
.landing-note { margin-top: 14px; color: var(--gray); font-size: var(--size-caption); }


.landing-eyebrow { margin: 0 0 10px; color: var(--blue); font-size: var(--size-callout); font-weight: 600; }
.landing-title { margin: 0 0 16px; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.landing-intro { max-width: 60ch; margin: 0 0 56px; color: var(--gray-2); font-size: 21px; line-height: 1.45; }
.landing-center { text-align: center; }
.landing-center .landing-intro { margin-left: auto; margin-right: auto; }

.landing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.landing-step { padding: 28px; border-radius: var(--radius-xl); background: var(--parchment); }
.landing-step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 700;
  font-size: 15px;
}
.landing-step h3, .landing-tile h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.landing-step p, .landing-tile p { margin: 0; color: var(--gray-2); font-size: 17px; line-height: 1.47; }

/* Moving an existing Sparkle app: a clean timeline. */
.landing-move { background: var(--off-white); }
.landing-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 8px 0 56px;
  padding: 0;
  list-style: none;
}
/* The line runs through the points. */
.landing-timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 8px;
  /* Ends on the last point: the start of the fourth column. */
  right: calc((100% - 96px) / 4 - 8px);
  height: 2px;
  background: var(--hairline);
}
.landing-timeline li { position: relative; padding-top: 36px; }
.landing-timeline li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--off-white);
}
.landing-timeline li:last-child::before { background: var(--blue); }
.landing-timeline span { display: block; margin-bottom: 6px; color: var(--gray); font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.landing-timeline h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.landing-timeline p { margin: 0; color: var(--gray-2); font-size: 16px; line-height: 1.5; }
.landing-move .landing-actions { margin-top: 0; }

.landing-features { background: var(--canvas); }
.landing-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.landing-tile { padding: 32px 28px; border-radius: var(--radius-xl); background: var(--parchment); }
.landing-tile-wide { grid-column: span 2; }
.landing-tile-full { grid-column: 1 / -1; }
.landing-tile code { font-size: 15px; }

.landing-pricing .plans { margin-bottom: 20px; }
.landing-pricing .plan-note:empty { display: none; }
.landing-price { display: flex; align-items: baseline; gap: 6px; padding: 0 var(--space-lg); }
.landing-price strong { font-size: 34px; letter-spacing: -0.02em; }
.landing-price span { color: var(--gray); font-size: var(--size-callout); }
.landing-price-year { padding: 2px var(--space-lg) 0; color: var(--gray-2); font-size: var(--size-callout); }
.landing-pricing .plan-prices { padding-top: var(--space-xs); padding-bottom: var(--space-lg); }

.landing-faq { max-width: 760px; margin: 0 auto; }
.landing-faq details { border-bottom: 1px solid var(--hairline-soft); padding: 22px 0; }
.landing-faq summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; }
.landing-faq summary::-webkit-details-marker { display: none; }
.landing-faq summary::after { content: "+"; float: right; color: var(--gray); font-weight: 400; }
.landing-faq details[open] summary::after { content: "−"; }
.landing-faq p { margin: 12px 0 0; color: var(--gray-2); font-size: 17px; line-height: 1.5; }

.landing-end { text-align: center; background: var(--ink); color: var(--canvas); }
.landing-end .landing-title { color: var(--canvas); }
.landing-end .landing-intro { color: #a1a1a6; }
.landing-end-move { margin-left: 22px; color: #6cb4ff; }

.landing-footer { padding: 28px 0 40px; color: var(--gray); font-size: var(--size-caption); }
.landing-footer .container { display: flex; justify-content: space-between; gap: 16px; }

@media (max-width: 760px) {
  .landing section { padding: 72px 0; }
  .landing-title { font-size: 34px; }
  .landing-intro { font-size: 18px; }
  .landing-steps, .landing-tiles { grid-template-columns: minmax(0, 1fr); }
  .landing-timeline { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 32px; }
  .landing-timeline::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto; }
  .landing-timeline li { padding-top: 0; }
  .landing-timeline li::before { left: -32px; top: 4px; }
  .landing-tile-wide, .landing-tile-full { grid-column: auto; }
  .landing .landing-hero { min-height: 0; padding: calc(var(--nav-height) + 88px) 0 104px; }
  .landing .container { padding: 0 20px; }
  .landing-footer .container { flex-direction: column; }
}
  

/* Staggered entrance for the hero, in pure CSS. */
.rise {
  animation: rise 0.9s var(--ease) both;
}

.rise-2 { animation-delay: 0.08s; }
.rise-3 { animation-delay: 0.16s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* --- Small screens --------------------------------------------------------- */

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
}

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

  .rise {
    animation: none;
  }

  .cta:hover,
  .button:active {
    transform: none;
  }
}

/* A setting with an on/off switch, as in System Settings. */
.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 640px;
}
.setting-label { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.setting-name { font-weight: 500; }
.setting-text { color: var(--gray); font-size: 14px; line-height: 1.45; }

.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 42px;
  height: 26px;
  margin: 0;
  border-radius: 13px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.switch:checked { background: #34c759; }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch:disabled { opacity: .5; cursor: default; }

/* Account page. */
.account-methods td:first-child { width: 120px; color: var(--gray); }
.account-methods .badge { margin-left: var(--space-sm); }
.account-form { max-width: 380px; }

/* Moving an app. */
.page-actions { display: flex; gap: 8px; }
.empty-more { margin-top: 16px; }
.import-url { margin: -8px 0 28px; overflow-wrap: anywhere; }
.import-problems, .import-warnings { margin: 0 0 16px; padding-left: 20px; line-height: 1.5; }
.import-problems li + li, .import-warnings li + li, .import-steps li + li { margin-top: 6px; }
.import-steps { margin: 0 0 16px; padding-left: 20px; line-height: 1.5; }
.import-problems { color: var(--danger); }
.import-versions td:last-child, .import-versions th:last-child { text-align: right; }
.import-key { min-height: 0; resize: vertical; font-size: 13px; }
/* The switch picked on the import form: a radio inside each card. */
.switch-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.switch-choice .choice-pick { cursor: pointer; }
.switch-choice .choice-title input { margin: 0 6px 0 0; vertical-align: -1px; }
.switch-choice .choice-pick:has(input:checked) { border: 2px solid var(--blue); padding: calc(var(--space-lg) - 1px); }
.switch-choice .choice-disabled { cursor: default; opacity: .6; }
.switch-choice .choice-text code { overflow-wrap: anywhere; }
.move-banner { margin-bottom: 24px; }
.move-banner a { margin-left: 4px; white-space: nowrap; }

/* A job's progress: an Apple-style ring and a few words. Spins until the
   job reports a percentage. */
.job-progress { display: inline-flex; align-items: center; gap: 7px; color: var(--gray); font-size: 13px; }
.job-progress-line { display: flex; margin: 4px 0 0; }
.ring { display: inline-flex; flex: none; width: 15px; height: 15px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.6; }
.ring-track { stroke: var(--hairline-soft); }
.ring-value { stroke: var(--blue); stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ring-spinning svg { animation: ring-spin 0.9s linear infinite; }
@keyframes ring-spin { to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .ring-spinning svg { animation-duration: 3s; } }
.job-progress-label { font-variant-numeric: tabular-nums; }
.danger-zone .section-title { color: var(--danger); }
.kv + .import-warnings { margin-top: 18px; }
/* The import page (Move, Finish moving): wider than a form, with room
   between its parts, since it is read step by step. */
.page-import { max-width: 860px; }
.page-import .import-url { margin-bottom: var(--space-xxxl); }
.page-import .section { margin-top: var(--space-huge); }
.page-import .section-title { margin-bottom: var(--space-base); }
.page-import .section-text { margin-bottom: var(--space-lg); line-height: 1.55; }
.page-import > .notice { padding: var(--space-base) var(--space-lg); line-height: 1.5; }
.page-import .kv { margin-bottom: var(--space-lg); }
.page-import .import-steps, .page-import .import-warnings { margin-bottom: var(--space-xl); }
.page-import .import-steps li + li, .page-import .import-warnings li + li { margin-top: var(--space-sm); }
.page-import .choices { gap: var(--space-lg); }
.page-import .new-domain-body { padding: var(--space-xl); }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 640px; }
.danger-row .section-text { margin: 0; }
.danger-row .button { flex: none; white-space: nowrap; }
.dialog-wide { max-width: 480px; }
.dialog-field { margin: 16px 0 4px; }
.button-danger:disabled { opacity: 0.4; cursor: default; }
/* Without the script, the delete dialog shows in the page. */
/* Without the script, a dialog holding its own form shows in the page. */
html:not(.js) .dialog-form { display: block; position: static; margin: 16px 0 0; }

/* The Plan page: the one place that leaves Apple's sober style a little.
   Each plan's card opens on its own animated shader (app.js). */
.plan-summary {
  margin: 0 0 var(--space-base);
  font-size: var(--size-body);
}

.plan-pending {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-base);
}

.plan-pending .plan-summary {
  margin: 0;
  color: var(--warning);
}

.plan-change-notes {
  margin-top: var(--space-lg);
}

/* The cards share their rows (subgrid): headers, feature lists, prices
   and notes line up across the three, whatever each holds. */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto;
  column-gap: var(--space-base);
  margin-bottom: var(--space-xl);
}

.plan {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.plan-current {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.plan-hero {
  position: relative;
  height: 108px;
  overflow: hidden;
  isolation: isolate;
}

/* Shown until, or instead of, the glass shader: the painting's tones in
   ribs. */
.plan-hero-solo {
  background: repeating-linear-gradient(90deg, #1f4fd8 0 14px, #13308f 14px 22px, #0a1a4a 22px 28px);
}

.plan-hero-indie {
  background: repeating-linear-gradient(90deg, #c4202c 0 14px, #8d1220 14px 22px, #3a0910 22px 28px);
}

.plan-hero-studio {
  background: repeating-linear-gradient(90deg, #38383e 0 14px, #1c1c20 14px 22px, #0b0b0d 22px 28px);
}

/* Keeps the plan's name readable on any painting. */
.plan-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 65%);
  pointer-events: none;
}

.plan-shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.plan-hero-text {
  position: absolute;
  z-index: 1;
  inset: auto var(--space-lg) var(--space-base) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.plan-name {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.plan-badge {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: var(--size-caption);
  font-weight: 600;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.plan-features {
  margin: 0;
  padding: var(--space-base) var(--space-lg) var(--space-md) calc(var(--space-lg) + 18px);
  color: var(--gray-2);
  font-size: var(--size-callout);
  line-height: 1.5;
}

.plan-prices {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: 0 var(--space-lg);
}

.plan-prices form {
  display: contents;
}

/* Buttons, the current price and unavailable prices: all the same row. */
.plan-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 var(--space-base);
  border-radius: var(--radius-pill);
  font-size: var(--size-callout);
  font-weight: 600;
  white-space: nowrap;
}

.plan-option-current {
  border: 1px solid var(--blue);
  color: var(--blue);
}

.plan-option-off {
  border: 1px dashed var(--hairline);
  color: var(--gray);
}

.plan-note {
  margin: 0;
  padding: var(--space-xs) var(--space-lg) var(--space-lg);
  color: var(--gray-2);
  font-size: var(--size-caption);
  line-height: 1.4;
}

/* Above the prices, when a first plan starts free: one centered line,
   so every card reads "Free for 14 days, then" over its buttons. */
.plan-trial {
  margin: 0 0 var(--space-xs);
  color: var(--gray-2);
  font-size: var(--size-caption);
  text-align: center;
}

/* --- Welcome (billing::welcome): where a new account lands ---------------- */

.welcome {
  padding: calc(var(--nav-height) + var(--space-huge)) 0 96px;
}

.welcome .container {
  max-width: 1100px;
}

.welcome-head {
  max-width: 760px;
  margin: 0 auto var(--space-xxxl);
  text-align: center;
}

.welcome-eyebrow {
  margin: 0 0 var(--space-sm);
  color: var(--blue);
  font-size: var(--size-callout);
  font-weight: 600;
}

.welcome-title {
  margin: 0 0 var(--space-base);
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.welcome-lede {
  margin: 0;
  color: var(--gray-2);
  font-size: 19px;
  line-height: 1.5;
}

.welcome .plans {
  margin-bottom: var(--space-xxxl);
}

@media (max-width: 760px) {
  .welcome { padding-top: calc(var(--nav-height) + var(--space-xxxl)); }
  .welcome-title { font-size: 34px; }
}

@media (max-width: 760px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: var(--space-base);
  }

  .plan {
    grid-row: auto;
    grid-template-rows: auto;
  }
}

/* --- Admin dashboard (http/admin.rs) --------------------------------------- */

.admin-login {
  max-width: 360px;
  margin: 18vh auto 0;
  padding: 0 var(--gutter);
}

.admin-login-title {
  margin: 0 0 var(--space-xl);
  font-size: var(--size-headline);
}

.admin-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
}

.admin-bar .admin-inner {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  height: var(--nav-height);
  font-size: var(--size-callout);
}

.admin-updated {
  margin-left: auto;
  color: var(--gray);
  font-size: var(--size-caption);
}

.admin-main {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-huge);
}

.admin-section {
  margin-bottom: var(--space-xxl);
}

.admin-heading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0 0 var(--space-base);
  font-size: var(--size-headline);
}

.admin-count {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--parchment);
  color: var(--gray-2);
  font-size: var(--size-caption);
  font-weight: 600;
}

.admin-count-bad {
  background: rgba(255, 59, 48, 0.12);
  color: var(--danger);
}

.admin-vitals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-base);
}

.admin-vital {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--parchment);
}

.admin-vital p {
  margin: 0;
}

.admin-vital-name {
  color: var(--gray);
  font-size: var(--size-caption);
  font-weight: 600;
}

.admin-vital-value {
  margin: 4px 0 8px !important;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-vital-detail {
  color: var(--gray-2);
  font-size: var(--size-caption);
}

.admin-meter {
  height: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--hairline-soft);
}

.admin-meter span {
  display: block;
  height: 100%;
  background: var(--success);
}

.admin-warn .admin-meter span {
  background: var(--danger);
}

.admin-warn .admin-vital-value {
  color: var(--danger);
}

.admin-chart {
  display: block;
  width: 100%;
  height: 40px;
  margin: 6px 0 2px;
}

.admin-chart polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.admin-checks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-checks li {
  display: grid;
  grid-template-columns: 10px 200px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: var(--size-callout);
}

.admin-checks span:last-child {
  color: var(--gray-2);
}

.admin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
}

.admin-dot-bad {
  background: var(--danger);
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.admin-table td {
  word-break: normal;
}

.admin-error {
  max-width: 520px;
  color: var(--danger);
  font-size: var(--size-caption);
  word-break: break-word !important;
}

@media (max-width: 760px) {
  .admin-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-checks li {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .admin-checks span:last-child {
    grid-column: 2;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }
}

/* --- Legal pages ------------------------------------------------------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 56px) var(--gutter) 96px;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: 40px;
}

.legal-tabs a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: var(--size-callout);
  text-decoration: none;
}

.legal-tabs a:hover {
  background: var(--parchment);
}

.legal-tabs a[aria-current="page"] {
  background: var(--hairline-soft);
  font-weight: 600;
}

.legal-article h1 {
  font-size: var(--size-title2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal-updated {
  margin-top: var(--space-sm);
  color: var(--gray-2);
  font-size: var(--size-callout);
}

.legal-article h2 {
  margin-top: 40px;
  font-size: var(--size-headline);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal-article h3 {
  margin-top: var(--space-xl);
  font-size: var(--size-body);
  font-weight: 600;
}

.legal-article p,
.legal-article ul {
  margin-top: var(--space-md);
  line-height: 1.53;
}

.legal-article ul {
  padding-left: 1.2em;
}

.legal-article li + li {
  margin-top: var(--space-sm);
}

.legal-license {
  margin-top: var(--space-md);
  padding: var(--space-lg);
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--off-white);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
}

.footer-links a {
  color: var(--gray);
}

.auth-legal {
  color: var(--gray-2);
  font-size: var(--size-caption);
  line-height: 1.38;
  text-align: center;
}
