:root{
  --bg:#f6f9ff;
  --surface:#ffffff;
  --text:#0b1b3a;
  --muted:#4a628f;

  --primary:#1d4ed8;
  --border:rgba(13,42,99,.12);

  --shadow-sm:0 8px 18px rgba(13,42,99,.10);
  --shadow:0 18px 42px rgba(13,42,99,.14);

  --radius:16px;
  --radius-sm:12px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  color:var(--text);
}

img{ display:block; max-width:100%; }
a{ color:inherit; }

/* Header */
header{
  max-width:1100px;
  margin:0 auto;
  padding:40px 16px 16px;
}
header h1{
  margin:0;
  font-size:clamp(22px, 3vw, 34px);
  line-height:1.15;
  letter-spacing:-.02em;
    font-family: "Poppins", sans-serif;
}
header h1::after{
  content:"";
  display:block;
  width:88px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--primary),rgba(37,99,235,.35));
  margin-top:12px;
}

header p {
    font-family: "Roboto", sans-serif;
    margin-top: 10px;
    color: var(--muted);
}

/* Main container */
.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px 48px;
}

/* Year block headings */
.year-block{ margin:18px 0 26px; }
.year-block h3{
  margin:0 0 12px;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:14px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:var(--muted);
}
.year-block h3::after{
  content:"";
  height:1px;
  flex:1;
  background:var(--border);
}

/* Grid: 2 per row on large, 1 on small */
.cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 760px){
  .cards{ grid-template-columns:1fr; }
}

/* Card (row style inside) */
.document-row{
  display:grid;
  grid-template-columns:96px 1fr; /* smaller cover */
  gap:12px;

  text-decoration:none;
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(10px);

  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);

  padding:10px;
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.document-row:hover{
  transform:translateY(-2px);
  border-color:rgba(29,78,216,.35);
  box-shadow:var(--shadow);
}

.document-row:focus-visible{
  outline:3px solid rgba(37,99,235,.35);
  outline-offset:3px;
}

/* A4 cover (portrait), smaller */
.cover{
  width:96px;
  aspect-ratio:1 / 1.4142;
  border-radius:var(--radius-sm);
  overflow:hidden;
  border:1px solid var(--border);
  background:#eef3ff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.cover img{
  width:100%;
  height:100%;
  object-fit:contain;      /* show FULL cover */
  object-position:center;
}

/* Text */
.meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-right:4px;
}

.doc-title{
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  font-family: "Poppins", sans-serif;
  text-transform: capitalize;

  /* allow full wrapping */
  white-space: normal;
  overflow: visible;
}


/* second line with page count + year/grade */
.doc-sub{
  margin-top:6px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--muted);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:12px;
  color:var(--muted);
}

.badge strong{
  color:var(--text);
  font-weight:800;
}

.document-date {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
    font-family: "Roboto", sans-serif;
}
/* If you still want multi-line titles on big screens, replace
   white-space:nowrap with:
   white-space:normal;
*/
