@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/static/ahnext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --sheet: #fbf9f4;
  --ink: #1f1d18;
  --muted: #625d53;
  --line: #d6cebf;
  --track: #e3dccd;
  --green: #2e5a3c;
  --green-dark: #22452d;
  --amber: #9a5b0c;
  --red: #9b2c1f;
  --radius: 6px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.5 "Atkinson Hyperlegible Next", system-ui, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.bar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 20px 0;
  font-size: 15px;
}
.mark { font-weight: 700; letter-spacing: .02em; }
.sub { color: var(--muted); }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

h1 { font-size: 32px; line-height: 1.15; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; margin: 44px 0 4px; }
p { margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

a { color: var(--green); text-underline-offset: 3px; }

.back {
  display: inline-block;
  font-size: 17px;
  margin: -8px 0 18px;
  padding: 8px 0;
  text-decoration: none;
  font-weight: 600;
}

/* How it works: a numbered list with large figures, read top to bottom on a phone and side by
   side on a wide screen. */
.how {
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  border-top: 1px solid var(--line);
}
.how li {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.how .n { font-size: 28px; font-weight: 800; color: var(--green); line-height: 1; }
.how b { display: block; }
.how span { color: var(--muted); }

@media (min-width: 720px) {
  .bar, main { max-width: 760px; }
  .how { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; border-top: 0; }
  .how li { grid-template-columns: 1fr; align-content: start; border-bottom: 0; border-top: 3px solid var(--ink); padding-top: 12px; }
  .how .n { margin-bottom: 8px; }
}

button, .button {
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 14px 20px;
  border: 0;
  background: var(--green);
  color: #fff;
  font-size: 20px;
  text-decoration: none;
}
.primary:hover { background: var(--green-dark); }
.primary:disabled { background: var(--track); color: var(--muted); cursor: default; }
.primary svg { flex: none; }

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}

.link {
  border: 0;
  background: none;
  padding: 10px 4px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible { outline: 3px solid #c98a1b; outline-offset: 2px; }

/* The list of videos on the home screen. */
.projects { list-style: none; margin: 8px 0 0; padding: 0; }
.projects a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.projects .t { font-weight: 700; font-size: 19px; }
.projects .d { grid-column: 1; color: var(--muted); font-size: 15px; }
.projects .st { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

.st { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.st::before { content: ""; width: 10px; height: 10px; border-radius: 2px; border: 2px solid currentColor; }
.st.open { color: var(--muted); }
.st.sent { color: var(--amber); }
.st.sent::before, .st.ready::before { background: currentColor; }
.st.ready { color: var(--green); }

/* The new video form. */
label.q { display: block; font-weight: 700; font-size: 20px; margin: 8px 0 8px; }
input[type=text], textarea {
  width: 100%;
  font: inherit;
  font-size: 19px;
  color: var(--ink);
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
input[type=text]:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--muted); font-size: 15px; margin: 8px 0 24px; }

/* Step line on a project. */
.step { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

.pick { margin: 20px 0 8px; }
.drop {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 8px;
}
@media (hover: hover) and (pointer: fine) {
  .drop { display: block; }
}
body.dragging main { outline: 3px dashed var(--green); outline-offset: -6px; }

.files { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.files li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.files .row { display: flex; align-items: center; gap: 10px; }
.files .name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.files .meta { color: var(--muted); font-size: 15px; }
.files .err { color: var(--red); font-size: 15px; font-weight: 600; }
.files .ok { color: var(--green); flex: none; }
.bar-track { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.bar-fill { height: 100%; background: var(--green); width: 0; transition: width .3s linear; }

.notice {
  background: var(--sheet);
  border-left: 4px solid var(--amber);
  padding: 12px 14px;
  margin: 18px 0 0;
  font-size: 16px;
}

.send { margin-top: 36px; }
.action { margin-top: 18px; }
.end { margin-top: 32px; }
.send .why { text-align: center; color: var(--muted); font-size: 15px; margin-top: 10px; }
.confirm { background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; }
.confirm p { font-weight: 600; }
.confirm .actions { display: flex; flex-direction: column; gap: 10px; }

.done-block { border-top: 3px solid var(--ink); padding-top: 18px; margin-top: 8px; }
.done-block h2 { margin-top: 0; font-size: 24px; }

video { width: 100%; max-height: 72vh; background: #000; border-radius: var(--radius); display: block; margin: 16px 0 10px; }

.net {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  font-size: 16px;
  font-weight: 600;
}

.error { color: var(--red); font-weight: 600; }
