/*
 * estrip's public site (views/site/*): one look for the homepage, journals and posts, in the reader's theme -
 * spice (orange), plant (green) or devil (red) - set as a class on <body>. White post cards on a coloured page,
 * like the classic site, at any screen size. 1rem = 10px (the search overlay, vue/src/components/Search.vue, uses rem).
 */
:root { color-scheme: light; }
html { font-size: 62.5%; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body.s-body { margin: 0; font: 400 1.6rem/1.55 Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); background-image: var(--bg-img, none); background-attachment: fixed; min-height: 100vh; }
.s-body a { color: var(--link); }
.s-body img { max-width: 100%; height: auto; }
.s-body h1, .s-body h2, .s-body h3 { line-height: 1.2; }
.s-body button { font: inherit; }

/* ---- themes ---------------------------------------------------------------------------------------- */
.theme-spice { --bg: #BF5907; --bg-img: radial-gradient(circle at 15% 0%, #d4700f 0, transparent 45%); --bar: #a24b0c; --bar-ink: #fff; --stripe: #F4D73A; --stripe-ink: #6b5900;
  --accent: #EA6F06; --accent-ink: #fff; --link: #b8430b; --card: #fff; --ink: #2E290F; --muted: #7a6a55; --line: #f0e2d2; --on-bg: #fff; --soft: #fff3e3; --hot: #EA6F06; --logo-bit: '🌶️'; }
.theme-plant { --bg: #92aa19; --bg-img: radial-gradient(circle at 85% 0%, #a9c22a 0, transparent 50%); --bar: #6c8400; --bar-ink: #fff; --stripe: #C5E437; --stripe-ink: #3f4c08;
  --accent: #5d7d00; --accent-ink: #fff; --link: #12746e; --card: #fffff8; --ink: #26300a; --muted: #6c7350; --line: #e6ecc9; --on-bg: #fff; --soft: #f3f8dc; --hot: #7da300; --logo-bit: '🌱'; }
.theme-devil { --bg: #6d0707; --bg-img: radial-gradient(circle at 50% -20%, #b3120f 0, transparent 55%), linear-gradient(#5a0505, #2b0202); --bar: #1f0101; --bar-ink: #ffd9cf; --stripe: linear-gradient(90deg, #ff9f1a, #ff4b1f 55%, #d1001f); --stripe-ink: #2b0000;
  --accent: #d1001f; --accent-ink: #fff; --link: #b0001a; --card: #fffaf7; --ink: #240808; --muted: #7d5b57; --line: #f3dcd6; --on-bg: #ffe0d6; --soft: #fff0ea; --hot: #ff3b1f; --logo-bit: '😈'; }

/* ---- header ---------------------------------------------------------------------------------------- */
.s-skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.s-skip:focus { left: 8px; }
.s-top { position: sticky; top: 0; z-index: 3; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.s-bar { display: flex; align-items: center; gap: 14px; padding: 8px max(16px, calc((100vw - 1180px) / 2)); background: var(--bar); color: var(--bar-ink); flex-wrap: wrap; }
.s-logo { position: relative; display: inline-block; font: 700 2.2rem/1 Georgia, "Times New Roman", serif; color: #fff !important; background: var(--accent); padding: 5px 10px 6px; border: 2px solid rgba(255,255,255,.7); border-radius: 4px; text-decoration: none; letter-spacing: -.01em; }
.s-logo span { opacity: .85; }
.s-logo::after { content: var(--logo-bit); position: absolute; right: -12px; top: -12px; font-size: 1.8rem; transform: rotate(14deg); }
.theme-devil .s-logo::before { content: ''; position: absolute; left: 4px; right: 4px; top: -11px; height: 12px; background: #d1001f;
  clip-path: polygon(0 100%, 7% 0, 17% 100%, 83% 100%, 93% 0, 100% 100%); }
.s-logo.small { font-size: 1.8rem; }
.s-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.s-nav a { color: var(--bar-ink); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-weight: 500; font-size: 1.5rem; }
.s-nav a:hover, .s-nav a[aria-current] { background: rgba(255,255,255,.16); }
.s-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.s-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 600; font-size: 1.5rem; text-decoration: none; cursor: pointer; line-height: 1.2; }
.s-btn:hover { filter: brightness(1.08); }
.s-ghost { background: rgba(255,255,255,.14); color: inherit !important; }
.s-card .s-ghost, .s-pager .s-ghost, .s-missing .s-ghost { background: var(--soft); color: var(--ink) !important; }
.s-write { background: #fff; color: #222 !important; }
.s-small-btn { padding: 6px 12px; font-size: 1.4rem; }
.s-stripe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px max(16px, calc((100vw - 1180px) / 2)); background: var(--stripe); color: var(--stripe-ink); font-size: 1.35rem; }
.s-tag { font-weight: 500; }
.s-themes { margin-left: auto; display: flex; gap: 4px; }
.s-theme { text-decoration: none; color: var(--stripe-ink) !important; padding: 2px 9px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.s-theme:hover { background: rgba(255,255,255,.35); }
.s-theme.on { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.12); }

/* the search button (Search.vue) in the bar */
#search .search-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(255,255,255,.14); color: var(--bar-ink); font-weight: 600; font-size: 1.5rem; cursor: pointer; }
#search .search-btn ion-icon { font-size: 1.8rem; }

/* ---- page ------------------------------------------------------------------------------------------ */
.s-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; }
.s-card { background: var(--card); border-radius: 14px; padding: 18px 20px; box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 6px 22px rgba(0,0,0,.10); margin-bottom: 16px; }
.s-card-title { font-size: 1.7rem; margin: 0 0 10px; }
.s-small { font-size: 1.3rem; color: var(--muted); }
.s-meta { font-size: 1.35rem; color: var(--muted); margin: 4px 0 0; }
.s-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--soft); color: var(--ink) !important; text-decoration: none; font-weight: 500; }
.s-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--line); flex: none; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.s-avatar-lg { width: 72px; height: 72px; }
.s-body img.s-avatar { height: auto; aspect-ratio: 1; }
.s-linkbtn { border: 0; background: none; color: var(--link); text-decoration: underline; cursor: pointer; padding: 0; font-size: 1.3rem; }

/* journal header */
.s-jhead { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; color: var(--on-bg); }
.s-jhead a { color: var(--on-bg); }
.s-kicker { margin: 0; font-size: 1.4rem; opacity: .9; text-transform: lowercase; }
.s-jtitle { margin: 0; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.02em; text-shadow: 0 2px 0 rgba(0,0,0,.15); overflow-wrap: anywhere; }
.s-jsub { margin: 2px 0 0; font-size: 1.4rem; opacity: .9; }
.s-jwrite { margin-left: auto; }
.s-jhead-small { margin-bottom: 12px; }
.s-jhead-small .s-kicker { font-size: 1.6rem; font-weight: 600; text-transform: none; }

.s-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .s-cols { grid-template-columns: minmax(0, 1fr); } }

/* posts */
.s-post { padding: 22px 24px; }
.s-post-title { margin: 0; font-size: clamp(2.1rem, 3.2vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.s-post-title a { color: var(--ink); text-decoration: none; }
.s-post-title a:hover { color: var(--link); }
.s-entry { margin: 14px 0 6px; font-size: 1.65rem; line-height: 1.65; overflow-wrap: anywhere; }
.s-entry img { border-radius: 8px; vertical-align: middle; }
.s-entry img.direct_link { border-radius: 0; }
.s-entry iframe, .s-entry video, .s-entry embed, .s-entry object { max-width: 100%; border: 0; border-radius: 8px; }
.s-entry iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; }
.s-entry audio { width: 100%; }
.s-entry table { display: block; overflow-x: auto; max-width: 100%; }
.s-entry pre { white-space: pre-wrap; background: #1d1d1d; color: #a6f3a6; padding: 10px; border-radius: 8px; }
.s-entry blockquote { margin: 10px 0; padding: 6px 14px; border-left: 4px solid var(--hot); background: var(--soft); border-radius: 0 8px 8px 0; }
.s-entry .tb_img_left { float: left; margin: 0 12px 8px 0; max-width: 50%; }
.s-entry .tb_img_right { float: right; margin: 0 0 8px 12px; max-width: 50%; }
.s-entry::after { content: ''; display: block; clear: both; }
.s-entry .pgrid { display: grid; gap: 6px; margin: 6px 0; }
.s-entry .pgrid.n2 { grid-template-columns: 1fr 1fr; }
.s-entry .pgrid.n3 { grid-template-columns: 1fr 1fr 1fr; }
.s-entry .pg-item img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.s-entry .e_link { font-weight: 600; text-decoration: none; background: var(--soft); padding: 0 4px; border-radius: 4px; }
.s-post-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 10px; }
.s-post-foot .s-small { margin-left: auto; }
.s-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink) !important; text-decoration: none; font-size: 1.4rem; font-weight: 500; }
.s-pill:hover { filter: brightness(.97); }
.s-pill-main { background: var(--accent); color: var(--accent-ink) !important; }
.s-pager { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 20px; }
.s-pager .s-btn:only-child { margin-left: auto; }
.s-empty-card { text-align: center; }

/* comments on a post */
.s-comments { list-style: none; padding: 0; margin: 0 0 14px; }
.s-comments li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.s-comments li:first-child { border-top: 0; }
.s-comments .s-avatar { width: 36px; height: 36px; }
.s-comments .s-meta { margin: 0 0 2px; }
.s-comments .s-meta a { color: var(--ink); text-decoration: none; }
.s-comment-body { overflow-wrap: anywhere; }
.s-comment-body img { max-height: 320px; width: auto; border-radius: 6px; }
.s-around { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-around-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink) !important; margin: 0; }
.s-around-link b { overflow-wrap: anywhere; }
.s-right { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .s-around { grid-template-columns: 1fr; } .s-right { grid-column: auto; } }

/* side column */
.s-side { min-width: 0; }
.s-who { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; }
.s-who .s-avatar { width: 64px; height: 64px; }
.s-who-name { margin: 0; font-size: 2rem; }
.s-who-name a { color: var(--ink); text-decoration: none; }
.s-who p { margin: 0; }
.s-links { grid-column: 1 / -1; list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.s-links a { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 1.35rem; font-weight: 500; }
.s-links a:hover { filter: brightness(.96); }

.s-cloud-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.s-cloud-pick { flex: 1; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 999px; padding: 8px 10px; font-size: 1.45rem; font-weight: 600; cursor: pointer; }
.s-cloud-pick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.s-cloud { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.s-bubble { display: inline-block; padding: .22em .65em; border-radius: 999px; line-height: 1.2; text-decoration: none;
  background: hsl(var(--hue) 85% 92%); color: hsl(var(--hue) 55% 30%) !important; border: 1px solid hsl(var(--hue) 60% 82%); transform: rotate(var(--tilt)); transition: transform .12s; }
.s-bubble:hover { transform: rotate(0) scale(1.08); }
.s-bubble sup { font-size: .55em; margin-left: .25em; opacity: .7; }
.s-heat { display: flex; flex-direction: column; gap: 3px; }
.s-row { display: grid; grid-template-columns: 3em repeat(12, 1fr); gap: 3px; align-items: center; }
.s-heat-head span { font-size: 1.05rem; color: var(--muted); text-align: center; }
.s-yr { font-size: 1.15rem; color: var(--muted); }
.s-c { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--hot); }
.s-c.s-empty { background: var(--line); opacity: .7; }
a.s-c:hover { outline: 2px solid var(--ink); }
.s-heatwrap .s-small { margin: 10px 0 0; }

.s-comments-mini { list-style: none; padding: 0; margin: 0 0 8px; }
.s-comments-mini li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 1.4rem; }
.s-comments-mini li:first-child { border-top: 0; }
.s-comments-mini a { color: var(--ink); text-decoration: none; display: block; }
.s-comments-mini a:hover b { color: var(--link); }
.s-comments-mini span { color: var(--muted); overflow-wrap: anywhere; }

.s-chatter { background: #a6b51f; color: #18200a; }
.theme-devil .s-chatter { background: #2a0606; color: #ffd9cf; }
.theme-plant .s-chatter { background: #e8f0b8; }
.s-chatter a { color: inherit; font-weight: 700; text-decoration: none; }
.s-chat-lines { list-style: none; padding: 0; margin: 0 0 6px; max-height: 260px; overflow-y: auto; font-size: 1.35rem; }
.s-chat-lines li { padding: 3px 0; overflow-wrap: anywhere; }
.s-chat-lines time { opacity: .7; font-size: 1.2rem; }
.s-chatter .s-linkbtn, .s-chatter .s-small, .s-chatter .s-small a { color: inherit; }
.s-chat-form { display: flex; gap: 6px; margin-top: 8px; }
.s-chat-form input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 8px 12px; font-size: 1.5rem; }

/* ---- homepage -------------------------------------------------------------------------------------- */
.s-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; color: var(--on-bg); margin: 10px 0 26px; }
.s-hero h1 { font-size: clamp(3.4rem, 7vw, 6.4rem); line-height: 1.02; margin: 0 0 6px; font-weight: 800; letter-spacing: -.035em; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.s-hero h1 span { display: block; font-weight: 300; }
.s-hero p { font-size: 1.8rem; margin: 10px 0 18px; opacity: .95; }
.s-hero .s-btn { font-size: 1.8rem; padding: 12px 22px; background: #fff; color: #222 !important; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.s-people { display: flex; flex-direction: column; gap: 14px; }
.s-people h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 600; opacity: .95; }
.s-faces { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.s-faces a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--on-bg); text-decoration: none; font-size: 1.2rem; width: 64px; }
.s-faces .s-avatar { width: 56px; height: 56px; }
.s-faces span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .s-hero { grid-template-columns: 1fr; } .s-faces li:nth-child(n+6) { display: none; } }

.s-section-title { color: var(--on-bg); font-size: 2.2rem; margin: 6px 0 14px; text-shadow: 0 2px 0 rgba(0,0,0,.12); }
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0 0 18px; }
.s-tile { display: flex; flex-direction: column; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 6px 22px rgba(0,0,0,.10); transition: transform .15s; height: 100%; }
.s-tile:hover { transform: translateY(-3px) rotate(-.3deg); }
.s-tile-img { display: block; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.s-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-tile-img.s-tile-noimg { aspect-ratio: 5 / 2; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.s-tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.s-tile-body h3 { margin: 0; font-size: 1.8rem; overflow-wrap: anywhere; }
.s-tile-body h3 a { color: var(--ink); text-decoration: none; }
.s-tile-body h3 a::after { content: ''; position: absolute; inset: 0; }
.s-tile { position: relative; }
.s-tile-body p { margin: 0; color: var(--muted); font-size: 1.4rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.s-tile-who { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; color: var(--muted); margin-top: auto; position: relative; z-index: 1; }
.s-tile-who a { color: var(--ink); font-weight: 600; text-decoration: none; }
.s-tile-who .s-avatar { width: 26px; height: 26px; border-width: 1px; }
.s-center { text-align: center; }

/* photo gallery + every post */
.s-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.s-photos a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.s-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.s-photos a:hover img { transform: scale(1.05); }
.s-month-title { margin: 6px 0 10px; font-size: 1.7rem; }
.s-years { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.s-every { list-style: none; padding: 0; margin: 0; columns: 2 320px; column-gap: 26px; }
.s-every li { break-inside: avoid; padding: 4px 0; font-size: 1.45rem; display: flex; gap: 10px; }
.s-every time { color: var(--muted); font-size: 1.25rem; flex: none; width: 5.2em; padding-top: 2px; }
.s-every a { color: var(--ink); overflow-wrap: anywhere; }
.s-year-title { margin: 18px 0 6px; font-size: 2rem; }

.s-missing { max-width: 560px; margin: 40px auto; text-align: center; }
.s-big { font-size: 6rem; margin: 0; }

/* ---- footer ---------------------------------------------------------------------------------------- */
.s-foot { background: var(--bar); color: var(--bar-ink); padding: 26px 16px 14px; margin-top: 20px; }
.s-foot-in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr; gap: 20px; }
.s-foot p { font-size: 1.4rem; opacity: .9; max-width: 34em; }
.s-foot a { color: var(--bar-ink); }
.s-foot ul { list-style: none; padding: 0; margin: 0; font-size: 1.45rem; line-height: 2; }
.s-copy { max-width: 1180px; margin: 14px auto 0; font-size: 1.2rem; opacity: .7; }
@media (max-width: 640px) { .s-foot-in { grid-template-columns: 1fr 1fr; } .s-foot-in > div { grid-column: 1 / -1; } }

/* ---- phones ---------------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .s-top { position: static; }
  .s-bar { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .s-nav { order: 3; width: 100%; }
  .s-nav a { font-size: 1.45rem; padding: 4px 8px; }
  .s-write span, .s-theme span, .search-btn .span { display: none; }
  .s-tag { font-size: 1.25rem; }
  .s-wrap { padding: 14px 10px 30px; }
  .s-card, .s-post { padding: 16px 15px; border-radius: 12px; }
  .s-jhead { gap: 10px; }
  .s-avatar-lg { width: 56px; height: 56px; }
  .s-post-foot .s-small { margin-left: 0; width: 100%; }
}

/* ---- the search overlay (Search.vue) ----------------------------------------------------------------- */
body.active { overflow: hidden; }
.search-bar { background: #fff; color: #18181b; position: fixed; top: 0; left: 0; width: 100%; padding: 15px max(15px, calc((100vw - 1180px) / 2)); transform: translateY(calc(-100% - 2px)); z-index: 5; transition: .25s; visibility: hidden; }
.search-bar.active { visibility: visible; transform: translateY(0); }
.search-bar a { color: #c2410c; }
.search-bar button { border: 0; background: none; cursor: pointer; color: inherit; }
.search-close-btn { color: #18181b; }
.overlay { position: fixed; inset: 0; background: rgba(20, 20, 24, .8); transition: .25s; opacity: 0; pointer-events: none; z-index: 4; }
.overlay.active { opacity: 1; pointer-events: all; }

/* /info pages */
.s-info { max-width: 820px; margin: 0 auto 16px; }
.s-info h1 { font-size: 2.8rem; margin: 0 0 12px; }
.s-info h2 { font-size: 2rem; margin: 20px 0 8px; }
.s-info dt { font-weight: 700; margin-top: 8px; }
.s-info dd { margin: 0 0 4px 16px; }
