/* The legal pages in the app's "Paper & Marker" look; colours and sizes from src/ui/theme.ts.
   The font lies next to the pages, so a visit loads nothing from third parties. */

@font-face {
  font-family: 'Shantell Sans';
  src: url('fonts/ShantellSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Shantell Sans';
  src: url('fonts/ShantellSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Shantell Sans';
  src: url('fonts/ShantellSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #e9dfcc;
  --panel: #fbf6ec;
  --ink: #2b2420;
  --muted: #86776a;
  --accent: #e4572e;
  --on-accent: #ffffff;
  --marker: #ffe566;
  --fill: #f1e8d6;
  --soft: #c9b9a3;
  --dots: rgba(43, 36, 32, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a2320;
    --panel: #3a312c;
    --ink: #f5ebdd;
    --muted: #b8a693;
    --accent: #ff7a4d;
    --on-accent: #2a2320;
    --marker: #8a7420;
    --fill: #463b34;
    --soft: #7a6b5e;
    --dots: rgba(255, 255, 255, 0.05);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 24px 16px 48px;
  background-color: var(--bg);
  /* the dot grid of the paper background: 1 px dots every 6 px */
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.5px);
  background-size: 6px 6px;
  color: var(--ink);
  font-family: 'Shantell Sans', ui-rounded, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page {
  max-width: 720px;
  margin: 0 auto;
}

/* logo 40 and wordmark 24, as in the app's project list */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: inherit;
  text-decoration: none;
}

.logo {
  flex: none;
  width: 40px;
  height: 40px;
}
.logo .ink {
  fill: var(--ink);
}
.logo .panel {
  fill: var(--panel);
}
.logo .soft {
  fill: var(--soft);
}
.logo .fill {
  fill: var(--fill);
}
.logo .dash {
  fill: none;
  stroke: var(--soft);
  stroke-width: 1.8;
  stroke-dasharray: 3.6 2.4;
}
.logo .marker {
  fill: var(--marker);
}
.logo .accent {
  fill: var(--accent);
}
.logo .on-accent {
  fill: var(--on-accent);
}

.wordmark {
  isolation: isolate;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* the marker stroke behind "frame" */
.wordmark span {
  position: relative;
}
.wordmark span::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0.18em;
  right: -0.08em;
  bottom: -0.02em;
  left: -0.08em;
  border-radius: 0.08em;
  background: var(--marker);
  transform: rotate(-1.5deg);
}

/* a sheet of paper: ink border, hard shadow without blur */
.sheet {
  padding: 24px 20px 28px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--ink);
  overflow-wrap: break-word;
}

h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.15;
}

/* a marker stroke under every line of the heading */
h2 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.3;
  text-decoration: underline var(--marker);
  text-decoration-thickness: 0.45em;
  text-decoration-skip-ink: none;
  text-underline-offset: -0.28em;
}

p,
ul,
address {
  margin: 0 0 12px;
}

address {
  font-style: normal;
}

ul {
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

/* start page: the logo between two faded sketches, as on the app's first onboarding page */
.art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 4px 0 24px;
}
.logo-big {
  flex: none;
  width: 120px;
  height: 120px;
}
.sketch {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  width: 84px;
  height: 112px;
  padding: 8px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0.5;
}
.sketch.left {
  transform: rotate(-8deg);
}
.sketch.right {
  transform: rotate(9deg);
}
.sketch i {
  height: 8px;
  border-radius: 4px;
  background: var(--soft);
}
.sketch i:nth-child(1) {
  width: 60%;
  height: 4px;
  background: var(--ink);
}
.sketch i:nth-child(3) {
  width: 80%;
}
.sketch i:nth-child(4) {
  flex: 1;
  border: 1px solid var(--soft);
  background: var(--fill);
}
@media (min-width: 480px) {
  .logo-big {
    width: 160px;
    height: 160px;
  }
}

/* the highlighted second line of a headline, like the onboarding titles */
.mark {
  padding: 0 4px;
  background: var(--marker);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* body text right under a headline (the legal pages put their meta line there instead) */
h1 + p:not(.meta) {
  margin-top: 12px;
}

li::marker {
  color: var(--accent);
}

.lead {
  margin-top: 20px;
  font-weight: 600;
}

/* the app's primary button: accent paper with ink border and hard shadow */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-bottom: 16px;
  padding: 0 22px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.cta:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-top: 24px;
  font-size: 14px;
}
footer a {
  color: var(--muted);
}
