:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; color: #282b30; background: #fff; --muted: #777c85; --line: #e9e9ec; --accent: #862a43; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { height: 100dvh; display: flex; flex-direction: column; }
.locked main { height: auto; min-height: 100svh; }
button, input, select { font: inherit; color: inherit; }
button, input, select { border: 1px solid var(--line); border-radius: 7px; background: #fff; }
button { cursor: pointer; padding: 8px 12px; }
button:hover { background: #f5f5f7; }
button:disabled { opacity: .55; cursor: wait; }
input, select { min-width: 0; padding: 10px 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-header { flex: none; height: 60px; padding: 0 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 18px; font-weight: 700; color: #25272c; letter-spacing: -.4px; }
.brand span { font-weight: 400; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 20px; white-space: nowrap; font-size: 14px; }
.header-actions a, #expiry { color: var(--muted); }
#message:empty { display: none; }
#message { flex: none; margin: 0; padding: 10px 24px; color: var(--accent); background: #fff6f8; font-size: 12px; }
.locked { background: #f7f7f8; }
.locked .app-header { border: 0; }
.login-stage { min-height: calc(100svh - 60px); display: grid; place-items: center; padding: 32px 20px 92px; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.lock-icon { width: 52px; height: 52px; margin: 0 auto 26px; border: 1px solid #e5dce0; border-radius: 15px; display: grid; place-items: center; color: var(--accent); background: #fff; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; color: var(--muted); font-weight: 600; }
.login-card h1 { font-size: 27px; letter-spacing: -.8px; margin: 12px 0; font-weight: 650; }
.login-description { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 28px; }
#login-form { display: grid; gap: 12px; }
#code { width: 100%; height: 58px; text-align: center; font-size: 25px; letter-spacing: 14px; padding-left: 26px; border-color: #dcdce1; font-family: ui-monospace, monospace; }
#code::placeholder { color: #bbbcc4; opacity: 1; }
#login-button { height: 44px; background: var(--accent); color: #fff; border: 0; font-weight: 600; }
#login-button:hover { background: #702139; }
#login-button span { margin-left: 10px; }
#login-warning { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 22px; }
.login-card #message { color: var(--accent); font-size: 15px; line-height: 1.6; border-radius: 8px; }
.workspace { flex: 1; display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 0; }
.sidebar { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fafafb; }
.sidebar-tools { padding: 20px 18px 0; }
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sidebar-heading h1 { font-size: 17px; margin: 0; letter-spacing: -.3px; }
#refresh { font-size: 13px; padding: 6px 9px; color: #666b74; }
#search { width: 100%; background: #fff; font-size: 15px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.filters select { width: 100%; padding: 7px 8px; font-size: 14px; background: transparent; }
#count { font-size: 13px; color: var(--muted); margin: 15px 0 10px; }
.list-scroll { overflow-y: auto; min-height: 0; padding: 0 8px 12px; }
.gist { display: block; text-align: left; width: 100%; border: 1px solid transparent; background: transparent; padding: 13px 10px; margin-bottom: 3px; }
.gist:hover { background: #f0f0f3; }
.gist[aria-current="true"] { background: #f3e9ed; border-color: #ead9e0; }
.gist-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.55; font-weight: 600; overflow-wrap: anywhere; }
.gist[aria-current="true"] .gist-title { color: #78253d; }
.gist-file { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 13px; color: var(--muted); margin-top: 5px; }
.gist-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 9px; }
#empty { padding: 16px 10px; color: var(--muted); font-size: 15px; }
.preview { min-width: 0; overflow: hidden; background: #fff; }
.preview-empty { display: grid; place-content: center; height: 100%; text-align: center; color: var(--muted); padding: 24px; }
.preview-empty > span { font-family: ui-monospace, monospace; font-size: 40px; color: #c8c9d0; }
.preview-empty h2 { font-size: 17px; font-weight: 500; color: #575b65; margin: 22px 0 0; }
.preview-empty p { font-size: 15px; line-height: 1.6; }
.preview-detail { display: flex; flex-direction: column; height: 100%; }
.preview-header { padding: 24px 32px 18px; border-bottom: 1px solid var(--line); }
.preview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.preview-heading h2 { font-size: 19px; line-height: 1.5; letter-spacing: -.4px; margin: 0; overflow-wrap: anywhere; }
#gist-source { font-size: 14px; white-space: nowrap; padding-top: 5px; }
#preview-meta { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.file-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 32px; border-bottom: 1px solid var(--line); }
#file-select { max-width: 75%; font: 14px ui-monospace, monospace; padding: 7px 9px; border: 0; background: #f5f5f7; text-overflow: ellipsis; }
#view-source { font-size: 13px; padding: 6px 9px; }
#view-source[aria-pressed="true"] { background: #f3e9ed; color: var(--accent); }
#preview-status { margin: 0; padding: 12px 32px; font-size: 14px; color: var(--muted); line-height: 1.6; }
#preview-status:empty { display: none; }
.preview-content { padding: 28px 32px 60px; overflow: auto; min-height: 0; flex: 1; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.markdown { max-width: 880px; margin: 0 auto; }
.markdown > :first-child { margin-top: 0; }
.markdown h1, .markdown h2, .markdown h3 { line-height: 1.4; letter-spacing: -.4px; margin: 1.5em 0 .65em; }
.markdown h1 { font-size: 27px; }.markdown h2 { font-size: 23px; }.markdown h3 { font-size: 19px; }
.markdown p, .markdown ul, .markdown ol { margin: .8em 0; }
.markdown blockquote { border-left: 3px solid #ddc1cb; margin: 20px 0; padding: 1px 18px; color: #656572; }
.markdown hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.preview-content pre { background: #f6f6f8; padding: 18px; border: 1px solid var(--line); border-radius: 8px; overflow: auto; font-size: 14px; line-height: 1.75; tab-size: 2; white-space: pre; overflow-wrap: normal; }
.preview-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.preview-content pre code { font-size: inherit; }
.markdown :not(pre) > code { background: #f1f1f4; padding: 2px 5px; border-radius: 4px; }
.markdown table { display: block; overflow: auto; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 9px 12px; min-width: 100px; }
.markdown th { background: #fafafb; text-align: left; }
#back-to-list { display: none; }
@media (min-width: 1500px) { .workspace { grid-template-columns: 370px minmax(0, 1fr); } .preview-header, .file-bar { padding-left: 40px; padding-right: 40px; } }
@media (max-width: 760px) {
  .app-header { padding: 0 16px; height: 56px; }.header-actions { gap: 12px; }#expiry { display: none; }
  .workspace { display: block; overflow: hidden; }
  .sidebar, .preview { height: 100%; }.sidebar { border: 0; }.preview { display: none; }
  .workspace.has-selection .sidebar { display: none; }.workspace.has-selection .preview { display: block; }
  #back-to-list { display: inline-block; font-size: 14px; margin-bottom: 16px; padding: 0; border: 0; color: var(--muted); }
  .preview-header { padding: 18px 20px; }.preview-heading { gap: 16px; }.preview-heading h2 { font-size: 17px; }
  .file-bar { padding: 10px 16px; }.preview-content { padding: 22px 20px 40px; }#preview-status { padding: 12px 20px; }
  .login-stage { min-height: calc(100svh - 56px); padding-bottom: 72px; }
}
