/* Shared tool components. The site shell and design tokens live in consultant.css. */

.tool-page .page-intro {
    color: var(--muted);
    max-width: 780px;
    font-size: 1.02rem;
    line-height: 1.7;
}

.tool-page .workflow {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.tool-page .workflow-step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 20px 22px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.tool-page .workflow-step .step-index {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    background: var(--accent);
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tool-page .workflow-step h2 {
    font-size: 1.12rem;
    margin-bottom: 6px;
}

.tool-page .workflow-step p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tool-page .tool-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    margin-top: 48px;
    padding: clamp(24px, 4vw, 36px);
}

.tool-page .tool-card h2 {
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.tool-page .tool-form {
    margin-top: 28px;
    display: grid;
    gap: 20px;
}

.tool-page .form-group {
    display: grid;
    gap: 8px;
}

.tool-page .form-group label {
    font-weight: 500;
}

.tool-page .form-group input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.42);
    color: inherit;
    font-size: 1rem;
}

.tool-page .result {
    margin-top: 32px;
    display: grid;
    gap: 16px;
}

.tool-page .result-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.tool-page .result-header h3 {
    margin: 0;
}

.tool-page .result-status {
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 500;
}

.tool-page .result-status--good {
    background: rgba(67, 255, 156, 0.12);
    border: 1px solid rgba(67, 255, 156, 0.42);
    color: #d8ffe9;
}

.tool-page .result-status--warning {
    background: rgba(255, 209, 102, 0.12);
    border: 1px solid rgba(255, 209, 102, 0.38);
    color: #ffe9b9;
}

.tool-page .result-status--error {
    background: rgba(255, 122, 122, 0.12);
    border: 1px solid rgba(255, 122, 122, 0.38);
    color: #ffd7d7;
}

.tool-page .breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.tool-page .breadcrumb-item {
    display: grid;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 12px 16px;
}

.tool-page .breadcrumb-item a {
    color: inherit;
    text-decoration: none;
}

.tool-page .breadcrumb-meta {
    font-size: 0.85rem;
    color: var(--muted);
    word-break: break-word;
}

.tool-page .analysis-grid {
    display: grid;
    gap: 16px;
}

.tool-page .section-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 18px 20px;
    display: grid;
    gap: 12px;
}

.tool-page .section-card h4 {
    margin: 0;
    font-size: 1rem;
}

.tool-page .section-card ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.tool-page .faq {
    margin-top: 64px;
    display: grid;
    gap: 16px;
}

.tool-page .faq h2 {
    margin-bottom: 8px;
}

.tool-page .related-tools {
    margin-top: 48px;
    display: grid;
    gap: 16px;
}

.tool-page .tools-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-page .tool-link {
    display: block;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.tool-page .tool-link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tool-page .schema-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.tool-page .schema-item {
    display: grid;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 12px 16px;
}

.tool-page .schema-meta {
    font-size: 0.85rem;
    color: var(--muted);
    word-break: break-word;
}

.tool-page .meta-tag-item {
    display: grid;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 12px 16px;
}

.tool-page .meta-tag-name {
    font-weight: 500;
}

.tool-page .meta-tag-content {
    font-size: 0.9rem;
    color: var(--muted);
    word-break: break-word;
}

.tool-page .image-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-page .image-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-page .image-list li:last-child {
    border-bottom: none;
}

.tool-page .image-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-page .image-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-page .image-info {
    flex: 1;
}

.tool-page .image-src {
    font-size: 0.9rem;
    color: var(--muted);
    word-break: break-all;
}

.tool-page .image-alt {
    margin-top: 6px;
    font-size: 0.95rem;
}

.tool-page .alt-missing {
    color: #ff7a7a;
    font-weight: 500;
}

.tool-page .alt-present {
    color: #22c55e;
}

.tool-page .score-display {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin: 20px 0;
}

.tool-page .checks-list {
    display: grid;
    gap: 12px;
}

.tool-page .check-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 16px 20px;
    display: grid;
    gap: 8px;
}

.tool-page .check-item.pass {
    border-left: 4px solid #22c55e;
}

.tool-page .check-item.fail {
    border-left: 4px solid #ff7a7a;
}

.tool-page .check-item.warning {
    border-left: 4px solid #ffd166;
}

.tool-page .check-item h5 {
    margin: 0;
    font-size: 1.05rem;
}

.tool-page .check-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.tool-page .status {
    font-weight: 500;
    font-size: 0.9rem;
}

.tool-page .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.42);
    color: inherit;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.tool-page .result-header h2 {
    margin: 0;
}

.tool-page .similarity-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 20px;
    text-align: center;
}

.tool-page .similarity-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.tool-page .similarity-value {
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.tool-page .similarity-description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.tool-page .faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.tool-page .faq-item p {
    color: var(--muted);
    line-height: 1.6;
}

.tool-page .related-tool {
    display: block;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.tool-page .related-tool:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tool-page .related-tool h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.tool-page .related-tool p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.tool-page #error {
    color: var(--error-color);
    margin-top: 16px;
    font-weight: 500;
}

/* Layout and controls shared by every tool using tool-base.html. */
.tool-layout { display:grid; grid-template-columns:190px minmax(0,1fr); gap:55px; padding-block:64px; align-items:start; }
.tool-layout .toc-sidebar { position:sticky; top:24px; border-left:1px solid var(--line); padding-left:20px; }
.tool-layout .toc-sidebar nav { display:grid; gap:12px; }
.tool-layout .toc-link { color:var(--muted); text-decoration:none; font-size:13px; line-height:1.5; }
.tool-layout .toc-link:hover, .tool-layout .toc-link.active { color:var(--accent); }
.tool-page { min-width:0; --warning-color:#ffd166; --error-color:#ff7a7a; }
.tool-back { display:inline-block; color:var(--accent); font-size:14px; text-decoration:none; margin-bottom:28px; }
.tool-page h1 { font-size:clamp(36px,5vw,60px); margin-bottom:24px; }
.tool-page h2 { font-size:clamp(25px,3vw,34px); scroll-margin-top:24px; }
.tool-page a:not(.button):not(.tool-link):not(.related-tool) { color:var(--accent); }
.tool-page p { margin-bottom:16px; }
.tool-page input, .tool-page textarea { font-family:var(--body); min-width:0; }
.tool-page textarea { resize:vertical; }
.tool-page textarea:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.tool-page .button { justify-self:start; }
.tool-page .form-group { min-width:0; }
.tool-page .workflow { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.tool-page .workflow-step { flex-direction:column; padding:20px; }
.tool-page .workflow-step p { margin-bottom:0; }
.tool-page .workflow-step .step-index { border-radius:3px; width:32px; height:32px; font-family:var(--mono); }
.tool-page .result { overflow-wrap:anywhere; }
.tool-page .image-item { min-width:0; }
.tool-page .image-thumb { max-width:100%; }
.tool-page .tool-link:hover, .tool-page .related-tool:hover { border-color:var(--accent); }
@media(max-width:900px) {
    .tool-layout { grid-template-columns:minmax(0,1fr); gap:24px; padding-block:40px; }
    .tool-layout .toc-sidebar { display:none; }
}
@media(max-width:600px) {
    .tool-page .workflow, .tool-page .tools-grid { grid-template-columns:minmax(0,1fr); }
    .tool-page .workflow-step { flex-direction:row; }
    .tool-page .image-item { flex-direction:column; }
    .tool-page .tool-card { padding:22px; }
    .tool-page .button { width:100%; }
}
@media(prefers-reduced-motion:reduce) {
    .tool-page .tool-link, .tool-page .related-tool { transition:none; transform:none; }
}

/* ---------- Tools index (/tools) ---------- */

.tools-index .tool-category { margin-bottom: 56px; }
.tools-index .tool-category:last-child { margin-bottom: 0; }
.tools-index .tool-category h2 {
    font-size: clamp(24px, 2.6vw, 32px);
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.tools-index .tools-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin-top: 24px;
}
.tools-index .tool-link {
    display: block;
    padding: 22px 24px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 3px;
    text-decoration: none;
    color: inherit;
    transition: border-color .16s, background .16s;
}
.tools-index .tool-link:hover {
    border-color: var(--accent);
    background: var(--raised);
}
.tools-index .tool-link h3 { margin: 0 0 8px; font-size: 17px; }
.tools-index .tool-link p { margin: 0; font-size: 14px; line-height: 1.55; }

.featured-tool {
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--panel);
    padding: clamp(28px, 4vw, 48px);
}
.featured-tool h2 { margin: 18px 0 14px; }
.featured-tool p { max-width: 680px; font-size: 17px; }
.featured-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.featured-actions .button { text-decoration: none; }

@media(max-width:600px) {
    .tools-index .tools-grid { grid-template-columns: minmax(0,1fr); }
    .featured-actions .button { width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
    .tools-index .tool-link { transition: none; }
}
