/* ==========================================================================
   Tools Page & Works Cited Generator Styles
   Consistent with site typography, indigo/brand gradient, and card aesthetics.
   ========================================================================== */

/* ── More Tools Category Page Grid & Layout ────────────────────────────── */
.tools-main {
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: 80px;
}

.tools-hero {
  max-width: 820px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.tools-hero .section-eyebrow {
  display: inline-block;
  color: #4844c5;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tools-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -.045em;
  color: var(--ink);
  font-weight: 750;
}

.tools-hero p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

/* Tool Cards Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 36px -10px rgba(50, 40, 120, 0.08), 0 2px 6px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  position: relative;
}

/* Featured single card: spans full grid width, horizontal layout */
.tool-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.tool-card--featured .tool-card-image {
  aspect-ratio: auto;
  width: 400px;
  flex-shrink: 0;
}

.tool-card--featured .tool-card-body {
  padding: 36px 40px;
  justify-content: center;
}

.tool-card--featured .tool-card-body h2 {
  font-size: clamp(24px, 2.8vw, 32px);
}

.tool-card--featured .tool-card-body p {
  font-size: 15.5px;
  max-width: 440px;
}

.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-5px);
  border-color: #6a5cf5;
  box-shadow: 0 20px 48px -12px rgba(80, 70, 214, 0.22);
}

.tool-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #1a1535;
}

.tool-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.tool-card:hover .tool-card-image img {
  transform: scale(1.03);
}

.tool-card-icon-banner {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  color: #fff;
  position: relative;
}

.tool-card-icon-banner.alt-formatter {
  background: linear-gradient(135deg, #0d9488, #115e59);
}

.tool-card-icon-banner .icon {
  width: 56px;
  height: 56px;
  stroke-width: 1.7;
}

.tool-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}

.tool-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 999px;
  background: #eeebfd;
  color: #6a5cf5;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tool-badge.teal {
  background: #e6f7f5;
  color: #0d9488;
}

.tool-badge.amber {
  background: #fef3c7;
  color: #b45309;
}

.tool-card-body h2, .tool-card-body h3 {
  margin: 0 0 12px;
  font-size: clamp(21px, 2.2vw, 24px);
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--ink);
}

.tool-card-body p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.tool-card-action {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5046d6;
  font-size: 14px;
  font-weight: 700;
}

.tool-card-action .icon {
  width: 16px;
  height: 16px;
  transition: transform .18s ease;
}

.tool-card:hover .tool-card-action .icon {
  transform: translateX(4px);
}

/* ── Tool Hero Band (Works Cited Page) ─────────────────────────────────── */
.tool-hero-layout-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding-block: clamp(48px, 6vw, 76px);
}

.tool-hero-layout-centered .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #8df0df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.tool-hero-layout-centered h1 {
  color: #fff;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.04em;
  margin: 0 0 16px;
}

.tool-hero-layout-centered p {
  color: #dedaff;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 580px;
}

.tool-hero-layout-centered .tool-hero-badges {
  justify-content: center;
}

.tool-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding: 14px 28px;
  background: #ffc857;
  color: #231a5c;
  font-size: 15px;
  font-weight: 750;
  border-radius: 12px;
  text-decoration: none;
  border: 0;
  box-shadow: 0 10px 28px rgba(255, 200, 87, 0.4);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tool-hero-cta:hover {
  background: #ffd67e;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 200, 87, 0.5);
  color: #1a1250;
}

.tool-hero-cta .icon {
  width: 18px;
  height: 18px;
  transition: transform .18s ease;
}

.tool-hero-cta:hover .icon {
  transform: translateX(4px);
}

.tool-hero-band {
  background: radial-gradient(60% 90% at 85% 0%, #8a7bff40, transparent 62%),
              radial-gradient(45% 70% at 8% 100%, #2cb8a928, transparent 60%),
              radial-gradient(#ffffff17 1px, transparent 1.2px) 0 0/24px 24px,
              linear-gradient(165deg, #5148e0 0%, #3b31b4 55%, #28207e 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.tool-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.tool-hero-copy .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #8df0df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.tool-hero-copy h1 {
  color: #fff;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.04em;
  margin: 0 0 16px;
}

.tool-hero-copy p {
  color: #dedaff;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 580px;
}

.tool-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #fff;
}

.tool-hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 550;
}

.tool-hero-badges .icon {
  width: 15px;
  height: 15px;
  color: #8df0df;
}

.tool-hero-image {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(16, 10, 50, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
  background: #1a1535;
}

.tool-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ── Interactive Workspace Section ────────────────────────────────────── */
.works-tool-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 30px;
  margin-block: 44px 72px;
  align-items: start;
}

.works-tool-card, .works-output-card {
  background: #fff;
  border: 1px solid #e1e5f7;
  border-radius: 20px;
  box-shadow: 0 14px 38px -14px rgba(59, 55, 119, 0.2), 0 2px 6px rgba(59, 55, 119, 0.06);
  padding: clamp(24px, 3.5vw, 34px);
}

.works-tool-head, .works-output-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.works-tool-head .step, .works-output-head .step {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6a5cf5;
}

.works-tool-head h2, .works-output-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.03em;
  color: var(--ink);
}

.works-tool-head .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf8f3;
  color: #1a897b;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #cceee7;
}

.citation-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eeebfd;
  color: #5046d6;
  font-size: 13px;
  font-weight: 750;
}

/* Fields & Form */
.works-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d3d8ea;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #6056ed;
  box-shadow: 0 0 0 4px rgba(96, 86, 237, 0.15);
  outline: none;
}

.field-help {
  font-size: 12.5px;
  color: var(--muted);
  margin: 14px 0 6px;
  line-height: 1.5;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #5046d6;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #d3d8ea;
  background: #fff;
  color: var(--ink);
  transition: all .18s ease;
}

.btn:hover {
  background: #f8f9ff;
  border-color: #b5bde0;
}

.btn.primary {
  background: linear-gradient(135deg, #6a5cf5, #4f46e5);
  border: 0;
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.6);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -6px rgba(79, 70, 229, 0.75);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid #d8ddf0;
  background: #fff;
  color: #4b5563;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-sm:hover {
  background: #f3f4fd;
  color: #4338ca;
  border-color: #c7d2fe;
}

.btn-sm.delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.text-btn {
  background: none;
  border: none;
  color: #5046d6;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}

.text-btn:hover {
  text-decoration: underline;
  background: #eeebfd40;
}

/* Works Cited Output & Live Preview */
.works-preview {
  min-height: 280px;
  max-height: 640px;
  overflow-y: auto;
  padding: 22px;
  border-radius: 12px;
  background: #fbfbfe;
  border: 1px solid #e7ebf6;
  margin-bottom: 20px;
}

.empty-citations {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.empty-citations svg {
  width: 44px;
  height: 44px;
  color: #a5b4fc;
  margin-bottom: 12px;
}

.works-cited-heading-preview {
  text-align: center;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #d1d5db;
}

/* MLA Hanging Indent Rules */
.works-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.works-item {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color .18s, box-shadow .18s;
}

.works-item:hover {
  border-color: #a5b4fc;
  box-shadow: 0 6px 16px -4px rgba(79, 70, 229, 0.12);
}

.works-item.is-editing {
  border-color: #6366f1;
  background: #faf5ff;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.works-citation-text {
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 16px;
  line-height: 2.0;
  color: #111827;
  padding-left: 36px;
  text-indent: -36px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.works-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.works-intext-pill {
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #4f46e5;
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.works-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.works-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ── Source Types Overview Cards ──────────────────────────────────────── */
.source-types-section {
  padding-block: 64px;
  background: #f8fafd;
  border-block: 1px solid var(--line);
}

.source-types-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.source-type-card {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid #e1e5f7;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px -8px rgba(50, 40, 120, 0.08);
}

.source-type-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.source-type-icon.purple { background: #eeebfd; color: #6a5cf5; }
.source-type-icon.teal { background: #e6f7f5; color: #0d9488; }
.source-type-icon.gold { background: #fef3c7; color: #b45309; }

.source-type-icon .icon {
  width: 24px;
  height: 24px;
}

.source-type-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.source-type-info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ── Full Supporting Article Layout ───────────────────────────────────── */
.article-section {
  padding-block: clamp(48px, 6vw, 84px);
}

.article-shell {
  max-width: 860px;
  margin: 0 auto;
}

.article-shell h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
  letter-spacing: -.035em;
  color: var(--ink);
  margin: 48px 0 18px;
  font-weight: 750;
}

.article-shell h2:first-of-type {
  margin-top: 0;
}

.article-shell h3 {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.3;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 32px 0 12px;
  font-weight: 700;
}

.article-shell p, .article-shell li {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink);
}

.article-shell p {
  margin: 0 0 20px;
}

.article-shell ul, .article-shell ol {
  padding-left: 24px;
  margin: 0 0 24px;
}

.article-shell li {
  margin-bottom: 10px;
  padding-left: 4px;
}

/* Step list visual */
.article-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: article-step;
}

.article-steps li {
  counter-increment: article-step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
}

.article-steps li::before {
  content: counter(article-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eeebfd;
  color: #5046d6;
  font-weight: 750;
  font-size: 13px;
  display: grid;
  place-items: center;
}

/* MLA 9 Core Elements Diagram */
.mla-elements-flow {
  background: #fbfbfe;
  border: 1px solid #d9dcf5;
  border-radius: 18px;
  padding: 26px 28px;
  margin: 28px 0 32px;
}

.mla-elements-flow p.flow-label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5046d6;
  margin-bottom: 14px;
}

.mla-elements-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}

.mla-element-badge {
  background: #fff;
  border: 1px solid #ccd2f0;
  border-radius: 8px;
  padding: 7px 13px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.mla-element-arrow {
  color: #8b5cf6;
  font-size: 14px;
  font-weight: 700;
}

/* Callout Box */
.article-box {
  background: #fff;
  border: 1px solid #d9dcf5;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 24px 0 28px;
}

.article-box.teal {
  border-left-color: var(--teal);
}

.article-box span.box-title {
  display: block;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5046d6;
  margin-bottom: 8px;
}

.article-box.teal span.box-title {
  color: #0d9488;
}

.article-box p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
}

.article-box p + p {
  margin-top: 10px;
}

/* Checklist box */
.checklist-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 26px 0 32px;
}

.checklist-box h3 {
  margin: 0 0 14px;
  font-size: 19px;
  color: #166534;
}

.checklist-box ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.checklist-box li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: #15803d;
  font-weight: 550;
}

.checklist-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 750;
  color: #16a34a;
}

/* Embedded Article Image */
.article-image {
  margin: 32px 0 36px;
  border-radius: 18px;
  overflow: hidden;
  background: #1a1535;
  box-shadow: 0 18px 48px -10px rgba(40, 30, 90, 0.18);
}

.article-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-image figcaption {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ── FAQ Section ──────────────────────────────────────────────────────── */
.faq-section {
  padding-block: clamp(48px, 6vw, 76px);
  background: #fbfbfe;
  border-top: 1px solid var(--line);
}

.faq-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 36px;
}

.faq-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 750;
  letter-spacing: -.035em;
  color: var(--ink);
  margin: 0 0 10px;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

/* ── Dark Theme Overrides ─────────────────────────────────────────────── */
html.dark .tools-hero h1,
html.dark .article-shell h2,
html.dark .article-shell h3,
html.dark .faq-header h2,
html.dark .works-tool-head h2,
html.dark .works-output-head h2,
html.dark .faq-list summary {
  color: #f3f4f8;
}

html.dark .tool-card,
html.dark .works-tool-card,
html.dark .works-output-card,
html.dark .source-type-card,
html.dark .faq-list details,
html.dark .article-box,
html.dark .article-image figcaption {
  background: #1a1e30;
  border-color: #2b3350;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

html.dark .tools-hero p,
html.dark .tool-card-body p,
html.dark .source-type-info p,
html.dark .faq-list details p,
html.dark .field-help {
  color: #9ca3af;
}

html.dark .tool-badge {
  background: #282754;
  color: #c4b5fd;
}

html.dark .field label,
html.dark .checkbox-label {
  color: #e2e8f0;
}

html.dark .field input,
html.dark .field select,
html.dark .field textarea {
  background: #141724;
  border-color: #374151;
  color: #f3f4f6;
}

html.dark .btn {
  background: #1f2438;
  border-color: #374151;
  color: #e5e7eb;
}

html.dark .btn:hover {
  background: #282f48;
}

html.dark .btn-sm {
  background: #191c2b;
  border-color: #374151;
  color: #d1d5db;
}

html.dark .btn-sm:hover {
  background: #2a2c44;
  color: #a5b4fc;
}

html.dark .works-preview {
  background: #131622;
  border-color: #2b3350;
}

html.dark .works-cited-heading-preview {
  color: #f3f4f6;
  border-bottom-color: #374151;
}

html.dark .works-item {
  background: #181d2d;
  border-color: #2c344d;
}

html.dark .works-citation-text {
  color: #f3f4f6;
}

html.dark .works-intext-pill {
  background: #242548;
  color: #c4b5fd;
}

html.dark .source-types-section,
html.dark .faq-section {
  background: #121522;
  border-color: #23293e;
}

html.dark .mla-elements-flow {
  background: #161a29;
  border-color: #2a334d;
}

html.dark .mla-element-badge {
  background: #1f253a;
  border-color: #374151;
  color: #f3f4f6;
}

html.dark .checklist-box {
  background: #0f231c;
  border-color: #1e3a2f;
}

html.dark .checklist-box h3,
html.dark .checklist-box li {
  color: #6ee7b7;
}

html.dark .article-shell p,
html.dark .article-shell li {
  color: #d1d5db;
}

/* ── Responsive Rules ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .tool-card--featured {
    flex-direction: column;
  }
  .tool-card--featured .tool-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .tool-hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .works-tool-section {
    grid-template-columns: 1fr;
  }
  .source-types-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tool-card--featured .tool-card-body {
    padding: 24px;
  }
  .works-fields {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: 1;
  }
  .works-citation-text {
    padding-left: 24px;
    text-indent: -24px;
    font-size: 15px;
  }
  .works-item-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .works-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .works-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .works-actions .btn {
    width: 100%;
  }
}
