@import url('./reset.css');
@import url('./bootstrap.css');
@import url('./prism.css');
@import url('./prism-override.css');
@import url('./dark-mode.css');
@import url('./typography.css');
@import url('./banner.css');
@import url('./banner-fonts.css');
@import url('./fonts.css');

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

h1, h2, h3, h4, h5, h6, p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--color-heading);
}

/* External link icon */
a[href^="http"]::after,
a[href^="https://"]::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 3px;
  background-color: currentColor;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/><path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/></svg>');
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/><path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/></svg>');
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
  opacity: 0.6;
  vertical-align: baseline;
}

/* Don't show external icon for internal links that start with current domain */
a[href^="https://fld.sh"]::after,
a[href^="http://fld.sh"]::after,
/* Don't show external icon in navigation */
nav a[href^="http"]::after,
nav a[href^="https://"]::after,
/* Don't show external icon for RSS feed links */
a[href$=".xml"]::after,
/* Don't show external icon on auto-tag links */
.auto-tag-link::after,
/* Don't show external icon on tool card CTA links (they have their own arrow) */
.tool-card-cta::after {
  content: none;
}

/* -----------------------------------------------------------------------
   Affiliate link & disclosure styles
   ----------------------------------------------------------------------- */

/* Affiliate disclosure notice — shown at the top of posts and the tools page */
.affiliate-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  border-left: 3px solid var(--color-heading, #555);
  background-color: transparent;
  color: var(--color-text-muted, #666);
  border-radius: 0 4px 4px 0;
}

.affiliate-disclosure-icon {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.6;
}

/* Tools page — category section */
.tools-category-title {
  border-bottom: 1px solid var(--color-border, #e0e0e0);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

/* Tools grid — responsive card layout */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Individual tool card */
.tool-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-card-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* Remove underline from card title link by default, show on hover */
.tool-card-link {
  text-decoration: none;
}

.tool-card-link:hover {
  text-decoration: underline;
}

.tool-card-description {
  font-size: 0.9rem;
  color: var(--color-text-muted, #555);
  margin: 0;
  flex: 1;
}

/* CTA link at the bottom of each card */
.tool-card-cta {
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 0.25rem;
  align-self: flex-start;
}

.tool-card-cta:hover {
  text-decoration: underline;
}

