@font-face { font-family: 'Jacquard 24'; src: url('/font.ttf'); font-display: swap; }
:root { color-scheme: light; --ink: #30312d; --paper: #f0f4f8; --line: #a3a9ad; font: 16px/1.6 Georgia, serif; color: var(--ink); background: var(--paper); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: url('/grain.svg'); }
button, input, textarea { color: inherit; font: inherit; }
button, .button { border: 1px solid var(--line); padding: .45rem .8rem; background: transparent; border-radius: 0; text-decoration: none; cursor: pointer; }
button:hover:not(:disabled), .image-picker:hover { background: #30312d10; }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.primary:hover:not(:disabled) { background: #51544b; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.topbar { display: flex; align-items: center; gap: 2rem; padding: 1rem 2rem; border-bottom: 1px dashed var(--line); }
.brand { font: 2.5rem/1 'Jacquard 24', serif; text-decoration: none; white-space: nowrap; }
.eyebrow, .small, .pane-label, .source-footer, .filename, .sidebar-note, #repository, #notice, #attachments { font-family: 'Courier New', monospace; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.account { margin-left: auto; display: flex; gap: 1rem; align-items: center; font-size: .8rem; }
.small { font-size: .7rem; color: #666f74; }
.welcome { max-width: 42rem; margin: 15vh auto; padding: 2rem; }
.welcome h1 { font-size: 2.6rem; font-weight: 400; line-height: 1.2; }
.welcome .button { display: inline-block; margin-top: 1rem; }
#workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 75px); }
.sidebar { padding: 1.5rem 1.1rem; border-right: 1px dashed var(--line); }
.sidebar-title { display: flex; justify-content: space-between; align-items: center; }
.sidebar h1 { font-size: 1.3rem; font-weight: 400; margin: 0; }
.sidebar button { font-size: .85rem; }
#repository { font-size: .65rem; overflow-wrap: anywhere; margin: 1rem 0 1.5rem; }
#posts { display: grid; gap: .4rem; }
#posts button { text-align: left; border-color: transparent; overflow-wrap: anywhere; }
#posts button[aria-current="page"] { border-color: var(--line); background: #30312d09; }
.sidebar-note { color: #697176; margin-top: 3rem; font-size: .7rem; }
.desk { min-width: 0; padding: 1.5rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.filename { display: flex; align-items: baseline; font-size: .75rem; }
.filename input { background: transparent; border: 0; border-bottom: 1px solid var(--line); width: 13rem; padding: .3rem; }
.actions { display: flex; gap: .5rem; font-size: .8rem; }
#notice { min-height: 2.5rem; font-size: .75rem; padding: .7rem 0; margin: .5rem 0; }
#notice[data-error="true"] { color: #8a3530; }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px dashed var(--line); }
.pane-label { min-height: 3rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .3rem; padding: .65rem 1rem; font-size: .75rem; border-bottom: 1px dashed var(--line); }
.source-pane { border-right: 1px dashed var(--line); min-width: 0; }
.image-picker { cursor: pointer; padding: .15rem .5rem; }
#source { display: block; width: 100%; height: 60vh; min-height: 350px; border: 0; padding: 1rem; resize: vertical; background: #ffffff40; font: .8rem/1.8 'Courier New', monospace; tab-size: 2; }
#source:focus { outline: 1px solid var(--ink); outline-offset: -1px; }
.source-footer { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; font-size: .65rem; color: #697176; }
#attachments { list-style: none; padding: 0 1rem; margin: 0; font-size: .7rem; }
#attachments li { padding: .4rem 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; overflow-wrap: anywhere; }
#attachments button { font-size: .65rem; }
#preview { display: block; width: 100%; border: 0; height: calc(60vh + 2.5rem); min-height: 390px; background: #ffffff20; }
@media (max-width: 1000px) { .panes { grid-template-columns: 1fr; } .source-pane { border-right: 0; border-bottom: 1px dashed var(--line); } .topbar .eyebrow { display: none; } }
@media (max-width: 640px) { .topbar { padding: 1rem; gap: .5rem; } .brand { font-size: 2rem; } #workspace { grid-template-columns: 1fr; } .sidebar { border-right: 0; border-bottom: 1px dashed var(--line); } .sidebar-note { display: none; } #posts { display: flex; flex-wrap: wrap; } .desk { padding: 1rem; } .filename input { width: 9rem; } }

dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); max-width: min(32rem, 90vw); padding: 1.5rem; }
dialog::backdrop { background: #30312d55; }
dialog input { width: 100%; padding: .5rem; background: #fff8; border: 1px solid var(--line); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.5rem; }

#conversion { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 1rem; font: .75rem/1.5 monospace; }
.image-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.optimize-toggle { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; white-space: nowrap; }
.optimize-toggle input { accent-color: var(--ink); width: 1rem; height: 1rem; margin: 0; cursor: pointer; }
