/* Home page */

.cover { padding: 1.5rem 0 8rem; overflow: hidden; }
.cover-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-right: clamp(34px, 9vw, 130px); }
.cover-top a:not(.label) { color: var(--cover-ink-soft); font-size: 1rem; text-decoration-color: rgba(214,196,166,0.45); }
.cover-top a:not(.label):hover { color: var(--cover-ink); text-decoration-color: currentColor; }

.cover-body { max-width: 52rem; padding: clamp(3rem, 9vw, 6rem) clamp(34px, 9vw, 0px) 0 0; }
.cover h1 {
  margin: 0 0 1.25rem;
  font-weight: 500;
  font-size: clamp(2.7rem, 7.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cover h1 em { display: block; font-style: normal; font-weight: 400; color: var(--cover-ink-soft); }
.cover-sub { margin: 0 0 2rem; max-width: 33rem; font-size: 1.2rem; color: var(--cover-ink-soft); text-wrap: pretty; }

.slip {
  display: flex; align-items: stretch; gap: 0.5rem;
  max-width: 36rem;
  padding: 0.4rem;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: box-shadow 0.2s var(--ease-out);
}
.slip:focus-within { box-shadow: 0 0 0 3px var(--green-on-cover), 0 6px 18px rgba(0,0,0,0.35); }
.slip input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  padding: 0.7rem 0.4rem 0.7rem 1rem;
  font: 400 1rem/1.2 var(--mono);
  color: var(--ink);
}
.slip input::placeholder { color: var(--ink-faint); }
.slip input:focus { outline: none; }
.slip input:disabled { opacity: 0.6; }
.cover-note { margin: 0.85rem 0 0 1.1rem; font-size: 0.98rem; color: var(--cover-ink-soft); }
.cover-apps { margin: 0.6rem 0 0 1.1rem; font: italic 400 1.12rem/1.3 var(--serif); transform: rotate(-1.2deg); transform-origin: left center; }
.cover-apps a { color: var(--green-on-cover); text-decoration: underline wavy rgba(127,209,160,0.45); text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
.cover-apps a:hover { text-decoration-color: currentColor; }
.cover-apps span { display: inline-block; transition: transform 0.2s var(--ease-out); }
.cover-apps a:hover span { transform: translateY(2px); }

/* ── The clipped page (converter output) ── */
.desk { position: relative; margin-top: -5.25rem; padding: 0 0 4.5rem; }
.clip {
  position: relative;
  max-width: 50rem;
  margin-inline: auto;
  padding: 1.6rem clamp(1.1rem, 4vw, 3rem) 1.4rem clamp(1.3rem, 5vw, 4rem);
  border-radius: 3px 10px 10px 3px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.12),
    0 18px 40px -14px rgba(20,12,5,0.6),
    5px 2px 0 -1px var(--paper-edge),
    9px 4px 0 -2px #ddd0b4;
}
.clip::before {
  content: "";
  position: absolute; top: -10px; left: 1.1rem;
  width: 14px; height: 72px;
  background: var(--green);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
}
.clip-head { position: relative; min-height: 4.6rem; padding-right: 9rem; }
.clip-file { margin: 0; font: 500 0.95rem/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.clip-meta { margin: 0.2rem 0 0; font: 400 0.82rem/1.3 var(--mono); color: var(--ink-faint); }

.stamp {
  position: absolute; top: -0.2rem; right: 0;
  display: grid; justify-items: center; gap: 0.1rem;
  padding: 0.35rem 0.7rem 0.4rem;
  border: 2px solid currentColor; border-radius: 6px;
  outline: 1px solid currentColor; outline-offset: 2px;
  color: var(--stamp);
  font: 500 0.7rem/1.1 var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  transform: rotate(-7deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}
.stamp strong { font-size: 1.02rem; letter-spacing: 0.06em; font-weight: 500; }
.stamp.is-thunk { animation: thunk 0.6s var(--ease-out); }
@keyframes thunk {
  0% { transform: rotate(-13deg) scale(1.7); opacity: 0; filter: blur(4px); }
  55% { transform: rotate(-6deg) scale(0.95); opacity: 0.95; filter: blur(0); }
  100% { transform: rotate(-7deg) scale(1); opacity: 0.85; }
}

.clip-body {
  margin-top: 0.75rem;
  max-height: 34rem; overflow: auto;
  font: 400 0.9rem/1.7 var(--mono);
  color: var(--ink);
  scrollbar-color: #bfae8f transparent;
}
.md-frontmatter { color: var(--ink-soft); margin-bottom: 1rem; }
.md-fm-delim { color: var(--ink-faint); }
.md-fm-key { color: var(--green); }
.md-fm-val { color: var(--ink); overflow-wrap: anywhere; }
.md-h1 { font: 600 clamp(1.5rem, 3.4vw, 2rem)/1.15 var(--serif); letter-spacing: -0.015em; margin: 0 0 0.6rem; text-wrap: balance; }
.md-p { font: 400 1.1rem/1.6 var(--serif); max-width: 62ch; margin: 0; }
.md-bold { font-weight: 600; }
.md-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.md-status { margin: 0; font: italic 400 1.15rem/1.5 var(--serif); color: var(--ink-soft); }
.convert-upsell { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--rule); font: 400 1.02rem/1.5 var(--serif); color: var(--ink-soft); }
.convert-upsell p { margin: 0 0 0.5rem; }
.upsell-link { color: var(--green); font-weight: 600; }

.clip-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  margin-top: 1.1rem; padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}
.clip-foot .hint { margin: 0; font-size: 1rem; font-style: italic; color: var(--ink-soft); }
.actions { display: flex; gap: 0.5rem; }
.actions[hidden] { display: none; }
.act {
  border: 1px solid var(--ink-soft); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 0.5rem 1.1rem;
  font: 600 0.98rem/1 var(--serif); cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.act:hover { background: var(--ink); color: var(--paper); }
.act--primary { background: var(--green); border-color: var(--green); color: #fff; }
.act--primary:hover { background: var(--green-press); color: #fff; }

/* ── Spread: how it goes ── */
.spread { padding: 4.5rem 0 5rem; border-top: 1px solid var(--paper-edge); }
.spread .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.spread h2, .notes h2 {
  margin: 0 0 1.75rem;
  font-weight: 500; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 4.75rem 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.log li:last-child { border-bottom: 1px solid var(--rule); }
.log time { font: 400 0.8rem/2.1 var(--mono); color: var(--ink-faint); }
.log h3 { margin: 0 0 0.2rem; font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.log p { margin: 0; color: var(--ink-soft); max-width: 44ch; }

.taped { position: relative; margin: 1rem auto 0; max-width: 16.5rem; transform: rotate(2.2deg); }
.taped img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 14px 28px -10px rgba(0,0,0,0.35); }
.taped::before, .taped::after {
  content: ""; position: absolute; z-index: 1;
  width: 6.5rem; height: 1.6rem;
  background: rgba(233, 219, 180, 0.8);
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.taped::before { top: -0.6rem; left: -1.6rem; transform: rotate(-34deg); }
.taped::after { bottom: 2.6rem; right: -1.8rem; transform: rotate(-30deg); }
.taped figcaption { margin-top: 1.1rem; text-align: center; font-style: italic; font-size: 1rem; color: var(--ink-soft); }

/* ── Notes ── */
.notes { padding: 4.5rem 0 5rem; border-top: 1px solid var(--paper-edge); }
.notes .wrap { max-width: 50rem; }
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li { padding: 1rem 0 1.05rem; border-bottom: 1px solid var(--rule); max-width: 68ch; }
.ruled li:first-child { border-top: 1px solid var(--rule); }
.ruled strong { font-weight: 600; }
.ruled span { color: var(--ink-soft); }
.ruled code { font: 400 0.86em var(--mono); background: rgba(92,70,45,0.08); padding: 0.05em 0.35em; border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .cover { padding-bottom: 6.5rem; }
  .cover-top a:not(.label) { display: none; }
  .cover-body { padding-top: 2.75rem; }
  .cover-sub { font-size: 1.1rem; margin-bottom: 1.5rem; }
  .slip { flex-direction: column; border-radius: 22px; padding: 0.4rem; }
  .slip input { padding: 0.85rem 0.9rem; }
  .slip .pill { width: 100%; border-radius: 16px; padding: 0.95rem; }
  .cover-note { margin-left: 0.25rem; }
  .desk { margin-top: -4rem; }
  .desk .wrap { width: calc(100% - 1.25rem); }
  .clip { padding: 1.3rem 1rem 1.1rem 1.35rem; }
  .clip::before { height: 52px; }
  .clip-head { padding-right: 0; min-height: 0; display: flex; flex-direction: column-reverse; gap: 0.9rem; }
  .stamp { position: static; justify-self: start; align-self: flex-start; margin: 0.2rem 0 0 0.2rem; }
  .clip-body { max-height: 26rem; }
  .spread .wrap { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 0.2rem; }
  .taped { max-width: 14rem; }
  .stores .store { flex: 1 1 9.5rem; min-width: 0; }
}
