@font-face {
  font-family: "Golos Text";
  src: url("/fonts/golos-text.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #f3f5f8;
  --paper: #ffffff;
  --ink: #182334;
  --muted: #677487;
  --line: #dce2ea;
  --blue: #2456d6;
  --blue-strong: #1845bd;
  --blue-tint: #edf2ff;
  --amber: #8a5816;
  --amber-tint: #fff4df;
  --red: #a12c32;
  --green: #267650;
  --font: "Golos Text", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 var(--font); }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 3px; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #8baafa; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }
.hidden { display: none !important; }
.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; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.boot { min-height: 100svh; display: grid; place-items: center; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 16px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 550; line-height: 20px; text-decoration: none; transition: background-color 130ms, border-color 130ms; }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--blue-strong); border-color: var(--blue-strong); }
.button.secondary { background: var(--paper); border-color: #cad3e0; }
.button.secondary:hover:not(:disabled) { background: #f8faff; border-color: #a4b6d2; }
.button.quiet { color: #45546c; padding: 8px 10px; }
.button.quiet:hover:not(:disabled) { background: #e8edf5; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-button:hover:not(:disabled) { background: #e6ebf3; color: var(--ink); }
.text-link { font-size: 12px; }
.section-label { display: block; color: var(--muted); font-size: 12px; font-weight: 450; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -.7px; text-decoration: none; }
.brand img { display: block; }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 20; padding: 10px 20px; background: white; }
.skip-link:focus { top: 10px; }
.app-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.app-header-inner { max-width: none; margin: 0 auto; min-height: 56px; padding: 0 24px; display: flex; align-items: center; gap: 24px; }
.workspace-name { padding-left: 25px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.header-divider { width: 1px; height: 24px; background: var(--line); }
.account-name { font-size: 12px; color: #45546c; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; border: 1px solid #d6dfef; border-radius: 50%; width: 34px; height: 34px; background: var(--blue-tint); color: var(--blue); font-size: 12px; font-weight: 600; }
.avatar:hover { border-color: var(--blue); }
.library { max-width: none; margin: auto; padding: 22px 24px 30px; }
.library:focus { outline: none; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 38px; font-weight: 600; line-height: 1.2; letter-spacing: -1.3px; margin-bottom: 10px; }
.library-heading h1 { font-size: 25px; letter-spacing: -.6px; margin: 0; }
.library-heading .button { padding: 7px 12px; }
.library-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 15px; }
.scope-controls { display: flex; align-items: center; border-bottom: 1px solid var(--line); gap: 18px; min-height: 43px; }
.scope { border: 0; border-bottom: 2px solid transparent; padding: 11px 0; margin-bottom: -1px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 13px; }
.scope span { margin-left: 5px; font-size: 11px; color: #59677b; padding: 2px 6px; border-radius: 4px; background: #e7ecf3; }
.scope.active { color: var(--ink); border-bottom-color: var(--blue); font-weight: 550; }
.scope.active span { color: var(--blue); background: #e5edff; }
.scope:hover { color: var(--blue); }
.search { display: flex; align-items: center; gap: 9px; border: 1px solid #d4dce7; border-radius: 7px; background: var(--paper); width: 300px; max-width: 100%; height: 40px; padding: 0 12px; color: #8490a0; }
.search:focus-within { border-color: var(--blue); outline: 2px solid #c5d5ff; }
.search .icon { width: 17px; height: 17px; }
.search input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; padding: 0; color: var(--ink); font-size: 12px; }
.search input:focus-visible { outline: none; }
.tag-filter-bar { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 16px; }
.tag-filter-label { padding-top: 6px; color: var(--muted); font-size: 11px; }
.tag-filters { display: flex; flex: 1; min-width: 0; flex-wrap: wrap; gap: 6px; }
.tag-bubble { display: inline-flex; max-width: 100%; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 11px; line-height: 16px; }
.tag-bubble > span:first-child { min-width: 0; overflow-wrap: anywhere; text-align: left; }
.tag-bubble:hover { border-color: var(--blue); color: var(--blue); }
.tag-bubble[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: white; }
.tag-count { flex-shrink: 0; opacity: .7; font-variant-numeric: tabular-nums; }
.clear-tag-filters { flex-shrink: 0; padding: 6px 0; border: 0; background: transparent; color: var(--blue); font-size: 11px; }
.list-heading { display: grid; grid-template-columns: minmax(0, 1fr) 170px 105px; gap: 16px; padding: 0 16px 8px 58px; color: var(--muted); font-size: 11px; }
.skill-list { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.skill-list:empty { display: none; }
.skill-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 170px 105px; gap: 16px; align-items: center; width: 100%; text-align: left; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink); transition: background-color 130ms; }
.skill-row:last-child { border-bottom: 0; }
.skill-row:hover { background: #f8faff; }
.skill-row:focus-visible { outline-offset: -3px; }
.skill-file { width: 26px; height: 32px; display: grid; place-items: center; background: #f0f4fc; color: #5073b4; border-radius: 5px; }
.skill-file .icon { width: 20px; height: 20px; }
.skill-main { min-width: 0; }
.skill-title-line { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.skill-title-line .skill-title { font-size: 14px; font-weight: 550; letter-spacing: -.25px; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.skill-slug { font-size: 11px; color: #637084; overflow-wrap: anywhere; }
.skill-description { max-width: 100ch; font-size: 12px; line-height: 1.65; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.skill-tag { color: #637084; font-size: 10px; }
.skill-state { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; font-size: 11px; }
.state-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; background: #eaf4ee; color: var(--green); font-size: 10px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.state-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.state-badge.draft { background: var(--amber-tint); color: var(--amber); }
.draft-note { padding-left: 3px; color: var(--muted); font-size: 10px; }
.skill-date { font-size: 11px; color: var(--muted); }
.skill-date small { display: block; color: #637084; font-size: 10px; margin-top: 4px; }
.library-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.library-footer p { margin: 0; }
.storage-link { display: flex; align-items: center; gap: 7px; padding: 3px 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.storage-link:hover { color: var(--blue); }
.empty { padding: 70px 24px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.empty-icon { display: grid; place-items: center; margin: 0 auto 20px; color: #7290c5; background: #eff4fc; width: 60px; height: 65px; border-radius: 8px; }
.empty-icon .icon { width: 32px; height: 32px; }
.empty h2 { font-size: 21px; font-weight: 550; letter-spacing: -.45px; margin-bottom: 10px; }
.empty p { font-size: 13px; color: var(--muted); margin-bottom: 23px; line-height: 1.8; }
.notice { padding: 15px 18px; color: #635029; background: var(--amber-tint); border: 1px solid #eedbb5; border-radius: 7px; font-size: 12px; line-height: 1.6; }
.error-notice { background: #fff3f2; color: var(--red); border-color: #f0c8c6; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#load-error { margin-bottom: 20px; }
.list-loading { text-align: center; padding: 40px; color: var(--muted); }

/* The document is the primary work surface. Metadata remains a quiet sidebar. */
dialog { max-width: calc(100vw - 32px); margin: auto; padding: 0; color: var(--ink); background: var(--paper); border: 1px solid #ccd5e3; border-radius: 12px; box-shadow: 0 25px 90px #10223d35; }
dialog::backdrop { background: #15264480; }
.editor { width: min(1180px, calc(100vw - 48px)); height: min(860px, 92svh); max-height: 92svh; overflow: hidden; }
.editor form { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.editor-header { grid-row: 1; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.editor-header h2 { font-size: 19px; line-height: 1.3; font-weight: 550; letter-spacing: -.5px; margin: 4px 0 0; overflow-wrap: anywhere; }
.editor-header-actions { display: flex; gap: 15px; align-items: center; }
#editor-error { grid-row: 2; border: 0; border-bottom: 1px solid #f0c8c6; border-radius: 0; }
.editor-fields { grid-row: 3; display: grid; grid-template-columns: 284px minmax(0, 1fr); min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; }
.editor-sidebar { min-height: 0; padding: 18px 20px; background: #f6f8fb; border-right: 1px solid var(--line); overflow: auto; }
.editor-sidebar label, .dialog-body label { display: block; font-size: 12px; font-weight: 550; margin: 14px 0 6px; }
.editor-sidebar > label:first-child { margin-top: 0; }
.editor-sidebar input, .editor-sidebar textarea, .editor-sidebar select, .dialog-body input { display: block; width: 100%; min-width: 0; border: 1px solid #cdd6e3; background: white; color: var(--ink); border-radius: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.5; }
.editor-sidebar textarea { resize: vertical; min-height: 100px; }
.editor-sidebar input:disabled { background: #edf0f5; color: #7a879a; }
.field-help { font-size: 10px; color: #637084; line-height: 1.7; margin: 7px 0 0; }
.version-panel { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 20px; }
.version-panel summary { font-size: 12px; font-weight: 550; cursor: pointer; }
.version-panel summary span { margin-left: 7px; font-size: 10px; font-weight: 400; color: var(--muted); }
.version-panel .button { font-size: 11px; padding: 8px; margin: 12px 0; width: 100%; }
.version-panel .text-link { display: block; font-size: 11px; }
.document-workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: white; }
.document-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); min-height: 49px; }
.file-picker { display: flex; align-items: center; min-width: 0; gap: 6px; color: #5879b2; }
.file-picker .icon { width: 17px; height: 17px; }
.file-picker select { min-width: 0; max-width: 240px; border: 0; background: white; color: #37485f; padding: 5px 3px; font-size: 12px; }
.file-actions { display: flex; align-items: center; }
.file-actions .button { padding: 5px 8px; font-size: 11px; }
.file-actions .icon-button { width: 27px; height: 29px; }
.file-actions .icon { width: 16px; height: 16px; }
.view-toggle { display: flex; align-items: center; margin-left: auto; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: #f4f6fa; }
.view-toggle button { border: 0; border-radius: 3px; padding: 5px 11px; background: transparent; color: var(--muted); font-size: 11px; }
.view-toggle button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 3px #18365d12; }
.document-preview { flex: 1 1 0; overflow: auto; min-height: 0; padding: 36px 44px 55px; }
.markdown { font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.markdown > * { max-width: 72ch; }
.markdown h1 { font-size: 29px; font-weight: 600; line-height: 1.3; margin: 25px 0 21px; letter-spacing: -.8px; }
.markdown h2 { font-size: 20px; font-weight: 550; line-height: 1.4; margin: 32px 0 14px; letter-spacing: -.35px; }
.markdown h3, .markdown h4, .markdown h5, .markdown h6 { font-size: 16px; font-weight: 550; margin: 23px 0 10px; }
.markdown p { margin: 0 0 17px; }
.markdown li { padding-left: 3px; margin-bottom: 9px; }
.markdown ul, .markdown ol { margin: 0 0 22px; padding-left: 24px; }
.markdown strong { font-weight: 600; }
.markdown code, .markdown pre, .info-content pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.markdown code { font-size: .87em; padding: 2px 5px; border-radius: 4px; background: #eef2f7; color: #345071; }
.markdown pre, .info-content pre { overflow-x: auto; padding: 18px 20px; background: #f0f3f8; border: 1px solid #e0e6f0; border-radius: 6px; font-size: 12px; line-height: 1.8; white-space: pre; }
.markdown pre code { padding: 0; background: none; }
.markdown blockquote { margin: 20px 0; padding: 2px 0 2px 20px; border-left: 3px solid #bacbef; color: #63758d; }
.markdown blockquote p:last-child { margin-bottom: 0; }
.markdown hr { height: 1px; border: 0; background: var(--line); margin: 30px 0; }
.markdown .frontmatter { margin: 0 0 23px; color: var(--muted); font-size: 11px; }
.frontmatter summary { cursor: pointer; }
.frontmatter pre { margin: 10px 0 0; font-size: 11px; }
.code-editor { flex: 1 1 0; min-height: 0; border: 0; resize: none; outline-offset: -3px; width: 100%; padding: 28px 30px; color: #25364f; font: 12px/1.85 ui-monospace, "SFMono-Regular", Consolas, monospace; tab-size: 2; background: #fff; }
.document-meta { display: flex; justify-content: space-between; gap: 20px; padding: 9px 20px; font-size: 9px; color: #637084; border-top: 1px solid #edf0f5; }
.editor-footer { grid-row: 4; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 20px; background: white; border-top: 1px solid var(--line); }
.editor-footer p { font-size: 11px; color: var(--muted); margin: 0; }
.editor-footer p.unsaved { color: var(--amber); }
.editor-footer > div { display: flex; gap: 10px; }
.editor-footer .button { font-size: 12px; }
.info-dialog { width: min(650px, calc(100vw - 32px)); max-height: 88svh; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 20px; font-weight: 550; letter-spacing: -.4px; }
.info-content { padding: 20px; font-size: 13px; line-height: 1.8; }
.info-content h3 { font-size: 13px; margin: 25px 0 8px; font-weight: 600; }
.info-content p { color: #58677d; margin: 0 0 16px; max-width: 70ch; }
.info-content pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 17px; color: #284264; }
.command-block { position: relative; }
.command-block pre { padding-right: 56px; }
.command-block .icon-button { position: absolute; top: 9px; right: 9px; }
.small-dialog { width: min(440px, calc(100vw - 32px)); }
.dialog-body { padding: 24px 26px; }
.dialog-body label:first-child { margin-top: 0; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); }
.field-error { color: var(--red); font-size: 11px; margin: 10px 0 0; }
.confirm-body h2 { font-size: 21px; margin: 0 0 14px; font-weight: 550; }
.confirm-body p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 8px; background: #1c2c46; color: white; font-size: 12px; box-shadow: 0 8px 30px #11223c20; z-index: 100; }
.toast.error { background: #923c40; }

/* A single column for signing into the personal library. */
.login { min-height: 100svh; display: grid; place-items: center; background: var(--blue); color: white; padding: 40px 24px; }
.login-content { display: flex; flex-direction: column; align-items: center; gap: 44px; width: min(340px, 100%); }
.brand-inverse { color: white; }
.brand-inverse img { border: 1px solid #6e8de4; border-radius: 8px; }
.document-illustration { height: 230px; width: 230px; position: relative; margin-left: 20px; }
.illustration-back, .illustration-middle, .illustration-front { position: absolute; width: 177px; height: 205px; border-radius: 8px; }
.illustration-back { background: #8ba8f2; transform: rotate(-10deg); top: 0; left: -14px; }
.illustration-middle { background: #c4d5ff; transform: rotate(-5deg); top: 11px; left: 3px; }
.illustration-front { background: white; color: #365dba; top: 25px; left: 21px; padding: 24px 23px; }
.illustration-front > .icon { display: block; width: 26px; height: 26px; margin-bottom: 8px; }
.illustration-front b { font: 550 12px var(--font); }
.illustration-tab { position: absolute; right: 24px; top: 0; width: 20px; height: 31px; background: #c5d7ff; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.document-rule { display: block; width: 100%; height: 4px; background: #e5ecf9; margin-top: 12px; border-radius: 2px; }
.document-rule.short { width: 63%; margin-top: 8px; }
.document-rule.medium { width: 80%; margin-top: 8px; }
.document-check { position: absolute; bottom: -16px; right: -50px; display: flex; align-items: center; gap: 6px; background: #e4edff; color: #264ea9; border: 4px solid var(--blue); padding: 9px 13px; font-size: 10px; border-radius: 8px; white-space: nowrap; }
.document-check .icon { width: 15px; height: 15px; }
.login-form { width: 100%; text-align: center; }
.login-button { width: 100%; background: white; color: var(--ink); border-color: white; }
.login-button:hover { background: #edf2ff; border-color: #edf2ff; }
.yandex-mark { background: white; color: #df3635; font-size: 16px; font-weight: 600; height: 22px; width: 22px; border-radius: 4px; display: grid; place-items: center; }
.login-form .button.quiet { color: white; margin-top: 12px; }
.login-form .button.quiet:hover { background: #ffffff18; }
#setup-note { margin: 20px 0 0; text-align: left; }

@media (min-width: 1500px) {
  .library { padding-top: 24px; }
}
@media (max-width: 1000px) {
  .app-header-inner { padding: 0 28px; }
  .workspace-name { display: none; }
  .library { padding: 22px 24px; }
  .list-heading { grid-template-columns: minmax(0, 1fr) 145px 85px; padding-left: 58px; gap: 16px; }
  .skill-row { grid-template-columns: 26px minmax(0, 1fr) 145px 85px; padding: 12px 16px; gap: 16px; }
  .skill-title-line { display: block; }
  .skill-slug { margin-top: 3px; display: block; }
  .editor-fields { grid-template-columns: 250px minmax(0, 1fr); }
  .editor-sidebar { padding: 18px; }
  .document-preview { padding: 27px 28px 45px; }
  .document-toolbar { padding: 12px; gap: 3px; }
  .file-picker select { max-width: 165px; }
  .view-toggle button { padding: 5px 8px; }
}
@media (max-width: 760px) {
  .app-header-inner { padding: 0 20px; min-height: 56px; }
  .brand { font-size: 20px; }
  .account-name, .header-divider { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .button { font-size: 11px; padding: 7px; }
  .library { padding: 20px 16px; }
  h1 { font-size: 32px; }
  .library-heading { align-items: flex-start; margin-bottom: 16px; gap: 15px; }
  .library-heading > .button { white-space: nowrap; font-size: 11px; padding: 9px 12px; margin-top: 3px; }
  .library-heading > .button .icon { width: 16px; height: 16px; }
  .library-controls { flex-direction: column-reverse; align-items: stretch; gap: 15px; margin-bottom: 18px; }
  .scope-controls { gap: 23px; }
  .search { width: 100%; }
  .list-heading { display: none; }
  .skill-row { grid-template-columns: 32px minmax(0, 1fr); gap: 8px 12px; padding: 12px; }
  .skill-file { width: 26px; height: 32px; align-self: start; }
  .skill-file .icon { width: 22px; height: 22px; }
  .skill-state { grid-column: 2; flex-direction: row; align-items: center; gap: 9px; }
  .skill-date { display: none; }
  .skill-title-line { margin-bottom: 3px; }
  .skill-title-line .skill-title { font-size: 15px; }
  .skill-description { font-size: 11px; }
  .skill-tags { margin-top: 3px; }
  .library-footer { font-size: 10px; flex-wrap: wrap; gap: 6px; }
  .storage-link { font-size: 10px; }
  .editor { max-width: 100vw; width: 100%; height: 100svh; max-height: 100svh; border: 0; border-radius: 0; }
  .editor-header { padding: 17px 18px; }
  .editor-header h2 { font-size: 18px; }
  .editor-header-actions { gap: 5px; }
  .editor-fields { display: block; overflow: auto; }
  .editor-sidebar { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; padding: 22px; }
  .editor-sidebar textarea { min-height: 75px; }
  .document-workspace { min-height: 65svh; }
  .document-preview, .code-editor { min-height: 50svh; max-height: 70svh; flex-basis: auto; }
  .document-toolbar { padding: 12px 16px; }
  .file-picker select { max-width: 45vw; }
  .document-meta { font-size: 9px; padding: 10px 16px; }
  .document-meta > span:last-child { display: none; }
  .editor-footer { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .editor-footer > p { width: 100%; }
  .editor-footer > div { width: 100%; }
  .editor-footer .button { flex: 1; font-size: 11px; padding: 10px; }
  .error-notice { flex-direction: column; align-items: flex-start; gap: 8px; }
  .login { padding: 32px 24px; }
  .login-content { gap: 36px; }
}
@media (max-width: 400px) {
  .header-actions .button span { display: none; }
  .scope-controls { gap: 16px; }
  .scope { font-size: 12px; }
  .library-heading > .button { padding: 8px; gap: 4px; }
  .skill-row { padding: 12px; gap: 8px 12px; }
  .view-toggle button { padding: 5px 6px; font-size: 10px; }
  .file-picker select { max-width: 115px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.setup-steps { padding-left: 20px; margin: 0 0 18px; color: #45546c; }
.setup-steps li { margin-bottom: 8px; padding-left: 2px; }
.setup-details { margin: 18px 0 14px; }
.setup-details summary { color: var(--muted); cursor: pointer; font-size: 12px; }
.setup-task { display: block; width: 100%; margin-top: 12px; padding: 12px; resize: vertical; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #f6f8fb; font: 12px/1.7 ui-monospace, monospace; }

.attachment-preview { padding: 2rem; text-align: center; }
.attachment-preview h3 { overflow-wrap: anywhere; }
