:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #30302e; background: #fdfcf9; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 760px; margin: 0 auto; padding: 100px 28px 70px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dfded9; padding-bottom: 28px; margin-bottom: 38px; }
h1 { font-size: clamp(2.25rem, 7vw, 3.5rem); line-height: 1.12; letter-spacing: -.045em; margin: 0; font-weight: 650; }
.intro { color: #73716b; margin-bottom: 28px; }
label { display: block; font-size: .9rem; margin-bottom: 10px; }
.fields { display: flex; gap: 10px; max-width: 400px; }
input, button { font: inherit; border-radius: 5px; padding: 12px 16px; }
input { min-width: 0; width: 100%; border: 1px solid #bcbab3; background: transparent; }
button { border: 1px solid #30302e; background: #30302e; color: #fff; cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid #826343; outline-offset: 4px; }
#error { min-height: 1.5em; color: #924039; font-size: .9rem; }
details { margin: 0 0 28px; }
summary { font-size: inherit; font-weight: inherit; cursor: pointer; padding: 8px 0; line-height: 1.5; }
.letter { padding: 6px 0 8px 24px; }
#letters { line-height: 1.85; overflow-wrap: anywhere; }
p { white-space: pre-wrap; }
a { color: inherit; text-underline-offset: 4px; }
blockquote { margin-left: 0; padding-left: 20px; border-left: 2px solid #c8c2b8; }
pre { white-space: pre-wrap; padding: 16px; background: #f1efea; }
table { border-collapse: collapse; width: 100%; } td { border: 1px solid #dfded9; padding: 8px; }
hr { border: 0; border-top: 1px solid #dfded9; margin: 28px 0; }
.lock { flex: 0 0 44px; margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #dfded9; border-radius: 50%; background: #fdfcf9; color: #73716b; }
.lock:hover { color: #30302e; background: #f1efea; }
.lock svg { pointer-events: none; }
@media (max-width: 520px) { main { padding: 58px 22px 40px; } .letter { padding-left: 12px; } }
figure { margin: 24px 0; } img { display: block; max-width: 100%; height: auto; border-radius: 4px; } figcaption { margin-top: 8px; color: #73716b; font-size: .85rem; }

/* Notion's named colors mapped to a light-theme palette. */
.notion-gray { color: #787774; }
.notion-brown { color: #9f6b53; }
.notion-orange { color: #d9730d; }
.notion-yellow { color: #cb912f; }
.notion-green { color: #448361; }
.notion-blue { color: #337ea9; }
.notion-purple { color: #9065b0; }
.notion-pink { color: #c14c8a; }
.notion-red { color: #d44c47; }
.notion-gray_background { background-color: #f1f1ef; }
.notion-brown_background { background-color: #f4eeee; }
.notion-orange_background { background-color: #fbecdd; }
.notion-yellow_background { background-color: #fbf3db; }
.notion-green_background { background-color: #edf3ec; }
.notion-blue_background { background-color: #e7f3f8; }
.notion-purple_background { background-color: #f4f0f7; }
.notion-pink_background { background-color: #f9eef3; }
.notion-red_background { background-color: #fdebec; }
#letters :not(pre) > code { font-size: .9em; padding: .12em .3em; border-radius: 3px; background: #e9e7e280; }
#letters :is(summary, li, blockquote, td, figcaption, h2, h3, h4, h5) { white-space: pre-wrap; }
/* The page header already provides the leading divider. */
#letters > hr:first-child { display: none; }
/* Nested toggles belong to one letter, not separate dated entries. */
#letters .letter details { margin: 0; }
#letters .letter details > summary { padding-top: 4px; padding-bottom: 4px; }
#letters .letter details > .letter { padding-top: 0; padding-bottom: 0; }
#letters .letter > :first-child { margin-top: 0; }
#letters .letter > :last-child { margin-bottom: 0; }

/* Heading levels come from Notion, identically for plain and toggle headings. */
#letters h2 { font-size: 1.875rem; }
#letters h3 { font-size: 1.5rem; }
#letters h4 { font-size: 1.25rem; }
#letters h5 { font-size: 1.125rem; }
#letters :is(h2, h3, h4, h5) { font-weight: 600; line-height: 1.3; }
#letters details.notion-heading-1 > summary { font-size: 1.875rem; }
#letters details.notion-heading-2 > summary { font-size: 1.5rem; }
#letters details.notion-heading-3 > summary { font-size: 1.25rem; }
#letters details.notion-heading-4 > summary { font-size: 1.125rem; }
#letters details[class*="notion-heading-"] > summary { font-weight: 600; line-height: 1.3; }
#letters summary > :is(h2, h3, h4, h5) { display: inline; margin: 0; font: inherit; }
#letters summary { list-style: none; }
#letters summary::-webkit-details-marker { display: none; }
#letters summary::before { content: ""; display: inline-block; width: 0; height: 0; border-top: .25em solid transparent; border-bottom: .25em solid transparent; border-left: .35em solid currentColor; margin-right: .65em; vertical-align: .06em; transform-origin: 40% 50%; }
#letters details[open] > summary::before { transform: rotate(90deg); }
/* Comment controls sit at the right edge of the block they annotate. */
.commented-block { position: relative; min-width: 0; padding-right: 42px; }
.commented-block > :first-child { margin-top: 0; }
#letters details.comment-thread { position: absolute; top: 0; right: 0; z-index: 5; margin: 0; font-size: .9rem; }
#letters details.comment-thread[open] { z-index: 20; }
#letters details.comment-thread > summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; min-height: 32px; border-radius: 5px; font-size: .8rem; font-weight: 400; color: #73716b; }
#letters details.comment-thread > summary::before { content: none; }
#letters details.comment-thread > summary:hover { color: #30302e; background: #f1efea; }
.comment-panel { position: absolute; top: calc(100% + 4px); right: 0; width: min(360px, calc(100vw - 44px)); max-height: min(420px, 70vh); overflow: auto; padding: 12px 16px; border: 1px solid #e1c966; background: #fffbeb; border-radius: 5px; box-shadow: 0 8px 24px #302b201a; }
.comment-discussion + .comment-discussion { border-top: 1px solid #e6dfc7; margin-top: 12px; padding-top: 12px; }
.comment + .comment { margin-top: 12px; }
.comment-meta { color: #73716b; font-size: .75rem; }
.comment-meta time { margin-left: 6px; }
.comment-body { white-space: pre-wrap; }
span.notion-yellow_background { padding: 0 .08em; border-radius: 2px; background-color: #ffe58f; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
