/* Public site: loaded after app.css and built on its tokens. */

.site {
  --wrap: 1080px;
  --gutter: 24px;
  --rule: 32px;
  --space: clamp(72px, 9vw, 128px);
  --shadow-card: 0 1px 0 rgba(31, 30, 27, 0.04), 0 18px 40px -24px rgba(31, 30, 27, 0.28);
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  .site { --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.7); }
}

.site-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-wrap.narrow > * { max-width: 720px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; color: var(--accent-fg); }

/* ================================================================ type */

.site h1 {
  font-family: var(--sans);
  font-size: clamp(2.3rem, 1.1rem + 4.4vw, 4.1rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.034em;
  text-wrap: balance;
  max-width: 17ch;
}

.site h2 {
  font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.3rem);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.site h3 {
  font-size: 1.12rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.site p { text-wrap: pretty; }

.hero-sub {
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.5;
  color: var(--fg-2);
}

.lead {
  margin-top: 18px;
  max-width: 36em;
  font-size: 1.12rem;
  color: var(--fg-2);
}
.lead + .lead { margin-top: 12px; }

.small-print {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 0.88rem;
  color: var(--faint);
}

.stamp, .prov {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--faint);
}

/* Words people say or write are set in the serif, the same as note bodies in the app. */
.say {
  font-family: var(--serif);
  font-size: 1.38rem;
  line-height: 1.38;
  color: var(--prose);
}

.reply {
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--fg-2);
}
.reply-who {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* ================================================================ chrome */

.site-top-inner {
  display: flex;
  align-items: center;
  gap: 8px 28px;
  min-height: 72px;
}
.site .brand-name { font-size: 23px; }

.site-nav { display: flex; gap: 4px; flex: 1 1 auto; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.site-nav a:hover { color: var(--fg); background: var(--line-soft); }
.site-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }

.site-auth { display: flex; align-items: center; gap: 6px; }
.site-auth .btn-quiet { color: var(--fg-2); }

.site-foot {
  margin-top: var(--space);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}
.site-foot-inner {
  display: grid;
  gap: 10px;
  padding-block: 40px 56px;
}
.site-foot-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 8px; }
.site-foot-nav a { color: var(--fg-2); text-decoration: none; font-weight: 500; }
.site-foot-nav a:hover { color: var(--accent); text-decoration: underline; }

/* ================================================================ buttons */

.btn-big, a.btn-big { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-line, a.btn-line { background: transparent; border-color: var(--line-strong); }
.btn-line:hover { background: var(--surface); }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cta-note { margin-top: 14px; max-width: 34em; font-size: 0.92rem; color: var(--faint); }
.cta-agree { margin-top: 6px; font-size: 0.85rem; color: var(--faint); }
.cta-agree a { color: var(--fg-2); }
.cta-agree a:hover { color: var(--accent); }

/* ================================================================ hero */

.hero { padding-block: clamp(24px, 4vw, 56px) 0; }

.flow { margin: 40px 0 0; }

.flow-sheet {
  padding: 4px clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* What you say is written on ruled lines, its baselines sitting on the rules. */
.ruled {
  line-height: var(--rule);
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--rule) - 1px), var(--line-strong) calc(var(--rule) - 1px) var(--rule));
  background-position: 0 -3px;
}

/* One ask on the left, what it became on the right. */
.flow-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 32px minmax(0, 1.3fr);
  align-items: center;
  gap: 0 12px;
  padding: 18px 0;
}
.flow-pair + .flow-pair { border-top: 1px solid var(--line-soft); }
.flow-pair .say { --rule: 28px; font-size: 1.12rem; }
.flow-lands .stamp { margin-bottom: 6px; }
.flow-lands .v-note-mini { padding: 12px 16px; }
.flow-lands .v-note-line { margin-top: 0; }
.flow-lands .v-task { padding: 10px 14px; }
.flow-lands .v-grid td { padding: 10px 14px; }

.flow-link {
  position: relative;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}
.flow-link::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.flow-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--faint);
}
.flow-foot .icon { width: 16px; height: 16px; }

/* Only the connectors draw in; the content is there from the start. */
@media (prefers-reduced-motion: no-preference) {
  .flow-link { animation: link-x 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .flow-pair:nth-child(2) .flow-link { animation-delay: 180ms; }
  .flow-pair:nth-child(3) .flow-link { animation-delay: 360ms; }
}
@keyframes link-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes link-y { from { transform: scaleY(0); } to { transform: none; } }

@media (min-width: 1100px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px;
    align-items: center;
  }
  .site .hero h1 { font-size: 3.4rem; }
  .flow { margin: 0; }
}

/* ================================================================ sections */

.band { padding-block: var(--space) 0; }
.band-head { max-width: 40em; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.split-flip > .split-text { order: 2; }
.split-text > p:not(.lead):not(.small-print) { margin-top: 16px; color: var(--fg-2); max-width: 34em; }
.split-text > h2 + p:not(.lead) { margin-top: 20px; }

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: 48px;
}
/* A shared row per part, so the three headings line up whatever the card heights. */
.trio-item { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.trio-item h3 { margin-top: 24px; }
.trio-item > p { margin-top: 8px; color: var(--fg-2); font-size: 1rem; }

.start-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: start-step;
}
.start-steps li {
  position: relative;
  padding: 16px 0 16px 52px;
  border-bottom: 1px solid var(--line);
  counter-increment: start-step;
  font-size: 1.08rem;
  color: var(--fg-2);
}
.start-steps li:first-child { border-top: 1px solid var(--line); }
.start-steps li::before {
  content: counter(start-step);
  position: absolute;
  left: 0;
  top: 15px;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 27px;
  text-align: center;
  color: var(--muted);
}
.start-steps strong { color: var(--fg); font-weight: 620; }
.band-start .lead { margin-top: 28px; }

.page-intro { padding-block: clamp(40px, 7vw, 88px) 0; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.toc a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 14px;
  text-decoration: none;
}
.toc a:hover { border-color: var(--line-strong); color: var(--fg); background: var(--surface); }

.band[id] { scroll-margin-top: 24px; }

/* ================================================================ vignettes */

.v-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  line-height: 1.45;
}
.flow .v-card { box-shadow: none; }

.v-stack { display: grid; gap: 14px; }

.v-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 650;
}
.v-card-head span { color: var(--faint); font-weight: 400; font-size: 13px; }

.v-task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
}
.v-task + .v-task { border-top: 1px solid var(--line-soft); }
.v-task-body { min-width: 0; }
.v-title { font-weight: 500; }
.v-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 2px;
  font-size: 13px;
  color: var(--faint);
}
.v-meta span { display: inline-flex; align-items: center; gap: 4px; }
.v-meta .icon { width: 13px; height: 13px; stroke-width: 2; }
.v-meta .overdue { color: var(--warn); font-weight: 600; }
.v-task.done .v-title { color: var(--faint); text-decoration: line-through; }

.v-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}
.v-box .icon { width: 14px; height: 14px; stroke-width: 2.6; color: var(--accent-fg); }
.done > .v-box { background: var(--accent); border-color: var(--accent); }

.v-notif {
  max-width: 280px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.v-notif-wide { max-width: none; box-shadow: var(--shadow-card); background: var(--surface); }
.v-notif-app {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--faint);
}
.v-notif-title { margin-top: 4px; font-weight: 650; }
.v-notif-actions { display: flex; gap: 18px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.v-notif-actions span { color: var(--accent); font-weight: 650; font-size: 14px; }

.v-note-mini, .v-note { padding: 18px 20px; }
.v-note-title { font-weight: 650; font-size: 16px; }
.v-note-line, .v-note-body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--prose);
}
.v-note-line { margin-top: 6px; }
.v-note { padding: 24px 28px 20px; }
.v-note .v-note-title { font-size: 20px; letter-spacing: -0.01em; }
.v-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.v-note-body { margin-top: 16px; font-size: 17px; }
.v-check { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.v-check .v-box { margin-top: 0; }
.v-check.done { color: var(--faint); text-decoration: line-through; }
.v-note-mini .prov { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.v-note .prov { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.v-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
}
.v-file .icon { width: 16px; height: 16px; color: var(--faint); }
.v-file span { color: var(--faint); font-size: 13px; }

.v-grid-wrap { overflow: hidden; }
.v-grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.v-grid th, .v-grid td { padding: 9px 14px; text-align: left; white-space: nowrap; }
.v-grid th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.v-grid tbody td { border-top: 1px solid var(--line-soft); }
.v-grid tbody tr:first-child td { border-top: 0; }
.v-grid .num { text-align: right; }
.v-grid td.num { font-family: var(--mono); font-size: 13px; }
.v-grid tfoot td { border-top: 1px solid var(--line); font-weight: 650; }
.v-grid tfoot .num { font-weight: 500; color: var(--fg); }
.v-no { color: var(--faint); }
.trio .v-grid td:nth-child(2) { white-space: normal; }

.v-share { padding: 18px 20px; }
.v-share-head { font-size: 13px; font-weight: 600; color: var(--muted); }
.v-share ul { list-style: none; margin: 10px 0 0; padding: 0; }
.v-share li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.v-share li + li { border-top: 1px solid var(--line-soft); }
.v-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 700;
  font-size: 14px;
}
.v-avatar .icon { width: 16px; height: 16px; }
.v-avatar-link { background: var(--line-soft); color: var(--muted); }
.v-avatar-invite { background: var(--surface-2); color: var(--faint); border: 1.5px dashed var(--line-strong); }
.v-share-who { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.v-share-who small { display: block; font-weight: 400; font-size: 13px; color: var(--faint); }
.v-role { flex: none; font-size: 13px; color: var(--muted); }

.v-chat {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.v-chat .say { font-size: 1.2rem; }
.v-stack > .prov { padding-left: 4px; }

/* ================================================================ pricing */

.plans-band { padding-top: 48px; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.plans > .plan { max-width: 480px; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 32px 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.plan-pro { border-color: var(--accent); box-shadow: var(--shadow-card), inset 0 3px 0 var(--accent); }
.site .plan h2 { font-size: 1.3rem; letter-spacing: -0.01em; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.price .amount { font-size: 3rem; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.price .per { color: var(--muted); font-size: 1rem; }
.price-note { margin-top: 8px; font-size: 0.92rem; color: var(--faint); }
.plan-list {
  flex: 1 1 auto;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}
.plan-list li { padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 1rem; }
.plan-foot { margin-top: 12px; font-size: 0.88rem; color: var(--faint); text-align: center; }
.both { margin-top: 28px; color: var(--fg-2); font-size: 1rem; }

.faq { margin-top: 12px; }
.faq h3 { margin-top: 32px; }
.faq p { margin-top: 6px; color: var(--fg-2); max-width: 38em; }

/* ================================================================ legal */

.legal {
  max-width: calc(660px + 2 * var(--gutter));
  padding-top: clamp(40px, 7vw, 80px);
}
.site .legal h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3rem); }
.legal > p, .legal li {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--prose);
}
.legal > p { margin-top: 16px; }
.legal > .legal-date { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.legal-date + p { margin-top: 36px; }
.site .legal h2 { margin-top: 44px; font-size: 1.3rem; letter-spacing: -0.01em; }
.legal ul { margin: 14px 0 0; padding-left: 1.2em; }
.legal li + li { margin-top: 8px; }

/* ================================================================ narrow screens */

@media (max-width: 860px) {
  .split, .split-flip { grid-template-columns: 1fr; }
  .split-flip > .split-text { order: 0; }
  .trio { grid-template-columns: 1fr; max-width: 520px; row-gap: 0; }
  .trio-item { margin-bottom: 40px; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .flow-pair { grid-template-columns: 1fr; gap: 10px; }
  .flow-link { width: 2px; height: 18px; margin-left: 6px; transform-origin: center top; }
  .flow-link::after { right: -3px; top: auto; bottom: -3px; }
  .flow-link { animation-name: link-y; }
}

/* Two rows on a phone: brand and Create account, then the links with Sign in on the right. */
@media (max-width: 560px) {
  .site { --gutter: 16px; font-size: 16px; }
  .site-top-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    min-height: 0;
    padding-block: 10px 6px;
  }
  .site-top-inner .brand { grid-column: 1; grid-row: 1; }
  .site-auth { display: contents; }
  .site-auth .btn-primary { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: 1; grid-row: 2; margin-left: -12px; }
  .site-auth .btn-quiet { grid-column: 2; grid-row: 2; justify-self: end; margin-right: -10px; }
  .site-auth .btn-small { padding: 0 10px; }
  .cta-row .btn-big { flex: 1 1 100%; }
  .plan { padding: 26px 22px 22px; }
}
