@font-face{font-family:DM Sans;src:url('/assets/dm-sans.woff2') format('woff2');font-style:normal;font-weight:400 700;font-display:swap}
@font-face{font-family:Instrument Serif;src:url('/assets/instrument-serif.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Instrument Serif;src:url('/assets/instrument-serif-italic.woff2') format('woff2');font-style:italic;font-weight:400;font-display:swap}

:root {
  color-scheme: light;
  --ink: #21271e;
  --muted: #5b6355;
  --surface: #fbfbf7;
  --paper: #fff;
  --line: #dedfd6;
  --soft: #edeFE6;
  --green: #354732;
  --green-hover: #273a28;
  --focus: #45663e;
  --danger: #902e28;
  --serif: 'Instrument Serif', Georgia, serif;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
:disabled { cursor: wait; opacity: .65; }
::selection { background: #dce5ce; color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.boot {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  width: max-content;
  border-radius: 4px;
}
.brand img { width: 109px; height: auto; }
.brand-rule { height: 24px; width: 1px; background: #cdd0c4; }
.brand-product { font-size: 1.125rem; font-weight: 600; letter-spacing: -.035em; }

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 44px;
  gap: 9px;
  padding: 10px 15px;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.button svg, .icon-button svg { flex: none; }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.secondary:hover { background: #f3f5ee; border-color: #aebbaa; }
.icon-button { min-width: 44px; padding: 0; color: var(--ink); background: var(--paper); border-color: var(--line); }
.icon-button:hover { background: var(--soft); border-color: #aebbaa; }
.danger-outline { color: var(--danger); background: #fff; border-color: #e2bab5; }
.danger-outline:hover { background: #fff1ee; border-color: #c68880; }
.danger { color: #fff; background: #943831; border-color: #943831; }
.danger:hover { background: #752821; border-color: #752821; }

.access { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); min-height: 100svh; }
.access-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 34px clamp(24px, 4.25vw, 76px) 24px;
  background: var(--surface);
}
.access-header { justify-self: start; }
.access-content {
  align-self: center;
  justify-self: center;
  width: min(100%, 430px);
  padding-block: 54px 48px;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #515c48;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-label > span { display: block; width: 21px; height: 1px; background: #738265; }
.access h1 {
  margin-top: 22px;
  font: 400 clamp(3.55rem, 6.1vw, 6.45rem)/.87 var(--serif);
  letter-spacing: -.04em;
}
.access h1 em { color: #546849; font-weight: 400; }
.access-description {
  max-width: 34ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.access-form { margin-top: 31px; display: grid; gap: 8px; }
.access-form > .field:first-child { margin-bottom: 9px; }
.access-form > .primary { min-height: 51px; margin-top: 12px; }
.field { min-width: 0; display: grid; gap: 7px; color: var(--ink); font-size: .9rem; font-weight: 650; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #cbd0c3;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--paper);
  color: #56614f;
}
.input-wrap:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px #758a6a2e; }
.input-wrap > svg { flex: none; }
.input-wrap input {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}
.input-wrap input::placeholder { color: #6d7567; }
.input-wrap .icon-button { margin-inline-end: -9px; border-color: transparent; background: transparent; }
.input-wrap .icon-button:hover { background: var(--soft); }
.field-hint { font-size: .84rem; color: var(--muted); line-height: 1.45; }
.form-error { color: var(--danger); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.access-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .8rem; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: #879181; margin-inline: 2px; }
.access-image {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  overflow: hidden;
  background: #364138;
}
.access-image::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: #364138 url('/assets/archive.jpg') center 54% / cover no-repeat;
  animation: image-in .8s ease-out both;
}
.access-content { animation: content-in .45s ease-out both; }

.workspace { display: grid; min-height: 100svh; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 23px 15px 16px;
  border-right: 1px solid var(--line);
  background: #f2f3eb;
}
.sidebar-header { padding-inline: 10px; }
.sidebar .brand img { width: 96px; }
.sidebar .brand { gap: 9px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 39px; }
.nav-link {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: .88rem;
  color: #434d3f;
  font-weight: 550;
  transition: background .18s ease;
}
.nav-link:hover { background: #e9ede2; }
.nav-link[aria-current='page'] { background: #e1e8d9; border-color: #d6e0cf; color: #263e2a; font-weight: 700; }
.nav-count { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.profile { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding: 14px 1px 0; margin-top: auto; }
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #dce5d4;
  color: #344831;
  font-weight: 700;
  font-size: .8rem;
}
.profile-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.profile-text strong { font-size: .82rem; font-weight: 700; }
.profile-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .75rem; }
.profile .icon-button { background: transparent; }
.profile .icon-button:hover { background: #e6eadf; }

.library { min-width: 0; padding: 61px clamp(23px, 5.4vw, 92px) 60px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.library-heading h1, .guest h1 {
  font: 400 clamp(3.65rem, 6vw, 6rem)/.9 var(--serif);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.library-heading p, .guest-heading p { margin-top: 12px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.library-heading .primary { flex: none; min-height: 47px; }
.documents { margin-top: 25px; }
.documents-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.view-heading h2 { font-size: 1.17rem; letter-spacing: -.025em; font-weight: 700; line-height: 1.3; }
.result-count { font-size: .82rem; color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search { width: clamp(135px, 16vw, 230px); min-height: 44px; padding: 0 10px; gap: 8px; }
.search input { min-height: 42px; font-size: .9rem; }
.sort {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.sort select {
  min-width: 0;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: inherit;
  min-height: 42px;
  padding: 0 30px 0 11px;
  color: var(--ink);
  background: transparent;
  font-size: .88rem;
}
.sort > svg { pointer-events: none; position: absolute; right: 10px; }
.display-options { flex: none; display: flex; gap: 3px; }
.display-options .icon-button[aria-pressed='true'] { background: #e5ebdd; border-color: #cad7c2; color: #233f28; }

.results { margin-top: 15px; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  min-height: 330px;
  justify-content: center;
  padding: 28px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: center;
}
.empty-art {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  margin-bottom: 3px;
}
.empty-art span {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 58px;
  border: 1px solid #a5b59d;
  border-radius: 7px;
  background: #edf2e8;
  color: var(--green);
}
.empty-art span:nth-child(1) { transform: translateX(-15px) rotate(-15deg); background: #f4f4ec; }
.empty-art span:nth-child(2) { transform: translateX(15px) rotate(15deg); background: #f5f1e7; }
.empty-art span:nth-child(3) { transform: translateY(-2px); }
.empty h3 { font: 400 clamp(1.8rem, 4vw, 2.25rem)/1 var(--serif); }
.empty p { color: var(--muted); line-height: 1.45; }
.empty .button { margin-top: 5px; }
.empty small { color: var(--muted); font-size: .8rem; }

.file-list, .file-grid { list-style: none; display: grid; margin: 0; padding: 0; }
.file-list { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.file-list li + li { border-top: 1px solid var(--line); }
.file-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); gap: 12px; }
.file-grid li { min-width: 0; }
.file-entry {
  display: grid;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 11px 13px;
  color: var(--ink);
  transition: background .18s ease, border-color .18s ease;
}
.file-entry:hover { background: #f0f3eb; }
.file-entry:focus-visible { position: relative; z-index: 1; outline-offset: -2px; }
.file-list .file-entry { min-height: 69px; grid-template-columns: 43px minmax(0, 1fr) auto auto 17px; }
.file-list li:first-child .file-entry { border-radius: 11px 11px 0 0; }
.file-list li:last-child .file-entry { border-radius: 0 0 11px 11px; }
.file-list li:only-child .file-entry { border-radius: 11px; }
.file-art {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 8px;
  background: #e9ede3;
  color: #4e6447;
}
.pdf-art { color: #80483e; background: #f4eae5; }
.file-info { display: grid; min-width: 0; gap: 4px; }
.file-info strong { font-size: .95rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.file-info > span, .file-date { color: var(--muted); font-size: .81rem; }
.file-status { display: flex; gap: 5px; color: #576e50; }
.file-status > span { display: grid; place-items: center; }
.file-chevron { display: grid; place-items: center; color: #62705d; }
.file-grid .file-entry {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 9px;
  padding: 8px 8px 10px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.file-grid .file-entry:hover { border-color: #aebbaa; background: #f2f5ed; }
.file-grid .file-art { position: relative; grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 1.7; overflow: hidden; }
.file-grid .file-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file-grid .file-info, .file-grid .file-date { margin-left: 4px; }
.file-grid .file-chevron { display: none; }

.uploads, .upload-item { margin-top: 12px; }
.upload-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: .88rem;
}
.upload-item div { display: grid; gap: 5px; min-width: 0; }
#upload-name { overflow-wrap: anywhere; }
.upload-item progress { width: 100%; accent-color: var(--green); }
.drop-overlay { position: fixed; z-index: 4; inset: 15px; pointer-events: none; display: grid; place-items: center; border: 2px dashed #617955; border-radius: 16px; background: #f3f7eeef; }
.drop-overlay > div { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 20px; }
.drop-overlay strong { font: 400 2.6rem/.95 var(--serif); }

.dialog {
  color: var(--ink);
  width: min(520px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #cfd6c9;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 26px 90px #172a1840;
}
.dialog[open] { animation: content-in .22s ease-out both; }
.dialog::backdrop { background: #19251bb0; }
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}
.dialog-heading h2 { font: 400 clamp(1.8rem, 4vw, 2.6rem)/.98 var(--serif); overflow-wrap: anywhere; }
.dialog-heading p { margin-top: 6px; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.dialog-heading .icon-button { flex: none; }
.dialog-form { display: grid; gap: 13px; padding: 17px 19px 20px; }
.dialog-form > p:not(.form-error) { line-height: 1.5; overflow-wrap: anywhere; }
.dialog-actions, .document-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions { justify-content: flex-end; margin-top: 4px; }
.document-dialog { width: min(990px, calc(100% - 28px)); }
.document-preview-body { padding: 13px 17px; }
.document-actions { padding: 0 17px 17px; }
.preview {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #e9ede3;
  overflow: hidden;
}
.preview > img { max-height: 56vh; max-width: 100%; object-fit: contain; }
.preview-pdf iframe { width: 100%; height: 52vh; min-height: 280px; border: 0; background: #fff; }
.pdf-mobile { display: none; }
.share-status { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; background: #e8eee1; color: #2f4830; }
.share-status > div { display: grid; gap: 2px; }
.share-status span { color: var(--muted); font-size: .85rem; }
.notices {
  position: fixed;
  z-index: 5;
  right: 16px;
  bottom: 16px;
  max-width: min(410px, calc(100% - 32px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.notice { background: var(--green); color: white; padding: 12px 15px; border-radius: 8px; box-shadow: 0 4px 16px #273b2630; overflow-wrap: anywhere; }
.notice-error { background: #833c35; }

.guest { min-height: 100svh; }
.guest-header { display: flex; align-items: center; min-height: 68px; border-bottom: 1px solid var(--line); padding: 8px clamp(16px, 5vw, 64px); background: #f0f2e9; }
.guest-main { width: min(1120px, 100%); margin-inline: auto; padding: 50px clamp(16px, 4vw, 54px) 40px; }
.guest-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin: 16px 0 21px; }
.guest-heading > div { min-width: 0; }
.guest-heading .button { flex: none; }
.guest h1 { font-size: clamp(2.7rem, 6vw, 5rem); }
.guest .preview > img { max-height: 72vh; }
.guest .preview-pdf iframe { height: 65vh; }
.guest-error { display: grid; justify-items: start; gap: 12px; }
.guest-error p { color: var(--muted); line-height: 1.5; }

@keyframes content-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes image-in {
  from { opacity: .62; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1000px) {
  .workspace { grid-template-columns: 199px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .sidebar-header { padding-inline: 6px; }
  .library { padding-inline: clamp(18px, 3.4vw, 42px); }
}

@media (max-width: 720px) {
  .access { grid-template-columns: 1fr; }
  .access-panel { min-height: 100svh; padding: 16px clamp(18px, 5vw, 34px) 18px; }
  .access-content { padding-block: 36px 31px; }
  .access h1 { font-size: clamp(3.45rem, 11vw, 5.4rem); }
  .access-image { display: none; }
  .workspace { display: block; }
  .sidebar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; padding: 10px 14px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-header { grid-column: 1; grid-row: 1; padding: 0; }
  .sidebar .brand img { width: 90px; }
  .profile { grid-column: 2; grid-row: 1; border: 0; margin: 0; padding: 0; }
  .profile .avatar, .profile-text { display: none; }
  .side-nav { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr .7fr 1fr 1fr 1.04fr; margin-top: 7px; gap: 3px; }
  .nav-link { grid-template-columns: 1fr; justify-items: center; align-content: center; min-height: 54px; padding: 4px 1px; gap: 3px; font-size: .76rem; }
  .nav-link > svg { width: 17px; }
  .nav-count { display: none; }
  .library { padding: 28px 14px 38px; }
  .library-heading { padding-bottom: 20px; }
  .library-heading h1 { font-size: clamp(3.45rem, 11vw, 4.8rem); }
  .documents { margin-top: 18px; }
  .file-list .file-entry { grid-template-columns: 40px minmax(0, 1fr) auto 15px; gap: 8px; }
  .file-list .file-art { width: 40px; height: 40px; }
  .file-list .file-date { display: none; }
  .preview-pdf iframe { display: none; }
  .pdf-mobile { display: grid; gap: 12px; justify-items: center; padding: 23px 14px; }
  .guest-main { padding-top: 32px; }
}

@media (max-width: 479px) {
  .access-content { padding-block: 31px 28px; }
  .access-description { margin-top: 20px; }
  .access-form { margin-top: 23px; }
  .library-heading, .guest-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .documents-heading, .toolbar { width: 100%; }
  .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .search { grid-column: 1 / -1; width: 100%; }
  .display-options { justify-self: end; }
  .documents-heading .view-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; width: 100%; }
  .empty { min-height: 270px; padding-inline: 15px; }
  .empty .button, .dialog-actions .button, .document-actions .button { width: 100%; }
  .dialog-form { padding-inline: 13px; }
  .dialog-heading { padding-inline: 13px; }
  .document-actions, .document-preview-body { padding-inline: 12px; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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