/* WikiPress uses a non-stretching column flex item on mobile. A size-contained
   shortcode needs that item to fill the available article width. */
.wp-theme-wikipress .article-body:has(.jhte) { align-self: stretch; width: 100%; }
.wp-theme-wikipress:has(.jhte) .site-branding { min-width: 0; max-width: 100%; }
.jhte {
    --jhte-ink: #262823;
    --jhte-muted: #64665d;
    --jhte-paper: #f8f5ed;
    --jhte-line: #dedbce;
    --jhte-brass: #8a6429;
    --jhte-wine: #783e3a;
    color: var(--jhte-ink);
    background: var(--jhte-paper);
    border: 1px solid var(--jhte-line);
    border-radius: 8px;
    margin: 24px 0;
    overflow: hidden;
    font: 15px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
    isolation: isolate;
    container-type: inline-size;
}
.jhte *, .jhte *::before, .jhte *::after { box-sizing: border-box; }
.jhte [hidden] { display: none !important; }
.jhte p { margin: 0 0 14px; font: inherit; }
.jhte h2, .jhte h3, .jhte h4 { color: inherit; border: 0; padding: 0; text-transform: none; letter-spacing: -.025em; }
.jhte a { color: #74501d; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.jhte a:hover { color: var(--jhte-wine); }
.jhte :is(a, button, input, select, summary):focus-visible { outline: 3px solid #9b702d; outline-offset: 4px; }
.jhte .jhte-hero { background: #252b27; color: #f8f5ed; padding: 38px 36px 0; position: relative; overflow: hidden; }
.jhte .jhte-eyebrow { font-size: 10px; font-weight: 750; letter-spacing: .16em; line-height: 1.6; margin: 0 0 16px; }
.jhte .jhte-hero > :not(.jhte-record) { position: relative; z-index: 1; }
.jhte .jhte-hero > .jhte-eyebrow { color: #d9bc83; max-width: 75%; }
.jhte .jhte-hero h2 { font: 400 clamp(30px, 4vw, 46px)/1.12 Georgia, "Times New Roman", serif; max-width: 620px; margin: 0 0 18px; padding-right: 55px; color: #fff9eb; }
.jhte .jhte-intro { color: #d4d8cc; max-width: 610px; font-size: 14px; padding-right: 25px; margin: 0 0 28px; }
.jhte .jhte-record { position: absolute; width: 240px; height: 240px; right: -105px; top: -36px; border-radius: 50%; background: repeating-radial-gradient(circle, #343b32 0, #343b32 1px, #272e27 2px, #272e27 7px); border: 1px solid #565b48; transform: rotate(15deg); opacity: .65; display: grid; place-items: center; }
.jhte .jhte-record span { border-radius: 50%; width: 86px; height: 86px; padding: 15px 0; text-align: center; color: #272b24; background: #c9ad74; font-size: 7px; letter-spacing: 1.5px; line-height: 1.8; }
.jhte .jhte-record b { font: 20px Georgia, serif; }
.jhte .jhte-stats { display: flex; flex-wrap: wrap; gap: 12px 28px; border-top: 1px solid #50564a; padding: 16px 0; color: #d3d5c9; font-size: 11px; }
.jhte .jhte-stats strong { color: #eed6a5; font-weight: 650; margin-right: 4px; font-size: 13px; }
.jhte .jhte-stats > :last-child { margin-left: auto; font-style: italic; }
.jhte .jhte-workspace { padding: 26px 28px 0; }
.jhte .jhte-controls { margin: 0; padding: 0; }
.jhte .jhte-filter-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.jhte .jhte-filter-top .jhte-eyebrow { margin: 0; color: var(--jhte-muted); }
.jhte button { font: 600 12px/1.4 system-ui, sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; box-shadow: none; border-radius: 4px; background: transparent; color: var(--jhte-ink); border: 1px solid #c9c7b9; padding: 10px 14px; min-height: 40px; transition: background .15s, border-color .15s; }
.jhte button:hover { background: #eae5d6; border-color: var(--jhte-brass); }
.jhte .jhte-text-button { color: var(--jhte-wine); padding: 4px 0; border: 0; text-decoration: underline; text-underline-offset: 3px; flex-shrink: 0; }
.jhte .jhte-text-button:hover { background: transparent; }
.jhte .jhte-filters { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.jhte label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 650; color: #565b50; margin: 0; min-width: 0; }
.jhte .jhte-search { grid-column: 1 / -1; }
.jhte .jhte-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jhte .jhte-filters > label:nth-child(2), .jhte .jhte-filters > label:nth-child(3) { grid-column: span 2; }
.jhte .jhte-filters > label:nth-child(4), .jhte .jhte-filters > label:nth-child(5) { grid-column: span 2; }
.jhte input, .jhte select { font: 400 13px/1.4 system-ui, sans-serif; color: var(--jhte-ink); background: #fffef9; border: 1px solid #cbcdbf; border-radius: 4px; padding: 10px 12px; height: 44px; width: 100%; min-width: 0; max-width: none; box-shadow: none; margin: 0; }
.jhte input::placeholder { color: #787b71; opacity: 1; }
.jhte input[aria-invalid="true"] { border: 2px solid var(--jhte-wine); }
.jhte .jhte-error { color: var(--jhte-wine); font-size: 12px; margin-top: 12px; }
.jhte .jhte-periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.jhte .jhte-periods button { padding: 8px 10px; font-size: 10px; min-height: 36px; border-radius: 3px; }
.jhte .jhte-periods [aria-pressed="true"] { background: #30382e; border-color: #30382e; color: #fff9ec; }
.jhte .jhte-context { font-size: 11px; color: var(--jhte-muted); line-height: 1.65; margin: 18px 0 0; padding: 0 0 22px; border-bottom: 1px solid var(--jhte-line); }
.jhte .jhte-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
.jhte .jhte-result-count { margin: 0; font-weight: 650; font-size: 12px; }
.jhte .jhte-sort { flex-direction: row; align-items: center; gap: 8px; flex-shrink: 0; }
.jhte .jhte-sort select { width: auto; height: 36px; font-size: 11px; padding: 7px 9px; }
.jhte ol.jhte-timeline { list-style: none; padding: 0; margin: 0; }
.jhte .jhte-event { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0 0 18px; position: relative; }
.jhte .jhte-event::before { content: ""; position: absolute; top: 17px; bottom: -17px; left: 80px; width: 1px; background: #c8c2ae; }
.jhte .jhte-event::after { content: ""; position: absolute; top: 19px; left: 77px; width: 7px; height: 7px; border: 2px solid var(--jhte-paper); box-shadow: 0 0 0 1px #8a795b; background: #8a795b; border-radius: 50%; }
.jhte .jhte-date { padding-top: 9px; }
.jhte .jhte-date > span { display: block; font: 400 26px/1.1 Georgia, serif; letter-spacing: -.04em; }
.jhte .jhte-date > small { display: block; margin-top: 7px; text-transform: uppercase; font-size: 8px; font-weight: 600; letter-spacing: .06em; color: var(--jhte-muted); overflow-wrap: anywhere; }
.jhte .jhte-card { padding: 20px 23px 0; background: #fffef9; border: 1px solid var(--jhte-line); border-radius: 5px; min-width: 0; overflow-wrap: anywhere; }
.jhte .jhte-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; color: #786036; font-size: 9px; font-weight: 650; letter-spacing: .045em; text-transform: uppercase; margin-bottom: 10px; }
.jhte .jhte-card-meta > :last-child { color: #6f746a; }
.jhte .jhte-card h3 { font: 400 23px/1.25 Georgia, serif; margin: 0 0 10px; color: #292d26; }
.jhte .jhte-description { color: #5d6257; font-size: 13px; line-height: 1.75; margin-bottom: 17px; }
.jhte .jhte-exact-date { font-size: 10px; color: var(--jhte-muted); margin: -2px 0 9px; }
.jhte details { border-top: 1px solid #eae8df; margin: 0; padding: 0; }
.jhte summary { cursor: pointer; padding: 12px 0; font: 600 11px/1.5 system-ui, sans-serif; color: #74501d; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.jhte summary::-webkit-details-marker { display: none; }
.jhte summary::after { content: "+"; font-size: 17px; line-height: 1; }
.jhte details[open] summary::after { content: "−"; }
.jhte .jhte-detail { padding: 4px 0 20px; font-size: 12px; }
.jhte .jhte-people { color: #5d6257; }
.jhte .jhte-people strong { color: var(--jhte-ink); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.jhte .jhte-listen { background: #f2eee0; border-left: 2px solid #aa8950; border-radius: 0 4px 4px 0; padding: 17px 18px; margin: 14px 0; }
.jhte .jhte-listen .jhte-eyebrow { color: #73531f; margin: 0 0 7px; font-size: 9px; }
.jhte .jhte-listen h4 { font: 600 12px/1.5 system-ui, sans-serif; margin: 0 0 8px; }
.jhte .jhte-listen p:last-child { margin: 0; color: #575c50; }
.jhte .jhte-links { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.jhte .jhte-article-link { font-weight: 650; }
.jhte .jhte-source { font-size: 10px; color: #62685c; }
.jhte .jhte-pagination { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 26px; background: var(--jhte-paper); font-size: 11px; }
.jhte button:disabled { cursor: default; opacity: .4; background: transparent; border-color: #c9c7b9; }
.jhte .jhte-empty { text-align: center; padding: 38px 20px; border: 1px dashed #c8c2ae; border-radius: 4px; margin: 0 0 24px; }
.jhte .jhte-empty h3 { font: 26px Georgia, serif; margin: 0 0 12px; }
.jhte .jhte-empty p { font-size: 13px; color: var(--jhte-muted); }
.jhte .jhte-footer { position: relative; background: #eeecdf; border-top: 1px solid #dad8cb; margin: 0 -28px; padding: 23px 28px; display: flex; align-items: center; gap: 18px; }
.jhte .jhte-footer p { margin: 0; color: #64685b; font-size: 10px; line-height: 1.8; }
.jhte .jhte-footer strong { font-size: 13px; color: #33392e; font-weight: 500; }
.jhte .jhte-footer-mark { font: 36px Georgia, serif; color: #887244; }
.jhte .jhte-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@container (min-width: 780px) {
    .jhte .jhte-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 80px 80px; }
    .jhte .jhte-filters > label:nth-child(n) { grid-column: auto; }
}
@container (max-width: 480px) {
    .jhte .jhte-hero { padding: 26px 20px 0; }
    .jhte .jhte-hero h2 { font-size: 32px; padding-right: 0; }
    .jhte .jhte-intro { padding-right: 0; font-size: 13px; }
    .jhte .jhte-record { opacity: .22; }
    .jhte .jhte-stats { gap: 9px 14px; }
    .jhte .jhte-stats > :last-child { display: none; }
    .jhte .jhte-workspace { padding: 20px 16px 0; }
    .jhte .jhte-filter-top .jhte-eyebrow { font-size: 8px; }
    .jhte .jhte-periods button { flex: 1 1 28%; }
    .jhte .jhte-event { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-bottom: 24px; }
    .jhte .jhte-event::before, .jhte .jhte-event::after { display: none; }
    .jhte .jhte-date { display: flex; align-items: baseline; gap: 10px; padding: 0; }
    .jhte .jhte-date > small { margin: 0; }
    .jhte .jhte-card { padding: 18px 17px 0; }
    .jhte .jhte-card h3 { font-size: 22px; }
    .jhte .jhte-sort { font-size: 0; gap: 0; }
    .jhte .jhte-result-count { font-size: 11px; }
    .jhte .jhte-footer { margin: 0 -16px; padding: 20px 16px; gap: 12px; }
    .jhte .jhte-pagination button { padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) { .jhte * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
    .jhte .jhte-controls, .jhte .jhte-sort, .jhte .jhte-pagination, .jhte .jhte-record { display: none !important; }
    .jhte .jhte-card { break-inside: avoid; }
    .jhte .jhte-hero { color: #222; background: white; }
    .jhte .jhte-hero h2, .jhte .jhte-intro, .jhte .jhte-stats, .jhte .jhte-stats strong { color: #222; }
}
