/* tickosh.com. The app's own paper, ink and indigo; one colour that means something (the
   thread), nothing that moves, and type doing the work. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/inter.3100e775e8.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --bg-raised: #fffdf9;
  --bg-sunk: #efebe3;
  --fg: #1d1d2b;
  --fg-muted: #4b4a59;
  --border: #e2ddd3;
  --border-strong: #cbc5b8;
  --accent: #3b3f8f;
  --accent-hover: #2f3378;
  --accent-fg: #ffffff;
  --thread: #3b3f8f;
  --focus: #3b3f8f;
  --todo: #fde68a;
  --shadow: 0 1px 2px rgb(29 29 43 / 0.05), 0 18px 48px -20px rgb(29 29 43 / 0.28);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1d;
    --bg-raised: #232326;
    --bg-sunk: #161618;
    --fg: #ecebe8;
    --fg-muted: #b3b2af;
    --border: #2f2f34;
    --border-strong: #404046;
    --accent: #a9aef5;
    --accent-hover: #bfc3f8;
    --accent-fg: #1b1b1d;
    --thread: #a9aef5;
    --focus: #b4b8f7;
    --todo: #854d0e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 48px -20px rgb(0 0 0 / 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    400 var(--step-0) / 1.6 'Inter Variable',
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--step-4);
  font-weight: 680;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--step-3);
  font-weight: 650;
}

h3 {
  font-size: var(--step-1);
  font-weight: 620;
}

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

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  padding: 8px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.skip:focus {
  top: 12px;
}

mark.todo {
  background: var(--todo);
  color: inherit;
  padding: 0 4px;
  border-radius: 4px;
}

/* ------ header and footer */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  min-height: 44px;
}

.brand svg {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 96px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--step--1);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.foot a {
  display: inline-block;
  padding-block: 10px;
}

/* ------ buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid var(--accent);
}

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

.button.quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
  font-size: var(--step--1);
  min-height: 40px;
  padding: 0 16px;
}

.button.quiet:hover {
  background: var(--bg-raised);
}

/* ------ homepage */

.hero {
  display: grid;
  justify-items: center;
  gap: 24px;
  padding-block: 56px 0;
  text-align: center;
}

.hero h1 {
  max-width: 14ch;
}

.lead {
  max-width: 36rem;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  color: var(--fg-muted);
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--thread);
}

.actions {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.actions small {
  font-size: var(--step--1);
  color: var(--fg-muted);
  max-width: 30rem;
}

.shots {
  position: relative;
  width: 100%;
  margin-top: 48px;
}

.shot {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.shot.desktop {
  display: none;
}

.shot.phone {
  width: min(300px, 78%);
  margin-inline: auto;
  border-radius: 28px;
}

@media (min-width: 760px) {
  .shot.desktop {
    display: block;
    width: 88%;
  }

  .shot.phone {
    position: absolute;
    right: 0;
    bottom: -40px;
    width: 22%;
    min-width: 190px;
    border-radius: 24px;
  }
}

.helps {
  display: grid;
  gap: 40px;
  margin-top: 128px;
}

.helps > header {
  display: grid;
  gap: 12px;
  align-content: start;
}

.helps > header p {
  color: var(--fg-muted);
  max-width: 28rem;
}

@media (min-width: 900px) {
  .helps {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }

  .helps > header {
    position: sticky;
    top: 32px;
  }
}

/* the thread: one line through the list, a knot at each point */
.thread {
  position: relative;
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 4px 0 4px 44px;
  list-style: none;
}

.thread::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--thread);
}

.thread li {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.thread li::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 0.3em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--thread);
}

.thread p {
  color: var(--fg-muted);
  max-width: var(--measure);
}

.thread kbd {
  font: inherit;
  font-weight: 550;
  color: var(--fg);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.yours {
  display: grid;
  gap: 16px;
  margin-top: 112px;
  padding: 36px max(24px, 4vw);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.yours ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
  color: var(--fg-muted);
  max-width: var(--measure);
}

.yours p a {
  font-weight: 600;
}

/* ------ policy pages */

.doc {
  display: grid;
  gap: 40px;
  padding-block: 40px 0;
}

.doc > header {
  display: grid;
  gap: 12px;
}

.doc > header p {
  color: var(--fg-muted);
}

.contents {
  font-size: var(--step--1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  background: var(--bg-raised);
  align-self: start;
}

.contents h2 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.contents ol {
  margin: 0;
  padding-left: 1.4em;
  display: grid;
  gap: 2px;
}

.contents a {
  display: inline-block;
  padding-block: 4px;
  text-decoration: none;
}

.contents a:hover {
  text-decoration: underline;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: var(--measure);
  min-width: 0;
}

.prose h2 {
  margin-top: 40px;
  font-size: var(--step-2);
  scroll-margin-top: 24px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 16px;
  font-size: var(--step-0);
  font-weight: 650;
}

.prose ul {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}

.prose strong {
  font-weight: 620;
}

.short {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-raised);
}

.short div {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
}

.short div + div {
  border-top: 1px solid var(--border);
}

.short dt {
  font-weight: 620;
}

.short dd {
  margin: 0;
  color: var(--fg-muted);
}

.table {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.table table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
  border-bottom: 0;
}

.table th {
  font-weight: 620;
  background: var(--bg-sunk);
}

@media (min-width: 1000px) {
  .doc {
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: 72px;
  }

  .doc > header {
    grid-column: 2;
  }

  .contents {
    grid-row: 2;
    position: sticky;
    top: 24px;
    border: 0;
    background: none;
    padding: 0;
  }
}

/* ------ not found */

.lost {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding-block: 96px 0;
  max-width: var(--measure);
}

.lost p {
  color: var(--fg-muted);
}

@media print {
  .bar .button,
  .skip,
  .contents {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
