:root {
  --ink: #101a29;
  --muted: #5f665f;
  --paper: #fbf7ec;
  --panel: #fffdf7;
  --line: #d9ceb7;
  --moss: #2d5a34;
  --moss-soft: #e4eddd;
  --amber: #b87924;
  --amber-soft: #f5e5c9;
  --sky: #2c6e9f;
  --sky-soft: #dfeef6;
  --warn-soft: #fbedd5;
  --shadow: 0 14px 34px rgba(33, 28, 20, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1440px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5.6vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.15;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.intro {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: 1.05rem;
}

.trust-note {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid #c7d8df;
  background: #f6fbfc;
  box-shadow: inset 0 0 0 4px rgba(44, 110, 159, 0.05);
}

.trust-note p {
  margin: 0;
}

.paw-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--sky);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-panel,
.content-grid article,
.examples-section,
.review-section,
.faq-section {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 18px;
  margin-bottom: 22px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) 190px;
  gap: 14px;
  align-items: end;
}

.control-grid label {
  display: grid;
  gap: 6px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.control-grid label span {
  color: #314131;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

select,
input {
  inline-size: -webkit-fill-available;
  inline-size: stretch;
  min-height: 42px;
  border: 1px solid #c7bca5;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 4px;
}

select:focus,
input:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(44, 110, 159, 0.28);
  outline-offset: 2px;
}

.primary-action {
  min-height: 48px;
  border: 1px solid #24462a;
  border-radius: 6px;
  background: var(--moss);
  color: #fffdf6;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.chip-row,
.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.chip,
.action-strip button,
.name-card button,
.favorite-remove {
  border: 1px solid #bdb29d;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 12px;
}

.chip.active {
  border-color: var(--moss);
  background: var(--moss-soft);
  color: var(--moss);
  font-weight: 800;
}

.action-strip {
  justify-content: flex-end;
}

.action-strip p {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-weight: 700;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  margin-top: 18px;
}

.results-area h2,
.favorites-panel h2 {
  font-size: 1.2rem;
}

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

.name-card {
  position: relative;
  min-height: 214px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid #d5c8ad;
  background: var(--panel);
}

.name-card::before {
  content: attr(data-index);
  position: absolute;
  top: 0;
  left: 14px;
  width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--moss);
  color: #fff;
  font-weight: 900;
  border-radius: 0 0 8px 8px;
}

.name-card h3 {
  margin-top: 8px;
  padding-left: 38px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1.06;
}

.name-card p {
  margin: 0;
}

.name-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #c4baa4;
  border-radius: 999px;
  background: var(--moss-soft);
  color: #25482a;
  font-size: 0.78rem;
  font-weight: 700;
}

.name-card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e6dcc9;
}

.name-card button {
  flex: 1;
  border-radius: 4px;
}

.favorite-toggle[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #7a4d13;
}

.favorites-panel {
  padding: 16px;
  border: 1px solid #d5c8ad;
  background: #fbf6e9;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.favorites-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.favorites-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #ded2bb;
  background: var(--panel);
}

.favorite-remove {
  padding: 6px 9px;
}

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

.content-grid article,
.examples-section,
.review-section,
.faq-section {
  padding: 24px;
}

.examples-section,
.review-section,
.faq-section {
  margin-top: 18px;
}

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

.section-lede {
  max-width: 760px;
  margin: 0 0 16px;
  color: var(--muted);
}

.examples-grid article {
  padding: 14px;
  border-left: 4px solid var(--moss);
  background: #f8f1e3;
}

.examples-grid p {
  margin: 0;
}

.review-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.review-section aside {
  padding: 16px;
  background: var(--warn-soft);
  border: 1px solid #e3c58f;
}

.check-list {
  display: grid;
  gap: 8px;
  padding-left: 1.2rem;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid #d8ccb7;
  background: var(--panel);
}

summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 14px 14px;
}

@media (max-width: 1080px) {
  .hero,
  .workbench,
  .review-section,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

  .control-grid label {
    border-right: 0;
    padding-right: 0;
  }

  .primary-action {
    grid-column: span 2;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100vw - 28px), 620px);
    padding-top: 18px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .trust-note {
    grid-template-columns: 1fr;
  }

  .tool-panel,
  .content-grid article,
  .examples-section,
  .review-section,
  .faq-section {
    padding: 16px;
  }

  .control-grid,
  .name-grid,
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .primary-action {
    grid-column: auto;
  }

  .action-strip {
    align-items: stretch;
  }

  .action-strip p,
  .action-strip button {
    align-self: stretch;
  }

  .name-card h3 {
    font-size: 1.45rem;
  }
}
