:root {
  --ink: #26272b;
  --muted: #6b6f76;
  --soft-muted: #8c9096;
  --page: #ffffff;
  --panel: #ffffff;
  --line: #e7e7e7;
  --dark: #4b5358;
  --red: #d7545b;
  --red-dark: #bf444b;
  --red-soft: #f4bdc4;
  --pink: #f8d3d8;
  --purple: #6f4b7d;
  --focus: #2563a9;
  --shadow: 0 8px 22px rgba(37, 39, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
}

body {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-family: Outfit, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 8px rgba(38, 39, 43, 0.12);
}

.brand-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.brand-bar {
  background: var(--red);
  color: #fff;
}

.brand-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 58px;
  padding: 7px 0 9px;
  gap: 18px;
}

.brand {
  display: inline-grid;
  align-items: center;
  width: min(380px, 56vw);
  color: #fff;
  text-decoration: none;
}

.brand-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
}

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

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.account-label {
  max-width: 250px;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 800;
}

.page-shell {
  padding: 4px;
}

.archive-embed {
  min-width: 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.intro-copy {
  padding-top: 0;
}

.section-label {
  margin: 0 0 18px;
  color: var(--red);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.05;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.15rem, 4.4vw, 3.45rem);
}

h2 {
  font-size: clamp(1.35rem, 2.7vw, 2rem);
}

.lede {
  max-width: 660px;
  margin: 6px 0 0;
  color: #4e5258;
  font-size: 1.03rem;
  line-height: 1.7;
}
.intro-panel .section-label {
  margin-bottom: 5px;
  font-size: 1.15rem;
}

.intro-panel h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.intro-panel .lede {
  max-width: 860px;
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(38, 39, 43, 0.06);
}

.search-field,
.toggle-field {
  color: var(--muted);
  font-weight: 800;
}

.search-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 900;
}

.search-field input {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search-field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 84, 91, 0.18);
}

.toggle-field {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 8px;
  padding: 0 4px;
  font-size: 0.88rem;
}

.toggle-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 9px 15px;
  border: 0;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(38, 39, 43, 0.16);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.button-primary {
  color: #fff;
  background: var(--red);
}

.button-primary:hover:not(:disabled) {
  background: var(--red-dark);
}

.button-ghost {
  color: var(--red);
  background: #fff;
  border: 1px solid rgba(215, 84, 91, 0.3);
}

.brand-bar .button-ghost {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
}

.brand-bar .button-primary {
  color: var(--red);
  background: #fff;
}

.status-panel {
  min-height: 42px;
  margin: 0 0 10px;
  padding: 11px 14px;
  color: #5e3d43;
  background: var(--pink);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.status-panel[data-tone="error"] {
  color: #842d36;
  background: #f8d1d5;
}

.status-panel[data-tone="warning"] {
  color: #6d4d13;
  background: #f7e8be;
}

.archive-shell {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.archive-list,
.reader {
  min-width: 0;
}

.archive-list {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(38, 39, 43, 0.08);
}

.section-heading,
.reader-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading {
  display: block;
}

.section-heading .section-label,
.reader-header .section-label {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.pdf-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 150px);
  margin: 0;
  padding: 0 4px 0 0;
  overflow: auto;
  list-style: none;
}

.pdf-item {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.pdf-item:hover,
.pdf-item:focus-visible {
  border-color: rgba(215, 84, 91, 0.55);
  outline: 0;
  box-shadow: 0 6px 16px rgba(215, 84, 91, 0.14);
}

.folder-item {
  background: #fff7f8;
  border-color: rgba(215, 84, 91, 0.22);
}

.folder-item .pdf-title {
  color: var(--red);
}

.pdf-title {
  overflow-wrap: anywhere;
  color: #24262b;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.25;
}

.pdf-meta {
  color: var(--soft-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.empty-state,
.viewer-empty {
  color: var(--muted);
  font-weight: 800;
}

.reader {
  position: sticky;
  top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(38, 39, 43, 0.08);
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-frame {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #f4f4f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.viewer-frame iframe {
  display: block;
  width: 100%;
  height: max(760px, calc(100vh - 118px));
  border: 0;
  background: #fff;
}

.viewer-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #767b82;
  text-align: center;
}

.reader-expanded {
  overflow: hidden;
}

.reader-expanded .reader {
  position: fixed;
  inset: 10px;
  z-index: 50;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  border-radius: 8px;
}

.reader-expanded .viewer-frame {
  min-height: 0;
  height: 100%;
}

.reader-expanded .viewer-frame iframe {
  height: 100%;
}

.reader-expanded .reader::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(38, 39, 43, 0.68);
}
.site-footer {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 190px;
  padding: 36px 16px;
  color: #fff;
  background: var(--dark);
  text-align: center;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 70px;
  border: 4px solid #fff;
  font-family: Outfit, Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .brand-inner,
  .intro-panel,
  .toolbar,
  .archive-shell {
    grid-template-columns: 1fr;
  }

  .brand-inner {
    justify-items: start;
    padding: 10px 0;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .reader {
    position: static;
  }

  .viewer-frame,
  .viewer-frame iframe {
    min-height: 72vh;
    height: 72vh;
  }
}

@media (max-width: 520px) {
  .brand-inner,
  .page-shell {
    width: 100%;
  }

  .account-actions,
  .button {
    width: 100%;
  }

  .account-label {
    max-width: 100%;
  }

  .reader-header,
  .reader-actions {
    align-items: stretch;
    flex-direction: column;
  }
}