/* CoderTools.io — shared layout, theme, header, footer */
:root {
  --background: #fafafa;
  --foreground: #1a202c;
  --card-bg: #ffffff;
  --accent: #3182ce;
  --border: #e2e8f0;
  --error-bg: #fc8181;
  --error-fg: #1a202c;
  --success-bg: #48bb78;
  --warning-bg: #ed8936;
  --muted: #718096;
}
[data-theme="dark"] {
  --background: #1a202c;
  --foreground: #e2e8f0;
  --card-bg: #2d3748;
  --accent: #63b3ed;
  --border: #4a5568;
  --error-bg: #e53e3e;
  --error-fg: #fff;
  --success-bg: #38a169;
  --warning-bg: #dd6b20;
  --muted: #a0aec0;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--foreground);
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
  background-color: var(--background);
  background-image:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(255, 214, 102, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 100%, rgba(104, 211, 145, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(99, 179, 237, 0.14) 0%, transparent 60%);
  background-attachment: fixed;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 85% 55% at 0% 0%, rgba(214, 158, 46, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 75% 50% at 100% 100%, rgba(56, 161, 105, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 65% 45% at 50% 0%, rgba(99, 179, 237, 0.16) 0%, transparent 62%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(128, 90, 213, 0.12) 0%, transparent 55%);
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}
[data-theme="dark"] .site-header {
  background: rgba(45, 55, 72, 0.88);
}
.site-brand {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.25rem;
}
.site-brand:hover { color: var(--accent); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-nav a {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }
/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  padding: 0;
  border: none;
  background: var(--border);
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.3s ease;
}
.theme-toggle .handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  pointer-events: none;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
[data-theme="dark"] .theme-toggle .handle { transform: translateX(30px); }
[data-theme="dark"] .theme-toggle .handle .sun-icon { opacity: 0; transform: scale(0.5); }
[data-theme="dark"] .theme-toggle .handle .moon-icon { opacity: 1; transform: scale(1.2); }
:not([data-theme="dark"]) .theme-toggle .handle .sun-icon { opacity: 1; transform: scale(1.1); }
:not([data-theme="dark"]) .theme-toggle .handle .moon-icon { opacity: 0; transform: scale(0.5); }
/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer > p a { color: var(--accent); }
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.site-footer-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.site-footer-nav a:hover {
  color: var(--accent);
  background: var(--card-bg);
  border-color: var(--border);
  text-decoration: none;
}
.site-footer-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--card-bg);
  border-color: var(--border);
}
.privacy-badge a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.privacy-badge a:hover { text-decoration: underline; }
.privacy-badge .sep {
  color: var(--border);
  margin: 0 0.15rem;
  user-select: none;
}
#related-tools > .privacy-badge,
section[id="related-tools"] > .privacy-badge {
  margin: 0 0 1.25rem;
}
/* JWT decoder */
.jwt-tool .tool-card { margin-bottom: 1.25rem; }
.jwt-tool .jwt-output { display: none; }
.jwt-tool .jwt-output.is-visible { display: block; }
.jwt-section-title {
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.jwt-part { margin-bottom: 1.25rem; }
.jwt-part:last-child { margin-bottom: 0; }
.jwt-part-title {
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.jwt-part-title .jwt-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.jwt-tag-header { background: #e53e3e33; color: #e53e3e; border: 1px solid #e53e3e55; }
.jwt-tag-payload { background: #d69e2e33; color: #d69e2e; border: 1px solid #d69e2e55; }
.jwt-tag-signature { background: #38a16933; color: #38a169; border: 1px solid #38a16955; }
.jwt-output-block {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow-y: auto;
  max-width: 100%;
}
.token-visual {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  max-width: 100%;
}
.token-part-row { min-width: 0; max-width: 100%; }
.token-part-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
.token-part {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
  overflow-x: auto;
}
.token-header { background: #e53e3e18; border: 1px solid #e53e3e55; }
.token-payload { background: #d69e2e18; border: 1px solid #d69e2e55; }
.token-signature { background: #38a16918; border: 1px solid #38a16955; }
.jwt-message {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.jwt-message-error { background: var(--error-bg); color: var(--error-fg); }
.jwt-message-warning { background: var(--warning-bg); color: #fff; }
.jwt-message-success { background: var(--success-bg); color: #fff; }
.claim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.claim-row:last-child { border-bottom: none; }
.claim-key { font-weight: 600; color: var(--accent); min-width: 8rem; }
.claim-value { color: var(--foreground); word-break: break-word; }
.jwt-info-card ul { margin: 0.5rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.jwt-info-card li { margin-bottom: 0.35rem; }
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tool-status {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.tool-status.error { color: var(--error-bg); }
/* Trust pages */
.trust-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  width: 100%;
}
.trust-subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  margin-bottom: 1.25rem;
}
.trust-subnav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.trust-subnav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.trust-subnav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(49, 130, 206, 0.08);
}
[data-theme="dark"] .trust-subnav a[aria-current="page"] {
  background: rgba(99, 179, 237, 0.12);
}
.trust-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 8px 32px rgba(49, 130, 206, 0.08);
}
[data-theme="dark"] .trust-card {
  background: rgba(45, 55, 72, 0.82);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(99, 179, 237, 0.18);
}
.trust-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.trust-header h1 {
  margin: 0 0 0.75rem;
  font-size: 1.85rem;
  color: var(--foreground);
  line-height: 1.25;
}
.trust-lead {
  margin: 0 auto;
  max-width: 38rem;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.65;
}
.trust-meta {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.trust-body h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}
.trust-body h2:first-child { margin-top: 0; }
.trust-body p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}
.trust-body ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.trust-body li {
  margin-bottom: 0.4rem;
  color: var(--muted);
  line-height: 1.65;
}
.trust-body li strong { color: var(--foreground); }
.trust-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.trust-body a:hover { text-decoration: underline; }
.trust-callout {
  margin: 0.75rem 0 1rem;
  padding: 1.1rem 1.25rem;
  text-align: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.trust-callout a {
  display: inline-block;
  word-break: break-word;
  font-size: 0.95rem;
}
.trust-changelog .trust-month {
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  font-size: 1.05rem;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}
.trust-changelog .trust-month:first-child { margin-top: 0; }
.trust-footer-note {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .trust-page { padding: 1.25rem 1rem 2rem; }
  .trust-card { padding: 1.5rem 1.15rem; }
  .trust-header h1 { font-size: 1.5rem; }
}
/* Homepage trust + FAQ */
.home-trust-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.home-trust-strip span::before {
  content: "+ ";
  color: var(--accent);
}
.home-faq {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem 1rem;
}
.home-faq h2 {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--foreground);
  text-align: center;
}
.home-faq dl { margin: 0; }
.home-faq dt {
  font-weight: 600;
  margin-top: 1rem;
  color: var(--foreground);
}
.home-faq dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}
.tool-last-updated {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
#related-tools .tool-last-updated,
section[id="related-tools"] .tool-last-updated {
  max-width: none;
  text-align: left;
  padding: 0;
  margin-top: 1.5rem;
}
.intro-panel-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--foreground);
  line-height: 1.25;
}
/* Tool layout */
.tool-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem 2rem;
}
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0;
  padding: 0.4rem 0.85rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.4;
}
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.tool-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--foreground);
}
.tool-card .tool-lead,
.tool-main > .tool-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.tool-main > h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--foreground);
}
.tool-main label,
.tool-card label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.tool-main textarea,
.tool-main input[type="text"],
.tool-card textarea,
.tool-card input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
  font-size: 0.9rem;
  resize: vertical;
}
.tool-main textarea:focus,
.tool-main input:focus,
.tool-card textarea:focus,
.tool-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.25);
}
.tool-main button,
.tool-card button {
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}
.tool-main button:hover,
.tool-card button:hover { opacity: 0.92; }
.tool-main button.secondary,
.tool-card button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.tool-main pre,
.tool-card pre {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 100px;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: 0.9rem;
}
.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0.5rem;
}
.output-header span { font-weight: 600; color: var(--accent); }
.actions { margin: 1rem 0; }
.notification {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
}
.notification.show { animation: ct-fade 2s ease forwards; }
@keyframes ct-fade {
  0% { opacity: 0; transform: translateY(12px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
/* Homepage */
.home-intro {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
}
.intro-panel {
  width: 100%;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(49, 130, 206, 0.1);
}
[data-theme="dark"] .intro-panel {
  background: rgba(45, 55, 72, 0.75);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(99, 179, 237, 0.2);
}
.intro-panel-header {
  margin-bottom: 1.25rem;
  text-align: center;
}
.intro-panel-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--foreground);
  line-height: 1.25;
}
.intro-lead {
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 52rem;
}
.intro-summary {
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.intro-summary p {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}
@media (max-width: 480px) {
  .intro-panel { padding: 1rem; }
}
/* Popular tools highlight */
.popular-tools {
  margin: 0;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(49, 130, 206, 0.35);
  background: var(--card-bg);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
.popular-tools::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, transparent 55%);
  pointer-events: none;
}
[data-theme="dark"] .popular-tools {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .popular-tools::before {
  background: linear-gradient(135deg, rgba(99, 179, 237, 0.12) 0%, transparent 55%);
}
.intro-panel .popular-tools {
  margin: 1rem 0 0;
}
.popular-tools-header,
.popular-tools-row {
  position: relative;
  z-index: 1;
}
.popular-tools-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.popular-tools-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #5a67d8);
}
.popular-tools-sub {
  font-size: 0.85rem;
  color: var(--muted);
}
.popular-tools-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.popular-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  text-decoration: none;
  color: var(--foreground);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.popular-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(49, 130, 206, 0.18);
}
[data-theme="dark"] .popular-chip:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.popular-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.popular-chip-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(49, 130, 206, 0.12);
  color: var(--accent);
}
[data-theme="dark"] .popular-chip-icon {
  background: rgba(99, 179, 237, 0.15);
}
.popular-chip-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.popular-chip-icon--accent {
  background: linear-gradient(135deg, rgba(49, 130, 206, 0.22), rgba(49, 130, 206, 0.08));
}
[data-theme="dark"] .popular-chip-icon--accent {
  background: linear-gradient(135deg, rgba(99, 179, 237, 0.28), rgba(99, 179, 237, 0.1));
}
.popular-chip-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.popular-chip-body strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
}
.popular-chip-body small {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}
.popular-chip-arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.popular-chip:hover .popular-chip-arrow {
  opacity: 1;
  transform: translateX(0);
}
@media (max-width: 768px) {
  .popular-tools-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .popular-tools { padding: 1rem; }
  .popular-chip { padding: 0.85rem; }
  .popular-chip-arrow { opacity: 1; transform: none; }
}
.home-grid {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.home-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--foreground);
  transition: box-shadow 0.2s, transform 0.2s;
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}
.home-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--accent);
}
.home-card p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.home-hero {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 0 2rem;
  text-align: center;
}
.home-hero p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
}
.related-tools-block { margin-top: 2rem; }
.related-tools-block h2 { margin-bottom: 1rem; color: var(--accent); font-size: 1.25rem; }
.related-tools-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.rt-card {
  display: block;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rt-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
#related-tools {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 2rem 2rem;
}
#related-tools h2 { color: var(--accent); }
@media (max-width: 480px) {
  .related-tools-grid { grid-template-columns: 1fr; }
  .site-header { padding: 0.75rem 1rem; }
  .tool-main { padding: 1rem; }
}
