/* ==========================================================================
   HitBidder Tools
   A self-contained design layer for the public /tools section.
   Loaded after the template CSS, so it can safely override Bootstrap basics.
   ========================================================================== */

:root {
    --hb-primary: #5558e6;
    --hb-primary-strong: #4f46e5;
    --hb-primary-deep: #312e81;
    --hb-accent: #ff7a45;
    --hb-ink: #0f172a;
    --hb-body: #475467;
    --hb-muted: #667085;
    --hb-line: #e6e8ef;
    --hb-line-strong: #d5d8e6;
    --hb-soft: #f7f8fc;
    --hb-soft-strong: #eef0fb;
    --hb-radius: 16px;
    --hb-shadow-soft: 0 24px 48px -32px rgba(15, 23, 42, 0.32);
    --hb-shadow-card: 0 26px 44px -34px rgba(49, 46, 129, 0.5);
}

.hb-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: var(--hb-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hb-body h1,
.hb-body h2,
.hb-body h3,
.hb-body h4 {
    font-family: inherit;
    color: var(--hb-ink);
    letter-spacing: -0.025em;
}

.hb-body a {
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

#all-tools {
    scroll-margin-top: 80px;
}

[hidden] {
    display: none !important;
}

.hb-skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--hb-ink);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.hb-skip-link:focus {
    top: 12px;
    color: #fff;
}

:where(.hb-body a, .hb-body button, .hb-body input):focus-visible {
    outline: 3px solid rgba(105, 108, 255, 0.4);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hb-btn--primary {
    background: var(--hb-primary);
    color: #fff;
    box-shadow: 0 12px 24px -14px rgba(85, 88, 230, 0.95);
}

.hb-btn--primary:hover {
    background: #4a4dd8;
    color: #fff;
    transform: translateY(-1px);
}

.hb-btn--ghost {
    background: #fff;
    border-color: var(--hb-line);
    color: var(--hb-ink);
}

.hb-btn--ghost:hover {
    background: #f8f9ff;
    border-color: #c7c9f5;
    color: #4348c5;
}

.hb-btn--light {
    background: #fff;
    color: var(--hb-primary-deep);
    box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.55);
}

.hb-btn--light:hover {
    background: #f3f4ff;
    color: var(--hb-primary-deep);
    transform: translateY(-1px);
}

.hb-btn--outline-light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.38);
    color: #fff;
}

.hb-btn--outline-light:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #fff;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.hb-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hb-header__inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 70px;
}

.hb-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--hb-ink);
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.hb-brand:hover {
    color: var(--hb-ink);
}

.hb-brand__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.8);
}

.hb-brand__text span {
    color: var(--hb-muted);
    font-weight: 600;
}

.hb-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
}

.hb-nav a {
    padding: 8px 12px;
    border-radius: 9px;
    color: var(--hb-body);
    font-size: 0.88rem;
    font-weight: 550;
    text-decoration: none;
}

.hb-nav a:hover {
    background: var(--hb-soft);
    color: var(--hb-ink);
}

.hb-nav a.is-active {
    background: rgba(105, 108, 255, 0.1);
    color: var(--hb-primary-strong);
}

.hb-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.hb-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--hb-line);
    border-radius: 10px;
    background: #fff;
    color: var(--hb-ink);
    font-size: 1.3rem;
    cursor: pointer;
}

.hb-mobile-nav {
    border-top: 1px solid var(--hb-line);
    background: #fff;
    padding: 8px 0 16px;
}

.hb-mobile-nav a {
    display: block;
    padding: 11px 0;
    border-bottom: 1px solid #f0f1f7;
    color: var(--hb-body);
    font-size: 0.92rem;
    font-weight: 550;
    text-decoration: none;
}

.hb-mobile-nav a:hover {
    color: var(--hb-primary-strong);
}

.hb-mobile-nav .hb-mobile-nav__cta {
    margin-top: 12px;
    border-bottom: 0;
    border-radius: 11px;
    background: var(--hb-primary);
    color: #fff;
    text-align: center;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Eyebrow / breadcrumb / chips
   -------------------------------------------------------------------------- */

.hb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    color: #ecebff;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hb-eyebrow--soft {
    border-color: rgba(105, 108, 255, 0.18);
    background: rgba(105, 108, 255, 0.08);
    color: var(--hb-primary-strong);
}

.hb-eyebrow--light {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.hb-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 500;
}

.hb-breadcrumb a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.hb-breadcrumb a:hover {
    color: #fff;
}

.hb-breadcrumb .sep {
    opacity: 0.5;
}

.hb-breadcrumb--dark {
    color: var(--hb-muted);
}

.hb-breadcrumb--dark a {
    color: var(--hb-body);
}

.hb-breadcrumb--dark a:hover {
    color: var(--hb-primary-strong);
}

.hb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hb-body);
    font-size: 0.76rem;
    font-weight: 600;
}

.hb-chip .mdi {
    color: var(--hb-primary-strong);
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hb-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 42px 0 74px;
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 48%, #7c3aed 100%);
    color: #fff;
}

.hb-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(38% 52% at 14% 16%, rgba(255, 255, 255, 0.2), transparent 72%),
        radial-gradient(36% 48% at 87% 20%, rgba(167, 139, 250, 0.38), transparent 72%),
        radial-gradient(42% 54% at 52% 108%, rgba(56, 189, 248, 0.2), transparent 70%);
    pointer-events: none;
}

.hb-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(70% 70% at 50% 35%, #000 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 70% at 50% 35%, #000 20%, transparent 100%);
    pointer-events: none;
}

.hb-hero__inner {
    position: relative;
    z-index: 1;
}

.hb-hero__content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    animation: hb-rise 0.6s ease both;
}

@keyframes hb-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hb-hero h1 {
    margin: 18px 0 16px;
    color: #fff;
    font-size: clamp(2.15rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.hb-hero__accent {
    color: #c7d2fe;
    position: relative;
    white-space: nowrap;
}

.hb-hero__content > p {
    max-width: 650px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.65;
}

.hb-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.79rem;
    font-weight: 550;
}

.hb-hero__stats span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hb-hero__stats .mdi {
    color: #86efac;
    font-size: 0.95rem;
}

.hb-hero__stats strong {
    color: #fff;
    font-weight: 700;
}

.hb-hero__float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 238px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--hb-ink);
    box-shadow: 0 26px 48px -26px rgba(10, 10, 40, 0.6);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.hb-hero__float strong {
    display: block;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hb-hero__float span {
    display: block;
    margin-top: 2px;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 500;
}

.hb-hero__float-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.hb-hero__float--one {
    top: 30%;
    left: 1%;
    transform: rotate(-4deg);
}

.hb-hero__float--two {
    top: 20%;
    right: 1%;
    transform: rotate(3.5deg);
}

.hb-hero__float--three {
    bottom: 9%;
    right: 1%;
    transform: rotate(-2deg);
}

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */

.hb-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 640px;
    margin: 28px auto 0;
    padding: 7px 8px 7px 18px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 28px 56px -30px rgba(10, 10, 40, 0.65);
    transition: box-shadow 0.2s ease;
}

.hb-search:focus-within {
    box-shadow: 0 0 0 4px rgba(199, 210, 254, 0.32), 0 28px 56px -30px rgba(10, 10, 40, 0.65);
}

.hb-search__icon {
    color: #8b90c9;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.hb-search input {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    background: transparent;
    color: var(--hb-ink);
    font-family: inherit;
    font-size: 0.97rem;
    outline: none;
}

.hb-search input::placeholder {
    color: #98a2b3;
}

.hb-search input::-webkit-search-cancel-button {
    display: none;
}

.hb-search__kbd {
    padding: 2px 7px;
    border: 1px solid var(--hb-line);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
}

.hb-search__clear {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-size: 1rem;
    cursor: pointer;
}

.hb-search__clear:hover {
    background: var(--hb-soft-strong);
    color: var(--hb-ink);
}

.hb-search--compact {
    max-width: 300px;
    margin: 0;
    padding: 4px 6px 4px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    box-shadow: none;
}

.hb-search--compact:focus-within {
    border-color: #c7c9f5;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.12);
}

.hb-search--compact input {
    padding: 8px 0;
    font-size: 0.85rem;
}

.hb-search--compact .hb-search__icon {
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.hb-section {
    padding: 72px 0;
}

.hb-section--popular {
    padding: 62px 0 54px;
}

.hb-section--browse {
    padding-top: 28px;
    background: linear-gradient(180deg, #fff 0%, #fcfcff 100%);
}

.hb-section--soft {
    background: var(--hb-soft);
}

.hb-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hb-section-head h2 {
    margin: 10px 0 6px;
    font-size: clamp(1.55rem, 2.7vw, 2.05rem);
    font-weight: 800;
    line-height: 1.15;
}

.hb-section-head p {
    max-width: 560px;
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.hb-section-head--browse {
    align-items: center;
    margin-bottom: 20px;
}

.hb-section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hb-primary-strong);
    font-size: 0.83rem;
    font-weight: 650;
    text-decoration: none;
}

.hb-section-link:hover {
    color: #3730a3;
}

.hb-section-link .mdi {
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Tool grid & cards
   -------------------------------------------------------------------------- */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-height: 190px;
    padding: 19px;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    background: #fff;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover,
.tool-card:focus-within {
    transform: translateY(-3px);
    border-color: #c7c9f5;
    box-shadow: var(--hb-shadow-card);
}

.tool-card__top {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tool-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tool-card__badge {
    padding: 3px 7px;
    border: 1px solid #fde9c8;
    border-radius: 999px;
    background: #fffbeb;
    color: #b45309;
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tool-card__fav {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    margin-left: auto;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #98a2b3;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.tool-card__fav:hover {
    background: #fffbeb;
    color: #f59e0b;
}

.tool-card__fav.is-favorite {
    background: #fffbeb;
    color: #f59e0b;
}

.tool-card__title {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -0.012em;
}

.tool-card__title a {
    color: var(--hb-ink);
    text-decoration: none;
}

.tool-card:hover .tool-card__title a,
.tool-card__title a:hover {
    color: var(--hb-primary-strong);
}

.tool-card .stretched-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.tool-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.tool-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    color: var(--hb-primary-strong);
    font-size: 0.76rem;
    font-weight: 650;
}

.tool-card__cta .mdi {
    font-size: 0.9rem;
    transition: transform 0.18s ease;
}

.tool-card:hover .tool-card__cta .mdi {
    transform: translateX(3px);
}

/* Tone helpers shared by icons across the section */
.is-primary {
    background: rgba(105, 108, 255, 0.13);
    color: #4f46e5;
}

.is-warning {
    background: rgba(255, 159, 67, 0.17);
    color: #b45309;
}

.is-info {
    background: rgba(3, 195, 236, 0.15);
    color: #0e7490;
}

.is-success {
    background: rgba(40, 199, 111, 0.16);
    color: #12805c;
}

.is-danger {
    background: rgba(255, 62, 29, 0.12);
    color: #b42318;
}

.is-dark {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

/* --------------------------------------------------------------------------
   Category rail & browse controls
   -------------------------------------------------------------------------- */

.category-rail {
    position: sticky;
    top: 70px;
    z-index: 30;
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hb-line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 8px 13px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hb-body);
    font-size: 0.79rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.category-pill .mdi {
    font-size: 0.95rem;
    color: #8b90c9;
}

.category-pill .count {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.category-pill:hover {
    border-color: #c7c9f5;
    background: #f8f9ff;
    color: var(--hb-primary-strong);
}

.category-pill.is-active {
    border-color: var(--hb-ink);
    background: var(--hb-ink);
    color: #fff;
}

.category-pill.is-active .mdi {
    color: #c7d2fe;
}

.category-pill.is-active .count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.category-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.browse-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.fav-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hb-body);
    font-size: 0.79rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.fav-filter .mdi {
    color: #f59e0b;
    font-size: 1rem;
}

.fav-filter__count {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.fav-filter:hover {
    border-color: #fde9c8;
    background: #fffdf5;
}

.fav-filter[aria-pressed='true'] {
    border-color: #f5c26b;
    background: #fffbeb;
    color: #92400e;
}

.browse-tools__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--hb-muted);
    font-size: 0.79rem;
}

.results-count {
    min-height: 1.2em;
}

.clear-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--hb-primary-strong);
    font-size: 0.79rem;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Category blocks
   -------------------------------------------------------------------------- */

.category-block {
    margin-bottom: 46px;
    scroll-margin-top: 138px;
}

.category-block__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--hb-line-strong);
}

.category-block__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    font-size: 1.42rem;
    flex-shrink: 0;
}

.category-block__copy {
    flex: 1;
    min-width: 200px;
}

.category-block__head h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.category-block__head p {
    margin: 3px 0 0;
    color: var(--hb-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.category-block__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--hb-primary-strong);
    font-size: 0.79rem;
    font-weight: 650;
    text-decoration: none;
}

.category-block__link:hover {
    color: #3730a3;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.tools-empty {
    margin-bottom: 30px;
    padding: 54px 24px;
    border: 1px dashed var(--hb-line-strong);
    border-radius: 18px;
    background: #fbfbff;
    text-align: center;
}

.tools-empty__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 15px;
    background: var(--hb-soft-strong);
    color: #7c83c9;
    font-size: 1.6rem;
}

.tools-empty h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
}

.tools-empty p {
    max-width: 420px;
    margin: 0 auto 18px;
    color: var(--hb-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Trust strip
   -------------------------------------------------------------------------- */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.trust-card {
    padding: 24px;
    border: 1px solid #e9ebf4;
    border-radius: 18px;
    background: #fff;
}

.trust-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(105, 108, 255, 0.1);
    color: var(--hb-primary-strong);
    font-size: 1.3rem;
}

.trust-card h2 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.trust-card p {
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 56px;
    align-items: start;
}

.faq-intro {
    position: sticky;
    top: 100px;
}

.faq-intro h2 {
    margin: 12px 0 10px;
    font-size: clamp(1.6rem, 2.7vw, 2.1rem);
    font-weight: 800;
    line-height: 1.15;
}

.faq-intro p {
    max-width: 360px;
    margin: 0 0 18px;
    color: var(--hb-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.hb-accordion .accordion-item {
    margin-bottom: 10px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.hb-accordion .accordion-item:first-of-type,
.hb-accordion .accordion-item:last-of-type {
    border-radius: 14px;
}

.hb-accordion .accordion-button {
    padding: 16px 18px;
    border-radius: 14px !important;
    background: #fff;
    color: var(--hb-ink);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: none;
}

.hb-accordion .accordion-button:not(.collapsed) {
    background: #f7f8ff;
    color: var(--hb-primary-strong);
}

.hb-accordion .accordion-button:focus {
    border-color: transparent;
    box-shadow: none;
}

.hb-accordion .accordion-button:focus-visible {
    outline: 3px solid rgba(105, 108, 255, 0.32);
    outline-offset: -3px;
}

.hb-accordion .accordion-body {
    padding: 2px 18px 18px;
    color: var(--hb-muted);
    font-size: 0.86rem;
    line-height: 1.68;
}

.hb-accordion .accordion-button:not(.collapsed)::after {
    filter: none;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.hb-cta {
    padding: 8px 0 80px;
}

.hb-cta__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    flex-wrap: wrap;
    padding: 44px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    color: #fff;
    overflow: hidden;
}

.hb-cta__inner::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.45), transparent 68%);
    pointer-events: none;
}

.hb-cta__copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.hb-cta h2 {
    margin: 14px 0 10px;
    color: #fff;
    font-size: clamp(1.45rem, 2.6vw, 1.95rem);
    font-weight: 800;
    line-height: 1.18;
}

.hb-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    line-height: 1.65;
}

.hb-cta__actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Category page hero
   -------------------------------------------------------------------------- */

.hb-category-hero {
    padding: 32px 0 38px;
    border-bottom: 1px solid var(--hb-line);
    background: linear-gradient(180deg, #f5f6ff 0%, #fcfcff 100%);
}

.hb-category-hero__row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.hb-category-hero__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 2rem;
    flex-shrink: 0;
}

.hb-category-hero__copy {
    flex: 1;
    min-width: 240px;
}

.hb-category-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(1.85rem, 3.6vw, 2.65rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hb-category-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.hb-category-hero__back {
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   Tool page
   -------------------------------------------------------------------------- */

.hb-tool-hero {
    padding: 32px 0 38px;
    border-bottom: 1px solid var(--hb-line);
    background: linear-gradient(180deg, #f5f6ff 0%, #fcfcff 100%);
}

.hb-tool-hero__row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.hb-tool-hero__icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 1.95rem;
    flex-shrink: 0;
}

.hb-tool-hero__copy {
    flex: 1;
    min-width: 240px;
}

.hb-tool-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(1.85rem, 3.6vw, 2.65rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hb-tool-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.hb-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 10px 15px;
    border: 1px solid var(--hb-line);
    border-radius: 11px;
    background: #fff;
    color: var(--hb-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.hb-save .mdi {
    color: #98a2b3;
    font-size: 1.05rem;
}

.hb-save:hover {
    border-color: #fde9c8;
    background: #fffdf5;
}

.hb-save.is-favorite {
    border-color: #f5c26b;
    background: #fffbeb;
    color: #92400e;
}

.hb-save.is-favorite .mdi {
    color: #f59e0b;
}

.hb-workspace {
    border: 1px solid var(--hb-line);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--hb-shadow-soft);
}

.hb-workspace__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-bottom: 1px solid var(--hb-line);
    background: #fcfcff;
}

.hb-workspace__head h2 {
    margin: 6px 0 0;
    font-size: 1rem;
    font-weight: 700;
}

.hb-workspace__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #fde9c8;
    border-radius: 999px;
    background: #fffbeb;
    color: #b45309;
    font-size: 0.71rem;
    font-weight: 650;
}

.hb-workspace__status .mdi {
    font-size: 0.9rem;
}

.hb-workspace__body {
    padding: 22px;
}

.hb-workspace__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 330px;
    padding: 48px 24px;
    border: 1px dashed var(--hb-line-strong);
    border-radius: 14px;
    background: radial-gradient(80% 90% at 50% 0%, #f7f8ff 0%, #fff 70%);
    text-align: center;
}

.hb-workspace__placeholder-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: #eef0ff;
    color: var(--hb-primary-strong);
    font-size: 1.7rem;
}

.hb-workspace__placeholder h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 700;
}

.hb-workspace__placeholder p {
    max-width: 520px;
    margin: 0 0 20px;
    color: var(--hb-muted);
    font-size: 0.87rem;
    line-height: 1.65;
}

.hb-workspace__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.hb-side-card {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--hb-line);
    border-radius: 16px;
    background: #fff;
}

.hb-side-card h2 {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 700;
}

.hb-side-card p {
    margin: 0 0 12px;
    color: var(--hb-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.hb-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hb-step;
}

.hb-steps li {
    display: flex;
    gap: 11px;
    color: var(--hb-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    counter-increment: hb-step;
}

.hb-steps li::before {
    content: counter(hb-step);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: #eef0ff;
    color: var(--hb-primary-strong);
    font-size: 0.68rem;
    font-weight: 700;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 9px;
    color: var(--hb-body);
    font-size: 0.83rem;
    font-weight: 550;
    text-decoration: none;
}

.related-list a:hover {
    background: var(--hb-soft);
    color: var(--hb-primary-strong);
}

.related-list__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.related-list__arrow {
    margin-left: auto;
    color: #b9bfd4;
    font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.hb-footer {
    padding: 52px 0 26px;
    border-top: 1px solid var(--hb-line);
    background: #fbfbfe;
}

.hb-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
    gap: 34px;
}

.hb-footer__brand p {
    max-width: 320px;
    margin: 14px 0 14px;
    color: var(--hb-muted);
    font-size: 0.83rem;
    line-height: 1.65;
}

.hb-footer__mail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hb-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.hb-footer__mail:hover {
    color: var(--hb-primary-strong);
}

.hb-footer h3 {
    margin: 4px 0 14px;
    color: var(--hb-ink);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hb-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-footer li {
    margin-bottom: 9px;
}

.hb-footer li a {
    color: var(--hb-muted);
    font-size: 0.83rem;
    text-decoration: none;
}

.hb-footer li a:hover {
    color: var(--hb-primary-strong);
}

.hb-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 38px;
    padding-top: 20px;
    border-top: 1px solid var(--hb-line);
    color: var(--hb-muted);
    font-size: 0.76rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1399.98px) {
    .hb-hero__float {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .hb-nav {
        display: none;
    }

    .hb-nav-toggle {
        display: inline-flex;
    }

    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .faq-intro {
        position: static;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .hb-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .hb-category-hero__back,
    .hb-save {
        margin-left: 0;
    }

    .hb-section {
        padding: 56px 0;
    }
}

@media (max-width: 767.98px) {
    .hb-header__inner {
        min-height: 64px;
    }

    .hb-hero {
        padding: 34px 0 58px;
    }

    .hb-breadcrumb {
        margin-bottom: 20px;
    }

    .hb-search {
        margin-top: 22px;
    }

    .hb-search__kbd {
        display: none;
    }

    .hb-hero__stats {
        gap: 8px 16px;
        font-size: 0.75rem;
    }

    .hb-section-head {
        align-items: flex-start;
    }

    .hb-section-head--browse .hb-search--compact {
        width: 100%;
        max-width: none;
    }

    .category-rail {
        top: 64px;
    }

    .category-block {
        scroll-margin-top: 126px;
    }

    .hb-cta__inner {
        padding: 30px;
    }

    .hb-footer__grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 575.98px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }

    .hb-hero h1 {
        font-size: 2.05rem;
    }

    .hb-hero__content > p {
        font-size: 0.93rem;
    }

    .hb-hero__stats span:last-child {
        display: none;
    }

    .hb-brand__text {
        font-size: 0.95rem;
    }

    .category-block__head {
        align-items: flex-start;
    }

    .category-block__link {
        margin-left: 62px;
    }

    .hb-workspace__body {
        padding: 14px;
    }

    .hb-workspace__placeholder {
        padding: 38px 18px;
    }

    .tools-empty {
        padding: 40px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hb-body *,
    .hb-body *::before,
    .hb-body *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Word Counter tool
   -------------------------------------------------------------------------- */

.hb-btn--sm {
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.hb-btn:disabled,
.hb-btn:disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hb-workspace__status--live {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #15803d;
}

.wc-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.wc-toolbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wc-toolbar__hint {
    margin: 4px 0 0;
    color: var(--hb-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.wc-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wc-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.wc-stat {
    padding: 12px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 13px;
    background: #fbfbfe;
}

.wc-stat--primary {
    border-color: #d8daf6;
    background: linear-gradient(180deg, #eef0ff 0%, #f9f9ff 100%);
}

.wc-stat__label {
    display: block;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.35;
    text-transform: uppercase;
}

.wc-stat strong {
    display: block;
    margin-top: 4px;
    color: var(--hb-ink);
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.wc-stat--primary strong {
    color: var(--hb-primary-strong);
    font-size: 1.65rem;
}

.wc-editor {
    padding: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
}

.wc-editor__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.wc-editor__head .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.wc-editor__limit {
    color: var(--hb-muted);
    font-size: 0.72rem;
}

.wc-textarea {
    min-height: 250px;
    resize: vertical;
    border-color: var(--hb-line);
    border-radius: 11px;
    background: #fcfcff;
    color: var(--hb-ink);
    font-size: 0.9rem;
    line-height: 1.65;
    box-shadow: none;
}

.wc-textarea:focus {
    border-color: #a5a8ec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.wc-help {
    margin: 8px 0 0;
    color: var(--hb-muted);
    font-size: 0.74rem;
    line-height: 1.55;
}

.wc-help--notice {
    color: #b45309;
}

.wc-keywords {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--hb-line-strong);
}

.wc-keywords__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.wc-keywords__head h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
}

.wc-keywords__head span {
    color: var(--hb-muted);
    font-size: 0.72rem;
}

.wc-keywords__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wc-keyword {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fbfbfe;
    color: var(--hb-body);
    font-size: 0.76rem;
}

.wc-keyword__word {
    color: var(--hb-ink);
    font-weight: 600;
}

.wc-keyword__count {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef0ff;
    color: var(--hb-primary-strong);
    font-size: 0.66rem;
    font-weight: 700;
}

.wc-status {
    min-height: 1.2em;
    margin: 12px 0 0;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Tool SEO content
   -------------------------------------------------------------------------- */

.tool-copy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 36px;
    align-items: start;
}

.tool-copy h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.tool-copy h2:not(:first-child) {
    margin-top: 30px;
}

.tool-copy p {
    margin: 0 0 14px;
    color: var(--hb-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.tool-copy__list {
    margin: 0;
    padding-left: 20px;
    color: var(--hb-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.tool-copy__list li {
    margin-bottom: 8px;
}

.tool-copy__list strong {
    color: var(--hb-ink);
}

.tool-copy .hb-steps {
    margin-top: 4px;
}

.tool-copy__aside .hb-side-card {
    background: #fff;
}

.tool-facts {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tool-facts li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f1f7;
    font-size: 0.8rem;
}

.tool-facts li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tool-facts span {
    color: var(--hb-muted);
}

.tool-facts strong {
    color: var(--hb-ink);
    font-weight: 700;
}

.tool-faq {
    margin-top: 44px;
}

.tool-faq > h2 {
    margin: 0 0 16px;
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

@media (max-width: 991.98px) {
    .tool-copy-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 767.98px) {
    .wc-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wc-toolbar__actions {
        width: 100%;
    }

    .wc-toolbar__actions .hb-btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .wc-editor {
        padding: 12px;
    }

    .wc-textarea {
        min-height: 210px;
    }

    .tool-copy h2,
    .tool-faq > h2 {
        font-size: 1.1rem;
    }
}

/* --------------------------------------------------------------------------
   JSON Formatter tool
   -------------------------------------------------------------------------- */

.jf-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.jf-toolbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.jf-toolbar__hint {
    margin: 4px 0 0;
    color: var(--hb-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.jf-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jf-options {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    background: #fbfbfe;
}

.jf-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jf-option .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.78rem;
    font-weight: 650;
}

.jf-option .form-select {
    width: auto;
    min-width: 120px;
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-size: 0.8rem;
}

.jf-option .form-select:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.jf-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.jf-check .form-check-input {
    margin: 0;
    border-color: #c7c9e8;
}

.jf-check .form-check-input:checked {
    background-color: var(--hb-primary);
    border-color: var(--hb-primary);
}

.jf-check .form-check-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.jf-limit {
    margin-left: auto;
    color: var(--hb-muted);
    font-size: 0.72rem;
}

.jf-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 13px;
}

.jf-result--success {
    border-color: #bbf7d0;
    background: #ecfdf3;
    color: #067647;
}

.jf-result--error {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.jf-result__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.jf-result--success .jf-result__icon {
    background: #d1fadf;
    color: #15803d;
}

.jf-result--error .jf-result__icon {
    background: #fee4e2;
    color: #b42318;
}

.jf-result__body {
    min-width: 0;
}

.jf-result__title {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.jf-result__message {
    margin: 3px 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.jf-result__location {
    margin: 6px 0 0;
    font-size: 0.76rem;
    font-weight: 700;
}

.jf-error-excerpt {
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid #fecdca;
    border-radius: 9px;
    background: #fff;
    color: #7a271a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.76rem;
    line-height: 1.55;
    max-height: 160px;
    overflow: auto;
    white-space: pre;
}

.jf-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #067647;
}

.jf-stats strong {
    color: #05603a;
    font-weight: 750;
}

.jf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.jf-pane {
    min-width: 0;
}

.jf-pane__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.jf-pane__head .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.jf-pane__meta {
    color: var(--hb-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.jf-pane__actions {
    display: flex;
    gap: 6px;
}

.jf-textarea {
    min-height: 340px;
    resize: vertical;
    border-color: var(--hb-line);
    border-radius: 11px;
    background: #fcfcff;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    tab-size: 2;
    box-shadow: none;
}

.jf-textarea--output {
    background: #f8f9ff;
}

.jf-textarea:focus {
    border-color: #a5a8ec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.jf-help {
    margin: 10px 0 0;
    color: var(--hb-muted);
    font-size: 0.74rem;
    line-height: 1.55;
}

.jf-help--notice {
    color: #b45309;
}

.jf-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .jf-grid {
        grid-template-columns: 1fr;
    }

    .jf-textarea {
        min-height: 260px;
    }
}

@media (max-width: 767.98px) {
    .jf-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .jf-toolbar__actions .hb-btn {
        width: 100%;
        white-space: normal;
    }

    .jf-limit {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .jf-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .jf-pane__actions {
        width: 100%;
    }

    .jf-pane__actions .hb-btn {
        flex: 1;
    }

    .jf-textarea {
        min-height: 220px;
    }
}

/* Readable inline code in tool SEO copy */
.tool-copy code {
    padding: 1px 5px;
    border: 1px solid #fbcfe8;
    border-radius: 5px;
    background: #fdf2f8;
    color: #9d174d;
    font-size: 0.86em;
}

/* --------------------------------------------------------------------------
   Password Generator tool
   -------------------------------------------------------------------------- */

.pg-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pg-toolbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pg-toolbar__hint {
    margin: 4px 0 0;
    color: var(--hb-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.pg-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pg-output {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #d8daf6;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f6ff 0%, #eef0ff 100%);
}

.pg-output__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--hb-primary-strong);
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 10px 18px -14px rgba(49, 46, 129, 0.6);
}

.pg-password {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 650;
    letter-spacing: 0.015em;
    line-height: 1.4;
    text-overflow: ellipsis;
    box-shadow: none;
}

.pg-password:focus {
    box-shadow: none;
}

.pg-strength {
    margin-top: 12px;
}

.pg-strength__row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.76rem;
}

.pg-strength__label {
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pg-strength__value {
    color: var(--hb-ink);
    font-weight: 750;
}

.pg-strength__value--weak {
    color: #b42318;
}

.pg-strength__value--fair {
    color: #b45309;
}

.pg-strength__value--strong {
    color: #15803d;
}

.pg-strength__value--very-strong {
    color: #166534;
}

.pg-strength__bits {
    margin-left: auto;
    color: var(--hb-muted);
    font-variant-numeric: tabular-nums;
}

.pg-meter {
    height: 8px;
    margin-top: 7px;
    border-radius: 999px;
    background: #e9ebf4;
    overflow: hidden;
}

.pg-meter__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #94a3b8;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.pg-meter__fill--weak {
    background: #ef4444;
}

.pg-meter__fill--fair {
    background: #f59e0b;
}

.pg-meter__fill--strong {
    background: #22c55e;
}

.pg-meter__fill--very-strong {
    background: #15803d;
}

.pg-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--hb-line-strong);
}

.pg-length__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.pg-length__head .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.pg-length__value {
    color: var(--hb-primary-strong);
    font-size: 0.86rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.pg-length__row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pg-range {
    flex: 1;
    min-width: 0;
    accent-color: var(--hb-primary);
}

.pg-length__number {
    width: 74px;
    flex-shrink: 0;
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    box-shadow: none;
}

.pg-length__number:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.pg-hint {
    margin: 8px 0 0;
    color: var(--hb-muted);
    font-size: 0.73rem;
    line-height: 1.55;
}

.pg-hint--notice {
    color: #b45309;
}

.pg-types {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.pg-types legend {
    margin-bottom: 6px;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.pg-types__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pg-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.pg-check .form-check-input {
    margin: 0;
    border-color: #c7c9e8;
}

.pg-check .form-check-input:checked {
    background-color: var(--hb-primary);
    border-color: var(--hb-primary);
}

.pg-check .form-check-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.pg-type__sample {
    color: var(--hb-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.pg-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--hb-line-strong);
}

.pg-pool {
    color: var(--hb-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.pg-note {
    margin: 12px 0 0;
    color: var(--hb-muted);
    font-size: 0.74rem;
    line-height: 1.6;
}

.pg-note code {
    padding: 1px 5px;
    border: 1px solid #fbcfe8;
    border-radius: 5px;
    background: #fdf2f8;
    color: #9d174d;
    font-size: 0.86em;
}

.pg-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .pg-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .pg-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .pg-toolbar__actions .hb-btn {
        width: 100%;
        white-space: normal;
    }

    .pg-output {
        padding: 14px;
    }

    .pg-password {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .pg-extra {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   QR Code Generator tool
   -------------------------------------------------------------------------- */

.qr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 24px;
    align-items: start;
}

.qr-form {
    min-width: 0;
}

.qr-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 12px;
    background: #f1f2f8;
}

.qr-tab {
    padding: 8px 18px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--hb-body);
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.qr-tab:hover {
    color: var(--hb-ink);
}

.qr-tab.is-active {
    background: #fff;
    color: var(--hb-ink);
    box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.45);
}

.qr-panel {
    outline: none;
}

.qr-panel:focus-visible {
    border-radius: 10px;
    outline: 3px solid rgba(105, 108, 255, 0.32);
    outline-offset: 4px;
}

.qr-field {
    min-width: 0;
    margin-bottom: 14px;
}

.qr-field .form-label {
    margin-bottom: 6px;
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-weight: 650;
}

.qr-field .form-control,
.qr-field .form-select {
    border-color: var(--hb-line);
    border-radius: 10px;
    background: #fcfcff;
    color: var(--hb-ink);
    font-size: 0.85rem;
    box-shadow: none;
}

.qr-field .form-control:focus,
.qr-field .form-select:focus {
    border-color: #a5a8ec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.qr-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.qr-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.qr-field--full {
    grid-column: 1 / -1;
}

.qr-field--center {
    display: flex;
    align-items: flex-end;
    padding-bottom: 9px;
}

.qr-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.qr-check .form-check-input {
    margin: 0;
    border-color: #c7c9e8;
}

.qr-check .form-check-input:checked {
    background-color: var(--hb-primary);
    border-color: var(--hb-primary);
}

.qr-check .form-check-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.qr-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--hb-line-strong);
}

.qr-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-range {
    flex: 1;
    min-width: 0;
    accent-color: var(--hb-primary);
}

.qr-range-value {
    min-width: 42px;
    color: var(--hb-primary-strong);
    font-size: 0.82rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.qr-colors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.qr-colors .form-control-color {
    width: 100%;
    height: 42px;
    padding: 4px;
    border-color: var(--hb-line);
    border-radius: 9px;
}

.qr-hint {
    margin: 8px 0 0;
    color: var(--hb-muted);
    font-size: 0.73rem;
    line-height: 1.6;
}

.qr-hint--notice {
    color: #b45309;
}

.qr-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--hb-line-strong);
}

.qr-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.qr-status--success {
    color: #15803d;
}

.qr-status--warning {
    color: #b45309;
}

.qr-status--error {
    color: #b42318;
}

.qr-preview {
    position: sticky;
    top: 100px;
}

.qr-preview__card {
    padding: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--hb-shadow-soft);
}

.qr-preview__stage {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 16px;
    border: 1px dashed var(--hb-line-strong);
    border-radius: 13px;
    background: #fbfbfe;
}

.qr-preview__stage svg {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 8px;
}

.qr-preview__empty {
    max-width: 220px;
    color: var(--hb-muted);
    text-align: center;
}

.qr-preview__empty-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: #eef0ff;
    color: var(--hb-primary-strong);
    font-size: 1.6rem;
}

.qr-preview__empty p {
    margin: 0 0 4px;
    color: var(--hb-ink);
    font-size: 0.86rem;
    font-weight: 650;
}

.qr-preview__empty span {
    font-size: 0.74rem;
    line-height: 1.5;
}

.qr-preview__meta {
    margin-top: 12px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #f7f8fc;
    color: var(--hb-muted);
    font-size: 0.72rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.qr-preview__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.qr-preview__actions .hb-btn {
    width: 100%;
    white-space: normal;
}

.qr-note {
    margin: 12px 0 0;
    color: var(--hb-muted);
    font-size: 0.72rem;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 991.98px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }

    .qr-preview {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .qr-fields-grid,
    .qr-options {
        grid-template-columns: 1fr;
    }

    .qr-actions .hb-btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .qr-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .qr-tab {
        width: 100%;
    }

    .qr-preview__stage {
        min-height: 240px;
    }
}

.qr-password-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.qr-password-row .form-control {
    flex: 1;
    min-width: 0;
}

.qr-password-row .hb-btn {
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Shared text tool patterns (UUID, Base64, URL, minifiers)
   -------------------------------------------------------------------------- */

.tt-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tt-toolbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tt-toolbar__hint {
    margin: 4px 0 0;
    color: var(--hb-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.tt-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tt-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 12px;
    background: #f1f2f8;
}

.tt-tab {
    padding: 8px 18px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--hb-body);
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tt-tab:hover {
    color: var(--hb-ink);
}

.tt-tab.is-active {
    background: #fff;
    color: var(--hb-ink);
    box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.45);
}

.tt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tt-pane {
    min-width: 0;
}

.tt-pane__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tt-pane__head .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.82rem;
    font-weight: 650;
}

.tt-pane__meta {
    color: var(--hb-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.tt-pane__actions {
    display: flex;
    gap: 6px;
}

.tt-textarea {
    min-height: 280px;
    resize: vertical;
    border-color: var(--hb-line);
    border-radius: 11px;
    background: #fcfcff;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.81rem;
    line-height: 1.6;
    box-shadow: none;
}

.tt-textarea--tall {
    min-height: 340px;
}

.tt-textarea--single {
    min-height: 220px;
}

.tt-textarea--output {
    background: #f8f9ff;
}

.tt-textarea:focus {
    border-color: #a5a8ec;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.tt-options {
    display: flex;
    align-items: center;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    background: #fbfbfe;
}

.tt-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tt-field .form-label {
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.78rem;
    font-weight: 650;
}

.tt-field .form-control,
.tt-field .form-select {
    width: auto;
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-size: 0.8rem;
    box-shadow: none;
}

.tt-field .form-control:focus,
.tt-field .form-select:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.tt-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.79rem;
    font-weight: 600;
    cursor: pointer;
}

.tt-check .form-check-input {
    margin: 0;
    border-color: #c7c9e8;
}

.tt-check .form-check-input:checked {
    background-color: var(--hb-primary);
    border-color: var(--hb-primary);
}

.tt-check .form-check-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.tt-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tt-range {
    flex: 1;
    min-width: 0;
    accent-color: var(--hb-primary);
}

.tt-range-value {
    min-width: 40px;
    color: var(--hb-primary-strong);
    font-size: 0.8rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.tt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--hb-line-strong);
}

.tt-hint {
    margin: 8px 0 0;
    color: var(--hb-muted);
    font-size: 0.73rem;
    line-height: 1.6;
}

.tt-hint--notice {
    color: #b45309;
}

.tt-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.tt-status--success {
    color: #15803d;
}

.tt-status--warning {
    color: #b45309;
}

.tt-status--error {
    color: #b42318;
}

.tt-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f8fc;
    color: var(--hb-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.tt-stats strong {
    color: var(--hb-ink);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.tt-note {
    margin: 10px 0 0;
    color: var(--hb-muted);
    font-size: 0.73rem;
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .tt-grid {
        grid-template-columns: 1fr;
    }

    .tt-textarea {
        min-height: 240px;
    }
}

@media (max-width: 767.98px) {
    .tt-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .tt-toolbar__actions .hb-btn {
        width: 100%;
        white-space: normal;
    }

    .tt-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .tt-field {
        width: 100%;
    }

    .tt-field .form-control,
    .tt-field .form-select {
        flex: 1;
        width: auto;
    }

    .tt-actions .hb-btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .tt-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .tt-tab {
        width: 100%;
    }

    .tt-textarea {
        min-height: 220px;
    }
}

/* --------------------------------------------------------------------------
   Colors & Design tools
   -------------------------------------------------------------------------- */

.color-picker {
    width: 54px;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--hb-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: 0;
    border-radius: 7px;
}

.color-hex-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-transform: uppercase;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 16px;
    background: #fbfbfe;
}

.color-preview__swatch {
    width: 88px;
    height: 88px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    background: #4f46e5;
    box-shadow: inset 0 0 0 4px #fff;
    flex-shrink: 0;
}

.color-preview__meta {
    flex: 1;
    min-width: 160px;
}

.color-preview__meta strong {
    display: block;
    margin: 2px 0;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.color-preview__meta span {
    display: block;
    color: var(--hb-muted);
    font-size: 0.78rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.color-card {
    padding: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
}

.color-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.color-card__head h3 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hb-muted);
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.color-input-row .hash {
    color: var(--hb-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

.color-input-row .form-control {
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-size: 0.86rem;
    box-shadow: none;
}

.color-input-row .form-control:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.color-triplet {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.color-triplet label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--hb-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.color-triplet .form-control {
    border-color: var(--hb-line);
    border-radius: 8px;
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    box-shadow: none;
}

.color-triplet .form-control:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.color-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
}

.color-code {
    flex: 1;
    min-width: 0;
    color: var(--hb-body);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.76rem;
    word-break: break-all;
}

/* Palette generator */

.palette-seed {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.palette-seed__hex {
    width: 120px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.palette-swatch {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.palette-swatch:hover {
    transform: translateY(-3px);
    border-color: #c7c9f5;
    box-shadow: var(--hb-shadow-card);
}

.palette-swatch__color {
    display: block;
    width: 100%;
    height: 132px;
    background: #4f46e5;
}

.palette-swatch__meta {
    display: block;
    padding: 10px 12px;
}

.palette-swatch__meta strong {
    display: block;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.02em;
}

.palette-swatch__meta small {
    display: block;
    margin-top: 2px;
    color: var(--hb-muted);
    font-size: 0.68rem;
}

/* Contrast checker */

.contrast-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.contrast-color-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    background: #fbfbfe;
}

.contrast-color-field label {
    width: 100%;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.78rem;
    font-weight: 650;
}

.contrast-color-field .color-hex-input {
    width: 112px;
}

.contrast-swap {
    margin-bottom: 12px;
}

.contrast-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid var(--hb-line);
    border-radius: 16px;
    background: #fbfbfe;
}

.contrast-result__ratio {
    color: var(--hb-ink);
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.contrast-result__label {
    color: var(--hb-muted);
    font-size: 0.78rem;
}

.contrast-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.contrast-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 11px;
    background: #fff;
}

.contrast-check__label {
    color: var(--hb-ink);
    font-size: 0.8rem;
    font-weight: 650;
}

.contrast-check__requirement {
    display: block;
    margin-top: 2px;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 500;
}

.contrast-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.contrast-badge--pass {
    border: 1px solid #bbf7d0;
    background: #ecfdf3;
    color: #15803d;
}

.contrast-badge--fail {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.contrast-preview {
    padding: 24px;
    border: 1px solid var(--hb-line);
    border-radius: 16px;
    background: #fff;
    color: #000;
}

.contrast-preview,
.contrast-preview * {
    color: inherit;
}

.contrast-preview h3 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.contrast-preview p {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.contrast-preview p:last-child {
    margin-bottom: 0;
    font-size: 0.75rem;
}

/* Gradient generator */

.gradient-preview {
    height: 260px;
    margin-bottom: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.gradient-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.gradient-angle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.gradient-angle .form-range {
    flex: 1;
    accent-color: var(--hb-primary);
}

.gradient-angle__value {
    min-width: 46px;
    color: var(--hb-primary-strong);
    font-size: 0.82rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gradient-stops {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.gradient-stop {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--hb-line);
    border-radius: 11px;
    background: #fbfbfe;
}

.gradient-stop .color-picker {
    width: 46px;
    height: 36px;
}

.gradient-stop__position {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gradient-stop__position .form-range {
    flex: 1;
    min-width: 80px;
    accent-color: var(--hb-primary);
}

.gradient-stop__value {
    min-width: 38px;
    color: var(--hb-ink);
    font-size: 0.76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.gradient-stop__remove {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    background: #fff;
    color: var(--hb-muted);
    cursor: pointer;
}

.gradient-stop__remove:hover {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.gradient-stop__remove:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gradient-css {
    min-height: 96px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .color-grid {
        grid-template-columns: 1fr;
    }

    .palette-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .contrast-controls {
        grid-template-columns: 1fr;
    }

    .contrast-swap {
        margin: 0;
        justify-self: start;
    }
}

@media (max-width: 767.98px) {
    .contrast-checks {
        grid-template-columns: 1fr;
    }

    .gradient-stop {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .gradient-stop__remove {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 575.98px) {
    .palette-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .palette-swatch__color {
        height: 110px;
    }

    .color-preview__swatch {
        width: 68px;
        height: 68px;
    }

    .gradient-stop {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .gradient-stop__remove {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }

    .gradient-preview {
        height: 200px;
    }
}

.gradient-stop__hex {
    color: var(--hb-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .gradient-stop {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .gradient-stop__remove {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 575.98px) {
    .gradient-stop {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    .gradient-stop__remove {
        grid-column: auto;
        grid-row: auto;
        justify-self: auto;
    }
}

/* Accessible links inside tool SEO copy */
.tool-copy a {
    color: var(--hb-primary-strong);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tool-copy a:hover {
    color: #3730a3;
}

/* --------------------------------------------------------------------------
   Converters
   -------------------------------------------------------------------------- */

.base-input-card {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fbfbfe;
}

.base-input-value {
    margin-top: 12px;
}

.base-value-input {
    border-color: var(--hb-line);
    border-radius: 10px;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.base-value-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.base-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.base-card {
    padding: 14px 16px;
    border: 1px solid var(--hb-line);
    border-radius: 13px;
    background: #fff;
}

.base-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.base-card__head h3 {
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.base-value {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f8f9ff;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.55;
    word-break: break-all;
}

.ts-input {
    width: 190px;
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    box-shadow: none;
}

.ts-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.ts-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ts-result {
    padding: 13px 15px;
    border: 1px solid var(--hb-line);
    border-radius: 12px;
    background: #fff;
}

.ts-result__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.ts-result__head span {
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ts-result__value {
    display: block;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.unit-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.unit-field {
    min-width: 0;
}

.unit-field .form-label {
    margin-bottom: 6px;
    color: var(--hb-ink);
    font-size: 0.78rem;
    font-weight: 650;
}

.unit-field .form-control,
.unit-field .form-select {
    border-color: var(--hb-line);
    border-radius: 9px;
    color: var(--hb-ink);
    font-size: 0.84rem;
    box-shadow: none;
}

.unit-field .form-control:focus,
.unit-field .form-select:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.unit-swap {
    margin-bottom: 1px;
}

.unit-result {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px 20px;
    border: 1px solid #d8daf6;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f6ff 0%, #eef0ff 100%);
}

.unit-result__label {
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.unit-result strong {
    color: var(--hb-ink);
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.unit-result__unit {
    color: var(--hb-primary-strong);
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .unit-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .unit-swap {
        grid-column: 1;
        justify-self: start;
    }
}

@media (max-width: 767.98px) {
    .ts-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .base-grid {
        grid-template-columns: 1fr;
    }

    .unit-controls {
        grid-template-columns: 1fr;
    }

    .unit-swap {
        width: 100%;
    }
}

/* Hash generator */
.hash-legacy {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    border: 1px solid #fde9c8;
    border-radius: 999px;
    background: #fffbeb;
    color: #b45309;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.hash-file-info {
    margin: 10px 0 0;
    color: var(--hb-body);
    font-size: 0.8rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Regex tester */
.regex-pattern-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.regex-pattern-slash {
    color: var(--hb-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.2rem;
    font-weight: 600;
}

.regex-pattern-input {
    flex: 1;
    min-width: 0;
    border-color: var(--hb-line);
    border-radius: 10px;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    box-shadow: none;
}

.regex-pattern-input:focus {
    border-color: #a5a8ec;
    box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.14);
}

.regex-flags {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.regex-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--hb-ink);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.regex-flag code {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hb-primary-strong);
    font-size: 0.78rem;
    font-weight: 750;
}

.regex-flag .form-check-input {
    margin: 0;
    border-color: #c7c9e8;
}

.regex-flag .form-check-input:checked {
    background-color: var(--hb-primary);
    border-color: var(--hb-primary);
}

.regex-summary {
    margin: 16px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 11px;
    background: #fbfbfe;
    color: var(--hb-body);
    font-size: 0.82rem;
    font-weight: 600;
}

.regex-results {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 14px;
}

.regex-result-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
}

.regex-result-card h3 {
    margin: 0 0 10px;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.regex-preview {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    border-radius: 9px;
    background: #f8f9ff;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.regex-preview mark {
    padding: 0 1px;
    border-radius: 3px;
    background: #fde68a;
    color: #111827;
}

.regex-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow: auto;
}

.regex-match {
    padding: 10px 12px;
    border: 1px solid var(--hb-line);
    border-radius: 10px;
    background: #fbfbfe;
}

.regex-match__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    color: var(--hb-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.regex-match__value {
    display: block;
    color: var(--hb-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.regex-groups {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 7px 0 0;
    padding: 7px 0 0;
    border-top: 1px dashed var(--hb-line-strong);
    list-style: none;
}

.regex-group {
    color: var(--hb-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.regex-group strong {
    color: var(--hb-body);
    font-weight: 700;
}

.regex-empty {
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.regex-notice {
    margin: 10px 0 0;
    color: var(--hb-muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    .regex-results {
        grid-template-columns: 1fr;
    }
}

/* Age calculator */
.age-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.age-field {
    min-width: 0;
}

.age-at-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.age-at-row .form-control {
    flex: 1;
    min-width: 0;
}

.age-today {
    flex: 0 0 auto;
}

.age-empty {
    margin: 16px 0 0;
    padding: 16px;
    border: 1px dashed var(--hb-line-strong);
    border-radius: 12px;
    color: var(--hb-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.age-result {
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid #dfe0ff;
    border-radius: 16px;
    background: linear-gradient(135deg, #f4f4ff, #fbfbff);
}

.age-result__label {
    display: block;
    color: var(--hb-muted);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.age-result__value {
    margin: 4px 0;
    color: var(--hb-ink);
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.age-result__meta {
    margin: 0;
    color: var(--hb-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.age-stats {
    margin-top: 14px;
}

.age-stat {
    padding: 14px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
}

.age-stat__label {
    display: block;
    color: var(--hb-muted);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.age-stat__value {
    display: block;
    margin-top: 4px;
    color: var(--hb-ink);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.age-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.age-meta {
    padding: 14px;
    border: 1px solid var(--hb-line);
    border-radius: 14px;
    background: #fff;
}

.age-meta__label {
    display: block;
    color: var(--hb-muted);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.age-meta__value {
    display: block;
    margin: 3px 0;
    color: var(--hb-ink);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.35;
}

.age-meta__note {
    color: var(--hb-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.age-leap-note {
    margin: 12px 0 0;
    color: var(--hb-muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

@media (max-width: 767.98px) {
    .age-inputs,
    .age-meta-grid {
        grid-template-columns: 1fr;
    }

    .age-at-row {
        flex-wrap: wrap;
    }

    .age-today {
        width: 100%;
    }
}
