:root {
    --paper: #fffdf3;
    --paper-dark: #eee7d2;
    --green: #214d2b;
    --green-light: #dce5cf;
    --red: #7d1717;
    --blue: #00008b;
    --gold: #9a7831;
    --line: #aaa38f;
    --text: #29271f;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    background: #c8c7bf;
}

body {
    margin: 0;
    color: var(--text);
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .18) 0, rgba(255, 255, 255, .18) 1px, transparent 1px, transparent 4px),
        #d8d5ca;
    font: 12px/1.45 Verdana, Arial, sans-serif;
}

a {
    color: var(--blue);
    text-decoration: underline;
}

a:visited {
    color: #551a8b;
}

a:hover,
a:focus {
    color: var(--red);
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    color: var(--red);
    font: bold 23px/1.15 Georgia, "Times New Roman", serif;
    text-align: center;
}

h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: -60px;
    left: 10px;
    padding: 8px;
    background: white;
}

.skip-link:focus {
    top: 10px;
}

.page-wrapper {
    width: min(1060px, calc(100% - 20px));
    margin: 10px auto;
    border: 1px solid #5e5a4d;
    background: var(--paper);
    box-shadow: 0 0 0 2px #ece8d9, 2px 3px 8px rgba(0, 0, 0, .35);
}

.site-header {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border: 5px solid #f7f2df;
    outline: 1px solid #857f6d;
    background: #ead39e url("../images/header/velema-header.png") center center / cover no-repeat;
}

.brand-panel {
    position: relative;
    z-index: 1;
    padding: 42px 15px 18px 38px;
    text-shadow: 1px 1px #f8f2dc;
}

.site-name {
    color: #123c20 !important;
    font: 58px/1 Georgia, "Times New Roman", serif;
    letter-spacing: 8px;
    text-decoration: none;
}

.brand-panel p {
    margin: 8px 0 0;
    color: var(--red);
    font: 22px Georgia, "Times New Roman", serif;
}

.top-navigation {
    padding: 7px 6px 6px;
    border-top: 1px solid white;
    border-bottom: 1px solid #857e6b;
    background: linear-gradient(#fffdf7, #e9e3d2);
    text-align: center;
}

.top-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-navigation li:not(:last-child)::after {
    margin: 0 8px;
    color: #5c4a28;
    content: "|";
}

.top-navigation a {
    font: 12px Arial, sans-serif;
}

.top-navigation a.active {
    color: var(--red);
    font-weight: bold;
    text-decoration: none;
}

.breadcrumbs {
    margin: 0 0 7px;
    padding: 3px 6px;
    border: 1px solid #c3bba6;
    background: #f1ecdd;
    color: #655d4e;
    font: 10px Verdana, Arial, sans-serif;
}

.section-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 9px;
    padding: 5px 6px;
    border: 1px solid #918875;
    background: #e8e3d4;
    font: 10px Verdana, Arial, sans-serif;
}

.section-navigation a:not(:last-child)::after {
    margin: 0 7px;
    color: #665c47;
    content: "|";
}

.section-navigation a.active {
    color: var(--red);
    font-weight: bold;
    text-decoration: none;
}

.menu-toggle {
    display: none;
}

.layout {
    display: grid;
    grid-template-columns: 178px minmax(0, 1fr) 206px;
    gap: 9px;
    padding: 9px;
    background: #faf7eb;
}

.sidebar {
    min-width: 0;
}

.sidebar-box,
.content-box {
    margin-bottom: 9px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: inset 1px 1px white;
}

.sidebar-box {
    background: #f4efdf;
}

.sidebar-box > :not(.sidebar-title) {
    margin-right: 10px;
    margin-left: 10px;
}

.sidebar-title,
.section-title {
    margin: 0;
    padding: 4px 8px;
    border-bottom: 1px solid #173b21;
    color: white;
    background: var(--green);
    font: bold 13px Georgia, "Times New Roman", serif;
}

.sidebar-title.muted-title {
    border-color: #a39a82;
    color: #29271f;
    background: #e2dcc9;
}

.sidebar-title.red-title,
.red-section-title {
    border-color: #591010;
    background: var(--red);
}

.side-menu {
    margin-top: 8px;
    padding: 0;
    list-style: none;
}

.side-menu > li {
    position: relative;
    break-inside: avoid;
    margin-bottom: 6px;
    padding-left: 16px;
}

.side-menu > li > .menu-icon {
    position: absolute;
    top: 3px;
    left: 0;
}

.side-menu > li > a {
    font-weight: bold;
}

.side-menu li {
    display: block;
}

.side-menu a.active {
    color: var(--red);
    font-weight: bold;
}

.side-submenu {
    width: 100%;
    margin: 3px 0 0;
    padding: 0;
    list-style: none;
}

.side-submenu li {
    display: block;
    margin: 1px 0;
}

.side-submenu a {
    font-size: 10px;
}

.menu-icon {
    display: inline-block;
    width: 10px;
    height: 9px;
    border: 1px outset #8b8269;
    background:
        linear-gradient(90deg, transparent 35%, #7d1717 36% 64%, transparent 65%),
        linear-gradient(0deg, #b49443 0 55%, transparent 56%);
}

.quick-search {
    padding-bottom: 10px;
}

.quick-search label {
    display: block;
    margin: 7px 0 3px;
    font-size: 10px;
}

input,
select,
textarea {
    max-width: 100%;
    border: 2px inset #ddd;
    border-radius: 0;
    background: white;
    color: #222;
    font: 12px Verdana, sans-serif;
}

.simple-family-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 28px;
    margin: 4px 0 12px;
}

input {
    height: 24px;
    padding: 2px 4px;
}

.quick-search input {
    width: 100%;
}

.retro-button {
    min-height: 24px;
    margin-top: 6px;
    padding: 2px 14px;
    border: 2px outset #e7e7df;
    border-radius: 0;
    background: #dddcd5;
    color: #111;
    font: 12px "Times New Roman", serif;
}

.retro-button:active {
    border-style: inset;
}

.retro-button:disabled {
    color: #777;
}

.status-list,
.detail-list,
.research-counts {
    margin-top: 8px;
}

.status-list div,
.detail-list div,
.research-counts div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border-bottom: 1px dotted #a69d84;
}

.status-list dt,
.status-list dd,
.detail-list dt,
.detail-list dd,
.research-counts dt,
.research-counts dd {
    margin: 0;
}

.detail-list dt {
    font-weight: bold;
}

.person-dossier-header {
    border-top: 5px solid var(--green);
    background:
        repeating-linear-gradient(0deg, rgba(92, 76, 43, .025) 0 1px, transparent 1px 5px),
        var(--paper);
}

.person-dossier-header h1 {
    margin-bottom: 2px;
    color: var(--red);
    letter-spacing: .7px;
    text-transform: uppercase;
}

.person-dossier-header > p {
    margin-bottom: 3px;
}

.person-life-years {
    color: #4b4333;
    font: bold 17px Georgia, "Times New Roman", serif;
}

.dossier-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding-top: 7px;
    border-top: 1px dotted #9f9478;
}

.dossier-actions .retro-button {
    display: inline-block;
    margin-top: 0;
    text-decoration: none;
}

.dossier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.dossier-table th,
.dossier-table td {
    padding: 5px 7px;
    border: 1px solid #b9af96;
    vertical-align: top;
    text-align: left;
}

.dossier-table th {
    width: 145px;
    background: #e8e1ce;
}

.dossier-table tr:nth-child(even) td {
    background: #fffdf4;
}

.family-detail-list,
.source-detail-list {
    margin: 0;
}

.family-detail-list div,
.source-detail-list div {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
    padding: 4px 2px;
    border-bottom: 1px dotted #a69d84;
}

.family-detail-list dt,
.family-detail-list dd,
.source-detail-list dt,
.source-detail-list dd {
    margin: 0;
}

.family-detail-list dt,
.source-detail-list dt {
    font-weight: bold;
}

.dossier-timeline,
.dossier-source-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dossier-timeline > li {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 3px;
    border-bottom: 1px dotted #928971;
}

.dossier-timeline > li:last-child,
.dossier-source-list > li:last-child article {
    border-bottom: 0;
}

.timeline-year {
    color: var(--red);
    font: bold 16px Georgia, "Times New Roman", serif;
    text-align: right;
}

.dossier-timeline h3,
.dossier-source-list h3 {
    margin-bottom: 2px;
    color: #183e23;
    font-size: 14px;
}

.dossier-timeline p {
    margin-bottom: 3px;
}

.event-source-links {
    color: #655e4f;
    font-size: 9px;
}

.event-source-links a {
    margin-left: 2px;
}

.dossier-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.dossier-columns h3 {
    margin-bottom: 3px;
}

.dossier-columns ul {
    margin-bottom: 0;
}

.dossier-source-list > li article {
    padding: 10px 3px;
    border-bottom: 1px solid #b6ab90;
}

.dossier-source-list h3 span {
    color: var(--red);
}

.source-detail-list {
    margin: 6px 0;
    font-size: 10px;
}

.source-detail-list div {
    grid-template-columns: 82px minmax(0, 1fr);
}

.dossier-source-list li:target article {
    outline: 2px solid #b8a65e;
    outline-offset: -2px;
    background: #fff7cf;
}

.research-status-box p {
    margin-bottom: 0;
}

.archive-statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 5px;
    margin: 10px 0;
}

.archive-statistics div {
    padding: 6px;
    border: 1px solid #9c9278;
    background: #eee8d6;
    text-align: center;
}

.archive-statistics dt,
.archive-statistics dd {
    margin: 0;
}

.archive-statistics dt {
    color: #4f4838;
    font-size: 9px;
}

.archive-statistics dd {
    color: var(--green);
    font: bold 17px Georgia, "Times New Roman", serif;
}

.archive-search {
    margin-top: 11px;
}

.archive-filters {
    display: grid;
    grid-template-columns: 1.3fr .65fr 1fr 1fr auto auto;
    align-items: end;
    gap: 7px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #9c9278;
    background: #eee8d6;
}

.timeline-filters {
    grid-template-columns: 1.25fr .7fr .7fr 1fr 1fr auto auto;
}

.archive-filters label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    font-weight: bold;
}

.archive-filters input,
.archive-filters select {
    box-sizing: border-box;
    width: 100%;
    height: 25px;
    border: 2px inset #ded8c9;
    background: white;
    font: 11px Verdana, Arial, sans-serif;
}

.archive-filters .retro-button {
    margin-top: 0;
}

.archive-filters > a {
    padding-bottom: 4px;
    white-space: nowrap;
}

.archive-results-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 7px;
}

.archive-results-heading h2,
.archive-results-heading p {
    margin-bottom: 7px;
}

.archive-results-heading [aria-current="page"] {
    color: #222;
    font-weight: bold;
    text-decoration: none;
}

.archive-table {
    min-width: 760px;
}

.archive-table th:first-child,
.archive-table td:first-child {
    width: 90px;
    white-space: nowrap;
}

.archive-table td {
    vertical-align: top;
}

.archive-highlights {
    margin-top: 6px;
}

.archive-timeline {
    margin-top: 5px;
}

.timeline-year-heading {
    margin: 12px 0 0;
    padding: 4px 7px;
    border: 1px solid #6c1717;
    color: white;
    background: var(--red);
    font-size: 15px;
}

.timeline-record {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 5px;
    border-right: 1px solid #b8ad93;
    border-bottom: 1px dotted #928971;
    border-left: 1px solid #b8ad93;
}

.timeline-record time {
    color: #584f3d;
    font-weight: bold;
    text-align: right;
}

.timeline-record h4 {
    margin-bottom: 3px;
    color: var(--green);
    font-size: 13px;
}

.timeline-record p {
    margin-bottom: 3px;
}

.timeline-people {
    font-weight: bold;
}

.small-note,
.demo-label {
    color: #665c47;
    font-size: 10px;
}

.demo-label {
    display: inline-block;
    padding: 2px 5px;
    border: 1px solid #a59b7d;
    background: #eee7d3;
    font-weight: bold;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.updates-list {
    padding-left: 18px;
}

.updates-list li {
    margin-bottom: 9px;
}

.updates-list li::marker {
    color: var(--red);
}

.portal-box {
    background: #f1f3e5;
}

.content {
    min-width: 0;
}

.article-intro {
    font: 14px/1.5 Georgia, "Times New Roman", serif;
}

.history-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.history-link-grid .content-box {
    margin-bottom: 0;
}

.history-link-grid h2 {
    margin-bottom: 6px;
    color: var(--red);
    font-size: 17px;
}

.historical-context {
    margin: 10px 0;
    padding: 8px 10px;
    border: 1px solid #9f936f;
    border-left: 6px solid var(--gold);
    background: #f5efda;
}

.historical-context strong {
    color: var(--green);
}

.article-placeholder {
    display: grid;
    min-height: 125px;
    margin: 9px 0;
    place-items: center;
    border: 2px inset #d7cfb9;
    background:
        repeating-linear-gradient(135deg, rgba(111, 93, 58, .05) 0 4px, transparent 4px 9px),
        #eee7d3;
    color: #655b46;
    font: italic 11px Georgia, serif;
    text-align: center;
}

.article-sources {
    color: #5f5849;
    font-size: 10px;
}

.century-list section {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dotted #9c927a;
}

.content-box {
    padding: 10px;
}

.content-box > .section-title {
    margin: -10px -10px 10px;
}

.welcome-box {
    background:
        radial-gradient(ellipse at 90% 25%, rgba(156, 119, 48, .12), transparent 25%),
        var(--paper);
}

.notice,
.demo-banner {
    padding: 7px 9px;
    border: 1px solid #b8a65e;
    background: #fff7cf;
}

.demo-banner {
    margin-bottom: 9px;
    color: var(--red);
    font-weight: bold;
    text-align: center;
}

.more-link {
    margin-bottom: 0;
    text-align: right;
}

.family-tree-preview {
    overflow: hidden;
    margin: 10px 0;
    padding: 10px;
    border: 1px inset #bbb39c;
    background:
        repeating-linear-gradient(0deg, rgba(107, 85, 48, .04) 0 1px, transparent 1px 5px),
        #f7f1df;
    color: #55442b;
    font-family: "Courier New", monospace;
    text-align: center;
}

.tree-generation {
    display: flex;
    justify-content: center;
    gap: 46px;
}

.tree-top {
    gap: 5px;
}

.person-card {
    display: inline-block;
    min-width: 90px;
    padding: 5px 7px;
    border: 2px outset #d8ceb3;
    background: #fffbed;
    color: #322b20;
    font: 11px Verdana, sans-serif;
}

.main-person {
    border-color: #76836b;
    background: #edf0da;
    font-weight: bold;
}

.family-tree-section {
    padding: 9px;
}

.tree-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 9px;
    margin-bottom: 9px;
}

.tree-heading h2,
.tree-heading p {
    margin-bottom: 4px;
}

.tree-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 5px;
    border: 1px solid #8e856e;
    background: #e8e1ce;
}

.tree-controls output {
    min-width: 42px;
    color: #433a29;
    font: bold 10px Verdana, Arial, sans-serif;
    text-align: center;
}

.family-tree-viewport {
    position: relative;
    max-width: 100%;
    min-height: 260px;
    overflow: auto;
    border: 2px inset #c8bea7;
    background:
        repeating-linear-gradient(0deg, rgba(78, 67, 43, .035) 0 1px, transparent 1px 24px),
        #f8f2df;
}

.family-tree-viewport:focus {
    outline: 2px solid #234d2f;
    outline-offset: 2px;
}

.family-tree-viewport.is-interactive {
    height: 620px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.family-tree-viewport.is-dragging {
    cursor: grabbing;
}

.family-tree-canvas {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    padding: 12px;
    transform-origin: 0 0;
}

.family-tree-canvas.is-positioned {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
}

.tree-generation-row {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.tree-generation-label {
    margin: 0 0 6px;
    padding-bottom: 2px;
    border-bottom: 1px dotted #91866c;
    color: #6b1717;
    font-size: 14px;
}

.tree-generation-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.family-tree-canvas.is-positioned .tree-generation-row,
.family-tree-canvas.is-positioned .tree-generation-cards {
    display: contents;
}

.family-tree-canvas.is-positioned .tree-generation-label {
    display: none;
}

.tree-person-card {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 180px;
    min-height: 96px;
    border: 2px outset #d8ceb3;
    background: #fffbed;
    color: #322b20;
    font: 10px/1.35 Verdana, Arial, sans-serif;
    text-align: center;
}

.family-tree-canvas.is-positioned .tree-person-card {
    position: absolute;
}

.tree-person-card.selected-person {
    border: 3px double #355d3e;
    background: #e8edcf;
}

.tree-card-select {
    display: flex;
    min-height: 65px;
    padding: 7px 7px 5px;
    flex-direction: column;
    justify-content: center;
    color: #174f8a;
    text-decoration: none;
}

.tree-card-select:hover,
.tree-card-select:focus {
    background: #f2ead0;
    text-decoration: underline;
}

.tree-card-select strong {
    font: bold 12px Georgia, "Times New Roman", serif;
}

.tree-card-select span {
    color: #4d4638;
}

.tree-card-select .selected-label {
    margin-bottom: 3px;
    color: #6b1717;
    font: bold 8px Verdana, Arial, sans-serif;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.tree-card-details {
    display: block;
    padding: 3px 6px;
    border-top: 1px dotted #9f957d;
    background: #eee7d3;
    font-size: 9px;
    text-align: right;
}

.tree-connections {
    display: none;
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    overflow: visible;
    pointer-events: none;
}

.family-tree-canvas.is-positioned .tree-connections {
    display: block;
}

.tree-connection {
    fill: none;
    stroke: #5f573f;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.partner-connection {
    stroke: #7b2020;
    stroke-width: 3;
}

.tree-stem,
.branch-line {
    height: 20px;
    font-weight: bold;
    line-height: 20px;
}

.archive-grid,
.category-grid {
    display: grid;
    gap: 9px;
}

.archive-grid {
    grid-template-columns: repeat(4, 1fr);
}

.archive-thumbnail {
    min-width: 0;
    text-align: center;
}

.archive-thumbnail h3 {
    margin: 5px 0 0;
    color: var(--blue);
    font: 11px Verdana, sans-serif;
    text-decoration: underline;
}

.document-placeholder {
    display: grid;
    height: 84px;
    place-items: end center;
    border: 4px solid #e8dfc7;
    outline: 1px solid #8b836d;
    filter: sepia(.55);
}

.document-placeholder span {
    width: 100%;
    padding: 2px;
    background: rgba(248, 241, 217, .86);
    color: #554a39;
    font-size: 8px;
    letter-spacing: 1px;
}

.pattern-1 {
    background: repeating-linear-gradient(0deg, #d8c9a6 0 8px, #83745d 8px 9px);
}

.pattern-2 {
    background: repeating-linear-gradient(90deg, #e1d4b1 0 12px, #8c7656 12px 13px);
}

.pattern-3 {
    background: radial-gradient(circle at 30% 35%, #454138 0 8px, transparent 9px), radial-gradient(circle at 65% 32%, #454138 0 8px, transparent 9px), #807662;
}

.pattern-4 {
    background: repeating-linear-gradient(0deg, #cfbea0 0 5px, #625647 5px 6px);
}

.research-statuses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 5px;
    margin: 12px 0;
}

.research-statuses div {
    padding: 7px 4px;
    border: 1px solid #91886f;
    background: #ede9d8;
    text-align: center;
}

.research-statuses strong,
.research-statuses span {
    display: block;
}

.research-statuses strong {
    color: var(--green);
    font: bold 11px Arial, sans-serif;
}

.research-statuses div:nth-child(2) strong {
    color: #8a681b;
}

.research-statuses div:nth-child(3) strong {
    color: var(--red);
}

.research-statuses span {
    margin-top: 3px;
    font-size: 9px;
}

.timeline-preview {
    display: flex;
    justify-content: space-between;
    gap: 3px;
    margin: 15px 5px 8px;
}

.timeline-preview div {
    position: relative;
    flex: 1;
    text-align: center;
}

.timeline-preview div::after {
    position: absolute;
    z-index: 0;
    top: 26px;
    left: 50%;
    width: 100%;
    border-top: 2px solid #8e7a4e;
    content: "";
}

.timeline-preview div:last-child::after {
    display: none;
}

.timeline-preview strong,
.timeline-preview span,
.timeline-preview b {
    position: relative;
    z-index: 1;
    display: block;
}

.timeline-preview strong {
    font: 10px Verdana, sans-serif;
}

.timeline-preview span {
    height: 15px;
    color: var(--gold);
}

.timeline-preview b {
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border: 1px solid #8e7a4e;
    background: #fffdf3;
    line-height: 20px;
}

.origin-preview {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
}

.origin-preview .section-title {
    grid-column: 1 / -1;
}

.netherlands-placeholder {
    display: grid;
    min-height: 150px;
    place-items: center;
    border: 1px solid #918875;
    background:
        linear-gradient(25deg, transparent 42%, rgba(61, 107, 91, .35) 43% 55%, transparent 56%),
        repeating-linear-gradient(0deg, #dce6dd 0 14px, #c5d8d4 14px 15px);
    color: #31594e;
    font: bold 10px Georgia, serif;
    text-align: center;
}

.table-scroll {
    overflow-x: auto;
}

.retro-table {
    width: 100%;
    border: 2px outset #d8d4c8;
    border-collapse: collapse;
}

.retro-table th,
.retro-table td {
    padding: 6px;
    border: 1px solid #aaa38f;
    text-align: left;
}

.retro-table th {
    color: white;
    background: var(--green);
    font: bold 11px Verdana, sans-serif;
}

.retro-table tr:nth-child(even) {
    background: #f0ebdd;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
    margin-top: 10px;
    padding: 6px 8px;
    border: 1px solid #aaa18b;
    background: #eee8d8;
    font: 10px Verdana, Arial, sans-serif;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.pagination .disabled {
    color: #89816f;
}

.compact-search {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 6px;
    margin: 8px 0;
}

.compact-search label {
    width: 100%;
    font-weight: bold;
}

.compact-search input {
    width: min(320px, 100%);
}

.search-results {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.search-results li {
    padding: 6px 4px;
    border-bottom: 1px dotted #958b74;
}

.empty-section p,
.empty-state {
    color: #655e4f;
}

.tree-frame,
.map-frame,
.empty-state,
.login-box,
.contact-form {
    margin-top: 12px;
    padding: 12px;
    border: 2px inset #d8d3c4;
    background: #f2eedf;
}

.large-tree {
    min-height: 240px;
    padding-top: 50px;
}

.category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.category-card {
    position: relative;
    min-height: 95px;
    padding: 9px 9px 9px 50px;
    border: 2px outset #e0dacb;
    background: #f0ebdc;
}

.category-card h2 {
    margin-bottom: 5px;
    color: var(--red);
    font-size: 15px;
}

.file-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 27px;
    height: 34px;
    border: 1px solid #6c624d;
    background: repeating-linear-gradient(0deg, #e7dbb8 0 6px, #8e8269 6px 7px);
}

.story-empty {
    text-align: center;
}

.large-initial {
    display: block;
    color: rgba(125, 23, 23, .25);
    font: 80px Georgia, serif;
}

.map-grid {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border: 1px solid #8c9484;
    background:
        linear-gradient(90deg, transparent 49.7%, rgba(49, 91, 78, .15) 50%, transparent 50.3%),
        linear-gradient(0deg, transparent 49.7%, rgba(49, 91, 78, .15) 50%, transparent 50.3%),
        #d9e5df;
    background-size: 60px 60px;
}

.netherlands-shape {
    position: absolute;
    top: 42px;
    left: 38%;
    width: 145px;
    height: 290px;
    clip-path: polygon(48% 0, 73% 11%, 68% 28%, 88% 44%, 66% 58%, 73% 74%, 47% 100%, 28% 87%, 35% 67%, 10% 51%, 24% 31%, 18% 14%);
    background: #d8c88f;
    box-shadow: inset 0 0 0 2px #796f4e;
}

.netherlands-shape span {
    position: absolute;
    top: 47%;
    left: 18%;
    width: 70%;
    font: bold 11px Georgia, serif;
    text-align: center;
}

.map-label {
    position: absolute;
    padding: 2px 4px;
    border: 1px solid #aaa17d;
    background: #fffbe9;
    font-size: 9px;
}

.map-label.north { top: 50px; right: 16%; }
.map-label.middle { top: 185px; left: 18%; }
.map-label.south { right: 20%; bottom: 45px; }

.research-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.research-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px dotted #988f78;
    padding: 5px;
}

.research-steps span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border: 2px outset #bdb59d;
    background: var(--green);
    color: white;
    font-weight: bold;
}

.reliability-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.reliability-list article {
    padding: 7px 9px;
    border: 1px solid #a8a18c;
    border-left-width: 7px;
    background: #f5f0e3;
}

.reliability-list h3 {
    margin-bottom: 3px;
    font-size: 14px;
}

.reliability-list p {
    margin-bottom: 0;
}

.reliability-list .found { border-left-color: #786534; }
.reliability-list .probable { border-left-color: #b48a24; }
.reliability-list .confirmed { border-left-color: #2c6738; }
.reliability-list .rejected { border-left-color: #812323; }

.source-list article {
    display: flex;
    gap: 9px;
    padding: 9px 3px;
    border-bottom: 1px dotted #928971;
}

.source-list h2 {
    margin-bottom: 2px;
    color: var(--red);
    font-size: 15px;
}

.source-list p {
    margin-bottom: 0;
}

.source-marker {
    width: 14px;
    height: 16px;
    flex: 0 0 14px;
    border: 1px outset #ada58e;
    background: linear-gradient(90deg, #e1d6b9 0 65%, #9c8d66 66%);
}

.login-box {
    width: min(390px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.login-box h2 {
    margin: -12px -12px 12px;
    padding: 5px 9px;
    color: white;
    background: var(--green);
    font-size: 14px;
}

.login-box form,
.contact-form {
    display: grid;
    grid-template-columns: 115px 1fr;
    gap: 7px;
    align-items: center;
}

.login-box input {
    width: 100%;
}

.login-box .retro-button {
    grid-column: 2;
    justify-self: start;
}

.login-box .notice {
    margin-bottom: 0;
}

.contact-form {
    grid-template-columns: 100px 1fr;
}

.contact-form textarea {
    grid-column: 1 / -1;
}

.contact-form input {
    width: min(350px, 100%);
}

.contact-form textarea {
    width: 100%;
    padding: 5px;
}

.contact-form .retro-button {
    grid-column: 2;
    justify-self: start;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-success,
.form-errors {
    margin: 9px 0;
    padding: 8px 10px;
    border: 1px solid #66795b;
    background: #e8efdc;
}

.form-errors {
    border-color: #8b3a32;
    background: #f2dfd8;
}

.form-errors ul {
    margin-bottom: 0;
}

.site-footer {
    margin: 0 9px 9px;
    padding: 11px;
    border-top: 3px double #7b725e;
    color: #3d392e;
    background: #f8f4e8;
    font: 10px Verdana, sans-serif;
    text-align: center;
}

.site-footer p {
    margin: 5px 0;
}

.browser-note {
    color: #777064;
    font-style: italic;
}

@media (max-width: 900px) {
    .site-name {
        font-size: 46px;
    }

    .brand-panel {
        padding-left: 20px;
    }

    .brand-panel p {
        font-size: 17px;
    }

    .layout {
        grid-template-columns: 160px minmax(0, 1fr) 185px;
    }
}

@media (max-width: 800px) {
    .page-wrapper {
        width: min(100% - 10px, 680px);
        margin: 5px auto;
    }

    .site-header {
        min-height: 170px;
        background-position: 22% center;
    }

    .brand-panel {
        padding: 35px 15px 20px;
        text-align: center;
    }

    .site-name {
        font-size: clamp(38px, 12vw, 56px);
        letter-spacing: 5px;
    }

    .layout {
        display: flex;
        flex-direction: column;
    }

    .content { order: 1; }
    .sidebar-left { order: 2; }
    .sidebar-right { order: 3; }

    .side-menu {
        columns: 2;
    }

    .history-link-grid {
        grid-template-columns: 1fr;
    }

    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .archive-filters,
    .timeline-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    body {
        font-size: 11px;
    }

    .top-navigation {
        text-align: left;
    }

    .menu-toggle {
        display: block;
        width: 100%;
        padding: 5px;
        border: 2px outset #ddd8ca;
        background: #e7e1d3;
        font-weight: bold;
    }

    .top-navigation ul {
        display: none;
        justify-content: flex-start;
        padding-top: 7px;
    }

    .top-navigation.menu-open ul {
        display: flex;
    }

    .top-navigation li {
        width: 50%;
        padding: 4px 7px;
    }

    .top-navigation li:not(:last-child)::after {
        display: none;
    }

    .section-navigation {
        justify-content: flex-start;
    }

    .section-navigation a {
        width: 50%;
        padding: 3px;
    }

    .section-navigation a:not(:last-child)::after {
        display: none;
    }

    .research-statuses,
    .category-grid,
    .reliability-list,
    .research-steps {
        grid-template-columns: 1fr;
    }

    .origin-preview {
        grid-template-columns: 1fr;
    }

    .origin-preview .netherlands-placeholder {
        min-height: 120px;
    }

    .timeline-preview {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    .timeline-preview div {
        min-width: 65px;
    }

    .tree-generation {
        gap: 5px;
    }

    .relationship-line,
    .branch-line {
        display: none;
    }

    .person-card {
        min-width: 0;
        font-size: 9px;
    }

    .dossier-table th {
        width: 105px;
    }

    .family-detail-list div,
    .source-detail-list div,
    .dossier-columns {
        grid-template-columns: 1fr;
    }

    .family-detail-list div,
    .source-detail-list div {
        gap: 1px;
    }

    .dossier-timeline > li {
        grid-template-columns: 45px minmax(0, 1fr);
        gap: 7px;
    }

    .timeline-year {
        font-size: 13px;
    }

    .dossier-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .archive-filters,
    .timeline-filters {
        grid-template-columns: 1fr;
    }

    .archive-filters > a {
        padding-bottom: 0;
    }

    .archive-statistics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timeline-record {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .timeline-record time {
        text-align: left;
    }

    .family-tree-section {
        padding: 5px;
    }

    .tree-heading {
        display: block;
    }

    .tree-controls {
        justify-content: center;
        margin-top: 7px;
    }

    .family-tree-viewport.is-interactive {
        height: 500px;
    }

    .tree-person-card {
        width: 160px;
        font-size: 9px;
    }

    .tree-card-select strong {
        font-size: 11px;
    }

    .map-grid {
        min-height: 330px;
    }

    .login-box form,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .login-box .retro-button,
    .contact-form .retro-button,
    .contact-form .demo-label,
    .contact-form textarea,
    .contact-form .form-message {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}
