/* Flow Notes — the fifth look on the shared M3 contract (m3.css).

   Seed: ink on paper — the same neutral black and white the app ships with, so
   the page reads like the editor it describes. Signature: an editor sheet with
   a hairline file rail, monospace paths and a caret; no elevation anywhere,
   rules instead of shadows, and generous white space. */

:root {
  color-scheme: light;

  --md-sys-color-primary: #1f2328;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-surface-container-low: #f6f7f8;
  --md-sys-color-surface-container: #f0f1f3;
  --md-sys-color-surface-container-high: #e8eaed;
  --md-sys-color-on-surface: #1f2328;
  --md-sys-color-on-surface-variant: #5b6169;
  --md-sys-color-outline: #6f757d;
  --md-sys-color-outline-variant: #d9dde2;

  --ink: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --rule: var(--md-sys-color-outline-variant);
  --sheet: var(--md-sys-color-surface);

  --max: 1120px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Noto Sans TC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --md-sys-color-primary: #e6e6e6;
  --md-sys-color-on-primary: #191919;
  --md-sys-color-surface: #191919;
  --md-sys-color-surface-container-low: #202020;
  --md-sys-color-surface-container: #262626;
  --md-sys-color-surface-container-high: #2e2e2e;
  --md-sys-color-on-surface: #e6e6e6;
  --md-sys-color-on-surface-variant: #b6b6b6;
  --md-sys-color-outline: #8f8f8f;
  --md-sys-color-outline-variant: #383838;

  --sheet: #1e1e1e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--md-sys-color-surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--md-sys-color-primary); }
img { max-width: 100%; display: block; }
code, pre, kbd { font-family: var(--mono); }

.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

/* Masthead */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--md-sys-color-surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand img { width: 26px; height: 26px; border-radius: var(--md-sys-shape-sm); }
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .nav .hide-sm { display: none; }
  .site-header .container { min-height: 60px; gap: 12px; }
  .nav { gap: 10px; }
  .nav .lang,
  .theme-toggle { padding: 0 12px; }
  .brand { font-size: 0.98rem; }
}

/* Hero */

.hero { padding: 76px 0 0; }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding-bottom: 64px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ink);
}
h1 {
  margin: 20px 0 18px;
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
h1 em {
  font-style: normal;
  color: var(--muted);
}
.lede {
  margin: 0 0 28px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.04rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pills li {
  padding: 5px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-full);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.04em;
}

/* The editor sheet: three chrome dots, a breadcrumb, then the screenshot. */

.sheet {
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-lg);
  background: var(--sheet);
  overflow: hidden;
}
.sheet__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--md-sys-color-surface-container-low);
}
.sheet__bar span {
  width: 9px;
  height: 9px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 50%;
}
.sheet__path {
  margin-left: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.sheet img { width: 100%; height: auto; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

/* Sections */

section { padding-block: 72px; }
section.alt {
  background: var(--md-sys-color-surface-container-low);
  border-block: 1px solid var(--rule);
}
.section-head { max-width: 44rem; margin-bottom: 36px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}
.section-head p { margin: 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-lg);
  background: var(--rule);
  overflow: hidden;
}
.card {
  padding: 24px;
  background: var(--md-sys-color-surface);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-md);
  color: var(--ink);
}
.card .icon svg { width: 18px; height: 18px; }

/* Screenshots */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
}
.shot { margin: 0; }
.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-md);
  background: var(--sheet);
}
.shot figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.04em;
}

/* Deploy steps */

.steps { display: grid; gap: 34px; }
.step { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 20px; }
.step__num {
  padding-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.1em;
}
.step h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 650; }
.step p { margin: 0 0 12px; color: var(--muted); font-size: 0.94rem; }

.copy-wrap { position: relative; }
.copy-wrap pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-md);
  background: var(--md-sys-color-surface-container);
  font-size: 0.82rem;
  line-height: 1.7;
}
.copy {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.copy:hover { border-color: var(--ink); color: var(--ink); }
.copy.ok { border-color: var(--ink); color: var(--ink); }

.note {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-inline-start: 2px solid var(--ink);
  background: var(--md-sys-color-surface-container-low);
  color: var(--muted);
  font-size: 0.92rem;
}
.note strong { color: var(--ink); }

.checks { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.checks li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}
.checks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.62em;
  width: 8px;
  height: 1px;
  background: var(--ink);
}
.checks strong { color: var(--ink); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 36px;
}

/* Specs */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--md-sys-shape-lg);
  background: var(--rule);
  overflow: hidden;
}
.specs > div { padding: 16px 20px; background: var(--md-sys-color-surface); }
.specs dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.specs dd { margin: 4px 0 0; font-size: 0.94rem; }
.specs dd.mono { font-family: var(--mono); font-size: 0.84rem; }

/* FAQ */

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  margin-inline-end: 10px;
  color: var(--muted);
  font-family: var(--mono);
}
.faq details[open] summary::before { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 0.94rem; }

/* Footer */

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--rule);
  background: var(--md-sys-color-surface-container-low);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.site-footer p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.site-footer nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--md-sys-type-label-sm-size);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 36px; padding-bottom: 44px; }
  .hero { padding-top: 48px; }
  section { padding-block: 52px; }
}
