:root {
  color-scheme: light;
  font: 15px/1.6 "Inter", "Helvetica Neue", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8fa;
  color: #0f172a;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero {
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 32px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 12px;
  color: #475569;
}

.meta {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.controls {
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin: 0 0 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.field input,
.field select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 1rem;
  background: #f8fafc;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.reset-button {
  margin-top: auto;
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 0.92rem;
  cursor: pointer;
}

.reset-button:hover,
.reset-button:focus {
  text-decoration: underline;
}

.result-summary {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
}

.table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

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

.table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.92rem;
  color: #475569;
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.table td {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.95rem;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.table tbody tr:first-child td {
  border-top: none;
}

.amazon-cell {
  text-align: right;
}

.amazon-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
  font-weight: 500;
  font-size: 0.9rem;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.amazon-button::after {
  content: "↗";
  font-size: 0.75em;
}

.amazon-button:hover,
.amazon-button:focus {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  text-decoration: none;
}

@media (max-width: 720px) {
  .amazon-button {
    font-size: 0.85rem;
    padding: 5px 11px;
  }
}

.empty-state {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  color: #475569;
  font-weight: 500;
  background: #f8fafc;
}

.seo-content {
  margin-top: 48px;
  padding: 24px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.seo-content h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: #0f172a;
}

.seo-content h3 {
  margin: 24px 0 8px;
  font-size: 1.1rem;
  color: #1e293b;
}

.seo-content p,
.seo-content dd {
  margin: 10px 0;
  color: #475569;
}

.seo-content dt {
  margin-top: 18px;
  font-weight: 600;
  color: #1e293b;
}

.material-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 12px;
  font-size: 0.95rem;
}

.material-table th,
.material-table td {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  vertical-align: top;
}

.material-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.material-table td {
  color: #475467;
}

.material-table td:first-child {
  font-weight: 600;
  color: #1d2939;
  width: 120px;
}

.printer-recommendations {
  margin: 12px 0 16px 18px;
  color: #475467;
  line-height: 1.7;
}

.printer-recommendations li {
  margin-bottom: 8px;
}

.content-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  background: #f9fafb;
  margin: 16px 0;
}

.note {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 8px;
}

.scroll-box {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.simple-table th,
.simple-table td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.simple-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.site-footer {
  margin: 48px 0 24px;
  text-align: center;
  color: #475467;
  font-size: 0.95rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 28px 16px 48px;
  }

  .controls {
    padding: 16px;
  }

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

  .filter-form .field {
    min-width: 0;
  }

  .filter-form .field:last-child {
    grid-column: 1 / -1;
  }

  .table {
    display: block;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: grid;
    gap: 12px;
  }

  .table tr {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
  }

  .table td {
    display: grid;
    grid-template-columns: 44% 1fr;
    gap: 6px;
    border-top: none;
    padding: 0;
    align-items: center;
    width: calc(50% - 6px);
    box-sizing: border-box;
  }

  .table td::before {
    content: attr(data-label);
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 600;
  }

  .table td .cell-value {
    font-size: 0.96rem;
    color: #0f172a;
  }

  .table td.amazon-cell {
    grid-template-columns: 1fr;
    justify-content: flex-end;
    width: 100%;
  }

  .table td.amazon-cell::before {
    display: none;
  }

  .table td.amazon-cell .amazon-button {
    justify-self: end;
  }

  .amazon-button {
    width: fit-content;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.55rem;
  }

  .result-summary {
    font-size: 0.9rem;
  }

  .table tr {
    padding: 12px 14px;
  }
}
