/* Pablo News — "Stickies": a Mac OS 8/9 desk. Loaded after app.css by the
   public, admin and error layouts; every rule is scoped to body.os9 so app.css
   keeps working untouched for the embed.

   Values are measured from Mac OS 8/9 Platinum (the classicy Platinum
   appearance and platinum.css): system greys #eee … #202020, the default
   lavender highlight #ccccff / #9999ff / #6666cc / #333399, title-bar stripes
   of 1px white over 1px #787878, a 19-20px title bar, 12px control boxes, 1px
   black outlines with a 1px drop shadow. The desk colour is the Mac OS 8
   default, flat (no pattern). Chicago-style type is ChicagoFLF (public domain,
   self-hosted woff2); reading text is Geneva where it exists, Verdana elsewhere.

   Constraint brief (per screen, most to least important):
   - Timeline: the note text > when / where it went > share. One primary
     action per page (Older Notes). The note colour is a secondary signal: the
     link card or media is always visible in the note too.
   - Note page: the note > its responses > from the web > back.
   - Admin notes list: find a note and see if its copies went out > edit/view >
     delete. Primary action: New Note (default button ring).
   - Compose: the text > where copies go > Publish (default) > help.
   - Inbox: what came in and replying > like/repost/open > source health and
     notification settings.
   Hierarchy comes from type face (Chicago for chrome, Geneva/Verdana for
   reading), weight and the three text colours #000 / #222 / #555; never from
   colour alone. */

@font-face {
  font-family: 'ChicagoFLF';
  src: url('/font/chicagoflf-latin.woff2') format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
}

body.os9 {
  --sys-01: #eeeeee; --sys-02: #dddddd; --sys-03: #cccccc; --sys-04: #aaaaaa;
  --sys-05: #808080; --sys-06: #393939; --sys-07: #202020;
  --theme-02: #ccccff; --theme-03: #9999ff; --theme-04: #6666cc; --theme-05: #333399;
  --stripe: #787878;
  --desk: #9999cc;               /* Mac OS 9 default desktop, flat */
  --link: #0000cc;
  --text-2: #222222; --text-3: #555555;
  --danger-ink: #a00000;
  /* Stickies colours measured in Mac OS 9 (Infinite Mac). The real yellow's
     dark edge is #ffcc00, a gold this site avoids; an olive yellow stands in. */
  --n-yellow: #ffff99; --n-blue: #99ffff; --n-green: #ccffcc; --n-gray: #eeeeee;
  --e-yellow: #d9d96a; --e-blue: #00ccff; --e-green: #66ff66; --e-gray: #aaaaaa;
  --ui: 'ChicagoFLF', Charcoal, Chicago, Verdana, sans-serif;
  --text: Geneva, Verdana, 'DejaVu Sans', sans-serif;
  --code: Monaco, ui-monospace, Menlo, Consolas, monospace;

  margin: 0; min-height: 100vh;
  background: var(--desk); color: #000;
  font: 14px/1.5 var(--text);
  font-variant-numeric: normal; letter-spacing: 0;
  -webkit-font-smoothing: auto; text-rendering: auto;
}
/* The rounded top corners of a CRT-era Mac screen. */
body.os9::before, body.os9::after {
  content: ''; position: fixed; top: 0; z-index: 1001; width: 8px; height: 8px; pointer-events: none;
  background: radial-gradient(circle at var(--cx) 8px, transparent 7.5px, #000 8px);
}
body.os9::before { left: 0; --cx: 8px; }
body.os9::after { right: 0; --cx: 0px; }

.os9 ::selection { background: var(--theme-02); color: #000; }
.os9 a { color: var(--link); text-decoration: underline; }
.os9 a:hover { text-decoration: underline; }
.os9 :focus-visible { outline: 2px solid var(--theme-03); outline-offset: 1px; }
.os9 .sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.os9 .skip { position: absolute; left: -9999px; }
.os9 .skip:focus { left: 10px; top: 26px; z-index: 2000; background: #fff; color: #000; padding: 4px 8px; border: 1px solid #000; }
.os9 [hidden] { display: none !important; }
.os9 .hidden { display: none; }

/* ---------- Menu bar ---------- */
.os9 .menubar {
  position: sticky; top: 0; z-index: 1000; height: 20px;
  display: flex; align-items: stretch;
  background: var(--sys-02); border-bottom: 1px solid #000;
  font: 12px/20px var(--ui); color: #000; user-select: none;
}
.os9 .mi { position: relative; }
.os9 .mi > summary {
  display: flex; align-items: center; height: 20px; padding: 0 9px;
  list-style: none; cursor: default; white-space: nowrap;
}
.os9 .mi > summary::-webkit-details-marker { display: none; }
.os9 .mi-logo > summary { padding: 0 10px 0 14px; }
.os9 .mi[open] > summary { background: var(--theme-04); color: #fff; }
.os9 .mspace { flex: 1; }
.os9 .clock { padding: 0 10px; white-space: nowrap; }
.os9 .appmenu {
  display: flex; align-items: center; gap: 6px; padding: 0 12px 0 9px; white-space: nowrap;
  border-left: 1px solid var(--sys-05); box-shadow: inset 1px 0 0 #fff;
}
.os9 .appmenu img, .os9 .logo { display: block; }

/* A pulled-down menu (menu bar and the Share button). */
.os9 .menu {
  position: absolute; top: 20px; left: 0; z-index: 1002; min-width: 200px; padding: 2px 0;
  background: var(--sys-02); border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04), 1px 1px 0 #000;
  font: 12px/19px var(--ui); color: #000; text-align: left;
}
.os9 .menu a, .os9 .menu .menu-item, .os9 .menu .row {
  display: flex; justify-content: space-between; gap: 24px; width: 100%;
  margin: 0; padding: 0 18px; border: 0; border-radius: 0; box-shadow: none;
  background: none; color: #000; font: inherit; line-height: 19px;
  text-decoration: none; text-align: left; white-space: nowrap; cursor: default;
}
.os9 .menu a:hover, .os9 .menu a:focus-visible,
.os9 .menu .menu-item:hover, .os9 .menu .menu-item:focus-visible {
  background: var(--theme-04); color: #fff; outline: none; filter: none;
}
.os9 .menu kbd { font: inherit; }
.os9 .menu .sep { height: 1px; margin: 3px 1px 4px; background: var(--sys-05); box-shadow: 0 1px 0 #fff; }
.os9 .menu form { display: contents; }
.os9 .legend .row { justify-content: flex-start; gap: 8px; }
.os9 .sw { display: inline-block; width: 12px; height: 12px; border: 1px solid #000; vertical-align: -1px; }
.os9 .sw-yellow { background: var(--n-yellow); }
.os9 .sw-blue { background: var(--n-blue); }
.os9 .sw-green { background: var(--n-green); }

/* ---------- Platinum controls ---------- */
.os9 .box {
  position: relative; flex: 0 0 12px; width: 12px; height: 12px; padding: 0; margin: 0;
  border: 1px solid #212121; border-radius: 0;
  background: linear-gradient(135deg, #9c9c9c 0%, #fff 100%);
  box-shadow: -1px -1px 0 #8c8c8c, 1px 1px 0 #fff, inset 1px 0 0 #cecece, inset 0 1px 0 #cecece, inset -1px -1px 0 #8c8c8c;
}
.os9 .box-zoom::after { content: ''; position: absolute; left: 1px; top: 1px; width: 5px; height: 5px; border: solid #212121; border-width: 0 1px 1px 0; }
.os9 .box-shade::after { content: ''; position: absolute; left: 1px; right: 1px; top: 3px; height: 2px; border-top: 1px solid #212121; border-bottom: 1px solid #212121; }

.os9 .btn, .os9 button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: auto; min-height: 22px; margin: 0; padding: 2px 14px;
  font: 12px/16px var(--ui); color: #000; text-decoration: none; white-space: nowrap;
  background: var(--sys-02); border: 1px solid #000; border-radius: 4px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04);
  cursor: default; filter: none; transform: none; transition: none;
}
.os9 .btn:hover, .os9 button:hover { background: #e6e6e6; filter: none; text-decoration: none; }
.os9 .btn:active, .os9 button:active { background: var(--sys-05); color: #fff; box-shadow: inset 1px 1px 0 var(--sys-06); }
/* The default button: the thick rounded ring of Mac OS dialogs. */
.os9 .btn-default {
  margin: 3px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04), 0 0 0 2px var(--sys-02), 0 0 0 3px #000;
}
.os9 .btn-sm { min-height: 0; padding: 1px 9px; font-size: 11px; line-height: 14px; border-radius: 3px; }
.os9 .btn-danger { color: var(--danger-ink); }
.os9 summary.btn { list-style: none; }
.os9 summary.btn::-webkit-details-marker { display: none; }
.os9 button.linkish {
  display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer;
}
.os9 button.linkish:hover, .os9 button.linkish:active { background: none; color: var(--link); box-shadow: none; }
.os9 .danger, .os9 a.danger, .os9 button.linkish.danger { color: var(--danger-ink); }

/* Edit text: inset, with the lavender focus ring. */
.os9 input[type="text"], .os9 input[type="email"], .os9 input[type="password"],
.os9 input[type="search"], .os9 input[type="url"], .os9 textarea, .os9 select {
  width: 100%; margin: 0; padding: 3px 6px;
  font: 13px/1.4 var(--text); color: #000; background: #fff;
  border: 1px solid #000; border-radius: 0;
  box-shadow: -1px -1px 0 var(--sys-05), 1px 1px 0 #fff; transition: none;
}
.os9 input:focus, .os9 textarea:focus, .os9 select:focus {
  outline: none; border-color: #000;
  box-shadow: -1px -1px 0 var(--sys-05), 1px 1px 0 #fff, 0 0 0 3px var(--theme-03);
}
.os9 input::placeholder, .os9 textarea::placeholder { color: var(--text-3); }
.os9 textarea { min-height: 0; line-height: 1.5; resize: vertical; }
.os9 input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 13px; height: 13px; min-height: 0; margin: 0; padding: 0;
  background: var(--sys-01); border: 1px solid #000; border-radius: 0;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04); cursor: default;
}
.os9 input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 3px; top: 0; width: 4px; height: 8px;
  border: solid #000; border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.os9 input[type="checkbox"]:disabled { opacity: .45; }
.os9 input[type="checkbox"]:focus-visible { outline: 2px solid var(--theme-03); outline-offset: 1px; }
.os9 label { display: block; margin: 0 0 4px; font: 12px/1.4 var(--ui); color: #000; }
.os9 .check { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font: 12px/1.4 var(--ui); cursor: default; }
.os9 form { margin: 0; }
.os9 .input { margin: 0 0 10px; }
.os9 .error-message { margin-top: 4px; color: var(--danger-ink); font-size: 12px; }
.os9 fieldset.group, .os9 .group {
  position: relative; margin: 14px 0 10px; padding: 12px 10px 6px;
  border: 1px solid var(--sys-05); border-radius: 0;
  box-shadow: 1px 1px 0 #fff, inset 1px 1px 0 #fff;
}
.os9 .group > legend, .os9 .group-label {
  padding: 0 4px; font: 11.5px var(--ui); color: #000;
}
.os9 .group-label { position: absolute; top: -8px; left: 8px; background: var(--sys-02); }

/* ---------- Platinum window ---------- */
.os9 .win {
  position: relative; min-width: 0; padding: 0 5px 5px;
  background: var(--sys-03); border: 1px solid #000;
  box-shadow: inset -1px -1px 0 var(--sys-05), inset 1px 1px 0 #fff, 1px 1px 0 #000;
}
.os9 .win-title { display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 1px; user-select: none; }
.os9 .win-title .stripes { flex: 1; min-width: 8px; height: 12px; background: repeating-linear-gradient(#fff 0 1px, var(--stripe) 1px 2px); }
.os9 .win-name { max-width: 75%; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px/20px var(--ui); }
.os9 .win-body {
  min-width: 0; background: #fff; border: 1px solid #000;
  box-shadow: -1px -1px 0 var(--sys-05), 1px 1px 0 #fff;
}
.os9 .win-pad { padding: 12px 14px; }
/* Palettes (floating windows): a slimmer bar and a grey body. */
.os9 .palette .win-title { height: 15px; }
.os9 .palette .win-title .stripes { height: 9px; }
.os9 .palette .win-title .box { flex-basis: 9px; width: 9px; height: 9px; }
.os9 .palette .win-name { font-size: 11px; line-height: 15px; }
.os9 .palette .win-body { padding: 10px 12px; background: var(--sys-02); }
/* A plain dialog frame (no title bar). */
.os9 .dialog .win-body { padding: 0; }

/* ---------- The desk ---------- */
.os9 .desk {
  display: grid; grid-template-columns: 260px minmax(0, 1fr) 88px; gap: 24px; align-items: start;
  max-width: 1440px; margin: 0 auto; padding: 22px 16px 80px 20px;
}
.os9 .side { position: sticky; top: 34px; display: flex; flex-direction: column; gap: 18px; }
.os9 main { min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; }

/* Desktop icons */
.os9 .icons { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 2px; }
.os9 .ico {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 86px;
  color: #000; text-decoration: none; text-align: center; font: 11px/1.3 var(--text);
}
.os9 .ico-art { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 36px; }
.os9 .ico-art img { display: block; }
.os9 .ico-name { padding: 0 3px; background: #fff; }
.os9 .ico:hover { text-decoration: none; }
.os9 .ico:focus-visible { outline: none; }
.os9 .ico:focus-visible .ico-name, .os9 .ico:active .ico-name { background: #000; color: #fff; }
.os9 .ico:active img { filter: brightness(.55); }
.os9 .ico-badge {
  position: absolute; top: -4px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px;
  background: #cc0000; color: #fff; border: 1px solid #000; border-radius: 9px;
  font: bold 11px/16px var(--text); text-align: center;
}

/* Control Strip */
.os9 .strip {
  position: fixed; left: 0; bottom: 10px; z-index: 900; display: flex; align-items: stretch; height: 24px;
  background: var(--sys-02); border: 1px solid #000; border-left: 0;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 var(--sys-04);
}
.os9 .strip a {
  display: grid; place-items: center; width: 30px; color: #000;
  border-right: 1px solid var(--sys-04); box-shadow: 1px 0 0 #fff;
}
.os9 .strip a img { display: block; }
.os9 .strip a:active { background: var(--sys-05); }
.os9 .strip-tab { width: 12px; border-radius: 0 8px 8px 0; background: var(--sys-03); }

/* Read Me + Find (left column) */
.os9 .readme .win-body { padding: 12px 13px 10px; }
.os9 .site-header { margin: 0; text-align: left; }
.os9 .site-title { margin: 0 0 6px; font: 18px/1.2 var(--ui); letter-spacing: 0; }
.os9 .site-title a { color: #000; text-decoration: none; }
.os9 .site-tagline { margin: 0 0 8px; font: 13px/1.45 var(--text); font-style: normal; color: var(--text-2); }
.os9 .identity-role { margin: 0 0 8px; font: 13px/1.5 var(--text); color: #000; letter-spacing: 0; text-transform: none; }
.os9 .readme-how { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); }
.os9 .readme-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.os9 .site-footer {
  margin: 12px 0 0; padding: 9px 0 0; border-top: 1px dotted var(--sys-04);
  font: 11.5px/1.45 var(--text); color: var(--text-2); text-align: left; letter-spacing: 0; text-transform: none;
}
.os9 .site-footer p { margin: 0; }
.os9 .site-footer a { color: var(--link); }
.os9 .site-footer .pledge { display: block; margin: 8px 0 0; }
.os9 .site-footer .pledge a { display: inline-block; }
.os9 .site-footer .pledge img { display: block; width: 88px; height: 31px; border-radius: 0; image-rendering: pixelated; }
.os9 .find .win-body, .os9 .search-page { display: block; padding: 10px 12px 12px; margin: 0; }
.os9 .find-row { display: flex; align-items: center; gap: 6px; }
.os9 .find-row input { flex: 1; width: auto; min-width: 0; }
.os9 .site-search input, .os9 .search-page input { font: 13px/1.4 var(--text); width: 100%; border-radius: 0; }

/* ---------- The board of notes ---------- */
.os9 .board { column-width: 250px; column-gap: 20px; }
.os9 .board > .note { display: block; width: 100%; margin: 0 0 20px; break-inside: avoid; }
.os9 .board > .note:nth-child(4n+2) { width: 95%; margin-left: 4%; }
.os9 .board > .note:nth-child(5n) { width: 96%; margin-left: 2%; }
.os9 .day-sep {
  column-span: all; margin: 10px 0 14px; padding: 0;
  font: 12px/1.3 var(--text); font-weight: normal; color: #000; text-transform: none; letter-spacing: 0;
}
.os9 .day-sep span { display: inline-block; padding: 1px 6px; background: #fff; border: 1px solid #000; }
.os9 .timeline > .p-name + .p-author + .day-sep { margin-top: 0; }

/* A Stickies note, as Mac OS 9 draws it: no outline and no shadow, a 1px
   bevel (white top-left, the note's dark edge bottom-right). Only the front
   note shows its 10px title bar: a checkerboard dither of the note colour and
   its edge, with a close box and a collapse box. The strip stays reserved on
   the others so nothing jumps when a note comes to the front. */
.os9 .note {
  --c: var(--n-yellow); --e: var(--e-yellow);
  position: relative; color: #000; background: var(--c);
  border: 0; padding: 0;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--e);
}
.os9 .note-yellow { --c: var(--n-yellow); --e: var(--e-yellow); }
.os9 .note-blue { --c: var(--n-blue); --e: var(--e-blue); }
.os9 .note-green { --c: var(--n-green); --e: var(--e-green); }
.os9 .note-gray { --c: var(--n-gray); --e: var(--e-gray); }
.os9 .note-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 11px; padding: 0 3px; margin: 1px 1px 0; user-select: none;
}
.os9 .note-active .note-bar {
  background: repeating-conic-gradient(var(--e) 0 25%, var(--c) 0 50%) 0 0 / 2px 2px;
}
.os9 [data-note] .note-bar { cursor: grab; }
.os9 .note-dragging .note-bar { cursor: grabbing; }
.os9 .note-dragging { z-index: 500; }
/* The boxes stay focusable for the keyboard (opacity, not visibility). */
.os9 .note-bar .box {
  flex-basis: 7px; width: 7px; height: 7px; opacity: 0;
  background: var(--c); border: 1px solid var(--e); box-shadow: none;
  filter: saturate(1.6) brightness(.85);
}
.os9 .note-bar .box-shade::after { left: 0; right: 0; top: 1px; height: 1px; border-color: var(--e); }
.os9 .note-active .note-bar .box, .os9 .note:focus-within .note-bar .box { opacity: 1; }
.os9 .note-body { padding: 6px 11px 4px; }
.os9 .note-when { font: 11px/1.4 var(--text); color: var(--text-2); text-decoration: none; }
.os9 .note-when:hover { text-decoration: underline; }
.os9 .note-when .dt-published { font: inherit; color: inherit; letter-spacing: 0; }
.os9 .post .u-url:hover .dt-published { background: none; box-shadow: none; color: inherit; }
.os9 .note-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding: 6px 18px 9px 11px; font: 11.5px/1.4 var(--text); color: var(--text-2);
}
.os9 .note-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.os9 .note .grow {
  display: none; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px;
  background: repeating-linear-gradient(135deg, transparent 0 2px, var(--e) 2px 3px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.os9 .note-active .grow { display: block; }
.os9 .note-rolled .note-body, .os9 .note-rolled .note-foot, .os9 .note-rolled .grow { display: none; }

/* Note text */
.os9 .post { padding: 0; border-bottom: 1px solid #000; }
.os9 .e-content { margin: 0; font: 14px/1.5 var(--text); overflow-wrap: anywhere; }
.os9 .e-content p { margin: 0 0 .6em; }
.os9 .e-content > :last-child { margin-bottom: 0; }
.os9 .e-content a { color: var(--link); text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; }
.os9 .e-content img:not(.yt-embed-thumb):not(.video-embed-thumb) {
  display: block; max-width: 100%; height: auto; margin: 6px 0 8px; padding: 3px;
  background: #fff; border: 1px solid #000;
}
.os9 .e-content video { margin: 6px 0 8px; border: 1px solid #000; border-radius: 0; }
.os9 .yt-embed, .os9 .video-embed { margin: 6px 0 8px; border: 1px solid #000; border-radius: 0; }
.os9 .e-content pre {
  padding: 6px 8px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .35); border-radius: 0;
  font: 12px/1.45 var(--code);
}
.os9 .e-content code { padding: 0 3px; background: rgba(255, 255, 255, .6); border-radius: 0; font: 12.5px var(--code); }
.os9 .e-content pre code { padding: 0; background: none; }
.os9 .e-content blockquote {
  margin: 0 0 .6em; padding: 5px 8px; font-style: normal; color: #000;
  background: rgba(255, 255, 255, .5); border: 1px dotted rgba(0, 0, 0, .45);
}

/* Link card: a little white document inside the note */
.os9 .link-card {
  display: block; margin: 8px 0 4px; overflow: hidden;
  color: #000; text-decoration: none; background: #fff;
  border: 1px solid #000; border-radius: 0; box-shadow: inset -1px -1px 0 var(--sys-03); transition: none;
}
.os9 .link-card:hover { border-color: #000; text-decoration: none; }
.os9 .link-card:hover .link-card-title { text-decoration: underline; }
.os9 .link-card .link-card-image { border-bottom: 1px solid #000; background: var(--sys-01); }
.os9 .link-card-body { padding: 6px 8px 7px; }
.os9 .link-card-site { font: 10.5px/1.4 var(--ui); color: var(--theme-05); letter-spacing: 0; text-transform: none; }
.os9 .link-card-title { margin-top: 1px; color: var(--link); font: bold 13px/1.35 var(--text); }
.os9 .link-card-description { margin-top: 2px; color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.os9 .link-card--text { border-left: 1px solid #000; }

/* Where the note went, and what came back */
.os9 .syndication-links { margin: 0; font: 11.5px/1.4 var(--text); color: var(--text-2); }
.os9 .syndication-links a, .os9 .syndication-links .u-syndication { margin: 0; color: var(--link); }
.os9 .interaction-counts { display: inline; margin: 0; font: bold 11.5px/1.4 var(--text); color: #7a0a57; text-decoration: none; }
.os9 .interaction-counts:hover { color: #7a0a57; text-decoration: underline; }

/* Share */
.os9 .share { position: relative; flex: none; }
.os9 .menu-up { top: auto; bottom: calc(100% + 3px); left: auto; right: 0; min-width: 180px; }

/* The note page */
.os9 .single { max-width: 660px; }
.os9 .note-single .e-content { font-size: 15.5px; }
.os9 .note-single .note-body { padding: 12px 14px 6px; }
.os9 .interactions { margin: 12px 0 4px; padding: 8px 10px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .4); }
.os9 .interaction-summary { margin: 0 0 8px; font: 11.5px var(--ui); color: #000; }
.os9 .facepile { gap: 4px; margin: 0 0 8px; }
.os9 .interactions .avatar { border-radius: 0; border: 1px solid #000; background: var(--sys-02); }
.os9 .interactions .avatar--blank { font: 12px var(--ui); color: #000; }
.os9 .reply { padding: 7px 0; border-top: 1px dotted rgba(0, 0, 0, .35); }
.os9 .reply-meta { font: 12px var(--ui); }
.os9 .reply-meta a { color: #000; }
.os9 .reply-kind { font: 11px var(--text); color: var(--text-3); }
.os9 .reply .p-content { margin: 4px 0 3px 2.2rem; font: 13px/1.45 var(--text); }
.os9 .reply-foot { margin-left: 2.2rem; font: 11px var(--text); color: var(--text-3); }
.os9 .reply-foot a { color: var(--link); }
.os9 .webmentions { margin: 22px 0 0; padding: 0 5px 5px; border-top: 1px solid #000; }
.os9 .webmentions .win-body { padding: 10px 12px; }
.os9 #webmentions h2 { margin: 6px 0 4px; font: 12px var(--ui); color: #000; }
.os9 #webmentions a { color: var(--link); }
.os9 #webmentions img { border-radius: 0; border: 1px solid #000; }
.os9 .back { margin: 18px 0 0; font: inherit; }

/* Pager + empty */
.os9 .pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 0; font: 12px var(--ui); }
.os9 .pager-page { padding: 1px 6px; background: #fff; border: 1px solid #000; font: 11px var(--text); }
.os9 .note-empty { max-width: 340px; }
.os9 .empty { margin: 0 0 8px; color: #000; }

/* Find, tag, tags and feeds pages */
.os9 .search-dialog, .os9 .tag-head, .os9 .tags-window, .os9 .feeds-window { max-width: 600px; margin: 0 0 22px; }
.os9 .search-count { margin: 10px 0 0; font: 12.5px var(--text); color: var(--text-2); }
.os9 .tag-head .win-body, .os9 .tags-window .win-body, .os9 .feeds-window .win-body { padding: 12px 14px; }
.os9 .tag-title { margin: 0 0 4px; font: 16px/1.3 var(--ui); }
.os9 .tag-meta { margin: 0; font: 12.5px var(--text); color: var(--text-2); }
.os9 .tag-meta a { color: var(--link); }
.os9 .tag-feeds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.os9 .tag-cloud { gap: 6px 14px; margin-top: 10px; }
.os9 .tag-cloud span { font: 11px var(--text); color: var(--text-3); }
.os9 .feed-list { margin: 10px 0; }
.os9 .feed-list li { padding: 7px 0; border-bottom: 1px solid var(--sys-02); }
.os9 .feed-list a { color: var(--link); font-weight: bold; }
.os9 .feed-list code, .os9 .hint code, .os9 .palette-help code {
  padding: 0 4px; background: var(--sys-01); border: 1px solid var(--sys-03); border-radius: 0; font: 11.5px var(--code);
}
.os9 .feed-desc { color: var(--text-2); font-size: 12.5px; }
.os9 .hint { color: var(--text-2); font-size: 12.5px; }

/* Consent screens (IndieAuth, MCP): a movable modal dialog */
.os9 .indieauth {
  max-width: 540px; margin: 0 0 20px; padding: 16px 18px;
  background: #fff; border: 1px solid #000;
  box-shadow: 0 0 0 4px var(--sys-02), 0 0 0 5px #000;
  font: 13px/1.5 var(--text);
}
.os9 .indieauth h1 { margin: 0 0 6px; font: 16px/1.3 var(--ui); }
.os9 .indieauth-scopes label { display: flex; gap: 8px; align-items: center; font: 12.5px var(--text); }
.os9 .form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 14px 0 0; flex-wrap: wrap; }
.os9 .indieauth .form-actions { justify-content: flex-start; }
.os9 .indieauth button[value="approve"] {
  margin: 3px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04), 0 0 0 2px var(--sys-02), 0 0 0 3px #000;
}

/* Alerts: error pages and flash messages */
.os9 .alert-desk { display: grid; place-items: center; min-height: calc(100vh - 21px); padding: 24px 16px; }
.os9 .alert { width: 100%; max-width: 520px; }
.os9 .alert .win-body { display: flex; gap: 16px; padding: 18px 20px; }
.os9 .alert-icon, .os9 .stop {
  flex: none; display: inline-block; width: 32px; height: 32px;
  background: url(/img/os9/stop.svg) center / contain no-repeat;
}
.os9 .stop { width: 16px; height: 16px; margin-top: 1px; background-image: url(/img/os9/stop-sm.svg); }
.os9 .alert-text { min-width: 0; font: 13px/1.5 var(--text); }
.os9 .alert-text h2 { margin: 0 0 8px; font: 15px/1.3 var(--ui); }
.os9 .alert-text .error { margin: 0 0 6px; }
.os9 .alert-text .back { margin: 16px 0 0; display: flex; justify-content: flex-end; }
.os9 .message {
  position: relative; margin: 0 0 16px; padding: 8px 10px 8px 34px; max-width: 660px;
  font: 12.5px/1.45 var(--text); color: #000; background: #fff;
  border: 1px solid #000; border-radius: 0; box-shadow: inset -1px -1px 0 var(--sys-03), 1px 1px 0 #000;
}
.os9 .message::before {
  content: ''; position: absolute; left: 10px; top: 9px; width: 14px; height: 14px;
  background: var(--theme-02); border: 1px solid #000;
}
.os9 .message.success::before { background: var(--n-green); }
.os9 .message.error::before {
  background: #cc0000; border: 0;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.os9 .message.error { color: var(--danger-ink); }
.os9 .message.warning::before { background: var(--n-yellow); }

/* ---------- Admin ---------- */
.os9 .adesk {
  display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 24px; align-items: start;
  max-width: 1340px; margin: 0 auto; padding: 22px 16px 60px 20px;
}
.os9 .amain { min-width: 0; }
body.admin.os9 main { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }

/* Finder list window (notes, apps) */
.os9 .finder .win-body, .os9 .mailbox .win-body { padding: 0; }
.os9 .finder-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 7px 9px;
  background: var(--sys-01); border-bottom: 1px solid var(--sys-05); font: 12px/1.4 var(--text);
}
.os9 .finder-count { flex: 1; min-width: 12em; color: var(--text-2); }
.os9 .finder-search { margin: 0; }
.os9 .finder-search input { width: 220px; max-width: 100%; }
.os9 .finder-alert {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; margin: 0; padding: 8px 10px;
  background: #ffe9e9; border-bottom: 1px solid var(--sys-05);
  font: 12.5px/1.45 var(--text); color: #6e0000;
}
.os9 .finder-alert span:not(.stop) { flex: 1 1 80%; }
.os9 .finder-empty { padding: 28px 18px 22px; text-align: center; font: 13px/1.5 var(--text); }
.os9 .finder-empty p { margin: 0 0 12px; }
.os9 .table-scroll { overflow-x: auto; }
.os9 .admin-table { width: 100%; border-collapse: collapse; font: 12.5px/1.4 var(--text); }
.os9 .admin-table th {
  padding: 0 8px; text-align: left; white-space: nowrap;
  font: normal 11.5px/18px var(--ui); color: #000; text-transform: none; letter-spacing: 0;
  background: var(--sys-02); border-bottom: 1px solid #000; border-right: 1px solid var(--sys-05);
  box-shadow: inset 1px 1px 0 #fff;
}
.os9 .admin-table th.sorted { background: var(--sys-04); }
.os9 .admin-table td { padding: 6px 8px; border-bottom: 1px solid var(--sys-02); vertical-align: top; }
.os9 .admin-table td.sorted { background: #f3f3f3; }
.os9 .admin-table tr:last-child td { border-bottom: 0; }
.os9 .admin-table .excerpt { color: #000; }
.os9 .admin-table .excerpt a { color: #000; text-decoration: none; }
.os9 .admin-table .excerpt a:hover { text-decoration: underline; }
.os9 .admin-table .when { white-space: nowrap; color: var(--text-2); }
.os9 .admin-table .hint { font-size: 11.5px; }
.os9 .chip { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border: 1px solid #000; }
.os9 .chip-yellow { background: var(--n-yellow); }
.os9 .chip-blue { background: var(--n-blue); }
.os9 .chip-green { background: var(--n-green); }
.os9 .row-actions { white-space: nowrap; }
.os9 .row-actions a, .os9 .row-actions .linkish { margin-right: 10px; font-size: 12px; }
.os9 .finder-pager { margin: 0; padding: 5px 9px; background: var(--sys-01); border-top: 1px solid var(--sys-05); font: 11.5px var(--ui); }

/* Status marks: sent, failed, waiting — drawn, never only coloured */
.os9 .st { display: inline-flex; align-items: center; gap: 3px; margin: 0 8px 2px 0; white-space: nowrap; font-size: 12px; }
.os9 .st::before {
  content: ''; flex: 0 0 10px; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.os9 .st-ok { color: #006600; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.5l2.3 2.3L8.5 2.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E"); }
.os9 .st-bad { color: #b00000; font-weight: bold; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2L2 8' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E"); }
.os9 .st-wait { color: var(--text-3); --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='3.6' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M5 3v2.2l1.4 1' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); }
.os9 .st-none { color: var(--text-3); white-space: normal; }
.os9 .st-none::before { display: none; }

/* Compose and edit: the note on the left, a palette on the right */
.os9 .compose { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; max-width: 1040px; margin: 0; }
.os9 .compose-main { min-width: 0; }
.os9 .compose-note:focus-within { outline: 2px solid var(--theme-03); outline-offset: 2px; }
.os9 .compose-note .note-body { padding: 10px 12px 14px; }
.os9 .compose-note .input { margin: 0; }
.os9 .compose-note textarea {
  min-height: 300px; padding: 0; background: transparent; border: 0; box-shadow: none;
  font: 15px/1.55 var(--text); resize: vertical;
}
.os9 .compose-note textarea:focus { box-shadow: none; }
.os9 .compose-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px;
  margin-top: 14px; padding: 8px 10px;
  background: var(--sys-02); border: 1px solid #000; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04);
}
.os9 .compose-bar .form-actions { margin: 0; }
.os9 .compose-bar .check { margin: 0; }
.os9 .syndicate-pick { display: block; }
.os9 .syn-opt { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font: 12px/1.4 var(--ui); cursor: default; }
.os9 .syn-opt input { width: 13px; margin: 0; }
.os9 .syn-all { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--sys-04); box-shadow: inset 0 1px 0 #fff; color: #000; }
.os9 .syn-locked { opacity: .5; }
.os9 .syn-note { display: block; margin-top: 4px; font: 11.5px/1.4 var(--text); color: var(--danger-ink); }
.os9 .palette-help { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--sys-04); font: 12px/1.5 var(--text); color: var(--text-2); }
.os9 .palette-help p { margin: 0 0 8px; }
.os9 .info .win-body { font: 12px/1.45 var(--text); }
.os9 .info-row { margin: 0 0 12px; }
.os9 .info-key { display: block; font: 11px var(--ui); color: #000; }
.os9 .syndicate-status { margin: 16px 0 12px; padding-top: 10px; }
.os9 .syndicate-status ul { list-style: none; margin: 0; padding: 0; }
.os9 .syndicate-status li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-bottom: 1px solid var(--sys-04); font-size: 12px; }
.os9 .syndicate-status li:last-child { border-bottom: 0; }
.os9 .syndicate-status strong { min-width: 5.5rem; font: normal 12px var(--ui); color: #000; }
.os9 .syndicate-status .syn-url { color: var(--link); }
.os9 .syn-send { display: inline; margin: 0; }
.os9 .interactions-admin { margin: 0 0 12px; font-size: 12px; }
.os9 .interactions-admin summary { font: 12px var(--ui); color: #000; cursor: default; }
.os9 .interactions-admin li { gap: 4px 8px; padding: 5px 0; border-bottom: 1px dotted var(--sys-04); }
.os9 .interaction-kind { font-size: 11px; color: var(--text-3); }
.os9 .interaction-text { color: var(--text-2); }
.os9 .info-danger { display: flex; justify-content: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sys-04); }

/* Editor toolbar (editor.js) inside the compose note */
.os9 .editor-toolbar { position: relative; display: flex; gap: 6px; margin: 0 0 10px; }
.os9 .tool-btn { min-height: 0; padding: 1px 9px; font-size: 11px; line-height: 14px; border-radius: 3px; }
.os9 .emoji-panel {
  margin-top: 4px; padding: 8px; background: var(--sys-02); border: 1px solid #000; border-radius: 0;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--sys-04), 1px 1px 0 #000;
}
.os9 .emoji-search { border-radius: 0; font: 12.5px var(--text); }
.os9 .emoji-tab { min-height: 0; padding: 1px 8px; font: 11px/14px var(--ui); color: #000; border-radius: 3px; }
.os9 .emoji-tab.active { background: var(--theme-04); color: #fff; border-color: #000; }
.os9 .emoji-grid button {
  min-height: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background: none; font-size: 20px; line-height: 1;
}
.os9 .emoji-grid button:hover { background: var(--theme-02); }
.os9 .emoji-empty { font: 12px var(--text); color: var(--text-2); }

/* Inbox */
.os9 .inbox-head { justify-content: space-between; }
.os9 .inbox-status { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font: 12px var(--text); color: var(--text-2); }
.os9 .inbox-updated { color: var(--text-3); }
.os9 .inbox-notify-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 0; padding: 7px 10px;
  background: var(--sys-02); border: 0; border-bottom: 1px solid var(--sys-05); border-radius: 0;
  box-shadow: inset 0 1px 0 #fff; font: 12px var(--ui); color: #000;
}
.os9 .inbox-notify-controls .check { margin: 0; }
.os9 .inbox-notify-controls .pn-test-btn { margin-left: 0; }
.os9 .pn-sound-pick { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.os9 .pn-sound-pick label { margin: 0; }
.os9 .pn-sound-pick select { width: auto; padding: 1px 4px; font: 12px var(--ui); }
.os9 .inbox-notify-hint { flex-basis: 100%; font: 11.5px var(--text); color: var(--text-2); opacity: 1; }
.os9 .inbox-notify-hint:empty { display: none; }
.os9 .inbox-list { margin: 0; padding: 0; }
.os9 .inbox-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--sys-02); }
.os9 .inbox-item.is-dm { background: #f3efff; }
.os9 .inbox-avatar { flex: none; width: 36px; height: 36px; border-radius: 0; border: 1px solid #000; object-fit: cover; background: var(--theme-02); }
.os9 .inbox-avatar--blank { display: grid; place-items: center; font: 14px var(--ui); color: #000; }
.os9 .inbox-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 12.5px; }
.os9 .inbox-meta a { color: #000; text-decoration: none; }
.os9 .inbox-meta a:hover { text-decoration: underline; }
.os9 .inbox-action { color: #000; }
.os9 .inbox-source, .os9 .inbox-via {
  padding: 0; background: none; border-radius: 0; opacity: 1;
  font: 12px var(--text); color: var(--text-3); text-transform: none; letter-spacing: 0;
}
.os9 .inbox-source--mastodon, .os9 .inbox-source--bluesky, .os9 .inbox-source--x, .os9 .inbox-source--web { color: var(--text-3); }
.os9 .inbox-date { margin-left: auto; font: 11px var(--ui); color: var(--text-3); }
.os9 .inbox-text { margin: 4px 0 8px; font-size: 13px; color: #000; }
.os9 .inbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.os9 .inbox-react-form { display: inline; margin: 0; }
.os9 .inbox-reply { margin-top: 8px; }
.os9 .inbox-reply > summary { display: inline-flex; text-decoration: none; color: #000; }
.os9 .inbox-reply[open] > summary { color: #000; margin-bottom: 8px; background: var(--sys-04); }
.os9 .inbox-reply textarea { min-height: 4.5rem; border-radius: 0; }
.os9 .inbox-reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.os9 .inbox-reply-hint { font: 11.5px var(--text); color: var(--text-2); }

/* Embed */
.os9 .embed-code { font: 12px/1.5 var(--code); background: var(--sys-01); border-radius: 0; }
.os9 .embed-actions { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; }
.os9 .embed-preview-win { margin-top: 20px; }
.os9 .embed-preview { margin: 0; padding: 10px; }

/* Sign in */
.os9 .auth-box { width: 100%; max-width: 380px; margin: 0; }
.os9 .auth-box .win-body { padding: 16px 18px; }
.os9 .auth-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.os9 .auth-head h1 { margin: 0; font: 15px/1.3 var(--ui); }
.os9 .auth-mark img { display: block; width: 32px; height: 32px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  .os9 .hide-sm { display: none !important; }
  .os9 .desk, .os9 .adesk { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 12px 10px 40px; }
  .os9 .icons { order: -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .os9 .ico { width: 70px; }
  .os9 .side { position: static; display: contents; }
  .os9 .readme { order: 0; }
  .os9 #notes { order: 1; }
  .os9 .find { order: 2; }
  .os9 .readme-how { display: none; }
  .os9 .board { columns: 1; }
  .os9 .board > .note:nth-child(n) { width: 100%; margin-left: 0; }
  .os9 .compose { grid-template-columns: minmax(0, 1fr); }
  .os9 .compose-note textarea { min-height: 200px; }
  .os9 .admin-table .excerpt { display: table-cell; }
  .os9 .admin-table th.sorted, .os9 .admin-table td.when { display: none; }
  .os9 .row-actions { white-space: normal; }
  .os9 .row-actions a, .os9 .row-actions .linkish { display: inline-block; margin: 2px 10px 2px 0; }
  .os9 .finder-search, .os9 .finder-search input { width: 100%; }
  .os9 .inbox-date { margin-left: 0; }
}
