/* pennapad.com. Colors and type follow the Penna brand board. */
/* Fonts are served from this site (SIL Open Font License, see fonts/). */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/fonts/figtree-latin.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/newsreader-latin.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap; src: url("/fonts/newsreader-italic-latin.woff2") format("woff2"); }
:root {
  --paper: #F6F4EE;
  --surface: #FFFFFF;
  --ink: #1C1F24;
  --graphite: #6B7079;
  --brand: #2B4A6F;
  --mist: #E4E8EE;
  --rule: #DCDDD6;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI Variable", sans-serif;
  --font-head: "Newsreader", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14171C; --surface: #1B1F26; --ink: #E9E6DD; --graphite: #9AA0AA;
    --brand: #9DB8DA; --mist: #252C37; --rule: #2C323C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14171C; --surface: #1B1F26; --ink: #E9E6DD; --graphite: #9AA0AA;
  --brand: #9DB8DA; --mist: #252C37; --rule: #2C323C;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--font-ui);
}
a { color: var(--brand); text-underline-offset: 3px; }
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Home */
.hero { padding: 7vh 0 40px; }
.hero h1 {
  font: 400 clamp(40px, 8vw, 68px)/1.05 var(--font-head);
  letter-spacing: -.015em; margin: 0 0 20px; text-wrap: balance;
}
.hero h1 em { color: var(--brand); }
.lede { font-size: 19px; color: var(--graphite); max-width: 34em; margin: 0 0 32px; }
.page-sheet {
  background: var(--surface);
  border: 1px solid var(--rule); border-radius: 14px;
  padding: 28px; display: grid; gap: 12px;
}
.page-sheet label { font-weight: 600; font-size: 15px; }
.signup { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 220px; min-width: 0; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px;
}
.signup input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.signup button {
  font: 600 16px var(--font-ui); color: var(--paper); background: var(--brand);
  border: 0; border-radius: 10px; padding: 12px 20px; cursor: pointer;
}
.signup button:disabled { opacity: .6; cursor: default; }
.note { margin: 0; font-size: 14px; color: var(--graphite); min-height: 1.6em; }
.note.ok { color: var(--brand); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.points { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.points h2 { font: 400 22px/1.2 var(--font-head); margin: 0 0 6px; }
.points p { margin: 0; color: var(--graphite); font-size: 16px; }

/* Text pages */
.doc { padding: 4vh 0 24px; }
.doc h1 { font: 400 clamp(34px, 6vw, 48px)/1.1 var(--font-head); margin: 0 0 8px; }
.doc .updated { color: var(--graphite); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font: 400 25px/1.25 var(--font-head); margin: 40px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { max-width: 40em; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc dt { font-weight: 600; margin-top: 18px; }
.doc dd { margin: 4px 0 0; color: var(--graphite); }

/* Layout: reading pages stay 720 px; product pages use .wide */
.wrap.wide { max-width: 1120px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 2; }

/* Header */
.site-head { padding: 24px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mark { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.mark svg { width: 42px; height: 42px; color: var(--brand); --bg: var(--paper); }
.mark span { font: italic 300 30px/1 var(--font-head); letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; }
.button {
  display: inline-block; font: 600 16px/1 var(--font-ui); color: var(--paper); background: var(--brand);
  border-radius: 10px; padding: 14px 20px; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.site-nav .button { color: var(--paper); font-size: 15px; padding: 10px 16px; text-decoration: none; }
.button.quiet { background: none; color: var(--brand); box-shadow: inset 0 0 0 1px var(--rule); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-size: 15px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 10px; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 3; min-width: 220px;
  display: grid; gap: 2px; padding: 10px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 8px 30px rgb(0 0 0 / .08);
}
.menu nav a { color: var(--ink); text-decoration: none; padding: 9px 10px; border-radius: 8px; }
.menu nav a:hover { background: var(--mist); }
@media (max-width: 860px) { .site-nav { display: none; } .menu { display: block; } }

/* Footer */
.site-foot { margin-top: auto; padding: 56px 0 32px; font-size: 14px; color: var(--graphite); }
.site-foot .cols { display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(4, 1fr); border-top: 1px solid var(--rule); padding-top: 32px; }
.site-foot h2 { font: 600 13px/1.2 var(--font-ui); color: var(--ink); margin: 0 0 10px; letter-spacing: .02em; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--graphite); text-decoration: none; }
.site-foot a:hover { color: var(--brand); text-decoration: underline; }
.site-foot .brand-line { font: italic 400 19px/1.35 var(--font-head); color: var(--ink); margin: 0 0 8px; max-width: 14em; }
.site-foot .legal { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 860px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > :first-child { grid-column: 1 / -1; } }

/* Home hero, two columns on wide screens */
.hero-grid { display: grid; gap: 48px; grid-template-columns: 1.05fr .95fr; align-items: center; padding: 4vh 0 24px; }
.hero-grid .hero { padding: 0; }
.hero-art img { width: 100%; height: auto; display: block; transform: rotate(1.5deg); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 420px; margin: 0 auto; } }
.flourish { display: block; width: min(320px, 70%); height: auto; margin: -6px 0 24px; color: var(--brand); }
.flourish path { stroke-dasharray: 420; stroke-dashoffset: 420; animation: write 1.6s .3s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes write { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .flourish path { animation: none; stroke-dashoffset: 0; } }

/* Inner page heading */
.page-head { padding: 6vh 0 24px; max-width: 760px; }
.eyebrow { font: 600 13px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 0 0 14px; }
.page-head h1 { font: 400 clamp(38px, 6.5vw, 60px)/1.06 var(--font-head); letter-spacing: -.015em; margin: 0 0 18px; text-wrap: balance; }
.page-head h1 em, .section h2 em { color: var(--brand); }

/* Sections */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section > h2, .section-head h2 { font: 400 clamp(30px, 4.5vw, 42px)/1.12 var(--font-head); letter-spacing: -.01em; margin: 0 0 12px; text-wrap: balance; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--graphite); margin: 0; font-size: 18px; }
.figure { margin: 0; }
.figure img { width: 100%; height: auto; display: block; }
.figure figcaption { font-size: 14px; color: var(--graphite); margin-top: 10px; }
.figure.wide-art { margin: 8px 0 0; }

/* A feature: text beside a drawing, alternating sides */
.feature { display: grid; gap: 48px; grid-template-columns: 1fr 1.1fr; align-items: center; padding: 40px 0; }
.feature.flip > :first-child { order: 2; }
.feature h2, .feature h3 { font: 400 clamp(28px, 3.8vw, 36px)/1.15 var(--font-head); margin: 0 0 12px; text-wrap: balance; }
.feature p { color: var(--graphite); margin: 0 0 12px; }
.feature ul { padding-left: 20px; color: var(--graphite); margin: 8px 0 0; }
.feature li { margin: 6px 0; }
.feature .more { font-weight: 600; text-decoration: none; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip > :first-child { order: 0; } }

/* Use-case tiles and small cards */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; }
.tile h3 { font: 400 23px/1.2 var(--font-head); margin: 0 0 8px; }
.tile p { margin: 0 0 14px; color: var(--graphite); font-size: 16px; }
.tile a { margin-top: auto; font-weight: 600; text-decoration: none; }
.tile a::after { content: " →"; }
.tile img { width: 100%; height: auto; margin: 0 0 14px; border-radius: 8px; }

/* Promise list (privacy) */
.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.promises li { border-top: 2px solid var(--brand); padding-top: 14px; }
.promises strong { display: block; font: 400 22px/1.25 var(--font-head); margin-bottom: 6px; font-weight: 400; }
.promises span { color: var(--graphite); font-size: 16px; }

/* Pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; }
.plan.featured { box-shadow: inset 0 0 0 2px var(--brand); border-color: transparent; }
.plan h2 { font: 400 30px/1.1 var(--font-head); margin: 0 0 6px; }
.plan .price { font: 400 22px/1.3 var(--font-head); color: var(--brand); margin: 0 0 14px; }
.plan > p { color: var(--graphite); margin: 0 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.plan .button { margin-top: auto; text-align: center; }
.compare { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.compare thead th { font-size: 14px; color: var(--graphite); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.yes::before { content: "✓"; color: var(--brand); font-weight: 700; }
.no::before { content: "–"; color: var(--graphite); }
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font: 400 24px/1 var(--font-ui); color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--graphite); }

/* Templates grid */
.templates { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.templates img { width: 100%; height: auto; display: block; }
.templates h3 { font: 400 20px/1.2 var(--font-head); margin: 10px 0 2px; }
.templates p { margin: 0; color: var(--graphite); font-size: 15px; }

/* Guide */
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.guide-nav a { display: inline-block; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 15px; }
.doc dl.guide dt { font-weight: 600; }
kbd { font: 500 .9em var(--font-ui); background: var(--mist); border-radius: 5px; padding: 1px 6px; }

/* Closing call to action */
.cta { text-align: center; padding: 64px 24px; margin: 24px 0 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 22px; }
.cta h2 { font: 400 clamp(30px, 4.5vw, 42px)/1.12 var(--font-head); margin: 0 0 10px; }
.cta p { color: var(--graphite); margin: 0 auto 24px; max-width: 32em; }
.cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Press */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--graphite); }
.downloads { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.downloads img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--rule); background: var(--surface); }
.downloads a { font-weight: 600; text-decoration: none; }
.note-small { font-size: 14px; color: var(--graphite); }
.feature.solo { grid-template-columns: 1fr; max-width: 760px; }
.doc h4 { font-size: 17px; margin: 22px 0 6px; }

/* Devices: real screenshots (of a made-up Library) in plain drawn outlines */
.device { margin: 0; position: relative; }
.device img { width: 100%; height: auto; display: block; background: var(--paper); }
.device .bezel { background: #23272E; box-shadow: 0 0 0 1px var(--rule), 0 18px 40px -18px rgb(0 0 0 / .35); }
.device.tablet .bezel { padding: 3.4%; border-radius: 7% / 5.2%; }
.device.tablet img { border-radius: 3.6% / 2.7%; }
.device.phone .bezel { padding: 4.6%; border-radius: 17% / 8%; }
.device.phone img { border-radius: 12.5% / 5.8%; }
.device.duo .bezel { padding: 5% 5% 5% 10%; border-radius: 13% / 9%; background: linear-gradient(90deg, #3A4049 0 5%, #23272E 5%); }
.device.duo img { border-radius: 8% / 5.5%; }
.device.laptop .bezel { padding: 2.2% 2.2% 3%; border-radius: 3% 3% 0 0 / 4.6% 4.6% 0 0; }
.device.laptop img { border-radius: .5%; }
.device.laptop .base { width: 112%; margin-left: -6%; aspect-ratio: 100 / 2.6; background: linear-gradient(#D9DCE0, #A7ACB3); border-radius: 0 0 50% 50% / 0 0 100% 100%; box-shadow: 0 0 0 1px var(--rule); }
.device figcaption { font-size: 14px; color: var(--graphite); margin-top: 14px; text-align: center; }
.feature .device.tablet { max-width: 440px; margin: 0 auto; }
.feature .device.laptop, .device-hero .device.laptop { margin: 0 6%; }
.feature .device.phone, .feature .device.duo { max-width: 290px; margin: 0 auto; }
.device-hero { display: flex; gap: 4%; justify-content: center; align-items: flex-end; margin: 8px auto 0; max-width: 940px; }
.device-hero .device.tablet { flex: 0 1 46%; }
.device-hero .device.phone, .device-hero .device.duo { flex: 0 1 25%; }
.device-hero .device.laptop { flex: 1 1 auto; max-width: 940px; }

.showcase .device.laptop { max-width: 940px; margin: 0 auto; }
.device-row { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 0 4%; grid-template-columns: 1.5fr .72fr .8fr; }
.device-row h3 { font: 400 24px/1.2 var(--font-head); margin: 18px 0 4px; }
.device-row p { margin: 0; color: var(--graphite); font-size: 16px; }
.device-row a { font-weight: 600; text-decoration: none; }
.device-row li { min-width: 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.device-row li > .device { align-self: end; }
.device-web { margin-top: 40px; padding: 22px 26px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; justify-content: space-between; }
.device-web h3 { font: 400 24px/1.2 var(--font-head); margin: 0; }
.device-web p { margin: 0; color: var(--graphite); font-size: 16px; flex: 1 1 320px; }
.showcase .made-up { font-size: 14px; color: var(--graphite); text-align: center; margin: 14px 0 0; }
@media (max-width: 860px) {
  .device-row { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .device-row li:first-child { grid-column: 1 / -1; width: 100%; max-width: 480px; justify-self: center; }
}

/* Home: the scrap of paper you can write on (pad.js, built from apps/web/src/sitePad.ts) */
.scrap { --scrap-paper: #FFFEFA; --scrap-rule: #DEDACE; display: grid; gap: 12px; transform: rotate(1deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scrap { --scrap-paper: #E4E0D6; --scrap-rule: #C9C4B8; } }
:root[data-theme="dark"] .scrap { --scrap-paper: #E4E0D6; --scrap-rule: #C9C4B8; }
.scrap-sheet {
  position: relative; aspect-ratio: 520 / 380; width: 100%; border-radius: 4px; overflow: hidden;
  background: var(--scrap-paper); box-shadow: 0 0 0 1px var(--rule), 0 22px 40px -24px rgb(0 0 0 / .35);
  touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none;
}
.scrap-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrap-tools { display: flex; align-items: center; gap: 6px; transform: rotate(-1deg); }
.scrap-pen {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 50%;
}
.scrap-pen[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--brand); border-color: transparent; }
.scrap-pen .dot { position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--surface); }
.dot-0 { background: #2B4A6F; } .dot-1 { background: #C0392B; } .dot-2 { background: #F4D03F; } .dot-3 { background: #2F6FDE; }
.scrap-clear { margin-left: auto; font: 500 14px var(--font-ui); color: var(--brand); background: none; border: 1px solid var(--rule); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.scrap-note { margin: 0; font: italic 400 17px/1.4 var(--font-head); color: var(--graphite); min-height: 2.8em; transform: rotate(-1deg); }
.scrap :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 860px) { .scrap { transform: none; max-width: 560px; width: 100%; margin: 0 auto; } .scrap-tools, .scrap-note { transform: none; } }

/* Home: a quiet row of facts under the hero */
.facts-row { list-style: none; padding: 18px 0 0; margin: 24px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--graphite); font-size: 15px; }
.facts-row li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin: 0 10px 2px 0; }

/* Tiles that lead with a screenshot, cropped to its top */
.tiles.shots img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border: 1px solid var(--rule); background: var(--paper); }

/* The small stuff: a skimmable grid of one-liners */
.small-stuff { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 22px 32px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.small-stuff strong { display: block; font: 400 21px/1.25 var(--font-head); margin-bottom: 4px; }
.small-stuff span { color: var(--graphite); font-size: 16px; }
.more { font-weight: 600; text-decoration: none; }

/* Features: a row of jump links under the heading */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.jump a { padding: 6px 13px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--ink); background: var(--surface); }
.jump a:hover { border-color: var(--brand); color: var(--brand); }
[id] { scroll-margin-top: 24px; }

/* Loops: short silent videos of the app, played by loops.js while on screen. The page in them
   stays paper in dark mode too, as it does in the app. */
.loop video { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--rule);
  background: #F6F4EE; box-shadow: 0 8px 30px rgb(0 0 0 / .08); }
/* A screenshot without a drawn device round it: the open Duo, which no outline fits. */
.figure.screen img { border-radius: 18px; border: 1px solid var(--rule); box-shadow: 0 8px 30px rgb(0 0 0 / .08); }
.figure.screen.narrow { max-width: 380px; justify-self: center; }
