:root {
  color: #242622;
  background: #fafbf9;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #242622;
  --muted: #62675e;
  --line: #dce0d7;
  --green: #176c51;
  --lime: #d3eea4;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; padding-bottom: 49px; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl { margin: 0; }
code, pre { font-family: var(--mono); }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
::selection { background: var(--lime); color: var(--ink); }

.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: var(--icon) center / contain no-repeat;
}
.icon-menu { --icon: url("./img/ui/menu.svg"); }
.icon-external { --icon: url("./img/ui/arrow-up-right.svg"); }
.icon-download { --icon: url("./img/ui/download.svg"); }
.icon-copy { --icon: url("./img/ui/copy.svg"); }
.icon-play { --icon: url("./img/ui/play.svg"); }
.icon-terminal { --icon: url("./img/ui/terminal.svg"); }
.icon-clock { --icon: url("./img/ui/clock.svg"); }
.icon-keyboard { --icon: url("./img/ui/keyboard.svg"); }
.icon-settings { --icon: url("./img/ui/settings-2.svg"); }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 70px;
  padding: 0 max(28px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fafbf9;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 650; }
.brand img { width: 29px; height: 29px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: 23px; flex: 1; }
.nav-links a { padding: 25px 0; color: #565c53; font-size: 13px; transition: color 150ms; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--green); }
.header-action { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; }
.header-action:hover { color: var(--green); }
.menu-toggle { display: none; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 38px 24px 0;
  background: #f1f3ee;
  border-bottom: 1px solid var(--line);
}
.hero-copy { order: 0; text-align: center; max-width: 750px; }
.eyebrow { font: 11px/1.6 var(--mono); text-transform: uppercase; color: var(--muted); }
.hero .eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
h1 { margin: 6px 0 10px; font-size: 92px; line-height: 1.08; font-weight: 550; letter-spacing: 0; }
.terminal-cursor { color: var(--green); }
.hero-lede { max-width: 565px; margin: auto; color: #575e51; font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.primary-button, .secondary-button, .app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 550;
  transition: background 150ms, border-color 150ms;
}
.primary-button { color: #fff; background: var(--ink); }
.primary-button .icon, .copy-button .icon, .automation-card > .icon { filter: invert(1); }
.primary-button:hover { background: var(--green); border-color: var(--green); }
.secondary-button { border-color: #c5cbc0; background: transparent; }
.secondary-button:hover { background: #e6eae1; border-color: #a7af9f; }
.text-link { display: inline-flex; align-items: center; gap: 7px; padding: 12px 6px; font-size: 13px; }
.text-link:hover { color: var(--green); }
.hero-platforms { display: inline-block; margin: 17px 9px 0 0; color: var(--muted); font: 10px/1.6 var(--mono); }
.hero-platforms span { padding: 0 4px; color: #929a89; }
.hero-store-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; font-size: 11px; color: var(--green); }
.hero-store-link .icon { width: 13px; height: 13px; }
.hero-store-link:hover { text-decoration: underline; }
.hero-background {
  order: 1;
  width: auto;
  height: clamp(220px, 35svh, 400px);
  max-width: min(100%, 740px);
  margin: 30px auto 24px;
  object-fit: contain;
  filter: drop-shadow(0 12px 14px #15221614);
}
.hero-stats { order: 2; display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 850px); border-top: 1px solid #d3d9cb; }
.hero-stats > div { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 18px 12px; }
.hero-stats > div + div { border-left: 1px solid #d3d9cb; }
.hero-stats dt { font-size: 12px; font-weight: 600; }
.hero-stats dd { margin: 0; color: var(--muted); font: 10px/1.5 var(--mono); }
.strip { display: flex; align-items: center; gap: 30px; padding: 22px max(28px, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.strip p { max-width: 980px; font: 11px/1.7 var(--mono); color: var(--muted); }
.strip-line { width: 42px; height: 2px; background: var(--green); margin-left: auto; flex-shrink: 0; }

.section { padding: 88px max(28px, calc((100% - 1120px) / 2)); border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; align-items: start; margin-bottom: 45px; }
.section-heading > .eyebrow { padding-top: 9px; }
h2 { font-size: 40px; line-height: 1.15; font-weight: 500; text-wrap: balance; letter-spacing: 0; }
h3 { font-size: 19px; line-height: 1.35; font-weight: 550; letter-spacing: 0; }
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 0 28px; border-left: 1px solid var(--line); }
.platform-card:first-child { padding-left: 0; border: 0; }
.platform-card:last-child { padding-right: 0; }
.platform-top { display: flex; align-items: center; gap: 14px; }
.platform-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; font: 25px/1 var(--mono); color: var(--green); }
.platform-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.platform-card > code { margin-top: auto; padding-top: 5px; color: #4a5545; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }

.automation-section { color: #f1f3ec; background: #20231f; border: 0; }
.automation-section .eyebrow { color: #a5af9b; }
.automation-section h2 > span { color: var(--lime); }
.automation-showcase { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: 50px; }
.automation-layout { display: grid; gap: 26px; }
.automation-card { display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 8px 16px; }
.automation-card > .icon { margin-top: 3px; color: var(--lime); }
.automation-card h3 { font-size: 16px; }
.automation-card p { grid-column: 2; color: #b7bfb0; font-size: 13px; line-height: 1.75; }
.automation-card code { color: #e4e8dd; font-size: 12px; }
.automation-preview { min-width: 0; }
.automation-preview img { width: 100%; height: auto; }
.automation-preview figcaption { display: flex; align-items: center; gap: 8px; color: #a5af9b; margin-top: 18px; font: 10px/1.5 var(--mono); }
.automation-preview .status-dot { background: var(--lime); }
.automation-callout { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; margin-top: 50px; padding-top: 25px; border-top: 1px solid #41473b; }
.automation-callout strong { font-size: 13px; font-weight: 550; color: var(--lime); line-height: 1.7; }
.automation-callout > span { color: #b7bfb0; font-size: 12px; line-height: 1.8; }

.workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px; counter-reset: step; }
.workflow article { padding-top: 20px; border-top: 1px solid var(--line); }
.workflow article > span { display: block; color: var(--green); font: 12px/1.5 var(--mono); margin-bottom: 23px; }
.workflow article > span::before { content: "0"; }
.workflow h3 { font-size: 18px; margin-bottom: 12px; }
.workflow p { color: var(--muted); font-size: 14px; line-height: 1.75; }
.marketplace-callout { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px; margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line); }
.marketplace-callout h3 { margin-bottom: 8px; font-size: 18px; }
.marketplace-callout p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.marketplace-callout .secondary-button { flex-shrink: 0; }

.tutorial-section { background: #f0f2ec; }
.tutorial-layout { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 50px; align-items: center; }
.tutorial-copy h3 { font-size: 20px; max-width: 290px; margin-bottom: 16px; }
.tutorial-copy p, .tutorial-copy li { color: var(--muted); font-size: 13px; line-height: 1.75; }
.tutorial-copy ul { margin: 16px 0 25px; padding-left: 16px; }
.tutorial-copy li + li { margin-top: 8px; }
.tutorial-video { position: relative; aspect-ratio: 16 / 9; min-width: 0; background: #20231f; }
.tutorial-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-launch { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #e7ece7; text-align: left; }
.video-launch > img { width: 100%; height: calc(100% - 40px); object-fit: contain; }
.video-play { position: absolute; left: 50%; top: calc(50% - 20px); transform: translate(-50%, -50%); display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid #fafbf9; border-radius: 50%; background: #242622; transition: background 150ms; }
.video-play .icon { width: 24px; height: 24px; margin-left: 3px; filter: invert(1); }
.video-launch:hover .video-play { background: var(--green); }
.video-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; height: 40px; padding: 0 15px; background: #20231f; color: #f1f3ec; font-size: 11px; }
.video-label > span { color: #b7bfb0; font: 10px/1.5 var(--mono); }

.install-section { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: center; }
.install-copy > .eyebrow { margin-bottom: 24px; }
.install-copy > p:not(.eyebrow) { margin-top: 22px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.install-store-button { margin-top: 22px; border-color: var(--line); font-size: 12px; }
.install-store-button:hover { border-color: var(--green); color: var(--green); }
.install-panel { min-width: 0; }
.install-tabs { display: flex; gap: 24px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.install-tab { position: relative; padding: 11px 1px 15px; border: 0; background: transparent; color: var(--muted); font: 12px/1.5 var(--mono); }
.install-tab.active { color: var(--green); }
.install-tab.active::after { position: absolute; height: 2px; inset: auto 0 -1px; content: ""; background: var(--green); }
.install-tab:hover { color: var(--green); }
.terminal-panel { overflow: hidden; border: 1px solid #33392e; border-radius: 5px; background: #20231f; color: #e5eddf; }
.terminal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #41473b; color: #adb6a4; font: 11px/1.5 var(--mono); }
.copy-button { width: 32px; height: 32px; border-color: #535a4d; }
.copy-button:hover { background: #383f31; color: #fff; }
.copy-button[data-copied] .icon { --icon: url("./img/ui/check.svg"); }
.install-terminal pre { margin: 0; min-height: 167px; padding: 25px 22px; overflow-x: auto; font-size: 11px; line-height: 2; }
.copy-status { display: block; min-height: 20px; margin-top: 8px; color: var(--green); font: 11px/1.5 var(--mono); }

.screens-section { background: #f1f3ee; }
.screen-switcher { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 36px; align-items: start; }
.screen-controls { display: flex; flex-direction: column; align-items: stretch; gap: 2px; border-left: 1px solid #c9d0c1; }
.screen-tab { position: relative; text-align: left; padding: 10px 17px; min-height: 38px; border: 0; background: transparent; color: #68705f; font-size: 12px; transition: color 150ms, background 150ms; }
.screen-tab.active { background: #e1e8d8; color: #264f35; font-weight: 600; }
.screen-tab.active::before { content: ""; position: absolute; inset: 0 auto 0 -1px; width: 2px; background: var(--green); }
.screen-tab:hover { color: var(--green); background: #e7ecdf; }
.screen-stage { min-width: 0; }
.screen-stage img { width: 100%; height: auto; aspect-ratio: 1512 / 1030; max-height: 570px; object-fit: contain; object-position: center top; }
.screen-caption { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; color: var(--muted); font: 10px/1.6 var(--mono); }

.files-section .section-heading { margin-bottom: 36px; }
.files-grid { border-top: 1px solid var(--line); }
.file-card { display: grid; grid-template-columns: 0.55fr 1fr 1.4fr; gap: 10px 28px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.file-card:last-child { border-bottom: 0; padding-bottom: 0; }
.file-kicker { grid-row: span 2; padding-top: 3px; color: var(--green); font: 10px/1.6 var(--mono); }
.file-card h3 { font-size: 15px; }
.file-card p { grid-column: 2; color: var(--muted); font-size: 12px; line-height: 1.7; }
.file-card pre { grid-column: 3; grid-row: 1 / 3; align-self: center; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line); overflow-x: auto; color: #53644a; font-size: 10px; line-height: 1.9; }

.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: 40px max(28px, calc((100% - 1120px) / 2)); }
.site-footer > div { display: flex; align-items: center; gap: 9px; }
.site-footer img { width: 25px; height: 25px; border-radius: 6px; }
.site-footer strong { font-size: 14px; font-weight: 600; }
.site-footer p { color: var(--muted); font-size: 11px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; color: #53604b; font-size: 11px; }
.footer-links a:hover { color: var(--green); text-decoration: underline; }
.support-banner { position: fixed; inset: auto 0 0; z-index: 30; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 25px; min-height: 49px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #e5d897; background: #faf2d4; font-size: 11px; }
.support-label { color: #716340; font: 10px/1.5 var(--mono); }
.support-link { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.support-star { color: #98395c; }
.support-sponsor { color: #496142; }
.support-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1500px) {
  .hero { padding-top: 48px; }
}

@media (min-width: 601px) and (max-height: 850px) {
  .hero { padding-top: 24px; }
  h1 { font-size: 76px; }
  .hero-background { height: clamp(150px, 30svh, 260px); margin-top: 22px; }
}

@media (max-width: 1080px) {
  .site-header { gap: 22px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 12px; }
  .automation-showcase { gap: 32px; }
  .section { padding-top: 68px; padding-bottom: 68px; }
  .install-section { gap: 38px; }
  .hero-stats > div { flex-direction: column; gap: 4px; padding: 12px; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 83px; }
  .site-header { min-height: 64px; }
  .menu-toggle { display: inline-flex; margin-left: auto; order: 3; border: 0; }
  .header-action { margin-left: auto; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 28px 20px; background: #fafbf9; border-bottom: 1px solid var(--line); }
  .nav-links.is-open { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .nav-links a { padding: 12px 0; font-size: 14px; }
  .menu-toggle[aria-expanded="true"] .icon { --icon: url("./img/ui/x.svg"); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-heading > .eyebrow { padding: 0; }
  .automation-showcase { grid-template-columns: 1fr; gap: 40px; }
  .automation-layout { grid-template-columns: 1fr 1fr; gap: 30px; }
  .automation-preview { width: min(100%, 620px); margin: auto; }
  .automation-callout { grid-template-columns: 1fr; gap: 12px; }
  .platform-card { padding-inline: 20px; }
  .tutorial-layout { grid-template-columns: 1fr; gap: 30px; }
  .tutorial-copy h3 { max-width: none; }
  .install-section { grid-template-columns: 1fr; }
  .install-copy > p:not(.eyebrow) { max-width: 620px; }
  .screen-switcher { gap: 20px; grid-template-columns: 125px minmax(0, 1fr); }
  .screen-tab { padding-inline: 12px; }
  .file-card { grid-template-columns: 1fr 1.3fr; gap: 10px 24px; }
  .file-kicker { grid-row: auto; grid-column: 1; }
  .file-card h3 { grid-column: 1; }
  .file-card p { grid-column: 1; }
  .file-card pre { grid-column: 2; grid-row: 1 / 4; }
}

@media (max-width: 600px) {
  body { padding-bottom: calc(67px + env(safe-area-inset-bottom)); }
  .site-header { padding-inline: 20px; gap: 14px; min-height: 60px; }
  .brand { font-size: 17px; }
  .header-action { gap: 5px; font-size: 12px; }
  .menu-toggle { margin-left: 0; width: 32px; }
  .nav-links { padding-inline: 20px; }
  .hero { padding: 28px 20px 0; }
  h1 { font-size: 50px; margin: 10px 0 14px; }
  .hero .eyebrow { font-size: 9px; }
  .hero-lede { font-size: 14px; line-height: 1.6; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 22px; }
  .hero-actions > .primary-button, .hero-actions > .secondary-button { font-size: 12px; padding-inline: 12px; flex: 1; white-space: nowrap; }
  .hero-actions .text-link { flex-basis: 100%; justify-content: center; padding: 6px; }
  .hero-platforms { display: block; margin: 10px 0 0; font-size: 9px; }
  .hero-store-link { margin-top: 7px; }
  .hero-background { width: 100%; height: clamp(160px, 26svh, 220px); margin: 20px auto 14px; }
  .hero-stats { width: calc(100% + 40px); }
  .hero-stats > div { padding: 14px 4px; gap: 4px; }
  .hero-stats dt { font-size: 10px; }
  .hero-stats dd { max-width: 90px; text-align: center; font-size: 9px; }
  .strip { padding: 18px 20px; gap: 15px; }
  .strip p { font-size: 10px; }
  .strip-line { width: 20px; }
  .section { padding: 52px 22px; }
  .section-heading { gap: 15px; margin-bottom: 32px; }
  h2 { font-size: 31px; }
  .platform-grid { grid-template-columns: 1fr; gap: 24px; }
  .platform-card, .platform-card:first-child, .platform-card:last-child { padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); gap: 12px; }
  .platform-top { gap: 12px; }
  .platform-card > code { padding-top: 0; }
  .automation-layout { grid-template-columns: 1fr; gap: 26px; }
  .automation-showcase { gap: 32px; }
  .automation-callout { margin-top: 30px; }
  .workflow { grid-template-columns: 1fr; gap: 26px; }
  .workflow article { display: grid; grid-template-columns: 24px 1fr; gap: 8px 15px; padding-top: 20px; }
  .workflow article > span { grid-row: span 2; margin: 3px 0 0; }
  .workflow h3 { margin: 0; }
  .workflow p { grid-column: 2; font-size: 13px; }
  .tutorial-copy h3 { font-size: 18px; }
  .install-section { gap: 30px; }
  .install-copy > .eyebrow { margin-bottom: 15px; }
  .install-terminal pre { font-size: 10px; padding: 20px 15px; }
  .install-tabs { gap: 25px; }
  .screen-switcher { grid-template-columns: 1fr; gap: 22px; }
  .screen-controls { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; border: 0; }
  .screen-tab { padding: 8px 10px; min-height: 36px; font-size: 11px; border-radius: 2px; }
  .screen-tab.active::before { inset: auto 0 0; width: auto; height: 2px; }
  .screen-caption { padding-top: 14px; }
  .file-card { grid-template-columns: 1fr; padding-block: 24px; }
  .file-kicker, .file-card h3, .file-card p, .file-card pre { grid-column: 1; grid-row: auto; }
  .file-card pre { margin-top: 10px; padding-left: 14px; }
  .site-footer { padding: 30px 22px; gap: 20px; }
  .site-footer p { flex-basis: 100%; order: 3; }
  .footer-links { gap: 15px 18px; font-size: 12px; line-height: 1.7; }
  .support-banner { min-height: 67px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); gap: 7px 17px; }
  .support-label { flex-basis: 100%; text-align: center; font-size: 9px; }
  .support-link { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
