/* Workflaw. One screen. No third-party styles. */

:root {
  --bg: #0a0a0a;
  --text: #ededed;
  --muted: #6b6b6b;
  --line: #1f1f1f;
  --accent: #ff3b30;
  --valid: #4c8dff;
  --pad-x: 32px;
  --pad-y: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/sourcesans3.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

html {
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.modal-panel::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.modal-panel::-webkit-scrollbar-thumb {
  background: var(--line);
  border: 3px solid var(--bg);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.modal-panel::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

body {
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--mono);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.doc {
  height: auto;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

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

.top,
.bottom {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: var(--pad-y) var(--pad-x);
}

.top {
  top: 0;
}

.top.is-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.top.is-home .brand {
  grid-column: 1;
  justify-self: start;
}

.top.is-home #about-open {
  grid-column: 2;
  justify-self: center;
}

.top.is-home .nav-end {
  grid-column: 3;
  justify-self: end;
}

.bottom {
  bottom: 0;
}

.nav-link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 220ms var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
}

.nav-link:focus-visible,
.fine a:focus-visible,
.walk:focus-visible,
.analyze:focus-visible,
.booking-go:focus-visible,
.shroom:focus-visible,
.snippet-copy:focus-visible,
.snippet-name:focus-visible,
.wordmark:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

.fine {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.fine a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms var(--ease);
}

.fine a:hover {
  color: var(--text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.restart {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.restart[hidden] {
  display: none;
}

#mark {
  cursor: pointer;
}

.wordmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 1em;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  font-variant-ligatures: none;
  user-select: none;
  cursor: default;
  overflow: hidden;
}

.wordmark[hidden] {
  display: none;
}

.wm {
  line-height: 1;
}

a.wordmark {
  cursor: pointer;
}

.slot {
  position: relative;
  display: block;
  flex: 0 0 1ch;
  width: 1ch;
  height: 1em;
  overflow: hidden;
  line-height: 1;
}

.ch {
  position: absolute;
  left: 0;
  top: 0;
  width: 1ch;
  height: 1em;
  line-height: 1;
}

.ch-o {
  opacity: 0;
}

/* Red is reserved for flaw counts and this crack. */
.crack {
  position: absolute;
  left: 0;
  top: calc(50% + 1px);
  width: 100%;
  height: 1px;
  margin-top: -0.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
}

.stage {
  position: absolute;
  inset: 5.1rem var(--pad-x) 4.6rem;
  display: grid;
  place-items: center;
}

.stage.is-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
}

.anchor {
  position: relative;
  width: min(100%, 68rem);
  max-width: 100%;
  min-width: 0;
  text-align: center;
}

.sentence-wrap {
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: left;
}

.sentence-wrap.is-split {
  width: min(100%, 68rem);
  text-align: center;
}

.sentence {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.9rem, 4.5vw + 0.45rem, 4.15rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-align: left;
  text-wrap: balance;
  color: var(--text);
}

.sentence:has(.editable),
.ask {
  cursor: text;
}

.sentence.is-settled {
  font-size: clamp(1.15rem, 1.2vw + 0.55rem, 1.6rem);
  line-height: 1.35;
  text-align: center;
}

.ask {
  margin: 0.85rem 0 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.9rem, 4.5vw + 0.45rem, 4.15rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  color: var(--text);
}

.field.mail {
  max-width: 100%;
  white-space: nowrap;
  text-align: left;
  color: var(--valid);
}

.name {
  display: inline-block;
  min-width: 1.6ch;
  text-align: left;
}

.tail {
  white-space: nowrap;
}

.field {
  display: inline-block;
  border-bottom: 1px solid #3A3A3A;
  padding-bottom: 0.04em;
  vertical-align: baseline;
  line-height: inherit;
}

.editable {
  display: inline;
  outline: none;
  color: var(--text);
  caret-color: transparent;
  white-space: pre;
}

.pointer {
  display: inline-block;
  width: 2px;
  height: 0.78em;
  margin: 0 0.14em 0 0.02em;
  background: var(--accent);
  vertical-align: -0.05em;
  pointer-events: none;
  animation: caret 1.15s steps(1, end) infinite;
}

.pointer.is-after {
  display: none;
  margin: 0 0.02em 0 0.12em;
}

.tail.has-value .pointer.is-before {
  display: none;
}

.tail.has-value .pointer.is-after {
  display: inline-block;
}

@keyframes caret {
  0%, 48% { opacity: 1; }
  52%, 100% { opacity: 0; }
}

.editable.local {
  display: inline-block;
  min-width: 1ch;
  min-height: 1em;
  vertical-align: baseline;
}

.editable[data-placeholder]:not(.has-value)::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

#domain,
#mail-domain {
  color: var(--muted);
  transition: color 220ms var(--ease);
}

#domain.is-valid,
#mail-domain.is-valid,
#local,
.domain-name {
  color: var(--valid);
}

.domain-name.lock {
  display: inline-block;
  padding-bottom: 0.04em;
  border-bottom: 1px solid transparent;
  vertical-align: baseline;
  line-height: inherit;
}

#local,
#mail-domain {
  caret-color: var(--accent);
}

.flaw {
  color: var(--accent);
  font-variant-numeric: tabular-nums lining-nums;
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1.05rem);
  height: 1px;
  background: var(--line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease);
}

.progress.on {
  opacity: 1;
}

.progress span {
  display: block;
  height: 1px;
  width: 0;
  background: var(--text);
}

.sub {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 1.5rem;
  text-align: center;
  pointer-events: none;
}

.alt {
  position: absolute;
  left: 0;
  top: 100%;
  margin: 0.4rem 0 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.alt .nav-link {
  font-size: 14px;
  pointer-events: auto;
  vertical-align: baseline;
}

.alt[hidden] {
  display: none;
}

.prompt[hidden] {
  display: none;
}

.anchor.is-prompt .sentence-wrap,
.anchor.is-prompt .sub {
  display: none;
}

.anchor.is-prompt {
  margin-block: auto;
}

.anchor.is-prompt .prompt {
  width: min(36rem, 100%);
  margin-inline: auto;
  text-align: left;
  animation: prompt-in 320ms var(--ease);
}

.cue {
  margin: 0 0 1.15rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  color: var(--text);
}

#cue {
  opacity: 0;
}

#cue.is-in {
  animation: cue-in 420ms var(--ease) forwards;
}

.cue[hidden],
.next[hidden] {
  display: none;
}

.next {
  margin-top: 1.75rem;
  animation: cue-in 360ms var(--ease);
}

.snippet {
  border: 1px solid var(--line);
  background: #111111;
}

.snippet-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
  transition: border-color 320ms var(--ease);
}

.snippet.is-shut .snippet-bar {
  border-bottom-color: transparent;
}

.snippet-name {
  appearance: none;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.snippet-fold {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 320ms var(--ease);
}

.snippet.is-shut .snippet-fold {
  grid-template-rows: 0fr;
}

.snippet-fold-inner {
  overflow: hidden;
}

.snippet-copy {
  appearance: none;
  margin: 0;
  padding: 0 1rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.snippet-copy.is-cue {
  animation: copy-pulse 2.8s ease-in-out infinite;
}

.snippet-copy.is-done {
  color: var(--text);
  background: transparent;
  animation: none;
}

.snippet-copy:hover,
.snippet-copy:focus-visible,
.snippet-copy.is-done:hover,
.snippet-copy.is-done:focus-visible {
  color: var(--text);
  border-left-color: var(--text);
}

.snippet-body {
  margin: 0;
  padding: 0.95rem 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: #7a7a7a;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.tok-url {
  color: #6a93a8;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.tok-key {
  color: var(--muted);
}

.tok-domain {
  color: var(--valid);
}

.harness {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.harness span {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  background: #111111;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--text);
}

.harness-any {
  margin: 0.8rem 0 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
}

.step + .step {
  margin-top: 2.4rem;
}

.step-note {
  max-width: 22rem;
  margin: 0.15rem auto 0;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  color: var(--text);
}

.who {
  display: grid;
  gap: 1.6rem;
  align-items: start;
}

.who img {
  width: 9.5rem;
  height: 9.5rem;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--line);
}

.who a {
  color: var(--valid);
  text-decoration: none;
}

.who a:hover,
.who a:focus-visible {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .who {
    grid-template-columns: 9.5rem 1fr;
    gap: 1.75rem;
  }
}

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

@keyframes cue-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes copy-pulse {
  0%, 100% {
    color: var(--muted);
    background: transparent;
  }
  50% {
    color: var(--text);
    background: #2a2a2a;
  }
}

.line,
.hint {
  max-width: min(34rem, 100%);
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  opacity: 0;
  transition: opacity 280ms var(--ease);
}

.hint {
  margin-top: 0.55rem;
  letter-spacing: 0.01em;
}

.line:empty,
.hint:empty {
  display: none;
}

.sub.on .line,
.sub.on .hint {
  opacity: 1;
}

.analyze {
  appearance: none;
  display: inline-block;
  margin: 1.35rem auto 0;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms var(--ease), border-color 220ms var(--ease);
}

.sub.on .analyze {
  opacity: 1;
  pointer-events: auto;
}

.sub.has-send {
  margin-top: 1.35rem;
}

#analyze,
#send {
  margin-top: 0;
}

.analyze:hover,
.analyze:focus-visible {
  border-color: var(--text);
}

.analyze[hidden] {
  display: none;
}

.walk {
  appearance: none;
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transition: opacity 320ms var(--ease), border-color 220ms var(--ease);
}

.sub.done .walk {
  opacity: 1;
  pointer-events: auto;
}

.walk:hover {
  border-color: var(--text);
}

.walk[hidden] {
  display: none;
}

.turnstile {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  pointer-events: auto;
}

.turnstile[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 280ms var(--ease);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 32px 32px 28px;
  border: 1px solid var(--line);
  background: var(--bg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 280ms var(--ease), transform 320ms var(--ease);
}

.modal.is-in .modal-backdrop {
  opacity: 1;
}

.modal.is-in .modal-panel {
  opacity: 1;
  transform: translateY(0);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.about-head {
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.booking {
  margin-top: 1.6rem;
}

.booking-lead {
  margin: 0 0 1.35rem;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.booking-go {
  display: inline-block;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  transition: border-color 220ms var(--ease);
}

.booking-go:hover,
.booking-go:focus-visible {
  border-color: var(--text);
}

.booking-via {
  margin: 0.85rem 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.shroom {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 0.15rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  vertical-align: -0.35rem;
  cursor: pointer;
  transition: color 220ms var(--ease), transform 280ms var(--ease);
}

.shroom svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.shroom:hover,
.shroom:focus-visible,
.shroom[aria-expanded="true"] {
  color: var(--text);
  transform: translateY(-2px);
}

.shroom-note {
  font-family: var(--mono);
  color: var(--text);
}

.shroom-note[hidden] {
  display: none;
}

.about-copy p {
  margin: 0 0 0.95rem;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.about-copy .about-note {
  margin: 0.4rem 0 1.15rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #3a3a3a;
  background: #111111;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.doc-main {
  max-width: 38rem;
  margin: 0 auto;
  padding: 7.75rem var(--pad-x) 5.5rem;
}

.doc-main h1 {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.doc-main .who h1 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.doc-main h2 {
  margin: 2.4rem 0 0.7rem;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.doc-main p {
  margin: 0 0 0.95rem;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.doc-main a {
  color: var(--valid);
  text-decoration: none;
}

.doc-main a:hover,
.doc-main a:focus-visible {
  text-decoration: underline;
}

.doc-main .dated {
  margin: -0.8rem 0 1.6rem;
  color: var(--muted);
  font-size: 13px;
}

body.doc .bottom {
  background: var(--bg);
}

@media (max-width: 720px) {
  :root {
    --pad-x: 20px;
    --pad-y: 20px;
  }

  .nav-link {
    font-size: 14px;
  }

  .wordmark {
    font-size: 12px;
  }

  .sub {
    margin-top: 2rem;
  }

  .modal-panel {
    padding: 24px 20px 20px;
  }

  .booking {
    min-height: 0;
  }
}

@media (max-width: 380px) {
  .sentence,
  .ask {
    font-size: 1.7rem;
  }

  .sentence.is-settled {
    font-size: 1.05rem;
  }
}

@media (max-height: 640px) {
  .sentence,
  .ask {
    font-size: clamp(1.55rem, 5.2vh, 2.35rem);
  }

  .sentence.is-settled {
    font-size: 1rem;
  }

  .sub {
    margin-top: 1.45rem;
  }

  .stage {
    inset: 3.6rem var(--pad-x) 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .line,
  .hint,
  .walk,
  .progress,
  .nav-link,
  .fine a,
  .modal-backdrop,
  .modal-panel,
  .anchor.is-prompt .prompt,
  .cue,
  .next,
  .snippet-fold,
  .snippet-bar,
  .snippet-copy {
    transition: none;
    animation: none;
  }

  #cue,
  #cue.is-in {
    opacity: 1;
    transform: none;
  }

  .snippet-copy.is-cue {
    color: var(--text);
    background: #2a2a2a;
  }

  .modal-panel {
    transform: none;
  }

  .pointer,
  .shroom {
    animation: none;
    transition: none;
  }

  .shroom:hover,
  .shroom:focus-visible,
  .shroom[aria-expanded="true"] {
    transform: none;
  }
}
