
:root { color-scheme: light; --paper: #fafafa; --ink: #202020; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { height: 100dvh; padding: 32px clamp(24px, 5vw, 80px) 24px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 24px; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 23px; letter-spacing: -.8px; font-weight: 600; }
.brand img { width: 38px; height: 38px; border-radius: 9px; mix-blend-mode: multiply; transform: translateY(-9px); }
main { width: min(1120px, 100%); min-height: 0; margin: auto; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 100px); align-items: center; }
.features { display: flex; flex-direction: column; gap: clamp(22px, 4vh, 44px); }
.annotation { min-width: 0; }
.index { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; letter-spacing: .6px; color: #858585; margin-bottom: 10px; }
h1, h2 { font-size: clamp(23px, 2.5vw, 32px); letter-spacing: -.8px; line-height: 1.2; font-weight: 500; margin: 0 0 12px; }
p { font-size: 16px; line-height: 1.85; margin: 0; color: #666; }
.preview { min-width: 0; display: flex; justify-content: center; }
.app { position: relative; width: 100%; max-width: 490px; height: min(640px, 72dvh); margin: 0; border: 1px solid #cdcdcd; border-radius: 18px; background: #fafafa; color: #333; box-shadow: 0 24px 55px -24px #0003, inset 0 0 0 1px #ffffff; display: flex; flex-direction: column; overflow: hidden; }
.toolbar { height: 42px; min-height: 42px; display: flex; align-items: center; padding: 0 12px; gap: 18px; background: linear-gradient(#f3f3f3, #fafafa); }
.traffic { display: flex; gap: 7px; }
.traffic i { width: 11px; height: 11px; background: #ff545c; border-radius: 50%; }
.traffic i:nth-child(2) { background: #ffc500; }
.traffic i:nth-child(3) { background: #26c940; }
.window-tools { display: flex; gap: 12px; align-items: center; padding: 3px 7px; border: 1px solid #ddd; border-radius: 16px; color: #777; box-shadow: inset 0 1px 2px #00000005; }
.window-tools svg { width: 17px; height: 17px; }
.notes { padding: 13px 22px 110px; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #c5c5c5 transparent; flex: 1; min-height: 0; }
.notes:focus-visible { outline: 2px solid #999; outline-offset: -3px; }
.note { margin: 0 0 30px; }
.note p { font-size: 14px; line-height: 1.55; margin: 0; color: #333; }
.note .ask-tag { margin-top: 20px; }
.note-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #888; font-size: 12px; }
.note-meta svg { width: 13px; height: 13px; color: #999; flex-shrink: 0; }
.reply-count { display: flex; align-items: center; gap: 4px; color: #999; }
.link-preview { display: flex; justify-content: space-between; color: #666; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.link-preview span:last-child { color: #999; }
.link-domain { font-size: 12px; color: #888; margin-bottom: 9px; }
footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 24px; font-size: 14px; }
a { color: #666; text-decoration: none; }
a:hover { color: #111; text-decoration: underline; text-underline-offset: 5px; }
a:focus-visible { outline: 2px solid #222; outline-offset: 5px; }
footer span { color: #999; }
@media (max-width: 850px) {
 body { padding: 26px 28px 22px; }
 main { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
 .features { gap: 28px; }
 .index { letter-spacing: 0; }
 .app { height: min(590px, 70dvh); }
 .notes { padding: 12px 20px 110px; }
 }
@media (max-width: 560px) {
 body { padding: 20px 16px; gap: 20px; }
 main { gap: 16px; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
 .features { gap: 22px; }
 .index { display: none; }
 h1, h2 { font-size: 21px; }
 p { font-size: 14px; line-height: 1.7; }
 .app { height: min(540px, 70dvh); }
 .toolbar { padding: 0 10px; gap: 10px; }
 .notes { padding: 12px 12px 110px; }
 .note p { font-size: 12px; }
 footer { gap: 14px; font-size: 12px; }
}
@media (max-height: 650px) {
 body { padding-top: 18px; padding-bottom: 16px; gap: 16px; }
 .features { gap: 16px; }
 .index { display: none; }
 h1, h2 { font-size: 22px; margin-bottom: 7px; }
 p { font-size: 14px; line-height: 1.6; }
}

.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-notes { color: #777; font-size: 14px; line-height: 1.6; }


.composer { position: absolute; z-index: 2; inset: auto 0 0; margin: 0; height: var(--compact-dock, 74px); padding: 16px 16px 14px; pointer-events: none; transition: height .24s ease-in-out, padding-bottom .24s ease-in-out; }
.composer.is-writing { height: calc(100% - 42px); padding-bottom: 24px; }
.query { position: relative; width: 100%; height: 100%; border-radius: 16px; background: #fafafaf5; backdrop-filter: blur(18px); box-shadow: 0 0 0 1px #d7d7d7, inset 0 1px 1px #fff, 0 3px 12px #00000005; pointer-events: auto; }
.query:focus-within { box-shadow: 0 0 0 1px #b6b6b6, inset 0 1px 1px #fff, 0 3px 12px #00000005; }
.query > svg { position: absolute; width: 16px; height: 28px; left: 12px; bottom: 8px; color: #999; }
.query textarea { position: absolute; top: 8px; bottom: 8px; left: 38px; width: calc(100% - 84px); height: auto; min-height: 28px; padding: 5px 0; border: 0; outline: none; resize: none; background: transparent; font: 14px/18px -apple-system, BlinkMacSystemFont, sans-serif; color: #333; scrollbar-width: none; transition: bottom .24s ease-in-out; }
.query textarea::placeholder { color: #999; }
.composer.is-writing textarea { bottom: 58px; }
.clear-query { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; background: transparent; color: #999; font: 22px/28px sans-serif; cursor: pointer; padding: 0; }
.query-actions { position: absolute; right: 16px; bottom: 16px; height: 28px; display: flex; align-items: center; gap: 12px; }
.query-actions[hidden], .clear-query[hidden] { display: none; }
.query-actions button { white-space: nowrap; border: 1px solid #d6d6d6; border-radius: 6px; background: linear-gradient(#fff, #f5f5f5); box-shadow: 0 1px 2px #0000000a; padding: 4px 8px; color: #444; font: 12px/18px -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; }
.query-actions #ask-agent { color: #007aff; }
.query button:focus-visible { outline: 2px solid #999; outline-offset: 2px; }
.note-status { position: absolute; bottom: 54px; left: 38px; right: 16px; font-size: 12px; line-height: 1.5; color: #777; background: #fafafa; }
.note-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .composer, .query textarea { transition: none; } }
@media (max-width: 560px) { .query-actions { gap: 5px; right: 8px; } .query-actions button { white-space: normal; padding: 3px; } }
.preview { position: relative; z-index: 3; }
.toolbar { cursor: grab; touch-action: none; user-select: none; }
.toolbar.dragging { cursor: grabbing; }
.toolbar:focus-visible { outline: 2px solid #999; outline-offset: -3px; }
.window-dock { position: absolute; pointer-events: none; border-radius: 18px; opacity: 0; background: rgba(0, 0, 0, .025); box-shadow: inset 0 0 0 1px #0000000c, inset 0 2px 15px #00000006; transition: opacity .18s ease, background .18s ease, box-shadow .18s ease; }
.window-dock.is-away { opacity: 1; }
.window-dock.snap-ready { opacity: 1; background: #00000006; box-shadow: inset 0 0 0 1px #00000025, 0 0 20px #00000005; }
@media (prefers-reduced-motion: reduce) { .window-dock { transition: none; } }
