body {
  background: #edf3fb;
  color: #172033;
}

.site-header {
  min-height: 64px;
  border-bottom: 1px solid #d6e0ec;
  background: #ffffff;
  box-shadow: none;
}

.brand-mark {
  border-radius: 8px;
}

.main-nav a,
.login-link {
  color: #4e5561;
}

.signup-button,
.header-actions > a:last-child,
.header-tool-link {
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: #ffffff;
  color: #172033;
  box-shadow: none;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: 34px;
  max-width: 1180px;
  padding: 72px 24px 34px;
  text-align: left;
}

.tool-hero-card {
  display: contents;
}

.tool-hero-card::before,
.tool-hero-card::after,
.back-link {
  display: none;
}

.tool-hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: #172033;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.06;
}

.tool-hero-copy p:not(.eyebrow) {
  max-width: 700px;
  margin: 18px 0 0;
  color: #4e6174;
  font-size: 17px;
  line-height: 1.62;
}

.hero-eyebrow,
.eyebrow {
  color: #c8312b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta,
.quick-actions button,
.output-card-header button,
.report-actions button,
#edit-source-type-button {
  border-radius: 6px;
  font-weight: 800;
}

.primary-cta {
  border: 1px solid #ef3f34;
  background: #ef3f34;
  color: #ffffff;
}

.secondary-cta {
  border: 1px solid #bdc8d5;
  background: #ffffff;
  color: #172033;
}

.workflow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.workflow-chips span {
  border: 1px solid #bdc8d5;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #354457;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
}

.hero-workspace {
  border: 1px solid #b9c9dc;
  border-top: 4px solid #ef3f34;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.08);
  padding: 18px;
}

.workspace-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #526274;
  font-size: 12px;
  font-weight: 800;
}

.workspace-topline span {
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef3f34 0 24%, #f0b356 24% 48%, #0f8f5f 48% 72%, #1473e6 72%);
}

.workspace-topline em {
  color: #0f8f5f;
  font-style: normal;
}

.workspace-input-card,
.workspace-reference-card,
.workspace-score-grid div {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fbff;
}

.workspace-input-card {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px;
}

.workspace-input-card span,
.workspace-reference-card span {
  color: #c8312b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workspace-input-card strong {
  color: #172033;
  overflow-wrap: anywhere;
}

.workspace-input-card small {
  color: #5b6b7c;
  font-weight: 700;
}

.workspace-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.workspace-score-grid div {
  display: grid;
  gap: 3px;
  padding: 12px;
}

.workspace-score-grid strong {
  color: #172033;
  font-size: 15px;
}

.workspace-score-grid span {
  color: #66798c;
  font-size: 12px;
  font-weight: 700;
}

.workspace-reference-card {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 16px;
}

.workspace-reference-card i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #dce6f1;
}

.workspace-reference-card i:nth-child(3) {
  width: 82%;
}

.workspace-reference-card i:nth-child(4) {
  width: 58%;
}

.generator-shell {
  max-width: 1132px;
  padding: 10px 24px 42px;
}

.generator-panel,
.result-shell {
  border: 1px solid #b9c9dc;
  border-radius: 8px;
  box-shadow: none;
}

.generator-panel {
  border-top: 4px solid #ef3f34;
  padding: 26px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #dce5ef;
  padding-bottom: 22px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  color: #172033;
  font-size: 28px;
  line-height: 1.18;
}

.panel-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 9px 0 0;
  color: #526274;
  line-height: 1.55;
}

.panel-format-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.panel-format-pills span,
.style-filter {
  border-radius: 6px;
}

.panel-format-pills span {
  border: 1px solid #bdc8d5;
  background: #f8fbff;
  color: #354457;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 9px;
}

textarea,
input,
select {
  border: 1px solid #bdc8d5;
  border-radius: 6px;
}

textarea:focus,
input:focus,
select:focus {
  border-color: #1473e6;
  box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.12);
}

.style-filter.is-active {
  border-color: #172033;
  background: #172033;
}

.style-preview,
.expert-panel,
.metadata-editor,
.report-panel,
.quality-panel,
.detected-type-bar,
.output-card,
.insight-card {
  border-radius: 8px;
}

.result-shell {
  max-width: 1132px;
  margin-top: 0;
}

.workflow-section,
.export-section,
.quality-strip,
.citation-faq-section {
  max-width: 1132px;
  margin: 0 auto;
  padding: 54px 24px 0;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2,
.quality-strip h2,
.citation-faq-shell h2 {
  margin: 4px 0 0;
  color: #172033;
  font-size: 34px;
  line-height: 1.16;
}

.section-heading p:not(.eyebrow),
.quality-strip li,
.export-grid span {
  color: #526274;
  line-height: 1.55;
}

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

.workflow-grid article,
.export-grid a {
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  padding: 20px;
}

.workflow-grid span {
  color: #c8312b;
  font-size: 12px;
  font-weight: 900;
}

.workflow-grid h3,
.export-grid strong {
  display: block;
  margin: 10px 0 8px;
  color: #172033;
  font-size: 18px;
}

.workflow-grid p {
  margin: 0;
  color: #526274;
  line-height: 1.55;
}

.quality-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.quality-strip ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quality-strip li {
  border: 1px solid #cbd8e6;
  border-radius: 6px;
  background: #ffffff;
  font-weight: 800;
  padding: 12px;
}

.export-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.export-grid a {
  text-decoration: none;
}

.export-grid a:hover {
  border-color: #9fb4ca;
}

.citation-faq-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1fr);
  gap: 18px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.faq-intro-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.citation-faq-list details {
  border-color: #d9e2ec;
  border-radius: 8px;
  background: #f8fbff;
}

.citation-faq-list details[open] {
  border-color: #bdc8d5;
  box-shadow: none;
}

.tool-footer {
  margin-top: 64px;
}

@media (max-width: 920px) {
  .tool-hero,
  .quality-strip,
  .citation-faq-shell {
    grid-template-columns: 1fr;
  }

  .tool-hero {
    padding-top: 44px;
  }

  .tool-hero-copy h1 {
    font-size: 44px;
  }

  .panel-heading {
    display: grid;
  }

  .panel-format-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .tool-hero,
  .generator-shell,
  .workflow-section,
  .export-section,
  .quality-strip,
  .citation-faq-section {
    padding-inline: 14px;
  }

  .tool-hero-copy h1 {
    font-size: 34px;
  }

  .hero-actions,
  .workflow-chips {
    display: grid;
  }

  .hero-workspace {
    padding: 14px;
  }

  .workspace-score-grid,
  .workflow-grid,
  .quality-strip ul,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .generator-panel {
    padding: 18px;
  }
}
