/* stylus.me, the public pages. Plain CSS, no build step.
   The identity is the app's: white, ink, graphite, hairline, with the
   studio colour used sparingly. Dallas sets capitals only, so it carries
   short headings and nothing with a comma; everything else is the
   system sans. */

@font-face {
  font-family: "Dallas";
  src: url("/fonts/dallas-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: fallback;
}

:root {
  --bg: #FFFFFF;
  --paper: #F6F6F4;
  --band: #F1EFEB;
  --ink: #0B0B0A;
  --graphite: #6F6F6C;
  --hairline: #E7E6E2;
  --studio: #D7CFC6;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Dallas", var(--sans);
  --measure: 42rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0A;
    --paper: #151513;
    --band: #1C1B19;
    --ink: #F2F1EE;
    --graphite: #A3A29D;
    --hairline: #2B2A27;
    --studio: #3B3631;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: 1rem; top: -3rem; background: var(--bg); padding: 0.5rem 0.75rem; }
.skip:focus { top: 1rem; }

/* ---------- frame ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.site-head {
  border-bottom: 1px solid var(--hairline);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.4rem;
}

/* The wordmark, drawn from the app's own logo file in the current ink. */
.mark { display: inline-block; text-decoration: none; line-height: 0; }
.mark i {
  display: block;
  width: 7.7rem;
  height: 1rem;
  background: var(--ink);
  -webkit-mask: url("/img/stylus.svg") no-repeat left center / contain;
  mask: url("/img/stylus.svg") no-repeat left center / contain;
}

.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.nav a,
.micro {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
}
.nav a { text-decoration: none; padding-block: 0.25rem; }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: 0 1px 0 var(--ink); }

main { padding-block: 3.5rem 4.5rem; }

.site-foot {
  border-top: 1px solid var(--hairline);
  color: var(--graphite);
  font-size: 0.85rem;
  line-height: 1.6;
}
.site-foot .wrap { padding-block: 2rem 2.75rem; }
.site-foot .nav { margin-bottom: 1rem; }
.site-foot p { margin: 0.2rem 0; }
.site-foot a { color: var(--graphite); }

/* ---------- type ---------- */

h1, h2, .display {
  font-family: var(--display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
h1, h2 { text-wrap: balance; }
h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 3.25rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 1.75rem 0 0.5rem;
}

p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--graphite); }

.lede { font-size: 1.15rem; line-height: 1.6; }
.quiet { color: var(--graphite); }
.small { font-size: 0.875rem; }

/* A draft notice on a page still to be read by a lawyer: one element,
   so it comes off in one line. */
.draft {
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--graphite);
  margin: 0 0 2rem;
}

/* Key facts as label and value rows. */
.facts { border-top: 1px solid var(--hairline); margin: 1.5rem 0 2rem; }
.facts div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 0.25rem 1.25rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--hairline);
}
.facts dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite); padding-top: 0.2rem; }
.facts dd { margin: 0; }
@media (max-width: 34rem) {
  .facts div { grid-template-columns: 1fr; }
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 1rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4rem;
  text-align: center;
}

address { font-style: normal; }

.contact-block { margin: 0 0 2rem; }
.lede + .contact-block { margin-top: 2.25rem; }
.contact-block .micro { display: block; margin-bottom: 0.35rem; }
.contact-block .big { font-size: 1.2rem; }

/* ---------- messages ---------- */

/* A thread of texts, drawn plainly: Stylus on the left, the member on
   the right. The words are the real, registered wording. */
.thread {
  background: var(--band);
  padding: 1.5rem 1.25rem;
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.thread .who { margin-top: 0.4rem; }
.thread .who.member { align-self: flex-end; }
.bubble {
  max-width: 30rem;
  padding: 0.65rem 0.9rem;
  border-radius: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.bubble.stylus { align-self: flex-start; background: var(--bg); border: 1px solid var(--hairline); border-bottom-left-radius: 0.3rem; }
.bubble.member { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 0.3rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; align-self: flex-start; }
.chips span {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  background: var(--bg);
}
.picture {
  align-self: flex-start;
  width: 9rem;
  aspect-ratio: 2 / 3;
  background: var(--studio);
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* Sample messages: each one a labelled text, word for word. */
.samples { list-style: none; padding: 0; margin: 1.25rem 0 2rem; }
.samples li { margin: 0 0 1.25rem; }
.samples .micro { display: block; margin-bottom: 0.4rem; }
.samples .bubble { display: block; background: var(--band); border-bottom-left-radius: 0.3rem; }

.keywords { font-size: 0.95rem; }
.kw {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  letter-spacing: 0.02em;
  border: 1px solid var(--hairline);
  padding: 0.05rem 0.35rem;
  white-space: nowrap;
}

/* ---------- the join screen ---------- */

/* A drawing of the join page as an invited person sees it on a phone,
   on a panel of the studio colour. The screen always renders light,
   as the picture of a page does. */
.stage {
  background: var(--studio);
  padding: 2.5rem 1.25rem;
  margin: 1.5rem 0 0.75rem;
  display: flex;
  justify-content: center;
}
.phone {
  width: 100%;
  max-width: 22rem;
  border-radius: 2.4rem;
  background: #0B0B0A;
  padding: 0.6rem;
  box-shadow: 0 1.5rem 3rem rgba(11, 11, 10, 0.18);
}
.screen {
  --ink: #0B0B0A;
  --graphite: #6F6F6C;
  --hairline: #E7E6E2;
  color-scheme: light;
  background: #FFFFFF;
  color: #0B0B0A;
  border-radius: 1.9rem;
  padding: 2.4rem 1.6rem 2rem;
  min-height: 38rem;
  display: flex;
  flex-direction: column;
}
.screen .mark i { background: #0B0B0A; width: 6.2rem; height: 0.8rem; }
.screen .display { font-size: 1.9rem; line-height: 1.2; margin: 3.25rem 0 1.75rem; text-wrap: balance; }
.screen .sub { font-size: 0.95rem; line-height: 1.5; color: #6F6F6C; margin: -1rem 0 1.75rem; }
.screen .field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6F6F6C;
  margin: 0 0 0.45rem;
}
.screen .field {
  display: block;
  border: 1px solid #0B0B0A;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  margin: 0 0 1rem;
}
.screen .hint { font-size: 0.85rem; line-height: 1.5; color: #6F6F6C; text-align: center; margin: 0 0 1rem; }
.screen .button {
  display: block;
  background: #0B0B0A;
  color: #FFFFFF;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1.15rem;
  margin: 0 0 1rem;
}
.screen .fallback { font-size: 0.85rem; text-align: center; margin: 0 0 1.5rem; }
.screen .consent {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #3D3D3B;
  border-top: 1px solid #E7E6E2;
  padding-top: 1rem;
  margin: 0;
}
.screen .consent a { color: #0B0B0A; }
.caption { font-size: 0.85rem; color: var(--graphite); margin: 0 0 2rem; }

/* Capture mode, for making sms/join-screen.png from this page: opening
   /sms/#capture shows only the join screen, at a phone's width (390 by
   844), the way a phone screenshot looks. The width is fixed because
   Chrome will not make a window narrower than 500 pixels. Nobody links
   to #capture; the command that uses it is written beside the drawing
   in sms/index.html. */
html:has(#capture:target) body > :not(main),
html:has(#capture:target) main > .wrap > :not(.stage) { display: none; }
html:has(#capture:target) main,
html:has(#capture:target) main > .wrap { padding: 0; max-width: none; }
html:has(#capture:target) body { background: #FFFFFF; }
html:has(#capture:target) .stage { margin: 0; padding: 0; background: #FFFFFF; justify-content: flex-start; }
html:has(#capture:target) .phone { width: 390px; max-width: none; border-radius: 0; padding: 0; box-shadow: none; background: #FFFFFF; }
html:has(#capture:target) .screen { border-radius: 0; height: 844px; min-height: 0; padding: 3.25rem 1.6rem 2rem; }
