@import url("https://cdn.jsdelivr.net/npm/cn-fontsource-lxgw-neo-zhi-song-chs-regular-lxgw-neo-zhi-song@1.0.0/font.min.css");

/* ==========================================================
   FMRG Theme: FGSAO — Fiord Grand Steam Archive Office
   峡湾蒸汽档案厅
   "Every Anomaly Recorded."

   Usage: add class="theme-fgsao" to .page
   ========================================================== */

.theme-fgsao{
  --font:         "LXGW Neo ZhiSong CHS","LXGW Neo Zhi Song","LXGW Neo ZhiSong","Noto Serif SC","Source Han Serif SC",serif;
  --sans:         "LXGW Neo ZhiSong CHS","LXGW Neo Zhi Song","LXGW Neo ZhiSong","PingFang SC","Microsoft YaHei",sans-serif;

  /* — Color System (brass, ink, warm archive) — */
  --ink:          #1a1610;
  --muted:        #7a6e5c;
  --line:         #3a3228;
  --thin:         rgba(58,50,40,.20);
  --bg:           #faf8f4;
  --accent:       #8b6914;          /* muted brass / dark gold */
  --accent-light: rgba(139,105,20,.06);
  --accent-mid:   rgba(139,105,20,.22);

  /* — Borders (archive-thick primary, softer secondary) — */
  --b1: 1.5px solid var(--line);
  --b0: 1px solid var(--thin);

  /* — Letterhead — */
  --lh-h:       126px;
  --lh-logo-h:  72px;
  --lh-pad-x:   22px;
  --lh-gap:     12px;

  /* — Paper Texture — */
  --paper-warm:             rgba(160,130,70,.035);
  --paper-speckle:          .025;
  --print-pattern-opacity:  .018;

  /* — Watermark — */
  --wm-opacity:      .038;
  --wm-color:        var(--ink);

  /* — Stamp — */
  --stamp-size:      130px;
  --stamp-ink:       var(--accent);
  --stamp-opacity:   .14;
  --stamp-rotate:    -18deg;
  --stamp-x:         0px;
  --stamp-y:         0px;

  /* — Footer Banner — */
  --fb-bg:       rgba(139,105,20,.04);
  --fb-border:   rgba(139,105,20,.18);
}


/* ==========================================================
   LETTERHEAD — old paper gradient + archive seal line
   ========================================================== */
.page.theme-fgsao .letterhead{
  background:
    linear-gradient(to bottom,
      rgba(160,130,70,.05) 0%,
      rgba(160,130,70,.015) 60%,
      transparent 100%
    );
  border-bottom: 3px solid var(--line);
}


/* ==========================================================
   PAPER TEXTURE — Aged Paper + Speckle + Faint Print Pattern
   ========================================================== */
.page.theme-fgsao::before{
  content:"";
  position:absolute; inset:0;
  z-index:0;
  pointer-events:none;
  background:
    /* L1 — warm aged paper base */
    radial-gradient(
      ellipse at 50% 30%,
      var(--paper-warm),
      transparent 80%
    ),
    /* L2 — fiber speckle (coarse) */
    radial-gradient(
      rgba(100,80,40,var(--paper-speckle)) 1px,
      transparent 1px
    ),
    /* L3 — fiber speckle (fine) */
    radial-gradient(
      rgba(80,60,30,var(--paper-speckle)) .6px,
      transparent .6px
    ),
    /* L4 — faint repeating print pattern (tiny hatching) */
    repeating-linear-gradient(
      45deg,
      rgba(100,80,40,var(--print-pattern-opacity)),
      rgba(100,80,40,var(--print-pattern-opacity)) 1px,
      transparent 1px,
      transparent 8px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(100,80,40,var(--print-pattern-opacity)),
      rgba(100,80,40,var(--print-pattern-opacity)) 1px,
      transparent 1px,
      transparent 8px
    );
  background-size:
    100% 100%,
    6px 6px,
    4px 4px,
    9px 9px,
    9px 9px;
}


/* ==========================================================
   ARCHIVE STAMP ZONE — faint rectangle hint at bottom-right
   + corner filing marks
   ========================================================== */
.page.theme-fgsao::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    /* stamp zone hint — bottom right */
    linear-gradient(
      to right,
      transparent 65%,
      rgba(139,105,20,.02) 65%,
      rgba(139,105,20,.02) 100%
    ),
    linear-gradient(
      to bottom,
      transparent 75%,
      rgba(139,105,20,.02) 75%,
      rgba(139,105,20,.02) 100%
    ),
    /* corner filing marks — top-left */
    linear-gradient(rgba(58,50,40,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,50,40,.08) 1px, transparent 1px),
    /* corner filing marks — bottom-right */
    linear-gradient(rgba(58,50,40,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58,50,40,.08) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    20px 1px, 1px 20px,
    20px 1px, 1px 20px;
  background-position:
    0 0,
    0 0,
    8px 8px, 8px 8px,
    calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) calc(100% - 8px);
  background-repeat: no-repeat;
}


/* ==========================================================
   WATERMARK — archive filing text
   ========================================================== */
.page.theme-fgsao .watermark .wm-text{
  font-size: 68px;
  letter-spacing: .30em;
  transform: rotate(-26deg);
}


/* ==========================================================
   CHIP — archive label / filing tag style
   ========================================================== */
.page.theme-fgsao .chip{
  border-color: var(--accent-mid);
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: .03em;
}


/* ==========================================================
   STAMP — archive filing seal
   ========================================================== */
.page.theme-fgsao .stamp{
  transform: rotate(var(--stamp-rotate));
  border-color: rgba(139,105,20,.40);
  color: var(--accent);
}


/* ==========================================================
   TABLE — more archival: warm header, clearer borders
   ========================================================== */
.page.theme-fgsao .items-table th{
  background: rgba(139,105,20,.04);
  border-top-color: var(--thin);
}


/* ==========================================================
   PRINT OVERRIDES (FGSAO-specific)
   ========================================================== */
@media print{
  .page.theme-fgsao::before{
    opacity: .30;
  }
  .page.theme-fgsao::after{
    opacity: .15;
  }
}
