:root {
  --bg-page: #ffffff;
  --bg-card: #f8f9fa;
  --bg-footer: #0f172a;
  --bg-footer-alt: #1e2537;

  --text-main: #0f172a;
  --text-dim: #4b5563;
  --text-invert: #ffffff;
  --accent: #3abeff;
  --border-soft: #e5e7eb;

  --radius-lg: 1rem;
  --radius-sm: .5rem;

  --max-width-narrow: 680px;
  --max-width-wide: 1200px;

  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-stack);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width-wide);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: auto;
  margin-right: auto;
}

.narrow {
  max-width: var(--max-width-narrow);
}

h1,
h2,
h3,
h4 {
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: .75rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 60ch;
}

.section-title {
  font-size: clamp(1.4rem, 1vw + 1rem, 1.8rem);
  margin-top: 0;
  margin-bottom: .5rem;
  font-weight: 600;
  color: var(--text-main);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}

/* HEADER */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background-color: #fff;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  min-width: 200px;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
  background: #fff;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  margin-left: .5rem;
}
.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}
.brand-tagline {
  color: var(--text-dim);
  font-size: .8rem;
  line-height: 1.2;
}

/* NAV */

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  font-size: .9rem;
  margin-left: 1rem;
  margin-right: 1rem;
}
.main-nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  padding-bottom: .25rem;
  border-bottom: 2px solid transparent;
}
.main-nav a.active,
.main-nav a:hover,
.main-nav a:focus {
  border-bottom-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* SEARCH */

.search-bar {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .5rem;
  width: 100%;
  max-width: 320px;
}
.search-input {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  font-size: .9rem;
}
.search-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.search-btn {
  background-color: var(--accent);
  color: #000;
  border: 0;
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.search-btn:hover,
.search-btn:focus {
  filter: brightness(1.05);
}

/* MAIN LAYOUT SECTIONS */

.main-content {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.hero-copy h1 {
  font-size: clamp(1.5rem, 0.5vw + 1.2rem, 2rem);
  margin-top: 0;
  margin-bottom: .75rem;
  font-weight: 600;
}
.hero-copy .lead {
  margin-top: 0;
  margin-bottom: 2rem;
}

/* CATEGORY GRID ON HOMEPAGE */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px,100%),1fr));
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.category-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--text-main);
  display: block;
}
.category-card h3 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}
.category-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.4;
}
.category-card:hover,
.category-card:focus {
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgb(0 0 0 / 6%);
}

/* TOOL GRID */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px,100%),1fr));
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.tool-card {
  border: 1px solid var(--border-soft);
  background-color: #fff;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgb(0 0 0 / 3%);
}
.tool-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.tool-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}
.tool-badge {
  background-color: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .3rem .5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.tool-desc {
  margin-top: .5rem;
  margin-bottom: .75rem;
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.4;
  flex: 1;
}
.tool-extras {
  margin: 0 0 .75rem;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--text-main);
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  border: 1px solid var(--border-soft);
}
.tool-link {
  font-size: .85rem;
  font-weight: 600;
  align-self: flex-start;
  background-color: var(--accent);
  color: #000;
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  border: 0;
  line-height: 1.2;
}
.tool-link:hover,
.tool-link:focus {
  filter: brightness(1.05);
  text-decoration: none;
}

/* INFO CARD / ARTICLE */

.info-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgb(0 0 0 / 2%);
  max-width: 800px;
}
.inline-link {
  color: var(--accent);
  font-weight: 600;
}

.text-article {
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.6;
}
.text-article p {
  margin-bottom: 1rem;
  color: var(--text-main);
}
.text-article ul {
  padding-left: 1.2rem;
}
.text-article li {
  margin-bottom: .5rem;
  color: var(--text-main);
}
.article-head h1 {
  margin-top: 0;
}
.blog-meta {
  font-size: .8rem;
  color: var(--text-dim);
  margin-top: 0;
  margin-bottom: 1.5rem;
}
.blog-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
.blog-card {
  border: 1px solid var(--border-soft);
  background-color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 20px rgb(0 0 0 / 3%);
  padding: 1rem 1.25rem;
}
.blog-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.blog-card h2 a {
  text-decoration: none;
  color: var(--text-main);
}
.blog-card h2 a:hover,
.blog-card h2 a:focus {
  color: var(--accent);
  text-decoration: underline;
}
.blog-excerpt {
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.4;
  margin-bottom: 0;
}
.article-sep {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 2rem 0;
}
.article-outro {
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-dim);
}

/* FOOTER */

.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-invert);
  margin-top: 2rem;
  font-size: .9rem;
}
.footer-inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) {
  .footer-inner {
    grid-template-columns: repeat(auto-fit, minmax(min(220px,100%),1fr));
  }
}
.footer-col h4 {
  margin-top: 0;
  margin-bottom: .5rem;
  color: var(--text-invert);
  font-size: .9rem;
  font-weight: 600;
}
.footer-small {
  color: #cbd5e1;
  font-size: .8rem;
  line-height: 1.4;
  margin-top: .5rem;
  margin-bottom: 0;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-list li {
  margin-bottom: .5rem;
}
.footer-list a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: .85rem;
  line-height: 1.4;
}
.footer-list a:hover,
.footer-list a:focus {
  color: var(--accent);
  text-decoration: underline;
}

/* FOOTER BASE */

.footer-base {
  background-color: var(--bg-footer-alt);
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: .8rem;
  color: #fff;
}
.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  align-items: center;
  justify-content: space-between;
}
.footer-base-inner p {
  margin: 0;
}

/* CATEGORY HEADER */

.cat-header .lead {
  margin-top: .5rem;
  margin-bottom: 2rem;
  max-width: 60ch;
  font-size: 1rem;
}

/* UTILITY */

.hidden {
  display: none !important;
}