:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #102e4b; background: #f8f7f4; font-synthesis: none;
  --navy: #102e4b; --blue: #246fdb; --muted: #5c6e80; --line: #e2e8ee;
  --sand: #f8f7f4; --sky: #edf5ff; --yellow: #ffb629;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button, summary { font: inherit; cursor: pointer; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
main:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
p { line-height: 1.6; }
h1, h2, h3 { letter-spacing: -.035em; }
h2 { font-size: 1.35rem; margin-bottom: 8px; }
h3 { font-size: 1.14rem; margin-bottom: 8px; }
.icon { width: 22px; height: 22px; flex-shrink: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 14px 20px; background: white; z-index: 10; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; padding: 30px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 3; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 1.3rem; font-weight: 780; letter-spacing: -.055em; white-space: nowrap; margin-bottom: 48px; }
#navigation { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 12px 15px; border-radius: 12px; color: #50677d; font-size: .88rem; font-weight: 550; }
.nav-link.active { background: var(--sky); color: #1764c8; font-weight: 650; }
.nav-caption { margin: 30px 15px 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .61rem; color: var(--muted); }
.unavailable { color: #7c8995; }
.unavailable small { margin-left: auto; font-size: .6rem; background: #f3f5f7; border-radius: 5px; padding: 3px 5px; }
.sidebar-note { margin: auto 15px 0; padding-top: 60px; }
.sidebar-note p { font-size: .84rem; margin: 12px 0 7px; font-weight: 550; }
.sidebar-note span { font-size: .7rem; color: var(--muted); }
.workspace { margin-left: 238px; }
.masthead { min-height: 88px; padding: 22px 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #fbfaf8; }
.desktop-label { font-size: .8rem; color: var(--muted); }
.readonly { display: inline-flex; align-items: center; gap: 7px; font-size: .73rem; padding: 7px 12px; background: white; border: 1px solid var(--line); border-radius: 20px; white-space: nowrap; }
.readonly:before { content: ""; width: 6px; height: 6px; background: var(--blue); border-radius: 50%; }
.mobile-brand, .mobile-navigation { display: none; }
main { max-width: 1350px; margin: auto; padding: 26px 44px 36px; }
.mode-notice { font-size: .71rem; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.hero { display: flex; align-items: center; justify-content: space-between; min-height: 300px; overflow: hidden; position: relative; background: linear-gradient(115deg, #eef5fb, #f3f7f8 60%, #fff0d6); border: 1px solid #e6ebec; border-radius: 24px; padding: 36px 38px; margin-bottom: 24px; gap: 16px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; font-size: .64rem; letter-spacing: .12em; font-weight: 700; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.hero .eyebrow { color: #42627f; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.12; white-space: pre-line; margin-bottom: 15px; letter-spacing: -.055em; }
.tagline { font-size: 1rem; font-weight: 570; margin-bottom: 15px; }
.hero-description { white-space: pre-line; font-size: .82rem; color: var(--muted); margin-bottom: 23px; }
.harbor-art { width: 220px; height: 220px; flex-shrink: 0; display: grid; place-items: center; position: relative; border: 1px solid #fff9; border-radius: 50%; background: #ffffff35; }
.harbor-art:before, .harbor-art:after { content: ""; position: absolute; border: 1px solid #ffffffa6; border-radius: 50%; inset: -24px; }
.harbor-art:after { inset: -48px; }
.harbor-art img { width: 150px; height: 150px; transform: translateY(-7px); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 12px 17px; min-height: 44px; border-radius: 11px; font-size: .8rem; font-weight: 600; border: 1px solid var(--line); background: white; color: var(--navy); }
.primary { color: white; background: var(--blue); border-color: var(--blue); }
.primary .icon { width: 18px; height: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 16px; margin-bottom: 37px; }
.stat { display: flex; align-items: center; gap: 17px; padding: 23px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.stat > .icon { color: var(--blue); width: 26px; height: 26px; }
.stat:last-child > .icon { color: #967020; }
.stat strong { display: block; font-size: 1.5rem; letter-spacing: -.04em; margin-bottom: 4px; }
.stat:last-child strong { font-size: 1.04rem; }
.stat span { font-size: .73rem; color: var(--muted); line-height: 1.5; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.section-heading p, .section-heading h2 { margin-bottom: 0; }
.page-title { font-size: 1.9rem; margin-bottom: 7px; }
.text-link { padding: 12px 0; font-size: .79rem; font-weight: 600; min-height: 44px; }
.household-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.household-card { display: grid; grid-template-columns: 76px 1fr; column-gap: 20px; align-items: center; padding: 25px; background: white; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 5px 18px #102e4b03; min-width: 0; }
.box-symbol { display: grid; place-items: center; width: 76px; height: 82px; background: #eef5ff; border-radius: 17px; color: #3f7ac3; }
.box-symbol .icon { width: 40px; height: 40px; stroke-width: 1.15; }
.box-symbol.sand { background: #fff5e5; color: #987333; }
.household-copy p { margin-bottom: 5px; }
.household-card > .card-link, .household-card > details { grid-column: 1 / -1; }
.household-card .technical { margin-top: 0; border-top: 0; }
.household-card summary { padding-bottom: 0; }
.library-banner { display: flex; align-items: center; gap: 22px; padding: 26px 30px; background: #edf3fa; border: 1px solid #dfe8f3; border-radius: 19px; margin-top: 30px; color: var(--navy); }
.library-banner > .icon:first-child { width: 32px; height: 32px; color: var(--blue); }
.library-banner > .icon:last-child { margin-left: auto; color: var(--blue); }
.library-banner h2 { font-size: 1.13rem; }
.library-banner p { margin-bottom: 0; color: var(--muted); font-size: .81rem; }
.households { display: inline-flex; padding: 4px; background: #eaf0f5; border-radius: 13px; gap: 4px; margin-bottom: 23px; }
.households a { display: grid; place-items: center; min-width: 105px; min-height: 44px; padding: 10px 20px; color: var(--muted); font-size: .87rem; font-weight: 650; border-radius: 10px; }
.households .selected { background: #fff; color: var(--navy); box-shadow: 0 2px 5px #102e4b0a; }
.box-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.box-panel:empty, .tabs:empty { display: none; }
.box-panel h2 { font-size: 1.2rem; margin-bottom: 0; }
.box-panel .technical { border: 0; margin: 0; font-size: .75rem; }
.box-facts { margin: 0 0 15px; display: flex; flex-wrap: wrap; gap: 16px; }
.tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--line); margin: 22px 0 29px; }
.tabs a { padding: 13px 0; min-height: 46px; color: var(--muted); font-size: .83rem; font-weight: 600; }
.tabs .active { color: var(--blue); border-bottom: 2px solid var(--blue); }
.muted { color: var(--muted); font-size: .82rem; }
.notice { font-size: .77rem; line-height: 1.6; padding: 14px 17px; border-radius: 12px; background: #edf3f9; margin-bottom: 24px; color: #4b637b; }
.grid, .library-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card, .file-card { background: white; border: 1px solid var(--line); border-radius: 19px; overflow: hidden; min-width: 0; box-shadow: 0 5px 16px #102e4b04; }
.cover { aspect-ratio: 1.6; background: linear-gradient(140deg, #e0effc, #f4f8fc); display: grid; place-items: center; position: relative; overflow: hidden; color: #618fb9; }
.cover > .icon { width: 48px; height: 48px; stroke-width: 1; }
.cover img { position: absolute; width: 100%; height: 100%; object-fit: contain; background: #e9efdf; }
.card:nth-child(even) .cover { background: linear-gradient(140deg, #fbefd8, #faf6ee); color: #a78a56; }
.card-body, .file-body { padding: 22px; min-width: 0; }
.content-title { font-size: 1.17rem; line-height: 1.35; margin-bottom: 8px; overflow-wrap: anywhere; }
.assignment { display: flex; align-items: baseline; gap: 7px; font-size: .75rem; color: var(--muted); margin: 17px 0 13px; line-height: 1.5; }
.assignment.assigned { color: #205d93; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: #8495a5; }
.assigned .status-dot { background: var(--blue); }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .63rem; background: #f0f3f6; color: #536777; border-radius: 6px; padding: 5px 7px; line-height: 1.35; }
.badge.positive { background: #eaf5ee; color: #236341; }
.card-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-top: 1px solid var(--line); padding: 14px 0 0; margin-top: 20px; font-size: .79rem; font-weight: 600; }
.card-link .icon { width: 17px; height: 17px; }
.detail-card { display: grid; grid-template-columns: minmax(180px, .7fr) 1.3fr; }
.detail-card .cover { aspect-ratio: auto; min-height: 320px; }
.detail-card .card-body { padding: 30px; }
.detail-card .content-title { font-size: 1.65rem; }
.detail-card .facts { margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin: 0; }
.pair dt { font-size: .73rem; color: var(--muted); margin-bottom: 5px; }
.pair dd { margin: 0; font-size: .81rem; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; overflow-wrap: anywhere; }
.technical { border-top: 1px solid var(--line); margin-top: 21px; }
.technical summary { font-size: .77rem; color: #486580; padding: 15px 0; min-height: 44px; }
.technical[open] summary { font-weight: 650; }
.technical > .facts { padding: 5px 0 14px; }
.source-block { background: #f3f6f9; border-radius: 10px; padding: 15px; margin-bottom: 16px; }
.source-block p:last-child { margin-bottom: 0; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; font-size: .84rem; overflow-wrap: anywhere; margin-bottom: 15px; }
.breadcrumbs a { padding: 12px 0; min-height: 44px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; margin-bottom: 15px; }
.folder-card { padding: 18px 20px; }
.folder-link { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: .9rem; font-weight: 650; overflow-wrap: anywhere; }
.folder-link span { min-width: 0; }
.folder-link .icon:first-child { color: #957026; width: 28px; height: 28px; }
.folder-link .icon:last-child { margin-left: auto; width: 17px; }
.folder-card p { margin: 4px 0 0 40px; font-size: .71rem; }
.file-card .facts { grid-template-columns: 1fr; }
.filename { overflow-wrap: anywhere; }
.empty { padding: 30px; background: #fff; border: 1px dashed #c9d5e1; border-radius: 18px; grid-column: 1 / -1; }
.error { background: #fff4ee; border-color: #eac7b3; color: #803e24; }
.error .primary { margin-top: 10px; }
.loading { color: var(--muted); padding: 40px 0; }
.footnote { font-size: .7rem; line-height: 1.65; color: var(--muted); margin: 19px 0 0; }
footer { max-width: 1350px; margin: auto; padding: 20px 44px 26px; display: flex; justify-content: space-between; gap: 15px; font-size: .69rem; color: var(--muted); }
@media (min-width: 1600px) { .grid, .library-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .sidebar { width: 212px; padding: 26px 15px; } .workspace { margin-left: 212px; }
  main { padding: 24px 28px 30px; } .masthead { padding-inline: 28px; } .grid, .library-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 30px; } .harbor-art { width: 155px; height: 155px; } .harbor-art img { width: 115px; height: 115px; }
  .stat { padding: 19px 15px; gap: 12px; } .household-card { padding: 20px; grid-template-columns: 58px 1fr; gap: 14px; } .box-symbol { width: 58px; height: 70px; }
}
@media (max-width: 800px) {
  .sidebar, .desktop-label { display: none; } .workspace { margin-left: 0; }
  .masthead { padding: 12px 20px; min-height: 68px; } .mobile-brand { display: flex; gap: 8px; align-items: center; color: var(--navy); font-weight: 750; letter-spacing: -.04em; font-size: 1.06rem; }
  .readonly { font-size: .65rem; padding: 6px 9px; } main { padding: 19px 20px 25px; }
  .mobile-navigation { position: fixed; bottom: 0; inset-inline: 0; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px #102e4b05; }
  .mobile-navigation .nav-link { flex-direction: column; gap: 5px; justify-content: center; min-height: 55px; padding: 6px; font-size: .64rem; border-radius: 10px; }
  .mobile-navigation .icon { width: 21px; height: 21px; }
  footer { padding: 16px 20px calc(94px + env(safe-area-inset-bottom)); font-size: .63rem; }
  .mode-notice { margin-bottom: 19px; font-size: .65rem; }
}
@media (max-width: 540px) {
  .hero { padding: 29px 23px; min-height: 0; border-radius: 21px; margin-bottom: 17px; }
  .hero h1 { font-size: 2.05rem; max-width: 280px; }
  .hero .eyebrow { font-size: .59rem; }
  .harbor-art { position: absolute; width: 160px; height: 160px; right: -83px; bottom: 3px; opacity: .15; }
  .hero-description { font-size: .78rem; max-width: 250px; white-space: normal; }
  .tagline { font-size: .87rem; } .hero .primary { font-size: .77rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 27px; }
  .stat { padding: 17px; gap: 12px; } .stat:last-child { grid-column: 1 / -1; padding: 14px 17px; }
  .stat:last-child > div { display: flex; align-items: center; gap: 13px; } .stat:last-child strong { font-size: .82rem; margin-bottom: 0; white-space: nowrap; } .stat:last-child span { font-size: .67rem; }
  .stat strong { font-size: 1.25rem; } .stat span { font-size: .69rem; } .stat > .icon { width: 23px; height: 23px; }
  .household-grid, .grid, .library-list { grid-template-columns: 1fr; gap: 16px; }
  .household-card { grid-template-columns: 60px 1fr; padding: 20px; gap: 0 17px; } .box-symbol { width: 60px; height: 69px; }
  .household-copy h3 { font-size: 1.05rem; } .household-card .technical summary { font-size: .7rem; }
  .library-banner { padding: 22px 20px; gap: 17px; margin-top: 23px; } .library-banner h2 { font-size: 1.04rem; } .library-banner p { font-size: .71rem; }
  .section-heading { gap: 10px; } .section-heading h2 { font-size: 1.2rem; } .page-title { font-size: 1.65rem; }
  .section-heading p { font-size: .73rem; } .secondary { padding: 10px 12px; font-size: .7rem; white-space: nowrap; }
  .box-panel { display: block; } .box-panel h2 { font-size: 1.13rem; } .box-panel .technical summary { padding-bottom: 5px; }
  .households { display: flex; margin-bottom: 20px; } .households a { flex: 1; } .tabs { margin-top: 15px; gap: 25px; }
  .tabs a { font-size: .78rem; } .notice { font-size: .71rem; padding: 12px 14px; }
  .card:not(.detail-card) { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: start; padding: 18px; gap: 16px; }
  .card:not(.detail-card) .cover { width: 84px; height: 108px; border-radius: 11px; aspect-ratio: auto; }
  .card:not(.detail-card) .card-body { padding: 0; }
  .content-title { font-size: 1.07rem; } .card .muted { font-size: .75rem; }
  .assignment { font-size: .7rem; margin-top: 13px; } .flags { gap: 5px; } .badge { font-size: .6rem; padding: 5px 6px; }
  .card-link { font-size: .76rem; margin-top: 15px; padding-top: 12px; }
  .detail-card { display: block; } .detail-card .cover { aspect-ratio: 1.5; min-height: 0; } .detail-card .card-body { padding: 23px; }
  .detail-card .content-title { font-size: 1.5rem; } .file-card .cover { aspect-ratio: 2.2; } .file-body { padding: 21px; }
  .footnote { font-size: .65rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button, summary { transition: background-color .15s ease, border-color .15s ease; }
  .primary:hover { background: #195dbd; } .nav-link:not(.unavailable):hover { background: #edf4fc; }
  .card-link:hover, .text-link:hover { text-decoration: underline; }
}

.mobile-navigation.member-navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions form { margin: 0; }
.account-name { font-size: .8rem; }
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: 100%; max-width: 440px; padding: 36px; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 48px #102e4b08; }
.login-panel > img { margin-bottom: 22px; }
.login-panel h1 { font-size: 1.85rem; }
.login-panel form { display: grid; gap: 9px; margin-top: 28px; }
.login-panel label { font-size: .83rem; font-weight: 600; }
.login-panel input:not([type=hidden]) { width: 100%; min-height: 48px; font: inherit; padding: 12px; border: 1px solid #a7b8c8; border-radius: 10px; margin-bottom: 12px; color: var(--navy); background: white; }
.login-panel input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.login-panel button { margin-top: 8px; font-size: .95rem; }
@media(max-width: 540px) { .account-name { display: none; } .header-actions { gap: 6px; } .header-actions:has(form) .readonly { display: none; } .login-page { padding: 20px; } .login-panel { padding: 27px; } }
