/* blog.css — journal stylesheet.

   The palette, surfaces and type scale follow https://www.yomiplush.dev/ so the
   journal reads as one more site by the same hand: navy-to-black ground, one
   cyan accent, small orange for warnings, 10px corners, hairline borders, and
   monospace for labels (dates, tags, the footer) against a sans body. The
   shrine's mint-and-pink tokens it used to borrow are gone from this file.

   The journal has no minify step: this file is served as written, so keep it
   readable.

   Theme contract (matches ~/sites/README.md): localStorage "site:theme" is
   "light" or "dark"; blog.js sets <html data-theme> before first paint. */

:root {
  --bg: #061223;
  --bg-grad: linear-gradient(180deg, #0d2038 0%, #061223 52%, #02060f 100%);
  --bg-deep: #02060f;
  --text: #e7eef8;
  --muted: #8fa3b8;
  --link: #5ec8f0;
  --warn: #d98a5b;
  --surface: rgba(10, 24, 38, 0.72);
  --border: #16283c;
  --edge: rgba(94, 200, 240, 0.24);
  --card: #0a1826;
  --card-hover: #0f2135;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #dceaf9;
  --bg-grad: linear-gradient(180deg, #eef6ff 0%, #dbe9f9 55%, #c2d8f0 100%);
  --bg-deep: #cfdff2;
  --text: #0c1a2c;
  --muted: #40566e;
  --link: #0b5f8f;
  --warn: #a34812;  /* dark enough for the small draft badge on the light ground */
  --surface: rgba(242, 248, 255, 0.85);
  --border: #a8c4e2;
  --edge: rgba(255, 255, 255, 0.9);
  --card: #f2f8ff;
  --card-hover: #e6f1fd;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #dceaf9;
    --bg-grad: linear-gradient(180deg, #eef6ff 0%, #dbe9f9 55%, #c2d8f0 100%);
    --bg-deep: #cfdff2;
    --text: #0c1a2c;
    --muted: #40566e;
    --link: #0b5f8f;
    --warn: #a34812;
    --surface: rgba(242, 248, 255, 0.85);
    --border: #a8c4e2;
    --edge: rgba(255, 255, 255, 0.9);
    --card: #f2f8ff;
    --card-hover: #e6f1fd;
    color-scheme: light;
  }
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* The ground lives on <html> and the body stays transparent, so the #bg canvas
   is a true layer of its own: it paints above the gradient and below every page
   element. Same arrangement as the hub. */
html {
  background: var(--bg);
  background-image: var(--bg-grad);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}
body {
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
::selection {
  background: var(--link);
  color: var(--bg);
}

/* ---- background layer --------------------------------------------------- */

/* static/bg.js paints the PS3-XMB-style wave into this canvas. It is a layer of
   its own: fixed, behind every page element, and it never takes a click. The
   body gradient stays underneath, so a browser without WebGL simply keeps the
   flat ground. */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
/* Cyan on a light ground competes with body copy, so the wave runs softer
   there instead of being switched off. */
:root[data-theme="light"] #bg {
  opacity: 0.32;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) #bg {
    opacity: 0.32;
  }
}

/* ---- chrome ------------------------------------------------------------- */

.g-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  z-index: 600;
  border-radius: 0 0 8px 0;
}
.g-skip:focus {
  left: 0;
}
.g-header {
  position: sticky;
  top: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% - 32px);
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  /* the one HUD note carried over from the hub: an accent hairline on top */
  border-top-color: color-mix(in srgb, var(--link) 55%, var(--border));
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.g-brand {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 0.9rem;
}
.g-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.g-back {
  color: var(--link);
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  transition:
    background 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}
.g-back:hover {
  background: var(--card-hover);
  border-color: var(--link);
}
.g-theme {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.g-theme:hover {
  background: var(--card-hover);
  border-color: var(--link);
}
.g-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 16px 60px;
}
.g-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.g-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---- entry list --------------------------------------------------------- */

.b-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.b-card {
  display: block;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.b-card:hover {
  border-color: color-mix(in srgb, var(--link) 65%, var(--border));
  background: var(--card-hover);
}
.b-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 4px;
}
.b-card:hover .b-card-title {
  color: var(--link);
}
.b-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.b-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.b-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.b-empty {
  opacity: 0.6;
}

/* ---- single entry ------------------------------------------------------- */

.b-post {
  max-width: 760px;
  margin: 0 auto;
}
.b-post-head {
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.b-post-head .g-title {
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.b-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-top: 8px;
}
.b-post-cover {
  width: 100%;
  margin-top: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.b-draft {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--warn);
  color: var(--warn);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.b-post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.b-post-nav a {
  color: var(--link);
  text-decoration: none;
}
.b-post-nav a:hover {
  text-decoration: underline;
}
.b-post-nav-side {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- tags --------------------------------------------------------------- */

.b-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.b-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--link);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.b-tag:hover {
  background: color-mix(in srgb, var(--link) 14%, transparent);
  border-color: var(--link);
}
.b-terms {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.b-term-count {
  opacity: 0.55;
  font-weight: 400;
}
.b-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  font-size: 0.85rem;
}
.b-pager-void {
  color: var(--link);
  opacity: 0.3;
  font-weight: 700;
  padding: 8px 14px;
}
.b-pager-count {
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---- article body ------------------------------------------------------- */

.prose {
  font-size: 1rem;
  line-height: 1.78;
}
.prose > * + * {
  margin-top: 1.05em;
}
/* Keep the writer's single line breaks in prose, including quoted paragraphs. */
.prose p {
  white-space: pre-line;
}
.prose h2,
.prose h3,
.prose h4 {
  letter-spacing: 0.01em;
  font-weight: 800;
  line-height: 1.3;
}
.prose h2 {
  font-size: 1.25rem;
  margin-top: 1.9em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border);
}
.prose h3 {
  font-size: 1.07rem;
  margin-top: 1.6em;
}
.prose h4 {
  font-size: 0.97rem;
  margin-top: 1.4em;
  opacity: 0.85;
}
.prose a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover {
  background: var(--link);
  color: var(--bg);
  text-decoration: none;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.35em;
}
.prose li > ul,
.prose li > ol {
  margin-top: 0.35em;
}
.prose strong {
  font-weight: 800;
}
.prose blockquote {
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--link);
  opacity: 0.85;
  font-style: italic;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.prose code {
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 0.88em;
  padding: 0.15em 0.4em;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}
.prose pre {
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  line-height: 1.55;
  font-size: 0.86rem;
}
.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.prose th,
.prose td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.prose th {
  font-weight: 800;
  letter-spacing: 0.5px;
}
/* Syntax highlighting: Zola (giallo) writes giallo-light.css / giallo-dark.css
   and blog.js enables the one matching the theme. Only the layout rules it
   cannot generate live here — see the lines/line-number docs. */
.giallo-l {
  display: inline-block;
  min-height: 1lh;
  width: 100%;
}
.giallo-ln {
  display: inline-block;
  user-select: none;
  margin-right: 0.4em;
  padding: 0.4em;
  min-width: 3ch;
  text-align: right;
  opacity: 0.8;
}
.giallo {
  background: none;
  border: 1px solid var(--border);
}

/* ---- footer ------------------------------------------------------------- */

.b-foot {
  flex: 0 0 auto;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 36px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.b-foot a {
  color: var(--link);
  text-decoration: none;
}
.b-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .g-main {
    padding: 24px 14px 48px;
  }
  .g-header {
    top: 8px;
    margin-top: 8px;
    padding: 8px 12px;
  }
  .g-brand {
    letter-spacing: 1px;
    font-size: 0.85rem;
  }
  /* Phones keep the Shrine pill and the theme toggle; the hub link stays in
     the footer, where there is room for it. */
  .g-back--dev {
    display: none;
  }
  .b-post-head .g-title {
    font-size: 1.35rem;
  }
  .b-post-nav {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* URL-only lines: provider players and general website cards. */
.url-embed { margin: 1.05em 0; min-width: 0; }
.embed-frame { display: block; width: 100%; border: 0; border-radius: 12px; background: var(--bg); }
.embed-video { aspect-ratio: 16 / 9; }
.embed-audio { height: 166px; }
.embed-music { height: 450px; }
.embed-portrait { height: 680px; max-width: 390px; margin-inline: auto; }
.embed-x { max-width: 550px; margin-inline: auto; }
.embed-social { height: 650px; max-width: 550px; margin-inline: auto; }
.embed-code { height: 420px; }
.embed-media, .embed-image { display: block; max-width: 100%; width: 100%; border-radius: 12px; }
.embed-caption { margin-top: .35em; font-size: .78rem; opacity: .8; overflow-wrap: anywhere; }
.prose a.embed-card {
  display: flex; gap: 1rem; align-items: center; padding: 1rem;
  margin-block: 1.05em; border: 1px solid var(--border); border-radius: 12px;
  color: inherit; text-decoration: none; min-width: 0; overflow: hidden;
}
.prose a.embed-card:hover { background: var(--bg); border-color: var(--link); }
.embed-card-copy { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.embed-card-host { font-size: .75rem; opacity: .7; overflow-wrap: anywhere; }
.embed-card-title { font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.embed-card-description { font-size: .85rem; line-height: 1.5; opacity: .8; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prose .embed-card-image { width: 120px; height: 100px; flex: 0 0 120px; object-fit: cover; border: 0; border-radius: 8px; }
.prose .embed-card-image[hidden] { display: none; }
@media (max-width: 480px) {
  .prose a.embed-card { gap: .65rem; padding: .75rem; }
  .prose .embed-card-image { width: 80px; height: 80px; flex-basis: 80px; }
  .embed-portrait { height: 600px; }
}

/* Article sharing follows the site's surface and accent colours. */
.post-share { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.post-share-heading { margin: 0 0 .75rem; font-size: .9rem; letter-spacing: .04em; }
.post-share-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.post-share-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .85rem;
  line-height: 1.4; text-decoration: none; cursor: pointer;
}
.post-share-button:hover { border-color: var(--link); color: var(--link); }
.post-share-button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.post-share-status { margin: .65rem 0 0; font-size: .8rem; }
.post-share-status:empty { display: none; }
.post-share-manual { width: 100%; box-sizing: border-box; margin-top: .5rem; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.post-share-button[hidden], .post-share-manual[hidden] { display: none; }
