[hidden] {
  display: none !important;
}
:root {
  --paper: #f5f2e9;
  --ink: #302f29;
  --muted: #79766b;
  --line: #d9d5c9;
  --accent: #805039;
  --panel: #ece8df;
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
[data-theme="night"] {
  --ink: #e8e7dc;
  --muted: #a7b0b8;
  --line: #3b4550;
  --panel: #26313a;
  color-scheme: dark;
}
a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: inherit;
  padding: 9px 14px;
}
button:hover {
  background: var(--panel);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
input,
textarea,
select {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 2px;
  max-width: 100%;
}
label {
  display: grid;
  gap: 7px;
  font: 13px/1.5 system-ui;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.site-header {
  max-width: 1460px;
  margin: auto;
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 19px/1.2 system-ui;
  letter-spacing: 5px;
  text-decoration: none;
}
.wordmark span {
  display: block;
  font-size: 8px;
  letter-spacing: 7px;
  margin-top: 7px;
  color: var(--muted);
}
nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font: 12px system-ui;
}
nav a {
  text-decoration: none;
}
nav button {
  border: 0;
  padding: 5px;
}
.reading-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 700px) 140px;
  gap: 60px;
  max-width: 1270px;
  margin: 0 auto;
  padding: 75px 25px;
}
.outline {
  align-self: start;
  position: sticky;
  top: 35px;
  font: 12px/1.8 system-ui;
  padding-top: 12px;
}
.eyebrow {
  font: 10px/1.6 system-ui;
  letter-spacing: 2px;
  color: var(--muted);
}
.outline ol {
  padding-left: 0;
  list-style: none;
  margin: 22px 0 35px;
  border-left: 1px solid var(--line);
}
.outline li {
  padding: 5px 0 5px 16px;
}
.outline a {
  text-decoration: none;
}
.outline .level-3 {
  padding-left: 26px;
}
.outline .active {
  color: var(--accent);
  font-weight: 600;
}
.back-index {
  font-size: 11px;
  color: var(--muted);
}
h1 {
  font-size: clamp(38px, 4.3vw, 62px);
  font-weight: 400;
  letter-spacing: -2px;
  line-height: 1.09;
  margin: 22px 0;
}
.dek {
  font-size: 22px;
  color: var(--muted);
  line-height: 1.5;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font: 11px system-ui;
  color: var(--muted);
  padding: 24px 0 34px;
  border-bottom: 1px solid var(--line);
}
.prose {
  font-size: 19px;
  line-height: 1.85;
  margin-top: 42px;
  overflow-wrap: anywhere;
}
.prose h2 {
  font-size: 29px;
  font-weight: 400;
  line-height: 1.3;
  margin: 48px 0 20px;
  scroll-margin-top: 25px;
}
.prose h3 {
  font-size: 23px;
}
.prose p {
  position: relative;
}
.prose blockquote {
  margin: 30px 0;
  border-left: 2px solid var(--accent);
  padding-left: 25px;
  font-style: italic;
}
.prose pre {
  white-space: pre-wrap;
  font: 14px/1.6 monospace;
  background: var(--panel);
  padding: 20px;
}
.prose figure {
  margin: 30px 0;
}
.prose img {
  max-width: 100%;
  cursor: zoom-in;
}
.prose figcaption {
  font: 12px/1.6 system-ui;
  color: var(--muted);
  margin-top: 9px;
}
audio {
  width: 100%;
  max-width: 600px;
}
.sidenote {
  font: 13px/1.7 system-ui;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding: 5px 0 5px 18px;
  margin: 28px 0;
}
.note-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.sidenote p {
  margin: 6px 0;
}
details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin: 28px 0;
}
summary {
  cursor: pointer;
  font-size: 16px;
}
.right-margin {
  padding-top: 15px;
  font: 12px/1.8 system-ui;
  color: var(--muted);
}
.newsletter {
  padding: 32px;
  background: var(--panel);
  margin: 55px 0;
}
.newsletter h2 {
  font-weight: 400;
  font-size: 27px;
}
.newsletter p {
  color: var(--muted);
  line-height: 1.6;
}
.newsletter form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.newsletter label {
  flex: 1;
}
.newsletter form p {
  width: 100%;
  font: 12px system-ui;
  margin: 0;
}
#discussion h2 {
  font-weight: 400;
}
#comment-form {
  margin-top: 20px;
  display: grid;
  gap: 15px;
}
#comment-form[hidden] {
  display: none;
}
textarea {
  min-height: 120px;
}
.comment {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.comment blockquote {
  font-size: 12px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.site-footer {
  margin: 35px 5% 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  font: 11px system-ui;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  max-width: 440px;
  width: calc(100% - 40px);
  padding: 30px;
  box-shadow: 0 12px 60px #0002;
}
dialog::backdrop {
  background: #0003;
}
dialog p {
  line-height: 1.6;
}
.close-preview {
  float: right;
  border: 0;
}
#image-preview {
  max-width: 95vw;
}
#image-preview img {
  max-width: 100%;
  max-height: 80vh;
}
.preview-button {
  font: 10px system-ui;
  border: 0;
  padding: 2px 4px;
  vertical-align: super;
}
.annotate-button {
  font: 10px system-ui;
  padding: 2px 7px;
  margin-left: 8px;
  opacity: 0.4;
}
.annotate-button:hover,
.annotate-button:focus {
  opacity: 1;
}
.focus-mode .outline,
.focus-mode .right-margin,
.focus-mode .preview-button,
.focus-mode .annotate-button {
  visibility: hidden;
}
.focus-mode .reading-layout {
  grid-template-columns: minmax(0, 700px);
  justify-content: center;
}
.focus-mode .outline,
.focus-mode .right-margin {
  display: none;
}
.background-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.09;
  pointer-events: none;
}
.stars:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#aeb9c966 1px, transparent 1px);
  background-size: 75px 83px;
  opacity: 0.35;
  animation: drift 40s linear infinite;
  z-index: 0;
}
.stars > * {
  position: relative;
}
.still:before {
  animation: none;
}
.wide .reading-layout {
  grid-template-columns: 150px minmax(0, 840px) 100px;
  max-width: 1330px;
  gap: 35px;
}
.sans .prose {
  font-family: system-ui;
  font-size: 17px;
}
.backlinks {
  display: grid;
  gap: 10px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.backlinks h2 {
  font-size: 20px;
  font-weight: 400;
}
@keyframes drift {
  to {
    background-position: 75px 83px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 1100px) {
  .reading-layout,
  .wide .reading-layout {
    grid-template-columns: 150px minmax(0, 700px);
    gap: 35px;
  }
  .right-margin {
    display: none;
  }
}
@media (max-width: 760px) {
  .site-header {
    padding: 20px;
  }
  .wordmark {
    font-size: 15px;
  }
  nav {
    gap: 10px;
    font-size: 10px;
  }
  .reading-layout,
  .wide .reading-layout {
    display: block;
    padding: 28px 23px;
  }
  .outline {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 30px;
  }
  .outline ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 0;
    border: 0;
  }
  .outline li {
    padding: 0;
  }
  .outline .level-3 {
    padding: 0;
  }
  .back-index {
    display: none;
  }
  h1 {
    letter-spacing: -1px;
  }
  .dek {
    font-size: 19px;
  }
  .prose {
    font-size: 18px;
  }
  .newsletter {
    padding: 23px;
  }
  .site-footer span {
    max-width: 150px;
    text-align: right;
  }
}
@media (min-width: 1300px) {
  .prose .sidenote {
    float: right;
    width: 155px;
    margin: 0 -205px 20px 25px;
    clear: right;
  }
  .focus-mode .prose .sidenote {
    float: none;
    width: auto;
    margin: 28px 0;
  }
}
.backlinks {
  display: block;
}
.backlinks a {
  display: inline-block;
  margin: 8px 0;
}

/* Extension CSS is scoped; shared reader features remain owned above. */
.orbit-study {
  margin: 2rem 0;
  color: var(--accent);
}
.orbit-study svg {
  display: block;
  width: 100%;
  height: auto;
}
.orbit-study figcaption {
  text-align: center;
  font:
    0.85rem/1.6 system-ui,
    sans-serif;
  color: var(--muted);
}
.orbit-study .orbit-motion {
  transform-origin: 320px 90px;
  animation: journal-orbit var(--orbit-duration) linear infinite;
}
@keyframes journal-orbit {
  to {
    transform: rotate(360deg);
  }
}
.still .orbit-motion {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .orbit-study .orbit-motion {
    animation: none;
  }
}

.newsletter-consent {
  display: block;
  font: 14px/1.5 system-ui;
}
.newsletter-consent input {
  width: auto;
  margin-right: 8px;
}

.newsletter label.newsletter-consent {
  flex: 0 0 100%;
}
.newsletter-message-preview {
  width: 95vw;
  max-width: 800px;
}
