:root{--bg:#05050d;--panel:#0c0c18;--ink:#e8e4d8;--muted:#9992a0;--cyan:#00f5d4;--amber:#ffb347;--mag:#ff3ea5;--line:#1e1e32}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top,#111122,#05050d 60%,#030306);color:var(--ink);font-family:'Exo 2',system-ui,sans-serif;line-height:1.65;min-height:100vh;padding-bottom:96px}body:before{content:'';position:fixed;inset:0;pointer-events:none;background:repeating-linear-gradient(to bottom,transparent 0,transparent 3px,rgba(0,0,0,.14) 4px);z-index:1}a{color:inherit;text-decoration:none}.top{position:sticky;top:0;z-index:10;background:rgba(5,5,13,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.nav{max-width:1180px;margin:0 auto;padding:0 22px;height:64px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand{font-family:'Cinzel',serif;font-size:22px;font-weight:900;letter-spacing:2px}.brand span{color:var(--cyan)}.links{display:flex;gap:16px;flex-wrap:wrap}.links a{font-size:13px;color:var(--muted);font-weight:700}main{position:relative;z-index:2;max-width:1180px;margin:0 auto;padding:54px 22px}.eyebrow{font-family:'Share Tech Mono',monospace;color:var(--amber);letter-spacing:3px;font-size:12px;margin-bottom:12px}.h1{font-family:'Cinzel',serif;font-size:clamp(34px,6vw,64px);line-height:1;font-weight:900;margin:0 0 18px}.h1 span{color:var(--cyan)}.lead{max-width:820px;color:#b8b2c0;font-size:17px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:36px}.card{display:block;background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.005));border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 18px 60px rgba(0,0,0,.28);position:relative;overflow:hidden}.family{font-family:'Share Tech Mono',monospace;color:var(--cyan);letter-spacing:2px;font-size:10px;margin-bottom:8px;text-transform:uppercase}.title{font-family:'Cinzel',serif;font-size:20px;font-weight:700;line-height:1.2;margin-bottom:10px}.copy{color:var(--muted);font-size:14px}.stamp{display:inline-flex;margin-top:14px;padding:6px 9px;border-radius:4px;border:1px solid rgba(0,245,212,.28);font-family:'Share Tech Mono',monospace;font-size:10px;color:var(--cyan);letter-spacing:1px}.locked{opacity:.47;filter:grayscale(.65)}.locked .stamp{border-color:rgba(255,62,165,.35);color:var(--mag)}.doc{max-width:860px}.doc .card{margin-top:26px}.mono{font-family:'Share Tech Mono',monospace;color:var(--cyan);font-size:13px;white-space:pre-wrap}.redact{display:inline-block;background:#090910;border:1px solid #1e1e32;color:#111;border-radius:2px;min-width:110px;height:1.1em;vertical-align:-.15em}.meter-row{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:28px}.meter{background:#080814;border:1px solid var(--line);border-radius:12px;padding:16px}.meter label{display:flex;justify-content:space-between;color:var(--muted);font-family:'Share Tech Mono',monospace;font-size:10px;letter-spacing:1px}.track{height:8px;background:#111128;border-radius:12px;overflow:hidden;margin-top:10px}.fill{height:100%;background:linear-gradient(90deg,var(--cyan),var(--amber),var(--mag));width:40%;transition:width .6s ease}.readout{font-family:'Share Tech Mono',monospace;color:var(--cyan);font-size:22px;margin-top:8px}@media(max-width:850px){.grid,.meter-row{grid-template-columns:1fr}.links{display:none}}

/* ============================================================
   Compendium public fallback card grid
   Keeps subject records visible if the lens renderer misbehaves,
   because apparently one missing script can eat an entire archive.
   ============================================================ */

.fn-compendium-public-grid-shell{
  max-width: 1160px;
  margin: 1.4rem auto 4rem;
  padding: 0 1rem;
}

.fn-compendium-grid,
#fnCompendiumGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
}

.fn-fallback-subject-card{
  border:1px solid rgba(0,255,255,.22);
  border-radius:18px;
  padding:1rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(0,255,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(10,20,38,.92), rgba(8,10,22,.96));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 18px rgba(0,255,255,.08),
    0 12px 26px rgba(0,0,0,.32);
}

.fn-fallback-subject-card .fn-fallback-kicker{
  color:#ffd166;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.68rem;
  margin-bottom:.45rem;
}

.fn-fallback-subject-card h2{
  margin:.1rem 0 .55rem;
  color:#f4feff;
  font-size:1.25rem;
  line-height:1.05;
}

.fn-fallback-subject-card p{
  color:#aeb8c8;
  line-height:1.45;
  margin:0 0 .85rem;
}

.fn-fallback-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.58rem .8rem;
  border-radius:999px;
  color:#031014;
  background:linear-gradient(135deg, #00f5ff, #ffd166);
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.7rem;
  font-weight:900;
}

.fn-fallback-empty{
  grid-column:1 / -1;
  padding:1rem;
  border:1px solid rgba(255,209,102,.22);
  border-radius:18px;
  color:#ffd166;
  background:rgba(255,209,102,.06);
  letter-spacing:.12em;
  text-transform:uppercase;
}

/* ============================================================
   Compendium public subject card recovery layer
   ============================================================ */

.fn-compendium-public-grid-shell{
  max-width: 1160px;
  margin: 1.4rem auto 4rem;
  padding: 0 1rem;
}

.fn-compendium-grid,
#fnCompendiumGrid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
}

.fn-fallback-subject-card,
.fn-subject-card{
  border:1px solid rgba(0,255,255,.22);
  border-radius:18px;
  padding:1rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(0,255,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(10,20,38,.92), rgba(8,10,22,.96));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 18px rgba(0,255,255,.08),
    0 12px 26px rgba(0,0,0,.32);
}

.fn-public-card-image{
  height:150px;
  margin:-.25rem -.25rem .85rem;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(0,255,255,.16);
  background:rgba(0,0,0,.35);
}

.fn-public-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fn-fallback-subject-card .fn-fallback-kicker,
.fn-subject-card .fn-fallback-kicker{
  color:#ffd166;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.68rem;
  margin-bottom:.45rem;
}

.fn-fallback-subject-card h2,
.fn-subject-card h2{
  margin:.1rem 0 .55rem;
  color:#f4feff;
  font-size:1.25rem;
  line-height:1.05;
}

.fn-fallback-subject-card p,
.fn-subject-card p{
  color:#aeb8c8;
  line-height:1.45;
  margin:0 0 .85rem;
}

.fn-fallback-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.58rem .8rem;
  border-radius:999px;
  color:#031014;
  background:linear-gradient(135deg, #00f5ff, #ffd166);
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.7rem;
  font-weight:900;
}

.fn-fallback-empty{
  grid-column:1 / -1;
  padding:1rem;
  border:1px solid rgba(255,209,102,.22);
  border-radius:18px;
  color:#ffd166;
  background:rgba(255,209,102,.06);
  letter-spacing:.12em;
  text-transform:uppercase;
}

/* ============================================================
   Compendium / Subjects public record recovery grid
   ============================================================ */

.fn-compendium-public-grid-shell{
  max-width: 1160px;
  margin: 1.4rem auto 4rem;
  padding: 0 1rem;
}

.fn-compendium-grid,
#fnCompendiumGrid,
#subjectsGrid,
#compendiumGrid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
}

.fn-fallback-subject-card,
.fn-subject-card{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  border:1px solid rgba(0,255,255,.22);
  border-radius:18px;
  padding:1rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(0,255,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(10,20,38,.92), rgba(8,10,22,.96));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 18px rgba(0,255,255,.08),
    0 12px 26px rgba(0,0,0,.32);
}

.fn-fallback-subject-card .fn-fallback-kicker,
.fn-subject-card .fn-fallback-kicker{
  color:#ffd166;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.68rem;
  margin-bottom:.45rem;
}

.fn-fallback-subject-card h2,
.fn-subject-card h2{
  margin:.1rem 0 .55rem;
  color:#f4feff;
  font-size:1.25rem;
  line-height:1.05;
}

.fn-fallback-subject-card p,
.fn-subject-card p{
  color:#aeb8c8;
  line-height:1.45;
  margin:0 0 .85rem;
}

.fn-fallback-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.58rem .8rem;
  border-radius:999px;
  color:#031014;
  background:linear-gradient(135deg, #00f5ff, #ffd166);
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.7rem;
  font-weight:900;
}

.fn-fallback-empty{
  grid-column:1 / -1;
  padding:1rem;
  border:1px solid rgba(255,209,102,.22);
  border-radius:18px;
  color:#ffd166;
  background:rgba(255,209,102,.06);
  letter-spacing:.12em;
  text-transform:uppercase;
}

/* ============================================================
   SubstrateNet personnel cross-index record recovery grid
   ============================================================ */

.fn-compendium-public-grid-shell{
  max-width: 1160px;
  margin: 1.4rem auto 4rem;
  padding: 0 1rem;
}

.fn-compendium-grid,
#fnCompendiumGrid,
#subjectsGrid,
#compendiumGrid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:1rem;
}

.fn-fallback-subject-card,
.fn-subject-card{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  border:1px solid rgba(0,255,255,.22);
  border-radius:18px;
  padding:1rem;
  background:
    radial-gradient(circle at 15% 0%, rgba(0,255,255,.08), transparent 36%),
    linear-gradient(180deg, rgba(10,20,38,.92), rgba(8,10,22,.96));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 18px rgba(0,255,255,.08),
    0 12px 26px rgba(0,0,0,.32);
}

.fn-fallback-subject-card .fn-fallback-kicker,
.fn-subject-card .fn-fallback-kicker{
  color:#ffd166;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.68rem;
  margin-bottom:.45rem;
}

.fn-fallback-subject-card h2,
.fn-subject-card h2{
  margin:.1rem 0 .55rem;
  color:#f4feff;
  font-size:1.25rem;
  line-height:1.05;
}

.fn-fallback-subject-card p,
.fn-subject-card p{
  color:#aeb8c8;
  line-height:1.45;
  margin:0 0 .85rem;
}

.fn-fallback-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.58rem .8rem;
  border-radius:999px;
  color:#031014;
  background:linear-gradient(135deg, #00f5ff, #ffd166);
  text-decoration:none;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.7rem;
  font-weight:900;
}

.fn-fallback-empty{
  grid-column:1 / -1;
  padding:1rem;
  border:1px solid rgba(255,209,102,.22);
  border-radius:18px;
  color:#ffd166;
  background:rgba(255,209,102,.06);
  letter-spacing:.12em;
  text-transform:uppercase;
}

/* ============================================================
   Compendium card image restoration
   ============================================================ */

.fn-public-card-image{
  height:170px;
  margin:-.25rem -.25rem .85rem;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(0,255,255,.18);
  background:
    radial-gradient(circle at 50% 20%, rgba(0,255,255,.10), transparent 42%),
    linear-gradient(180deg, rgba(5,10,20,.95), rgba(10,14,28,.98));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.035),
    0 0 14px rgba(0,255,255,.08);
}

.fn-public-card-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.fn-public-card-image-missing{
  display:flex;
  align-items:center;
  justify-content:center;
}

.fn-public-card-image-missing span{
  color:rgba(0,255,255,.55);
  font-size:.72rem;
  letter-spacing:.16em;
  text-transform:uppercase;
}

/* ============================================================
   Compendium image size correction
   The portraits came back enormous, because apparently subtlety died.
   Shrink card images to compact archive thumbnails.
   ============================================================ */

body .fn-public-card-image{
  height:56px !important;
  max-height:56px !important;
  min-height:56px !important;
  margin:-.1rem -.1rem .65rem !important;
  border-radius:10px !important;
}

body .fn-public-card-image img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center 22% !important;
}

body .fn-fallback-subject-card,
body .fn-subject-card{
  padding:.78rem !important;
}

body .fn-fallback-subject-card h2,
body .fn-subject-card h2{
  font-size:1.05rem !important;
  margin:.05rem 0 .42rem !important;
}

body .fn-fallback-subject-card p,
body .fn-subject-card p{
  font-size:.86rem !important;
  line-height:1.34 !important;
}

/* ============================================================
   Compendium recovery layout polish
   Make the restored subject cards look intentional instead of
   like a panic patch stapled to a wall.
   ============================================================ */

/* Grid shell */
.fn-compendium-public-grid-shell{
  max-width: 1240px;
  margin: 1.25rem auto 3rem !important;
  padding: 0 1rem !important;
}

.fn-compendium-grid,
#fnCompendiumGrid,
#subjectsGrid,
#compendiumGrid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap:1rem !important;
  align-items:start !important;
}

/* Card */
.fn-fallback-subject-card,
.fn-subject-card{
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  min-height: 0 !important;
  padding:.85rem !important;
  border-radius:18px !important;
  overflow:hidden !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(0,255,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(8,18,34,.96), rgba(7,10,22,.985)) !important;
  border:1px solid rgba(0,255,255,.20) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 10px 24px rgba(0,0,0,.32),
    0 0 14px rgba(0,255,255,.05) !important;
}

/* Portrait block */
.fn-public-card-image{
  width:100% !important;
  height:120px !important;
  min-height:120px !important;
  max-height:120px !important;
  margin:0 0 .8rem 0 !important;
  border-radius:12px !important;
  overflow:hidden !important;
  border:1px solid rgba(0,255,255,.16) !important;
  background:
    linear-gradient(180deg, rgba(5,12,22,.94), rgba(10,14,28,.98)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 10px rgba(0,255,255,.04) !important;
}

.fn-public-card-image img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center 18% !important;
  transform:none !important;
}

.fn-public-card-image-missing{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.fn-public-card-image-missing span{
  color:rgba(0,255,255,.55) !important;
  font-size:.72rem !important;
  letter-spacing:.16em !important;
  text-transform:uppercase !important;
}

/* Text treatment */
.fn-fallback-kicker{
  color:#ffd166 !important;
  text-transform:uppercase !important;
  letter-spacing:.14em !important;
  font-size:.67rem !important;
  line-height:1.25 !important;
  margin:0 0 .42rem 0 !important;
}

.fn-fallback-subject-card h2,
.fn-subject-card h2{
  margin:0 0 .5rem 0 !important;
  color:#f4feff !important;
  font-size:1.08rem !important;
  line-height:1.1 !important;
  font-weight:800 !important;
}

.fn-fallback-subject-card p,
.fn-subject-card p{
  margin:0 0 .85rem 0 !important;
  color:#b8c3d2 !important;
  font-size:.89rem !important;
  line-height:1.38 !important;
  display:-webkit-box !important;
  -webkit-line-clamp:4 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
}

/* CTA pinned to bottom */
.fn-fallback-open{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:flex-start !important;
  margin-top:auto !important;
  padding:.55rem .8rem !important;
  border-radius:999px !important;
  color:#031014 !important;
  background:linear-gradient(135deg, #00f5ff, #ffd166) !important;
  text-decoration:none !important;
  text-transform:uppercase !important;
  letter-spacing:.12em !important;
  font-size:.68rem !important;
  font-weight:900 !important;
}

/* Hide public dev console on these archive surfaces */
.fn-dev-public-console,
#fnDevPublicConsole,
[data-dev-console],
[data-public-console],
.fn-glitch-dev-panel,
.fn-dev-console{
  display:none !important;
}

/* Mobile tighten */
@media (max-width: 720px){
  .fn-compendium-grid,
  #fnCompendiumGrid,
  #subjectsGrid,
  #compendiumGrid{
    grid-template-columns:1fr !important;
  }

  .fn-public-card-image{
    height:100px !important;
    min-height:100px !important;
    max-height:100px !important;
  }
}

/* ============================================================
   Compendium image size match to Bestiary / OcculTek archive cards
   ============================================================ */

html body main .fn-subject-card .fn-public-card-image,
html body main .fn-fallback-subject-card .fn-public-card-image,
html body main [data-subject-id] .fn-public-card-image{
  height:170px !important;
  min-height:170px !important;
  max-height:170px !important;
  flex:0 0 170px !important;
}

html body main .fn-subject-card img,
html body main .fn-fallback-subject-card img,
html body main [data-subject-id] img{
  height:170px !important;
  min-height:170px !important;
  max-height:170px !important;
}

/* Card text stays controlled under the larger media block */
html body main .fn-subject-card p,
html body main .fn-fallback-subject-card p,
html body main [data-subject-id] p{
  -webkit-line-clamp:3 !important;
}

/* ============================================================
   Compendium per-record crop corrections after archive-size match
   ============================================================ */

html body main [data-subject-id*="mckenna" i] img,
html body main [data-subject-id*="terrance" i] img,
html body main [data-subject-id*="terrence" i] img{
  object-fit:cover !important;
  object-position:center 10% !important;
}

html body main [data-subject-id*="rivets" i] img,
html body main [data-subject-id*="whodini" i] img{
  object-fit:contain !important;
  object-position:center center !important;
  background:#050914 !important;
}

html body main [data-subject-id*="scraps" i] img,
html body main [data-subject-id*="diminuto" i] img{
  object-fit:cover !important;
  object-position:center 14% !important;
}

/* ============================================================
   Final crop tune: Vril Gray Suits lowered, Whodini raised
   ============================================================ */

html body main [data-subject-id*="vril-gray-suits" i] img,
html body main [data-subject-id*="gray-suits" i] img{
  object-fit:cover !important;
  object-position:center 28% !important;
}

html body main [data-subject-id*="whodini" i] img{
  object-fit:contain !important;
  object-position:center 38% !important;
  background:#050914 !important;
}

/* ============================================================
   Final per-record crop tuning:
   Vril Gray Suits lower / Whodini higher
   ============================================================ */

html body main [data-subject-id*="vril-gray-suits" i] img,
html body main [data-subject-id*="gray-suits" i] img,
html body main [data-subject-id*="integrated-agents" i] img{
  object-fit:cover !important;
  object-position:center 38% !important;
}

html body main [data-subject-id*="whodini" i] img{
  object-fit:contain !important;
  object-position:center 28% !important;
  background:#050914 !important;
}
