
    :root {
      --page-bg: #b7a892;
      --paper: #e7dfcf;
      --tree-bg: #cdc0af;
      --tree-box: #d5cfbc;
      --tree-box-bio: #d8d2c0;
      --tree-box-none: #d0c8b6;
      --ink: #333;
      --brown: #4d3f2a;
      --frame: #8b7355;
      --frame-dark: #6f5b42;
      --link: #0055aa;
      --link-hover: #0077dd;
      --line: #5d564d;
    }

    body {
      font-family: Georgia, "Times New Roman", serif;
      margin: 0;
      padding: 28px;
      color: var(--ink);
      background-color: var(--page-bg);
      
      background-repeat: repeat;
      background-position: top left;
      background-attachment: scroll;
    }

    .page-header {
      max-width: 1100px;
      margin: 0 auto 24px auto;
      text-align: center;
      color: var(--brown);
    }

    .page-header .eyebrow {
      margin: 0 0 4px 0;
      font-size: 0.95rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: #6f5b42;
    }

    h1 {
      margin: 0;
      font-size: 2.3rem;
      font-weight: normal;
      letter-spacing: 0.04em;
    }

    .date-range {
      margin: 6px 0 12px 0;
      font-size: 1.05rem;
      color: #6f5b42;
    }

    .rule {
      width: 420px;
      max-width: 80%;
      margin: 14px auto;
      border: 0;
      border-top: 1px solid #7d6a4f;
      border-bottom: 1px solid #eadfca;
    }

    .intro {
      max-width: 850px;
      margin: 0 auto;
      text-align: center;
      line-height: 1.55;
      font-family: Arial, sans-serif;
      color: #40382f;
    }

    .tree-container {
      width: fit-content;
      max-width: calc(100vw - 56px);
      margin: 30px auto 18px auto;
      padding: 18px;
      background: #d8cfbd;
      border: 8px solid var(--frame);
      border-radius: 14px;
      box-shadow:
        inset 0 0 0 2px #efe8d8,
        0 10px 25px rgba(0,0,0,.25);
      overflow-x: auto;
    }

    svg {
      display: block;
      background: var(--tree-bg);
      border-radius: 16px;
      box-shadow: inset 0 0 18px rgba(80, 65, 45, .18);
      max-width: none;
    }

    .person rect {
      fill: var(--tree-box);
      stroke: #444;
      stroke-width: 1;
      /* rx: 6;
      ry: 6; */
    }

    .person text {
      font-family: Arial, sans-serif;
      font-size: 15px;
      fill: var(--ink);
      text-anchor: middle;
      dominant-baseline: middle;
      cursor: default;
    }

    .person a text {
      fill: var(--link);
      cursor: pointer;
      text-decoration: underline;
    }

    .person a text:hover {
      fill: var(--link-hover);
    }

    .person.no-bio rect {
      fill: var(--tree-box-none);
    }

    .person.has-bio rect {
      fill: var(--tree-box-bio);
    }

    .col-header {
      font-family: Arial, sans-serif;
      font-size: 16px;
      font-weight: bold;
      fill: var(--ink);
      text-anchor: middle;
    }

    .tree-legend {
      display: flex;
      justify-content: flex-end;
      gap: 18px;
      margin-top: 12px;
      font-family: Arial, sans-serif;
      font-size: 0.9rem;
      color: #40382f;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .legend-swatch {
      width: 17px;
      height: 13px;
      border: 1px solid #444;
      border-radius: 3px;
      display: inline-block;
    }

    .legend-swatch.has-bio {
      background: var(--tree-box-bio);
    }

    .legend-swatch.no-bio {
      background: var(--tree-box-none);
    }

    .page-footer {
      max-width: 1100px;
      margin: 16px auto 0 auto;
      text-align: center;
      font-family: Arial, sans-serif;
      font-size: 0.9rem;
      color: #4a4035;
    }

    @media (max-width: 700px) {
      body {
        padding: 14px;
      }

      h1 {
        font-size: 1.8rem;
      }

      .tree-container {
        max-width: calc(100vw - 28px);
        padding: 10px;
        border-width: 5px;
      }

      .tree-legend {
        justify-content: center;
        flex-wrap: wrap;
      }
    }

    .tree-toolbar {
      display: flex;
      justify-content: flex-end;
      margin: 0 0 10px 0;
      font-family: Arial, sans-serif;
    }

    .generation-toggle {
      border: 1px solid var(--frame-dark);
      border-radius: 999px;
      background: #efe3cd;
      color: var(--brown);
      padding: 8px 14px;
      font-family: Arial, sans-serif;
      font-size: 0.92rem;
      font-weight: bold;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(0,0,0,.16);
      transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    }

    .generation-toggle:hover,
    .generation-toggle:focus {
      background: #f8edda;
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0,0,0,.20);
      outline: none;
    }

    .generation-toggle[hidden] {
      display: none;
    }

    .tree-expanded .generation-toggle {
      background: #e1d0b4;
    }

    .tree-lines .connector {
      fill: none;
      stroke: var(--line);
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    #treeSvg {
      opacity: 1;
      transition: opacity 140ms ease;
    }

    #treeSvg.is-redrawing {
      opacity: 0.72;
    }

    .expand-control {
      cursor: pointer;
      outline: none;
    }

    .expand-control circle {
      fill: #f1e6d2;
      stroke: #6f5b42;
      stroke-width: 1.5;
      filter: drop-shadow(0 1px 1px rgba(0,0,0,.18));
    }

    .expand-control text {
      font-family: Arial, sans-serif;
      font-size: 16px;
      font-weight: bold;
      fill: #4d3f2a;
      text-anchor: middle;
      dominant-baseline: middle;
      pointer-events: none;
    }

    .expand-control:hover circle,
    .expand-control:focus circle {
      fill: #fff1d7;
      stroke: #4d3f2a;
      stroke-width: 2;
    }
