/* The notebook's working desk and the conversations in its margins. */
.community-button, .community-link, .studio-tabs button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 0; background: var(--sheet-alt, var(--surface)); color: var(--ink); font: 12px/1.5 var(--mono); text-decoration: none; cursor: pointer; box-shadow: 2px 2px 0 var(--edge-shadow); }
.community-button:hover, .community-link:hover, .studio-tabs button:hover { color: var(--accent); border-color: var(--accent); }
.community-button:disabled { opacity: .55; cursor: wait; box-shadow: none; }
.community-primary, .studio-tabs button[aria-current=page] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.community-primary:hover { color: var(--sheet); opacity: .9; }
.community-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.community-label, .studio-field { color: var(--ink); font: 12px/1.6 var(--mono); }
.community-label { display: block; margin-bottom: 8px; }
.community-help { color: var(--muted); font-size: 12px; line-height: 1.7; }
.community-notice { padding: 13px 16px; background: var(--surface); border-left: 3px solid var(--accent); color: var(--body); font-size: 13px; overflow-wrap: anywhere; }
.community-notice p:first-child { margin-top: 0; }
.community-notice p:last-child { margin-bottom: 0; }
.community-badge { display: inline-block; padding: 3px 7px; border: 1px dashed var(--line); font: 10px/1.5 var(--mono); color: var(--accent); }
.community-account { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font: 12px/1.6 var(--mono); }
.community-avatar { width: 32px; height: 32px; flex: none; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.article-comments, .comments-section { max-width: 1060px; margin: 36px auto 0; border: 1px dashed var(--line); padding: 26px 32px; background: var(--sheet); background-image: url('/images/obsession/paper-fibers.svg'); box-shadow: 4px 5px 0 var(--edge-shadow); scroll-margin-top: 24px; }
.article-comments h2 { margin: 0; font: 750 28px/1.2 var(--sans); letter-spacing: -.6px; }
.comments-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.comments-intro { max-width: 65ch; color: var(--muted); font-size: 13px; }
.comments-form { margin: 24px 0; padding: 20px; background: var(--sheet-alt); border: 1px dashed var(--line); }
.comments-form textarea, .comment-edit textarea, .studio-main input, .studio-main select, .studio-main textarea { display: block; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 0; padding: 10px 12px; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); }
.comments-form textarea, .comment-edit textarea { resize: vertical; min-height: 110px; margin-bottom: 12px; }
.comments-form textarea:disabled { opacity: .65; }
.comments-form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.comments-replying { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 0; }
.comments-replying button { min-height: 32px; }
.comment-list { display: grid; gap: 0; }
.comment { padding: 22px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font: 11px/1.6 var(--mono); }
.comment-meta a { color: var(--accent); }
.comment-body { margin: 15px 0; font-size: 15px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-context { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.comment-actions .community-button { min-height: 34px; padding: 5px 9px; font-size: 11px; box-shadow: none; }
.comments-load { margin-top: 18px; }
.comments-error { color: var(--accent); }
.comment-status { margin: 8px 0 0; font-size: 12px; color: var(--accent); }
.community-button:focus-visible, .community-link:focus-visible, .studio-tabs button:focus-visible, .article-comments textarea:focus-visible, .studio-main input:focus-visible, .studio-main textarea:focus-visible, .studio-main select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.article-comments [hidden], .page-studio [hidden] { display: none !important; }
.studio-layout { max-width: 1500px; padding: 0 42px; margin: 0 auto; }
.studio-masthead { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 28px 0 24px; border-bottom: 1px dashed var(--line); }
.studio-brand { display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--sheet); box-shadow: 3px 4px 0 var(--edge-shadow); transform: rotate(-2deg); font: 850 26px/1 var(--sans); letter-spacing: -1px; }
.studio-brand img { width: 36px; height: 36px; object-fit: cover; border: 1px solid var(--line); }
.studio-brand .wordmark { display: block; width: 170px; height: auto; color: var(--ink); }
.studio-brand .wordmark-echo { opacity: .38; }
.studio-brand span { color: var(--accent); font-family: var(--mono); }
.studio-stamp { max-width: 190px; padding: 6px 10px; font: 9px/1.7 var(--mono); color: var(--muted); letter-spacing: .8px; background: var(--sheet-alt); transform: rotate(2deg); }
.studio-masthead>a:not(.studio-brand) { margin-left: auto; font: 11px/1.6 var(--mono); }
.studio-main { padding-top: 32px; }
.studio-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.studio-heading .eyebrow { margin-bottom: 8px; }
.studio-heading h1 { font: 800 clamp(36px, 5vw, 66px)/1.05 var(--sans); letter-spacing: -.05em; }
.studio-sheet { padding: 24px; background: var(--sheet); background-image: url('/images/obsession/paper-fibers.svg'); border: 1px solid var(--line); box-shadow: 4px 5px 0 var(--edge-shadow); min-width: 0; }
.studio-sheet h2 { margin: 0 0 15px; font: 700 23px/1.4 var(--sans); letter-spacing: -.5px; }
.studio-sheet p { color: var(--body); }
#studio-gate { max-width: 700px; padding-block: 34px; }
.studio-tabs { display: flex; gap: 12px; margin-bottom: 22px; }
.studio-tabs button:first-child { transform: rotate(-1deg); }
.studio-tabs button:last-child { transform: rotate(1deg); }
.studio-grid { display: grid; grid-template-columns: minmax(235px, .8fr) minmax(0, 2fr); gap: 26px; align-items: start; }
.studio-library { padding: 19px; }
.studio-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.studio-toolbar h2, .studio-toolbar .community-label { margin: 0; }
.studio-library .studio-toolbar { align-items: flex-start; }
.studio-library .studio-toolbar h2 { font-size: 20px; }
#studio-list-status { font: 11px/1.6 var(--mono); color: var(--muted); }
#studio-posts { max-height: 70vh; overflow: auto; scrollbar-width: thin; }
.studio-post { display: block; width: 100%; margin: 0; padding: 15px 7px; text-align: left; color: var(--body); border: 0; border-bottom: 1px dashed var(--line); background: transparent; cursor: pointer; }
.studio-post strong { display: block; font: 600 14px/1.7 var(--sans); overflow-wrap: anywhere; }
.studio-post span { display: block; margin-top: 4px; font: 10px/1.6 var(--mono); color: var(--muted); }
.studio-post[aria-current=true] { color: var(--ink); background: var(--accent-soft); border-left: 3px solid var(--accent); padding-left: 11px; }
.studio-post:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.studio-editor-area { min-width: 0; }
.studio-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.studio-wide { grid-column: 1 / -1; }
.studio-field { display: block; }
.studio-field input, .studio-field select, .studio-field textarea { margin-top: 7px; }
.studio-field small { display: block; margin-top: 7px; color: var(--muted); font: 11px/1.6 var(--sans); }
.studio-main input:read-only { color: var(--muted); background: var(--surface); }
.studio-input-prefix { display: flex; align-items: center; gap: 8px; font: 11px/1.5 var(--mono); }
.studio-input-prefix input { font-family: var(--mono); font-size: 13px; }
.studio-body-toolbar { margin-top: 26px; margin-bottom: 8px; }
#studio-body { min-height: 420px; resize: vertical; font: 14px/1.9 var(--mono); tab-size: 2; }
.studio-savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 20px; margin-top: 16px; border-top: 1px dashed var(--line); }
#studio-message { margin-top: 20px; }
#studio-recovery { margin-bottom: 22px; }
#studio-preview { margin-top: 28px; }
#studio-preview-title { font: 700 26px/1.5 var(--sans); margin-top: 25px; }
#studio-preview-body { overflow: auto; }
#studio-preview-body pre, #studio-preview-body .katex-display, #studio-preview-body table { overflow: auto; max-width: 100%; }
#studio-preview-body img { max-height: 800px; object-fit: contain; }
.studio-deployment { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 20px 0; color: var(--muted); font: 11px/1.7 var(--mono); }
.studio-deployment p { max-width: 90ch; }
.studio-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 24px 0; padding-top: 20px; border-top: 1px dashed var(--line); color: var(--muted); font: 10px/1.7 var(--mono); }
.studio-dialog { width: min(520px, calc(100% - 36px)); padding: 28px; background: var(--sheet); color: var(--ink); border: 1px solid var(--line); box-shadow: 7px 8px 0 var(--edge-shadow); }
.studio-dialog::backdrop { background: #15120dc7; }
.studio-dialog h2 { margin-top: 0; font: 750 24px/1.3 var(--sans); }
.studio-dialog p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .studio-layout { padding-inline: 24px; } .studio-grid { grid-template-columns: minmax(210px, .8fr) minmax(0, 2fr); gap: 18px; } .studio-sheet { padding: 20px; } .studio-stamp { display: none; } }
@media (max-width: 760px) { .studio-grid { grid-template-columns: 1fr; } #studio-posts { max-height: 240px; } .studio-library { padding: 16px; } .studio-post { padding: 12px 8px; } .studio-heading h1 { font-size: 44px; } #studio-body { min-height: 380px; } }
@media (max-width: 460px) { .studio-layout { padding-inline: 14px; } .studio-masthead { gap: 12px; padding-block: 20px; } .studio-brand { font-size: 21px; padding: 8px; } .studio-brand img { width: 30px; height: 30px; } .studio-brand .wordmark { width: 136px; } .studio-masthead>a:not(.studio-brand) { font-size: 10px; } .studio-masthead .theme-toggle { margin-left: 0; padding-left: 9px; } .studio-sheet { padding: 16px; } .studio-fields { grid-template-columns: 1fr; gap: 16px; } .studio-wide { grid-column: auto; } .studio-savebar .community-button { flex: 1 1 auto; } .studio-input-prefix { gap: 4px; } .community-button { padding-inline: 10px; } .article-comments, .comments-section { padding: 20px 16px; } .comments-form { padding: 14px; } .comment-meta { gap: 8px; } }
@media print { .article-comments, .comments-section, [data-comments-slug], .studio-savebar, .studio-tabs, .studio-library, .studio-masthead, #studio-account, .studio-footer, .studio-deployment { display: none !important; } }
