@font-face {
  font-family: "Finmula Serif";
  src: url("/fonts/finmula-serif.woff2?v=0efafd0e1c") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #eef1f4;
  --sheet: #fbfcfd;
  --ink: #1c2430;
  --muted: #5a6472;
  --rule: #d5dae0;
  --note: #2f3c9e;
  --sheet-edge: #d5dae0;
  --marker: #f4e27a;
  --marker-ink: #1c2430;
  --serif: "Finmula Serif", "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161a20;
    --sheet: #1d222a;
    --ink: #e6e9ed;
    --muted: #9aa3ae;
    --rule: #2f3640;
    --note: #9ea5f0;
    --sheet-edge: #353d48;
    --marker: #e3cf62;
    --marker-ink: #161a20;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

p, dd, li, figcaption { text-wrap: pretty; }

a { color: var(--note); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--marker); color: var(--marker-ink); }
:focus-visible { outline: 2px solid var(--note); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}
.skip:focus { top: 12px; }

header.site {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

header.site .brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 92% / 100% 0.2em;
  padding: 0 0.08em;
}

header.site nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; }
header.site nav a { padding: 10px 0; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 64px;
}

h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 40px 0 8px; }

.lead { font-size: 17px; color: var(--muted); margin: 0 0 32px; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--muted); }
code { font-size: 13px; }

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}
.nowrap { white-space: nowrap; }

footer .links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer a { color: var(--muted); }

.home { --gutter: 24px; --col-gap: clamp(16px, 2.4vw, 32px); }

.hero,
.flow,
.steps,
.features {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

.home header.site,
.home main,
.home footer { max-width: 1120px; padding-left: var(--gutter); padding-right: var(--gutter); }

.home header.site { padding-top: 28px; }

.home main { padding-top: 0; padding-bottom: 0; }

.soon-link { padding: 10px 0; color: var(--muted); }

.soon-link small,
.soon {
  margin-left: 6px;
  padding: 0 6px;
  border: 1px dashed currentColor;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  vertical-align: 0.15em;
}

.hero {
  align-items: end;
  padding: clamp(40px, 4.5vw, 64px) 0 clamp(32px, 3.4vw, 48px);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin: 0;
  font-feature-settings: "palt";
  grid-column: 1 / 8;
}

.hero-text { grid-column: 8 / -1; padding-bottom: 0.4em; }
.hero .lead span { display: inline-block; }

.hero .lead {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 12px;
}

.hero .invite { margin: 0; color: var(--ink); font-size: 16px; font-weight: 700; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0 0; }
.cta-main { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.cta-main:hover { background: var(--note); text-decoration: none; }
.cta-alt { font-weight: 600; }

.panel-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.flow { margin: 0; row-gap: 20px; align-items: center; }

.setup,
.push,
.inbox {
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(28, 36, 48, 0.35);
}

.setup { grid-column: 1 / 5; padding: 20px 22px 8px; }
.setup dl { margin: 0; }
.setup dl > div { padding: 12px 0; border-top: 1px solid var(--rule); }
.setup dt { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.setup dd { margin: 0; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 1px 10px;
  border: 1px solid var(--sheet-edge);
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sift {
  grid-column: 5 / 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.sift p { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.sift .n {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.sift p:last-of-type .n {
  background: linear-gradient(var(--marker), var(--marker)) no-repeat 0 100% / 100% 0.14em;
  padding: 0 0.08em 0.06em;
}
.sift span { font-size: 14px; color: var(--muted); }
.sift i {
  position: relative;
  height: 44px;
  margin: 10px 0;
  border-left: 1.5px dashed var(--note);
}
.sift i::after {
  content: "";
  position: absolute;
  left: -5.5px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--note);
  border-bottom: 1.5px solid var(--note);
  transform: rotate(45deg);
}
.sift small { margin-top: 12px; font-size: 12.5px; color: var(--note); }
.sift small span { display: inline-block; }

.result { grid-column: 7 / -1; display: grid; gap: 16px; }

.push {
  justify-self: start;
  width: min(100%, 25em);
  padding: 12px 16px 14px;
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--rule), 0 20px 44px -22px rgba(28, 36, 48, 0.45);
}
.push p { margin: 0; }
.push-app { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.push-app::before { content: ""; width: 15px; height: 15px; border-radius: 4px; background: var(--ink); }
.push-title { margin-top: 4px !important; font-size: 15px; font-weight: 700; }
.push-body { font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.push-line { display: block; }
.push-line:last-child { color: var(--muted); }

.inbox .panel-label { padding: 14px 16px 0; margin-bottom: 8px; }
.inbox .day {
  margin: 0;
  padding: 6px 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.inbox-rows { list-style: none; margin: 0; padding: 0; }
.inbox-rows li {
  display: grid;
  grid-template-columns: 3em minmax(0, 8.5em) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.inbox-rows li:last-child { border-bottom: 0; }
.inbox-rows time { color: var(--muted); font-variant-numeric: tabular-nums; }
.inbox-rows .stock { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-rows .type { font-weight: 600; }
.inbox-rows .official { font-weight: 400; color: var(--muted); }
.inbox-rows .official small {
  margin-left: 6px;
  padding: 0 4px;
  border: 1px dashed currentColor;
  border-radius: 2px;
  font-size: 11px;
  white-space: nowrap;
}
.inbox-rows .why { font-size: 12px; color: var(--note); white-space: nowrap; }

.flow figcaption { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .push { animation: push-in 560ms cubic-bezier(0.2, 0.8, 0.2, 1) 1500ms both; }
  .sift p:last-of-type .n { animation: mark-sweep 600ms cubic-bezier(0.6, 0, 0.3, 1) 900ms both; }
  .sift i { animation: line-draw 400ms cubic-bezier(0.6, 0, 0.3, 1) 500ms both; }
  .inbox-rows li { animation: value-in 280ms ease-out both; }
  .inbox-rows li:nth-child(1) { animation-delay: 2000ms; }
  .inbox-rows li:nth-child(2) { animation-delay: 2080ms; }
  .inbox-rows li:nth-child(3) { animation-delay: 2160ms; }
  .inbox-rows li:nth-child(4) { animation-delay: 2240ms; }
  .inbox-rows li:nth-child(5) { animation-delay: 2320ms; }
  .inbox-rows li:nth-child(6) { animation-delay: 2400ms; }

  @media (max-width: 960px) {
    .sift i { animation: none; }
  }
}

@keyframes push-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes line-draw {
  from { transform: scaleY(0); transform-origin: top; }
  to { transform: scaleY(1); transform-origin: top; }
}

@keyframes mark-sweep {
  from { background-size: 0 0.14em; }
  to { background-size: 100% 0.14em; }
}

@keyframes value-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.3;
  margin: 0;
}

.steps,
.features {
  row-gap: 20px;
  margin-top: clamp(72px, 9vw, 120px);
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.steps h2 { grid-column: 1 / -1; margin-bottom: 8px; }
.steps ol {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  gap: 32px var(--col-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { grid-column: span 4; counter-increment: step; padding-top: 14px; border-top: 1px solid var(--rule); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--note);
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.35;
  margin: 0 0 8px;
}
.steps li p { margin: 0; color: var(--muted); max-width: 24em; }
.steps-note { grid-column: 1 / -1; margin: 12px 0 0; font-size: 15px; }

.features h2 { grid-column: 1 / -1; margin-bottom: 8px; }

.features ul {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 48px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.features li { grid-column: span 6; }
.features h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.35;
  margin: 0 0 8px;
}
.features h3 a { color: var(--ink); text-decoration-color: var(--rule); text-decoration-thickness: 2px; }
.features h3 a:hover { text-decoration-color: var(--note); }
.features p { margin: 0; color: var(--muted); max-width: 34em; }
.features .needs-invite { margin-top: 10px; font-size: 13px; }
.feature-soon h3 { color: var(--muted); }
.feature-soon .soon { margin-left: 12px; font-size: 13px; vertical-align: 0.3em; }

.home footer {
  margin-top: clamp(72px, 9vw, 120px);
  padding-top: 32px;
  border-top: 0;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat top center / calc(100% - 2 * var(--gutter)) 1px;
}

@media (max-width: 960px) {
  .home .hero > *,
  .home .flow > *,
  .home .steps > *,
  .home .features > *,
  .home .features li { grid-column: 1 / -1; grid-row: auto; }
  .hero h1 { margin-bottom: 28px; }
  .sift { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 4px 18px; padding: 4px 0; }
  .sift i { height: 0; width: 44px; margin: 0; border-left: 0; border-top: 1.5px dashed var(--note); align-self: center; }
  .sift i::after { left: auto; right: -1px; bottom: -4px; transform: rotate(-45deg); }
  .sift small { flex-basis: 100%; margin-top: 2px; }
  .steps ol { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home .steps li { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .home { --gutter: 16px; }
  .home header.site { flex-wrap: wrap; row-gap: 0; }
  .home header.site nav { gap: 0 20px; font-size: 14px; }
  .setup { padding: 16px 16px 4px; }
  .inbox-rows li {
    grid-template-columns: 3em minmax(0, 1fr) auto;
    grid-template-areas: "time stock why" ". type type";
  }
  .inbox-rows time { grid-area: time; }
  .inbox-rows .stock { grid-area: stock; }
  .inbox-rows .type { grid-area: type; }
  .inbox-rows .why { grid-area: why; }
}
