/* The homepage only. Shared chrome is in notebook.css, the sheet in sheet.css. */

/* the book */
.doodle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; border-radius: inherit; }
.drawing .doodle { pointer-events: auto; cursor: crosshair; touch-action: none; }
/* edge tabs: stay in view while the page scrolls; the current section's tab pulls out */
/* cover */
h1 { position: relative; margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(4.4rem, 13vw, 12.5rem); line-height: 0.84; letter-spacing: -0.045em; }
h1 .hi { color: var(--accent); position: relative; font-style: italic; padding-right: 0.06em; }
h1 .hi svg { position: absolute; left: -12%; top: 6%; width: 130%; height: 96%; overflow: visible; }
h1 .hi path { fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 620; stroke-dashoffset: 620; animation: ink 1.3s 0.5s var(--ease) forwards; }
@keyframes ink { to { stroke-dashoffset: 0; } }
.hero-name h1 { width: fit-content; max-width: 100%; }
.say { position: absolute; left: 76%; top: -1.4rem; transform: rotate(-5deg); white-space: nowrap; font-size: clamp(1.2rem, 2.4vw, 1.9rem); letter-spacing: 0; }
.lede em { font-style: italic; }

/* ---------- the cover ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: calc(100svh - var(--nav) - 3.4rem); padding: clamp(1.6rem, 3vw, 2.4rem) 0 0; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--rule-strong); }
.date { margin: 0; color: var(--ink-3); }
.hero-top .status { margin: 0; }
.hero-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(15.5rem, 0.78fr); gap: clamp(1.75rem, 4.5vw, 4.5rem); align-items: center; padding: clamp(1.75rem, 4vw, 3.5rem) 0; }
.lede { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.3; letter-spacing: -0.01em; margin: 1.6rem 0 1.5rem; max-width: 33rem; }
.lede em { font-style: italic; }
.actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.note-short { display: inline-flex; align-items: flex-end; gap: 0.1rem; margin-left: 0.6rem; transform: rotate(-3deg); font-size: 1.45rem; white-space: nowrap; }
.note-short svg { width: 2.4rem; height: 1.6rem; margin-bottom: 0.35rem; fill: none; stroke: var(--pen); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* a measurement under the name, like the inspector in a design tool; js fills in the real width */
.redline { position: relative; height: 1px; margin: 2.3rem 0 0; width: var(--w, 70%); background: var(--pen); opacity: 0.85; }
.redline::before, .redline::after { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--pen); }
.redline::before { left: 0; }
.redline::after { right: 0; }
.redline span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0 0.6rem; background: var(--paper); color: var(--pen); font: 500 0.62rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }

/* print crop marks at the corners of the cover */
.crop { position: absolute; width: 14px; height: 14px; border: 0 solid rgba(12, 18, 34, 0.45); pointer-events: none; }
.crop--tl { top: 0; left: -10px; border-top-width: 1px; border-left-width: 1px; }
.crop--tr { top: 0; right: -10px; border-top-width: 1px; border-right-width: 1px; }
.crop--bl { bottom: 0; left: -10px; border-bottom-width: 1px; border-left-width: 1px; }
.crop--br { bottom: 0; right: -10px; border-bottom-width: 1px; border-right-width: 1px; }

/* contents card and the page's own style kit */
.hero-side { display: flex; flex-direction: column; gap: 1.9rem; }
.toc { position: relative; background: #fff; padding: 1.7rem 1.4rem 1.2rem; transform: rotate(1.2deg); box-shadow: 0 1px 2px rgba(12, 18, 34, 0.12), 0 22px 36px -22px rgba(12, 18, 34, 0.45); background-image: linear-gradient(transparent calc(100% - 1px), rgba(38, 70, 245, 0.1) 1px); background-size: 100% 1.9rem; }
.toc::before { content: ""; position: absolute; top: -0.75rem; left: 50%; width: 6rem; height: 1.6rem; margin-left: -3rem; background: var(--tape); box-shadow: 0 1px 2px rgba(12, 18, 34, 0.1); transform: rotate(-3deg); }
.toc-h { margin: 0 0 0.5rem; color: var(--pen); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.3rem 0; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.toc a i { flex: 1; border-bottom: 2px dotted rgba(12, 18, 34, 0.3); transform: translateY(-0.25em); }
.toc a b { font: 500 0.72rem var(--mono); letter-spacing: 0.07em; color: var(--ink-3); }
.toc a:hover span, .toc a:focus-visible span { background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); }
.kit { position: relative; align-self: flex-start; width: min(100%, 17.5rem); background: #fff; padding: 1rem 1rem 0.8rem; transform: rotate(-1.6deg); box-shadow: 0 1px 2px rgba(12, 18, 34, 0.12), 0 18px 30px -20px rgba(12, 18, 34, 0.4); }
.kit::before { content: ""; position: absolute; top: -0.6rem; right: -1.1rem; width: 4.4rem; height: 1.3rem; background: var(--tape); box-shadow: 0 1px 2px rgba(12, 18, 34, 0.1); transform: rotate(35deg); }
.kit-type { display: flex; align-items: baseline; justify-content: space-between; font-size: 2.6rem; line-height: 1; padding-bottom: 0.6rem; border-bottom: 1px dashed var(--rule-strong); }
.kit-chips { display: flex; gap: 0.35rem; margin: 0.7rem 0 0.4rem; }
.kit-chips i { position: relative; flex: 1; height: 2rem; border-radius: 3px; }
.kit-chips b { position: absolute; left: 0; top: calc(100% + 0.2rem); font: 500 0.45rem var(--mono); letter-spacing: 0.02em; color: var(--ink-3); }
.kit .hand { display: block; margin-top: 1.1rem; font-size: 1.3rem; transform: rotate(-1.5deg); transform-origin: left; }
.facts .gridnote { margin-left: auto; color: var(--ink-3); }

/* entries */
.entry { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(1.5rem, 4.5vw, 4rem); align-items: center; padding: clamp(1.75rem, 4vw, 3rem) 0; border-top: 1px dashed rgba(12, 18, 34, 0.25); }
.entry:nth-of-type(even) .flip { order: 2; }
.entry-n { font-family: var(--hand); color: var(--pen); font-size: 2.6rem; line-height: 1; display: inline-block; transform: rotate(-6deg); margin-right: 0.3rem; }
.entry h3 { margin: 0.2rem 0 1.1rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.5vw, 2.9rem); line-height: 1.02; letter-spacing: -0.03em; }
.q { color: var(--ink-3); }
.opts { list-style: none; margin: 0 0 1rem; padding: 0; }
.opts li { padding: 0.15rem 0; }
/* options: the pen crosses each one out, then the reason is written beside it */
.opt { cursor: pointer; }
.opt-t { font-size: 1.05rem; color: var(--ink-3); background: linear-gradient(var(--pen), var(--pen)) no-repeat 0 56% / 100% 2px; padding: 0 0.15em; margin-left: -0.15em; }
.why { display: flex; align-items: flex-start; gap: 0.35rem; font-size: 1.4rem; padding: 0.2rem 0 0.55rem 0.9rem; }
.arr { flex: none; width: 1.7rem; height: 1.35rem; fill: none; stroke: var(--pen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 64; }
.w { display: inline-block; white-space: pre; }
.armed .opt-t { background-size: 0 2px; color: var(--ink); transition: background-size 0.45s cubic-bezier(0.3, 0, 0.2, 1), color 0.3s 0.3s; }
.armed .arr { stroke-dashoffset: 64; transition: stroke-dashoffset 0.25s 0.45s; }
.armed .w { opacity: 0; clip-path: inset(-0.3em 100% -0.3em 0); transition: clip-path 0.12s linear, opacity 0.01s; transition-delay: calc(0.7s + var(--i) * 50ms); }
.armed .opt.on .opt-t { background-size: 100% 2px; color: var(--ink-3); }
.armed .opt.on .arr { stroke-dashoffset: 0; }
.armed .opt.on .w { opacity: 1; clip-path: inset(-0.3em -0.2em -0.3em 0); }
.armed .opt:not(.on) .opt-t, .armed .opt:not(.on) .arr, .armed .opt:not(.on) .w { transition: none; }
.armed .kept { opacity: 0.22; transition: opacity 0.4s; }
.armed .kept svg { stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset 0.3s 0.1s; }
.armed.done .kept { opacity: 1; }
.armed.done .kept svg { stroke-dashoffset: 0; }
.kept { margin: 0 0 1rem; padding-left: 1.9rem; position: relative; font-size: 1.05rem; color: var(--ink); }
.kept svg { position: absolute; left: 0; top: 0.15rem; width: 1.4rem; height: 1.4rem; fill: none; stroke: #23a35a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.small { color: var(--ink-3); margin: 1.1rem 0 0.9rem; line-height: 1.7; }
.rd { position: relative; display: inline-block; white-space: nowrap; }
.rd > span { color: transparent; user-select: none; transition: color 0.3s 0.35s; }
.rd::after { content: ""; position: absolute; inset: 0.12em -0.15em; background: var(--ink); border-radius: 2px; transform: rotate(-0.7deg); transform-origin: right center; transition: transform 0.7s var(--ease); }
.rd.is-open > span { color: var(--ink); font-weight: 600; user-select: auto; }
.rd.is-open::after { transform: rotate(-0.7deg) scaleX(0); }
.go { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; font-size: 0.95rem; border-bottom: 1.5px solid var(--pen); padding-bottom: 0.1rem; text-decoration: none; }
.open-note { font-size: 1.3rem; margin-left: 0.6rem; color: #23a35a; display: inline-block; transform: rotate(-2deg); }
.lock { width: 0.9em; height: 0.9em; fill: none; stroke: currentColor; stroke-width: 1.3; }
.pen-note { display: block; margin-top: 1.1rem; transform: rotate(-1.5deg); transform-origin: left; max-width: 26rem; }
/* flip card */
.flip { position: relative; perspective: 1400px; }
.flip-in { position: relative; aspect-ratio: 16 / 10.4; transform-style: preserve-3d; transition: transform 0.75s var(--ease); }
.flip.is-flipped .flip-in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; padding: 0.7rem; box-shadow: 0 1px 2px rgba(12, 18, 34, 0.12), 0 22px 36px -22px rgba(12, 18, 34, 0.45); }
.face--back { transform: rotateY(180deg); }
.face svg { width: 100%; height: 100%; display: block; }
.face img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: left top; }
.face .tag { position: absolute; left: 1.2rem; bottom: 1.1rem; background: rgba(255, 255, 255, 0.9); padding: 0.15rem 0.45rem; color: var(--ink-3); }
.flip::before, .flip::after { content: ""; position: absolute; z-index: 2; width: 5.5rem; height: 1.5rem; background: var(--tape); box-shadow: 0 1px 2px rgba(12, 18, 34, 0.1); }
.flip::before { top: -0.7rem; left: 1.5rem; transform: rotate(-4deg); }
.flip::after { top: -0.6rem; right: 1.5rem; transform: rotate(3deg); }
.entry:nth-of-type(odd) .flip { transform: rotate(-0.8deg); }
.entry:nth-of-type(even) .flip { transform: rotate(0.9deg); }
.flip-btn { position: absolute; right: 0.4rem; bottom: -1.2rem; z-index: 3; background: var(--hl); border: 0; border-radius: 999px; padding: 0.35rem 0.9rem 0.45rem; cursor: pointer; font-family: var(--hand); font-size: 1.35rem; color: var(--ink); box-shadow: 0 6px 12px -6px rgba(12, 18, 34, 0.5); transform: rotate(-3deg); transition: transform 0.25s var(--ease); }
.frame { position: absolute; left: 0; bottom: -1.75rem; color: var(--ink-3); font-size: 0.62rem; pointer-events: none; }
.flip-btn:hover { transform: rotate(2deg) scale(1.06); }
.sk { fill: none; stroke: #0c1222; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: url(#rough); }
.sk-pen { stroke: #d8432f; }
.sk-t { font-family: "Caveat", cursive; font-size: 15px; fill: #0c1222; stroke: none; }
.sk-t.r { fill: #d8432f; }
.ui-t { font-family: "Figtree", sans-serif; font-size: 8px; fill: #0c1222; }
/* more work */
.list { border-top: 1px solid var(--ink); }
.list > * { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.list > * > div { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.3fr); gap: 1rem; align-items: baseline; }
.list a { background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 100% / 0 100%; transition: background-size 0.4s var(--ease); }
.list a:hover { background-size: 100% 100%; }
.list .n { font-family: var(--hand); color: var(--pen); font-size: 1.6rem; }
.list h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.3rem, 2.1vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15; }
.list p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.list .mono { color: var(--ink-3); white-space: nowrap; }
/* how I work */
/* off the clock */
/* writing */
/* sticky note */
/* pen tools */
.pen-tools { position: fixed; left: 14px; bottom: 14px; z-index: 91; display: flex; gap: 6px; }
.pen-tools button { border: 0; border-radius: 999px; padding: 0.4rem 0.95rem 0.5rem; cursor: pointer; font-family: var(--hand); font-size: 1.3rem; background: #fff; box-shadow: 0 8px 20px -8px rgba(12, 18, 34, 0.5); }
.pen-tools [data-pen][aria-pressed="true"] { background: var(--pen); color: #fff; }
.pen-tools [data-wipe] { display: none; }
.drawing .pen-tools [data-wipe] { display: block; }
/* one-minute page */
dialog { border: 0; padding: 0; background: transparent; max-width: min(46rem, calc(100vw - 1.5rem)); width: 100%; overflow: visible; }
dialog::backdrop { background: rgba(12, 18, 34, 0.55); backdrop-filter: blur(3px); }
.torn { background: #fff; padding: clamp(1.4rem, 4vw, 2.6rem); transform: rotate(-0.7deg); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.7); background-image: linear-gradient(transparent calc(100% - 1px), rgba(38, 70, 245, 0.14) 1px); background-size: 100% 2rem; clip-path: polygon(0 1.2%, 4% 0, 9% 1.4%, 15% 0.2%, 22% 1.5%, 30% 0, 37% 1.2%, 45% 0.1%, 53% 1.5%, 61% 0, 69% 1.3%, 77% 0.2%, 85% 1.5%, 92% 0, 100% 1.1%, 100% 100%, 0 100%); max-height: calc(100vh - 3rem); overflow: auto; }
.torn h2 { margin: 0.4rem 0 1rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -0.03em; line-height: 1; }
.torn dl { margin: 0; display: grid; grid-template-columns: 8rem 1fr; gap: 0.2rem 1rem; }
.torn dt { color: var(--ink-3); padding-top: 0.35rem; }
.torn dd { margin: 0 0 0.7rem; }
.torn ul { margin: 0; padding: 0; list-style: none; }
.torn li { padding: 0.12rem 0; }
.torn li b { font-weight: 600; }
.torn .row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1rem; }
/* the four entries as pages: pinned on wide screens, swiped sideways on phones */
.pager { display: none; }
.pager-n { margin: 0; }
.pager-n b { display: inline-block; font-weight: 600; border: 2px solid var(--pen); border-radius: 50%; padding: 0 0.38em 0.05em; margin-right: 0.12em; transform: rotate(-5deg); }
.pager-n b.pop { animation: pop 0.5s var(--ease); }
@keyframes pop { 0% { transform: rotate(-5deg) scale(1.6); } 100% { transform: rotate(-5deg) scale(1); } }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; }
.ticks a { display: block; border-radius: 50%; background: var(--paper); border: 2px solid rgba(12, 18, 34, 0.35); transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s; }
.ticks a:hover { border-color: var(--pen); }
.ticks a[aria-current] { border-color: var(--pen); background: var(--pen); transform: scale(1.3); }
.hint { transition: opacity 0.4s; }
.hint-p { display: none; }
.pin--moved .hint { opacity: 0; }
.pager-skip { color: var(--ink-3); text-decoration: none; border-bottom: 1.5px solid var(--pen); }
.pin--on .entry { min-height: 100vh; align-content: center; border-top: 0; padding: 0.5rem 0; }
.pin--on .pager { display: block; position: sticky; top: 0; height: 0; z-index: 4; }
.pin--on .pager-n { position: absolute; right: 0; top: 1.3rem; font-size: 1.9rem; background: rgba(247, 248, 250, 0.92); border-radius: 999px; padding: 0.1rem 0.7rem 0.1rem 0.5rem; }
.pin--on .ticks { position: absolute; left: calc(-1 * clamp(0.6rem, 2vw, 1.75rem)); top: 50vh; transform: translate(-50%, -50%); flex-direction: column; gap: 1.35rem; }
.pin--on .ticks a { width: 1rem; height: 1rem; }
.pin--on .hint { position: absolute; left: 50%; top: 1.45rem; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; pointer-events: none; background: rgba(247, 248, 250, 0.92); padding: 0 0.6rem; }
.pin--on .pager-skip { position: absolute; left: 0; top: 1.7rem; background: rgba(247, 248, 250, 0.92); padding: 0 0.4rem; margin-left: -0.4rem; }
.pin--swipe .pager { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0 0; }
.pin--swipe .pager-n { font-size: 1.7rem; }
.pin--swipe .ticks { gap: 0.6rem; }
.pin--swipe .ticks a { width: 0.75rem; height: 0.75rem; }
.pin--swipe .hint { font-size: 1.4rem; transform: rotate(-2deg); white-space: nowrap; }
.pin--swipe .hint-s { display: none; }
.pin--swipe .hint-p { display: inline; }
.pin--swipe .pager-skip { display: none; }
.pin--swipe .pin-stage { position: relative; display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 1.4rem 0.4rem 3rem; scroll-padding-inline: 0.4rem; scrollbar-width: none; }
.pin--swipe .pin-stage::-webkit-scrollbar { display: none; }
.pin--swipe .entry { flex: 0 0 100%; scroll-snap-align: start; border-top: 0; padding-top: 0.2rem; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } h1 .hi path { stroke-dashoffset: 0; } }
/* shared helpers */
/* "password-protected" hints go away once someone has unlocked (js/home.js sets .is-unlocked) */
@media (max-width: 900px) {
	.hero { min-height: 0; }
	.hero-main, .entry { grid-template-columns: 1fr; }
	.hero-side { display: block; }
	.kit { display: none; }
	.toc { max-width: 22rem; }
	.note-short { display: none; }
	.crop { display: none; }
	.redline { display: none; }
	.entry { gap: 2.4rem; }
	.entry:nth-of-type(even) .flip { order: 0; }
	.list > * { grid-template-columns: 1.8rem minmax(0, 1fr); }
	.list > * > div { grid-template-columns: 1fr; gap: 0.3rem; }
	.list > * > .mono { grid-column: 2; }
	.torn dl { grid-template-columns: 1fr; }
	.pen-tools { bottom: 58px; }
}

