/* Evol marketing site. Quiet, spacious, product-first, in the spirit of Apple's Mac product pages. */

/* Light and dark values sit side by side via light-dark(). `color-scheme` picks the side:
   it follows the system by default, and html[data-theme] can force one. */
:root {
  color-scheme: light dark;

  --ink: light-dark(#1d1d1f, #f5f5f7);
  --ink-2: light-dark(#424245, #d2d2d7);
  --muted: light-dark(#6e6e73, #a1a1a6);
  --line: light-dark(#d2d2d7, #38383a);
  --hairline: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.1));
  --bg: light-dark(#ffffff, #000000);
  --panel: light-dark(#f5f5f7, #161617);
  --surface: light-dark(#ffffff, #1d1d1f);
  --nav-bg: light-dark(rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.72));
  --chip: light-dark(rgba(0, 0, 0, 0.045), rgba(255, 255, 255, 0.08));
  --chip-hover: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.14));
  --menu-bg: light-dark(rgba(255, 255, 255, 0.97), rgba(44, 44, 46, 0.96));
  --shadow-strong: light-dark(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.6));
  --shadow-soft: light-dark(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.4));

  /* Text on accent-coloured buttons stays white in both themes. */
  --white: #ffffff;
  --accent: light-dark(#1285f4, #0a84ff);
  --accent-hover: light-dark(#0877df, #3395ff);
  --link: light-dark(#1285f4, #2997ff);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo",
    "Noto Sans SC", "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Microsoft YaHei", sans-serif;

  /* Shared type scale — keep page sections on the same rhythm. */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 17px;
  --text-lede: 19px;
  --text-title-sm: 22px;
  --text-title: 26px;
  --text-display-sm: clamp(36px, 5vw, 48px);
  --text-display: clamp(40px, 6vw, 60px);
  --text-hero: clamp(48px, 8vw, 80px);
  --leading-tight: 1.1;
  --leading-body: 1.5;
  --tracking-tight: -0.03em;
  --tracking-display: -0.035em;
}

/* Explicit choice from the appearance toggle overrides the system setting. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  text-decoration: none;
  color: var(--white);
  outline-offset: 2px;
}



/* Floating right section jump — timeline dots (as in design) */
.section-jump {
  position: fixed;
  top: 50%;
  /* Between content column and viewport edge. */
  right: clamp(40px, 4.5vw, 72px);
  z-index: 8;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  transition: opacity 0.25s ease;
}
.section-jump.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.section-jump[hidden] { display: none !important; }
.section-jump-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
/* Continuous gray rail through the dots */
.section-jump-track::before {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.section-jump a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.section-jump a::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1.5px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.section-jump a:hover {
  color: var(--ink);
  text-decoration: none;
}
.section-jump a:hover::before {
  border-color: var(--ink-2);
}
.section-jump a[aria-current="true"] {
  color: var(--accent);
  font-weight: 500;
}
.section-jump a[aria-current="true"]::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
@media (max-width: 1280px) {
  .section-jump { display: none; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
}

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

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

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.brand {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  margin-left: auto;
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
/* The nav buttons must keep white text; the generic link colour above would override it. */
.nav-links a.btn,
.nav-links a.btn:hover { color: var(--white); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 400;
  color: var(--white);
  background: var(--accent);
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; color: var(--white); }

/* Large download CTA matching the supplied blue pill-button reference. */
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 280px;
  height: 52px;
  border-radius: 999px;
  padding: 0 28px;
  background: var(--accent);
  color: var(--white);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.download-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--white);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 52%, transparent);
}
.download-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (max-width: 480px) {
  .download-button {
    min-width: 0;
    width: 100%;
    max-width: 320px;
    height: 48px;
    padding: 0 20px;
    font-size: 16px;
  }
}

.btn-sm {
  height: 30px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-ghost {
  background: transparent;
  color: var(--link);
  padding: 0 4px;
  height: auto;
  font-size: 17px;
}
.btn-ghost:hover { background: transparent; text-decoration: underline; color: var(--link); }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 72px 0 56px;
  background:
    radial-gradient(70% 55% at 50% -8%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%),
    var(--bg);
}

.hero h1 {
  margin: 0;
  font-size: var(--text-hero);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: var(--tracking-display);
}

.hero .lede {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-shot {
  margin: 56px auto 0;
  width: min(1000px, 100%);
  position: relative;
  z-index: 0;
}
.hero-shot img {
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px var(--shadow-strong), 0 4px 16px var(--shadow-soft);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

/* ---------- Sections ---------- */

section { padding: 96px 0; }
section.alt { background: var(--panel); }

.section-head {
  text-align: center;
  margin: 0 auto 56px;
  max-width: 760px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.section-head p {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.4;
  color: var(--muted);
}

/* Three highlight cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 36px 30px 40px;
}
.alt .card { background: var(--surface); }

.card .kicker {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--link);
  letter-spacing: 0.01em;
}

.card h3 {
  margin: 0;
  font-size: var(--text-title);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card p {
  margin: 14px 0 0;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--muted);
}

/* Showcase rows: text beside a screenshot */

.showcase {
  display: flex;
  flex-direction: column;
  gap: 96px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  gap: 56px;
}
.feature.reverse { grid-template-columns: 1.5fr 1fr; }
.feature.reverse .feature-text { order: 2; }

.feature-text h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.feature-text p {
  margin: 16px 0 0;
  font-size: var(--text-lede);
  line-height: 1.45;
  color: var(--muted);
}

.feature-shot {
  position: relative;
}
.feature-shot img {
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px var(--shadow-strong), 0 2px 10px var(--shadow-soft);
  border: 1px solid var(--hairline);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

/* Compact tool grid */



.tool {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 26px 22px;
}
.tool h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tool p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}

/* Full tool catalog — types with tools listed under each */
.tool-catalog { margin-top: 12px; }
.catalog-loading {
  margin: 24px 0;
  text-align: center;
  color: var(--muted);
}
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 0 0 40px;
}
.catalog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 480px);
}
.catalog-search-icon {
  position: absolute;
  inset-inline-start: 18px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
  flex: none;
}
.catalog-search {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 20px 0 46px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.catalog-search::placeholder { color: var(--muted); }
.catalog-search::-webkit-search-decoration,
.catalog-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.catalog-search:hover { background: var(--chip-hover); }
.catalog-search:focus {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}
.catalog-search-wrap:focus-within .catalog-search-icon { color: var(--ink-2); }
.catalog-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.catalog-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.catalog-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cat-tint, var(--accent));
}
.catalog-chip:hover {
  background: var(--chip-hover);
  color: var(--ink);
  text-decoration: none;
}
.catalog-empty {
  margin: 48px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.catalog-group {
  margin: 0 0 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 88px;
}
.catalog-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.catalog-group-head { margin: 0 0 14px; }
.catalog-group-title {
  margin: 0;
  font-size: var(--text-title-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.catalog-group-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--cat-tint, var(--accent));
  vertical-align: middle;
}
.catalog-group-sum {
  margin: 6px 0 0;
  font-size: var(--text-md);
  line-height: 1.4;
  color: var(--muted);
}
.catalog-tool-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.catalog-tool {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}
.catalog-tool-link {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px 16px;
  align-items: baseline;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.catalog-tool-link:hover {
  background: color-mix(in srgb, var(--cat-tint, var(--accent)) 8%, transparent);
  text-decoration: none;
}
.catalog-tool-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.catalog-tool-sum {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
@media (max-width: 720px) {
  .catalog-tool-list { grid-template-columns: 1fr; }
  .catalog-tool-link {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Home tool teaser cards */
.tool-teaser { margin-top: 8px; }
.tool-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tool-teaser-card {
  display: block;
  padding: 22px 20px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tool-teaser-card:hover {
  background: color-mix(in srgb, var(--cat-tint, var(--accent)) 8%, var(--surface));
  text-decoration: none;
  transform: translateY(-1px);
}
.tool-teaser-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tool-teaser-title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cat-tint, var(--accent));
  vertical-align: middle;
}
.tool-teaser-sum {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.tool-teaser-meta {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--link);
}
@media (max-width: 900px) {
  .tool-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tool-teaser-grid { grid-template-columns: 1fr; }
}

/* Tool detail page — single column */
.tool-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 0 72px;
}
.tool-detail-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
  font-size: var(--text-md);
}
.tool-detail-back,
.tool-detail-cat {
  color: var(--link);
  text-decoration: none;
}
.tool-detail-back:hover,
.tool-detail-cat:hover { text-decoration: underline; }
.tool-detail-cat::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--cat-tint, var(--accent));
  vertical-align: middle;
}
.tool-detail-head h1 {
  margin: 0;
  font-size: var(--text-display-sm);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.tool-detail-meta {
  margin: 12px 0 0;
  font-size: var(--text-md);
  color: var(--muted);
}
.tool-detail-sum {
  margin: 14px 0 0;
  font-size: var(--text-lede);
  line-height: 1.45;
  color: var(--muted);
}
.tool-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.tool-detail-pills li {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 500;
}

.tool-usage {
  margin: 28px 0 0;
  padding: 24px 24px 20px;
  border-radius: var(--radius-md);
  background: var(--panel);
}
.tool-usage h2 {
  margin: 0 0 20px;
  font-size: var(--text-title-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tool-usage-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tool-usage-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.tool-usage-step:first-child { border-top: 0; padding-top: 0; }
.tool-usage-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: var(--text-md);
  font-weight: 600;
}
.tool-usage-step-title {
  margin: 2px 0 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}
.tool-usage-step-text {
  margin: 6px 0 0;
  font-size: var(--text-md);
  line-height: 1.45;
  color: var(--muted);
}
.tool-usage-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: var(--text-sm);
  color: var(--muted);
}

.tool-detail-related {
  margin: 40px 0 0;
}
.tool-detail-related h2 {
  margin: 0 0 12px;
  font-size: var(--text-title-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tool-detail-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.tool-detail-related li {
  border-bottom: 1px solid var(--hairline);
}
.tool-detail-related a {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px 20px;
  align-items: baseline;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
}
.tool-detail-related a:hover { text-decoration: none; }
.tool-detail-related-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.tool-detail-related a:hover .tool-detail-related-name { color: var(--link); }
.tool-detail-related-sum {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--muted);
}

.tool-detail-download {
  margin: 48px 0 0;
  padding: 40px 32px;
  border-radius: var(--radius-md);
  background: var(--panel);
  text-align: center;
}
.tool-detail-download-kicker {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--link);
}
.tool-detail-download h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.tool-detail-download-text {
  margin: 12px auto 0;
  max-width: 28em;
  font-size: var(--text-lede);
  line-height: 1.4;
  color: var(--muted);
}
.tool-detail-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 28px 0 0;
}
@media (max-width: 720px) {
  .tool-usage { padding: 20px 16px 16px; }
  .tool-detail-download { padding: 32px 20px; }
  .tool-detail-related a {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Download band */

.download {
  text-align: center;
  padding: 120px 0 128px;
  background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%);
}
.download h2 {
  margin: 0;
  font-size: var(--text-display);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.download p {
  margin: 16px auto 0;
  max-width: 560px;
  font-size: var(--text-lede);
  line-height: 1.4;
  color: var(--muted);
}
.download .btn,
.download .download-button { margin-top: 32px; }
.download .fine {
  margin-top: 18px;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  padding: 22px 0 30px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.footer a {
  color: var(--ink-2);
  font-size: var(--text-sm);
}
.footer a:hover { color: var(--ink); text-decoration: none; }
.footer .legal { margin: 0; line-height: 1.5; color: var(--muted); }

/* ---------- Inner pages (privacy, support, tools) ---------- */

.page-hero {
  padding: 72px 0 28px;
  text-align: center;
}
.page-hero h1 {
  margin: 0;
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.page-hero p {
  margin: 14px auto 0;
  max-width: 640px;
  font-size: var(--text-lede);
  line-height: 1.4;
  color: var(--muted);
}
.tools-page-body {
  padding-top: 8px;
}



/* Docs layout: sticky left TOC + body (privacy / guide) */
.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  width: min(1120px, calc(100% - 48px));
  margin: 40px auto 96px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 8px 28px 24px 0;
  margin-right: 36px;
  border-right: 1px solid var(--hairline);
  scrollbar-width: thin;
}
.doc-toc-label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.doc-toc > ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}
.doc-toc > ol > li {
  margin: 0;
}
.doc-toc > ol > li > a {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px 4px 8px 12px;
  border-left: 3px solid transparent;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
/* Hollow circle — keep size always to avoid layout shift / flicker on activate */
.doc-toc > ol > li > a::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 0.42em;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent);
  background: transparent;
}
.doc-toc ol ol {
  margin: 0 0 4px 22px;
  padding: 0;
  list-style: none;
}
.doc-toc ol ol a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 6px 4px 6px 12px;
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.doc-toc ol ol a::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 0.35em;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent);
  background: transparent;
}
.doc-toc a:hover {
  color: var(--ink);
  text-decoration: none;
}
/* Active: blue bar + ink text; hide circle visually without changing box size */
.doc-toc a[aria-current="true"] {
  color: var(--ink);
  border-left-color: var(--accent);
}
.doc-toc > ol > li > a[aria-current="true"]::before,
.doc-toc ol ol a[aria-current="true"]::before {
  border-color: transparent;
  background: transparent;
}

.doc-body {
  min-width: 0;
  padding: 0 0 0 8px;
}
.doc-body.prose {
  width: auto;
  max-width: 720px;
  margin: 0;
}
.doc-page-head {
  margin: 0 0 40px;
}
.doc-page-head h1 {
  margin: 0;
  font-size: var(--text-display-sm);
  line-height: var(--leading-tight);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.doc-lede {
  margin: 16px 0 0;
  font-size: var(--text-lede);
  line-height: 1.45;
  color: var(--muted);
}
.doc-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.doc-meta::before {
  content: "i";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}
.doc-binding {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.doc-body.prose > section {
  margin: 0;
  padding: 28px 0 8px;
  border-top: 0;
}
.doc-body.prose > section + section {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.doc-body.prose h2 {
  position: relative;
  margin: 0 0 14px;
  padding-left: 14px;
  font-size: var(--text-title-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.doc-body.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.doc-body.prose ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.doc-body.prose li {
  position: relative;
  margin: 10px 0;
  padding-left: 18px;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink-2);
}
.doc-body.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.doc-body.prose p {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink-2);
}
.doc-body.prose strong {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 28px;
  }
  .doc-toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-right: 0;
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }
  .doc-toc > ol > li > a {
    padding-left: 12px;
  }
  .doc-body { padding-left: 0; }
}

.prose {
  width: min(720px, calc(100% - 48px));
  margin: 40px auto 96px;
}
.prose h2 {
  margin: 48px 0 12px;
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose h3 {
  margin: 28px 0 8px;
  font-size: var(--text-lede);
  font-weight: 600;
  color: var(--ink);
}
.prose p, .prose li {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink-2);
}
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose .updated {
  color: var(--muted);
  font-size: var(--text-md);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: var(--text-md);
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-2);
}
.prose th {
  background: var(--panel);
  font-weight: 600;
  color: var(--ink);
}

.notice {
  margin: 36px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--panel);
  font-size: var(--text-md);
  color: var(--muted);
}

/* Support page */








.page-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 8px 0 72px;
}

.showcase-more {
  margin: 48px 0 0;
  text-align: center;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.support-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto 56px;
  width: min(var(--max), calc(100% - 48px));
}

.support-card {
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 30px 28px;
}
.support-card h3 {
  margin: 0;
  font-size: var(--text-title-sm);
  font-weight: 600;
  color: var(--ink);
}
.support-card p {
  margin: 10px 0 18px;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--muted);
}

.faq {
  width: min(760px, calc(100% - 48px));
  margin: 72px auto 110px;
}
.faq h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.faq-group {
  margin: 28px 0 8px;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.faq-group:first-of-type { margin-top: 8px; }
.faq details {
  border-top: 1px solid var(--hairline);
  padding: 20px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  font-size: var(--text-lede);
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 14px 0 0;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--muted);
}

/* ---------- Language switcher ---------- */

.lang-picker { position: relative; display: inline-flex; }

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-button:hover,
.lang-picker.is-open .lang-button { background: var(--chip-hover); color: var(--ink); }
.lang-button:focus { outline: none; }
.lang-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-button svg { flex: none; }
.lang-button .lang-chevron { opacity: 0.55; transition: transform 0.15s ease; }
.lang-picker.is-open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--menu-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: 0 12px 32px var(--shadow-strong), 0 2px 6px var(--shadow-soft);
}
.lang-menu[hidden] { display: none; }

.lang-menu [role="option"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
}
.lang-menu [role="option"]:hover,
.lang-menu [role="option"]:focus-visible { background: var(--accent); color: var(--white); }
.lang-menu .lang-check { visibility: hidden; flex: none; }
.lang-menu [role="option"][aria-selected="true"] .lang-check { visibility: visible; }

/* ---------- Appearance toggle (system / light / dark) ---------- */

.nav-tools { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover { background: var(--chip-hover); color: var(--ink); }
.theme-toggle:focus { outline: none; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { display: block; }

/* ---------- Per-script typography ---------- */

html[lang^="zh"] body,
html[lang="ja"] body,
html[lang="ko"] body {
  letter-spacing: 0;
  line-height: 1.6;
}

/* Break CJK text at phrase boundaries instead of mid-word. */
html[lang^="zh"] body,
html[lang="ja"] body {
  word-break: auto-phrase;
}
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang="ja"] h1,
html[lang="ja"] h2 {
  text-wrap: balance;
}

html[lang="ar"] body {
  font-family: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", var(--font);
  letter-spacing: 0;
  line-height: 1.75;
}

html[lang="hi"] body {
  font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", var(--font);
  letter-spacing: 0;
  line-height: 1.7;
}

html[lang="hi"] .hero h1,
html[lang="ar"] .hero h1,
html[lang="ar"] .section-head h2,
html[lang="hi"] .section-head h2 {
  letter-spacing: 0;
  line-height: 1.25;
}

/* Right-to-left: keep Latin brand and code-like values readable; flex rows mirror automatically. */
html[dir="rtl"] .feature-text,
html[dir="rtl"] .section-head,
html[dir="rtl"] .card,
html[dir="rtl"] .tool,
html[dir="rtl"] .support-card,
html[dir="rtl"] .prose {
  text-align: start;
}
html[dir="rtl"] .brand {
  direction: ltr;
}
html[dir="rtl"] .prose ul {
  padding-left: 0;
  padding-right: 1.2em;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .cards { grid-template-columns: 1fr; }
  
  .support-cards { grid-template-columns: 1fr; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse .feature-text { order: 0; }
  .showcase { gap: 72px; }
  section { padding: 72px 0; }
  .hero { padding-top: 56px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .tool-grid, .support-cards { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 32px); }
}

/* ---------- Usage guide ---------- */

.guide-list {
  width: 100%;
  margin: 0;
}
.doc-body .guide-list {
  max-width: none;
}
.guide-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}
.guide-step:first-child { border-top: 0; padding-top: 0; }
.guide-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
}
.guide-step h2 {
  margin: 4px 0 8px;
  font-size: var(--text-title-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.guide-step p {
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--ink-2);
}

.guide-shortcuts {
  width: 100%;
  margin: 40px 0 0;
  padding-top: 36px;
  border-top: 1px solid var(--hairline);
}
.guide-shortcuts h2 {
  margin: 0 0 10px;
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.guide-shortcuts > p {
  margin: 0;
  font-size: var(--text-base);
  color: var(--muted);
}
.page-cta-inline {
  justify-content: flex-start;
  padding: 48px 0 24px;
}

.shortcut-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: var(--text-base);
}
.shortcut-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
  vertical-align: middle;
  color: var(--ink-2);
}
.shortcut-table td:first-child { width: 150px; }

kbd {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  min-width: 44px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

/* iCloud sync note under the sync cards */
.sync-note {
  max-width: 720px;
  margin: 32px auto 0;
  text-align: center;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--muted);
}

/* ---------- Visual richness: icons, glow, hover, reveal ---------- */

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  transition: transform 0.35s ease, background-color 0.35s ease;
}
.icon-tile svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hero: soft accent glow behind the product shot, plus a faint wash at the top. */
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 6% 4% -4%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  filter: blur(36px);
}

/* Download band: a gentle accent wash so the call to action stands out. */

/* Cards and tool tiles lift slightly on hover. `translate` composes with the reveal transform. */
.card,
.tool {
  transition: translate 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.card:hover,
.tool:hover {
  translate: 0 -4px;
  box-shadow: 0 16px 40px var(--shadow-soft);
}
.tool:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.card:hover .icon-tile,
.tool:hover .icon-tile {
  transform: scale(1.08) rotate(-3deg);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Clickable product shots */
.hero-shot.zoomable,
.feature-shot.zoomable {
  position: relative;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.zoomable img {
  cursor: zoom-in;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.zoomable img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .zoomable:hover img {
    transform: scale(1.015);
    box-shadow: 0 28px 72px var(--shadow-strong), 0 6px 18px var(--shadow-soft);
  }
}
.zoomable::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-3.2-3.2M11 8v6M8 11h6'/%3E%3C/svg%3E")
    center / 18px 18px no-repeat,
    color-mix(in srgb, #000 55%, transparent);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
@media (hover: hover) and (pointer: fine) {
  .zoomable:hover::after {
    opacity: 1;
    transform: scale(1);
  }
}
/* Touch: always show a light zoom affordance (no hover). */
@media (hover: none), (pointer: coarse) {
  .zoomable::after {
    opacity: 0.92;
    transform: scale(1);
  }
}

/* Scroll reveal. Only active when ui.js has run (adds `js` to <html>), so content stays visible without JS. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Hero first-paint entrance */
.js .hero-enter {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--hero-delay, 0ms);
}
.js.hero-ready .hero-enter {
  opacity: 1;
  transform: none;
}

/* Primary buttons: slight lift on hover */
a.btn:not(.btn-ghost),
button.btn:not(.btn-ghost) {
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
a.btn:not(.btn-ghost):hover,
button.btn:not(.btn-ghost):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
a.btn:not(.btn-ghost):active,
button.btn:not(.btn-ghost):active { transform: translateY(0); }

/* Lightbox — above sticky/mobile nav (z-index 100) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 24px 32px;
  background: color-mix(in srgb, #000 72%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  cursor: zoom-out;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox[hidden] { display: none !important; }
.lightbox.is-open[hidden] { display: flex !important; }
.lightbox-img {
  max-width: min(1200px, 94vw);
  max-height: min(78vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: default;
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-caption {
  margin: 0;
  max-width: min(720px, 90vw);
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Scroll is locked via body position:fixed in ui.js; do not also toggle
   overflow here — that fights the restored scrollY and makes the page jump. */
html[dir="rtl"] .lightbox-close { right: auto; left: 16px; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-enter { opacity: 1; transform: none; transition: none; }
  .card, .tool, .btn, .icon-tile, .hero-shot img, .feature-shot img, .lightbox, .lightbox-img { transition: none; }
  .card:hover, .tool:hover { translate: none; }
  .btn:hover { transform: none; box-shadow: none; }
  .zoomable:hover img { transform: none; }
  .card:hover .icon-tile, .tool:hover .icon-tile { transform: none; }
}

.tool .icon-tile {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 11px;
}
.tool .icon-tile svg { width: 20px; height: 20px; }

/* ---------- Phone layout (≤ 560px) ---------- */
@media (max-width: 560px) {
  .lang-button { padding: 0 8px; }
  .btn { white-space: nowrap; }

  section { padding: 56px 0; }
  .hero { padding: 40px 0 40px; }
  .hero-shot { margin-top: 40px; }
  .section-head { margin-bottom: 36px; }
  .card { padding: 28px 24px 30px; }
  .tool { padding: 22px 20px; }
  .download { padding: 80px 0 88px; }
  .footer nav { gap: 14px; }

  .guide-step { gap: 16px; padding: 26px 0; }
  .guide-shortcuts { margin-bottom: 80px; }
  .shortcut-table td { padding: 10px 6px; }
  .shortcut-table td:first-child { width: 112px; }
  .sync-note { font-size: 15px; }

  /* Wide data tables scroll sideways inside the page instead of pushing it wider than the screen. */
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose th, .prose td { padding: 10px 8px; font-size: 14px; }
}

/* ---------- Navigation: desktop arrangement and the mobile menu ---------- */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 28px;
}
.nav-toggle { display: none; }

/* Narrow screens: page links live in a full-screen sheet.
 * Opening the menu turns the sticky bar into a fixed full-viewport panel so that
 * iOS Safari does not break sticky positioning around an absolute child.
 * Body scroll is locked in ui.js with the iOS-safe "position: fixed; top: -scrollY" pattern. */
@media (max-width: 880px) {
  .nav-actions { gap: 8px; margin-left: auto; }
  .nav-tools { gap: 6px; }
  .nav { z-index: 100; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--chip);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
  }
  .nav-toggle:hover { background: var(--chip-hover); }
  .nav-toggle:focus { outline: none; }
  .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-toggle span {
    display: block;
    width: 14px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--ink-2);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

  /* Closed: the sheet is out of the layout. */
  .nav-links {
    display: none;
    margin-left: 0;
  }

  /* Open: the whole nav becomes a fixed full-screen panel. The link list is in normal flow
   * under the top bar — no absolute/fixed child hanging off a sticky ancestor. */
  .nav.menu-open {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 0;
  }
  /* The links live inside .wrap (same markup as desktop). Open state turns .wrap into a
   * two-row grid: top bar stays 52px, the sheet fills the rest. Without this the 52px
   * height on .wrap would crush the sheet to a single line. */
  .nav.menu-open .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 52px auto;
    align-items: center;
    height: auto;
    min-height: 100%;
    width: min(var(--max), calc(100% - 32px));
  }
  .nav.menu-open .brand { grid-column: 1; grid-row: 1; }
  .nav.menu-open .nav-actions { grid-column: 2; grid-row: 1; margin-left: 0; }
  .nav.menu-open .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: start;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 8px 0 48px;
    animation: sheet-in 0.2s ease;
  }
  @keyframes sheet-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .nav.menu-open .nav-links { animation: none; }
  }

  .nav-links > a {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-links > a:last-child { border-bottom: 0; }
  .nav-links > a:hover { color: var(--ink); text-decoration: none; }
  .nav-links > a[aria-current="page"] { color: var(--link); }
  /* Desktop "hide on small" links must show inside the open sheet. */
  
}

/* Keep the page from growing sideways on any phone. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
