    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      padding: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont,
                   "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      line-height: 1.6;
      color: #111;
      background: #fff;
    }

    /* Top navigation */
    nav {
      position: sticky;
      top: 0;
      background: #ffffff;
      border-bottom: 1px solid #e5e5e5;
      z-index: 100;
    }

    .nav-inner {
      max-width: 1440px;
      margin: 0 auto;
      padding: 0.75rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.95rem;
    }

    .site-title {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
      color: inherit;
      width: 248px;
      flex-shrink: 0;
    }

    .site-title:hover {
      opacity: 0.8;
    }

    .site-title img {
      height: 24px;
      width: auto;
    }

    .nav-links a {
      margin-left: 1rem;
      text-decoration: none;
      color: #333;
    }

    .nav-links a:hover {
      text-decoration: underline;
    }

    .nav-links a.active {
      font-weight: 600;
      color: #000;
    }

    .nav-links .contribute-link {
      margin-left: 1.5rem;
      padding-left: 1.5rem;
      border-left: 1px solid #ddd;
    }

    /* Hamburger toggle — hidden on desktop */
    .nav-toggle {
      display: none;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0.5rem;
      z-index: 120;
      -webkit-tap-highlight-color: transparent;
    }

    .nav-toggle span {
      display: block;
      width: 22px;
      height: 2px;
      background: #333;
      border-radius: 1px;
      transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .nav-toggle span + span {
      margin-top: 5px;
    }

    .nav-toggle.open span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.open span:nth-child(2) {
      opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile menu overlay backdrop */
    .nav-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.3);
      z-index: 99;
    }

    .nav-overlay.visible {
      display: block;
    }

    /* Main layout with sidebar */
    .layout {
      display: flex;
      max-width: 1440px;
      margin: 0 auto;
      min-height: calc(100vh - 60px);
    }

    /* Table of Contents sidebar */
    .toc {
      width: 280px;
      flex-shrink: 0;
      padding: 2rem 1rem 2rem 2rem;
      position: sticky;
      top: 60px;
      height: calc(100vh - 60px);
      overflow-y: auto;
      border-right: 1px solid #e5e5e5;
      display: none;
    }

    .toc.visible {
      display: block;
    }

    .toc h4 {
      margin: 0 0 1rem 0;
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #666;
    }

    .toc ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .toc li {
      margin: 0;
    }

    .toc a {
      display: block;
      padding: 0.35rem 0.5rem;
      text-decoration: none;
      color: #555;
      font-size: 0.85rem;
      border-radius: 4px;
      transition: background 0.15s, color 0.15s;
    }

    .toc a:hover {
      background: #f5f5f5;
      color: #111;
    }

    .toc a.active {
      background: #e8f4ff;
      color: #0066cc;
      font-weight: 500;
    }

    .toc .toc-h2 {
      font-weight: 600;
      margin-top: 0.75rem;
    }

    .toc .toc-h3 {
      padding-left: 1rem;
      font-size: 0.8rem;
    }

    .toc .toc-group-label {
      display: block;
      padding: 0.4rem 0.5rem 0.15rem;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #999;
      font-weight: 600;
      margin-top: 0.75rem;
    }

    .toc li:first-child .toc-group-label {
      margin-top: 0;
    }

    .toc a.toc-empty {
      opacity: 0.4;
    }

    .nav-count {
      font-size: 0.7rem;
      color: #999;
      margin-left: 4px;
    }

    /* Main content */
    main {
      flex: 1;
      min-width: 0;
      padding: 2rem;
      max-width: 900px;
    }

    .layout:not(.has-toc) main {
      margin: 0 auto;
    }

    /* Right-hand document TOC */
    .doc-toc {
      width: 220px;
      flex-shrink: 0;
      padding: 2rem 1.5rem 2rem 1rem;
      position: sticky;
      top: 60px;
      height: calc(100vh - 60px);
      overflow-y: auto;
      display: none;
    }

    .doc-toc.visible {
      display: block;
    }

    .doc-toc h4 {
      margin: 0 0 0.75rem 0;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #999;
    }

    .doc-toc ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .doc-toc li {
      margin: 0;
    }

    .doc-toc a {
      display: block;
      padding: 0.25rem 0.5rem;
      text-decoration: none;
      color: #888;
      font-size: 0.78rem;
      border-left: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s;
      line-height: 1.4;
    }

    .doc-toc a:hover {
      color: #333;
      border-left-color: #ccc;
    }

    .doc-toc a.active {
      color: #0066cc;
      border-left-color: #0066cc;
      font-weight: 500;
    }

    .doc-toc .dtoc-h3 {
      padding-left: 1.25rem;
      font-size: 0.74rem;
    }

    /* Markdown tables */
    main table {
      width: 100%;
      border-collapse: collapse;
      margin: 1rem 0;
    }

    main table th,
    main table td {
      text-align: left;
      padding: 0.4rem 0.75rem;
      border-bottom: 1px solid #e5e5e5;
    }

    main table th {
      font-size: 0.8rem;
      font-weight: 600;
      color: #666;
    }

    /* Mermaid diagrams */
    .mermaid-rendered {
      margin: 1.5rem 0;
      padding: 1rem;
      background: #fafafa;
      border: 1px solid #e0e0e0;
      border-radius: 4px;
    }

    .mermaid-rendered svg {
      max-width: 100%;
      height: auto;
    }

    /* Curriculum markdown content */
    .curriculum-content {
      margin-top: 2rem;
      padding-top: 1.5rem;
      border-top: 1px solid #e5e5e5;
    }

    .curriculum-content h2 {
      font-size: 1.1rem;
      font-weight: 600;
      color: #333;
      margin: 2rem 0 0.5rem;
      letter-spacing: -0.01em;
    }

    .curriculum-content h3 {
      font-size: 0.95rem;
      font-weight: 600;
      color: #555;
      margin: 1.5rem 0 0.4rem;
    }

    .curriculum-content p {
      font-size: 0.9rem;
      line-height: 1.6;
      color: #444;
      margin: 0.5rem 0;
    }

    .curriculum-content ul, .curriculum-content ol {
      font-size: 0.9rem;
      line-height: 1.6;
      color: #444;
      padding-left: 1.5rem;
      margin: 0.5rem 0;
    }

    .curriculum-content blockquote {
      border-left: 3px solid #ddd;
      padding: 0.5rem 1rem;
      margin: 1rem 0;
      color: #666;
      font-size: 0.9rem;
      background: #fafafa;
    }

    .curriculum-content table {
      font-size: 0.85rem;
    }

    .curriculum-content strong {
      color: #333;
    }

    /* Curriculum detail tables: auto layout for varied content */
    main[data-page="curricula"] table {
      table-layout: auto;
      width: 100%;
    }

    /* Charter banner */
    .charter-banner {
      background: #2a2a2a;
      color: #ddd;
      padding: 1.25rem 1.5rem;
      border-radius: 8px;
      margin-bottom: 2rem;
      font-size: 0.95rem;
      line-height: 1.6;
    }

    .charter-banner a {
      color: #fff;
      font-weight: 600;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .charter-banner a:hover {
      color: #ccc;
    }

    .charter-version {
      font-size: 0.85rem;
      color: #999;
      letter-spacing: 0.02em;
      margin-bottom: 1.5rem;
    }

    /* Typography */
    h1, h2, h3 {
      line-height: 1.25;
      margin-top: 2.5rem;
      scroll-margin-top: 80px;
    }

    h1 {
      margin-top: 0;
    }

    h2 {
      padding-bottom: 0.5rem;
      border-bottom: 1px solid #e5e5e5;
    }

    /* Collapsible sections */
    .section-header {
      cursor: pointer;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .section-header::before {
      content: "▼";
      font-size: 0.7em;
      color: #999;
      transition: transform 0.2s;
    }

    .section-header.collapsed::before {
      transform: rotate(-90deg);
    }

    .section-content {
      overflow: hidden;
      transition: max-height 0.3s ease-out;
    }

    .section-content.collapsed {
      max-height: 0 !important;
    }

    hr {
      margin: 3rem 0;
      border: none;
      border-top: 1px solid #e5e5e5;
    }

    blockquote {
      margin: 1.5rem 0;
      padding-left: 1rem;
      border-left: 4px solid #ddd;
      color: #555;
    }

    code {
      background: #f5f5f5;
      padding: 0.2em 0.4em;
      border-radius: 4px;
      font-size: 0.95em;
    }

    pre code {
      display: block;
      padding: 1rem;
      overflow-x: auto;
    }

    /* HTML comment styling */
    .html-comment {
      margin: 1.5rem 0;
      padding: 1rem 1.25rem;
      background: #fafafa;
      border-left: 3px solid #d0d0d0;
      color: #666;
      font-style: italic;
      font-size: 0.95em;
      line-height: 1.5;
    }

    .html-comment::before {
      content: "📝 ";
      font-style: normal;
      opacity: 0.5;
    }

    /* Back to top button */
    .back-to-top {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: #333;
      color: #fff;
      border: none;
      cursor: pointer;
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s, visibility 0.2s;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
      z-index: 50;
    }

    .back-to-top.visible {
      opacity: 1;
      visibility: visible;
    }

    .back-to-top:hover {
      background: #555;
    }

    /* Footer */
    footer {
      margin-top: 5rem;
      padding: 2rem 0 1rem 0;
      border-top: 1px solid #e5e5e5;
      color: #666;
      font-size: 0.9rem;
    }

    .footer-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 2rem;
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      justify-content: center;
    }

    .footer-inner a {
      color: #555;
      text-decoration: none;
    }

    .footer-inner a:hover {
      text-decoration: underline;
    }

    /* References page */
    .references-list {
      list-style: none;
      padding: 0;
      margin: 2rem 0;
    }

    .references-list li {
      padding: 1rem 0;
      border-bottom: 1px solid #e5e5e5;
    }

    .references-list li:last-child {
      border-bottom: none;
    }

    .ref-item {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
    }

    .ref-info {
      flex: 1;
    }

    .ref-title {
      font-weight: 600;
      color: #111;
      margin-bottom: 0.25rem;
    }

    .ref-meta {
      font-size: 0.85rem;
      color: #666;
    }

    .ref-download {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 1rem;
      background: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 4px;
      text-decoration: none;
      color: #333;
      font-size: 0.9rem;
      white-space: nowrap;
      transition: background 0.15s;
    }

    .ref-download:hover {
      background: #e8e8e8;
      text-decoration: none;
    }

    .ref-preview {
      margin-left: 0.5rem;
      padding: 0.5rem 0.75rem;
      background: transparent;
      border: 1px solid #ddd;
      border-radius: 4px;
      text-decoration: none;
      color: #666;
      font-size: 0.9rem;
    }

    .ref-preview:hover {
      background: #f5f5f5;
    }

    /* Landing page */
    .landing {
      max-width: 860px;
      margin: 0 auto;
      padding: 4rem 2rem 2rem;
    }

    .landing-hero {
      text-align: center;
      margin-bottom: 4rem;
    }

    @keyframes compassAppear {
      0%   { opacity: 0; transform: scale(0.6) rotate(0deg); }
      100% { opacity: 0.85; transform: scale(1) rotate(0deg); }
    }

    .landing-hero img {
      width: 72px;
      height: 72px;
      margin-bottom: 1.5rem;
      opacity: 0;
      transform: rotate(0deg);
      animation: compassAppear 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
      transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .landing-hero img.attracted {
      transform: rotate(-22deg);
    }

    .landing-hero img.released {
      transform: rotate(0deg);
      transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @media (prefers-reduced-motion: reduce) {
      .landing-hero img {
        opacity: 0.85;
        transform: rotate(0deg);
        transition: none;
      }
    }

    .landing-hero h1 {
      font-size: 2.5rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin: 0 0 0.75rem;
    }

    .landing-hero .tagline {
      font-size: 1.15rem;
      color: #444;
      max-width: 540px;
      margin: 0 auto 1rem;
      line-height: 1.5;
    }

    .landing-hero .subtitle {
      font-size: 0.9rem;
      color: #888;
    }

    .landing-hero .subtitle a {
      color: #666;
      text-decoration: none;
      border-bottom: 1px solid #ddd;
    }

    .landing-hero .subtitle a:hover {
      color: #111;
      border-bottom-color: #999;
    }

    .landing-cta {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 1rem 1.25rem;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      background: #f9f9f9;
      text-decoration: none;
      color: inherit;
      margin-bottom: 2.5rem;
      transition: border-color 0.15s, box-shadow 0.15s;
      opacity: 0;
      animation: cardIn 0.4s ease-out forwards;
    }

    .landing-cta:hover {
      border-color: #ccc;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .landing-cta-icon {
      font-size: 1.5rem;
      flex-shrink: 0;
    }

    .landing-cta-text {
      flex: 1;
      min-width: 0;
    }

    .landing-cta-title {
      font-weight: 600;
      font-size: 0.95rem;
    }

    .landing-cta-desc {
      font-size: 0.82rem;
      color: #666;
      margin-top: 0.15rem;
    }

    .landing-cta-arrow {
      font-size: 1.1rem;
      color: #999;
      flex-shrink: 0;
    }

    .landing-group {
      margin-bottom: 2.5rem;
    }

    .landing-group:last-child {
      margin-bottom: 4rem;
    }

    .landing-group-label {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #999;
      margin-bottom: 0.25rem;
    }

    .landing-group-desc {
      font-size: 0.82rem;
      color: #aaa;
      margin-bottom: 0.75rem;
    }

    .landing-group-divider {
      border: none;
      border-top: 1px solid #eee;
      margin: 1rem 0 1.5rem;
    }

    .landing-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1rem;
    }

    @keyframes cardIn {
      from {
        opacity: 0;
        transform: translateY(16px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .landing-card {
      border: 1px solid #e5e5e5;
      border-radius: 8px;
      padding: 1.5rem;
      text-decoration: none;
      color: inherit;
      transition: border-color 0.15s, box-shadow 0.15s;
      opacity: 0;
      animation: cardIn 0.4s ease-out forwards;
    }

    @media (prefers-reduced-motion: reduce) {
      .landing-card {
        animation: none;
        opacity: 1;
      }
    }

    .landing-card:hover {
      border-color: #ccc;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .landing-card.full-row {
      grid-column: 1 / -1;
      background: #2a2a2a url('network.png') center / cover no-repeat;
      color: #ddd;
      border-color: #3a3a3a;
      position: relative;
      overflow: hidden;
      min-height: 180px;
    }

    .landing-card.full-row::before {
      content: '';
      position: absolute;
      inset: 0;
      background: rgba(30, 30, 30, 0.55);
    }

    .landing-card.full-row .card-title,
    .landing-card.full-row .card-desc {
      position: relative;
    }

    .landing-card.full-row .card-desc {
      color: #ccc;
    }

    .landing-card.full-row:hover {
      border-color: #555;
      box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    }

    .landing-card.full-row:hover::before {
      background: rgba(30, 30, 30, 0.45);
    }

    .landing-card.full-row .card-title {
      color: #fff;
    }

    .landing-card-empty {
      opacity: 0.4;
    }

    .card-count {
      font-size: 0.7rem;
      font-weight: 400;
      color: #999;
      margin-left: 6px;
    }

    @keyframes orientationIn {
      0%   { transform: rotate(-15deg) translateX(-8px); opacity: 0; }
      35%  { transform: rotate(3deg) translateX(2px);    opacity: 0.85; }
      55%  { transform: rotate(-1.5deg) translateX(-1px); opacity: 0.9; }
      75%  { transform: rotate(0.5deg) translateX(0);    opacity: 0.95; }
      100% { transform: rotate(0deg) translateX(0);      opacity: 1; }
    }

    @keyframes orientationOut {
      0%   { opacity: 1; transform: rotate(0deg); }
      100% { opacity: 0; transform: rotate(8deg) translateX(8px); }
    }

    .landing-orientations {
      margin-bottom: 3rem;
      text-align: center;
    }

    .landing-orientations h2 {
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: #999;
      border: none;
      margin-bottom: 1rem;
      padding: 0;
    }

    .orientation-rotator {
      font-size: 0.95rem;
      color: #777;
      height: 1.6em;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .orientation-rotator span {
      display: inline-block;
      transform-origin: left center;
    }

    .orientation-rotator span.settling {
      animation: orientationIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .orientation-rotator span.leaving {
      animation: orientationOut 0.3s ease-in forwards;
    }

    .orientation-rotator strong {
      font-weight: 600;
      color: #444;
    }

    @media (prefers-reduced-motion: reduce) {
      .orientation-rotator span.settling,
      .orientation-rotator span.leaving {
        animation: none;
      }
      .orientation-rotator span {
        opacity: 1;
      }
    }

    .landing-card .card-title {
      font-weight: 600;
      font-size: 1rem;
      margin-bottom: 0.4rem;
    }

    .landing-card .card-desc {
      font-size: 0.875rem;
      color: #666;
      line-height: 1.45;
    }



    /* History page */
    .history-page {
      max-width: 720px;
      margin: 0 auto;
    }

    .history-page h1 {
      font-size: 1.8rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .history-page .history-subtitle {
      color: #888;
      font-size: 0.9rem;
      margin-bottom: 2.5rem;
    }

    .history-date-group {
      margin-bottom: 2rem;
    }

    .history-date-group h2 {
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #999;
      border: none;
      margin-bottom: 0.75rem;
      padding: 0;
    }

    .history-table {
      width: 100%;
      border-collapse: collapse;
    }

    .history-table th {
      text-align: left;
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #999;
      font-weight: 600;
      padding: 0 0 0.5rem 0;
      border-bottom: 1px solid #e5e5e5;
    }

    .history-row {
      text-decoration: none;
      color: inherit;
      cursor: pointer;
    }

    .history-row:hover td {
      background: #fafafa;
    }

    .history-row td {
      padding: 0.5rem 0.75rem 0.5rem 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 0.9rem;
      vertical-align: baseline;
    }

    .history-row:last-child td {
      border-bottom: none;
    }

    .col-contributor {
      white-space: nowrap;
      color: #555;
      width: 120px;
    }

    .col-type {
      width: 80px;
    }

    .change-type {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 0.15rem 0.45rem;
      border-radius: 3px;
      white-space: nowrap;
    }

    .change-type.feat { background: #e8f5e9; color: #2e7d32; }
    .change-type.fix { background: #fff3e0; color: #e65100; }
    .change-type.docs { background: #e3f2fd; color: #1565c0; }
    .change-type.refactor { background: #f3e5f5; color: #7b1fa2; }
    .change-type.other { background: #f5f5f5; color: #616161; }

    .col-memo {
      color: #333;
      line-height: 1.4;
    }

    .history-loading {
      text-align: center;
      color: #999;
      padding: 3rem 0;
    }

    .history-error {
      text-align: center;
      color: #c62828;
      padding: 2rem 0;
    }

    /* Registry list pages */
    .registry-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1rem;
      margin-top: 1.5rem;
    }

    .registry-card {
      border: 1px solid #e5e5e5;
      border-radius: 8px;
      padding: 1.25rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .registry-card:hover {
      border-color: #ccc;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .registry-card .card-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.35rem;
    }

    .registry-card .card-portrait {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .registry-card .card-name {
      font-weight: 600;
      font-size: 1rem;
    }

    .registry-card .card-summary {
      font-size: 0.875rem;
      color: #555;
      line-height: 1.45;
      margin-bottom: 0.6rem;
    }

    .registry-card .card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-bottom: 0.5rem;
    }

    .registry-card .card-relations {
      font-size: 0.8rem;
      color: #777;
      line-height: 1.4;
      margin-top: 0.5rem;
      padding-top: 0.5rem;
      border-top: 1px solid #f0f0f0;
    }

    .registry-card .card-relations strong {
      color: #555;
    }

    .registry-card .card-relations a {
      color: inherit;
      text-decoration: underline dotted;
      text-underline-offset: 2px;
    }

    .registry-card .card-relations a:hover {
      color: #2563eb;
    }

    .registry-card {
      cursor: pointer;
    }

    /* Compact list mode */
    .registry-list.list-mode {
      grid-template-columns: 1fr;
      gap: 0;
    }

    .registry-list.list-mode .registry-card {
      border-radius: 0;
      border-bottom: 1px solid #e5e5e5;
      border-left: none;
      border-right: none;
      border-top: none;
      padding: 0.6rem 0.75rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .registry-list.list-mode .registry-card:hover {
      background: #f8f8f8;
      box-shadow: none;
    }

    .registry-list.list-mode .card-header {
      margin-bottom: 0;
    }

    .registry-list.list-mode .card-portrait {
      width: 28px;
      height: 28px;
    }

    .registry-list.list-mode .card-summary,
    .registry-list.list-mode .card-meta,
    .registry-list.list-mode .card-relations {
      display: none;
    }

    .registry-list.list-mode .card-name {
      font-size: 0.9rem;
    }

    .view-toggle {
      font-size: 14px;
      font-family: inherit;
      padding: 7px 10px;
      border: 1px solid #ccc;
      background: #fff;
      cursor: pointer;
      margin-left: 8px;
    }

    /* Entity detail page */
    .entity-detail {
      max-width: 800px;
    }

    .entity-detail-back {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      color: #555;
      text-decoration: none;
      font-size: 0.9rem;
      margin-bottom: 1.5rem;
    }

    .entity-detail-back:hover {
      color: #111;
    }

    .entity-detail-header {
      display: flex;
      align-items: flex-start;
      gap: 1.25rem;
      margin-bottom: 1.5rem;
    }

    .entity-detail-portrait {
      width: 96px;
      height: 96px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .entity-detail-header-info {
      flex: 1;
      min-width: 0;
    }

    .entity-detail-header-info h1 {
      font-size: 1.5rem;
      margin: 0 0 0.15rem;
      border: none;
      padding: 0;
    }

    .entity-detail-name-ja {
      opacity: 0.5;
      font-size: 0.95rem;
      margin-bottom: 0.35rem;
    }

    .entity-detail-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      margin-top: 0.35rem;
    }

    .entity-detail-summary {
      font-size: 1rem;
      color: #444;
      line-height: 1.6;
      margin-bottom: 1.5rem;
    }

    .entity-detail-section {
      margin-bottom: 1.5rem;
    }

    .entity-detail-section .detail-label {
      font-weight: 600;
      color: #555;
      font-size: 0.8rem;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin-top: 0.75rem;
      margin-bottom: 0.15rem;
    }

    .entity-detail-section .detail-label:first-child {
      margin-top: 0;
    }

    .entity-detail-section p {
      margin: 0.4rem 0;
      font-size: 0.925rem;
      line-height: 1.55;
      color: #444;
    }

    .entity-detail-section a {
      color: #2563eb;
      text-decoration: none;
    }

    .entity-detail-section a:hover {
      text-decoration: underline;
    }

    .entity-detail .person-bio {
      line-height: 1.6;
      font-size: 0.95rem;
      color: #333;
    }

    .entity-detail .person-bio p {
      margin: 0.6rem 0;
    }

    .entity-detail-top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.25rem;
    }

    .status-badge {
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 0.15rem 0.45rem;
      border-radius: 3px;
      white-space: nowrap;
    }

    .status-badge.active { background: #e8f5e9; color: #2e7d32; }
    .status-badge.proposed { background: #fff3e0; color: #e65100; }
    .status-badge.paused { background: #f5f5f5; color: #616161; }
    .status-badge.completed { background: #e3f2fd; color: #1565c0; }
    .status-badge.inactive { background: #f5f5f5; color: #616161; }

    .type-badge {
      font-size: 0.68rem;
      font-weight: 500;
      padding: 0.12rem 0.4rem;
      border-radius: 3px;
      white-space: nowrap;
      background: #f0f0f0;
      color: #555;
    }

    /* Full-bleed layout (network page) */
    .layout.full-bleed {
      max-width: none;
      height: calc(100vh - 60px);
      min-height: 0;
      overflow: hidden;
    }

    .layout.full-bleed main {
      max-width: none;
      padding: 0;
      margin: 0;
    }

    /* Network visualization */
    .network-page {
      position: relative;
      width: 100%;
      height: calc(100vh - 60px);
      overflow: hidden;
    }

    .network-container {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    .network-controls {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 1.25rem;
      padding: 0.75rem 1.25rem;
      background: linear-gradient(to bottom, rgba(30,30,30,0.85) 60%, transparent);
      z-index: 10;
      pointer-events: none;
    }

    .network-controls > * {
      pointer-events: auto;
    }

    .network-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .network-toggle {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.3rem 0.7rem;
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 100px;
      background: rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.7);
      font-size: 0.78rem;
      cursor: pointer;
      transition: background 0.15s, opacity 0.15s, border-color 0.15s;
      user-select: none;
    }

    .network-toggle:hover {
      background: rgba(255,255,255,0.14);
    }

    .network-toggle.connected {
      opacity: 0.6;
      background: transparent;
      border-style: dashed;
    }

    .network-toggle.off {
      opacity: 0.35;
      background: transparent;
    }

    .network-toggle .toggle-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .network-detail {
      position: absolute;
      bottom: 1rem;
      left: 1rem;
      right: 1rem;
      max-width: 480px;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      padding: 1.25rem;
      background: rgba(30,30,30,0.9);
      backdrop-filter: blur(8px);
      display: none;
      z-index: 10;
      color: #ddd;
    }

    .network-detail.visible {
      display: block;
    }

    .network-detail h3 {
      margin: 0 0 0.5rem;
      font-size: 1.1rem;
      color: #fff;
    }

    .network-detail p {
      margin: 0.25rem 0;
      font-size: 0.9rem;
      color: rgba(255,255,255,0.7);
    }

    .network-controls-hint {
      position: absolute;
      bottom: 1rem;
      left: 1rem;
      font-size: 0.75rem;
      color: rgba(255,255,255,0.3);
      line-height: 1.7;
      pointer-events: none;
      transition: opacity 0.3s;
    }

    .network-controls-hint kbd {
      display: inline-block;
      font-family: inherit;
      font-size: 0.7rem;
      color: rgba(255,255,255,0.45);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 3px;
      padding: 0.05em 0.4em;
      margin-right: 0.3em;
    }

    .registry-page-header {
      margin-bottom: 0.5rem;
    }

    .registry-page-header h1 {
      margin-bottom: 0.25rem;
    }

    .registry-page-header p {
      color: #666;
      font-size: 0.95rem;
    }

    /* Responsive */
    @media (max-width: 900px) {
      .toc, .doc-toc {
        display: none !important;
      }

      .layout {
        display: block;
      }

      main {
        padding: 1.5rem;
      }

      .landing {
        padding: 2rem 1.5rem 1rem;
      }

      .landing-hero h1 {
        font-size: 2rem;
      }

      .landing-cards {
        grid-template-columns: 1fr;
      }

      .site-title {
        width: auto;
        flex-shrink: 1;
      }

      /* Show hamburger */
      .nav-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
      }

      /* Mobile nav links */
      .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 0.5rem 0;
        z-index: 110;
      }

      .nav-links.open {
        display: flex;
        flex-direction: column;
      }

      .nav-links a {
        margin-left: 0;
        padding: 0.75rem 2rem;
        border-bottom: 1px solid #f0f0f0;
        font-size: 1rem;
      }

      .nav-links a:last-child {
        border-bottom: none;
      }

      .nav-links a:active {
        background: #f5f5f5;
      }

      .nav-links .contribute-link {
        margin-left: 0;
        padding-left: 2rem;
        border-left: none;
        border-top: 1px solid #e5e5e5;
        margin-top: 0.25rem;
        padding-top: 0.75rem;
      }

      .nav-login {
        margin-left: 0;
        padding: 0.75rem 2rem;
        border-left: none;
        border-top: 1px solid #e5e5e5;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
      }

      .modal-overlay {
        padding: 1rem;
      }

      .modal-box {
        max-height: calc(100vh - 2rem);
      }
    }

    /* Login UI */
    .nav-login {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      margin-left: 1.5rem;
      padding-left: 1.5rem;
      border-left: 1px solid #ddd;
    }

    .nav-login .nav-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
    }

    .nav-login .username {
      color: #333;
      text-decoration: none;
    }

    .nav-login button {
      background: none;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 0.25rem 0.65rem;
      cursor: pointer;
      font-size: 0.85rem;
      color: #333;
      transition: background 0.15s, border-color 0.15s;
    }

    .nav-login button:hover {
      background: #f5f5f5;
      border-color: #ccc;
    }

    /* Modal */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 200;
      justify-content: center;
      align-items: flex-start;
      padding: 2rem;
      overflow-y: auto;
    }

    .modal-overlay.visible {
      display: flex;
    }

    .modal-box {
      background: #fff;
      border-radius: 12px;
      width: 100%;
      max-width: 600px;
      max-height: calc(100vh - 4rem);
      overflow-y: auto;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
      animation: modalIn 0.2s ease-out;
    }

    .modal-box.wide {
      max-width: 800px;
    }

    .modal-box.narrow {
      max-width: 400px;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: translateY(-12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid #e5e5e5;
    }

    .modal-header h3 {
      margin: 0;
      font-size: 1.1rem;
      line-height: 1.3;
    }

    .modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #999;
      padding: 0;
      line-height: 1;
    }

    .modal-close:hover {
      color: #333;
    }

    .modal-body {
      padding: 1.5rem;
    }

    .modal-error {
      display: none;
      padding: 0.75rem 1.5rem;
      background: #fef2f2;
      color: #c62828;
      font-size: 0.9rem;
      border-top: 1px solid #fecaca;
    }

    .modal-error.visible {
      display: block;
    }

    .modal-actions {
      display: flex;
      gap: 0.75rem;
      justify-content: flex-end;
      margin-top: 1.25rem;
    }

    .btn {
      padding: 0.5rem 1.25rem;
      border-radius: 6px;
      font-size: 0.9rem;
      cursor: pointer;
      border: 1px solid #ddd;
      background: #fff;
      color: #333;
      transition: background 0.15s;
    }

    .btn:hover {
      background: #f5f5f5;
    }

    .btn-primary {
      background: #2563eb;
      color: #fff;
      border-color: #2563eb;
    }

    .btn-primary:hover {
      background: #1d4ed8;
    }

    .btn-primary:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    /* Form styling (login, password change, feedback) */
    .form-group {
      margin-bottom: 1rem;
    }

    .form-group label {
      display: block;
      font-size: 0.8rem;
      font-weight: 600;
      color: #555;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      margin-bottom: 0.3rem;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group textarea,
    .form-group select {
      width: 100%;
      padding: 0.5rem 0.75rem;
      border: 1px solid #ddd;
      border-radius: 6px;
      font-size: 0.9rem;
      font-family: inherit;
      transition: border-color 0.15s;
    }

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
      outline: none;
      border-color: #2563eb;
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .form-group textarea {
      resize: vertical;
      min-height: 60px;
    }

    /* Feedback page */
    .feedback-page {
      max-width: 720px;
      margin: 0 auto;
    }

    .feedback-page h1 {
      font-size: 1.8rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }

    .feedback-page .feedback-subtitle {
      color: #888;
      font-size: 0.9rem;
      margin-bottom: 2rem;
    }

    .feedback-form-section {
      border: 1px solid #e5e5e5;
      border-radius: 8px;
      padding: 1.5rem;
      margin-bottom: 2.5rem;
      background: #fafafa;
    }

    .feedback-form-section h2 {
      font-size: 1rem;
      margin: 0 0 1rem;
      padding: 0;
      border: none;
    }

    .feedback-form-error {
      display: none;
      padding: 0.6rem 0.75rem;
      background: #fef2f2;
      color: #c62828;
      font-size: 0.85rem;
      border-radius: 4px;
      margin-bottom: 1rem;
    }

    .feedback-form-error.visible {
      display: block;
    }

    .feedback-login-prompt {
      border: 2px dashed #ddd;
      border-radius: 8px;
      padding: 2rem;
      text-align: center;
      margin-bottom: 2.5rem;
      color: #666;
    }

    .feedback-login-prompt button {
      margin-top: 0.75rem;
    }

    .feedback-card {
      border: 1px solid #e5e5e5;
      border-radius: 8px;
      padding: 1.25rem;
      margin-bottom: 0.75rem;
      transition: border-color 0.15s;
    }

    .feedback-card:hover {
      border-color: #ccc;
    }

    .feedback-card-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.4rem;
      flex-wrap: wrap;
    }

    .feedback-card-title {
      font-weight: 600;
      font-size: 1rem;
    }

    .feedback-card-desc {
      font-size: 0.875rem;
      color: #555;
      line-height: 1.5;
      margin-bottom: 0.5rem;
    }

    .feedback-card-meta {
      font-size: 0.78rem;
      color: #999;
    }

    .feedback-file-list {
      margin-top: 0.5rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .feedback-file-chip {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: #f0f0f0;
      border-radius: 4px;
      padding: 0.25rem 0.6rem;
      font-size: 0.8rem;
      color: #555;
    }

    .feedback-file-chip .remove-file {
      cursor: pointer;
      color: #999;
      font-weight: bold;
      font-size: 0.9rem;
      line-height: 1;
    }

    .feedback-file-chip .remove-file:hover {
      color: #c62828;
    }

    .feedback-card-attachments {
      margin-top: 0.5rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .feedback-card-attachments a {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.78rem;
      color: #0066cc;
      text-decoration: none;
      background: #f5f8ff;
      padding: 0.2rem 0.5rem;
      border-radius: 3px;
    }

    .feedback-card-attachments a:hover {
      background: #e8f0ff;
    }

    .feedback-card-attachments img.attachment-thumb {
      max-width: 120px;
      max-height: 80px;
      border-radius: 4px;
      border: 1px solid #e5e5e5;
      display: block;
    }

    .feedback-type-toggle {
      display: flex;
      gap: 0;
      border: 1px solid #ddd;
      border-radius: 6px;
      overflow: hidden;
      width: fit-content;
    }

    .feedback-type-toggle .type-btn {
      padding: 0.5rem 1.25rem;
      border: none;
      background: #fff;
      color: #555;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }

    .feedback-type-toggle .type-btn:not(:last-child) {
      border-right: 1px solid #ddd;
    }

    .feedback-type-toggle .type-btn:hover {
      background: #f5f5f5;
    }

    .feedback-type-toggle .type-btn.active {
      background: #333;
      color: #fff;
    }

    .feedback-type-badge {
      font-size: 0.68rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 0.12rem 0.45rem;
      border-radius: 3px;
      white-space: nowrap;
    }

    .feedback-type-badge.feature { background: #e3f2fd; color: #1565c0; }
    .feedback-type-badge.bug { background: #fff3e0; color: #e65100; }

    .feedback-status-badge {
      font-size: 0.68rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 0.12rem 0.45rem;
      border-radius: 3px;
      white-space: nowrap;
    }

    .feedback-status-badge.open { background: #e8f5e9; color: #2e7d32; }
    .feedback-status-badge.in_progress { background: #fff3e0; color: #e65100; }
    .feedback-status-badge.resolved { background: #e3f2fd; color: #1565c0; }
    .feedback-status-badge.closed { background: #f5f5f5; color: #616161; }

    .feedback-status-select {
      font-size: 0.75rem;
      padding: 0.1rem 0.3rem;
      border: 1px solid #ddd;
      border-radius: 3px;
      background: #fff;
      cursor: pointer;
    }

    .feedback-empty {
      text-align: center;
      color: #999;
      padding: 3rem 0;
    }

    .feedback-filter-toggle {
      display: flex;
      gap: 0;
      border: 1px solid #ddd;
      border-radius: 6px;
      overflow: hidden;
      width: fit-content;
      margin-bottom: 1rem;
    }
    .feedback-filter-toggle .filter-btn {
      padding: 0.5rem 1.25rem;
      border: none;
      background: #fff;
      color: #555;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .feedback-filter-toggle .filter-btn:not(:last-child) {
      border-right: 1px solid #ddd;
    }
    .feedback-filter-toggle .filter-btn:hover { background: #f5f5f5; }
    .feedback-filter-toggle .filter-btn.active { background: #333; color: #fff; }

    .feedback-card.expandable { cursor: pointer; }
    .feedback-card.expandable .feedback-chevron {
      margin-left: auto;
      font-size: 0.7rem;
      color: #999;
      transition: transform 0.2s;
    }
    .feedback-card.expandable.expanded .feedback-chevron { transform: rotate(90deg); }

    .feedback-resolution {
      display: none;
      margin-top: 0.75rem;
      padding: 0.75rem;
      background: #f9f9f9;
      border-radius: 4px;
      font-size: 0.82rem;
      line-height: 1.5;
      border-left: 3px solid #1565c0;
    }
    .feedback-resolution.visible { display: block; }
    .feedback-resolution h4 {
      margin: 0 0 0.25rem;
      font-size: 0.78rem;
      color: #555;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    .feedback-resolution h4:not(:first-child) { margin-top: 0.6rem; }
    .feedback-resolution p { margin: 0; color: #333; }
