/* darkux: Modern .txt. System fonts only, so nothing extra to download. */
:root {
  --bg: #fafaf7; --text: #16161a; --body: #33333b; --muted: #5d5d66; --rule: #e2e2da; --strong-rule: #16161a;
  --link: #1f3fe0; --panel: #f0f0ea; --mark: #fff0a0; --focus: #1f3fe0;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font: var(--sans); --meta-font: var(--mono); --measure: 40rem; --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #121215; --text: #f2f2f5; --body: #c4c4cc; --muted: #a3a3ad; --rule: #2a2a31; --strong-rule: #ececef;
    --link: #9fb0ff; --panel: #1c1c21; --mark: #5c4d00; --focus: #9fb0ff;
  }
}
:root[data-theme="dark"] {
  --bg: #121215; --text: #f2f2f5; --body: #c4c4cc; --muted: #a3a3ad; --rule: #2a2a31; --strong-rule: #ececef;
  --link: #9fb0ff; --panel: #1c1c21; --mark: #5c4d00; --focus: #9fb0ff;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto; max-width: var(--measure); padding: 2.5rem 1.25rem 4rem;
  background: var(--bg); color: var(--text); font: 1.125rem/1.7 var(--font);
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
img, video { max-width: 100%; height: auto; display: block; }
mark { background: var(--mark); color: inherit; padding: 0 .1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { overflow-x: auto; background: var(--panel); padding: .75rem 1rem; border-radius: var(--radius); }
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mark { font: 500 1.25rem var(--mono); color: var(--text); text-decoration: none; }
.mark span { color: var(--link); }
.mark .glyph { display: inline-block; color: inherit; text-align: center; white-space: pre; }
/* The underscore is a cursor: it blinks three times (on load, and again after each decrypt), then rests. */
.mark .cursor { animation: cursor 1.06s steps(1, end) 3; }
@keyframes cursor { 50% { opacity: 0; } }
.theme {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 22px; background: transparent; color: var(--text); cursor: pointer;
}
.theme[hidden] { display: none; }

main { margin-top: 3rem; }
/* The tagline is the page's headline: one step above a note's headline (1.75rem), the same size as a note page's h1. */
.intro { margin: 0 0 3rem; font-size: 2.25rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
/* "en💩ification": the poo stands in for four letters and is the reader's own emoji font, so nothing
   loads. The word never breaks across lines, and screen readers hear "enshittification". */
.intro .word { white-space: nowrap; }
.intro .poo { font-size: .9em; margin: 0 .04em; }
.quiet { color: var(--muted); font-size: .95em; }
.error { color: #b3261e; }

.day + .day { margin-top: 4.5rem; }
.day h2 {
  margin: 0; padding-bottom: .75rem; border-bottom: 1px solid var(--rule);
  font: 500 .875rem var(--meta-font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.day h2 a { color: inherit; text-decoration: none; }
.day h2 span { color: var(--muted); }
.note { padding: 3rem 0 0; }
.day h2 + .note { padding-top: 2rem; }
.note.full { padding-top: 0; }
.meta { margin: 0 0 .875rem; font: .8125rem/1.5 var(--meta-font); color: var(--muted); }
/* The time and tags are links, but quiet ones: no underline until hovered, so the headline leads. */
.meta a { color: inherit; text-decoration: none; }
.meta a:hover, .meta a:focus-visible { color: var(--text); text-decoration: underline; }
.note h3 { margin: 0 0 .875rem; font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.note h3 a { color: var(--text); text-decoration: none; }
.note h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.note .body { color: var(--body); }
.note .body > :first-child { margin-top: 0; }
.note .body > :last-child { margin-bottom: 0; }
.note .body p { margin: 1rem 0; }
/* Tags take the link colour, so they stand apart from the time and the company, which stay grey. */
.meta .tags a { color: var(--link); }
.meta .tags a:hover { color: var(--text); }

/* Callouts: "> [!update]" in the text. The label is any word; a few get their own look. */
.callout { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--panel); border-radius: var(--radius); }
.callout > :last-child { margin-bottom: 0; }
.callout > p:nth-child(2) { margin-top: 0; }
.callout-label { margin: 0 0 .25rem; font: .75rem var(--meta-font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.callout-label .colon { display: none; }
.callout-update { background: none; border: 1px solid var(--strong-rule); }
.callout-update .callout-label { color: var(--text); }
.callout-quote { background: none; border-radius: 0; border-left: 3px solid var(--strong-rule); padding: .25rem 0 .25rem 1rem; font-style: italic; }
.callout-quote .callout-label { font-style: normal; }
.note .body > .callout:first-child { margin-top: 0; }
.note .body > .callout:last-child { margin-bottom: 0; }

/* Links on a line of their own: copied files and cards. Everything is served by darkux itself. */
.via { margin-top: .375rem; font: .8125rem var(--meta-font); color: var(--muted); }
.via a { color: inherit; }
.embed { display: flex; margin: 1rem 0; border: 1px solid var(--rule); border-radius: var(--radius); color: var(--text); text-decoration: none; overflow: hidden; background: var(--bg); }
a.embed:hover { border-color: var(--muted); color: var(--text); }
.embed .card { display: flex; flex-direction: column; gap: .125rem; padding: .75rem .875rem; min-width: 0; font-size: .9375rem; line-height: 1.45; }
.embed .from { font: .8125rem var(--meta-font); color: var(--muted); }
.embed.page .thumb { flex: 0 0 7rem; width: 7rem; height: auto; min-height: 7rem; object-fit: cover; border-right: 1px solid var(--rule); }
.embed.page .desc { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed.watch { flex-direction: column; max-width: 34rem; }
.embed.watch .frame { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel); }
.embed.watch .thumb { width: 100%; height: 100%; object-fit: cover; }
.embed.watch .play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: rgb(250 250 247 / .92); box-shadow: 0 2px 10px rgb(0 0 0 / .25); }
.embed.watch .play::after { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #16161a; }
blockquote.embed.post { display: block; padding: .875rem 1rem; font-style: normal; }
.embed.post p { margin: 0 0 .375rem; }
.embed.post .who span { font: .8125rem var(--meta-font); color: var(--muted); }
.embed.post .text { white-space: pre-line; }
.embed.post .shot { margin: .5rem 0; border-radius: 8px; border: 1px solid var(--rule); }
.embed.post .from { margin: 0; }
@media (max-width: 30rem) { .embed.page { flex-direction: column; } .embed.page .thumb { width: 100%; flex-basis: auto; min-height: 0; aspect-ratio: 1.91 / 1; border-right: 0; border-bottom: 1px solid var(--rule); } }
.snippet { margin: 0; }

/* Feed: one share icon at the end of the meta line. On touch screens it opens the phone's share
   sheet; elsewhere it opens a small menu. Without JavaScript it stays hidden (the time is the link). */
.meta.split { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.share-menu { position: relative; flex: none; }
.share-menu[hidden], .share-menu ul[hidden] { display: none; }
.share-toggle {
  width: 32px; height: 32px; margin: -6px -6px -6px 0; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 16px; background: none; color: var(--muted); cursor: pointer;
}
.share-toggle:hover, .share-toggle[aria-expanded="true"] { background: var(--panel); color: var(--text); }
@media (pointer: coarse) { .share-toggle { width: 44px; height: 44px; margin: -12px -12px -12px 0; border-radius: 22px; } }
.share-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 10rem; margin: 0; padding: .375rem;
  list-style: none; background: var(--bg); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.share-menu li button {
  display: block; width: 100%; min-height: 32px; padding: 0 .625rem; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: .8125rem var(--mono); text-align: left; cursor: pointer;
}
.share-menu li button:hover, .share-menu li button:focus-visible { background: var(--panel); }

/* Note page: share actions as small print under the note. */
.share button {
  min-height: 24px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
}
.share button:hover { color: var(--text); text-decoration-color: currentColor; }

.media { margin: 1rem 0; }
.media img, .media video { border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); }
.media.tall img, .media.tall video { max-height: 70vh; width: auto; margin: 0 auto; border-radius: 18px; }
.media figcaption { margin-top: .375rem; font-size: .875rem; color: var(--muted); }
.media.gif { position: relative; max-width: 28rem; }

.full h1 { margin: .25rem 0 1.5rem; font-size: 2.25rem; line-height: 1.2; letter-spacing: -.01em; }
.share, .replies, .pager { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.share h2, .replies h2 { margin: 0 0 .75rem; font: 500 .875rem var(--meta-font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.share { font: .8125rem var(--mono); color: var(--muted); }
.share .row { gap: .125rem .875rem; margin: .25rem 0; }
.share a { color: var(--muted); }
.share a:hover { color: var(--text); }
.share input { flex: 0 1 36ch; min-width: 0; min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; text-overflow: ellipsis; }
.replies ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.replies .who, .replies .when { font: .875rem var(--mono); }
.replies .when { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; font: .9375rem var(--mono); }
.older { margin: 1.5rem 0 0; font-family: var(--mono); font-size: .9375rem; }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.button, button.button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; border: 0; border-radius: 22px;
  background: var(--text); color: var(--bg); font: .9375rem var(--mono); text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--bg); opacity: .88; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--rule); }

.foot { margin-top: 4rem; font: .875rem/1.7 var(--mono); color: var(--muted); }
.foot p { margin: .375rem 0; }
.foot b { color: var(--text); font-weight: 500; }
/* Search: one field with its label inside and a small icon button at its right end. Below it,
   the most used tags as links, in the same blue as the tags on a note. */
.search .field { position: relative; display: block; }
.search input[type="search"] {
  width: 100%; min-height: 44px; padding: 0 3.25rem 0 .875rem; border: 1px solid var(--rule); border-radius: 22px;
  background: var(--bg); color: var(--text); font: 1rem var(--mono);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search button {
  position: absolute; right: 0; top: 0; width: 48px; height: 44px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0; border: 0; border-radius: 22px; background: none; color: var(--muted); cursor: pointer;
}
.search button:hover { color: var(--text); }
.foot .pick { margin: .75rem 0 0; }
.pick a[rel="tag"], .taglist a { color: var(--link); text-decoration: none; }
.pick a[rel="tag"]:hover, .taglist a:hover { color: var(--text); text-decoration: underline; }
.pick .all { color: inherit; }
/* The page with every tag: one per line, the number of notes on the right. */
.taglist { margin: 0; padding: 0; list-style: none; font: .9375rem/1.5 var(--meta-font); }
.taglist li { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--rule); }
.taglist span { color: var(--muted); white-space: nowrap; }
/* Send a fail: one line between two rules. The poo is the reader's own emoji font: nothing loads. */
.send { margin: 2rem 0; padding: 1.25rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--font); }
.send p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.125rem; font-size: 1.125rem; color: var(--text); }
.send .poo { font-size: 1.375rem; line-height: 1; }
.send a { font: 1rem var(--mono); }
.page h1 { font-size: 2rem; line-height: 1.2; }

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; padding-top: 1.5rem; }
  .intro { font-size: 1.75rem; }
  .note { padding-top: 2.25rem; }
  .note h3 { font-size: 1.5rem; }
  .full h1 { font-size: 1.75rem; }
}
@media print {
  .top, .foot, .actions, .share, .share-menu, .pager { display: none; }
  body { max-width: none; color: #000; background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
