/* TSS-PUB-STD-V3.4-2026 — Public Layer Stylesheet — iPhone-First */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600&family=EB+Garamond:wght@400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Document ── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

/* ── Page Container ── */
/* Base: iPhone 14 / 15 / 16 standard (390px logical) */
.page {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 80px 32px 100px;
  padding-left: max(32px, env(safe-area-inset-left));
  padding-right: max(32px, env(safe-area-inset-right));
  padding-bottom: max(100px, calc(100px + env(safe-area-inset-bottom)));
}

/* ── Institutional Name ── */
.institution-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.125rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 48px;
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0;
}

/* ── Hero ── */
.hero {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.65;
  color: #1a1a1a;
  margin-bottom: 56px;
  word-spacing: 0.01em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* ── Primary Rule ── */
.rule {
  border: none;
  height: 1px;
  background-color: #1a1a1a;
  margin-bottom: 64px;
}

/* ── Section Block ── */
.block {
  margin-bottom: 52px;
}

.block:last-of-type {
  margin-bottom: 56px;
}

/* ── Section Header ── */
.block-header {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 18px;
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0;
}

/* ── Section Body ── */
.block-body p {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #2a2a2a;
  margin-bottom: 14px;
  overflow-wrap: break-word;
  hyphens: none;
}

.block-body p:last-child {
  margin-bottom: 0;
}

/* ── Terminal Fragments ── */
.block-body .terminal {
  font-style: italic;
  color: #3a3a3a;
}

/* ── Compression Line ── */
.block-body .compression {
  margin-top: 18px;
}

/* ── Footer Rule ── */
.rule-footer {
  border: none;
  height: 1px;
  background-color: #1a1a1a;
  margin-bottom: 28px;
}

/* ── Document Code ── */
.document-code {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999999;
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0;
}

/* ── Contact Address ── */
.contact-address {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: #2a2a2a;
  margin-top: 48px;
  margin-bottom: 56px;
}

/* ── Selection ── */
::selection {
  background: #1a1a1a;
  color: #ffffff;
}

/* ══════════════════════════════════════════════
   iPhone Pro Max / Plus (430px logical)
   ══════════════════════════════════════════════ */
@media (min-width: 428px) {
  .page {
    padding-left: max(36px, env(safe-area-inset-left));
    padding-right: max(36px, env(safe-area-inset-right));
  }

  .hero {
    font-size: 1.3125rem;
  }
}

/* ══════════════════════════════════════════════
   iPad / Tablet
   ══════════════════════════════════════════════ */
@media (min-width: 768px) {
  .page {
    padding: 120px 40px 160px;
  }

  .institution-name {
    font-size: 1.1875rem;
    letter-spacing: 0.32em;
    margin-bottom: 56px;
  }

  .hero {
    font-size: 1.375rem;
    margin-bottom: 64px;
  }

  .rule {
    margin-bottom: 72px;
  }

  .block {
    margin-bottom: 56px;
  }

  .block-body p {
    font-size: 1.09375rem;
  }
}

/* ══════════════════════════════════════════════
   Desktop
   ══════════════════════════════════════════════ */
@media (min-width: 1080px) {
  .page {
    padding: 160px 0 200px;
  }

  .institution-name {
    margin-bottom: 64px;
  }

  .hero {
    font-size: 1.4375rem;
    line-height: 1.6;
    margin-bottom: 72px;
  }

  .rule {
    margin-bottom: 80px;
  }

  .block {
    margin-bottom: 60px;
  }
}

/* ══════════════════════════════════════════════
   Landscape safety
   ══════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 500px) {
  .page {
    padding-top: 48px;
    padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
  }
}
