:root {
  --page-bg: #f4f1e8;
  --ink: #23313a;
  --muted: #66727a;
  --index-bg: #e8f1ee;
  --section-bg: #f4ead7;
  --article-bg: #edf0f8;
  --border: rgba(35, 49, 58, 0.28);
  --shadow: 0 18px 55px rgba(25, 38, 48, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

button { font: inherit; }

.opening-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.85), transparent 45%),
    linear-gradient(135deg, #dbe8e3, #f4ead7);
}

.opening-card {
  width: min(720px, 100%);
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--border);
  border-radius: 26px;
  text-align: center;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 .35rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 1;
}

.opening-card p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.primary-button {
  margin-top: 1.2rem;
  padding: .95rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: #274b40;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.viewer {
  position: fixed;
  inset: 0;
  padding: clamp(.5rem, 2vw, 1.5rem);
  background: rgba(24, 32, 36, .42);
  backdrop-filter: blur(7px);
}

.viewer-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  background: #d9dde0;
  box-shadow: var(--shadow);
}

.viewer-header {
  flex: 0 0 auto;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.1rem, 2.5vw, 2rem);
  border-bottom: 1px solid rgba(35,49,58,.2);
  background: linear-gradient(180deg, #e7eaec, #d2d6d9);
}

.viewer-header h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.viewer-kicker {
  margin: 0 0 .3rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .8rem;
  font-weight: 800;
}

.layer {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.layer-index {
  flex: 1 1 auto;
  min-height: 0;
  margin: clamp(.55rem, 1.8vw, 1.2rem);
  padding: clamp(1rem, 2.5vw, 2rem);
  background: var(--index-bg);
}

.layer-section {
  position: absolute;
  inset: clamp(.55rem, 1.8vw, 1.2rem);
  padding: clamp(1rem, 2.3vw, 1.8rem);
  background: var(--section-bg);
}

.layer-article {
  position: absolute;
  inset: clamp(.55rem, 1.8vw, 1.2rem);
  display: flex;
  flex-direction: column;
  padding: clamp(.85rem, 2vw, 1.5rem);
  background: var(--article-bg);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
}

.close-button {
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
}

.close-button:hover,
.close-button:focus-visible {
  background: white;
  outline: 3px solid rgba(39,75,64,.18);
}

.heading-list {
  display: grid;
  gap: .65rem;
  max-height: calc(100% - 1rem);
  overflow-y: auto;
  padding-right: .35rem;
}

.layer-section .heading-list {
  max-height: calc(100% - 5.5rem);
}

.heading-button {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(35,49,58,.18);
  border-radius: 14px;
  text-align: left;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.heading-button:hover,
.heading-button:focus-visible {
  background: white;
  transform: translateY(-1px);
  outline: 3px solid rgba(39,75,64,.15);
}

.article-header {
  flex: 0 0 auto;
}

.article-content {
  min-height: 0;
  overflow-y: auto;
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid rgba(35,49,58,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.7);
  line-height: 1.65;
  scroll-behavior: smooth;
}

.article-content h3 {
  margin-top: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.article-content h4 {
  margin-top: 2rem;
  margin-bottom: .4rem;
}

.article-content p,
.article-content li {
  max-width: 76ch;
}

.hidden { display: none !important; }

@media (max-width: 720px) {
  .viewer { padding: .35rem; }

  .viewer-shell,
  .layer-index,
  .layer-section,
  .layer-article {
    border-radius: 16px;
  }

  .viewer-header {
    min-height: 82px;
    padding: .85rem 1rem;
  }

  .layer-index {
    margin: .38rem;
  }

  .layer-section,
  .layer-article {
    inset: .38rem;
  }

  .heading-button { padding: .85rem .9rem; }

  .article-content {
    padding: 1rem;
    overscroll-behavior: contain;
  }
}

.index-message,
.index-error {
  margin: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.index-error code {
  overflow-wrap: anywhere;
}

.access-form{display:grid;gap:.75rem;margin:1.5rem auto;max-width:24rem;text-align:left}.access-form input{font:inherit;padding:.8rem;border:1px solid #999;border-radius:.4rem}.access-form .primary-button{text-align:center}.login-error{padding:.75rem;border:1px solid #a44;border-radius:.4rem}.viewer-actions{display:flex;align-items:center;gap:1rem}.leave-link{font-weight:600}.opening-card a.primary-button{display:inline-block;text-decoration:none}


/* =========================================================
   Project T21 opening and confidentiality screens
   ========================================================= */

.t21-intro-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 40%, #ffffff 0%, #f8f8f8 58%, #e8e8e8 100%);
    color: #202124;
}

.t21-intro {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.t21-intro-content {
    width: min(900px, 100%);
    text-align: center;
}

.t21-project-name {
    margin: 0 0 1.5rem;
    color: #555;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.t21-intro-content h1 {
    max-width: 850px;
    margin: 0 auto 3rem;
    font-size: clamp(1.8rem, 4.5vw, 3.6rem);
    line-height: 1.18;
    font-weight: 500;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.t21-logo-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
    text-decoration: none;
}

.t21-logo-button {
    width: clamp(130px, 24vw, 190px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 5px solid #202124;
    border-radius: 50%;
    background: #f8f8f8;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.16),
        inset 0 0 0 7px #b2b2b2;
    transition:
        transform 240ms ease,
        box-shadow 240ms ease,
        background-color 240ms ease;
}

.t21-logo-text {
    font-size: clamp(2.6rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.08em;
    transform: translateX(-0.05em);
}

.t21-click-label {
    color: #666;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 240ms ease;
}

.t21-logo-link:hover .t21-logo-button,
.t21-logo-link:focus-visible .t21-logo-button {
    transform: scale(1.055);
    background: #ffffff;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(178, 178, 178, 0.65),
        inset 0 0 0 7px #b2b2b2;
}

.t21-logo-link:hover .t21-click-label,
.t21-logo-link:focus-visible .t21-click-label {
    color: #000;
}

.t21-logo-link:focus-visible {
    outline: 3px solid #0727f7;
    outline-offset: 10px;
    border-radius: 1rem;
}

.t21-preview-note {
    margin: 3.5rem 0 0;
    color: #888;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.confidentiality-card {
    width: min(760px, calc(100% - 2rem));
    max-width: 760px;
    text-align: left;
}

.confidentiality-card h1,
.confidentiality-card > .eyebrow,
.confidentiality-card > p:not(.login-error):not(.return-link) {
    text-align: center;
}

.confidentiality-box {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid #c9c9c9;
    border-radius: 0.85rem;
    background: #f8f8f8;
}

.acknowledgement-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.85rem;
    cursor: pointer;
    line-height: 1.45;
}

.acknowledgement-label input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    accent-color: #069a2e;
    cursor: pointer;
}

.confidentiality-terms {
    margin: 1rem 0 0 2.1rem;
    color: #444;
    font-size: 0.92rem;
    line-height: 1.55;
}

.confidentiality-terms p {
    margin: 0.65rem 0;
}

.confidentiality-thanks {
    font-style: italic;
}

.confidentiality-submit:disabled {
    background: #d3d3d3;
    border-color: #d3d3d3;
    color: #777;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.confidentiality-submit.is-enabled {
    background: #b2b2b2;
    border-color: #8a8a8a;
    color: #111;
    cursor: pointer;
    opacity: 1;
}

.return-link {
    margin-top: 1.25rem;
    text-align: center;
}

@media (max-width: 600px) {
    .t21-intro-content h1 br {
        display: none;
    }

    .confidentiality-box {
        padding: 1rem;
    }

    .confidentiality-terms {
        margin-left: 0;
    }
}
