/* The head of the three readers (revision notes, worksheet, marking scheme).
   One quiet bar: where you are on the left, the row's other documents on the
   right. Under it a short kicker, the title and one line on where it sits. */
.doc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-bottom: 14px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.doc-bar .ws-crumbs { margin: 0; }
.doc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-acts .file-btn, .member-app .doc-acts .file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 13px; font-size: 10.5px; letter-spacing: .08em; line-height: 1.2; min-height: 36px; }
.doc-acts .file-btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.doc-acts .file-btn.primary:hover { background: var(--green, #1f3d2b); border-color: var(--green, #1f3d2b); }

.doc-head { margin: 0 0 28px; }
.doc-head h1 { font: 500 clamp(30px, 5vw, 44px)/1.08 "Source Serif 4", Georgia, serif; letter-spacing: -.015em;
  color: var(--ink); margin: 10px 0 8px; max-width: none; }
.doc-sub { margin: 0; font-size: 16px; color: var(--muted); max-width: 62ch; }

/* Phones: the buttons share the full width and grow to a thumb's size. */
@media (max-width: 640px) {
  .doc-bar { margin-bottom: 26px; }
  .doc-acts { width: 100%; }
  .doc-acts .file-btn, .member-app .doc-acts .file-btn { flex: 1 1 auto; min-height: 44px; }
}

/* The subject page's study tool (the formula sheet): a small card to the
   right of the heading on wide screens, under it on phones. */
.ws-subject-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; }
.ws-subject-top .library-head { min-width: 0; }
.fs-tool { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 16px; width: 280px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 247, .8); color: var(--ink);
  text-decoration: none; transition: border-color .18s, box-shadow .18s, transform .18s; }
.fs-tool:hover { border-color: var(--ink); box-shadow: 0 6px 20px rgba(17, 47, 70, .08); transform: translateY(-1px); }
.fs-tool:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.fs-tool-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #112f46; color: #fffdf7; }
.fs-tool-ico svg { width: 22px; height: 22px; }
.fs-tool-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fs-tool-txt strong { font: 600 15px/1.25 Inter, system-ui, sans-serif; }
.fs-tool-txt span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.fs-tool-go { margin-left: auto; font-size: 18px; color: var(--gold); }
@media (max-width: 760px) {
  .ws-subject-top { grid-template-columns: 1fr; gap: 0; }
  .ws-subject-top .library-head { margin-bottom: 16px; }
  .fs-tool { width: 100%; box-sizing: border-box; }
}
