body {
    background-color: rgb(0, 0, 0);
}

/* main-header */
#main-header {
    padding-left: calc(var(--std) * 1.0);
    position: fixed;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    bottom: 0;
    left: 0;
    width: var(--maxWidth);
    height: calc(var(--std) * 3.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    z-index: 200;
}

#main-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--std) * 1.0);
    width: calc(100% - var(--std) * 1.0);
    height: 1px;
    border-top: 1px solid rgb(75, 75, 75);
}

#main-menu {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: calc(var(--std) * 1.0);
    gap: calc(var(--std) * 0.5);
}

.item-menu {
    padding: 0 0.25em;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border: 1px solid rgb(75, 75, 75);
    border-bottom: none;
}

.item-menu.active {
    position: relative;
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    border: none;
}

.item-menu.active::after {
    content: "";
    position: absolute;
    width: 100%;
    height: calc(var(--std) * 3.0);
    bottom: calc(var(--std) * 3.0 * (-1) + 1px);
    left: 0;
    background-color: rgb(255, 255, 255);
    background: -o-linear-gradient(bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 1)));
    background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
}

#cont-lang {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: calc(var(--std) * 0.5);
    height: calc(var(--std) * 1.0);
}

#cont-lang > button {
    padding: 0 0.25em;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    border: 1px solid rgb(75, 75, 75);
    border-bottom: none;
}

#cont-lang > button.active {
    position: relative;
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    border: none;
}

#cont-lang > button.active::after {
    content: "";
    position: absolute;
    width: 100%;
    height: calc(var(--std) * 3.0);
    bottom: calc(var(--std) * 3.0 * (-1) + 1px);
    left: 0;
    background-color: rgb(255, 255, 255);
    background: -o-linear-gradient(bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0)), to(rgba(255, 255, 255, 1)));
    background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
}

/* side-bar */
/* unified wrapper: bar + info panel move together as one piece */
#side-bar-wrap {
    /* viewport-based widths so nested % (from --maxWidth) can't shrink the panel */
    --sb-mw: calc(100vw - var(--std) * 5.0);
    --sb-panel-w: calc(var(--sb-mw) / 7 * 2 - var(--std) * 1.0);
    --sb-bar-w: calc(var(--std) * 5.0);
    position: fixed;
    top: 0;
    right: calc(var(--sb-panel-w) * -1);
    left: auto;
    width: calc(var(--sb-panel-w) + var(--sb-bar-w));
    height: 100%;
    z-index: 210;
    pointer-events: none;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    /* closed: anchored so the panel sits off-screen right, only the bar shows */
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
    -webkit-transition: -webkit-transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
    transition: -webkit-transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
    -o-transition: transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
    transition: transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
    transition: transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0), -webkit-transform 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
}

/* open: whole unit slides left by panel width, revealing the panel beside the bar */
#side-bar-wrap.active {
    -webkit-transform: translateX(calc(var(--sb-panel-w) * -1));
        -ms-transform: translateX(calc(var(--sb-panel-w) * -1));
            transform: translateX(calc(var(--sb-panel-w) * -1));
}

#side-bar {
    position: relative;
    top: 0;
    pointer-events: auto;
    -webkit-box-ordinal-group: 2;
        -ms-flex-order: 1;
            order: 1;
    width: var(--sb-bar-w);
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
    height: 100%;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    cursor: pointer;
    -webkit-transition: background-color 0.35s ease, color 0.35s ease;
    -o-transition: background-color 0.35s ease, color 0.35s ease;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* hover roll-over: bar turns white */
#side-bar:hover {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
}

/* stays white while the panel is open, connecting visually with the white box */
#side-bar-wrap.active #side-bar {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
}

#title-mobile {
    display: none;
}

#title {
    padding: calc(var(--std) * 1.125) calc(var(--std) * 1.0);
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    text-align: right;
}

span.rotation {
    display: inline-block;
    -webkit-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
            transform: rotate(90deg);
}

#info {
    padding: calc(var(--std) * 1.0);
    padding-top: calc(var(--std) * 4.0);
    position: relative;
    top: 0;
    pointer-events: auto;
    -webkit-box-ordinal-group: 3;
        -ms-flex-order: 2;
            order: 2;
    width: var(--sb-panel-w);
    margin-left: -1px;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
    height: 100%;
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    overflow-y: auto;
}

/* info panel content */
.info-body p {
    line-height: 1.5;
    margin-bottom: 1em;
}

/* extra breathing room before the English paragraph */
.info-body p + p:not(.info-contact) {
    padding-top: 1em;
}

.info-body .info-contact {
    margin-bottom: 2em;
}

.info-body .info-contact a {
    text-decoration: underline;
    color: inherit;
}

.icon-legend {
    margin-top: 1em;
    border-top: 1px solid rgb(0, 0, 0);
}

.icon-legend > li {
    padding: 0.75em 0;
    border-bottom: 1px solid rgb(0, 0, 0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    gap: 0.6em;
    line-height: 1.5;
}

.icon-legend > li > span {
    line-height: 1.5;
}

.icon-legend .legend-icon {
    width: 0.9em;
    height: 1.5em;
    -o-object-fit: contain;
       object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
}

/* footnote under the icon legend (click-to-copy citation note) */
.info-body .info-note {
    margin-top: 1em;
}

/* main-content */
#main-content {
    position: relative;
    width: var(--maxWidth);
    z-index: 0;
}

/* controller */
#controller {
    padding-left: calc(var(--std) * 1.0);
    position: fixed;
    top: 0;
    left: 0;
    width: var(--maxWidth);
    height: calc(var(--std) * 3.0);
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: calc(var(--std) * 1.0);
    z-index: 100;
}

#controller::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: calc(var(--std) * 1.0);
    width: calc(100% - var(--std) * 1.0);
    height: 1px;
    border-bottom: 1px solid rgb(100, 100, 100);
}

.item-controller {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: calc(var(--std) * 0.5);
}

/* sorting button sits in the first (year) column */
.item-controller.ctrl-sorting {
    width: calc(((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 1);
}

/* search line: spans exactly the title + author columns of the grid below */
.item-controller.ctrl-search {
    position: absolute;
    left: calc(var(--std) * 1.0 + ((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 1 + var(--std) * 1.0);
    width: calc(((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 4 + var(--std) * 3.0);
}

#library-search {
    width: 100%;
    padding: 0.25em 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgb(100, 100, 100);
    border-radius: 0;
    color: rgb(255, 255, 255);
    font-family: inherit;
    -webkit-appearance: none;
}

#library-search::-webkit-input-placeholder { color: rgb(150, 150, 150); }
#library-search::-moz-placeholder { color: rgb(150, 150, 150); }
#library-search::placeholder { color: rgb(150, 150, 150); }

#library-search:focus {
    outline: none;
    border-bottom-color: rgb(255, 255, 255);
}

/* native webkit clear button is invisible on the black bar — hide it */
#library-search::-webkit-search-cancel-button,
#library-search::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* rows filtered out by search */
#table > .row.search-hide {
    display: none;
}

/* empty-search notice: top of the content area, horizontally centred
   (top placement keeps it clear of the mobile on-screen keyboard) */
#search-empty {
    margin: 0;
    position: fixed;
    top: calc(var(--std) * 5.0);
    left: calc(var(--maxWidth) / 2);
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    text-align: center;
}

/* Type and Facet controller buttons align with the data-grid columns below.
   grid: year(1u) + title(2u) + author(2u) + type(1u) + facet(1u) */
.item-controller.ctrl-type {
    position: absolute;
    width: calc(((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 1);
    left: calc(var(--std) * 1.0 + ((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 5 + var(--std) * 5.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.item-controller.ctrl-facet {
    position: absolute;
    width: calc(((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 1);
    left: calc(var(--std) * 1.0 + ((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 6 + var(--std) * 6.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.item-controller.sub {
    display: none;
}

.item-controller.sub.active {
    margin: 0;
    position: fixed;
    top: calc(var(--std) * 3.0);
    right: calc(var(--std) * 6.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 0;
}

.item-controller.sub > button {
    padding: 0 0.25em;
    width: calc(var(--std) * 3.0 + 2px);
    height: calc(var(--std) * 3.0 + 2px);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    background-color: rgba(50, 50, 50, 0.95);
    border: 1px solid rgb(100, 100, 100);
    border-right: 0;
    border-top: 0;
}

.cube {
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
    -webkit-transition: -webkit-transform 0.25s ease-out;
    transition: -webkit-transform 0.25s ease-out;
    -o-transition: transform 0.25s ease-out;
    transition: transform 0.25s ease-out;
    transition: transform 0.25s ease-out, -webkit-transform 0.25s ease-out;
    backface-visibility: hidden;
}

.cube:hover {
    -webkit-transform: rotateX(0deg) rotateY(-90deg) rotateZ(0deg);
            transform: rotateX(0deg) rotateY(-90deg) rotateZ(0deg);
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    background-color: rgb(0, 0, 0);
    border: 1px solid rgb(100, 100, 100);
    border-top: none;
    border-right: none;
    backface-visibility: hidden;
}

.cube-face-front {
    -webkit-transform: rotateY(0deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateY(0deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.cube:hover .cube-face-front {
    border-right: 1px solid rgb(100, 100, 100);
}

.cube:hover .cube-face {
    background-color: rgba(50, 50, 50, 0.5);
}

.cube:hover .cube-face-right {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
}

.cube-face-right {
    -webkit-transform: rotateY(90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateY(90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.cube-face-back {
    -webkit-transform: rotateY(180deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateY(180deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.cube-face-left {
    -webkit-transform: rotateY(-90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateY(-90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.cube-face-top {
    -webkit-transform: rotateX(90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateX(90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.cube-face-bottom {
    -webkit-transform: rotateX(-90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
            transform: rotateX(-90deg) translateZ(calc((var(--std) * 3.0 + 2px) * 0.5));
}

.item-controller:last-child {
    position: absolute;
    right: 0;
}

#cont-sheets {
    padding-left: calc(var(--std) * 1.0);
    position: fixed;
    left: 0;
    top: calc(var(--std) * 3.0);
    width: var(--maxWidth);
    height: calc(var(--std) * 1.5);
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    overflow: hidden;
    z-index: 100;
    display: none;
}

#cont-sheets::after {
    position: absolute;
    content: "";
    bottom: 0;
    left: calc(var(--std) * 1.0);
    width: calc(100% - var(--std) * 1.0);
    height: 1px;
    border-bottom: 1px solid rgb(100, 100, 100);
}

#sheets {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: calc(100% - var(--std) * (1.5 * 2.0));
    height: 100%;
    overflow: hidden;
    overflow-x: scroll;
}

#sheets::-webkit-scrollbar {
    display: none;
}

#sheets > .sheet {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    white-space: nowrap;
}

#sheets > .sheet::after {
    margin: 0 calc(var(--std) * 0.5);
    content: "";
    width: 1px;
    height: 100%;
    border-right: 1px solid rgb(75, 75, 75);
}

#sheets > .sheet:last-child {
    margin-right: calc(var(--std) * 0.5);
}

#sheets > .sheet:last-child:after {
    content: none;
    margin: 0;
    border-right: 0px;
}

#sheets-navigator {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(var(--std) * 3.0);
    height: 100%;
    background-color: rgb(255, 255, 255);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

button.item-navi {
    width: calc(var(--std) * 1.5);
    height: 100%;
    border-left: 1px solid rgb(75, 75, 75);
    background-color: rgb(0, 0, 0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

button.item-navi > .icon {
    position: relative;
    left: calc(var(--std) * 0.1 * (-1));
    width: calc(var(--std) * 0.5);
    height: calc(var(--std) * 0.5);
    border-top: 1px solid rgb(150, 150, 150);
    border-right: 1px solid rgb(150, 150, 150);
    display: inline-block;
    -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
            transform: rotate(45deg);
}

button.item-navi:nth-child(1) > .icon {
    left: auto;
    right: calc(var(--std) * 0.1 * (-1));
    -webkit-transform: rotate(-135deg);
        -ms-transform: rotate(-135deg);
            transform: rotate(-135deg);
}

/* table */
#cont-table {
    width: 100%;
    height: auto;
    color: rgb(255, 255, 255);
}

/* shown when the library data fails to load */
.load-error {
    margin: calc(var(--std) * 4.0) calc(var(--std) * 1.0);
    line-height: 1.8;
}

/* data-loading notice: top-centred, white on the dark page, gently pulsing */
#loading {
    position: fixed;
    top: calc(var(--std) * 5.0);
    left: calc(var(--maxWidth) / 2);
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    color: rgb(255, 255, 255);
    line-height: 1.5;
    -webkit-animation: loading-pulse 1.2s ease-in-out infinite;
            animation: loading-pulse 1.2s ease-in-out infinite;
}

#loading[hidden] {
    display: none !important;
}

@-webkit-keyframes loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

#table {
    margin: calc(var(--std) * 3.0) 0 calc(var(--std) * 4.5) calc(var(--std) * 1.0);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: calc(100% - var(--std) * 1.0);
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

#table > .row {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: calc(var(--std) * 1.0);
}

.row > .year, .row > .news {
    border-bottom: 1px solid rgb(100, 100, 100);
}

/* last visible row loses its bottom border. JS marks .last-visible because
   :last-child alone can land on a lang-hidden row of the other region
   (the DOM's oldest entry), leaving a stray border that reads as an empty row */
.row:last-child > .year, .row:last-child > .news,
.row.last-visible > .year, .row.last-visible > .news {
    border-bottom: none;
}

.row.taped {

}

.taping {
    position: relative;
    width: calc(var(--std) * 1.0);
}

.row.taped > .taping {
    -webkit-transform: scale(0.75);
        -ms-transform: scale(0.75);
            transform: scale(0.75);
    -webkit-transform-origin: center center;
        -ms-transform-origin: center center;
            transform-origin: center center;
}

.row.taped > .taping:before {
    content: "";
    width: 0px;
    height: 0px;
    position: absolute;
    left: auto;
    top: calc((100% - 10px) / 2 - 5px);
    background-color: transparent;
    -webkit-box-shadow: var(--pixel-boxshadow);
            box-shadow: var(--pixel-boxshadow);
    opacity: 1;
}

.row.taped > .taping.collapsed:before {
    content: "";
    width: 0px;
    height: 0px;
    position: absolute;
    left: auto;
    top: calc((100% - 10px) / 2 - 5px);
    background-color: transparent;
    opacity: 1;

    -webkit-box-shadow:
        /* row 1 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        /* row 2 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245));

            box-shadow:
        /* row 1 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 0) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        /* row 2 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 1) 0px 2px var(--before-bg, rgb(245, 245, 245));
}

.row.taped > .taping.collapsed:after {
    content: "";
    width: 0px;
    height: 0px;
    position: absolute;
    left: auto;
    top: calc((100% - 10px) / 2 - 5px);
    opacity: 1;

    -webkit-box-shadow:
        /* row 4 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        /* row 5 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245))
    ;

            box-shadow:
        /* row 4 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 3) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        /* row 5 */
        calc((2px * 2) * 0) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 1) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 2) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 3) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245)),
        calc((2px * 2) * 4) calc(2px + (2px * 2) * 4) 0px 2px var(--collapsed-before-bg, rgb(245, 245, 245))
    ;
}

html:lang(ko) .row.taped:hover .year:before {
    position: absolute;
    top: calc((100% - var(--std) * 1.0) / 2);
    height: calc(var(---std) * 1.0);
    right: calc(var(--std) * 0.5);
    content: var(--labelTextKo, "");
    color: var(--before-bg, rgb(25, 25, 25));
    font-size: 0.9rem;
}

html:lang(ko) .row.taped.collapsed:hover .year:before {
    top: calc((100% - var(--std) * 1.0) / 2 - var(--std) * 0.375);
}

html:lang(ko) .row.taped:hover .year:after {
    position: absolute;
    top: calc((100% - var(--std) * 1.0) / 2 + var(--std) * 0.375);
    right: calc(var(--std) * 0.5);
    content: var(--collapsed-labelTextKo, "");
    color: var(--collapsed-before-bg, rgb(25, 25, 25));
    font-size: 0.9rem;
}

html:lang(en) .row.taped:hover .year:before {
    position: absolute;
    top: calc((100% - var(--std) * 1.0) / 2);
    right: calc(var(--std) * 0.5);
    content: var(--labelTextEn, "");
    color: var(--before-bg, rgb(25, 25, 25));
    font-size: 0.9rem;
}

html:lang(en) .row.taped.collapsed:hover .year:before {
    top: calc((100% - var(--std) * 1.0) / 2 - var(--std) * 0.375);
}

html:lang(en) .row.taped:hover .year:after {
    position: absolute;
    top: calc((100% - var(--std) * 1.0) / 2 + var(--std) * 0.375);
    right: calc(var(--std) * 0.5);
    content: var(--collapsed-labelTextEn, "");
    color: var(--collapsed-before-bg, rgb(25, 25, 25));
    font-size: 0.9rem;
}

.year {
    position: relative;
    padding: 0.25em 0;
    width: calc((100% - var(--std) * 6) / 7);
    line-height: 1.5;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    gap: 0.4em;
}

.year > .loc-icon {
    width: 0.9em;
    height: 1.3em;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    -o-object-fit: contain;
       object-fit: contain;
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

.year > .year-label {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;
    line-height: 1.3;
}

.news.title, .news.author {
    width: calc((100% - var(--std) * 6) / 7 * 2 + var(--std) * 1.0);
}

.news.type, .news.facet {
    width: calc((100% - var(--std) * 6) / 7);
}

.news > .heading {
    padding: 0.25em 0;
    padding-right: calc(var(--std) * 1.0);
}

/* title is click-to-copy the APA citation */
.news.title > .heading {
    cursor: pointer;
}

/* toast shown briefly after a citation is copied */
#copy-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--std) * 4.0);
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    padding: calc(var(--std) * 0.5) calc(var(--std) * 1.0);
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    -webkit-transition: opacity 0.25s ease;
    -o-transition: opacity 0.25s ease;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

#copy-toast.show {
    opacity: 1;
}

.news.blank > .heading {
    display: none;
    pointer-events: none;
}

.news > .content,
.news > .cont-tags {
    display: none;
}

.news.active {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

.news.active > .heading {
    height: auto;
}

.news.active > .heading > p {
    height: auto;
}

.news.active > .heading + .content {
    position: relative;
    margin: calc(var(--std) * 1.0) 0;
    padding: 0 calc(var(--std) * 1.0);
    display: block;
}

.news.active > .heading + .content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    border-left: 1px dashed rgb(200, 200, 200);
}

.row.taped .news.active > .heading + .content::before {
    content: none;
}

#table > .row.hide {
    display: none;
}

/* cont-author-from-selected-sheets */
#cont-author-from-selected-sheets,
#cont-type-from-selected-sheets,
#cont-facet-from-selected-sheets {
    position: fixed;
    top: calc(var(--std) * 3.0);
    left: 0;
    padding: calc(var(--std) * 1.0);
    padding-right: 0;
    width: var(--maxWidth);
    height: calc(100% - var(--std) * (3.0 + 3.0));
    background-color: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    color: rgb(255, 255, 255);
    overflow-y: auto;
    display: none;
    z-index: 50;
}

#cont-author-from-selected-sheets.active,
#cont-type-from-selected-sheets.active,
#cont-facet-from-selected-sheets.active {
    display: block;
}

.wrap-tags > .tags {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: calc(var(--std) * 1.0);
}

.wrap-tags > .tags > .tag {
    padding-right: calc(var(--std) * 1.0);
    width: calc((100% - var(--std) * 6) / 7);
}

/* garden */
#garden {
    position: fixed;
    top: calc((100% - 300px) / 2);
    left: calc((100% - 300px) / 2);
    width: 300px;
    height: 300px;
    background-color: rgb(0, 255, 255);
    display: none;
    z-index: 1000;
}

/* common */
button.toggle {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    line-height: 1.2;
    text-align: left;
    gap: calc(var(--std) * 0.25);
}

button.toggle::before {
    position: relative;
    content: "";
    width: calc(var(--std) * 0.6);
    min-width: calc(var(--std) * 0.6);
    height: calc(var(--std) * 0.6);
    display: inline-block;
    border: 1px solid rgb(75, 75, 75);
    background-color: rgb(255, 255, 255, 0.25);
    border-radius: 100%;
}

button.toggle.active::before {
    background-color: rgb(255, 255, 255);
}

/* sorting toggle uses arrows instead of the circle marker */
#toggle-sorting.toggle::before {
    display: none;
}

button.toggle .label.back,
button.toggle.active .label.front {
    display: none;
}

button.toggle.active .label.back {
    display: inline;
}

.sort-arrow {
    margin-right: 0.35em;
    display: inline-block;
}

.ko p, p.ko {
    line-height: 1.5;
}

.en p, p.en {
    line-height: 1.3;
}

/* responsive */
@media screen and (max-width: 1000px) {
    .item-controller:nth-child(1) {
        width: 100%;
    }

    .news.type, .news.facet  {
        display: none;
    }

    #side-bar-wrap {
        --sb-panel-w: calc(100vw - var(--std) * 6.0);
    }

    #side-bar-wrap.active {
        -webkit-transform: translateX(calc(var(--sb-panel-w) * -1));
            -ms-transform: translateX(calc(var(--sb-panel-w) * -1));
                transform: translateX(calc(var(--sb-panel-w) * -1));
    }

    .item-controller.sub,
    .item-controller.ctrl-type,
    .item-controller.ctrl-facet,
    #cont-author-from-selected-sheets,
    #cont-type-from-selected-sheets,
    #cont-facet-from-selected-sheets{
        display: none !important;
    }

    /* mobile: sorting keeps only its arrow (label text hidden via font-size 0,
       which CSS needs because the text is a bare text node) */
    .item-controller.ctrl-sorting {
        width: auto;
    }

    #toggle-sorting .label {
        font-size: 0;
    }

    #toggle-sorting .sort-arrow {
        font-size: 1rem;
        margin-right: 0;
    }

    /* mobile: search starts exactly at the title column (year col = 2u + 1std,
       plus the table margin and column gap) and stops clear of "Info." */
    .item-controller.ctrl-search {
        position: absolute;
        left: calc(((100% - var(--std) * 1.0) - var(--std) * 6.0) / 7 * 2 + var(--std) * 3.0);
        right: calc(var(--std) * 4.5);
        width: auto;
    }

    #table > .row {
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
        gap: 0 calc(var(--std) * 1.0);
    }

    .row > .year {
        padding-bottom: 0;
        width: calc((100% - var(--std) * 6) / 7 * 2 + var(--std) * 1.0);
        border-bottom: none;
    }

    .news.title {
        width: calc((100% - var(--std) * 6) / 7 * 5 + var(--std) * 4.0);
        border-bottom: none;
    }

    .news.author {
        padding-left: calc((100% - var(--std) * 6) / 7 * 2 + var(--std) * 2.0);
        width: 100%;
    }

    .news.title > .heading {
        padding-bottom: 0;
    }

    .news.author > .heading {
        padding-top: 0;
    }

    /* author wraps below the title on mobile — make it smaller and grey so the
       two lines read as clearly distinct */
    .news.author > .heading > p {
        color: rgb(160, 160, 160);
        font-size: 0.85em;
    }
}

@media screen and (max-width: 500px) {
    #side-bar-wrap {
        display: block;
        position: static;
        right: auto;
        left: auto;
        top: auto;
        -webkit-transform: none;
            -ms-transform: none;
                transform: none;
        z-index: 200;
        width: auto;
        height: auto;
        pointer-events: none;
    }

    #side-bar-wrap.active {
        -webkit-transform: none;
            -ms-transform: none;
                transform: none;
    }

    #side-bar {
        position: fixed;
        top: 0;
        right: 0;
        width: auto;
        height: calc(var(--std) * 3.0);
        overflow: hidden;
        background-color: transparent;
        z-index: 200;
        -webkit-box-ordinal-group: 1;
            -ms-flex-order: 0;
                order: 0;
        -webkit-box-flex: 0;
            -ms-flex: 0 1 auto;
                flex: 0 1 auto;
    }

    /* mobile: no roll-over — bar text stays white on hover and when open */
    #side-bar,
    #side-bar:hover,
    #side-bar-wrap #side-bar:hover,
    #side-bar-wrap.active #side-bar {
        background-color: transparent;
        color: rgb(255, 255, 255);
    }

    /* mobile: replace the vertical title with a simple "Info." label */
    #side-bar > #title {
        display: none;
    }

    #side-bar > #title-mobile {
        display: block;
        height: calc(var(--std) * 3.0);
        line-height: calc(var(--std) * 3.0);
        padding: 0 calc(var(--std) * 1.0);
        color: rgb(255, 255, 255);
        white-space: nowrap;
    }

    html:lang(ko) #title > .key-visual:nth-child(2) > .item-key-visual:nth-child(1),
    html:lang(ko) #title > .key-visual:nth-child(2) > .item-key-visual:nth-child(3),
    html:lang(ko) #title > .key-visual:nth-child(2) > .item-key-visual:nth-child(4) {
        display: none;
    }

    html:lang(en) #title > .key-visual:nth-child(1),
    html:lang(en) #title > .key-visual:nth-child(2) > .item-key-visual:nth-child(2),
    html:lang(en) #title > .key-visual:nth-child(3) {
        display: none;
    }

    html:lang(en) #title > .key-visual:nth-child(2) {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        gap: calc(var(--std) * 0.25);
    }

    span.rotation {
        -webkit-transform: none;
            -ms-transform: none;
                transform: none;
    }

    #info {
        padding: calc(var(--std) * 1.0);
        padding-top: calc(var(--std) * 1.0);
        position: fixed;
        top: calc(var(--std) * 3.0);
        right: calc((100% - var(--std) * 2.0) * (-1));
        width: calc(100% - var(--std) * 2.0);
        height: calc(100% - var(--std) * (3.0 + 3.0));
        background-color: rgb(255, 255, 255);
        z-index: 205;
        -webkit-box-ordinal-group: 1;
            -ms-flex-order: 0;
                order: 0;
        -webkit-box-flex: 0;
            -ms-flex: 0 1 auto;
                flex: 0 1 auto;
        -webkit-transition: right 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
        -o-transition: right 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
        transition: right 0.75s cubic-bezier(0.5, 0, 0.25, 1.0);
    }

    #side-bar-wrap.active #info {
        right: calc(var(--std) * 1.0);
    }

    /* keep the toggle button clickable above the open panel */
    #side-bar-wrap.active #side-bar {
        z-index: 210;
    }

    .news.active > .heading + .content {
        padding: 0;
    }

    .news.active > .heading + .content::before {
        content: none;
    }
}
/* language-based row filtering: hide rows that don't match the active language */
#table > .row.lang-hide {
    display: none;
}