/* PARAMETERS */
:root {
    --body-width-min: 320px;
    --body-width-max: 400px;
    --body-width-max: 1280px;
    --body-padding: 0px;
    /* Use only fonts already installed by the visitor's operating system. */
    --body-font: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", "Nimbus Sans L",
        "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans CJK KR", "Noto Sans KR",
        "Nanum Gothic", sans-serif;
    --body-font-ko: var(--body-font);
    --code-font: "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas,
        "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
    --code-display-font-size: calc(var(--nav-font-size) * 0.85);

    --print-body-font: var(--body-font);
    --print-body-font-ko: var(--body-font);

    --nav-box-height: 50px;
    --nav-bg-color: var(--theme-bg);
    --nav-border-bottom-thk: 1px;
    --nav-border-bottom-color: var(--theme-divider-strong);
    --nav-ul-gap: 0px;
    --nav-leftbox-padding: var(--type-space-page, 16px);
    --nav-rightbox-padding: var(--type-space-page, 16px);
    --nav-font-color: var(--theme-text);
    --nav-font-color-hover: var(--theme-text);
    --nav-font-size: 15px;

    --toggle-padding-right: var(--type-space-page, 16px);
    --toggle-font-size: 30px;
    --toggle-font-color: var(--theme-text);

    --dropdown-bg-color: var(--theme-surface);
    --dropdown-position-top: 50px;
    --dropdown-position-right: 0px;
    --dropdown-list-height: 1.3;
    --dropdown-list-padding-right: var(--type-space-page, 16px);
    --dropdown-box-padding-bottom: var(--type-space-compact, 8px);
    --dropdown-row-height: 28px;
    --dropdown-row-gap: 0px;

    --main-bg-color: transparent;
    --main-padding-top: calc(var(--nav-box-height) + var(--type-space-page, 16px));
    --main-padding-left: var(--type-space-page, 16px);
    --main-padding-right: var(--type-space-page, 16px);
    --main-padding-bottom: var(--type-space-page, 16px);
    --main-font-size: 15px;
    --main-font-color: var(--theme-text);
    --main-font-spacing: 1.3;
    --box-blue: var(--theme-primary-action);
    --box-content-padding: var(--type-space-content, 12px);

    --footer-bg-color: transparent;
    --footer-font-color: var(--theme-text);
    --footer-height: 95px;

    --footer-padding-vertical: var(--type-space-content, 12px);
    --footer-padding-horizontal: var(--type-space-page, 16px);
    --footer-boundary-width: 1px;
    --footer-boundary-color: var(--theme-divider-strong);
    --footer-font-size: 15px;
    --footer-font-spacing: 1.3;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

code,
pre,
samp {
    font-family: var(--code-font);
}

kbd {
    font-family: var(--body-font);
}

.site-print-button,
.site-fullscreen-button {
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    padding-block: var(--type-control-padding-block, 3px);
    padding-inline: var(--type-control-padding-inline, 6px);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui, 1.4);
    text-decoration: none;
    white-space: nowrap;
}

.site-print-button:is(:hover, :active),
.site-fullscreen-button:is(:hover, :active) {
    background: transparent;
    color: var(--theme-link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.site-print-button:focus-visible,
.site-fullscreen-button:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

@media (max-width: 1100px) {
    .site-print-button,
    .site-fullscreen-button {
        display: none;
    }
}

.site-print-action-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.site-view-actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: var(--type-space-tight, 4px);
    min-width: 0;
}

[data-site-fullscreen-active="true"] {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(16px, 2vw, 32px) !important;
    overflow: auto !important;
    overflow-anchor: none;
    overscroll-behavior: contain;
    background: var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

[data-site-fullscreen-resume-pending="true"] {
    position: fixed !important;
    z-index: 2147483644;
    inset: 0 !important;
}

[data-site-fullscreen-active="true"]:not([data-site-fullscreen-tools="false"]) {
    padding-block-end: 64px !important;
}

[data-site-fullscreen-active="true"]::backdrop {
    background: var(--theme-bg);
}

[data-site-fullscreen-active="true"][data-site-fullscreen-tools="false"] {
    padding-inline-end: clamp(16px, 2vw, 32px) !important;
}

.site-presentation-ink {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    cursor: crosshair;
    pointer-events: none;
    touch-action: none;
}

[data-site-presentation-tool="pen"] > .site-presentation-ink,
[data-site-presentation-tool="highlighter"] > .site-presentation-ink,
[data-site-presentation-tool="eraser"] > .site-presentation-ink {
    pointer-events: auto;
}

[data-site-presentation-hand-tool="true"] > .site-presentation-zoom-selector {
    pointer-events: auto;
    cursor: grab;
}

[data-site-presentation-panning="true"] > .site-presentation-zoom-selector {
    cursor: grabbing;
}

[data-site-presentation-panning="true"] > .site-presentation-ink {
    will-change: transform;
}

.site-presentation-stage {
    display: contents;
}

[data-site-fullscreen-active="true"] > .site-presentation-stage {
    box-sizing: border-box;
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    transform-origin: 0 0;
}

[data-site-fullscreen-active="true"].playground-section > .site-presentation-stage {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

[data-site-fullscreen-active="true"][data-site-presentation-region-zoomed="true"]
    > .site-presentation-stage {
    will-change: transform;
}

[data-site-fullscreen-active="true"][data-site-presentation-panning="true"],
[data-site-fullscreen-active="true"][data-site-presentation-panning="true"] * {
    cursor: grabbing !important;
    user-select: none !important;
}

[data-site-fullscreen-active="true"][data-site-presentation-hand-tool="true"]:not([data-site-presentation-panning="true"]),
[data-site-fullscreen-active="true"][data-site-presentation-hand-tool="true"]:not([data-site-presentation-panning="true"]) * {
    cursor: grab !important;
}

html:not([data-theme="dark"])
    [data-site-fullscreen-active="true"][data-site-presentation-region-zoomed="true"] {
    background: #fff !important;
}

html[data-theme="dark"]
    [data-site-fullscreen-active="true"][data-site-presentation-region-zoomed="true"] {
    background: #000 !important;
}

.site-presentation-zoom-selector {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    pointer-events: none;
}

[data-site-presentation-tool="zoom-region"] > .site-presentation-zoom-selector {
    pointer-events: auto;
    cursor: crosshair;
}

.site-presentation-zoom-selection {
    position: fixed;
    box-sizing: border-box;
    border: 2px dashed #fff;
    border-radius: 2px;
    background: rgb(30 144 255 / 18%);
    box-shadow:
        0 0 0 1px rgb(0 0 0 / 58%),
        0 0 12px rgb(30 144 255 / 46%);
    pointer-events: none;
}

.site-presentation-zoom-selection[hidden] {
    display: none;
}

.site-presentation-toolbar {
    position: fixed;
    z-index: 2147483647;
    inset-block-start: auto;
    inset-block-end: 12px;
    inset-inline-start: 50%;
    inset-inline-end: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    box-sizing: border-box;
    max-width: calc(100vw - 24px);
    padding: 6px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 14px;
    background: rgb(18 18 20 / 94%);
    color: #fff;
    box-shadow: 0 6px 24px rgb(0 0 0 / 38%);
    transform: translateX(-50%);
    touch-action: none;
    user-select: none;
}

.site-presentation-toolbar.is-dragging {
    cursor: grabbing;
}

.site-presentation-toolbar-handle {
    appearance: none;
    flex: 0 0 auto;
    width: 18px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background-color: transparent;
    background-image: radial-gradient(circle, currentColor 1.15px, transparent 1.35px);
    background-position: center;
    background-size: 6px 6px;
    color: rgb(255 255 255 / 72%);
    cursor: grab;
}

.site-presentation-toolbar-handle:is(:hover, :focus-visible) {
    background-color: rgb(255 255 255 / 14%);
    color: #fff;
}

.site-presentation-toolbar-handle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

.site-presentation-tool-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.site-presentation-toolbar-divider {
    align-self: stretch;
    width: 1px;
    min-width: 1px;
    height: auto;
    background: rgb(255 255 255 / 30%);
}

.site-presentation-toolbar-button {
    appearance: none;
    box-sizing: border-box;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.site-presentation-toolbar-button:is(:hover, :active),
.site-presentation-toolbar-button[aria-pressed="true"] {
    border-color: rgb(255 255 255 / 46%);
    background: rgb(255 255 255 / 14%);
}

.site-presentation-toolbar-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-presentation-toolbar-button:disabled {
    border-color: transparent;
    background: transparent;
    opacity: 0.38;
    cursor: default;
}

.site-presentation-help-dialog {
    box-sizing: border-box;
    width: min(560px, calc(100vw - 32px));
    max-height: min(620px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 10px;
    background: rgb(18 18 20 / 98%);
    color: #fff;
    box-shadow: 0 12px 36px rgb(0 0 0 / 48%);
    font: inherit;
}

.site-presentation-help-dialog::backdrop {
    background: rgb(0 0 0 / 64%);
}

.site-presentation-help-panel {
    margin: 0;
    padding: 0;
}

.site-presentation-help-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgb(255 255 255 / 24%);
}

.site-presentation-help-heading h2,
.site-presentation-help-heading p {
    margin: 0;
}

.site-presentation-help-heading h2 {
    font-size: 18px;
    line-height: 1.3;
}

.site-presentation-help-heading p {
    margin-top: 2px;
    color: rgb(255 255 255 / 68%);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-presentation-help-close {
    appearance: none;
    flex: 0 0 auto;
    min-height: 26px;
    margin: 0;
    padding: 3px 7px;
    border: 1px solid rgb(255 255 255 / 54%);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: var(--type-size-small);
}

.site-presentation-help-close:is(:hover, :active) {
    background: rgb(255 255 255 / 14%);
}

.site-presentation-help-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-presentation-help-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-presentation-help-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 12px;
    align-items: center;
    padding: 8px 16px;
    border-top: 1px solid rgb(255 255 255 / 16%);
    font-size: var(--type-size-small);
    line-height: 1.4;
}

.site-presentation-help-list li:first-child {
    border-top: 0;
}

.site-presentation-help-list span {
    color: rgb(255 255 255 / 76%);
    text-align: right;
}

.site-presentation-help-list kbd {
    display: inline-block;
    min-width: 1.25em;
    padding: 1px 4px;
    border: 1px solid rgb(255 255 255 / 38%);
    border-radius: 3px;
    background: rgb(255 255 255 / 10%);
    color: #fff;
    font: inherit;
    font-size: 0.9em;
    text-align: center;
}

@media (max-width: 520px) {
    .site-presentation-help-list li {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

    .site-presentation-help-list span {
        text-align: left;
    }
}

.site-presentation-toolbar-icon {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: none;
}

.site-presentation-drawing-mode-button[aria-pressed="true"] {
    border-color: rgb(255 255 255 / 74%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 48%);
}

.site-presentation-drawing-mode-button[aria-pressed="true"]
    .site-presentation-toolbar-icon {
    animation: site-presentation-drawing-icon-sparkle 0.52s ease-in-out infinite;
}

.site-presentation-drawing-sparkles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.site-presentation-drawing-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff5a8;
    clip-path: polygon(50% 0%, 62% 36%, 100% 50%, 63% 62%, 50% 100%, 38% 63%, 0% 50%, 36% 38%);
    opacity: 0;
    filter: drop-shadow(0 0 3px rgb(255 224 92 / 90%));
}

.site-presentation-drawing-sparkle:nth-child(1) {
    inset-block-start: 3px;
    inset-inline-end: 3px;
}

.site-presentation-drawing-sparkle:nth-child(2) {
    inset-block-end: 3px;
    inset-inline-start: 3px;
}

.site-presentation-drawing-sparkle:nth-child(3) {
    inset-block-end: 4px;
    inset-inline-end: 2px;
}

.site-presentation-drawing-mode-button[aria-pressed="true"]
    .site-presentation-drawing-sparkle {
    animation: site-presentation-drawing-star-burst 0.72s ease-in-out infinite;
}

.site-presentation-drawing-mode-button[aria-pressed="true"]
    .site-presentation-drawing-sparkle:nth-child(2) {
    animation-delay: -0.24s;
}

.site-presentation-drawing-mode-button[aria-pressed="true"]
    .site-presentation-drawing-sparkle:nth-child(3) {
    animation-delay: -0.48s;
}

.site-presentation-pointer-divider {
    align-self: center;
    height: 22px;
}

@keyframes site-presentation-drawing-icon-sparkle {
    0% {
        opacity: 0.88;
        filter:
            brightness(0) saturate(100%) invert(72%) sepia(90%) saturate(1800%)
            hue-rotate(0deg)
            drop-shadow(0 0 2px rgb(255 96 96 / 70%));
    }

    50% {
        opacity: 1;
        filter:
            brightness(0) saturate(100%) invert(72%) sepia(90%) saturate(1800%)
            hue-rotate(180deg)
            drop-shadow(0 0 2px rgb(100 220 255 / 76%))
            drop-shadow(0 0 5px rgb(150 110 255 / 48%));
    }

    100% {
        opacity: 0.88;
        filter:
            brightness(0) saturate(100%) invert(72%) sepia(90%) saturate(1800%)
            hue-rotate(360deg)
            drop-shadow(0 0 2px rgb(255 96 96 / 70%));
    }
}

@keyframes site-presentation-drawing-star-burst {
    0% {
        opacity: 0.18;
        transform: scale(0.45) rotate(0deg);
    }

    42% {
        opacity: 1;
        transform: scale(1.35) rotate(30deg);
    }

    72% {
        opacity: 0.48;
        transform: scale(0.78) rotate(54deg);
    }

    100% {
        opacity: 0.18;
        transform: scale(0.45) rotate(72deg);
    }
}

.site-presentation-thickness-panel {
    position: absolute;
    inset-block-start: auto;
    inset-block-end: calc(100% + 8px);
    inset-inline-start: 50%;
    inset-inline-end: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 12px;
    background: rgb(18 18 20 / 96%);
    box-shadow: 0 4px 14px rgb(0 0 0 / 38%);
    transform: translateX(-50%);
}

.site-presentation-toolbar.is-thickness-below .site-presentation-thickness-panel {
    inset-block-start: calc(100% + 8px);
    inset-block-end: auto;
}

.site-presentation-thickness-panel[hidden] {
    display: none;
}

.site-presentation-color-palette {
    position: absolute;
    inset-block-start: auto;
    inset-block-end: calc(100% + 8px);
    inset-inline-start: 50%;
    inset-inline-end: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    box-sizing: border-box;
    width: 164px;
    padding: 8px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 12px;
    background: rgb(18 18 20 / 96%);
    box-shadow: 0 4px 14px rgb(0 0 0 / 38%);
    transform: translateX(-50%);
}

.site-presentation-toolbar.is-color-palette-below .site-presentation-color-palette {
    inset-block-start: calc(100% + 8px);
    inset-block-end: auto;
}

.site-presentation-color-palette[hidden] {
    display: none;
}

.site-presentation-color-swatch {
    appearance: none;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 2px solid rgb(255 255 255 / 28%);
    border-radius: 50%;
    background: var(--site-presentation-swatch-color);
    cursor: pointer;
}

.site-presentation-color-swatch:is(:hover, :active) {
    border-color: #fff;
    transform: scale(1.08);
}

.site-presentation-color-swatch:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-presentation-thickness-range {
    width: 112px;
    margin: 0;
    accent-color: #fff;
    cursor: pointer;
}

.site-presentation-thickness-range:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.site-presentation-thickness-preview-box {
    display: inline-grid;
    place-items: center;
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
}

.site-presentation-thickness-preview {
    display: block;
    box-sizing: border-box;
    width: var(--site-thickness-preview-size, 4px);
    height: var(--site-thickness-preview-size, 4px);
    max-width: 80px;
    max-height: 80px;
    background: var(--site-thickness-preview-color, #fff);
}

.site-presentation-thickness-preview.is-pen {
    border-radius: 50%;
}

.site-presentation-thickness-preview.is-highlighter {
    border: 1px solid rgb(255 255 255 / 68%);
    border-radius: 2px;
}

.site-presentation-thickness-preview.is-eraser {
    border: 2px dashed #fff;
    border-radius: 50%;
    background: transparent;
}

.site-presentation-pen-color {
    appearance: none;
    box-sizing: border-box;
    width: 26px;
    height: 26px;
    margin: 0 1px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid var(--theme-control-border);
    border-radius: 50%;
    background: var(--theme-control-bg);
    cursor: pointer;
}

.site-presentation-pen-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.site-presentation-pen-color::-webkit-color-swatch {
    border: 0;
    border-radius: 50%;
}

.site-presentation-pen-color::-moz-color-swatch {
    border: 0;
    border-radius: 50%;
}

.site-presentation-pen-color:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.site-presentation-laser-pointer {
    position: fixed;
    z-index: 2147483646;
    inset: 0;
    pointer-events: none;
}

.site-presentation-laser-star {
    --site-laser-star-color: var(--theme-presentation-laser-star);
    --site-laser-star-glow-near-rgb: var(--theme-presentation-laser-glow-near-rgb);
    --site-laser-star-glow-bright-rgb: var(--theme-presentation-laser-glow-bright-rgb);
    --site-laser-star-glow-far-rgb: var(--theme-presentation-laser-glow-far-rgb);
    position: absolute;
    top: calc(var(--site-laser-star-size, 16px) / -2);
    left: calc(var(--site-laser-star-size, 16px) / -2);
    width: var(--site-laser-star-size, 16px);
    height: var(--site-laser-star-size, 16px);
    background: var(--site-laser-star-color);
    clip-path: polygon(50% 0%, 61% 34%, 100% 50%, 63% 62%, 50% 100%, 38% 63%, 0% 50%, 36% 37%);
    box-shadow:
        0 0 4px 2px rgb(var(--site-laser-star-glow-near-rgb) / 72%),
        0 0 10px 4px rgb(var(--site-laser-star-glow-far-rgb) / 48%);
    pointer-events: none;
    animation: site-presentation-laser-star-twinkle 760ms ease-in-out infinite alternate;
    will-change: transform, filter;
}

/* Keep the original cursor coordinates and trail timing; light mode changes only its artwork. */
html:not([data-theme="dark"]) .site-presentation-laser-star {
    background: transparent url("../images/gallery-cherry-petal-heart.svg") center / contain no-repeat;
    clip-path: none;
    box-shadow: none;
}

html:not([data-theme="dark"]) .site-presentation-laser-star::after {
    display: none;
}

html:not([data-theme="dark"]) .site-presentation-laser-star:nth-child(2) {
    background-image: url("../images/gallery-cherry-petal-oval.svg");
}

html:not([data-theme="dark"]) .site-presentation-laser-star:nth-child(3) {
    background-image: url("../images/gallery-cherry-petal-round.svg");
}

html:not([data-theme="dark"]) .site-presentation-laser-star:nth-child(4) {
    background-image: url("../images/gallery-cherry-petal-curved.svg");
}

html:not([data-theme="dark"]) .site-presentation-laser-star:nth-child(5) {
    background-image: url("../images/gallery-cherry-petal-notched.svg");
}

.site-presentation-laser-star::after {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at 32% 25%,
        rgb(var(--theme-presentation-laser-gloss-rgb) / 100%) 0 9%,
        rgb(var(--theme-presentation-laser-gloss-rgb) / 58%) 18%,
        rgb(var(--theme-presentation-laser-gloss-rgb) / 0%) 46%
    );
    content: "";
    opacity: var(--theme-presentation-laser-gloss-opacity);
    pointer-events: none;
}

.site-presentation-laser-star:nth-child(2) {
    --site-laser-star-size: 13px;
    --site-laser-star-color: var(--theme-presentation-laser-star-yellow);
    --site-laser-star-glow-near-rgb: var(--theme-presentation-laser-star-yellow-glow-near-rgb);
    --site-laser-star-glow-bright-rgb: var(--theme-presentation-laser-star-yellow-glow-bright-rgb);
    --site-laser-star-glow-far-rgb: var(--theme-presentation-laser-star-yellow-glow-far-rgb);
    animation-delay: -140ms;
}

.site-presentation-laser-star:nth-child(3) {
    --site-laser-star-size: 11px;
    --site-laser-star-color: var(--theme-presentation-laser-star-orange);
    --site-laser-star-glow-near-rgb: var(--theme-presentation-laser-star-orange-glow-near-rgb);
    --site-laser-star-glow-bright-rgb: var(--theme-presentation-laser-star-orange-glow-bright-rgb);
    --site-laser-star-glow-far-rgb: var(--theme-presentation-laser-star-orange-glow-far-rgb);
    animation-delay: -280ms;
}

.site-presentation-laser-star:nth-child(4) {
    --site-laser-star-size: 9px;
    --site-laser-star-color: var(--theme-presentation-laser-star-green);
    --site-laser-star-glow-near-rgb: var(--theme-presentation-laser-star-green-glow-near-rgb);
    --site-laser-star-glow-bright-rgb: var(--theme-presentation-laser-star-green-glow-bright-rgb);
    --site-laser-star-glow-far-rgb: var(--theme-presentation-laser-star-green-glow-far-rgb);
    animation-delay: -420ms;
}

.site-presentation-laser-star:nth-child(5) {
    --site-laser-star-size: 7px;
    animation-delay: -560ms;
}

@keyframes site-presentation-laser-star-twinkle {
    0%, 24% {
        filter: brightness(0.92) drop-shadow(0 0 2px rgb(var(--site-laser-star-glow-near-rgb) / 64%));
    }

    52% {
        filter: brightness(1.48) drop-shadow(0 0 8px rgb(var(--site-laser-star-glow-bright-rgb) / 94%));
    }

    100% {
        filter: brightness(1.08) drop-shadow(0 0 4px rgb(var(--site-laser-star-glow-far-rgb) / 78%));
    }
}

.site-presentation-eraser-preview {
    position: fixed;
    z-index: 2147483646;
    top: calc(var(--site-eraser-diameter, 30px) / -2);
    left: calc(var(--site-eraser-diameter, 30px) / -2);
    box-sizing: border-box;
    width: var(--site-eraser-diameter, 30px);
    height: var(--site-eraser-diameter, 30px);
    border: 1.5px solid rgb(17 17 17 / 82%);
    border-radius: 50%;
    background: rgb(255 255 255 / 18%);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 76%);
    pointer-events: none;
    will-change: transform, width, height;
}

html[data-theme="dark"] .site-presentation-eraser-preview {
    border-color: rgb(255 255 255 / 88%);
    background: rgb(0 0 0 / 16%);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 72%);
}

.site-presentation-laser-trail {
    position: fixed;
    z-index: 2147483645;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    will-change: contents;
}

@media (max-width: 520px) {
    .site-presentation-toolbar {
        inset-block-end: 8px;
        gap: 3px;
        max-width: calc(100vw - 16px);
        padding: 4px;
    }

    .site-presentation-toolbar-button {
        width: 26px;
        height: 26px;
        padding: 5px;
    }

    .site-presentation-tool-group {
        gap: 1px;
    }

    .site-presentation-pen-color {
        width: 20px;
        height: 20px;
        margin-inline: 0;
    }

    .site-presentation-toolbar-handle {
        width: 14px;
        height: 26px;
        background-size: 5px 5px;
    }
}

@media (max-height: 520px) {
    .site-presentation-toolbar {
        gap: 2px;
        padding: 4px;
    }

    .site-presentation-toolbar-button {
        width: 26px;
        height: 26px;
        padding: 5px;
    }

    .site-presentation-toolbar-icon {
        width: 16px;
        height: 16px;
    }

    .site-presentation-tool-group {
        gap: 1px;
    }

    .site-presentation-pen-color {
        width: 20px;
        height: 20px;
    }
}

.site-print-source-watermark,
.site-print-textarea-value {
    display: none;
}

.site-print-frame {
    position: fixed;
    top: 0;
    left: -10000px;
    /* Match the A4 content box: 210mm minus the two 10mm page margins. */
    width: 190mm;
    height: 297mm;
    border: 0;
    background: var(--theme-print-bg);
    pointer-events: none;
}

/* Prevent tiny/unstable text in desktop-layout mode on touch phones/tablets. */
@media (hover: none) and (pointer: coarse) and (min-width: 551px) {
    :root {
        --nav-font-size: 16px;
        --main-font-size: 16px;
        --footer-font-size: 16px;
    }
}

/* DEVICE SCREEN */
@media screen {
    body {
        min-width: var(--body-width-min);
        max-width: var(--body-width-max);
        margin: auto;
        padding: var(--body-padding);

        font-family: var(--body-font);
    }

    .ko {
        font-family: var(--body-font-ko);
    }
}

/* PRINT SCREEN */
@media print {
    @page {
        size: A4 portrait;
        margin: 12mm 10mm 18mm;
        background: white;
    }

    nav,
    .menu-toggle,
    .site-footer,
    .site-login-dialog,
    .site-print-button,
    .site-fullscreen-button,
    .site-view-actions,
    .site-presentation-toolbar,
    .site-presentation-ink,
    .site-print-action-row,
    .site-print-frame {
        display: none !important;
    }

    body {
        zoom: 100%;
        font-family: var(--print-body-font) !important;
    }

    html,
    body,
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .ko {
        font-family: var(--print-body-font-ko) !important;
    }

    body,
    body * {
        font-size: 9pt !important;
        line-height: 1.3 !important;
    }

    section h4,
    section .professor-section-note {
        font-size: 9pt !important;
        line-height: 1.3 !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        padding-left: var(--box-content-padding) !important;
        padding-right: var(--box-content-padding) !important;
    }

    #biography h4 {
        font-size: 9pt !important;
        line-height: 1.3 !important;
        width: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        box-sizing: content-box !important;
    }

    main {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    table,
    img {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    * {
        text-shadow: none !important;
        box-shadow: none !important;
    }

    html[data-site-printing="true"],
    html[data-site-printing="true"][data-theme] {
        color-scheme: only light;
        background: var(--theme-print-bg) !important;
    }

    html,
    html[data-theme],
    html body,
    html[data-theme] body,
    html[data-site-printing="true"] #content-window,
    html[data-site-printing="true"] [data-site-print-ancestor],
    html[data-site-printing="true"] [data-site-print-active] {
        color-scheme: only light !important;
        background-color: var(--theme-print-bg) !important;
        background-image: none !important;
        color: var(--theme-print-text) !important;
    }

    html[data-site-printing="true"] body {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: var(--theme-print-bg) !important;
        color: var(--theme-print-text) !important;
    }

    html[data-site-printing="true"] body * {
        visibility: hidden !important;
    }

    html[data-site-printing="true"] [data-site-print-ancestor] > :not(
        [data-site-print-ancestor],
        [data-site-print-active]
    ) {
        display: none !important;
    }

    html[data-site-printing="true"] [data-site-print-active],
    html[data-site-printing="true"] [data-site-print-active] * {
        visibility: visible !important;
    }

    html[data-site-printing="true"] [data-site-print-active] {
        --theme-bg: var(--theme-print-bg);
        --theme-surface: var(--theme-print-bg);
        --theme-surface-muted: var(--theme-print-surface-muted);
        --theme-surface-hover: var(--theme-print-surface-hover);
        --theme-surface-active: var(--theme-print-surface-active);
        --theme-text: var(--theme-print-text);
        --theme-text-strong: var(--theme-print-text-strong);
        --theme-text-muted: var(--theme-print-text-muted);
        --theme-text-secondary: var(--theme-print-text-secondary);
        --theme-text-subtle: var(--theme-print-text-subtle);
        --theme-border: var(--theme-print-border);
        --theme-border-muted: var(--theme-print-border-muted);
        --theme-border-soft: var(--theme-print-border-soft);
        --theme-border-subtle: var(--theme-print-border-subtle);
        --theme-divider-strong: var(--theme-print-border);
        --theme-divider-standard: var(--theme-print-divider-standard);
        --theme-divider-soft: var(--theme-print-border-soft);
        --theme-link: var(--theme-print-link);
        --theme-link-hover: var(--theme-print-link-hover);
        --theme-link-visited: var(--theme-print-link-visited);
        --theme-code-bg: var(--theme-print-code-bg);
        --theme-code-header-bg: var(--theme-print-code-header-bg);
        --theme-code-text: var(--theme-print-code-text);
        --theme-code-editor-text: var(--theme-print-code-text);
        --theme-code-border: var(--theme-print-code-border);
        --theme-code-syntax-comment: var(--theme-print-code-comment);
        --theme-code-syntax-control-keyword: var(--theme-print-code-control-keyword);
        --theme-code-syntax-keyword: var(--theme-print-code-keyword);
        --theme-code-syntax-type: var(--theme-print-code-type);
        --theme-code-syntax-function: var(--theme-print-code-function);
        --theme-code-syntax-attribute: var(--theme-print-code-attribute);
        --theme-code-syntax-variable: var(--theme-print-code-variable);
        --theme-code-syntax-constant: var(--theme-print-code-constant);
        --theme-code-syntax-label: var(--theme-print-code-label);
        --theme-code-syntax-tag: var(--theme-print-code-keyword);
        --theme-code-syntax-number: var(--theme-print-code-number);
        --theme-code-syntax-string: var(--theme-print-code-string);
        --theme-code-syntax-escape: var(--theme-print-code-escape);
        --theme-code-syntax-interpolation: var(--theme-print-code-keyword);
        --theme-code-syntax-regex: var(--theme-print-code-regex);
        --theme-code-syntax-operator: var(--theme-print-code-text);
        --theme-code-syntax-word-operator: var(--theme-print-code-keyword);
        --theme-code-syntax-error: var(--theme-print-code-error);
        --theme-code-syntax-muted: var(--theme-print-code-muted);
        --theme-inline-code-bg: var(--theme-print-inline-code-bg);
        --theme-inline-code-text: var(--theme-print-inline-code-text);
        --theme-media-stage-bg: var(--theme-print-bg);
        position: static !important;
        inset: auto !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: var(--theme-print-bg) !important;
        color: var(--theme-print-text) !important;
        transform: none !important;
    }

    html[data-site-printing="true"] [data-site-print-active] :is(
        .site-print-button,
        .site-fullscreen-button,
        .site-view-actions,
        .site-presentation-toolbar,
        .site-presentation-ink,
        .site-print-action-row,
        .staff-content-tools,
        .staff-content-messages,
        .staff-item-actions,
        .staff-inline-edit-panel,
        form,
        input,
        select,
        dialog,
        template
    ) {
        display: none !important;
    }

    html[data-site-printing="true"] [data-site-print-active] :is(
        .resources-home-session-btn,
        .resources-home-resource-btn
    ) {
        display: flex !important;
        border: 0 !important;
        background: transparent !important;
        color: var(--theme-text) !important;
    }

    html[data-site-printing="true"] [data-site-print-active] :is(
        img,
        svg,
        table,
        pre,
        code
    ) {
        max-width: 100% !important;
    }

    html[data-site-printing="true"] [data-site-print-active] .site-icon-theme-adaptive {
        filter: none !important;
    }

    html[data-site-printing="true"] [data-site-print-active] :is(
        pre,
        code,
        .resources-rendered-markdown pre,
        .board-markdown pre
    ) {
        overflow: visible !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
    }

    html[data-site-printing="true"] [data-site-print-active] textarea {
        display: none !important;
    }

    html[data-site-printing="true"] [data-site-print-active] .site-print-textarea-value {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: var(--type-space-content, 12px) !important;
        overflow: visible !important;
        border: 1px solid var(--theme-code-border) !important;
        background: var(--theme-code-bg) !important;
        color: var(--theme-code-text) !important;
        font-family: var(--code-font) !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
    }

    html[data-site-printing="true"] .site-print-source-watermark {
        visibility: visible !important;
        position: fixed !important;
        top: auto !important;
        right: 0.5mm !important;
        bottom: 0.5mm !important;
        left: auto !important;
        z-index: 1000 !important;
        display: block !important;
        width: 17mm !important;
        height: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }
}


/* NAVIGATION */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;

    min-width: var(--body-width-min);
    max-width: var(--body-width-max);
    height: var(--nav-box-height);
    position: fixed;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;

    background: var(--nav-bg-color);
    border-bottom: var(--nav-border-bottom-thk) solid var(--nav-border-bottom-color);

    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 11 */

    z-index: 9999;
}

.nav-left {
    display: flex;
    list-style: none;
    padding-left: var(--nav-leftbox-padding);
    padding-right: 0px;
    gap: var(--nav-ul-gap);
}

.nav-right {
    display: flex;
    list-style: none;
    padding-left: 0px;
    padding-right: var(--nav-rightbox-padding);
    gap: var(--nav-ul-gap);
}

.nav-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-auth-item {
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.nav-auth-logout-form {
    margin-top: 0;
    margin-bottom: 0;
}

.nav-auth-control {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: var(--type-control-padding-tight);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--nav-font-color);
    cursor: pointer;
    text-decoration: none;
}

.nav-auth-control:hover,
.nav-auth-control:focus-visible {
    background: var(--theme-surface-hover);
    color: var(--nav-font-color-hover);
}

.nav-auth-control:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 3px;
}

.nav-auth-icon {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Monochrome static UI assets use one source file in both themes. */
html[data-theme="dark"] .site-icon-theme-adaptive {
    filter: invert(1);
}

.nav-left ul,
.nav-right ul {
    list-style: none;
}

.nav-right > li {
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-left a,
.nav-right a {
    text-decoration: none;
    color: var(--nav-font-color);
    font-size: var(--nav-font-size);
    line-height: var(--type-leading-ui, 1.4);
}

.nav-left a:hover,
.nav-right a:hover {
    text-decoration: underline;
}

.nav-left a.is-active,
.nav-right a.is-active,
.nav-dropdown.show li a.is-active {
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.separator {
    cursor: default;
    pointer-events: none;
    user-select: none;
}

/* MENU TOGGLE */
.menu-toggle {
    display: none;
    font-size: var(--toggle-font-size) !important;
    font-weight: 800;
    line-height: 1;
    color: var(--toggle-font-color);
    margin-left: auto;
    padding-right: var(--toggle-padding-right);
    cursor: pointer;
}

.nav-dropdown {
    display: none;
}

.nav-dropdown.show {
    display: flex;
    flex-direction: column;
    gap: var(--dropdown-row-gap);
    list-style: none;
    line-height: var(--dropdown-list-height);

    background-color: var(--dropdown-bg-color);
    position: absolute;
    top: var(--dropdown-position-top);
    left: 0;
    right: var(--dropdown-position-right);
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--nav-border-bottom-color);
    padding: var(--dropdown-box-padding-bottom) 0px;
    margin: 0;
    z-index: 999;

    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 11 */
}

.nav-dropdown.show li {
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    padding-left: 0;
    padding-right: var(--toggle-padding-right);
    margin: 0px;
}

.nav-dropdown.show li + li {
    margin-top: var(--dropdown-row-gap);
}


.nav-dropdown.show li a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: var(--dropdown-row-height);
    min-height: var(--dropdown-row-height);
    text-decoration: none;
    color: var(--nav-font-color);
}

.nav-dropdown.show li a:hover {
    text-decoration: underline;
}

@media (max-width: 850px) {
    .nav-left {
        display: flex;
        align-items: center;
        gap: var(--nav-ul-gap);
        padding-left: var(--nav-leftbox-padding);
    }

    .nav-left > li {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .nav-left .separator {
        display: inline-flex;
        align-items: center;
        margin-inline: clamp(2px, calc(5vw - 14px), 8px);
        font-size: 0;
    }

    .nav-left .separator::before {
        content: "|";
        font-size: var(--nav-font-size);
    }

    .nav-right {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

}

@media (max-width: 450px) {
    .menu-toggle {
        font-size: 26px !important;
    }
}

@media (min-width: 851px) {
    .nav-dropdown.show {
        display: none;
    }
}

main {
    background-color: var(--main-bg-color);
    padding-top: var(--main-padding-top);
    padding-left: var(--main-padding-left);
    padding-right: var(--main-padding-right);
    padding-bottom: var(--main-padding-bottom);

    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;

    font-size: var(--main-font-size);
    color: var(--main-font-color);
    line-height: var(--type-leading-reading, 1.5);
    text-align: left;
}

#content-window[aria-busy="true"] {
    position: relative;
}

#content-window[aria-busy="true"]::before {
    content: "";
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    width: 36%;
    height: 2px;
    background: var(--theme-link, #0969da);
    transform-origin: left center;
    animation: content-loading-progress 900ms ease-in-out infinite alternate;
}

#content-window:focus:not(:focus-visible) {
    outline: none;
}

#content-window:focus-visible {
    outline: 2px solid var(--theme-link, #0969da);
    outline-offset: -2px;
}

@keyframes content-loading-progress {
    from {
        transform: translateX(0) scaleX(0.45);
    }
    to {
        transform: translateX(178%) scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    #content-window[aria-busy="true"]::before {
        width: 100%;
        animation: none;
    }
}

/* Professor introduction uses semantic blocks rather than empty spacer elements. */
#biography {
    display: flow-root;
    margin: 0;
    margin-top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    margin-left: calc(-1 * var(--main-padding-left));
    margin-right: calc(-1 * var(--main-padding-right));
    padding: var(--box-content-padding);
    background: transparent;
    color: var(--theme-text);
}

.professor-portrait {
    float: left;
    width: 33%;
    max-width: 180px;
    height: auto;
    margin: 0 var(--type-space-content) 0 0;
    border: 0;
    border-radius: 25px;
}

#biography h4,
#biography p,
.professor-contact {
    margin: 0;
}

#biography > p {
    margin-block-start: var(--type-space-content);
}

.professor-contact {
    margin-block-start: var(--type-space-compact);
}

.professor-contact p + p {
    margin-block-start: var(--type-space-compact);
}

#biography *,
.professor-contact * {
    color: var(--theme-text) !important;
}

#biography a {
    text-decoration: none;
}

#biography p {
    max-width: none;
    padding-inline-start: 0;
    position: static;
    overflow-wrap: anywhere;
}

/* Biography already owns 12px of lower inset; complete the first 16px section transition. */
#biography + div > h4 {
    margin-block-start: var(--type-space-tight);
}

/* CV heading boxes on Professor page. */
.professor-cv h4 {
    margin: var(--type-space-page) 0 0;
    width: calc(100% + var(--main-padding-left) + var(--main-padding-right));
    max-width: none;
    box-sizing: border-box;
    margin-left: calc(-1 * var(--main-padding-left));
    margin-right: 0;
    display: flex;
    align-items: center;
    padding: var(--type-space-compact, 8px) var(--type-space-page, 16px);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
    background: transparent;
    color: var(--theme-text);
    border-top: 1px solid var(--theme-divider-strong);
    border-bottom: 1px solid var(--theme-divider-strong);
}

/* Keep the subtitle line under CV headings in the same accent box. */
.professor-cv .professor-section-note {
    margin: 0;
    width: calc(100% + var(--main-padding-left) + var(--main-padding-right));
    max-width: none;
    box-sizing: border-box;
    margin-left: calc(-1 * var(--main-padding-left));
    margin-right: 0;
    padding-top: 0;
    padding-bottom: var(--type-space-compact, 8px);
    padding-left: var(--type-space-page, 16px);
    padding-right: var(--type-space-page, 16px);
    font-size: var(--type-size-content-description);
    line-height: var(--type-leading-reading);
    background: transparent;
    color: var(--theme-text);
    border-top: 0;
    border-bottom: 1px solid var(--theme-divider-strong);
}

/* If a subtitle line follows the heading, keep a single border only under the subtitle line. */
.professor-cv h4:has(+ .professor-section-note) {
    border-bottom: 0;
}

/* Professor page typography follows the shared content hierarchy. */
.professor-cv {
    font-size: var(--type-size-body);
    line-height: var(--type-leading-reading);
    /* Full-bleed headings and the 12px biography inset extend beyond the 16px page inset. */
    overflow-x: visible;
}

.professor-cv p,
.professor-cv li,
.professor-cv a,
.professor-cv span,
.professor-cv strong,
.professor-cv em,
.professor-cv b,
.professor-cv i,
.professor-cv u {
    font-size: var(--type-size-body);
    line-height: var(--type-leading-reading);
}

.professor-cv h4,
.professor-cv h5 {
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.professor-cv h5 {
    margin: var(--type-space-page) 0 var(--type-space-content);
}

.professor-cv :is(h4, .professor-section-note) + h5,
.professor-cv h4 + ul {
    margin-block-start: var(--type-space-content);
}

.professor-cv h5:has(+ .professor-subsection-note) {
    margin-block-end: var(--type-space-tight);
}

.professor-cv .professor-subsection-note {
    margin: 0 0 var(--type-space-content);
    color: var(--theme-text-secondary);
}

.professor-cv ul {
    margin: 0;
    padding-inline-start: var(--type-indent-list);
}

.professor-cv ul ul {
    margin-block-start: var(--type-space-tight);
    list-style-type: "– ";
}

.professor-cv li {
    margin: 0;
}

.professor-cv ul > li + li {
    margin-block-start: var(--type-space-compact);
}

.professor-cv ul ul > li + li {
    margin-block-start: var(--type-space-tight);
}

.professor-cv h6 {
    margin-block: 0;
    font-size: var(--type-size-body);
    line-height: var(--type-leading-heading);
}

/*
 * CV citations and affiliations read as one continuous academic record, so
 * public Professor links inherit the surrounding text color. Interaction is
 * still exposed by underline and the common focus ring; staff E/D actions keep
 * their semantic action colors.
 */
.professor-cv a:not(.staff-item-action),
.professor-cv a:not(.staff-item-action):visited,
.professor-cv a:not(.staff-item-action):is(:hover, :focus-visible),
.professor-cv a:not(.staff-item-action):visited:is(:hover, :focus-visible) {
    color: inherit;
}

.professor-cv a:not(.staff-item-action):is(:hover, :focus-visible) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Keep biography name heading unchanged */
#biography h4 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--type-space-content);
    margin: 0;
    width: auto;
    box-sizing: content-box;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    font-size: var(--type-size-content-title) !important;
    line-height: var(--type-leading-heading) !important;
    background: transparent;
    color: var(--theme-text) !important;
    border-top: 0;
    border-bottom: 0;
}

#biography h4 + p {
    background: transparent;
    color: var(--theme-text) !important;
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.members-section {
    --members-sidebar-width: 125.4px;
    --members-sidebar-toggle-width: 19px;
    --members-layout-gap: 10px;
    --members-divider-offset: 5px;
    margin-top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    min-width: 0;
}

.members-layout {
    display: grid;
    position: relative;
    grid-template-columns: minmax(96px, var(--members-sidebar-width)) minmax(0, 1fr);
    gap: var(--members-layout-gap);
    align-items: stretch;
    min-width: 0;
    transition: grid-template-columns 180ms ease;
}

.members-layout.is-sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}

.members-layout.is-sidebar-collapsed .members-sidebar {
    display: none;
}

@media (min-width: 901px) {
    .members-layout::before {
        position: absolute;
        top: 0;
        bottom: 0;
        left: calc(var(--members-sidebar-width) + var(--members-divider-offset));
        width: 1px;
        background: var(--theme-divider-strong);
        content: "";
        pointer-events: none;
        transition: left 180ms ease;
    }

    .members-layout.is-sidebar-collapsed::before {
        left: var(--members-divider-offset);
    }
}

.members-sidebar {
    grid-column: 1;
    min-width: 0;
    padding: var(--type-space-content) var(--type-space-content) var(--type-space-content) 0;
}

.members-sidebar-toggle {
    box-sizing: border-box;
    position: absolute;
    z-index: 2;
    top: 0;
    left: calc(
        var(--members-sidebar-width)
        + var(--members-divider-offset)
        - var(--members-sidebar-toggle-width)
    );
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--members-sidebar-toggle-width);
    height: 72px;
    padding: var(--type-control-padding-tight);
    border: 0;
    border-radius: 0 0 4px 4px;
    background: var(--theme-sidebar-toggle-bg);
    color: var(--theme-text);
    cursor: pointer;
    font-family: var(--body-font);
    line-height: 1;
    transition: left 180ms ease, background-color 120ms ease;
}

.members-layout.is-sidebar-collapsed .members-sidebar-toggle {
    left: calc(var(--members-divider-offset) - var(--members-sidebar-toggle-width));
    height: 82px;
}

.members-sidebar-toggle:is(:hover, :focus-visible) {
    background: var(--theme-sidebar-toggle-hover);
}

.members-sidebar-toggle:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.members-sidebar-toggle-label {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    font-size: calc(var(--nav-font-size) * 0.8);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
}

.members-menu {
    display: grid;
    gap: var(--type-space-tight);
}

.members-menu-link,
.members-menu-link:visited {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    padding: var(--type-control-padding-block) var(--type-control-padding-inline);
    color: var(--theme-text);
    font-size: var(--nav-font-size);
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}

.members-menu-link.is-active {
    font-weight: 700;
}

.members-menu-link.is-active > .panel-menu-label {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.members-menu-link:is(:hover, :focus-visible) {
    color: inherit;
}

.members-menu-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.members-main {
    grid-column: 2;
    min-width: 0;
    padding: var(--type-space-content) 0 0 var(--type-space-content);
}

.members-main #biography {
    margin: 0;
    padding: 0 0 var(--type-space-content);
}

.members-main .professor-cv h4,
.members-main .professor-cv .professor-section-note {
    width: calc(100% + 2 * var(--type-space-content));
    margin-left: calc(-1 * var(--type-space-content));
    margin-right: calc(-1 * var(--type-space-content));
    padding-left: var(--type-space-content);
    padding-right: var(--type-space-content);
}

.members-main #biography h4 {
    width: auto;
    margin: 0;
    padding: 0;
}

.members-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--type-space-content);
    padding: 0 0 var(--type-space-content);
    border-bottom: 1px solid var(--theme-divider-standard);
}

.members-content-header h1 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.members-content-header p {
    margin: var(--type-space-tight) 0 0;
    color: var(--theme-text-muted);
}

.student-directory-title-row {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: var(--type-space-content);
    white-space: nowrap;
}

.student-recruitment-link,
.student-recruitment-link:visited {
    flex: 0 0 auto;
    color: var(--theme-link);
    font-size: var(--type-size-body);
    font-weight: 700;
    line-height: var(--type-leading-ui);
    text-decoration: none;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .student-recruitment-link,
    .student-recruitment-link:visited {
        background-image: var(--theme-recruitment-gradient);
        background-position: 0% 50%;
        background-size: 320% 100%;
        background-clip: text;
        color: transparent;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation:
            student-recruitment-gradient-shift 2.4s ease-in-out infinite alternate,
            student-recruitment-sparkle 1.2s ease-in-out infinite;
    }
}

.student-recruitment-link:is(:hover, :focus-visible) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.student-recruitment-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 3px;
}

@keyframes student-recruitment-gradient-shift {
    from {
        background-position: 0% 50%;
    }

    to {
        background-position: 100% 50%;
    }
}

@keyframes student-recruitment-sparkle {
    0%,
    100% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }

    50% {
        filter: brightness(1.3) drop-shadow(0 0 4px var(--theme-recruitment-glow));
    }
}

@media (prefers-reduced-motion: reduce) {
    .student-recruitment-link,
    .student-recruitment-link:visited {
        animation: none;
        background-position: 50% 50%;
        filter: none;
    }
}

.student-directory-admin-actions {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--type-space-compact);
}

.student-recruitment-toggle-form {
    margin: 0;
}

.student-recruitment-toggle {
    margin: 0;
    padding: var(--type-control-padding-tight) var(--type-control-padding-inline);
    border: 1px solid var(--theme-admin-menu-border);
    border-radius: 4px;
    background: transparent;
    color: var(--theme-text);
    font: inherit;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    cursor: pointer;
}

.student-recruitment-toggle[aria-pressed="true"] {
    background: var(--theme-accent-surface-strong);
}

.student-recruitment-toggle:is(:hover, :focus-visible) {
    background: var(--theme-accent-hover);
}

.student-recruitment-toggle:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.studio-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--type-space-compact);
}

.studio-admin-actions a,
.studio-admin-actions a:visited,
.studio-section-heading a,
.studio-section-heading a:visited,
.studio-project-edit-link,
.studio-project-edit-link:visited,
.equipment-admin-actions a,
.equipment-admin-actions a:visited,
.equipment-edit-link,
.equipment-edit-link:visited {
    color: var(--theme-text);
    font-size: var(--type-size-small);
    text-decoration: none;
}

.studio-admin-actions a:is(:hover, :focus-visible),
.studio-section-heading a:is(:hover, :focus-visible),
.studio-project-edit-link:is(:hover, :focus-visible),
.equipment-admin-actions a:is(:hover, :focus-visible),
.equipment-edit-link:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.studio-profile {
    padding-bottom: var(--type-space-page);
}

.studio-profile.has-funded-projects {
    padding-bottom: 0.5em;
}

.studio-notices,
.studio-introduction,
.studio-projects,
.studio-funded-projects {
    margin-top: var(--type-space-page);
}

.studio-notices-heading h2,
.studio-introduction h2,
.studio-section-heading h2 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.studio-notices-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--type-space-content);
}

.studio-notices-heading h2 {
    margin: 0;
}

.studio-notices {
    padding-bottom: var(--type-space-content);
    border-bottom: 1px solid var(--theme-divider-strong);
}

.studio-notices-heading a,
.studio-notices-heading a:visited,
.studio-notice-link,
.studio-notice-link:visited {
    color: var(--theme-text);
    text-decoration: none;
}

.studio-notices-heading a {
    flex: 0 0 auto;
    font-size: var(--type-size-small);
}

.studio-notices-heading a:is(:hover, :focus-visible),
.studio-notice-link:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.studio-notices-heading a:focus-visible,
.studio-notice-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.studio-notice-list {
    margin: var(--type-space-content) 0 0;
    padding: 0;
    list-style: none;
}

.studio-notice-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: var(--type-space-compact);
    align-items: baseline;
    min-width: 0;
    padding: var(--type-space-tight) 0;
    border-top: 1px dotted var(--theme-divider-dotted);
}

.studio-notice-link {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.studio-notice-date,
.studio-notices-empty {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.studio-notice-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.studio-notices-empty {
    margin: var(--type-space-content) 0 0;
    padding-top: var(--type-space-compact);
    border-top: 1px dotted var(--theme-divider-dotted);
}

.studio-empty-state {
    margin: var(--type-space-content) 0 0;
    line-height: var(--type-leading-reading);
    overflow-wrap: anywhere;
}

.studio-introduction-body {
    margin-top: var(--type-space-content);
    line-height: var(--type-leading-reading);
    overflow-wrap: anywhere;
}

.studio-introduction {
    position: relative;
}

.studio-introduction-body.is-collapsible:not(.is-expanded) {
    max-height: var(--studio-about-collapsed-height, 10lh);
    overflow: hidden;
}

.studio-introduction-toggle {
    appearance: none;
    box-sizing: border-box;
    position: absolute;
    z-index: 2;
    top: calc(100% + var(--type-space-tight) / 2);
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 19px;
    margin: 0;
    padding: 0 var(--type-control-padding-inline, 6px);
    border: 0;
    border-radius: 4px 4px 0 0;
    background: var(--theme-sidebar-toggle-bg);
    color: var(--theme-text);
    cursor: pointer;
    font: inherit;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    white-space: nowrap;
}

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

.studio-introduction:has(> .studio-introduction-toggle:not([hidden])) + .studio-projects {
    margin-top: calc(19px + var(--type-space-tight));
}

.studio-introduction-toggle:is(:hover, :active) {
    background: var(--theme-sidebar-toggle-hover);
    color: var(--theme-link-hover);
}

.studio-introduction-toggle:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

@media print {
    .studio-introduction-body.is-collapsible:not(.is-expanded) {
        max-height: none;
        overflow: visible;
    }

    .studio-introduction-toggle {
        display: none;
    }
}

.studio-about-mark {
    display: block;
    float: left;
    width: var(--studio-about-mark-size, clamp(68px, 9vw, 114px));
    height: var(--studio-about-mark-size, clamp(68px, 9vw, 114px));
    margin: 0 var(--type-space-content) 0 0;
    object-fit: contain;
}

.studio-introduction-body > :where(p, .studio-introduction-list, .studio-empty-state) {
    margin: 0;
}

.studio-introduction-body > :where(p, .studio-introduction-list, .studio-empty-state)
    + :where(p, .studio-introduction-list, .studio-empty-state) {
    margin-top: var(--type-space-content);
}

.studio-introduction-body > p + .studio-introduction-list,
.studio-introduction-body > .studio-introduction-list + p {
    margin-top: 0;
}

.studio-introduction-body > p,
.studio-introduction-list li {
    white-space: break-spaces;
}

.studio-introduction-list {
    padding-inline-start: var(--type-indent-list);
}

.studio-introduction-list li + li {
    margin-top: calc(var(--type-space-tight) / 2);
}

.studio-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--type-space-content);
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-strong);
}

.studio-project-list,
.studio-funded-project-list {
    display: grid;
    gap: var(--type-space-content);
    margin: var(--type-space-content) 0 0;
    padding: 0;
    list-style: none;
}

.studio-project-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-funded-project-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 0;
}

.studio-funded-projects {
    padding-top: 0.5em;
    border-top: 1px solid var(--theme-divider-strong);
}

.studio-project-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--type-space-content);
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
}

.studio-funded-project-item {
    display: block;
    min-width: 0;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.studio-project-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 var(--type-space-content);
    overflow: hidden;
    border-radius: 4px;
    background: var(--theme-surface-muted);
}

.studio-project-media :is(img, video) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.studio-project-media .studio-interest-slide.is-fit-contain {
    object-fit: contain;
}

.studio-project-media .studio-interest-slide.is-background-black {
    background: #000;
}

.studio-project-media .studio-interest-slide.is-background-white {
    background: #fff;
}

.studio-project-media .studio-interest-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

.studio-project-media .studio-interest-slide.is-active {
    opacity: 1;
}

.studio-project-item h3 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-body);
    font-weight: 400;
    line-height: var(--type-leading-heading);
    overflow-wrap: anywhere;
}

.studio-funded-project-mark {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 270px);
    max-height: 9lh;
}

.studio-project-edit-link {
    align-self: flex-end;
    margin-top: var(--type-space-content);
}

.equipment-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--type-space-compact);
}

.research-equipment {
    padding-bottom: var(--type-space-page);
}

.equipment-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--type-space-content);
    margin: var(--type-space-content) 0 0;
    padding: 0;
    list-style: none;
}

.equipment-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
}

.equipment-card-media {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--theme-surface-muted);
}

.equipment-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipment-photo-placeholder {
    padding: var(--type-space-content);
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
}

.equipment-card-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: var(--type-space-compact);
}

.equipment-card-copy h2 {
    display: -webkit-box;
    height: 2.6em;
    margin: 0;
    overflow: hidden;
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.equipment-card-facts {
    display: grid;
    gap: var(--type-space-tight);
    margin: var(--type-space-compact) 0 0;
    padding-top: var(--type-space-compact);
    border-top: 1px dotted var(--theme-divider-dotted);
}

.equipment-card-facts > div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--type-space-compact);
    align-items: baseline;
    min-width: 0;
}

.equipment-card-facts dt,
.equipment-card-facts dd {
    min-width: 0;
    margin: 0;
}

.equipment-card-facts dt,
.equipment-card-label {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: var(--type-leading-ui);
    text-transform: uppercase;
}

.equipment-card-facts dd {
    line-height: var(--type-leading-reading);
    overflow-wrap: anywhere;
}

.equipment-specification-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--type-space-compact);
    margin-top: var(--type-space-compact);
}

.equipment-card-label {
    display: block;
}

.equipment-specification-copy-button {
    appearance: none;
    flex: 0 0 64px;
    box-sizing: border-box;
    width: 64px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-text-strong);
    font: inherit;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    white-space: nowrap;
    cursor: pointer;
}

.equipment-specification-copy-button:is(:hover, :active) {
    background: transparent;
    color: var(--theme-link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.equipment-specification-copy-button:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
    background: transparent;
    color: var(--theme-link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.equipment-specification-copy-button.is-copied {
    color: var(--theme-success);
}

.equipment-specification-copy-button.is-copy-error {
    color: var(--theme-error-text);
}

.equipment-specification-copy-button:disabled {
    background: transparent;
    color: var(--theme-control-disabled-text);
    text-decoration: none;
    cursor: not-allowed;
}

.equipment-specification-copy-button[data-copy-pending="true"] {
    cursor: progress;
}

.equipment-specification-list,
.equipment-empty-specifications {
    box-sizing: border-box;
    height: 72px;
    margin: var(--type-space-tight) 0 0;
}

.equipment-specification-list {
    padding-right: var(--type-space-compact);
    padding-left: var(--type-indent-list);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    line-height: var(--type-leading-ui);
    overflow-wrap: anywhere;
}

.equipment-specification-list:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.equipment-specification-list li + li {
    margin-top: var(--type-space-tight);
}

.equipment-empty-specifications {
    color: var(--theme-text-muted);
}

.equipment-edit-link {
    display: block;
    margin-top: var(--type-space-content);
    text-align: right;
}

.equipment-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px max-content 72px minmax(0, 1fr);
    align-items: center;
    column-gap: var(--type-space-compact);
    margin-top: var(--type-space-page);
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-standard);
}

.equipment-page-summary {
    grid-column: 3;
    justify-self: center;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-align: center;
    white-space: nowrap;
}

.equipment-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding-block: var(--type-control-padding-block);
    padding-inline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-text-strong);
    font: inherit;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-decoration: none;
}

.equipment-page-link-direction {
    width: 72px;
    min-width: 72px;
    white-space: nowrap;
}

.equipment-page-previous {
    grid-column: 2;
    justify-content: flex-end;
}

.equipment-page-next {
    grid-column: 4;
    justify-content: flex-start;
}

a.equipment-page-link:hover,
a.equipment-page-link:active {
    background: transparent;
    color: var(--theme-link-hover);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a.equipment-page-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.equipment-page-link.is-disabled {
    color: var(--theme-control-disabled-text);
}

.members-admin-link,
.members-admin-link:visited,
.members-back-link,
.members-back-link:visited,
.student-profile-edit-link,
.student-profile-edit-link:visited {
    flex: 0 0 auto;
    color: var(--theme-text);
    text-decoration: none;
}

.members-admin-link:is(:hover, :focus-visible),
.members-back-link:is(:hover, :focus-visible),
.student-profile-edit-link:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.student-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--type-space-content);
    width: 100%;
    margin-top: var(--type-space-content);
    align-items: start;
}

.student-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
    background: transparent;
    overflow: hidden;
}

.student-card-media {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: min(180px, calc(100% - 24px));
    aspect-ratio: 3 / 4;
    margin: var(--type-space-content) auto 0;
    overflow: hidden;
    border: 0;
    border-radius: 25px;
    background: var(--theme-surface-muted);
}

.student-card-grid-recruiting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 772px;
}

.student-recruiting-badge {
    position: absolute;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    right: var(--type-space-content);
    bottom: var(--type-space-content);
    height: 26px;
    max-width: calc(100% - (2 * var(--type-space-content)));
    padding: var(--type-control-padding-block) var(--type-control-padding-inline);
    border: 1px solid var(--theme-divider-strong);
    border-radius: 4px;
    background: var(--theme-control-bg);
    color: var(--theme-text-strong);
    font-size: var(--type-size-small);
    font-weight: 700;
    line-height: var(--type-leading-ui);
    white-space: nowrap;
}

.student-card-photo,
.student-profile-photo,
.student-photo-placeholder {
    box-sizing: border-box;
}

.student-card-photo,
.student-profile-photo {
    display: block;
}

.student-card-photo,
.student-card .student-photo-placeholder {
    width: 100%;
    height: 100%;
}

.student-card-photo,
.student-profile-photo {
    object-fit: cover;
    background: var(--theme-surface-muted);
}

.student-card-photo {
    object-position: center top;
}

.student-photo-placeholder {
    display: grid;
    place-items: center;
    padding: var(--type-space-tight);
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    text-align: center;
}

.student-card-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--type-space-page) var(--type-space-content) var(--type-space-content);
}

.student-card-name {
    display: block;
    margin-top: var(--type-space-tight);
    color: var(--theme-text-strong);
    font-size: calc(var(--type-size-body) * 1.25);
    line-height: var(--type-leading-heading);
}

.student-card-status,
.student-profile-status {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.student-card-status {
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.student-research-period {
    display: block;
    margin-top: var(--type-space-tight);
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    overflow-wrap: anywhere;
}

.student-profile-status {
    display: block;
    margin-bottom: var(--type-space-tight);
}

.student-card-email,
.student-card-interests {
    min-width: 0;
    overflow-wrap: anywhere;
}

.student-card-email {
    margin-top: var(--type-space-tight);
    padding-bottom: var(--type-space-content);
    border-bottom: 1px dotted var(--theme-divider-dotted);
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-decoration: none;
}

.student-card-email:visited {
    color: var(--theme-text-muted);
}

.student-card-email:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.student-card-label {
    margin-top: var(--type-space-content);
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: var(--type-leading-ui);
    text-transform: uppercase;
}

.student-card-interests {
    margin: var(--type-space-tight) 0 0;
    color: var(--theme-text);
    line-height: var(--type-leading-reading);
}

.student-card-records {
    max-height: 220px;
    margin-top: var(--type-space-content);
    padding-right: var(--type-space-compact);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.student-card-records:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.student-card-record-section h2 {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: var(--type-leading-ui);
    text-transform: uppercase;
}

.student-card-record-section p {
    margin: var(--type-space-tight) 0 0;
    color: var(--theme-text);
    line-height: var(--type-leading-reading);
    overflow-wrap: anywhere;
}

.student-bullet-list {
    margin: var(--type-space-tight) 0 0;
    padding-left: var(--type-indent-list);
    color: var(--theme-text);
    line-height: var(--type-leading-reading);
    overflow-wrap: anywhere;
}

.student-bullet-list li + li {
    margin-top: var(--type-space-compact);
}

.student-card-record-section + .student-card-record-section {
    margin-top: var(--type-space-content);
    padding-top: var(--type-space-content);
    border-top: 1px dotted var(--theme-divider-dotted);
}

.student-card-copy > .student-profile-edit-link {
    align-self: flex-end;
    margin-top: var(--type-space-content);
    font-size: var(--type-size-small);
}

.members-empty-state {
    margin-top: var(--type-space-content);
    padding: var(--type-space-content);
    border: 1px dashed var(--theme-divider-standard);
}

.members-empty-state p,
.members-messages p {
    margin: 0;
}

.members-messages {
    margin-bottom: var(--type-space-content);
    padding: var(--type-space-compact);
    border-left: 3px solid var(--theme-divider-strong);
    background: var(--theme-surface-muted);
}

.student-profile-detail-header .members-back-link {
    display: inline-block;
    margin-bottom: var(--type-space-tight);
    font-size: var(--type-size-small);
}

.student-profile-introduction {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: var(--type-space-content);
    align-items: start;
    margin-top: var(--type-space-content);
}

.student-profile-photo {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
}

.student-profile-summary {
    min-width: 0;
    margin: 0;
}

.student-profile-summary > div + div {
    margin-top: var(--type-space-content);
}

.student-profile-summary dt {
    color: var(--theme-text-strong);
    font-weight: 700;
}

.student-profile-summary dd {
    margin: var(--type-space-tight) 0 0;
    overflow-wrap: anywhere;
}

.student-profile-summary a,
.student-profile-summary a:visited {
    color: var(--theme-text);
}

.student-profile-section {
    margin-top: var(--type-space-page);
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-strong);
}

.student-profile-section h2 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.student-profile-section p {
    margin: var(--type-space-content) 0 0;
    line-height: var(--type-leading-reading);
}

.student-profile-form {
    margin-top: var(--type-space-content);
}

.student-profile-field + .student-profile-field {
    margin-top: var(--type-space-content);
}

.student-profile-field > label {
    display: block;
    margin-bottom: var(--type-space-tight);
    color: var(--theme-text-strong);
    font-weight: 700;
}

.student-profile-field input[type="text"],
.student-profile-field input[type="email"],
.student-profile-field input[type="file"],
.student-profile-field textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: var(--type-control-padding-block) var(--type-control-padding-inline);
    border: 1px solid var(--theme-input-border);
    border-radius: 4px;
    background: var(--theme-control-bg);
    color: var(--theme-text);
    font: inherit;
}

.student-profile-field-help,
.student-profile-field-error {
    margin: var(--type-space-tight) 0 0;
    font-size: var(--type-size-small);
}

.student-profile-field-help {
    color: var(--theme-text-muted);
}

.student-profile-field-error,
.student-profile-form-errors {
    color: var(--theme-error-text);
}

.student-profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--type-space-compact);
    margin-top: var(--type-space-page);
}

.student-profile-form-actions a,
.student-profile-form-actions button {
    padding: var(--type-control-padding-block) var(--type-control-padding-inline);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    font: inherit;
    text-decoration: none;
}

.student-profile-form-actions a,
.student-profile-form-actions a:visited {
    background: var(--theme-surface-muted);
    color: var(--theme-text);
}

.student-profile-form-actions button {
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
    cursor: pointer;
}

@media (max-width: 900px) {
    .members-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: var(--type-space-content);
    }

    .members-layout.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .members-sidebar {
        grid-column: 1;
        grid-row: 1;
        padding: calc(var(--type-space-content) / 2) 0;
        border-right: 0;
        border-bottom: 0;
    }

    .members-sidebar-toggle,
    .members-layout.is-sidebar-collapsed .members-sidebar-toggle {
        position: relative;
        top: auto;
        left: auto;
        grid-column: 1;
        grid-row: 1;
        align-self: end;
        justify-self: end;
        width: 72px;
        height: 19px;
        margin-right: calc(-1 * var(--main-padding-right));
        margin-bottom: 1px;
        border-radius: 4px 4px 0 0;
    }

    .members-layout.is-sidebar-collapsed .members-sidebar-toggle {
        width: 82px;
    }

    .members-sidebar-toggle-label {
        display: inline;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        letter-spacing: normal;
    }

    .members-menu {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: var(--type-space-content);
        white-space: nowrap;
    }

    .members-menu-link {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        width: auto;
        padding-inline: 0;
        font-size: var(--nav-font-size);
    }

    .members-main {
        grid-column: 1;
        grid-row: 2;
        padding: var(--type-space-content) 0 0;
    }

    .studio-profile {
        padding-bottom: 0;
    }

    .student-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .studio-project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .studio-funded-project-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .equipment-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .student-directory .members-content-header {
        flex-wrap: wrap;
    }

    .student-directory-admin-actions {
        flex: 1 0 100%;
        justify-content: flex-start;
    }

    .student-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .studio-project-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .studio-funded-project-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .equipment-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .studio-funded-project-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .student-profile-introduction {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-profile-photo {
        max-width: 220px;
    }
}

@media print {
    .members-sidebar,
    .members-sidebar-toggle,
    .members-messages,
    .members-admin-link,
    .student-recruitment-link,
    .student-directory-admin-actions,
    .studio-admin-actions,
    .studio-section-heading a,
    .studio-project-edit-link,
    .equipment-admin-actions,
    .equipment-specification-copy-button,
    .equipment-edit-link,
    .student-profile-edit-link {
        display: none !important;
    }

    .members-layout {
        display: block;
    }

    .members-main {
        padding: 0;
    }

    html[data-site-printing="true"] #professor-print-content,
    html[data-site-printing="true"] #professor-print-content > * {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html[data-site-printing="true"] #professor-print-content :is(
        p,
        li,
        a,
        span,
        strong,
        em
    ) {
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    html[data-site-printing="true"] #professor-print-content ul {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    .student-card-records {
        max-height: none;
        overflow: visible;
        scrollbar-gutter: auto;
    }
}

.home-hero-block {
    margin-top: calc(var(--nav-box-height) + var(--nav-border-bottom-thk) - var(--main-padding-top));
    margin-left: calc(-1 * var(--main-padding-left));
    margin-right: calc(-1 * var(--main-padding-right));
    margin-bottom: var(--type-space-content);
    padding: var(--box-content-padding);
    background: transparent;
    text-align: center;
}

.home-hero-image {
    width: 80%;
    max-width: 320px;
    height: auto;
    border: 0;
    display: inline-block;
}

.home-greeting-title {
    margin: 0;
    text-align: left;
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.home-greeting-list {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

.home-greeting-list li {
    margin: 0;
}

.home-greeting-list li + li {
    margin-top: 6px;
}

.home-welcome {
    display: flex;
    flex: 1 0 auto;
    min-height: 0;
}

.home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--type-space-page);
    flex: 1 0 auto;
    width: 100%;
    min-width: 0;
    align-content: start;
    align-items: start;
}

.home-site-tree,
.home-announcements {
    min-width: 0;
    margin: 0;
    padding: var(--type-space-content);
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
    background: transparent;
}

.home-site-tree {
    font-family: var(--body-font);
}

.home-site-tree-root {
    margin-bottom: var(--type-space-compact);
    color: var(--theme-text-muted);
    font-family: var(--code-font);
    font-size: var(--type-size-small);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.home-site-tree-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--type-space-page);
    row-gap: var(--type-space-tight);
}

.home-site-tree-top-level,
.home-site-tree .home-site-tree-children li {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.home-site-tree-top-level {
    padding-block: var(--type-space-compact);
    padding-inline-start: var(--type-space-page);
    border-inline-start: 1px dotted var(--theme-divider-dotted);
}

.home-site-tree-item {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 8px;
    align-items: baseline;
    min-width: 0;
}

.home-site-tree-link,
.home-site-tree-link:visited {
    display: inline-block;
    padding-block: var(--type-control-padding-block);
    color: var(--theme-text);
    text-decoration: none;
}

.home-site-tree-link:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.home-site-tree-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.home-site-tree-description {
    display: block;
    min-width: 0;
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-align: start;
    overflow-wrap: break-word;
}

.home-site-tree .home-site-tree-children {
    margin: 3px 0 2px 14px;
    padding: 0 0 0 12px;
    list-style: none;
    display: grid;
    row-gap: 2px;
    border-inline-start: 1px dotted var(--theme-divider-dotted);
}

.home-site-tree .home-site-tree-children .home-site-tree-link {
    font-size: calc(var(--type-size-body) * 0.92);
}

.home-announcements {
    align-self: stretch;
    border-color: var(--theme-divider-strong);
}

.home-panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--type-space-compact);
    margin: 0 0 var(--type-space-content);
}

.home-panel-heading h2 {
    margin: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.home-announcements-all,
.home-announcements-all:visited,
.home-announcement-link,
.home-announcement-link:visited {
    color: var(--theme-text);
    text-decoration: none;
}

.home-announcements-all {
    flex: 0 0 auto;
    font-size: var(--type-size-small);
}

.home-announcements-all:is(:hover, :focus-visible),
.home-announcement-link:is(:hover, :focus-visible) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.home-announcements-all:focus-visible,
.home-announcement-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.home-announcement-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--type-space-page);
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-announcement-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: var(--type-space-compact);
    align-items: baseline;
    min-width: 0;
    margin: 0;
    padding: var(--type-space-content) 0;
    border-top: 1px dotted var(--theme-divider-dotted);
}

.home-announcement-link {
    min-width: 0;
    overflow-wrap: break-word;
}

.home-announcement-date,
.home-announcements-empty {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.home-announcement-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.home-announcements-empty {
    margin: 0;
    padding-top: var(--type-space-content);
    border-top: 1px dotted var(--theme-divider-dotted);
}

@media (max-width: 600px) {
    .home-announcement-list,
    .home-site-tree-list {
        grid-template-columns: minmax(0, 1fr);
    }
}


.public-document {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: var(--type-space-page) 0;
}

.public-document-content > h1 {
    margin: 0;
    padding: 0 0 var(--type-space-content);
    border-bottom: 1px solid var(--theme-divider-strong);
    color: var(--theme-text-strong);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.public-document-content > h1 + p {
    margin-top: var(--type-space-tight);
    color: var(--theme-text-muted);
}

.public-document-content > :is(p, ul, ol, blockquote, table) {
    margin-top: var(--type-space-content);
}

.public-document-content > h2 {
    margin: calc(var(--type-space-page) + var(--type-space-tight)) 0 0;
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-strong);
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.public-document-content > hr {
    margin: calc(var(--type-space-page) + var(--type-space-tight)) 0 0;
    border: 0;
    border-top: 1px solid var(--theme-divider-strong);
}

.public-document-content li + li {
    margin-top: var(--type-space-tight);
}

.public-document-content blockquote {
    margin-left: 0;
    padding-left: var(--type-space-content);
    border-left: 2px solid var(--theme-divider-strong);
    color: var(--theme-text-muted);
}

.public-document-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    border-top: 1px solid var(--theme-divider-strong);
    border-bottom: 1px solid var(--theme-divider-strong);
}

.public-document-content th,
.public-document-content td {
    min-width: 10rem;
    padding: var(--type-space-tight) var(--type-space-content);
    vertical-align: top;
    text-align: left;
    border-bottom: 1px dotted var(--theme-divider-dotted);
}

.public-document-content th {
    color: var(--theme-text-strong);
    font-weight: 700;
}

.public-document-content tr:last-child :is(th, td) {
    border-bottom: 0;
}

/* Public privacy and license notices reuse Home's concise dotted hierarchy. */
.public-document-metadata {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--type-space-content);
    min-width: 0;
    margin: var(--type-space-tight) 0 0;
    padding: 0;
}

.public-document-root {
    min-width: 0;
    color: var(--theme-text-strong);
    font-size: var(--type-size-body);
    font-weight: 700;
    line-height: var(--type-leading-heading);
    overflow-wrap: anywhere;
}

.public-document-effective {
    flex: 0 1 55%;
    min-width: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    font-weight: 400;
    line-height: var(--type-leading-reading);
    text-align: end;
    overflow-wrap: anywhere;
}

.public-document-outline .public-document-content > :is(h2, hr) + ul,
.public-document-outline .public-document-content li > ul {
    display: grid;
    gap: var(--type-space-tight);
    margin: var(--type-space-content) 0 0;
    padding: 0 0 0 var(--type-space-page);
    border-inline-start: 1px dotted var(--theme-divider-dotted);
    list-style: none;
}

.public-document-outline .public-document-content li {
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.public-document-outline .public-document-content li + li {
    margin-top: 0;
}

.public-document-outline .public-document-content > :is(h2, hr) + ul > li > strong {
    display: block;
    color: var(--theme-text);
    font-size: var(--type-size-body);
    line-height: var(--type-leading-heading);
}

/* Open-source entries use compact reference lines: name at left, citation at right. */
.public-document-bibliography .public-document-content > h2 + ul > li {
    display: grid;
    grid-template-columns: minmax(8rem, 0.9fr) minmax(0, 2.1fr);
    align-items: baseline;
    column-gap: var(--type-space-content);
    color: var(--theme-text-muted);
}

.public-document-bibliography .public-document-content > h2 + ul > li > strong {
    display: block;
    min-width: 0;
    color: var(--theme-text);
    font-size: var(--type-size-body);
    font-weight: 700;
    line-height: var(--type-leading-heading);
    overflow-wrap: anywhere;
}

.public-document-citation {
    grid-column: 2;
    min-width: 0;
    color: var(--theme-text-muted);
    overflow-wrap: anywhere;
}

/* Privacy versions use Home's title-and-description columns without a left axis. */
.public-document-home-tree .public-document-content > :is(h2, hr) + ul {
    gap: 2px;
    padding-inline-start: 0;
    border-inline-start: 0;
}

.public-document-home-tree .public-document-content > :is(h2, hr) + ul > li {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
}

.public-document-tree-index {
    grid-column: 1;
    grid-row: 1;
    padding-block: var(--type-control-padding-block);
    color: var(--theme-text);
    font-size: var(--type-size-body);
    font-weight: 700;
    line-height: var(--type-leading-heading);
}

.public-document-tree-title {
    grid-column: 2;
    grid-row: 1;
    display: block;
    padding-block: var(--type-control-padding-block);
    color: var(--theme-text);
    font-size: var(--type-size-body);
    line-height: var(--type-leading-heading);
}

.public-document-tree-description {
    display: block;
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    text-align: start;
    overflow-wrap: break-word;
}

.public-document-outline .public-document-content li > ul {
    margin: var(--type-space-tight) 0 2px 14px;
    padding-inline-start: var(--type-space-content);
}

.public-document-outline .public-document-content li > ul strong {
    color: var(--theme-text);
}

/* Keep spacing under the final "Journal Reviewer" item in the JSP CV page
   without editing app_jsp template content directly. */
section > h5[style*="text-align: left;"]:last-of-type + div + ul {
    margin-bottom: var(--type-space-content);
}

.site-footer {
    width: 100%;
    min-height: var(--footer-height);
    max-width: var(--body-width-max);
    margin: auto;

    background-color: var(--footer-bg-color);
    padding: var(--footer-padding-vertical) var(--footer-padding-horizontal);
    border-top: var(--footer-boundary-width) solid var(--footer-boundary-color);
    box-sizing: border-box;

    text-align: left;
    user-select: none;
}

.site-footer p {
    font-size: var(--footer-font-size);
    color: var(--footer-font-color);
    line-height: var(--footer-font-spacing);
}

.site-footer .site-footer-copyright {
    margin: 0;
    font-size: var(--code-display-font-size);
}

.site-footer-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 8px 0 0;
    font-family: inherit;
    font-size: var(--code-display-font-size);
}

.site-footer-visits {
    margin: 0;
    color: var(--theme-text-muted) !important;
    font-family: inherit;
    font-size: var(--code-display-font-size) !important;
    text-align: right;
}

.site-footer-visits strong {
    color: var(--footer-font-color);
    font-weight: 700;
}

.site-footer-auth-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--footer-font-color);
    font: inherit;
    font-size: var(--code-display-font-size);
    line-height: var(--footer-font-spacing);
    text-decoration: none;
    cursor: pointer;
}

.site-footer-auth-link:hover,
.site-footer-auth-link:focus-visible {
    text-decoration: underline;
}

.site-footer-auth-link::before {
    content: "|";
    display: inline-block;
    margin-right: 12px;
    color: var(--theme-text-muted);
    font-weight: 400;
    text-decoration: none;
}

.site-login-close-icon {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.site-login-dialog {
    width: min(330px, calc(100vw - 32px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 14px 38px var(--theme-shadow);
    box-sizing: border-box;
    font-size: var(--type-size-body);
}

.site-login-dialog::backdrop {
    background: var(--theme-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.site-login-dialog[open] {
    animation: site-login-enter 140ms ease-out;
}

.site-login-panel {
    position: relative;
    padding: var(--type-space-content, 12px);
}

.site-login-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--theme-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.site-login-close:hover,
.site-login-close:focus-visible {
    background: var(--theme-surface-hover);
    color: var(--theme-text);
}

.site-login-close:focus-visible,
.site-login-dialog input:focus-visible,
.site-login-dialog select:focus-visible,
.site-login-dialog textarea:focus-visible,
.site-auth-switch:focus-visible,
.site-login-submit:focus-visible,
.site-account-delete-button:focus-visible {
    outline: 2px solid var(--theme-link);
    outline-offset: 2px;
}

.site-login-panel > h2 {
    margin: 0 32px 12px 0;
    color: var(--theme-text);
    font-size: var(--type-size-content-title);
    line-height: var(--type-leading-heading);
}

.site-login-dialog form {
    display: grid;
    gap: var(--type-space-tight);
    margin: 0;
}

.site-login-dialog form[hidden] {
    display: none;
}

.site-login-dialog label {
    margin-top: var(--type-space-tight);
    color: var(--theme-text);
    font-size: var(--type-size-body);
    font-weight: 700;
}

.site-login-dialog label span {
    color: var(--theme-text-muted);
    font-weight: 400;
}

.site-login-dialog label .site-auth-inline-help {
    font-size: var(--type-size-small);
}

.site-login-dialog .site-login-persistence {
    display: flex;
    align-items: flex-start;
    gap: var(--type-space-compact);
    margin: var(--type-space-tight) 0 0;
    font-size: var(--type-size-small);
    font-weight: 400;
    line-height: var(--type-leading-reading);
    cursor: pointer;
}

.site-login-dialog .site-login-persistence input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--theme-primary-action);
}

.site-login-dialog .site-login-persistence span {
    color: var(--theme-text);
}

.site-login-dialog input[type="text"],
.site-login-dialog input[type="email"],
.site-login-dialog input[type="password"],
.site-login-dialog select {
    width: 100%;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 5px;
    background: var(--theme-bg);
    color: var(--theme-text);
    font-size: var(--type-size-body);
    box-sizing: border-box;
}

#site-login-email::placeholder {
    color: var(--theme-text-muted);
    opacity: 1;
}

.site-login-dialog textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    padding: 6px 8px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 5px;
    background: var(--theme-bg);
    color: var(--theme-text);
    font-size: var(--code-display-font-size);
    line-height: 1.4;
    box-sizing: border-box;
}

.site-auth-help {
    margin: 1px 0 3px;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: 1.4;
}

.site-auth-help strong {
    color: var(--theme-text);
}

.site-login-error {
    margin: 5px 0 0;
    padding: 6px 8px;
    border-radius: 3px;
    background: var(--theme-error-bg);
    color: var(--theme-error-text);
    font-size: var(--type-size-small);
    line-height: 1.4;
}

.site-login-error[hidden] {
    display: none;
}

.site-login-submit {
    min-height: 0;
    margin-top: 7px;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--box-blue);
    border-radius: 3px;
    background: var(--box-blue);
    color: var(--theme-primary-action-text);
    font-size: var(--type-size-body);
    font-weight: 700;
    cursor: pointer;
}

.site-login-submit:hover:not(:disabled),
.site-login-submit:focus-visible:not(:disabled) {
    border-color: var(--theme-primary-action-hover);
    background: var(--theme-primary-action-hover);
    color: var(--theme-primary-action-text);
}

.site-login-submit:disabled {
    cursor: wait;
    opacity: 0.7;
}

.site-auth-switch {
    display: block;
    width: fit-content;
    margin: 8px auto 0;
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 0;
    background: transparent;
    color: var(--theme-link);
    font-size: var(--type-size-small);
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.site-auth-switch:hover,
.site-auth-switch:focus-visible {
    text-decoration: underline;
}

.site-auth-switch:disabled {
    color: var(--theme-text-muted);
    cursor: not-allowed;
    opacity: 0.75;
    text-decoration: none;
}

.site-signup-dialog {
    width: min(760px, calc(100vw - 32px));
}

.site-privacy-notice {
    margin-top: var(--type-space-content);
    padding: var(--type-space-content);
    border: 1px solid var(--theme-border-soft);
    border-radius: 4px;
    background: var(--theme-surface-muted);
}

.site-account-section h3 {
    margin: 0 0 var(--type-space-content);
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    line-height: var(--type-leading-heading);
}

.site-privacy-notice h3 {
    margin: 0 0 var(--type-space-compact);
    color: var(--theme-text-strong);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-privacy-notice p {
    margin: 0;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-signup-privacy-summary {
    display: grid;
    gap: var(--type-space-tight);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-signup-privacy-summary > li {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: start;
    column-gap: var(--type-space-content);
    min-width: 0;
    margin: 0;
    padding: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-signup-privacy-summary > li > strong {
    color: var(--theme-text);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-privacy-notice .site-signup-privacy-link {
    margin-top: var(--type-space-content);
}

.site-signup-privacy-link a {
    white-space: nowrap;
}

.site-transient-notice {
    position: fixed;
    z-index: 1200;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
    margin-inline: auto;
    padding: 8px 10px;
    width: min(440px, calc(100vw - 32px));
    border: 1px solid var(--theme-warning-text);
    border-radius: 4px;
    background: var(--theme-warning-bg);
    color: var(--theme-warning-text);
    box-shadow: 0 4px 12px var(--theme-shadow);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
    white-space: pre-line;
    overflow-wrap: anywhere;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.site-transient-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-login-dialog label.site-privacy-consent,
.site-login-dialog label.site-account-delete-confirm {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: var(--type-space-compact);
    margin-top: var(--type-space-compact);
    font-size: var(--type-size-small);
    font-weight: 400;
    line-height: var(--type-leading-reading);
}

.site-privacy-consent input,
.site-account-delete-confirm input {
    margin: 3px 0 0;
}

.site-account-dialog {
    width: min(520px, calc(100vw - 32px));
}

.site-account-section {
    margin: 0;
}

.site-account-section + .site-account-section {
    margin-top: var(--type-space-page);
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-standard);
}

.site-account-app-access {
    margin-top: var(--type-space-page);
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-standard);
}

.site-account-app-access form {
    gap: 0;
}

.site-account-app-access form + form {
    border-top: 1px solid var(--theme-divider-standard);
}

.site-login-dialog .site-account-app-access-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--type-space-content);
    margin: 0;
    padding-block: var(--type-space-compact);
    font-size: var(--type-size-body);
    cursor: pointer;
}

.site-account-app-access-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.site-account-app-access-copy > strong {
    color: var(--theme-text);
    line-height: var(--type-leading-ui);
}

.site-account-app-access-copy > span {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-account-app-access-row input[role="switch"] {
    position: relative;
    box-sizing: border-box;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--theme-border-strong);
    border-radius: 10px;
    appearance: none;
    background: var(--theme-surface-muted);
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.site-account-app-access-row input[role="switch"]::before {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--theme-text-muted);
    content: "";
    transition: transform 120ms ease, background-color 120ms ease;
}

.site-account-app-access-row input[role="switch"]:checked {
    border-color: var(--theme-primary-action);
    background: var(--theme-primary-action);
    color: var(--theme-primary-action-text);
}

.site-account-app-access-row input[role="switch"]:checked::before {
    background: var(--theme-primary-action-text);
    transform: translateX(16px);
}

.site-account-app-access-row input[role="switch"]:focus-visible {
    outline: 2px solid var(--theme-link);
    outline-offset: 2px;
}

.site-account-app-access-row input[role="switch"]:disabled {
    cursor: wait;
    opacity: 0.7;
}

.site-account-app-access .site-account-status {
    margin: 0 0 var(--type-space-compact);
}

.site-account-ai-settings {
    display: grid;
    gap: var(--type-space-content);
}

.site-account-ai-settings > form {
    gap: 0;
}

.site-account-ai-settings > form + form {
    padding-top: var(--type-space-content);
    border-top: 1px solid var(--theme-divider-standard);
}

.site-account-ai-policy {
    display: grid;
    gap: var(--type-space-tight);
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.site-account-ai-policy legend {
    padding: 0;
    color: var(--theme-text);
    font-size: var(--type-size-body);
    font-weight: 700;
    line-height: var(--type-leading-ui);
}

.site-account-ai-policy select {
    min-width: 0;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid var(--theme-border-soft);
    border-radius: 5px;
    background: var(--theme-bg);
    color: var(--theme-text);
    font: inherit;
    box-sizing: border-box;
}

.site-account-ai-policy select:disabled {
    color: var(--theme-text-muted);
    cursor: wait;
}

.site-account-ai-price-table {
    margin-top: var(--type-space-tight);
    padding: var(--type-space-content);
    border: 1px solid var(--theme-divider-soft);
    border-radius: 4px;
    background: var(--theme-surface-muted);
    color: var(--theme-text);
}

.site-account-ai-price-table[hidden] {
    display: none;
}

.site-account-ai-price-table > strong {
    display: block;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-account-ai-price-table dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--type-space-tight);
    margin: var(--type-space-tight) 0 0;
}

.site-account-ai-price-table dl > div {
    min-width: 0;
}

.site-account-ai-price-table dt,
.site-account-ai-price-table dd {
    margin: 0;
}

.site-account-ai-price-table dt {
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-account-ai-price-table dd {
    margin-top: 1px;
    color: var(--theme-text);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
    overflow-wrap: anywhere;
}

.site-account-server-health {
    display: grid;
    gap: var(--type-space-content);
}

.site-server-health-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--type-space-content);
}

.site-server-health-heading > div {
    min-width: 0;
}

.site-server-health-heading .site-auth-help {
    margin-bottom: 0;
}

.site-server-health-refresh {
    flex: 0 0 auto;
    margin: 0;
}

.site-server-health-status {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-account-server-health[data-state="normal"] .site-server-health-status {
    color: var(--theme-success);
}

.site-account-server-health[data-state="watch"] .site-server-health-status {
    color: var(--theme-warning-text);
}

.site-account-server-health[data-state="critical"] .site-server-health-status,
.site-account-server-health[data-state="unavailable"] .site-server-health-status {
    color: var(--theme-error-text);
}

.site-server-health-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--type-space-compact);
}

.site-server-health-card {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: var(--type-space-compact);
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
    background: var(--theme-surface-muted);
}

.site-server-health-card > strong {
    color: var(--theme-text);
    font-size: var(--type-size-small);
    font-weight: 700;
    line-height: var(--type-leading-ui);
}

.site-server-health-card > span {
    overflow-wrap: anywhere;
    color: var(--theme-text-strong);
    font-size: var(--type-size-section-title);
    font-variant-numeric: tabular-nums;
    line-height: var(--type-leading-heading);
}

.site-server-health-card > small {
    overflow-wrap: anywhere;
    color: var(--theme-text-muted);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-server-health-card-status {
    font-weight: 700;
}

.site-server-health-ai-success-rate {
    color: var(--theme-success) !important;
    font-size: var(--type-size-body) !important;
    font-weight: 700;
}

.site-server-health-ai-success-rate[data-state="warning"] {
    color: var(--theme-warning-text) !important;
}

.site-server-health-ai-success-rate[data-state="risk"],
.site-server-health-ai-success-rate[data-state="unavailable"] {
    color: var(--theme-error-text) !important;
}

.site-server-health-card-threshold {
    font-size: calc(var(--type-size-small) * 0.92) !important;
}

.site-server-health-card[data-health-state="normal"] .site-server-health-card-status {
    color: var(--theme-success);
}

.site-server-health-card[data-health-state="warning"] .site-server-health-card-status {
    color: var(--theme-warning-text);
}

.site-server-health-card[data-health-state="risk"] .site-server-health-card-status,
.site-server-health-card[data-health-state="unavailable"] .site-server-health-card-status {
    color: var(--theme-error-text);
}

.site-server-health-trends {
    display: grid;
    gap: var(--type-space-compact);
}

.site-server-health-trends h4 {
    margin: 0;
    color: var(--theme-text);
    font-size: var(--type-size-body);
    line-height: var(--type-leading-heading);
}

.site-server-health-trends .site-auth-help {
    margin: 0;
}

.site-server-health-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--type-space-compact);
}

.site-server-health-charts figure {
    min-width: 0;
    margin: 0;
    padding: var(--type-space-compact);
    border: 1px solid var(--theme-divider-standard);
    border-radius: 6px;
    background: var(--theme-surface);
}

.site-server-health-charts figcaption {
    margin-bottom: var(--type-space-tight);
    overflow-wrap: anywhere;
    color: var(--theme-text);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-ui);
}

.site-server-health-charts canvas {
    display: block;
    width: 100%;
    height: 80px;
    cursor: crosshair;
}

.site-server-health-charts canvas:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.site-account-status {
    margin: var(--type-space-compact) 0 0;
    color: var(--theme-success);
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-account-status.is-unavailable {
    color: var(--theme-error-text);
}

.site-account-status[hidden] {
    display: none;
}

.site-account-danger p {
    margin: 0;
    font-size: var(--type-size-small);
    line-height: var(--type-leading-reading);
}

.site-account-danger p + p {
    margin-top: var(--type-space-compact);
}

.site-account-delete-button {
    width: fit-content;
    margin-top: var(--type-space-compact);
    padding-block: var(--type-control-padding-block);
    padding-inline: var(--type-control-padding-inline);
    border: 1px solid var(--theme-error-text);
    border-radius: 4px;
    background: transparent;
    color: var(--theme-error-text);
    font-family: var(--body-font);
    font-size: var(--type-size-body);
    line-height: var(--type-leading-ui);
    cursor: pointer;
}

.site-account-delete-button:hover,
.site-account-delete-button:focus-visible {
    border-color: var(--theme-error-text);
    background: var(--theme-error-surface);
    color: var(--theme-error-text);
}

@keyframes site-login-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .site-login-dialog {
        width: min(330px, calc(100vw - 20px));
        max-height: calc(100dvh - 20px);
    }

    .site-login-panel {
        padding: var(--type-space-content, 12px);
    }

    .site-signup-dialog,
    .site-account-dialog {
        width: min(420px, calc(100vw - 20px));
    }

    .site-signup-privacy-summary > li {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2px;
    }

    .site-signup-privacy-link a {
        white-space: normal;
    }

    .site-server-health-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .site-server-health-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .site-server-health-refresh {
        align-self: flex-start;
    }

    .site-server-health-cards {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-transient-notice {
        transition: none;
    }

    .site-login-dialog[open] {
        animation: none;
    }
}

html {
    overflow-y: scroll;
}
