:root { --royal:#2a0b66; --deep:#12032c; --ink:#ffffff; --soft:rgba(255,255,255,.74); --faint:rgba(255,255,255,.5); --line:rgba(255,255,255,.18); }
* { box-sizing:border-box; margin:0; }
html { background:var(--deep); }
body {
  color:var(--ink); min-height:100vh; display:flex; flex-direction:column; position:relative; overflow-x:hidden;
  font:17px/1.6 "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings:"cv11", "ss01"; font-optical-sizing:auto;
  -webkit-font-smoothing:antialiased;
  /* Velvet: a lit crown at the top, falling off into deep violet. */
  background:
    radial-gradient(70vmax 50vmax at 50% -8%, #5a25b8 0%, rgba(90,37,184,0) 60%),
    radial-gradient(50vmax 50vmax at 100% 100%, rgba(74,20,140,.55) 0%, rgba(74,20,140,0) 70%),
    linear-gradient(180deg, var(--royal) 0%, #1c0648 50%, var(--deep) 100%);
  background-attachment:fixed;
}
/* Cut crystal: large, sharp facets, like light inside an amethyst. */
.facets { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; }
main, header, footer { position:relative; z-index:1; width:100%; max-width:680px; margin:0 auto; }
main { flex:1; }
::selection { background:rgba(255,255,255,.85); color:var(--royal); }

/* Before the first piece */
.lede { font-weight:500; font-size:24px; line-height:1.35; letter-spacing:-.02em; }
.more { color:var(--soft); max-width:30em; margin-top:14px; }

/* Writing */
header.bar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:36px 28px 0; }
header.bar a { color:inherit; text-decoration:none; }
header.bar .home { font-weight:600; font-size:20px; letter-spacing:-.02em; }
header.bar nav { display:flex; align-items:center; gap:20px; font-size:15px; }
header.bar nav a { color:var(--soft); }
header.bar nav a:hover, header.bar nav a[aria-current] { color:var(--ink); }
/* Spunto: the one lit thing in the bar. Small, but it holds the eye. */
header.bar nav a.spunto {
  display:inline-flex; align-items:center; gap:7px; padding:5px 12px 5px 6px; border-radius:999px;
  color:var(--ink); font-weight:500; font-size:14px;
  background:linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border:1px solid var(--line); box-shadow:inset 0 1px 0 rgba(255,255,255,.2);
  transition:border-color .3s ease, background-color .3s ease;
}
header.bar nav a.spunto:hover, header.bar nav a.spunto:focus-visible { border-color:rgba(255,255,255,.45); background-color:rgba(255,255,255,.06); outline:none; }
header.bar nav a.spunto img { width:20px; height:20px; border-radius:5px; display:block; }
main.writing { padding:56px 28px 48px; }
.day { display:inline-block; font-size:14px; color:var(--faint); text-decoration:none; margin:0 0 14px; }
a.day:hover { color:var(--soft); }
article { padding-bottom:56px; margin-bottom:56px; border-bottom:1px solid var(--line); }
article:last-of-type { border-bottom:0; }
article h2 { font-weight:600; font-size:32px; line-height:1.15; letter-spacing:-.03em; margin-bottom:20px; }
article h2 a { color:inherit; text-decoration:none; }
article h2 a:hover { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
article h2 .arrow { color:var(--soft); font-weight:400; }
.prose { font-size:18px; line-height:1.7; color:rgba(255,255,255,.9); }
.prose > * + * { margin-top:1.1em; }
.prose a { color:var(--ink); text-decoration:underline; text-decoration-color:rgba(255,255,255,.4); text-underline-offset:3px; }
.prose a:hover { text-decoration-color:var(--ink); }
.prose h3, .prose h4 { font-weight:600; font-size:22px; letter-spacing:-.02em; line-height:1.2; margin-top:1.6em; }
.prose h4 { font-size:19px; }
.prose blockquote { border-left:2px solid rgba(255,255,255,.4); padding-left:20px; color:var(--soft); font-style:italic; }
.prose ul, .prose ol { padding-left:1.3em; }
.prose li + li { margin-top:.4em; }
.prose code { font:15px/1.5 ui-monospace, "SF Mono", Menlo, monospace; background:rgba(255,255,255,.08); border-radius:5px; padding:1px 5px; }
.prose pre { background:rgba(0,0,0,.28); border:1px solid var(--line); border-radius:14px; padding:16px 18px; overflow-x:auto; }
.prose pre code { background:none; padding:0; }
.prose img { max-width:100%; height:auto; border-radius:14px; display:block; }
.prose hr { border:0; height:1px; width:56px; background:rgba(255,255,255,.5); margin:2em 0; }
.prose sup a { text-decoration:none; color:var(--soft); }
.prose .footnotes { font-size:15px; color:var(--soft); border-top:1px solid var(--line); padding-top:1.2em; margin-top:2em; }
.older { display:inline-block; color:var(--soft); text-decoration:none; }
.older:hover { color:var(--ink); }
.empty { color:var(--soft); font-size:20px; }
.archive h2 { font-weight:600; font-size:22px; letter-spacing:-.02em; font-variant-numeric:lining-nums tabular-nums; margin:40px 0 12px; }
.archive h2:first-child { margin-top:0; }
.archive ul { list-style:none; padding:0; }
.archive li { display:flex; gap:16px; padding:8px 0; border-bottom:1px solid rgba(255,255,255,.08); }
.archive li span { color:var(--faint); font-size:14px; min-width:4.5em; padding-top:2px; }
.archive li a { color:var(--ink); text-decoration:none; }
.archive li a:hover { text-decoration:underline; text-underline-offset:4px; }

footer { padding:28px; color:rgba(255,255,255,.45); font-size:12px; letter-spacing:.06em; }
@media (max-width:420px) {
  .lede { font-size:21px; }
  article h2 { font-size:27px; } .prose { font-size:17px; }
  header.bar { padding-top:24px; } header.bar nav { gap:14px; } main.writing { padding-top:40px; }
}

/* Native-script language picker; no tracking, cookies or forced redirects. */
.language-picker { position: relative; font: inherit; font-size: .8rem; flex-shrink: 0; }
.language-picker summary { cursor: pointer; padding: .5rem; }
.language-picker ul { position: absolute; inset-inline-end: 0; top: 100%; z-index: 100; min-width: 13rem; max-height: 65vh; overflow: auto; list-style: none; margin: 0; padding: .6rem; border-radius: 12px; background: Canvas; color: CanvasText; box-shadow: 0 8px 30px #0003; }
.language-picker li a { display: block; padding: .5rem; color: inherit; white-space: nowrap; }
.language-picker a[aria-current] { font-weight: 700; }
[dir=rtl] .prose, [dir=rtl] .feature-copy, [dir=rtl] .hero-copy { text-align: start; }
html:lang(ja) .display, html:lang(ko) .display, html:lang(zh) .display, html:lang(ar) .display, html:lang(hi) .display { font-family: system-ui, sans-serif; }
html:lang(ja) { line-break: strict; }
html:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
@media(max-width: 600px) { .language-picker { font-size: .7rem; } .language-picker summary { max-width: 8rem; } .bar { flex-wrap: wrap; gap: .5rem; } }
