/* LANDING_PAGE */
body.landing {
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #222;
  font-family: sans-serif;
}

.landing-container {
  text-align: center;
  max-width: 680px;
  padding: 40px;
}

.landing-title {
  font-size: 2.4rem;
  margin-bottom: 0.5em;
}

.landing-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2em;
  color: #555;
}

.landing-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.landing-button {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
  background: #fff;
  border: 2px solid #222;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.landing-button:hover {
  background: #222;
  color: #fff;
}


/* ======================
   GLOBAL LAYOUT & THEME
   ====================== */

body {
  margin: 0;
  font-family: sans-serif;
  color: #222;
}

/* Header / Navigation */

.site-header {
  background: #ffffff;
  border-bottom: 2px solid #222;
}

.site-header-inner {
  max-width: 3000px;
  margin: 0 auto;
  padding: 12px 80px;

  display: flex;
  align-items: stretch;   
  justify-content: space-between;
}

.site-title {
  display: flex;
  align-items: center;    /* keeps title vertically centered */
}

.site-title a {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: #222;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;

  text-decoration: none;
  font-weight: 600;
  color: #222;

  padding: 0 14px;
  margin: -12px 0;
  border-radius: 0;  /* ✅ remove pill */
  z-index: 0;
  transition: color 0.18s ease;
}

.site-nav a::before {
  content: "";
  position: absolute;
  inset: 0;                /* ✅ fill full header height */
  background: rgba(0,0,0,0.06);
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: -1;
}

.site-nav a:hover::before {
  opacity: 1;
}

/* remove underline hover */
.site-nav a:hover {
  text-decoration: none;
}

/* Active tab text color */
.page-table .site-nav .nav-table,
.page-gtns .site-nav .nav-gtns,
.page-resources .site-nav .nav-resources,
.page-blog .site-nav .nav-blog {
  color: #fff;
}

/* Active tab animated fill */
.page-table .site-nav .nav-table::after,
.page-gtns .site-nav .nav-gtns::after,
.page-resources .site-nav .nav-resources::after,
.page-blog .site-nav .nav-blog::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: -5px;     /* ✅ extend below header */
  background: #111;
  z-index: -1;

  transform: scaleY(0);
  transform-origin: top;
  animation: navFill 820ms cubic-bezier(.5, .8, .2, 1) forwards;
}

/* prevent hover pill overlaying the active pill */
.page-table .site-nav .nav-table:hover::before,
.page-gtns .site-nav .nav-gtns:hover::before,
.page-resources .site-nav .nav-resources:hover::before,
.page-blog .site-nav .nav-blog:hover::before {
  opacity: 0;
}

@keyframes navFill {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  .page-table .site-nav .nav-table::after,
  .page-gtns .site-nav .nav-gtns::after,
  .page-resources .site-nav .nav-resources::after,
  .page-blog .site-nav .nav-blog::after {
    animation: none;
    transform: scaleX(1);
  }
}
/* Page content wrapper */

.page-content {
  margin-top: 24px;

  margin-left: 100px;
  margin-right: 100px;
  padding: 0; /* layout only */
}

.page-content > * + * {
  margin-top: 0.4em;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin: 0;
  line-height: 1.3;
}
.page-content h1 {
  font-size: 2rem;
  margin-top: 0em;
  margin-bottom: 0.27em;
}

.page-content h2 {
  font-size: 1.4rem;
  margin-top: 0em;
  margin-bottom: 0.27em;
}

.page-content h3 {
  font-size: 1.15rem;
  margin-top: 0em;
  margin-bottom: 0.27em;
}
.page-content p {
  margin-top: 0em;
  margin-bottom: 0.5em;
}
/* LIST */
.page-content ul,
.page-content ol {
  margin: 0;
  padding-left: 1.2em;
}

.page-content li {
  margin-bottom: 0.5em;
}

.page-content li:last-child {
  margin-bottom: 0;
}

.page-resources .page-content a[href] { 
  color: #0f4c81;                 /* deep blue */
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;

  transition: color 0.15s ease, background 0.15s ease;
}

.page-resources .page-content a[href]:hover {
  color: #000;
  background: rgba(15, 76, 129, 0.10);
  border-radius: 4px;
}

.content-separator {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);

  margin: 16px 0;
}

.spacer {
  display: block;
  width: 100%;
  height: 1.5em;
}

.spacer_L {
  display: block;
  width: 100%;
  height: 1.2em;
}

/* Headings */
body {
  position: relative;
  z-index: 0;
}

/* Background layer */
body {
  position: relative;
  z-index: 0;
}

/* ======================
   BACKGROUND MOTIFS (WRAP-AROUND)
   ====================== */

.bg-motif-layer {
  position: fixed;
  inset: 0;
  z-index: -2; /* above body::after, below content */
  pointer-events: none;
  overflow: hidden;
}

.bg-motif {
  position: absolute;

  width: 220px;
  height: 220px;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  opacity: 0.05;
  filter: blur(2px);

  will-change: transform;
}

.bg-motif-layer {
  transition: opacity 1.9s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: -300px;
  z-index: -2;

  background-image: url("assets/bg-dragon.png");
  background-repeat: repeat;
  background-size: 340px 340px;

  opacity: 0.035;
  filter: blur(4px);

  animation: drift-diagonal 300s linear infinite;

  pointer-events: none;
}

html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;

  background: linear-gradient(
    135deg,
	#dceff4 0%,
    #e9eef5 50%,
    #f0e2f0 100%
  );

  pointer-events: none;
}

@keyframes drift-diagonal {
  from {
    background-position: 0% 100%;
  }
  to {
    background-position: 100% 0%;
  }
}

/* ======================
   TABLE 
   ====================== */
  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    border: 1px solid #000;
    padding: 6px;
    text-align: center;
    vertical-align: middle;
  }

  tbody tr {
    height: 110px;
    border-bottom: 4px solid #000;
  }

td {
  position: relative;
}

td a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

td a:hover {
  text-decoration: none;
}

thead {
  position: sticky;
  top: -1px;
  z-index: 30;
  background: #fff;
 
  box-shadow: 0 4px 0 #000;
  border-top: 1px solid #000; 
}

/* ======================
   TABLE SORT RESET BUTTON
   ====================== */

.table-controls {
  position: sticky;
  top: 0;
  z-index: 35; /* above thead */
  pointer-events: none;
}

#resetSortBtn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: -44px; /* floats to the right */
  top: 0px;


  width: 32px;
  height: 32px;

  border: none;
  padding: 0;  
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.15);

  font-size: 16px;
  cursor: pointer;

  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

#resetSortBtn span {
  transform: translateY(-100px);
}

/* Visible state */
#resetSortBtn.visible {
  opacity: 1;
  transform: scale(1);
}

#resetSortBtn:hover {
  background: rgba(255, 255, 255, 0.95);
}


thead th {
  background: #fff;
}

thead th:nth-child(3),
thead th:nth-child(9) {
  box-shadow: 3px 0 0 #000;
}

  img.cover {
    height: 90px;
  }

  /* Row colors */
  tr.drmfree {
    background-color: #d9f8c4;
  }

  tr.drmonly {
    background-color: #ffb3b3;
  }
  
  tr.missing {
    background-color: #a0a0a0;
  }

  /* Vendor cells */
  .vendor {
    cursor: pointer;
    font-weight: bold;
  }

  .vendor.drm {
    background-color: #d83434;
  }

.vendor.adobe-drm {
  background-color: #e58926;
}

.vendor.free-adobe-drm {
  background: linear-gradient(75deg, #4da6ff 50%, #e58926 50%);
  color: #fff;
}

  .vendor.drmfree {
    background-color: #5cb85c;
  }

  .vendor.free-drmfree {
    background: linear-gradient(75deg, #4da6ff 50%, #5cb85c 50%);
  }

  .vendor.free-drm {
    background: linear-gradient(75deg, #4da6ff 50%, #d83434 50%);
    color: #fff;
  }

  .vendor.non-spec {
    background-color: #9a9a9a;
  }

  .vendor.empty {
    background: transparent;
    cursor: default;
  }
  
.vendor-multi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}  
  
.vendor-btn {
  position: absolute;
  inset: 3%;         /* margin on all sides */
  border-radius: 2px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.vendor-multi .vendor-btn {
  position: static;
  inset: auto;
  width: 90%;
  min-height: 24px;
}

.vendor-label-small {
  font-size: 0.9em;
}


#bookTable tbody tr:nth-child(even) {
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.085),
      rgba(0, 0, 0, 0.085)
    );
}

#bookTable {
  table-layout: fixed;
}

#bookTable th:nth-child(1),
#bookTable td:nth-child(1) {
  width: 70px; /* Cover */
}

#bookTable th:nth-child(2),
#bookTable td:nth-child(2) {
  width: 160px; /* Author */
}

#bookTable th:nth-child(3),
#bookTable td:nth-child(3) {
  width: 260px; /* Title */
}

/* Vendor columns */
#bookTable th:nth-child(n+4):nth-child(-n+8),
#bookTable td:nth-child(n+4):nth-child(-n+8) {
  width: 80px;
}

/* Metadata columns */
#bookTable th:nth-child(n+9),
#bookTable td:nth-child(n+9) {
  width: 75px;
}

/* Thick vertical separators around vendor columns */
#bookTable th:nth-child(3),
#bookTable td:nth-child(3) {
  border-right: 4px solid #000;
}

#bookTable th:nth-child(8),
#bookTable td:nth-child(8) {
  border-right: 4px solid #000;
}

/* Sortable headers */
th {
  cursor: pointer;
  user-select: none;
  position: relative;
  text-align: center;
  vertical-align: middle;
  position: relative; /* anchor for indicator */
}

/* Sort indicator base */
th.sort-asc::after,
th.sort-desc::after {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  opacity: 0.75;
  pointer-events: none;
}

th.sort-asc::after {
  content: "▲";
}

th.sort-desc::after {
  content: "▼";
}




/* ======================
   TABLE PAGE LAYOUT
   ====================== */

.page-intro {
  max-width: 3200px;
}

/* Legend layout */
.table-legend {
  margin-top: 24px;
}

.table-legend ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.table-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

/* Legend colors */
.legend {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid #000;
}

.legend.drmfree { background: #5cb85c; }
.legend.drmonly { background: #d83434; }
.legend.free    { background: #4da6ff; }
.legend.adobe   { background: #e58926; }
.legend.nonspec { background: #9a9a9a; }

.table-container {
  margin-top: 24px;
  margin-bottom: 75px;

  /* table margins - messed up a bit on mobile */
  margin-left: -20px;
  margin-right: -20px;
}


/* ======================
   CONTENT CARD
   ====================== */

.content-card {
  padding: 24px 28px;
  border-radius: 8px;
  margin-left: -20px;
  margin-right: -20px;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 255, 0.67) 0%,
      rgba(255, 255, 255, 0.47) 60%,
      rgba(255, 255, 255, 0.27) 100%
    );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border-radius: 8px;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.06);
/* ALTERNATIVE  box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, 0.2);*/
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  margin-bottom: 32px;
}

.content-card p {
  margin-top: 0.0;
}

.landing-panel {
  margin-top: 2px;
  padding: 28px 32px;
  max-width: 590px;
  margin-left: auto;
  margin-right: auto;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(255, 255, 255, 0.52) 60%,
      rgba(255, 255, 255, 0.32) 100%
    );

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border-radius: 8px;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.06);
/* ALTERNATIVE  box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, 0.2);*/
}

.landing-panel > * + * {
  margin-top: 1.2em;
}


/* ======================
   BLOG COLLAPSIBLE CARDS
   ====================== */

.blog-entry {
  position: relative;
  padding-bottom: 44px; /* space for toggle */
}

.blog-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.blog-entry-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.blog-entry-excerpt {
  margin: 0;
  opacity: 0.85;
  line-height: 1.4;
}

.blog-entry-date {
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
  margin-left: 12px;
  align-self: flex-start;
}

/* Toggle button bottom center */
.blog-entry-toggle {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 28px;

  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;

  transition: background 0.2s ease, transform 0.2s ease;
}

.blog-entry-toggle:hover {
  background: rgba(0, 0, 0, 0.10);
}

.blog-entry-toggle:active {
  transform: translateX(-50%) scale(0.98);
}

.blog-entry-toggle .dots {
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-3px); /* positioning fixed */
}

.blog-entry-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.blog-entry-body-inner {
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.10);
}

/* Expanded state */
.blog-entry.expanded .blog-entry-body {
  max-height: 1000px; /* can increase if needed. unlikely */
}


.blog-entry.expanded .blog-entry-toggle .chev {
  transform: rotate(180deg);
  display: inline-block;
  transition: transform 0.2s ease;
}

/* ======================
   BLOG IMAGES
   ====================== */

.blog-entry-body-inner img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.blog-image {
  margin: 14px 0;
}
/* wrapped images */
.blog-image.small {
  width: min(45%, 320px);  /* ≤ 50% and capped */
}

.blog-image.small.right {
  float: right;
  margin: 6px 0 10px 16px; /* top right bottom left */
}

.blog-image.small.left {
  float: left;
  margin: 0px 16px 10px 0;
}

.blog-image.small img {
  width: 100%;
  height: auto;
}

.blog-entry-body-inner::after {
  content: "";
  display: block;
  clear: both;
}

.blog-image img {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.06);
}

.blog-image figcaption {
  margin-top: 6px;
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: center;
}

/* ======================
   LANDING PAGE ART LAYER
   ====================== */

.landing-container {
  position: relative;
  z-index: 1;
}

/* Poking dragon */
.landing-art {
  position: absolute;
  left: 0;
  right: 0;

  top: -150px;
  bottom: -150px;

  background-image: url("assets/dragon_poke1.png");
  background-repeat: no-repeat;
  background-position: center -70px;
  background-size: 700px auto;

  opacity: 0.85;

  pointer-events: none;
}

/* ======================
   MODAL POPUP
   ====================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}

.modal-card {
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 0px 20px 16px;

  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);

  box-shadow: 0 18px 45px rgba(0,0,0,0.25);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.btn-primary {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: #000;
  color: #fff;
}

/* Title */
#modalTitle {
  text-align: center;
  margin: 16px 0 -18px; /* reduced title margin. Pretty sure I specified it somewhere else, but I dunno where, lol */
}
.modal-overlay[hidden] { display: none; }

/* ======================
   COVER IMAGE MODAL
   ====================== */

.cover-modal {
  position: relative;
  padding: 12px;

  width: fit-content;          
  max-width: 92vw;             
  max-height: 90vh;

  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-modal img {
  display: block;
  max-width: 92vw;
  max-height: 85vh;

  height: auto;
  width: auto;

  border-radius: 12px;
}

.cover-close {
  position: absolute;
  top: 8px;
  right: 10px;

  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;

  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  cursor: pointer;

  font-size: 18px;
  line-height: 1;
}
.cover-close:hover {
  background: rgba(255,255,255,0.95);
}

/* Optional: make table covers look clickable */
img.cover {
  height: 90px;
  cursor: pointer;
 /* border-radius: 6px; */
}
img.cover:hover {
  filter: brightness(1.1);
}