/* sail-os.app — one stylesheet for the splash and the documentation.
   Paper and ink, one column at 360px, tap targets of 44px. See DESIGN.md. */

:root {
  --paper: #f7f5f0;
  --panel: #fffdf8;
  --ink: #1b1b1b;
  --muted: #5a5a5a;
  --line: #d9d4c8;
  --sea: #12364f;
  --accent: #b5451b;
  --winter: #e6f0f7;
  --winter-ink: #5b7f99;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

a { color: var(--sea); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }

/* The wordmark. Locked 3 September 2026: SAILOS in ink, A and I in accent, upright.
   On the sea masthead the whole mark is white (BRAND.md, The wordmark). */
.wordmark {
  font-family: Inter, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .ai { color: var(--accent); font-style: normal; }

/* Site header: paper ground, so the mark keeps its colour. */
.site-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.site-head .wordmark { font-size: 1.15rem; display: inline-flex; align-items: center; min-height: 44px; }
.site-head .alpha {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav { margin-left: auto; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6rem; text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

main { flex: 1; width: 100%; max-width: 44rem; margin: 0 auto; padding: 1rem 1.25rem 2rem; }

/* Splash lock, 5 September 2026: wordmark, the hull line, the waitlist link. */
body.splash { justify-content: center; }
body.splash main { margin: 0 auto; padding: 2rem 1.25rem; }
.hero { text-align: center; padding: 3rem 0 2rem; }
.hero .wordmark { display: block; font-size: clamp(2.25rem, 12vw, 4rem); line-height: 1.1; padding-left: 0.12em; margin: 0; }
.hero .line { margin: 1.25rem 0 0; font-size: clamp(1.15rem, 5vw, 1.5rem); }
.hero .standfirst { max-width: 34rem; margin: 1.25rem auto 0; color: var(--ink); }
/* One quiet link to the waitlist on the about page. Text, not a button, not a form. */
.hero .waitlist-link { margin: 1.5rem 0 0; font-size: 0.92rem; }
.hero .waitlist-link a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; }
.doors { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.6rem; }
.doors a {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--sea);
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}
.doors a strong { color: var(--sea); display: block; }
.doors a:hover, .doors a:focus { background: #fff; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--sea);
  border-radius: 3px;
  background: #fff;
  color: var(--sea);
  text-decoration: none;
  font-weight: 600;
}

/* The waitlist crumb: Clerk's component mounts in the box; the sentence stays until it does. */
.waitlist { max-width: 34rem; margin: 2.5rem auto 0; text-align: left; }
.waitlist h2 { font-size: 1.25rem; color: var(--sea); margin: 0 0 0.5rem; }
.waitlist p { margin: 0 0 0.75rem; }
.waitlist-fallback { color: var(--muted); font-size: 0.92rem; padding: 0.75rem 0.9rem; border: 1px dashed var(--line); background: var(--panel); }
#clerk-waitlist:empty { display: none; }

/* Documentation */
.doc-nav { margin: 0 0 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.doc-nav h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.25rem; }
.doc-nav ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.doc-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; text-decoration: none; }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

article h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.5rem 0 0.25rem; }
article h2 { font-size: 1.25rem; color: var(--sea); margin: 1.75rem 0 0.5rem; }
article h3 { font-size: 1.05rem; margin: 1.25rem 0 0.25rem; }
article p, article li { max-width: 40rem; }
.standfirst, .lede { font-size: 1.1rem; color: var(--muted); margin: 0 0 1rem; }
.facts { color: var(--muted); font-size: 0.92rem; }

table { border-collapse: collapse; width: 100%; margin: 0.75rem 0 1rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; }

dl.glossary dt { font-weight: 600; color: var(--sea); margin-top: 0.9rem; }
dl.glossary dd { margin: 0.1rem 0 0; max-width: 40rem; }

blockquote { margin: 1rem 0; padding: 0.5rem 1rem; background: var(--panel); border-left: 4px solid var(--sea); }

/* Release states. Words plus a shape, never colour alone. */
.state {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 0 0.5rem;
  border: 1px solid var(--sea);
  border-radius: 2px;
  color: var(--sea);
  background: #fff;
  vertical-align: middle;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.state-alpha { border-style: solid; }
.state-progress { border-style: double; }
.state-planned { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.state-concept { border-style: dotted; color: var(--muted); border-color: var(--muted); }
.state-legend { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.4rem; }
.state-legend li { display: flex; gap: 0.6rem; align-items: baseline; }

/* Trust labels as shape, same as the product. */
.label { display: inline-block; padding: 0.1rem 0.5rem; border-left: 4px solid #999; background: var(--panel); }
.label-professional { border-left-style: solid; border-left-color: var(--sea); }
.label-yard { border-left-style: double; border-left-color: var(--sea); }
.label-owner { border-left-style: dashed; border-left-color: var(--accent); }
.label-unsigned { border-left-style: dotted; border-left-color: #999; }

/* Media slots: a screenshot, a diagram or a film. Each degrades to a sentence
   when the asset does not exist yet. Nothing is drawn in its place. */
figure.media { margin: 1.25rem 0; }
figure.media img, figure.media video { display: block; width: 100%; border: 1px solid var(--line); background: #fff; }
figure.media .media-empty {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border: 1px dashed var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.92rem;
}
figure.media figcaption { margin-top: 0.3rem; color: var(--muted); font-size: 0.85rem; }
figure.media.film .media-empty::before { content: "Film"; display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--muted); padding: 0 0.35rem; margin-right: 0.5rem; vertical-align: middle; }
figure.media.diagram .media-empty::before { content: "Diagram"; display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--muted); padding: 0 0.35rem; margin-right: 0.5rem; vertical-align: middle; }
figure.media.screenshot .media-empty::before { content: "Screenshot"; display: inline-block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--muted); padding: 0 0.35rem; margin-right: 0.5rem; vertical-align: middle; }

/* Short sales paths: a wrap-friendly left-to-right flow, then one card per step. */
.flow-lr {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.flow-lr li {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--sea);
  color: var(--ink);
  font-weight: 600;
}
.flow-source {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--panel);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.flow-source code { font-size: inherit; white-space: inherit; }
.step-card {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--sea);
}
.step-card h2 { margin-top: 0; }
.step-card p:last-child { margin-bottom: 0; }

.next-prev { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.next-prev a { display: inline-flex; align-items: center; min-height: 44px; }

footer.site-foot {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
footer.site-foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.4rem; }
footer.site-foot p { margin: 0.25rem 0; }

@media (min-width: 40rem) {
  main { padding: 1.5rem 1.25rem 3rem; }
  .doors { grid-template-columns: 1fr 1fr; }
}
