/* KikiVoice's public footer, migrated to tools_web's own layout and theme tokens. */
.tools-web-ui .tools-footer {
    position: relative; isolation: isolate; overflow: hidden;
    border-top: 1px solid var(--tools-ui-border);
    background: var(--tools-ui-surface); color: var(--tools-ui-text);
}
.tools-web-ui .tools-footer > .footer-grid { position: absolute; inset: 0; pointer-events: none; }
.tools-web-ui .tools-footer-inner {
    position: relative; max-width: var(--tools-content-max-width);
    margin-inline: auto; padding: 64px var(--tools-content-gutter);
}
.tools-web-ui .tools-footer-layout {
    display: grid; align-items: start; gap: 48px;
    grid-template-columns: minmax(256px, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr);
}
.tools-web-ui .tools-footer-layout > * { min-width: 0; }
.tools-web-ui .tools-footer-brand {
    display: inline-flex; align-items: center; gap: 12px; max-width: 100%;
    color: var(--tools-ui-text); font-size: 20px; font-weight: 700;
    letter-spacing: -.02em; text-decoration: none;
}
.tools-web-ui .tools-footer-brand img {
    flex: 0 0 auto; width: 32px; height: 32px; object-fit: contain;
    border: 1px solid var(--tools-ui-border); border-radius: 8px;
}
.tools-web-ui .tools-footer-description {
    max-width: 320px; margin: 16px 0 0; color: var(--tools-ui-subtle);
    font-size: 14px; line-height: 1.65; overflow-wrap: anywhere;
}
.tools-web-ui .tools-footer-copyright {
    margin: 20px 0 0; color: var(--tools-ui-subtle);
    font-size: 12px; line-height: 1.5; letter-spacing: .01em;
}
.tools-web-ui .tools-footer-links h2 {
    margin: 0 0 16px; color: var(--tools-ui-text);
    font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere;
}
.tools-web-ui .tools-footer-links ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tools-web-ui .tools-footer-links a {
    display: flex; align-items: baseline; gap: 8px; min-height: 28px; padding-block: 2px;
    color: var(--tools-ui-secondary); font-size: 14px; font-weight: 500;
    line-height: 1.5; overflow-wrap: anywhere; text-decoration: none; transition: color .2s ease;
}
.tools-web-ui .tools-footer-links a::before {
    content: ""; flex: 0 0 auto; width: 4px; height: 4px; margin-block-start: 8px;
    border-radius: 50%; background: var(--tools-ui-track);
}
.tools-web-ui .tools-footer-links a:hover { color: var(--tools-ui-accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.tools-web-ui .tools-footer-links a:hover::before { background: var(--tools-ui-accent); }
.tools-web-ui .tools-footer a:focus-visible { outline: 2px solid var(--tools-ui-focus); outline-offset: 4px; border-radius: 4px; }

/* Preserve the main footer's 224 x 160 three-card composition below the brand. */
.tools-web-ui .tools-footer-illustration {
    position: relative; display: grid; place-items: center;
    width: 300px; max-width: 100%; height: 208px; margin-block-start: 20px;
    --tools-footer-card: var(--tools-ui-surface);
    --tools-footer-card-soft: var(--tools-ui-soft);
    --tools-footer-art-accent: var(--tools-ui-accent);
    --tools-footer-art-shadow: 0 20px 40px -12px rgba(15, 23, 42, .1);
}
.tools-web-ui .tools-footer-stack { position: relative; width: 224px; height: 160px; transition: transform .5s ease; }
.tools-web-ui .tools-footer-illustration:hover .tools-footer-stack { transform: scale(1.035); }
.tools-web-ui .tools-footer-stack :is(.tools-footer-stack-back, .tools-footer-stack-middle, .tools-footer-stack-front) {
    position: absolute; inset: 0; border: 1px solid var(--tools-ui-border); border-radius: 16px;
}
.tools-web-ui .tools-footer-stack-back { transform: translate(16px, 16px); background: var(--tools-footer-card-soft); }
.tools-web-ui .tools-footer-stack-middle { transform: translate(8px, 8px); background: var(--tools-footer-card); }
.tools-web-ui .tools-footer-stack-front {
    display: flex; flex-direction: column; justify-content: space-between; padding: 20px; overflow: hidden;
    background: linear-gradient(135deg, var(--tools-footer-card), var(--tools-footer-card-soft));
    box-shadow: var(--tools-footer-art-shadow);
}
.tools-web-ui .tools-footer-art-header { display: flex; justify-content: space-between; align-items: center; color: var(--tools-ui-number); font-size: 9px; font-weight: 600; }
.tools-web-ui .tools-footer-art-dots { display: inline-flex; gap: 6px; }
.tools-web-ui .tools-footer-art-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--tools-ui-track); }
.tools-web-ui .tools-footer-art-core { display: grid; flex: 1; place-items: center; }
.tools-web-ui .tools-footer-art-core > span {
    display: grid; place-items: center; width: 48px; height: 48px;
    border: 1px solid var(--tools-ui-selected-border); border-radius: 50%;
    outline: 1px dashed var(--tools-ui-border); outline-offset: 4px;
}
.tools-web-ui .tools-footer-art-core .lucide {
    width: 20px; height: 20px; padding: 6px; box-sizing: content-box; border-radius: 8px;
    background: var(--tools-ui-accent-soft); color: var(--tools-footer-art-accent);
}
.tools-web-ui .tools-footer-art-progress > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--tools-ui-number); font-size: 9px; }
.tools-web-ui .tools-footer-art-progress > div span:last-child { color: var(--tools-footer-art-accent); }
.tools-web-ui .tools-footer-art-track { display: block; height: 4px; border-radius: 999px; background: var(--tools-ui-track); }
.tools-web-ui .tools-footer-art-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--tools-footer-art-accent); }
.tools-web-ui .tools-footer-art-connectors { position: absolute; inset-inline-end: -24px; top: 40px; display: flex; flex-direction: column; gap: 6px; opacity: .3; }
.tools-web-ui .tools-footer-art-connectors i { width: 16px; height: 1px; background: var(--tools-ui-subtle); }
.tools-web-ui .tools-footer-art-connectors i:nth-child(2) { width: 32px; }
.tools-web-ui .tools-footer-art-connectors i:nth-child(3) { width: 8px; }
.tools-web-ui .tools-footer-art-badge {
    position: absolute; inset-block-end: 8px; inset-inline-start: 0;
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px;
    border: 1px solid var(--tools-ui-selected-border); border-radius: 20px;
    background: var(--tools-footer-card); color: var(--tools-ui-secondary);
    box-shadow: var(--tools-footer-art-shadow); font-size: 10px; font-weight: 700; line-height: 1.5;
}
.tools-web-ui .tools-footer-art-badge > i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--tools-footer-art-accent); }
.tools-web-ui .tools-footer-art-badge > span { min-width: 0; overflow-wrap: anywhere; }
html[dir="rtl"] .tools-web-ui .tools-footer-stack-back { transform: translate(-16px, 16px); }
html[dir="rtl"] .tools-web-ui .tools-footer-stack-middle { transform: translate(-8px, 8px); }
html:not([data-kiki-page-mode="day"]) .tools-web-ui .tools-footer-illustration {
    --tools-footer-card: var(--tools-ui-raised); --tools-footer-card-soft: var(--tools-ui-soft);
    --tools-footer-art-shadow: none;
}
html[data-kiki-page-mode="night"] .tools-web-ui .tools-footer-art-dots i { background: var(--tools-ui-number); }
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-illustration {
    --tools-footer-card: #000; --tools-footer-card-soft: #000;
    --tools-footer-art-accent: var(--tools-ui-accent-ink);
}
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-stack-front { background: #000; }
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-art-dots i { background: #fff; }
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-art-core .lucide { background: #000; }
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-art-core > span { border-color: #fff; }
html[data-kiki-page-mode="high_contrast"] .tools-web-ui .tools-footer-art-connectors { display: none; }

@media (max-width: 1279px) { .tools-web-ui .tools-footer-layout { gap: 32px; } }
@media (max-width: 1023px) {
    .tools-web-ui .tools-footer-inner { padding-block: 48px; }
    .tools-web-ui .tools-footer-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}
@media (max-width: 639px) {
    .tools-web-ui .tools-footer-layout { gap: 32px 24px; }
    .tools-web-ui :is(.tools-footer-about, .tools-footer-legal) { grid-column: 1 / -1; }
    .tools-web-ui .tools-footer-links ul { gap: 4px; }
    .tools-web-ui .tools-footer-links a { min-height: 44px; padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .tools-web-ui .tools-footer-stack, .tools-web-ui .tools-footer-links a { transition: none; }
    .tools-web-ui .tools-footer-illustration:hover .tools-footer-stack { transform: none; }
}
@media (forced-colors: active) {
    .tools-web-ui .tools-footer, .tools-web-ui .tools-footer-stack :is(.tools-footer-stack-back, .tools-footer-stack-middle, .tools-footer-stack-front), .tools-web-ui .tools-footer-art-badge {
        background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none;
    }
    .tools-web-ui .tools-footer :is(h2, a, p, .tools-footer-art-header, .tools-footer-art-progress > div) { color: CanvasText; }
    .tools-web-ui .tools-footer-links a::before { background: CanvasText; }
    .tools-web-ui .tools-footer-art-core .lucide { background: Canvas; color: CanvasText; }
}
