:root {
  --ink: #1f2724;
  --muted: #58645e;
  --subtle: #7a817c;
  --paper: #ffffff;
  --canvas: #f3f5f4;
  --band: #eef2ef;
  --line: #d9dfdc;
  --line-strong: #aebbb5;
  --green: #2f6b50;
  --blue: #2f6f9f;
  --amber: #9a681f;
  --red: #9b3d39;
  --shadow: 0 12px 28px rgb(31 39 36 / 8%);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(47 111 159 / 28%);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgb(255 255 255 / 95%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max-width));
  height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 5px;
  background: var(--ink);
  border-radius: 6px;
}

.brand-mark span {
  background: var(--paper);
  border-radius: 2px;
}

.brand-mark span:nth-child(2) {
  background: #74a88f;
}

.brand-mark span:nth-child(3) {
  background: #d7a84b;
}

.brand-mark span:nth-child(4) {
  background: #6f93b8;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 650;
}

.main-nav a {
  color: #44504a;
}

.main-nav a[aria-current="page"] {
  color: var(--ink);
}

.catalog-shell,
.text-page {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.eyebrow,
.product-kicker,
.section-kicker {
  margin: 0 0 9px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: 44px;
}

.home-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.home-hero-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 54px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  align-items: end;
  gap: 56px;
}

.hero-copy > p:last-child {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-search {
  display: grid;
  gap: 9px;
}

.hero-search span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
}

.hero-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgb(31 39 36 / 7%);
}

.hero-search input::placeholder {
  color: #758079;
}

.service-points {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.service-points > div {
  min-width: 0;
  padding: 22px 28px;
}

.service-points > div + div {
  border-left: 1px solid var(--line);
}

.service-points strong,
.service-points span {
  display: block;
}

.service-points strong {
  font-size: 15px;
}

.service-points span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.tool-catalog {
  padding: 46px 0 72px;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.catalog-heading h2 {
  font-size: 30px;
}

.catalog-heading > p {
  margin: 0 0 2px;
  color: var(--muted);
}

.catalog-controls {
  margin-top: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-grid button {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #3b4741;
  font-size: 14px;
  font-weight: 650;
}

.filter-grid button:hover {
  border-color: var(--line-strong);
}

.filter-grid button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-grid span {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgb(31 39 36 / 9%);
  font-size: 12px;
}

.filter-grid button[aria-pressed="true"] span {
  background: rgb(255 255 255 / 18%);
}

.result-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.result-bar strong {
  color: var(--ink);
}

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

.tool-card {
  min-width: 0;
  min-height: 190px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  padding: 19px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 3px 12px rgb(31 39 36 / 4%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tool-card:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 9px 22px rgb(31 39 36 / 8%);
  transform: translateY(-2px);
}

.tool-card[hidden] {
  display: none;
}

.tool-card-category {
  width: fit-content;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--tone, var(--green));
  background: color-mix(in srgb, var(--tone, var(--green)) 9%, white);
  border: 1px solid color-mix(in srgb, var(--tone, var(--green)) 28%, white);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 740;
}

.tool-card h3 {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
  font-size: 19px;
  line-height: 1.32;
}

.tool-card p {
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.tool-card-arrow {
  justify-self: end;
  color: var(--green);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.tool-page {
  width: min(calc(100% - 40px), 1000px);
  margin: 0 auto;
  padding: 30px 0 72px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--green);
  font-weight: 700;
}

.tool-hero {
  max-width: 820px;
  padding: 34px 0 28px;
}

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

.tool-hero > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.tool-workspace {
  min-width: 0;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

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

.field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
}

.field input,
.field select {
  min-height: 44px;
  padding: 8px 11px;
}

.field input[type="color"] {
  padding: 5px;
}

.field input[type="file"] {
  height: auto;
}

.field textarea {
  min-height: 120px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.check-field {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.check-field input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--green);
}

.button-row button,
.download-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 720;
}

.button-row button:hover,
.download-link:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}

.button-row button:disabled {
  cursor: wait;
  opacity: 0.55;
}

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

.result-grid output {
  min-width: 0;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 13px;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.result-grid strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.3;
}

.result-grid span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.snippet-preview {
  margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.snippet-preview p {
  margin: 0;
}

.snippet-preview [data-preview-title] {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.35;
}

.snippet-preview [data-preview-url] {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
  color: #18733d;
  font-size: 13px;
}

.snippet-preview [data-preview-description] {
  color: #4d5156;
  font-size: 14px;
}

.contrast-sample {
  min-height: 150px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 28px;
  font-weight: 720;
  text-align: center;
}

.tool-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.image-preview {
  min-height: 0;
  margin-top: 16px;
}

.image-preview:has(img:not([hidden])) {
  padding: 12px;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.image-preview img {
  max-width: 100%;
  max-height: 540px;
  display: block;
  margin: 0 auto;
}

.color-palette {
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.color-swatch {
  min-width: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: 9px;
}

.color-swatch strong,
.color-swatch span {
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 12px;
}

.type-preview {
  width: 100%;
  min-height: 150px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.scale-preview {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.scale-bar {
  width: 40%;
  min-width: 54px;
  max-width: 100%;
  height: 18px;
  border: 2px solid var(--ink);
  border-top: 0;
  background: linear-gradient(90deg, var(--ink) 0 25%, var(--paper) 25% 50%, var(--ink) 50% 75%, var(--paper) 75% 100%);
}

.scale-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.barcode-preview {
  width: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.barcode-preview canvas {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.text-page {
  max-width: 880px;
  padding: 44px 0 72px;
}

.text-page h1 {
  font-size: 44px;
}

.text-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.text-section h2 {
  font-size: 24px;
}

.text-section p,
.text-page > p {
  color: var(--muted);
}

.text-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  background: #1f2724;
  color: #f4efe5;
}

.footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 120px;
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #c6d0c9;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  font-weight: 650;
}

@media (max-width: 980px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
  }

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

@media (max-width: 720px) {
  .header-inner {
    width: min(calc(100% - 28px), var(--max-width));
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .catalog-shell,
  .home-hero-inner,
  .service-points,
  .text-page,
  .tool-page,
  .footer-inner {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .catalog-shell {
    padding-top: 26px;
  }

  .home-hero-inner,
  .tool-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-inner {
    padding: 38px 0 34px;
  }

  .service-points {
    grid-template-columns: 1fr;
  }

  .service-points > div {
    padding: 16px 0;
  }

  .service-points > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: 34px;
  }

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

  .tool-hero {
    padding: 28px 0 22px;
  }

  .tool-hero h1,
  .text-page h1 {
    font-size: 34px;
  }

  .tool-workspace {
    padding: 16px;
  }

  .field.full {
    grid-column: auto;
  }

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

  .hero-copy > p:last-child {
    font-size: 16px;
  }

  .tool-card {
    min-height: auto;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .button-row button,
  .download-link {
    width: 100%;
  }
}
