/* H-ED Files — a steel filing drawer of grey report forms in manila folders.
   Loaded only on files.html, after site.css; tokens come from site.css.
   Motion is stepped (steps()) like cutout animation. The only glow is the
   non-terrestrial tab's Zogarium dot. prefers-reduced-motion and the site's
   motion switch are handled by site.css's global rules, which cut every
   animation here to its end frame. Class names are page-local (.case, not
   the home page's .dossier). */

.files-page {
  --manila: #E6CD93;
  --manila-deep: #D2B272;
  --steel: #66717D;
  --steel-dark: #3C444E;
  --steel-light: #A7B0B9;
  --form: #E4E6E1;
  --form-box: rgba(255, 255, 255, .42);
  --form-line: #8D969E;
  --form-label: #45505B;
  --typed: #1B1B1F;
  --graphite: #45454D;
  --lime-wash: rgba(179, 243, 92, .55);
}
.hed [hidden] { display: none !important; }

/* ---- intro ------------------------------------------------------------ */
.files-intro { padding-bottom: clamp(20px, 3vw, 40px); }
.files-hero { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; }
.files-copy .lede { max-width: 34rem; }
.files-copy h1 { font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.8rem); }
.fiction-note { font-family: var(--f-form); font-size: .9rem; line-height: 1.45; max-width: 34rem; margin: 0; padding: 8px 12px; border-left: 4px solid var(--hed-red); background: rgba(255, 255, 255, .55); }
.files-art { margin: 0; position: relative; transform: rotate(1.4deg); }
.files-art img { width: 100%; box-shadow: var(--shadow-lift); }
.files-art::before, .files-art::after { content: ""; position: absolute; width: 96px; height: 26px; background: var(--tape) var(--grain); opacity: .92; z-index: 1; box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.files-art::before { top: -12px; left: 22px; transform: rotate(-7deg); }
.files-art::after { bottom: -12px; right: 26px; transform: rotate(5deg); }
@media (max-width: 820px) {
  .files-hero { grid-template-columns: 1fr; }
  .files-art { max-width: 520px; }
}
@media (max-width: 640px) { .files-art { display: none; } }

/* ---- clearance slip ---------------------------------------------------- */
.files-clear { margin-bottom: clamp(28px, 4vw, 48px); }
.clearance-slip { background: var(--paper) var(--grain); box-shadow: var(--shadow); padding: clamp(14px, 2.4vw, 24px); border-top: 6px solid var(--aubergine); }
.slip-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.slip-h { font-family: var(--f-form); font-weight: 700; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase; margin: 0; }
.slip-level { font-family: var(--f-form); font-size: .9rem; margin: 0; }
.slip-level b { font-size: 1.05rem; }
.slip-say { font-size: .96rem; line-height: 1.5; margin: .5em 0 .9em; max-width: 44rem; }
.books-read { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bk { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 8px; min-height: 52px; height: 100%; padding: 8px 10px; background: #FFFDF7 var(--grain); border: 2px solid var(--aubergine); cursor: pointer; box-shadow: -3px 3px 0 rgba(29, 10, 57, .8); }
.bk input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bk .box { width: 20px; height: 20px; border: 2px solid var(--aubergine); background: #fff; position: relative; }
.bk-n { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; }
/* the ": " in each tile's name: read aloud, never drawn. Inline and zero-size on
   purpose (an absolutely positioned hider adds a stray space before the colon). */
.bk-sep { font-size: 0; clip-path: inset(50%); }
.bk-t { grid-column: 1 / -1; font-size: .86rem; line-height: 1.25; }
.bk:hover { background-color: var(--pink-tint); }
.bk:has(input:checked) { background-color: var(--lime); }
.bk input:checked + .box { background: var(--aubergine); }
.bk input:checked + .box::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--lime); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.bk input:focus-visible + .box { outline: 3px solid var(--pink); outline-offset: 2px; }
.bk:has(input:focus-visible) { outline: 3px solid var(--aubergine); outline-offset: 3px; }
.slip-status { font-family: var(--f-form); font-size: .88rem; margin: 0; color: var(--muted); }
.slip-status:not(:empty) { margin-top: 10px; }
.slip-nojs { font-family: var(--f-form); font-size: .95rem; margin: 0; }
@media (max-width: 640px) {
  .bk { grid-template-columns: 1fr; justify-items: center; padding: 6px 4px; gap: 4px; min-height: 64px; }
  .bk-t { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---- the cabinet ------------------------------------------------------- */
.cabinet { background: var(--steel) var(--grain); padding: 12px clamp(6px, 1.6vw, 18px) clamp(10px, 2vw, 20px); box-shadow: var(--shadow-lift); border-radius: 4px; border-top: 4px solid var(--steel-light); }
.drawer-front { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding: 6px 6px 16px; }
.label-holder { background: var(--steel-light); padding: 5px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--steel-dark), 2px 3px 0 rgba(0, 0, 0, .25); max-width: 100%; }
.label-card { margin: 0; background: var(--paper) var(--grain); font-family: var(--f-form); font-weight: 700; font-size: clamp(.78rem, .72rem + .3vw, .95rem); letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; padding: 7px 14px; }
.handle { display: block; width: clamp(110px, 18vw, 170px); height: 22px; border-radius: 11px; background: var(--steel-light); box-shadow: inset 0 -5px 0 #8B95A0, 0 5px 0 var(--steel-dark); margin-right: 6px; }
@media (max-width: 560px) {
  .drawer-front { flex-direction: column; justify-content: center; text-align: center; }
  .handle { margin: 0 0 6px; }
}
.drawer { background: var(--steel-dark) var(--grain); padding: clamp(14px, 2.4vw, 26px) clamp(10px, 2vw, 22px) clamp(18px, 2.6vw, 28px); border-radius: 2px; box-shadow: inset 0 12px 0 rgba(0, 0, 0, .22); color: var(--mint); }

/* Kind filter: radio buttons dressed as manila divider tabs. Works without
   JavaScript through :has(); browsers without :has() get the script. */
.kind-filter { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
.kind-filter legend { font-family: var(--f-form); font-weight: 700; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mint); padding: 0; margin: 0 0 8px; }
.kind-tabs { display: flex; flex-wrap: wrap; gap: 10px 6px; padding-top: 4px; }
.kind-tabs input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kind-tabs label { display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: 8px 14px 7px; background: var(--manila-deep) var(--grain); color: var(--ink); font-family: var(--f-form); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border-radius: 7px 7px 0 0; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.kind-tabs label:hover { background-color: var(--manila); }
.kind-tabs .n { font-weight: 400; opacity: .75; }
.kind-tabs input:checked + label { background-color: var(--paper); transform: translateY(-5px); box-shadow: 0 9px 0 rgba(0, 0, 0, .32); }
.kind-tabs input:checked + label .n { opacity: 1; }
.kind-tabs input:focus-visible + label { outline: 4px solid var(--pink); outline-offset: 3px; }
.kind-tabs .t-non-terrestrial::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--zogarium); box-shadow: 0 0 8px var(--zogarium); }

.drawer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 14px 0 0; }
.blurbs { flex: 1 1 18rem; }
.kind-blurb { display: none; margin: 0; font-family: var(--f-form); font-size: .88rem; line-height: 1.45; color: var(--mint); }
.kind-blurb[data-for="all"] { display: block; }
.drawer:has(.kind-tabs input:not(#kind-all):checked) .kind-blurb[data-for="all"] { display: none; }
.drawer:has(#kind-subject:checked) .kind-blurb[data-for="subject"],
.drawer:has(#kind-asset:checked) .kind-blurb[data-for="asset"],
.drawer:has(#kind-object:checked) .kind-blurb[data-for="object"],
.drawer:has(#kind-location:checked) .kind-blurb[data-for="location"],
.drawer:has(#kind-non-terrestrial:checked) .kind-blurb[data-for="non-terrestrial"] { display: block; }
.drawer:has(#kind-subject:checked) .case:not([data-kind="subject"]),
.drawer:has(#kind-asset:checked) .case:not([data-kind="asset"]),
.drawer:has(#kind-object:checked) .case:not([data-kind="object"]),
.drawer:has(#kind-location:checked) .case:not([data-kind="location"]),
.drawer:has(#kind-non-terrestrial:checked) .case:not([data-kind="non-terrestrial"]) { display: none; }

.open-all-row { margin: 0; }
.open-all { min-height: 44px; padding: 8px 16px; border: 2px solid var(--manila); background: transparent; color: var(--manila); font-family: var(--f-form); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; --focus: var(--pink); }
.open-all:hover { background: var(--manila); color: var(--ink); }
.open-all:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

/* The key, along the top of the drawer. */
.key { margin: 16px 0 0; padding: 12px 0 0; border-top: 1px dashed rgba(226, 253, 222, .3); font-family: var(--f-form); font-size: .78rem; line-height: 1.45; color: #CFE6CB; }
.key-h { font-family: var(--f-form); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mint); margin: 0 0 8px; }
.key-marks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr)); gap: 8px 22px; }
.key-marks li { display: flex; align-items: center; gap: 9px; }
.k-sym { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; }
.k-txt { flex: 1 1 auto; min-width: 0; }
.key-note { margin: 8px 0 0; max-width: 62rem; }
.k-bar { background: var(--redact); color: transparent; font-size: .8rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.key .unlock-tag { margin: 0; color: #FF8A78; }
.k-lime { background: var(--lime); color: var(--ink); padding: 0 .35em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.k-cp, .k-drb { font-family: var(--f-marker); font-size: .95rem; }
.k-cp { color: #FF8A78; }
.k-drb { color: #C9CDD4; }

.drawer-end { margin: 34px 0 0; text-align: center; font-family: var(--f-form); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--steel-light); }

/* ---- the files -------------------------------------------------------- */
.files-grid { list-style: none; margin: 0; padding: 44px 0 0; display: grid; gap: 54px clamp(16px, 2.2vw, 26px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; color: var(--typed); }
.case { display: flex; min-width: 0; --tab-x: 0%; --tilt: -.45deg; }
.case:nth-child(3n + 2) { --tilt: .35deg; }
.case:nth-child(3n) { --tilt: -.2deg; }
.k-subject { --tab-x: 0%; }
.k-asset { --tab-x: 13%; }
.k-object { --tab-x: 26%; }
.k-location { --tab-x: 39%; }
.k-non-terrestrial { --tab-x: 52%; }
.case:target .folder { outline: 4px solid var(--lime); outline-offset: 5px; }

/* The manila folder, with its tab. */
.folder { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--manila) var(--grain); padding: 9px 9px 11px; box-shadow: 4px 6px 0 rgba(0, 0, 0, .35); transform: rotate(var(--tilt)); }
.tab { position: absolute; bottom: 100%; left: var(--tab-x); width: 48%; margin: 0; padding: 6px 10px 3px; background: var(--manila) var(--grain); border-radius: 8px 8px 0 0; font-family: var(--f-form); font-weight: 700; font-size: .7rem; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.k-non-terrestrial .tab::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--zogarium); box-shadow: 0 0 7px var(--zogarium), 0 0 2px var(--zogarium); }

/* The grey report form. */
.sheet { position: relative; flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; font-family: var(--f-form); color: var(--typed); background: var(--form) var(--grain); box-shadow: 1px 2px 0 rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.letterhead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--typed); font-size: .58rem; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; }
.letterhead b { font-family: var(--f-display); font-weight: 400; font-size: 1.65rem; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.head { position: relative; }
.head.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.meta { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0 0 4px; font-size: .68rem; letter-spacing: .08em; line-height: 1.5; text-transform: uppercase; color: var(--form-label); }
.meta b { font-weight: 700; color: var(--typed); }
.sheet .name, .envelope .name { font-family: var(--f-form); font-weight: 700; font-size: clamp(1.1rem, 1rem + .4vw, 1.28rem); letter-spacing: .04em; line-height: 1.15; text-transform: uppercase; margin: 6px 0 3px; overflow-wrap: anywhere; text-wrap: balance; }
.alias { margin: 0 0 2px; font-size: .8rem; line-height: 1.35; }
.filed { margin: 0 0 6px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--form-label); }
.status { margin: 4px 0 2px; }
.status .stamp { --rot: -4deg; font-size: .72rem; padding: 2px 8px; border-width: 3px; line-height: 1.3; transform: rotate(var(--rot)); max-width: 100%; }

/* Exhibits: photos clipped to the form. */
.exhibit { margin: 0; }
.exhibit .frame { display: block; position: relative; overflow: hidden; background: #D5DBE0; border: 5px solid #FBFBF8; box-shadow: 2px 3px 0 rgba(0, 0, 0, .28); }
.exhibit.night .frame { background: var(--night); }
.exhibit .frame img { position: absolute; max-width: none; height: auto; display: block; }
.exhibit figcaption { font-size: .6rem; letter-spacing: .06em; line-height: 1.3; text-transform: uppercase; margin-top: 5px; color: var(--form-label); }
.exhibit.portrait { width: clamp(84px, 24vw, 100px); transform: rotate(2.4deg); position: relative; margin-top: 2px; }
.exhibit.portrait::before { content: ""; position: absolute; z-index: 1; top: -10px; left: 50%; width: 12px; height: 30px; margin-left: -6px; border: 2px solid #8C949B; border-radius: 6px; }
.exhibit.landscape { margin: 10px 0 2px; transform: rotate(-.8deg); }
.exhibit.landscape .frame { width: 100%; }

/* Form boxes: two short ones share a row. */
.fields { margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--form-line); border-left: 1px solid var(--form-line); }
.field { grid-column: 1 / -1; min-width: 0; padding: 3px 8px 6px; border-right: 1px solid var(--form-line); border-bottom: 1px solid var(--form-line); background: var(--form-box); }
.field.half { grid-column: auto; }
.field dt { font-weight: 700; font-size: .62rem; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; color: var(--form-label); }
.field dd { margin: 1px 0 0; font-size: .88rem; line-height: 1.5; overflow-wrap: break-word; }
.field s { text-decoration-thickness: 2px; text-decoration-color: var(--graphite); }
.field a { text-decoration-color: var(--hed-red); }

/* Redaction bars. The bar hides the line, not its length. */
.bar { background: var(--redact); color: transparent; padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; user-select: none; line-height: 1.55; }
.unlock-tag { display: inline-block; margin-left: 6px; padding: 0 4px; border: 2px solid currentColor; color: var(--hed-red); font-family: var(--f-form); font-weight: 700; font-size: .6rem; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase; white-space: nowrap; vertical-align: 1px; }
.fields .secret { background-color: var(--lime-wash); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Declassify: the bar comes off in four hard steps, left to right. */
.fields .declassifying > .secret {
  background-image: linear-gradient(var(--redact), var(--redact));
  background-repeat: no-repeat;
  background-position: 100% 0;
  animation: bar-off .6s steps(4, jump-none) both;
}
@keyframes bar-off { from { background-size: 100% 100%; } to { background-size: 0% 100%; } }
/* Reclassify: the bar goes back on in three. */
.fields .reclassifying .bar { background-image: linear-gradient(var(--redact), var(--redact)); background-color: transparent; background-repeat: no-repeat; animation: bar-on .45s steps(3, jump-none) both; }
@keyframes bar-on { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* Margin notes. */
.note { margin: 12px 0 0; font-family: var(--f-marker); font-size: 1rem; line-height: 1.3; }
.note.by-cp { color: var(--hed-red); transform: rotate(-1.2deg); }
.note.by-drb { color: var(--graphite); font-size: .96rem; transform: rotate(.8deg); }
.note.by-dir { font-family: var(--f-form); font-weight: 700; font-size: .84rem; background: #FBFBF8; border-left: 4px solid var(--aubergine); padding: 7px 10px; box-shadow: 2px 3px 0 rgba(0, 0, 0, .2); transform: rotate(-.6deg); }
.note .sig { white-space: nowrap; }
.note[data-unlock]:not(.is-open) { display: none; }
.notes { display: grid; gap: 2px; }
.notes .declassifying > .secret { display: inline-block; animation: slip-in .42s steps(3, jump-none) both; }
@keyframes slip-in { from { transform: translateX(-14px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* The redaction strip on the cover: one chip per blacked-out line. */
.redactions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 0; padding-top: 10px; border-top: 1px dashed var(--form-line); }
.r-label { margin: 0; font-weight: 700; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--form-label); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.chip { min-width: 24px; height: 22px; padding: 0 5px; background: var(--redact); color: #EDEDE8; font-weight: 700; font-size: .72rem; line-height: 22px; text-align: center; }
.chip.is-open { background: var(--lime); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.chip.declassifying, .chip.reclassifying { animation: chip-flip .45s steps(3, jump-none) both; }
@keyframes chip-flip { from { transform: scaleY(.15) rotate(-10deg); } to { transform: none; } }
/* Fully cleared: DECLASSIFIED across the letterhead, where a stamp goes. */
.declass-stamp { display: none; position: absolute; z-index: 2; right: 8px; top: 10px; margin: 0; font-weight: 700; font-size: .86rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hed-red); border: 3px double var(--hed-red); padding: 3px 10px; background: rgba(240, 240, 236, .82); --rot: -7deg; transform: rotate(var(--rot)); pointer-events: none; }
.case.is-clear .declass-stamp { display: block; }
.case.just-cleared .declass-stamp,
.status .declassifying > .secret { animation: thunk .42s steps(3, jump-none) both; }
@keyframes thunk {
  from { transform: scale(1.9) rotate(-16deg); opacity: 0; }
  to { transform: scale(1) rotate(var(--rot, -4deg)); opacity: 1; }
}

/* Open the file: a pull strip across the foot of the form. */
.more { margin: 14px -16px -16px; }
.more > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; min-height: 48px; padding: 8px 16px; background: var(--aubergine); color: var(--mint); cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.pull { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.pull::before { content: ""; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid var(--lime); }
.more[open] .pull::before { transform: rotate(90deg); }
.more > summary:hover .pull { text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.count { font-size: .74rem; letter-spacing: .04em; color: var(--lime); }
.when-open { display: none; }
.more[open] .when-open { display: inline; }
.more[open] .when-closed { display: none; }
.more[open] > summary { box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.more-body { padding: 4px 16px 16px; }
.more-body .fields:first-child { margin-top: 14px; }
.close-row { margin: 14px 0 0; }
.close-file { min-height: 44px; padding: 6px 14px; border: 2px solid var(--typed); background: transparent; color: var(--typed); font-family: var(--f-form); font-weight: 700; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.close-file:hover { background: var(--typed); color: var(--form); }
.close-file:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* Memo (Pruitt): white typing paper, labels inline like a memo. */
.sheet.memo { background-color: var(--report); }
.memo .fields { display: block; border: 0; margin-top: 10px; }
.memo .field { border: 0; padding: 0; background: none; margin: 0 0 .5em; line-height: 1.45; }
.memo .field dd { line-height: 1.45; }
.memo .field dt { display: inline; font-size: .74rem; letter-spacing: .1em; color: var(--typed); }
.memo .field dt::after { content: ": "; }
.memo .field dd { display: inline; margin: 0; }
.memo .cover-fields { border-bottom: 2px solid var(--typed); padding-bottom: 6px; }

/* Sealed envelopes (whole file hidden until a book is read). */
.seal-lock { flex: 1; display: flex; flex-direction: column; }
.seal-lock > .secret { flex: 1; display: flex; flex-direction: column; }
.envelope { flex: 1; position: relative; min-height: 280px; display: flex; flex-direction: column; justify-content: flex-start; padding: 20px 18px 22px; font-family: var(--f-form); color: var(--ink); background: var(--manila-deep) var(--grain); box-shadow: inset 0 0 0 2px rgba(29, 10, 57, .12); overflow: hidden; }
.envelope::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; background: rgba(0, 0, 0, .07); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.envelope > * { position: relative; }
.envelope .meta { color: var(--ink); }
.envelope .meta b { color: var(--ink); }
.envelope .name { font-size: 1.3rem; margin-top: 18px; }
.seal-say { font-size: .9rem; line-height: 1.45; max-width: 22rem; margin: 6px 0 0; }
.seal-button { margin: auto 0 0; padding-top: 18px; display: flex; align-items: center; gap: 10px; }
.seal-button .stamp { --rot: -5deg; transform: rotate(var(--rot)); font-size: .9rem; }
.seal-button .unlock-tag { margin-left: 0; }
.seal-lock.declassifying > .secret { animation: unseal .5s steps(3, jump-none) both; }
@keyframes unseal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.seal-lock.reclassifying > .envelope { animation: unseal .5s steps(3, jump-none) both; }

@media (max-width: 420px) {
  .files-grid { gap: 50px 0; }
  .folder { padding: 7px 7px 9px; }
  .tab { width: 60%; }
  .k-asset { --tab-x: 8%; }
  .k-object { --tab-x: 16%; }
  .k-location { --tab-x: 24%; }
  .k-non-terrestrial { --tab-x: 36%; }
  .sheet { padding: 12px 12px 14px; }
  .more { margin: 12px -12px -14px; }
  .more > summary { padding: 8px 12px; }
  .more-body { padding: 4px 12px 14px; }
}

@media (forced-colors: active) {
  .bar, .chip { background: CanvasText; color: Canvas; forced-color-adjust: none; }
  .chip.is-open { background: Canvas; color: CanvasText; border: 2px solid CanvasText; }
  .kind-tabs input:checked + label, .bk:has(input:checked) { outline: 3px solid Highlight; }
}
@media print {
  .clearance-slip, .kind-filter, .handle, .open-all-row, .close-row { display: none; }
  .folder, .sheet, .files-art, .note { transform: none; box-shadow: none; }
  .cabinet, .drawer { background: #fff; box-shadow: none; }
}
