:root {
  color-scheme: light;
  --ink: #17222b;
  --muted: #5a6873;
  --line: #d9e2e7;
  --panel: #ffffff;
  --soft: #eef6f5;
  --soft-2: #f6f8fb;
  --teal: #087c7a;
  --teal-dark: #065f5d;
  --blue: #234c73;
  --gold: #b7791f;
  --danger: #ad3d2f;
  --shadow: 0 18px 50px rgba(22, 48, 72, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfd;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: var(--teal-dark);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 15px;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--teal-dark);
}

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
  padding: 34px 20px 26px;
  background:
    linear-gradient(90deg, rgba(251, 252, 253, 0.98) 0%, rgba(251, 252, 253, 0.91) 48%, rgba(251, 252, 253, 0.78) 100%),
    linear-gradient(135deg, #e6f3f2 0%, #ffffff 46%, #f7efe2 100%);
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 28px;
  align-items: start;
}

.hero-copy {
  padding-top: 12px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 6vw, 70px);
}

.subtitle {
  max-width: 720px;
  margin: 16px 0 22px;
  color: #43515c;
  font-size: clamp(18px, 2.4vw, 23px);
}

.definition-card {
  max-width: 780px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.definition-card p {
  margin: 0;
}

.hero-example {
  max-width: 780px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid #b9dedd;
  border-radius: 8px;
  background: #f2fbfa;
}

.hero-example p {
  margin: 8px 0 0;
}

.hero-example .input-label {
  margin-top: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-example .format-template {
  margin-top: 6px;
  color: #263b45;
}

.hero-example .example-note {
  color: #52636d;
  font-size: 14px;
}

.review-warning {
  max-width: 780px;
  margin: 18px 0;
  padding: 15px 16px;
  border: 1px solid #e3bd78;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fff8e8;
  color: #593d0c;
}

.review-warning strong {
  color: #6f4308;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0 24px;
  list-style: none;
  color: #3f4d58;
  font-size: 14px;
}

.trust-list li {
  min-height: 38px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 226, 231, 0.92);
  border-radius: 7px;
}

.trust-list svg,
.button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.visual-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 720px;
}

.hero-media {
  max-width: 720px;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 32px rgba(22, 48, 72, 0.08);
}

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

.visual-tile {
  min-height: 94px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(22, 48, 72, 0.06);
}

.visual-tile strong {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
}

.mini-lines {
  display: grid;
  gap: 7px;
}

.mini-lines i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #d8e7ea;
}

.mini-lines i:nth-child(2) {
  width: 78%;
  background: #e6d5b8;
}

.mini-lines i:nth-child(3) {
  width: 54%;
}

.generator {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.generator.compact {
  margin: 22px 0 10px;
}

.generator-head {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfb;
}

.generator-head h2 {
  margin: 0;
  font-size: 20px;
}

.generator-body {
  padding: 18px;
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button,
.button,
.icon-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.tab-button {
  padding: 9px 8px;
  font-size: 13px;
}

.tab-button:hover,
.button:hover,
.icon-button:hover {
  border-color: #8fbfc0;
  transform: translateY(-1px);
}

.tab-button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.quick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
}

.pmid-quick-row {
  grid-template-columns: minmax(0, 1fr) 180px auto;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: #364650;
  font-size: 13px;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfdce1;
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(8, 124, 122, 0.16);
  border-color: var(--teal);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.button {
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button.secondary {
  color: var(--teal-dark);
  background: #eff8f7;
}

.button.warning {
  color: #7a4a0a;
  background: #fff8e8;
  border-color: #e8d7ad;
}

.output {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.result-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.result-title {
  margin: 0;
  padding: 10px 12px;
  color: #42505a;
  background: #f4f7f8;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-text {
  min-height: 68px;
  margin: 0;
  padding: 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.notice {
  margin: 2px 0 0;
  padding: 11px 12px;
  border-radius: 7px;
  color: #5f4b17;
  background: #fff8e8;
  border: 1px solid #ead9af;
  font-size: 14px;
}

.status-line {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.validation {
  display: none;
  margin: 2px 0 0;
  padding: 11px 12px;
  border-radius: 7px;
  color: #6a2f27;
  background: #fff0ee;
  border: 1px solid #efc4bd;
  font-size: 14px;
}

.validation.show {
  display: block;
}

.citation-list {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.citation-list-head {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f6f8fb;
  border-bottom: 1px solid var(--line);
}

.citation-list-head h3 {
  margin: 0;
  font-size: 16px;
}

.citation-items {
  margin: 0;
  padding: 12px 12px 12px 34px;
}

.citation-items li {
  margin-bottom: 10px;
  padding-right: 6px;
  font-family: Georgia, "Times New Roman", serif;
}

.empty-list {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

.pmid-batch-tool {
  margin: 26px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pmid-batch-head,
.pmid-batch-body {
  padding: 18px;
}

.pmid-batch-head {
  border-bottom: 1px solid var(--line);
  background: #f8fbfb;
}

.pmid-batch-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.pmid-batch-head p {
  margin: 0;
  color: var(--muted);
}

.pmid-batch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: end;
}

.pmid-batch-grid textarea {
  min-height: 122px;
}

.pmid-batch-actions {
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.batch-results {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style-position: inside;
}

.batch-result {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.batch-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-result p {
  margin: 10px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
}

.content {
  padding: 54px 20px;
}

.content-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 36px);
}

.section h3 {
  margin: 24px 0 8px;
  font-size: 20px;
}

.section p {
  color: #3f4d58;
}

.step-list {
  display: grid;
  gap: 10px;
  padding-left: 24px;
  color: #3f4d58;
  line-height: 1.7;
}

.step-list code {
  color: var(--teal-dark);
  background: #eef8f7;
  border-radius: 5px;
  padding: 2px 5px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.format-card,
.faq-item,
.mistake,
.example-card,
.io-example-card,
.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  min-width: 0;
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tool-card:hover {
  border-color: #8fbfc0;
  box-shadow: 0 10px 28px rgba(22, 48, 72, 0.08);
  transform: translateY(-1px);
}

.tool-card strong {
  color: var(--blue);
  font-size: 17px;
}

.tool-card span {
  color: #3f4d58;
  font-size: 14px;
}

.io-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.io-example-card h3 {
  margin-top: 0;
}

.input-label {
  margin: 14px 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.format-template {
  margin: 12px 0;
  padding: 13px;
  border-radius: 7px;
  background: #f4f8fa;
  border: 1px solid #d8e5ea;
  font-family: Georgia, "Times New Roman", serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.format-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.format-table th,
.format-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.format-table th {
  color: var(--blue);
  background: #f4f8fa;
}

.format-table tr:last-child td {
  border-bottom: 0;
}

.comparison-table {
  max-width: 100%;
  overflow-x: hidden;
}

.comparison-table table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comparison-table th {
  color: var(--blue);
  background: #f4f8fa;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq-grid {
  display: grid;
  gap: 12px;
}

.faq-item h3,
.mistake h3,
.example-card h3 {
  margin-top: 0;
}

.page-hero {
  padding: 58px 20px 36px;
  background: linear-gradient(135deg, #eef7f7 0%, #ffffff 62%, #f8f2e8 100%);
}

.home-hub {
  padding-bottom: 46px;
}

.page-hero-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.side-note {
  position: sticky;
  top: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.site-footer {
  padding: 34px 20px;
  background: #17222b;
  color: #d8e2e6;
}

.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: #b7e7e4;
}

.footer-links {
  max-width: 1180px;
  margin: 22px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 226, 230, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 14px;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 50;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  padding: 10px 14px;
  color: #fff;
  background: #17222b;
  border-radius: 7px;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .page-layout,
  .two-col,
  .tool-card-grid,
  .io-example-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-top: 0;
  }

  .side-note {
    position: static;
  }
}

@media (max-width: 680px) {
  .nav {
    align-items: flex-start;
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .nav-links a {
    min-height: 36px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
  }

  .hero,
  .content,
  .page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .trust-list,
  .visual-strip,
  .type-tabs,
  .field-grid,
  .quick-row,
  .pmid-batch-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .generator-head,
  .citation-list-head,
  .batch-result-head,
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions,
  .button {
    width: 100%;
  }

  .tool-card,
  .format-card,
  .example-card,
  .io-example-card,
  .faq-item,
  .mistake {
    min-height: auto;
    padding: 16px;
  }
}
