/* app/css/screens-syllabus.css — Syllabus tab (.sy-*) and original-PDF page viewer (.pv-*)
   Owner: A5. Spec: docs/redesign/plan.md §2.7. No mock-up exists: follow 02-chapters-math.html (cards) and 06-profile.html (lists). */

/* ── Top row / back navigation for screens without shell top bar tabs ────── */
.tp-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tp-back {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--rule) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  cursor: pointer;
}

.tp-back:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.tp-back .b-ico {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Syllabus list (#/syllabus) ─────────────────────────────────────────── */
.sy-subject {
  margin-bottom: 22px;
}

.sy-subject__title {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 10px 0 6px;
}

.sy-subject__title a {
  color: inherit;
  text-decoration: none;
}

.sy-subject__meta {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

/* ── Subject syllabus view (#/syllabus/<key>) ────────────────────────────── */
.sy-pdf {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 24px;
  box-sizing: border-box;
  text-decoration: none;
}

.sy-unofficial {
  margin: 0 0 20px;
}

.sy-objective {
  margin-bottom: 24px;
}

.sy-objective p {
  font-size: 17px;
  line-height: 1.55;
  max-width: 65ch;
  margin: 0 0 8px;
}

.sy-ch {
  margin-bottom: 22px;
}

.sy-ch__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sy-ch__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.sy-topics {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sy-topic {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px dashed var(--ink-2);
}

.sy-topic:first-child {
  border-top: none;
}

.sy-topic .b-mono {
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}

.sy-topic a {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  word-break: break-word;
  line-height: 1.35;
}

.sy-topic span:last-child {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--ink);
  line-height: 1.35;
  word-break: break-word;
}

.sy-tick {
  width: 22px;
  height: 22px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  background: var(--paper);
  color: transparent;
  flex-shrink: 0;
}

.sy-topic.is-done .sy-tick {
  background: var(--ink);
  color: var(--on-ink);
}

/* ── Marks table ─────────────────────────────────────────────────────────── */
.sy-marks {
  margin-bottom: 28px;
}

.sy-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0 12px;
}

.sy-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-size: 15px;
}

.sy-table th,
.sy-table td {
  border: 1.5px solid var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.sy-table th {
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sy-table td.sy-num,
.sy-table th:nth-child(2),
.sy-table th:nth-child(3) {
  text-align: right;
}

.sy-table td.sy-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

.sy-table .sy-total-row {
  background: var(--paper-2);
  font-weight: 800;
}

.sy-marks-note {
  font-size: 13px;
  color: var(--ink-2);
  font-style: italic;
  margin-top: 6px;
}

/* ── References ─────────────────────────────────────────────────────────── */
.sy-refs {
  margin-bottom: 32px;
}

.sy-refs-list {
  padding-left: 20px;
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.sy-refs-list li {
  margin-bottom: 8px;
  word-break: break-word;
}

/* ── Original PDF page viewer (.pv-*) ────────────────────────────────────── */
.pv-page {
  display: flex;
  flex-direction: column;
}

.pv-frame {
  border: var(--rule) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #ffffff !important;
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom;
  display: block;
  position: relative;
  max-width: 100%;
}

.pv-img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s var(--ease);
}

.pv-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 12px;
}

.pv-nav .b-btn {
  min-height: 48px;
  min-width: 130px;
  text-align: center;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.pv-spacer {
  min-width: 130px;
}
