@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700&display=swap');

:root { --blue: #175a83; --turquoise: #0796a5; --ink: #172b3a; --muted: #617782; --line: #d9e6eb; --soft: #edf8fa; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: #f3f7f9; font-family: "DM Sans", system-ui, sans-serif; }
button, input { font: inherit; }
.export-banner { position: relative; z-index: 2; padding: 11px 24px; border-bottom: 1px solid; font-size: 13px; font-weight: 600; text-align: center; }
.export-ok { border-color: #a9ddd2; color: #176354; background: #e7f8f3; }
.export-error { border-color: #e3aaa1; color: #8d3126; background: #fff1ef; }
.page-head { padding: 28px 24px 46px; background: linear-gradient(145deg, #fff 20%, #e7f8fa 70%, #c7ecef); }
.head-inner { width: 100%; max-width: 1040px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 30px; color: var(--blue); font-size: 13px; font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--turquoise); }
.head-title { display: flex; align-items: center; gap: 17px; }
.head-title img { border: 3px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 28px rgba(13,73,102,.15); }
.head-title p { margin: 0 0 3px; color: var(--turquoise); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(29px, 4vw, 44px)/1.1 "Manrope", sans-serif; letter-spacing: -.035em; }
.intro { max-width: 720px; margin: 19px 0 23px; color: var(--muted); line-height: 1.65; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stats span { padding: 8px 13px; border: 1px solid rgba(7,150,165,.18); border-radius: 999px; color: #3f6878; background: rgba(255,255,255,.68); font-size: 12px; }
.stats strong { color: var(--blue); }
.page-main { width: 100%; max-width: 1040px; margin: -25px auto 0; padding: 0 24px 50px; }
.material-card { min-height: 300px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(13,73,102,.09); }
.tools { display: flex; gap: 12px; margin-bottom: 17px; }
.search-box { min-width: 0; display: flex; flex: 1; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #c8dce3; border-radius: 12px; color: var(--turquoise); background: #fff; }
.search-box:focus-within { border-color: #38aeb8; box-shadow: 0 0 0 3px rgba(35,174,184,.12); }
.search-box input { width: 100%; padding: 11px 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.tools button { padding: 10px 14px; border: 1px solid #b9dce1; border-radius: 11px; color: var(--blue); background: var(--soft); cursor: pointer; }
.tools button:hover { border-color: #79c3cc; background: #ddf3f5; }
.search-note { min-height: 18px; margin: -5px 2px 7px; color: var(--muted); font-size: 12px; }
.material-tree { font-size: 14px; }
.tree-folder { border-top: 1px solid #edf2f4; }
.material-tree > .tree-folder:first-child { border-top: 0; }
summary { display: flex; align-items: center; gap: 9px; padding: 11px 9px; border-radius: 9px; cursor: pointer; list-style: none; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--blue); background: var(--soft); }
summary::before { content: "›"; color: #75a8b5; font-size: 19px; line-height: 1; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.folder-icon { width: 17px; height: 13px; border-radius: 2px; background: #74c5ce; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.node-name { min-width: 0; overflow-wrap: anywhere; }
.node-count { margin-left: auto; padding: 2px 8px; border-radius: 999px; color: #52798a; background: #edf5f7; font-size: 11px; font-weight: 700; }
.tree-children { margin-left: 17px; padding-left: 14px; border-left: 1px solid #dcebed; }
.tree-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; color: #365363; }
.tree-file:hover { color: var(--blue); background: #f7fbfc; }
.file-name { min-width: 0; }
.file-description { color: var(--muted); font-size: 12px; }
.file-name small { display: block; margin-top: 2px; color: #8aa0a9; font-size: 10px; }
.word-count { flex: 0 0 auto; margin-left: auto; padding-left: 8px; color: #91a4ac; font-size: 10px; white-space: nowrap; }
.file-icon { width: 34px; flex: 0 0 auto; padding: 3px 2px; border-radius: 5px; color: #087f8c; background: #e1f4f6; font-size: 8px; font-weight: 700; text-align: center; text-transform: uppercase; }
.forum-folder > summary .folder-icon { background: var(--blue); }
[hidden] { display: none !important; }
.foot-note { margin: 16px 7px 0; color: #748a94; font-size: 11px; line-height: 1.55; text-align: center; }
.error-box, .empty-box { padding: 20px; border-radius: 12px; color: var(--muted); background: var(--soft); text-align: center; }

@media (max-width: 620px) {
    .page-head { padding: 20px 16px 40px; }
    .back-link { margin-bottom: 22px; }
    .head-title img { width: 54px; height: 54px; }
    .page-main { padding: 0 10px 35px; }
    .material-card { padding: 13px; border-radius: 14px; }
    .tools { display: block; }
    .tools button { width: 100%; margin-top: 8px; }
    .tree-children { margin-left: 8px; padding-left: 8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; } }
