:root {
  --blue: #063f86;
  --blue-dark: #052f67;
  --teal: #08aaa5;
  --orange: #f58220;
  --ink: #10294a;
  --muted: #637287;
  --line: #d8e2ec;
  --page: #f6f8fb;
  --accent: #7b42b4;
  --soft: #f5edff;
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%231e1b4b' stroke-width='.4' stroke-opacity='.065'%3E%3Cpath d='M50 0 62 38 100 50 62 62 50 100 38 62 0 50 38 38Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.shell { width: min(1120px, calc(100% - 30px)); margin: 0 auto; }
.site-header {
  min-height: 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 2px 7px;
}
.brand { grid-column: 2; width: 170px; }
.brand img { display: block; width: 100%; height: auto; }
.back {
  grid-column: 3;
  justify-self: end;
  color: #52647a;
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}
.back:hover { color: var(--blue); }

.panel {
  margin-bottom: 24px;
  padding: clamp(22px, 3.7vw, 42px);
  border: 1px solid rgba(203, 216, 230, .9);
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 34px rgba(22, 47, 82, .09);
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; color: #718096; font-size: .82rem; }
.breadcrumbs a { color: #526d8d; text-decoration: none; }
.hero { max-width: 790px; margin: 20px auto 34px; text-align: center; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: .8rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; color: var(--blue-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.05; }
.lead { margin: 13px auto 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.55; }

.group + .group { margin-top: 32px; }
.group-heading { margin: 0 0 14px; }
.group-heading h2 { margin: 0; color: var(--blue-dark); font-size: clamp(1.35rem, 2vw, 1.7rem); }
.group-heading p { margin: 5px 0 0; color: var(--muted); font-size: .92rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--card-accent, var(--accent));
  border-radius: 17px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(15, 40, 72, .05);
  transition: transform .16s ease, box-shadow .16s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(15, 40, 72, .12); }
.thumb {
  height: 145px;
  display: grid;
  place-items: center;
  padding: 17px;
  background: var(--card-soft, var(--soft));
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tool-copy { flex: 1; display: flex; flex-direction: column; padding: 15px 16px 16px; }
.tool-copy h2,
.tool-copy h3 { margin: 0; color: #16304f; font-size: 1.05rem; line-height: 1.25; }
.tool-copy p { margin: 8px 0 0; color: #65758a; font-size: .88rem; line-height: 1.42; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 12px; }
.tag { padding: 4px 7px; border-radius: 999px; color: var(--card-accent, var(--accent)); background: var(--card-soft, var(--soft)); font-size: .7rem; font-weight: 800; }
.site-footer { display: flex; justify-content: center; gap: 8px; padding: 0 12px 22px; color: #718096; font-size: .84rem; text-align: center; }
.site-footer a,
.site-footer button {
  padding: 0;
  border: 0;
  color: #526d8d;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media (max-width: 850px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .shell { width: min(100% - 20px, 1120px); }
  .site-header { min-height: 86px; grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; justify-self: start; width: 145px; }
  .back { grid-column: 2; }
  .panel { padding: 20px 14px 25px; border-radius: 21px; }
  .hero { margin: 18px auto 27px; }
  .card-grid { grid-template-columns: 1fr; gap: 11px; }
  .collection-grid { grid-template-columns: 1fr; }
  .tool-card { display: grid; grid-template-columns: 125px minmax(0, 1fr); min-height: 128px; }
  .thumb { height: 100%; min-height: 128px; padding: 12px; }
  .tool-copy { padding: 13px 13px 14px; }
}
@media (max-width: 390px) {
  .tool-card { grid-template-columns: 105px minmax(0, 1fr); }
  .thumb { min-height: 122px; padding: 10px; }
  .tool-copy p { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
