/* PenDNA: notebook-page styling
   Palette taken from an Indian college notebook: white page, light blue rules,
   red margin line, blue ballpoint ink, brown kraft-paper cover. */

/* Fonts are served from this site (latin subset), so no request goes to Google. Both are SIL Open Font License. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("fonts/kalam-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FCFCF9;
  --white: #FFFFFF;
  --graphite: #262A33;
  --pencil: #5F6575;
  --ink: #2340A8;
  --ink-deep: #1A3088;
  --ink-wash: #EEF2FB;
  --rule: #D5E1F2;
  --rule-strong: #A9BEDF;
  --margin: #E7979C;
  --red-pen: #C23B44;
  --sheet-rule: #CBD9EE;
  --edge: #E4E8EF;
  --highlight: #FFEE9C;
  --kraft: #BE9466;
  --kraft-deep: #3E2A17;
  --error: #B42318;

  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --line: 32px;
  --margin-x: 4px;
  --page-pad: 26px;
}

@media (min-width: 760px) {
  :root {
    --margin-x: 14px;
    --page-pad: 52px;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
a { color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(16, 28, 80, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.btn:hover { background: var(--ink-deep); }
.btn:active { transform: translateY(1px); }

.btn-small {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-ghost:hover { background: var(--ink-wash); }

.btn-block { width: 100%; }

.btn[disabled] {
  cursor: progress;
  opacity: 0.75;
}

/* ---------- Header ---------- */

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--graphite);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-nib {
  width: 22px;
  height: 22px;
  color: var(--ink);
  transform: rotate(-38deg);
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.site-nav a {
  color: var(--pencil);
  font-size: 15px;
  text-decoration: none;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}
.site-nav a:hover {
  color: var(--graphite);
  text-decoration-line: underline;
}

@media (max-width: 759px) {
  .site-nav { display: none; }
  .header-cta { margin-left: auto; }
}

/* ---------- Ruled notebook page (hero + closing CTA) ---------- */

.ruled {
  position: relative;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--line) - 1px),
    var(--rule) calc(var(--line) - 1px),
    var(--rule) var(--line)
  );
  border-top: 1px solid var(--rule);
}

/* the red margin line, lined up with the content column */
.ruled::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(max(var(--gutter), (100% - var(--wrap)) / 2 + var(--gutter)) + var(--margin-x));
  width: 2px;
  background: var(--margin);
  opacity: 0.8;
}

.page {
  position: relative;
  padding-left: var(--page-pad);
}

.hero {
  padding-top: var(--line);
  padding-bottom: calc(var(--line) * 3);
}

.page-meta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 28px;
  height: var(--line);
  padding-bottom: 3px;
  color: var(--pencil);
  font-size: 13px;
  line-height: 1;
}

.meta-hand {
  margin-left: 6px;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 19px;
}

.hero-title {
  margin-top: var(--line);
  font-weight: inherit;
}

.hero-typed {
  display: block;
  position: relative;
  top: 15px;
  font-size: clamp(40px, 11vw, 48px);
  font-weight: 750;
  line-height: calc(var(--line) * 2);
  letter-spacing: -0.035em;
}

.hero-hand {
  display: block;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 34px;
  font-weight: 400;
  line-height: calc(var(--line) * 2);
}

.hand {
  display: inline-block;
  position: relative;
  top: 21px;
}

.hero-lede {
  position: relative;
  top: 6px;
  max-width: 34em;
  margin-top: var(--line);
  font-size: 18px;
  line-height: var(--line);
}

/* Hero signup: an email field written on the notebook line */

.hero-signup {
  max-width: 480px;
  margin-top: var(--line);
}

.line-field {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: calc(var(--line) * 2);
}

.line-field label {
  flex: none;
  padding-bottom: 9px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
}

.line-field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 4px 3px;
  border: 0;
  border-bottom: 2px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 24px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.line-field input::placeholder {
  color: #A5ADBE;
  opacity: 1;
}
.line-field input:focus {
  outline: none;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}
.line-field input[aria-invalid="true"] { border-bottom-color: var(--error); }

.hero-error {
  min-height: var(--line);
  margin: 0;
  padding-top: 7px;
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.hero-note {
  color: var(--pencil);
  font-size: 14.5px;
}

.hero-done .done-hand {
  position: relative;
  top: 14px;
  font-size: 36px;
  line-height: calc(var(--line) * 2);
}

.hero-done-text {
  position: relative;
  top: 6px;
  color: var(--pencil);
  font-size: 16.5px;
  line-height: var(--line);
}

.hero-done-text strong {
  color: var(--graphite);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

@media (min-width: 760px) {
  .hero {
    padding-top: calc(var(--line) * 2);
    padding-bottom: calc(var(--line) * 4);
  }
  .hero-typed {
    top: 10px;
    font-size: clamp(64px, 8.4vw, 94px);
    line-height: calc(var(--line) * 3);
  }
  .hero-hand {
    font-size: clamp(44px, 5.6vw, 62px);
    line-height: calc(var(--line) * 3);
  }
  .hand { top: 31px; }
}

/* ---------- Handwriting effect ---------- */

.hw-word {
  display: inline-block;
  white-space: nowrap;
}

.hw-char {
  display: inline-block;
  line-height: 1.15;
  transform-origin: 50% 75%;
}

.js [data-handwrite] { visibility: hidden; }
.js [data-handwrite].hw-ready { visibility: visible; }

.is-writing .hw-char {
  animation: hw-ink var(--hw-dur, 150ms) cubic-bezier(0.3, 0.6, 0.4, 1) both;
}

@keyframes hw-ink {
  from { clip-path: inset(-80% 140% -80% -40%); }
  to   { clip-path: inset(-80% -40% -80% -40%); }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(80px, 11vw, 136px);
}

.section-tight-top { padding-top: 0; }

.section-title {
  max-width: 20ch;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-top: 64px;
  counter-reset: none;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.step-num {
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}
.step:nth-child(1) .step-num { transform: rotate(-4deg); }
.step:nth-child(2) .step-num { transform: rotate(3deg); }
.step:nth-child(3) .step-num { transform: rotate(-2deg); }

.step-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.step > p {
  max-width: 34ch;
  color: var(--pencil);
  font-size: 16.5px;
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 48px;
  }
}

/* Fonts vs hands */

.compare {
  background: var(--white);
  border-block: 1px solid var(--edge);
}

.compare-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.compare-copy p {
  max-width: 40ch;
  margin-top: 20px;
  color: var(--pencil);
}

.compare-copy .btn { margin-top: 32px; }

.sheet {
  --line: 40px;
  --margin-x: 40px;
  position: relative;
  padding: var(--line) 24px var(--line) calc(var(--margin-x) + 24px);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--line) - 1px),
    var(--rule) calc(var(--line) - 1px),
    var(--rule) var(--line)
  );
  border: 1px solid var(--edge);
  border-radius: 4px;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--margin-x);
  width: 2px;
  background: var(--margin);
  opacity: 0.8;
}

.sheet-label {
  height: var(--line);
  padding-top: 13px;
  color: var(--pencil);
  font-size: 13.5px;
  line-height: 1;
}

.sheet-label-gap { margin-top: var(--line); }

.sheet-words {
  position: relative;
  top: 12px;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: calc(var(--line) * 2);
}

.hl,
.hw-char.hw-mark {
  background: linear-gradient(to bottom, transparent 30%, var(--highlight) 30%, var(--highlight) 88%, transparent 88%);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .compare-inner { grid-template-columns: 1fr; }
  .sheet {
    --margin-x: 24px;
    padding-right: 16px;
    padding-left: calc(var(--margin-x) + 16px);
  }
}

/* Privacy + questions: heading left, content right */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
}

.split-head p {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--pencil);
}

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 40px;
  padding-top: 8px;
}

/* ticked in a teacher's red pen */
.tick {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--red-pen);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.promises h3 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.promises p {
  color: var(--pencil);
  font-size: 16px;
}

/* Questions: heading and an "ask your own" form on the left, answers on the right */

.questions-grid {
  grid-template-areas:
    "head faq"
    "ask  faq";
  grid-template-rows: auto 1fr;
  row-gap: 36px;
}

.q-head { grid-area: head; }
.questions-grid .faq { grid-area: faq; }

.q-ask {
  grid-area: ask;
  align-self: start;
  position: sticky;
  top: 24px;
  max-width: 420px;
  padding: 22px 22px 24px;
  background: var(--white);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.ask-label {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 650;
}

/* a few ruled lines to write the question on */
.ask-lines {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 6px 4px 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    var(--rule-strong) 31px,
    var(--rule-strong) 32px
  );
  background-attachment: local;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 21px;
  line-height: 32px;
  resize: vertical;
  transition: background-color 0.15s ease;
}
.ask-lines:focus {
  outline: none;
  background-color: var(--ink-wash);
}
.ask-lines[aria-invalid="true"] { background-color: #FDF1F1; }

.ask-email { margin-top: 4px; }

.q-ask .form-error { margin: 8px 0 12px; }

.ask-done .contact-done-text { margin-bottom: 0; }

@media (max-width: 860px) {
  .questions-grid {
    grid-template-areas:
      "head"
      "faq"
      "ask";
    grid-template-rows: auto;
  }
  .q-ask {
    position: static;
    max-width: none;
  }
}

.faq details { border-bottom: 1px solid var(--edge); }
.faq details:first-child { border-top: 1px solid var(--edge); }

.faq summary {
  position: relative;
  padding: 22px 48px 22px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }

/* plus sign that turns into a cross */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(135deg); }

.faq summary:hover { color: var(--ink); }

.faq details p {
  max-width: 58ch;
  padding: 0 48px 24px 0;
  color: var(--pencil);
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  .promises { grid-template-columns: 1fr; gap: 32px; }
}

/* Closing CTA */

.cta {
  padding-top: calc(var(--line) * 3);
  padding-bottom: calc(var(--line) * 4);
}

.cta-title {
  position: relative;
  top: 7px;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 720;
  line-height: calc(var(--line) * 2);
  letter-spacing: -0.028em;
}

.cta-text {
  position: relative;
  top: 6px;
  max-width: 34em;
  font-size: 18px;
  line-height: var(--line);
  color: var(--pencil);
}

.cta-actions { margin-top: calc(var(--line) * 2); }

/* Footer */

.site-footer { border-top: 1px solid var(--edge); }

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  padding-block: 40px 28px;
  color: var(--pencil);
  font-size: 14.5px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 8px;
}

.brand-small { font-size: 18px; }
.brand-small .brand-nib {
  width: 19px;
  height: 19px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 10px 26px;
  max-width: 460px;
}

.footer-nav a {
  color: var(--graphite);
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] { text-decoration-line: underline; }

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--edge);
  font-size: 13.5px;
}

@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* ---------- Text links inside paragraphs ---------- */

.split-head p a,
.prose a {
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.split-head p a:hover,
.prose a:hover { text-decoration-thickness: 2px; }

/* ---------- Long-form text (homepage article, legal pages) ---------- */

.prose { max-width: 66ch; }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 36px 0 10px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 14px; }

.prose ul {
  padding-left: 1.3em;
  list-style: disc;
}
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--ink); }
.prose strong { font-weight: 650; }

/* ---------- Inner pages: about, contact, privacy, terms ---------- */

.doc-hero {
  padding-top: calc(var(--line) * 2);
  padding-bottom: calc(var(--line) * 2);
}

.doc-title {
  position: relative;
  top: 18px;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 750;
  line-height: calc(var(--line) * 2);
  letter-spacing: -0.035em;
}

.doc-lede {
  position: relative;
  top: 6px;
  max-width: 40em;
  margin-top: var(--line);
  color: var(--pencil);
  font-size: 18px;
  line-height: var(--line);
}

@media (min-width: 760px) {
  .doc-title { top: 7px; }
}

.doc-body {
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(88px, 11vw, 128px);
}

/* line inner-page content up with the text above, just right of the margin line */
.doc-body > * { margin-left: var(--page-pad); }

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

/* Contact form */

.contact { max-width: 560px; }

.field + .field { margin-top: 22px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 650;
}

.field-optional {
  color: var(--pencil);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--graphite);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--ink-wash);
}

.field [aria-invalid="true"] { border-color: var(--error); }

.contact-form .form-error { margin: 14px 0 12px; }

.contact-note {
  margin-top: 18px;
  color: var(--pencil);
  font-size: 14.5px;
}

.contact-done-text {
  margin: 12px 0 28px;
  color: var(--pencil);
}

.contact-done-text strong {
  color: var(--graphite);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* 404 */

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: calc(var(--line) * 2);
}

/* ---------- Waitlist page: notebook cover with a name label ---------- */

.cover {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--kraft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .24 0 0 0 0 .15 0 0 0 0 .06 0 0 0 .32 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--kraft-deep);
}

.cover-header {
  display: flex;
  align-items: center;
  width: 100%;
  height: 76px;
}

.back-link {
  color: var(--kraft-deep);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
}
.back-link:hover { text-decoration-line: underline; }
.back-link:focus-visible { outline-color: var(--kraft-deep); }

.cover-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter) 96px;
}

.label {
  width: min(100%, 460px);
  padding: 9px;
  background: #FFFEFA;
  border-radius: 20px;
  box-shadow:
    0 1px 1px rgba(62, 42, 23, 0.25),
    0 14px 30px -14px rgba(62, 42, 23, 0.55);
  transform: rotate(-1.2deg);
}

.label-inner {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 13px;
}

.label-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.label-band .brand-nib {
  width: 18px;
  height: 18px;
  color: var(--white);
}

.label-body {
  padding: 28px 28px 30px;
  color: var(--graphite);
}

.label-title {
  font-size: 30px;
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: -0.028em;
}

.label-text {
  margin-top: 10px;
  color: var(--pencil);
  font-size: 16px;
  line-height: 1.55;
}

.label-text strong {
  color: var(--graphite);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.label-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 28px;
}

.label-row label {
  flex: none;
  padding-bottom: 9px;
  font-size: 15px;
  font-weight: 650;
}

.label-row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 6px 4px 0;
  border: 0;
  border-bottom: 1.5px solid var(--rule-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 22px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.label-row input::placeholder {
  color: #A5ADBE;
  opacity: 1;
}
.label-row input:focus {
  outline: none;
  border-bottom: 2px solid var(--ink);
  background: var(--ink-wash);
}
.label-row input[aria-invalid="true"] { border-bottom-color: var(--error); }

.form-error {
  min-height: 24px;
  margin: 8px 0 14px;
  color: var(--error);
  font-size: 14px;
  line-height: 1.5;
}

.done-hand {
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 40px;
  line-height: 1.2;
}

.label-done .label-text { margin-bottom: 26px; }

.cover-note {
  margin-top: 26px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.cover-note a {
  margin-left: 6px;
  color: var(--kraft-deep);
  text-underline-offset: 3px;
}

@media (max-width: 420px) {
  .label { transform: rotate(-0.6deg); }
  .label-body { padding: 24px 20px 24px; }
  .label-title { font-size: 26px; }
}

/* ---------- Hero: the assignment page PenDNA wrote ---------- */

.hero-visual {
  position: relative;
  max-width: 470px;
  margin: calc(var(--line) * 2) auto 0;
}

/* a loose-leaf file page: ruled, red margin, two punched holes */
.assignment {
  --sl: 30px;
  position: relative;
  max-width: 470px;
  min-height: calc(var(--sl) * 18);
  margin-left: auto;
  padding: var(--sl) 20px var(--sl) 68px;
  background-color: var(--white);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--sl) - 1px),
    var(--sheet-rule) calc(var(--sl) - 1px),
    var(--sheet-rule) var(--sl)
  );
  border-radius: 3px;
  box-shadow:
    0 1px 2px rgba(31, 41, 80, 0.08),
    0 22px 44px -20px rgba(31, 41, 80, 0.38);
  transform: rotate(1.3deg);
}

.assignment::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 54px;
  width: 2px;
  background: var(--margin);
  opacity: 0.85;
}

/* on blank lines (between the title and Q1, and below the answers), so they never sit on writing */
.hole {
  position: absolute;
  top: calc(var(--sl) * 4 + 8px);
  left: 17px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 1px 2px rgba(31, 41, 80, 0.28);
}
.hole-low { top: calc(var(--sl) * 15 + 8px); }

.as-meta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 18px;
  height: var(--sl);
  padding-bottom: 4px;
  color: var(--pencil);
  font-size: 11.5px;
  line-height: 1;
}
.as-meta .meta-hand { font-size: 16px; }

.as-gap { margin-top: var(--sl); }

.as-title {
  position: relative;
  top: 8px;
  height: var(--sl);
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: var(--sl);
  text-align: center;
}

.as-title-text {
  position: relative;
  display: inline-block;
}

.as-underline {
  position: absolute;
  left: -6px;
  bottom: -1px;
  width: calc(100% + 12px);
  height: 8px;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.as-row { position: relative; }

.as-line,
.as-mark {
  position: relative;
  top: 8px;
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: var(--sl);
}

.as-mark {
  position: absolute;
  left: -52px;
}

/* the typed file it came from, tucked under the page */
.typed-card {
  position: absolute;
  left: -36px;
  bottom: -64px;
  width: 232px;
  padding: 12px 14px 14px;
  background: var(--white);
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(31, 41, 80, 0.08),
    0 16px 32px -16px rgba(31, 41, 80, 0.4);
  transform: rotate(-4deg);
}

.typed-file {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--pencil);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.typed-file::before {
  content: "";
  flex: none;
  width: 10px;
  height: 13px;
  border-radius: 2px;
  background: var(--ink);
}

.typed-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--graphite);
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.typed-arrow {
  position: absolute;
  top: -26px;
  right: -36px;
  width: 50px;
  height: 28px;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1079px) {
  .assignment { margin-right: auto; }
}

@media (max-width: 600px) {
  .assignment {
    --sl: 28px;
    padding-right: 12px;
    padding-left: 56px;
    transform: rotate(0.8deg);
  }
  .assignment::before { left: 44px; }
  .hole { left: 13px; width: 13px; height: 13px; }
  .as-line, .as-mark, .as-title { font-size: 16px; top: 7px; }
  .as-mark { left: -44px; }
  .as-meta .meta-hand { font-size: 14px; }
  .hero-visual { margin-bottom: 64px; }
  .typed-card {
    left: -10px;
    bottom: -84px;
    width: 200px;
  }
  .typed-arrow { display: none; }
}

/* Two columns once there's room: words on the left, the page on the right */
@media (min-width: 1080px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
    align-items: start;
    gap: 56px;
  }
  .hero-title { margin-top: 0; }
  .hero-visual { margin-top: 0; }
  .hero-typed {
    top: 17px;
    font-size: clamp(60px, 5.4vw, 78px);
    line-height: calc(var(--line) * 3);
  }
  .hero-hand {
    font-size: 44px;
    line-height: calc(var(--line) * 2);
  }
  .hand { top: 19px; }
}

/* ---------- How it works: small pictures of each step ---------- */

.step-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 12px;
  background: #F1F4FA;
}

.mini-sheet {
  position: relative;
  padding: 12px 14px 12px 30px;
  background-color: var(--white);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 21px,
    var(--sheet-rule) 21px,
    var(--sheet-rule) 22px
  );
  background-position: 0 12px;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(31, 41, 80, 0.08),
    0 10px 22px -12px rgba(31, 41, 80, 0.35);
}

.mini-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 1.5px;
  background: var(--margin);
}

.mini-sheet p {
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
}

.mini-sample {
  width: 196px;
  transform: rotate(-2.5deg);
}

/* camera frame corners: this page is being photographed */
.viewfinder {
  position: absolute;
  inset: 34px calc(50% - 128px);
}

.vf {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 0 solid var(--ink);
}
.vf-tl { top: 0; left: 0; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 6px; }
.vf-tr { top: 0; right: 0; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 6px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 6px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 6px; }

.mini-doc {
  width: 220px;
  padding: 12px 14px 16px;
  background: var(--white);
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow:
    0 1px 2px rgba(31, 41, 80, 0.08),
    0 10px 22px -12px rgba(31, 41, 80, 0.35);
  transform: rotate(1.5deg);
}

.mini-doc-title {
  margin-bottom: 4px;
  color: var(--graphite);
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.mini-doc-text {
  color: var(--graphite);
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 12.5px;
  line-height: 1.45;
}

.mini-stack {
  position: relative;
  width: 200px;
  height: 128px;
  margin-top: -18px;
}

.mini-stack .mini-sheet {
  position: absolute;
  inset: 0;
}

.mini-under { transform: rotate(-5deg) translate(-8px, 6px); }
.mini-under-2 { transform: rotate(4deg) translate(10px, 4px); }
.mini-top { transform: rotate(-1deg); }
.mini-top p { font-size: 12.5px; }

.mini-tag {
  position: absolute;
  bottom: 16px;
  left: 50%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white);
  color: var(--pencil);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(31, 41, 80, 0.12);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-writing .hw-char { animation: none; }
  .btn, .faq summary::before, .faq summary::after { transition: none; }
}
