/* Developer Tools section. Listing + per-tool detail pages. */

.page-tools {
    background: #ffffff;
}

.page-tools main { padding-top: 80px; }

/* ----- Listing hero ----- */
.tool-listing-hero {
    padding: 56px 0 32px;
    text-align: center;
}
.tool-listing-hero h1 {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: #111;
}
.tool-listing-sub {
    font-size: 18px;
    color: #555;
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.55;
}
.tool-search {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}
.tool-search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}
.tool-search input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
}
.tool-search input:focus {
    outline: none;
    border-color: #1d49e7;
    box-shadow: 0 0 0 4px rgba(29, 73, 231, 0.12);
}

/* ----- Tool grid (listing + related) ----- */
.tool-grid-section { padding: 24px 0 80px; }
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.tool-card,
.tool-related-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: #111;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    position: relative;
}
.tool-card:hover,
.tool-related-card:hover {
    text-decoration: none;
    border-color: #cfd6f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.06);
}
.tool-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #1d49e7;
    margin-bottom: 4px;
}
.tool-card-name {
    font-size: 17px;
    font-weight: 600;
    color: #111;
}
.tool-card-tagline {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}
.tool-card-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tool-grid-empty {
    text-align: center;
    color: #666;
    padding: 40px 16px;
}

/* ----- Tool detail page ----- */
.tool-hero {
    padding: 48px 0 24px;
}
.tool-breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}
.tool-breadcrumb a {
    color: #1d49e7;
    text-decoration: none;
}
.tool-breadcrumb a:hover { text-decoration: underline; }
.tool-breadcrumb span[aria-hidden] {
    margin: 0 6px;
    color: #bbb;
}
.tool-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: #111;
}
.tool-tagline {
    font-size: 17px;
    color: #555;
    margin: 0;
    max-width: 720px;
    line-height: 1.55;
}

.tool-surface { padding: 16px 0 48px; }

/* Shared building blocks tools can use via classes on light DOM children
   or for the <style> shipped inside each custom element's shadow DOM. */
.tool-panel {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

/* ----- About / SEO content ----- */
.tool-about {
    padding: 16px 0 24px;
    color: #333;
}
.tool-about .container { max-width: 820px; }
.tool-about h2 {
    font-size: 24px;
    margin: 32px 0 10px;
    color: #111;
}
.tool-about h3 {
    font-size: 18px;
    margin: 24px 0 8px;
    color: #111;
}
.tool-about p {
    line-height: 1.7;
    color: #444;
    margin: 0 0 14px;
}
.tool-about ul {
    line-height: 1.7;
    color: #444;
    padding-left: 22px;
}
.tool-about code {
    background: #f3f4f6;
    color: #111;
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
}

/* ----- FAQ ----- */
.tool-faq {
    padding: 8px 0 32px;
    max-width: 820px;
    margin: 0 auto;
}
.tool-faq h2 {
    font-size: 24px;
    margin: 0 0 16px;
    color: #111;
}
.tool-faq-list { display: flex; flex-direction: column; gap: 8px; }
.tool-faq-item {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
}
.tool-faq-item summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 500;
    color: #111;
    list-style: none;
    position: relative;
}
.tool-faq-item summary::-webkit-details-marker { display: none; }
.tool-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
}
.tool-faq-item[open] summary::after { content: '−'; }
.tool-faq-answer {
    padding: 0 18px 16px;
    color: #444;
    line-height: 1.65;
}

/* ----- Related ----- */
.tool-related {
    padding: 24px 0 80px;
}
.tool-related h2 {
    font-size: 22px;
    color: #111;
    margin: 0 0 16px;
}
.tool-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .tool-listing-hero { padding: 40px 0 24px; }
    .tool-listing-hero h1 { font-size: 34px; }
    .tool-title { font-size: 28px; }
    .tool-hero { padding: 32px 0 16px; }
    .page-tools main { padding-top: 72px; }
}
