/*
  pictotext.net — editorial terminal.

  Paper, ink and rules do the structural work. Yellow is a stateful fill, never
  decorative text or a border. The site deliberately shares the Journal
  panel's tokens so the store, install flow and product read as one system.
*/

:root {
  color-scheme: light;

  --paper: #fbfbf9;
  --ink: #14140f;
  --muted: #5a5a50;
  --hairline: #e3e3da;
  --edge: #c3c3b7;
  --stage: #f1f1ea;
  --sunk: #f3f3ec;
  --panel: #ffffff;
  --accent: #ffdc2e;
  --accent-hover: #ffe566;
  --accent-ink: #14140f;
  --captured-mount: #8c8c84;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --radius: 0px;

  /* Compatibility aliases used by the welcome-page schematic. */
  --bg: var(--paper);
  --raised: var(--stage);
  --fill-quiet: var(--sunk);
  --line: var(--hairline);
  --on-accent: var(--accent-ink);
  --font: var(--font-sans);

  --page: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(58px, 8vw, 108px);
  --fs-display: clamp(2.45rem, 5.6vw, 4.55rem);
  --fs-h2: clamp(1.65rem, 3vw, 2.55rem);
  --fs-h3: 1.0625rem;
  --fs-lead: clamp(1.0625rem, 1.5vw, 1.3125rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.68;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 690;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Headings render as written. The forced lowercase was the retired
   editorial-terminal brand style (owner, 2026-08-27): the product name
   must keep its capitals everywhere. */

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 5px var(--accent);
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  flex: 1;
}

/* Header and footer */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding-block: 14px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius);
}

.header-link {
  flex: none;
  font-size: var(--fs-small);
  font-weight: 650;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: var(--section-y);
  padding-block: clamp(24px, 4vw, 34px);
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: var(--fs-small);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Home hero */

.hero {
  display: grid;
  gap: clamp(34px, 5vw, 58px);
  padding-block: clamp(44px, 7vw, 92px) clamp(58px, 8vw, 108px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
    align-items: center;
    gap: clamp(44px, 6vw, 78px);
  }
}

h1 {
  font-size: var(--fs-display);
  line-height: 0.99;
  letter-spacing: -0.045em;
}

.hero-sub {
  max-width: 43ch;
  margin-top: clamp(20px, 2.5vw, 28px);
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.52;
}

.hero-cta {
  margin-top: clamp(28px, 3.6vw, 38px);
}

.hero-figure {
  margin: 0;
}

.hero-figure svg {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--stage);
}

/* Controls */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 21px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 680;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms var(--ease), transform 120ms var(--ease);
}

.button:hover {
  background: var(--sunk);
  color: var(--ink);
  text-decoration: none;
  transform: translate(-1px, -1px);
}

.button-primary,
.button-primary.is-pending,
.button-primary.is-pending:hover {
  border-color: var(--ink);
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button.is-pending,
.button.is-pending:hover {
  cursor: default;
}

/* Shared sections */

.band {
  border-block: 1px solid var(--hairline);
  background: var(--stage);
}

.section {
  padding-block: var(--section-y);
}

.section-title {
  font-size: var(--fs-h2);
  letter-spacing: -0.035em;
}

.section-split {
  display: grid;
  gap: clamp(28px, 4vw, 42px);
}

@media (min-width: 900px) {
  .section-split {
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: clamp(44px, 6vw, 84px);
  }

  .section-split .section-title {
    position: sticky;
    top: clamp(28px, 5vw, 56px);
  }
}

/* Feature index */

.features {
  margin-top: clamp(30px, 4vw, 50px);
}

.feature-columns {
  columns: 300px;
  column-gap: clamp(30px, 4vw, 58px);
  margin-top: clamp(32px, 4vw, 48px);
}

.feature-columns .feature {
  break-inside: avoid;
  margin-bottom: 0;
  padding-block: 18px 28px;
  border-top: 1px solid var(--edge);
}

.feature h3 {
  font-size: var(--fs-h3);
  font-weight: 680;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.feature p {
  max-width: 44ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.62;
}

.feature-lead {
  max-width: 760px;
  padding: clamp(22px, 3vw, 32px);
  border: 2px solid var(--ink);
  background: var(--panel);
}

.feature-lead h3 {
  font-size: clamp(1.35rem, 2.25vw, 1.72rem);
  letter-spacing: -0.03em;
}

.feature-lead p {
  max-width: 56ch;
  margin-top: 12px;
  font-size: 1.0625rem;
  line-height: 1.58;
}

/* Steps and questions */

.steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 16px;
  max-width: 64ch;
  padding-block: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

.steps li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.9;
}

.qa {
  display: grid;
  gap: 0;
  max-width: 70ch;
}

.qa article {
  padding-block: 20px 24px;
  border-top: 1px solid var(--edge);
}

.qa article:last-child {
  border-bottom: 1px solid var(--edge);
}

.qa h3 {
  font-size: var(--fs-h3);
  font-weight: 680;
  letter-spacing: -0.02em;
}

.qa p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.68;
}

/* Inner pages */

.page-shell {
  max-width: 900px;
  padding-block: clamp(44px, 6vw, 84px) 0;
}

.page-shell h1 {
  max-width: 19ch;
  font-size: clamp(2.25rem, 4.6vw, 3.55rem);
}

.intro {
  max-width: 57ch;
  margin-top: clamp(18px, 2vw, 24px);
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.52;
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 650;
  white-space: nowrap;
}

.setup {
  display: grid;
  gap: 0;
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: setup;
}

.setup > li {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 16px;
  max-width: 64ch;
  padding-block: 20px;
  border-top: 1px solid var(--hairline);
}

.setup > li::before {
  counter-increment: setup;
  content: "0" counter(setup);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.9;
}

.setup h2 {
  font-size: 1.125rem;
  font-weight: 680;
  line-height: 1.35;
}

.setup p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.toolbar-mock {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  margin-top: 16px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
}

.toolbar-mock img {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--radius);
}

.toolbar-mock .toolbar-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-mock .toolbar-icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.toolbar-mock .toolbar-pin {
  color: var(--ink);
}

/* Feedback and uninstall */

.reason-list {
  display: grid;
  gap: 10px;
  max-width: 48rem;
  margin-top: clamp(30px, 4vw, 44px);
}

.reason-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 120ms var(--ease), transform 120ms var(--ease);
}

.reason-button::after {
  content: "→";
  flex: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 650;
}

.reason-button:hover {
  background: var(--sunk);
  color: var(--ink);
  text-decoration: none;
  transform: translate(-1px, -1px);
}

.reason-button.is-clicked::after {
  content: "✓";
}

.direct-contact {
  margin-top: clamp(24px, 3vw, 32px);
}

/* 404 */

.not-found {
  display: grid;
  place-items: center;
  min-height: 52vh;
  padding-block: clamp(50px, 9vw, 112px);
  text-align: center;
}

.not-found h1 {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 12vw, 6rem);
  letter-spacing: -0.055em;
}

.not-found p {
  margin: 14px 0 28px;
  color: var(--muted);
}

/* Privacy */

.legal-shell {
  max-width: 860px;
  padding-block: clamp(44px, 6vw, 84px) 0;
}

.legal-shell h1 {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
}

.legal-shell h2 {
  margin-top: clamp(40px, 5vw, 58px);
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 1.28rem;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.legal-shell p,
.legal-shell li {
  max-width: 69ch;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal-shell p {
  margin-top: 14px;
}

.legal-shell h1 + p {
  margin-top: 20px;
  font-size: 1rem;
}

.legal-shell strong {
  color: var(--ink);
  font-weight: 680;
}

.legal-shell ul {
  margin: 14px 0 0;
  padding-left: 1.15rem;
}

.legal-shell li {
  margin-top: 10px;
}

.legal-shell code {
  padding: 1px 5px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--sunk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.legal-toc {
  margin-top: clamp(28px, 4vw, 40px);
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
}

.legal-toc h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.legal-toc ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 24px;
  margin: 12px 0 0;
  padding-left: 1.1rem;
}

.legal-toc li {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.table-scroll {
  margin-top: 18px;
  overflow-x: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--panel);
}

.legal-shell table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.legal-shell th,
.legal-shell td {
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  vertical-align: top;
}

.legal-shell th {
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-weight: 680;
  white-space: nowrap;
}

.legal-shell tbody tr + tr td {
  border-top: 1px solid var(--hairline);
}

.policy-date {
  margin-top: 36px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Motion */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.rise {
  animation: rise 420ms var(--ease) backwards;
}

.rise-2 { animation-delay: 60ms; }
.rise-3 { animation-delay: 120ms; }
.rise-4 { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .band,
  .reason-button,
  .toolbar-mock,
  .legal-toc,
  .table-scroll {
    background: Canvas;
    color: CanvasText;
  }

  .button,
  .reason-button,
  .feature-lead {
    border-color: CanvasText;
  }

  :focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }
}
