@layer page {
  /* Consolidated page styles for documents.html */
  /* Page-specific styles for documents.html */
  .doc-index {
    max-width: 1080px;
    margin: 0 auto;
    padding: 34px 22px 70px;
  }
  .doc-sec {
    margin: 0 0 38px;
  }
  .doc-sec h2 {
    font-family: "Noto Serif JP", serif;
    font-size: 1.3rem;
    color: #1e3a5f;
    border-bottom: 2px solid #1e3a5f;
    padding-bottom: 8px;
    margin: 0 0 6px;
    position: relative;
  }
  .doc-sec h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 64px;
    height: 2px;
    background: #d4af37;
  }
  .doc-sec > p {
    color: #475569;
    margin: 10px 0 18px;
    line-height: 1.9;
  }
  .doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
  }
  .doc-item {
    display: block;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-left: 4px solid #1e3a5f;
    border-radius: 0 12px 12px 0;
    padding: 16px 18px;
    text-decoration: none;
    transition:
      box-shadow 0.18s,
      transform 0.18s;
  }
  .doc-item:hover {
    box-shadow: 0 10px 26px rgba(5, 17, 31, 0.1);
    transform: translateY(-2px);
  }
  .doc-item strong {
    display: block;
    color: #1e3a5f;
    font-size: 1.02rem;
    margin-bottom: 4px;
  }
  .doc-item span {
    display: block;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.7;
  }
  .doc-item.gold {
    border-left-color: #d4af37;
  }
  .doc-sec.featured-pack {
    background: #f7fafc;
    border: 1px solid #d8e0ec;
    border-top: 4px solid #1e3a5f;
    border-radius: 12px;
    padding: 24px 26px 26px;
  }
  .doc-pack-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    margin-top: 18px;
  }
  .doc-pack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .doc-pack-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-left: 4px solid #d4af37;
    border-radius: 0 10px 10px 0;
    padding: 16px 18px;
    min-height: 100%;
  }
  .doc-pack-label {
    font-size: 0.75rem;
    font-weight: 900;
    color: #7c2d12;
    text-transform: uppercase;
  }
  .doc-pack-card strong {
    color: #1e3a5f;
    font-size: 1.02rem;
    line-height: 1.45;
  }
  .doc-pack-card p {
    margin: 0;
    color: #475569;
    font-size: 0.91rem;
    line-height: 1.8;
  }
  .doc-pack-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
  }
  .doc-pack-links a {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 7px 12px;
    color: #1e3a5f;
    background: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 800;
  }
  .doc-pack-links a:hover {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
  }
  .doc-diagram {
    margin: 0;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 12px;
  }
  .doc-diagram img {
    display: block;
    width: 100%;
    height: auto;
  }
  .doc-diagram figcaption {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.7;
    margin-top: 8px;
  }
  .legacy-note {
    display: none;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 5px solid #b45309;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin: 0 0 26px;
    color: #7c2d12;
  }
  .legacy-note.is-active {
    display: block;
  }
  .legacy-note a {
    display: inline-block;
    margin-top: 8px;
    background: #1e3a5f;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 700;
  }
  @media (max-width: 900px) {
    .doc-pack-layout {
      grid-template-columns: 1fr;
    }
    .doc-pack-grid {
      grid-template-columns: 1fr;
    }
  }

  /* Page-specific styles for documents.html */
  body.documents-editorial .doc-index {
    max-width: 920px;
    padding: 56px 22px 86px;
  }
  body.documents-editorial .doc-sec {
    margin: 0;
    padding: 38px 0 44px;
    border-top: 1px solid #cfd8e2;
  }
  body.documents-editorial .doc-sec:first-of-type {
    border-top: 2px solid #1e3a5f;
  }
  body.documents-editorial .doc-sec h2 {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 10px;
    line-height: 1.5;
  }
  body.documents-editorial .doc-sec h2::after {
    display: none;
  }
  body.documents-editorial .doc-grid {
    display: block;
    margin-top: 18px;
    border-top: 1px solid #dbe4ee;
  }
  body.documents-editorial .doc-item,
  body.documents-editorial .doc-item.gold {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: baseline;
    margin: 0;
    padding: 18px 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #dbe4ee;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  body.documents-editorial .doc-item strong,
  body.documents-editorial .doc-item span {
    margin: 0;
  }
  body.documents-editorial .featured-pack {
    background: #fff;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.documents-editorial .doc-pack-layout {
    display: block;
    margin-top: 22px;
  }
  body.documents-editorial .doc-pack-grid {
    display: block;
    border-top: 1px solid #dbe4ee;
  }
  body.documents-editorial .doc-pack-card {
    display: grid;
    grid-template-columns: 170px 230px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin: 0;
    padding: 20px 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #dbe4ee;
    border-radius: 0;
    box-shadow: none;
  }
  body.documents-editorial .doc-pack-label {
    text-transform: none;
    letter-spacing: 0.02em;
    color: #7c2d12;
  }
  body.documents-editorial .doc-pack-card p {
    margin: 0;
  }
  body.documents-editorial .doc-pack-links {
    grid-column: 2 / -1;
    display: flex;
    gap: 8px 18px;
    margin: 0;
  }
  body.documents-editorial .doc-pack-links a {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #174f7d;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  body.documents-editorial .doc-pack-links a:hover {
    background: transparent;
    color: #0f2747;
  }
  body.documents-editorial .doc-diagram {
    max-width: 680px;
    margin: 34px auto 0;
    padding: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.documents-editorial main a:hover {
    transform: none;
    box-shadow: none;
  }
  @media (max-width: 760px) {
    body.documents-editorial .doc-item,
    body.documents-editorial .doc-item.gold,
    body.documents-editorial .doc-pack-card {
      grid-template-columns: 1fr;
      gap: 6px;
    }
    body.documents-editorial .doc-pack-links {
      grid-column: 1;
      margin-top: 8px;
    }
  }

  /* Page-specific styles for documents.html */
  body.documents-editorial .doc-sec.featured-pack,
  body.documents-editorial .doc-pack-layout,
  body.documents-editorial .doc-pack-grid,
  body.documents-editorial .doc-pack-card,
  body.documents-editorial .doc-diagram {
    display: none;
  }
  body.documents-editorial .doc-index {
    max-width: 920px;
  }
  body.documents-editorial .doc-sec > p {
    max-width: 780px;
  }
  body.documents-editorial .doc-item,
  body.documents-editorial .doc-item.gold {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }
  @media (max-width: 760px) {
    body.documents-editorial .doc-item,
    body.documents-editorial .doc-item.gold {
      grid-template-columns: 1fr;
    }
  }
}
