/* The November Institute v1.6: Launch-control previews, the Open Laboratory (A, B) and experiments 016–018. */
.dwe-institute .dwni-preview-tag { display: inline-block; margin: 4px 0 0 6px; padding: 1px 8px; border-radius: 999px; background: rgba(242, 184, 160, .18); border: 1px dashed rgba(242, 184, 160, .7); color: var(--ni-warn); font: 700 11px/1.6 var(--ni-sans); letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
.dwe-institute .dwni-preview-note { margin-bottom: 12px; border-style: dashed; }

/* The Open Laboratory on the dashboard */
.dwe-institute .dwni-open__lead { margin: -6px 0 12px; }
.dwe-institute .dwni-open { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 28px; }
.dwe-institute .dwni-open__card {
	display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; padding: 14px 16px; text-align: left; cursor: pointer;
	border-radius: 16px; border: 1px solid rgba(169, 200, 232, .35); background: linear-gradient(160deg, rgba(31, 58, 90, .55), rgba(16, 22, 41, .8)); color: var(--ni-ivory); font: inherit;
	transition: transform .2s var(--ni-ease), border-color .2s;
}
.dwe-institute .dwni-open__card:hover, .dwe-institute .dwni-open__card:focus-visible { transform: translateY(-2px); border-color: var(--ni-blue); outline: none; }
.dwe-institute .dwni-open__art { grid-row: 1 / span 2; width: 72px; height: 72px; }
.dwe-institute .dwni-open__art svg { width: 100%; height: 100%; }
.dwe-institute .dwni-open__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dwe-institute .dwni-open__title { font-family: var(--ni-serif); font-size: 21px; line-height: 1.15; }
.dwe-institute .dwni-open__text .dwni-muted { font-size: 14px; line-height: 1.4; }
.dwe-institute .dwni-open__card .dwni-state { justify-self: start; }

/* A: The Annotator's Desk */
.dwe-institute .ol-desk { max-width: 760px; margin: 0 auto; }
.dwe-institute .ol-desk__paper { position: relative; min-height: 200px; padding: 26px 30px; border-radius: 6px; background: #efe6d2; color: #2b2418; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9); background-image: repeating-linear-gradient(transparent 0 33px, rgba(80, 110, 160, .22) 33px 34px); }
.dwe-institute .ol-desk__count { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #7a6a4c; }
.dwe-institute .ol-desk__line { margin: 0; font-family: var(--ni-serif); font-size: clamp(24px, 3vw, 32px); line-height: 1.3; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; }
.dwe-institute .ol-desk__line.is-shown { opacity: 1; transform: none; }
.dwe-institute .ol-desk__trays { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 10px; }
.dwe-institute .ol-tray { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border-radius: 12px; border: 1px solid rgba(197, 164, 109, .45); background: linear-gradient(180deg, #3a2c1a, #24190d); color: var(--ni-ivory); font: 700 18px/1.2 var(--ni-sans); cursor: pointer; }
.dwe-institute .ol-tray small { font-weight: 400; font-size: 13px; color: var(--ni-ivory-dim); }
.dwe-institute .ol-tray__key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--ni-gold); color: var(--ni-gold-hi); font-size: 13px; }
.dwe-institute .ol-tray:hover:not([disabled]), .dwe-institute .ol-tray:focus-visible { border-color: var(--ni-gold-hi); outline: none; }
.dwe-institute .ol-tray[disabled] { opacity: .5; cursor: default; }
.dwe-institute .ol-desk__bar { display: flex; justify-content: flex-end; }
.dwe-institute .ol-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; margin: 18px 0 6px; padding: 8px; border-radius: 10px; background: rgba(16, 22, 41, .6); }
.dwe-institute .ol-bar { flex: 1; min-width: 6px; border-radius: 3px 3px 0 0; background: var(--ni-purple); }
.dwe-institute .ol-bar.is-both { background: var(--ni-gold-hi); }
.dwe-institute .ol-bars__key { font-size: 13px; }

/* B: The Switched Card */
.dwe-institute .ol-switch { text-align: center; }
.dwe-institute .ol-pair { display: flex; justify-content: center; gap: clamp(14px, 4vw, 40px); margin: 14px 0; }
.dwe-institute .ol-card { width: min(40vw, 230px); padding: 8px; border-radius: 18px; border: 1px solid rgba(197, 164, 109, .4); background: #0b0f1e; cursor: pointer; transition: transform .25s var(--ni-ease), border-color .2s, opacity .4s; }
.dwe-institute .ol-card svg { display: block; width: 100%; height: auto; }
.dwe-institute .ol-card:hover:not([disabled]), .dwe-institute .ol-card:focus-visible { transform: translateY(-4px); border-color: var(--ni-gold-hi); outline: none; }
.dwe-institute .ol-card.is-picked { border-color: var(--ni-gold-hi); box-shadow: 0 0 24px -4px rgba(226, 199, 146, .6); }
.dwe-institute .ol-card[disabled]:not(.is-picked) { opacity: .35; }
.dwe-institute .ol-card--handed { margin: 8px auto 16px; cursor: default; }
.dwe-institute .ol-card--sm { width: 140px; cursor: default; }
.dwe-institute .ol-reasons { justify-content: center; }
.dwe-institute .ol-notmine { margin-top: 10px; }
.dwe-institute .ol-reveals { display: grid; gap: 14px; margin: 16px 0; }
.dwe-institute .ol-reveal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; padding: 12px; border-radius: 12px; background: rgba(16, 22, 41, .55); }
.dwe-institute .ol-reveal > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dwe-institute .ol-reveal p { flex: 1 1 200px; margin: 0; text-align: left; }

/* Shared reader (016, 017 return) */
.dwe-institute .nx-read { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 24px; align-items: center; min-height: 420px; }
.dwe-institute .nx-read__app:empty { display: none; }
.dwe-institute .nx-read__app:empty + .nx-read__main { grid-column: 1 / -1; }
.dwe-institute .nx-read__main { text-align: center; }
.dwe-institute .nx-read__line { font-family: var(--ni-serif); font-size: clamp(24px, 2.8vw, 32px); line-height: 1.35; max-width: 32em; margin: 0 auto .8em; opacity: 0; transition: opacity .9s; }
.dwe-institute .nx-read__line.is-shown { opacity: 1; }
.dwe-institute .nx-read__bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.dwe-institute .nx-check { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.dwe-institute .nx-check .dwni-option { min-width: 54px; justify-content: center; }
.dwe-institute .nx-ends { display: flex; justify-content: space-between; max-width: 340px; margin: 6px auto 0; font-size: 13px; color: var(--ni-ivory-dim); }

/* 016 the call stack */
.dwe-institute .nx-stack { padding: 14px; border-radius: 14px; background: #0b0f1e; border: 1px solid rgba(197, 164, 109, .3); font-family: ui-monospace, Menlo, Consolas, monospace; }
.dwe-institute .nx-stack__h { margin: 0 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ni-gold-hi); }
.dwe-institute .nx-stack__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 6px; min-height: 200px; }
.dwe-institute .nx-frame { display: flex; align-items: center; gap: 8px; margin-left: calc(var(--d) * 8px); padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(118, 100, 155, .6); background: rgba(36, 32, 68, .8); font-size: 13px; animation: nx-push .45s var(--ni-ease) both; }
.dwe-institute .nx-frame.is-top { border-color: var(--ni-gold-hi); box-shadow: 0 0 14px -4px rgba(226, 199, 146, .6); }
.dwe-institute .nx-frame.is-empty { border-style: dashed; color: var(--ni-ivory-dim); background: transparent; }
.dwe-institute .nx-frame__n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ni-purple); font-size: 11px; color: #fff; flex: none; }
.dwe-institute .nx-frame code { color: var(--ni-ivory); background: none; padding: 0; overflow-wrap: anywhere; }
.dwe-institute .nx-stack__depth { margin: 10px 0 0; font-size: 13px; color: var(--ni-ivory-dim); }
@keyframes nx-push { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 017 the infinite regress */
.dwe-institute .nx-level { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 24px; align-items: center; min-height: 400px; }
.dwe-institute .nx-level__art svg { width: 100%; height: auto; }
.dwe-institute .nx-level__main { text-align: center; }
.dwe-institute .nx-level__n { margin: 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ni-gold-hi); }
.dwe-institute .nx-tap { min-width: 180px; font-size: 18px; }
.dwe-institute .nx-level .dwni-timer { max-width: 360px; margin: 12px auto; }
.dwe-institute .nx-level .dwni-timer i { transform-origin: left; }
.dwe-institute .nx-regress rect { transition: stroke .6s; }

/* 018 the institute journal */
.dwe-institute .nx-journal { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.dwe-institute .nx-journal .nx-read__bar { grid-column: 1 / -1; justify-content: flex-end; }
.dwe-institute .nx-paper { padding: 26px 30px; border-radius: 4px; background: #f6f1e6; color: #1e1a14; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .9); }
.dwe-institute .nx-paper h3 { margin: 0 0 8px; font-family: var(--ni-serif); font-size: 26px; color: #1e1a14; }
.dwe-institute .nx-paper .dwni-muted { color: #6a5f4c; }
.dwe-institute .nx-paper__kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8a6d3e; }
.dwe-institute .nx-claim { position: relative; margin: 16px 0 18px; padding-left: 40px; font-family: var(--ni-serif); font-size: clamp(21px, 2.4vw, 26px); line-height: 1.35; }
.dwe-institute .nx-claim__n { position: absolute; left: 0; top: 2px; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #8a6d3e; font: 700 13px/1 var(--ni-sans); color: #8a6d3e; }
.dwe-institute .nx-verdicts { display: flex; flex-wrap: wrap; gap: 8px; }
.dwe-institute .nx-paper .dwni-option { background: #fff; color: #1e1a14; border-color: #c9b88f; }
.dwe-institute .nx-paper .dwni-option:hover, .dwe-institute .nx-paper .dwni-option:focus-visible { border-color: #8a6d3e; background: #fbf6ea; }
.dwe-institute .nx-ledger { padding: 14px 16px; border-radius: 10px; background: #1a1f33; border: 1px solid rgba(197, 164, 109, .35); font-size: 14px; }
.dwe-institute .nx-ledger__h { margin: 0 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ni-gold-hi); }
.dwe-institute .nx-ledger table { width: 100%; border-collapse: collapse; }
.dwe-institute .nx-ledger td { padding: 4px 4px; border-bottom: 1px solid rgba(197, 164, 109, .15); vertical-align: top; }
.dwe-institute .nx-ledger td:first-child { color: var(--ni-gold-hi); white-space: nowrap; }
.dwe-institute .nx-ledger td:last-child { text-align: right; }
.dwe-institute .nx-report { margin: 16px auto; max-width: 640px; padding: 20px 24px; border-radius: 4px; background: #f6f1e6; color: #1e1a14; text-align: left; }
.dwe-institute .nx-report h4 { margin: 0 0 8px; font-family: var(--ni-serif); font-size: 22px; color: #1e1a14; }
.dwe-institute .nx-report .dwni-muted { color: #6a5f4c; }

@media (max-width: 760px) {
	.dwe-institute .nx-read, .dwe-institute .nx-level, .dwe-institute .nx-journal { grid-template-columns: 1fr; }
	.dwe-institute .nx-stack__list { min-height: 0; }
	.dwe-institute .nx-level__art { max-width: 200px; margin: 0 auto; }
	.dwe-institute .ol-desk__trays { grid-template-columns: 1fr; }
	.dwe-institute .nx-paper, .dwe-institute .ol-desk__paper { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) { .dwe-institute .nx-frame { animation: none; } .dwe-institute .ol-desk__line, .dwe-institute .nx-read__line { transition: none; } }
.dwe-institute.is-calm .nx-frame { animation: none; }
@media print { .dwe-institute .nx-report { box-shadow: none; } }
