:root {
  --ink: #282116;
  --muted: #6f6451;
  --paper: #f3eddf;
  --paper-light: #faf6ec;
  --rule: #4c402d;
  --accent: #6d2f25;
  --shadow: rgba(50, 39, 23, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(112, 87, 49, 0.07) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 64%, rgba(112, 87, 49, 0.05) 0 1px, transparent 1.5px),
    #ded5c2;
  background-size: 29px 31px, 37px 41px, auto;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  line-height: 1.9;
  letter-spacing: 0.035em;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  color: var(--paper-light);
  background: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.sheet {
  width: min(920px, calc(100% - 32px));
  min-height: 100vh;
  margin: 28px auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 55px var(--shadow);
}

.inner-frame {
  margin: 7px;
  border: 3px double var(--rule);
}

.masthead {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.35rem 1.5rem 1.15rem;
  border-bottom: 3px double var(--rule);
}

.app-mark {
  display: block;
  width: 80px;
  height: 80px;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.eyebrow,
.catalogue-number,
.latin-note,
.section-number,
.date-line {
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.eyebrow {
  margin: 0 0 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.site-title {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: 0.09em;
  font-weight: 600;
}

.site-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  font-style: italic;
}

.catalogue-number {
  align-self: start;
  margin: 0;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--rule);
  font-size: 0.68rem;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.83rem;
  letter-spacing: 0.08em;
}

.site-nav a {
  padding: 0.65rem 1rem;
  color: var(--ink);
  text-decoration: none;
  border-inline-start: 1px solid rgba(76, 64, 45, 0.45);
}

.site-nav a:last-child {
  border-inline-end: 1px solid rgba(76, 64, 45, 0.45);
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--paper-light);
  background: var(--rule);
}

main {
  padding: clamp(1.5rem, 5vw, 3.6rem);
}

.document-head {
  position: relative;
  margin-bottom: 2.6rem;
  padding: 1.3rem 0 1.5rem;
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.document-head::before,
.document-head::after {
  content: "◆";
  position: absolute;
  left: 50%;
  padding: 0 0.8rem;
  color: var(--rule);
  background: var(--paper);
  transform: translateX(-50%);
  font-size: 0.55rem;
}

.document-head::before {
  top: -0.62rem;
}

.document-head::after {
  bottom: -0.62rem;
}

.document-head h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.65rem);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.latin-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: italic;
}

.date-line {
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
}

.lead {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  font-size: 1.04rem;
  text-align: justify;
}

.policy-section {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 1.25rem;
  padding: 1.45rem 0;
  border-top: 1px dotted rgba(76, 64, 45, 0.65);
}

.section-number {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.policy-section h2 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  letter-spacing: 0.09em;
  font-weight: 600;
}

.policy-section p,
.policy-section ul {
  margin: 0;
  text-align: justify;
}

.policy-section p + p,
.policy-section p + ul,
.policy-section ul + p {
  margin-top: 0.7rem;
}

.policy-section ul {
  padding-left: 1.4rem;
}

.retention-table {
  width: 100%;
  margin-top: 0.7rem;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.retention-table th,
.retention-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(76, 64, 45, 0.7);
}

.retention-table th {
  width: 32%;
  background: rgba(76, 64, 45, 0.07);
  font-weight: 600;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.index-card {
  display: block;
  min-height: 14rem;
  padding: 1.4rem;
  color: var(--ink);
  border: 3px double var(--rule);
  text-decoration: none;
  background: rgba(250, 246, 236, 0.42);
}

.index-card:hover {
  background: var(--paper-light);
  transform: translateY(-2px);
}

.index-card .section-number {
  display: block;
  margin-bottom: 1.25rem;
}

.index-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.index-card p {
  margin: 0;
  color: var(--muted);
}

.index-card .read-more {
  display: block;
  margin-top: 1.2rem;
  color: var(--accent);
  font-size: 0.82rem;
}

.support-box {
  padding: 1.25rem 1.4rem;
  border: 3px double var(--rule);
  background: rgba(250, 246, 236, 0.5);
}

.support-box p {
  margin: 0.25rem 0;
}

.revision-entry {
  position: relative;
  padding-left: 1.4rem;
  border-left: 1px solid var(--rule);
}

.revision-entry::before {
  content: "";
  position: absolute;
  top: 0.65rem;
  left: -0.32rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  transform: rotate(45deg);
}

.revision-entry h2 {
  margin-bottom: 0.1rem;
}

.revision-version {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-address {
  font-style: normal;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  color: var(--muted);
  border-top: 3px double var(--rule);
  font-size: 0.74rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .sheet {
    width: 100%;
    margin: 0;
    border-inline: 0;
  }

  .inner-frame {
    margin: 4px;
  }

  .masthead {
    grid-template-columns: 62px 1fr;
    gap: 0.8rem;
    padding: 1rem;
  }

  .app-mark {
    width: 58px;
    height: 58px;
    border-radius: 9px;
  }

  .catalogue-number {
    display: none;
  }

  .site-nav {
    font-size: 0.76rem;
  }

  .site-nav a {
    flex: 1;
    padding-inline: 0.35rem;
    text-align: center;
  }

  main {
    padding: 1.35rem 1rem 2rem;
  }

  .policy-section {
    display: block;
  }

  .section-number {
    margin-bottom: 0.3rem;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }

  .retention-table,
  .retention-table tbody,
  .retention-table tr,
  .retention-table th,
  .retention-table td {
    display: block;
    width: 100%;
  }

  .retention-table tr + tr {
    margin-top: 0.6rem;
  }

  .retention-table td {
    border-top: 0;
  }

  .site-footer {
    display: block;
    text-align: center;
  }
}

@media print {
  body {
    background: white;
  }

  .sheet {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .site-nav,
  .skip-link {
    display: none;
  }

  a {
    color: inherit;
  }
}
