:root {
    color-scheme: light;
    --ink: #1d281f;
    --muted: #566259;
    --line: #dce2d8;
    --canvas: #f5f6f0;
    --surface: #fff;
    --deep: #18261f;
    --accent: #cdec93;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #598831; outline-offset: 3px; }
svg { flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
.directory-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 16px clamp(16px, 3vw, 48px); border-bottom: 1px solid var(--line); background: #fcfdf9; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 16px; }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: var(--deep); }
.section-nav { display: flex; align-items: center; gap: 16px; padding-left: 20px; border-left: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.section-nav a:hover, .breadcrumbs a:hover, .view-all:hover { text-decoration: underline; }
.toolbar { display: flex; margin-left: auto; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; min-width: 0; max-width: 100%; color: var(--muted); background: var(--surface); }
.search:focus-within { outline: 2px solid #598831; outline-offset: 2px; }
.search input { min-width: 0; width: min(228px, 63vw); min-height: 40px; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 14px; }
.directory { max-width: 1650px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 48px) 52px; }
.inventory { margin-top: 26px; scroll-margin-top: 18px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head h1 { font-size: 24px; letter-spacing: -.04em; }
.count { min-width: 24px; text-align: center; padding: 4px 6px; border-radius: 7px; background: #e6ebdf; color: #465643; font-size: 12px; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.card { position: relative; padding: 11px 13px; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; box-shadow: 0 3px 11px #22352009; scroll-margin-top: 16px; }
.card:target { border-color: #8ba875; }
.card-top { display: flex; align-items: center; min-height: 42px; gap: 10px; margin-right: 50px; list-style: none; cursor: pointer; border-radius: 8px; }
.card-top::-webkit-details-marker { display: none; }
.card-top:hover .site-title strong { color: #4a673c; }
.card-chevron { flex: none; color: var(--muted); }
.site-details[open] .card-chevron { transform: rotate(90deg); }
.card-folders { margin-top: 12px; }
.link-editor, .link-saved { margin-top: 12px; font-size: 13px; }
.link-editor > summary { width: fit-content; cursor: pointer; font-weight: 650; color: #36582b; }
.link-editor form { margin-top: 10px; display: grid; gap: 7px; }
.link-editor label { font-weight: 650; }
.link-editor input[type="url"] { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #aebbad; border-radius: 7px; }
.link-editor form p:not(.form-error) { color: var(--muted); }
.link-editor .button { justify-self: start; }
.link-saved { color: #36582b; }
.tile { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; }
.globe, .folder { background: #e8f1df; color: #426536; }
.movie { background: #eee9f8; color: #694b8a; }
.database { background: #f8eddc; color: #825a23; }
.site-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-title strong { font-size: clamp(16px, 1.6vw, 19px); letter-spacing: -.025em; }
.site-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 11px; min-height: 40px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.primary { background: #4a673c; color: #fff; }
.primary:hover { background: #37522b; }
.site-launch { position: absolute; top: 11px; right: 13px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #dce7d1; border-radius: 9px; background: #f3f7ee; color: #36532c; }
.site-launch:hover, .quiet:hover { background: #dceacb; }
.quiet { background: transparent; color: var(--muted); }
.file-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfb; }
.file-list li + li { border-top: 1px solid #e9ede6; }
.entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px; min-height: 34px; color: #36582b; font-size: 13px; }
.entry span { overflow-wrap: anywhere; }
a.entry:hover { background: #eef4e7; }
a.entry:hover span { text-decoration: underline; }
.entry.file { color: var(--ink); }
.entry.file svg, .entry small { color: var(--muted); }
.entry small { white-space: nowrap; font-size: 12px; }
.breadcrumbs, .view-all { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #36582b; font-size: 12px; overflow-wrap: anywhere; }
.breadcrumbs { margin-bottom: 10px; }
.view-all { margin-top: 10px; width: fit-content; font-weight: 650; }
.empty, .notice { padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--muted); }
.notice { margin-bottom: 12px; background: #f0f5e8; }
.add-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.add-panel[data-enhanced]:not([open]) { display: none; }
.add-panel summary { cursor: pointer; color: #36582b; font-size: 14px; font-weight: 650; }
.add-panel p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.add-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 13px; }
.add-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.add-form input, .add-form select { max-width: 100%; min-height: 40px; background: #fff; color: var(--ink); border: 1px solid #aebbad; border-radius: 7px; padding: 7px 9px; font: inherit; font-weight: 400; }
.add-form p.form-error { flex-basis: 100%; color: #a12122; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top, #364f3b, var(--deep) 70%); }
.auth-card { width: min(100%, 410px); background: var(--surface); padding: clamp(22px, 6vw, 36px); border-radius: 16px; }
.auth-card .eyebrow { margin-top: 18px; }
.auth-card h1 { font-size: 39px; }
.auth-form { margin-top: 20px; display: grid; gap: 9px; }
.auth-form label { font-size: 13px; font-weight: 650; }
.auth-form input[type="password"] { border: 1px solid #aebbad; border-radius: 7px; padding: 10px; width: 100%; }
.auth-form button { margin-top: 5px; }
.form-error { color: #a12122; font-size: 13px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; color: #496239; font-size: 11px; font-weight: 750; }
.auth-card h1 { letter-spacing: -.05em; margin: 8px 0; }
.auth-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
@media (max-width: 1080px) {
    .toolbar { margin-left: 0; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .directory-header { gap: 12px; }
    .section-nav { padding-left: 10px; gap: 9px; }
    .toolbar { width: 100%; }
    .search { flex: 1 0 100%; }
    .search input { width: 100%; }
    .card-top { gap: 8px; }
    .add-form label { width: 100%; }
}
