@import url("/widgets/lang.css");
:root {
  --bg: #ffffff;
  --text: #0c1014;
  --muted: #737373;
  --rule: #dbdbdb;
  --link: #00376b;
  --accent: #0095f6;
  --tile: #efefef;
  --measure: 38rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --text: #f5f5f5;
    --muted: #a8a8a8;
    --rule: #262626;
    --link: #e0f1ff;
    --accent: #0095f6;
    --tile: #1c1c1c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.125rem/1.65 Charter, "Iowan Old Style", Georgia, serif;
  -webkit-text-size-adjust: 100%;
}
main, header, footer { max-width: var(--measure); margin: 0 auto; padding: 0 1rem; }
header { padding-top: 3rem; }
header a.name { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.25rem; }
header p { margin: .25rem 0 0; color: var(--muted); font-style: italic; }
h1 { font-size: 2rem; line-height: 1.2; margin: 2.5rem 0 .5rem; }
h2 { font-size: 1.3rem; margin: 2.25rem 0 .5rem; }
a { color: var(--link); }
.meta { color: var(--muted); font-size: .95rem; margin: 0 0 2rem; }
.draft { display: inline-block; font: 600 .75rem/1 system-ui, sans-serif; letter-spacing: .06em;
  text-transform: uppercase; color: var(--bg); background: var(--muted); padding: .3rem .5rem; border-radius: 3px; }
ul.posts { list-style: none; padding: 0; }
ul.posts li { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
ul.posts a { font-weight: 700; text-decoration: none; }
ul.posts .meta { margin: .2rem 0 0; }
blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
figure { margin: 2rem 0; }
figure img { width: 100%; height: auto; display: block; border-radius: 4px; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
footer { margin-top: 4rem; padding-bottom: 3rem; border-top: 1px solid var(--rule); padding-top: 1rem;
  color: var(--muted); font-size: .9rem; }

.filter { display: inline-flex; gap: .5rem; align-items: center; color: var(--muted); font: .95rem system-ui, sans-serif; margin: 0 0 .5rem; }
.filter select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; padding: .2rem .4rem; }

/* Generated by build_index.py at the end of every post. */
.post-nav { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .95rem; }
.post-nav .series-name { margin: 0 0 .3rem; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.post-nav ol.series { margin: 0 0 1rem; padding-left: 1.4rem; }
.post-nav ol.series li { margin: .15rem 0; }
.post-nav ol.series li[aria-current] { font-weight: 600; }
.post-nav .prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; }
.post-nav .prevnext .next { margin-left: auto; }
.post-nav .all { margin: 0; }

/* Home page as a profile (build_index.py writes it). */
main.home { max-width: 58rem; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.4; padding-top: 2.5rem; }
.profile { display: flex; align-items: center; gap: clamp(1.5rem, 8vw, 6rem); padding: 0 clamp(0rem, 4vw, 3rem) 2.5rem; }
.avatar { flex: none; width: clamp(5.5rem, 18vw, 9.5rem); aspect-ratio: 1; border-radius: 50%; padding: 2px; border: 0;
  background: var(--rule); cursor: default; font: inherit; }
/* the colored ring means there are stories to watch; gray once seen */
.avatar.has-stories { padding: 4px; cursor: pointer; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.avatar.has-stories.seen { padding: 3px; background: var(--rule); }
.avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; }
.avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--bg);
  background: var(--text); color: var(--bg); font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.8rem); letter-spacing: .02em; }
.name-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 0 0 1rem; }
.who h1 { font-size: 1.35rem; font-weight: 600; margin: 0; }
.follow { font: 600 .88rem system-ui, sans-serif; color: #fff; background: var(--accent); border: 0; border-radius: .5rem; padding: .45rem 1.1rem; cursor: pointer; }
.follow.on { color: var(--text); background: var(--tile); }
.counts button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* follow / followers / following sheets */
.sheet { width: min(25rem, calc(100vw - 2rem)); border: 0; border-radius: .9rem; padding: 1.2rem 1.4rem 1.4rem;
  background: var(--bg); color: var(--text); font: 1rem/1.4 system-ui, -apple-system, sans-serif; }
.sheet::backdrop, .story::backdrop { background: rgb(0 0 0 / .65); }
.sheet h2 { font-size: 1rem; text-align: center; margin: 0 0 1rem; }
.sheet .x, .story .x { position: absolute; top: .5rem; right: .6rem; margin: 0; }
.sheet .x button, .story .x button { font-size: 1.6rem; line-height: 1; background: none; border: 0; color: inherit; cursor: pointer; padding: .2rem .4rem; }
.signup { display: flex; gap: .5rem; }
.signup input { flex: 1; min-width: 0; font: inherit; padding: .5rem .7rem; border: 1px solid var(--rule); border-radius: .5rem; background: var(--bg); color: var(--text); }
.signup button { font: 600 .9rem system-ui, sans-serif; color: #fff; background: var(--accent); border: 0; border-radius: .5rem; padding: 0 1rem; cursor: pointer; }
.said { margin: .8rem 0 0; color: var(--muted); }
.people { list-style: none; margin: 0; padding: 0; }
.people a { display: flex; flex-direction: column; padding: .6rem 0; color: inherit; text-decoration: none; border-top: 1px solid var(--rule); }
.people li:first-child a { border-top: 0; }
.people span { color: var(--muted); font-size: .88rem; }
/* stories: full screen, progress bars, tap right half for next, left for back */
.story { width: min(100vw, calc(100dvh * 9 / 16)); height: 100dvh; max-width: none; max-height: none; margin: 0 auto; padding: 0; border: 0;
  background: #000; color: #fff; font: .9rem system-ui, sans-serif; }
.story .bars { position: absolute; top: .6rem; left: .6rem; right: 3rem; display: flex; gap: 3px; z-index: 1; }
.story .bars i { flex: 1; height: 2px; background: rgb(255 255 255 / .35); }
.story .bars i b { display: block; height: 100%; width: 0; background: #fff; }
.story .frame { position: absolute; inset: 0; display: grid; place-items: center; }
.story .frame img, .story .frame video { width: 100%; height: 100%; object-fit: contain; }
.story .when { position: absolute; top: 1.3rem; left: .8rem; margin: 0; opacity: .85; z-index: 1; }
.story .x { z-index: 2; color: #fff; }
.counts { display: flex; gap: 2.2rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.counts b { font-weight: 600; }
.bio { margin: 0; }
.bio a { color: var(--link); font-weight: 600; text-decoration: none; }

.highlights { display: flex; gap: 2rem; overflow-x: auto; padding: 0 clamp(0rem, 4vw, 3rem) 2.5rem; scrollbar-width: none; }
.hl { flex: none; width: 5.5rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; }
.hl .ring { width: 5rem; height: 5rem; border-radius: 50%; padding: 3px; border: 1px solid var(--rule); display: block; }
.hl .ring > * { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--rule); }
.hl .glyph { font: italic 600 1.8rem Charter, Georgia, serif; color: var(--muted); }
.hl .hn { font-size: .78rem; font-weight: 600; text-align: center; line-height: 1.2; }
.hl.on .ring { border: 2px solid var(--accent); }
.hl .ring { position: relative; }
.hl.on .ring::after { content: "\00d7"; position: absolute; top: -.2rem; right: -.2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  display: grid; place-items: center; font: 600 1rem/1 system-ui, sans-serif; background: var(--accent); color: var(--bg, #fff); opacity: 0; transition: opacity .15s; }
.hl.on:focus-visible .ring::after { opacity: 1; }
@media (hover: hover) { .hl.on:hover .ring::after { opacity: 1; } }
@media (hover: none) { .hl.on .ring::after { opacity: 1; } }

.tabs { display: flex; justify-content: center; gap: 3.5rem; border-top: 1px solid var(--rule); margin-bottom: .25rem; }
.tabs button { font: 600 .78rem system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  background: none; border: 0; border-top: 1px solid transparent; margin-top: -1px; padding: 1rem 0; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-top-color: var(--text); }
.filtering { text-align: center; color: var(--muted); margin: .5rem 0 1rem; }
.filtering a { color: var(--accent); text-decoration: none; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--rule); color: inherit; text-decoration: none; }
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile .stack { position: absolute; top: .6rem; right: .6rem; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem; border-radius: .4rem;
  display: grid; place-items: center; font: 700 .8rem system-ui, sans-serif; color: #fff; background: rgba(0,0,0,.45);
  box-shadow: 3px -3px 0 -1px rgba(255,255,255,.85); }
.tile .cap { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center;
  font: 600 1rem/1.25 system-ui, sans-serif; color: #fff; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .15s ease; }
.tile:focus-visible .cap { opacity: 1; }
@media (hover: hover) { .tile:hover .cap { opacity: 1; } }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile.text { display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: 1.2rem; background: var(--tile); color: var(--text); }
.tile.text .t { font: italic 600 clamp(1rem, 2.6vw, 1.6rem)/1.15 Charter, Georgia, serif; }
.tile.text .d { font-size: .85rem; line-height: 1.35; opacity: .7; }
.tile[hidden] { display: none; }
@media (max-width: 640px) { .grid { gap: 2px; } .tile.text .d { display: none; } .highlights { gap: 1rem; } .counts { gap: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .tile .cap { transition: none; } }
body:has(main.home) footer { max-width: 58rem; font-family: system-ui, sans-serif; }
/* /ig: welcome strip for people coming from the Instagram bio link */
.welcome { margin: 0 clamp(0rem, 4vw, 3rem) 2rem; padding: 1rem; border-radius: .9rem; background: var(--tile); }
.welcome .hello { margin: 0 0 .8rem; font-weight: 600; }
.welcome .newest { display: flex; gap: 1rem; align-items: center; color: inherit; text-decoration: none; }
.welcome .newest img { flex: none; width: 7rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .5rem; }
.welcome .newest b { display: block; font: italic 600 1.25rem/1.2 Charter, Georgia, serif; margin-bottom: .3rem; }
.welcome .newest span span { color: var(--muted); font-size: .9rem; }
.welcome .more { margin: .9rem 0 0; font-size: .9rem; color: var(--muted); }
.linkish { font: inherit; color: var(--link); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
/* new since your last visit */
.tile .new { position: absolute; top: .6rem; left: .6rem; z-index: 1; padding: .15rem .45rem; border-radius: 1rem;
  font: 700 .68rem/1.2 system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; background: #ff3040; color: #fff; }
/* Follow by email at the bottom of each post */
.follow-box { margin: 2.5rem 0 1rem; padding: 1.2rem 1.3rem; border-radius: .8rem; background: var(--tile); font-family: system-ui, -apple-system, sans-serif; font-size: 1rem; }
.follow-box[hidden] { display: none; }
.follow-box h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
.follow-box p { margin: 0 0 .9rem; color: var(--muted); }
.follow-box .said { margin: .8rem 0 0; }
.post-nav .share { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

#in-ja { line-height: 1.85; }
