/* ==========================================================================
   Chuyên mục Công cụ — ngôn ngữ thiết kế riêng, hiện đại hơn phần còn lại
   của site nhưng vẫn dùng đúng bộ màu thương hiệu (--mmtl-red/--mmtl-gold).
   ========================================================================== */
:root {
    --tool-radius: 20px;
    --tool-radius-sm: 12px;
    --tool-ink: #2b1712;
    --tool-muted: #7a6459;
    --tool-surface: #ffffff;
    --tool-line: #f0dfc4;
    --tool-shadow: 0 18px 44px rgba(135, 20, 15, .12);
    --tool-shadow-lift: 0 26px 60px rgba(135, 20, 15, .2);
    --tool-gradient-hero: radial-gradient(120% 160% at 15% -10%, #ffb44d 0%, transparent 45%),
        radial-gradient(90% 140% at 100% 0%, #ffe6a3 0%, transparent 40%),
        linear-gradient(135deg, #7a0509 0%, #b70710 45%, #8a2b0e 100%);
    --tool-gradient-gold: linear-gradient(135deg, #ffd873, #d69a19);
}

.tools-page {
    background: #fff8ea;
    padding-bottom: 64px;
}

.tools-page .mmtl-breadcrumb {
    padding-top: 20px;
}

/* ---------- Hero dùng chung cho mọi trang công cụ ---------- */
.tool-hero {
    position: relative;
    overflow: hidden;
    margin: 18px 0 40px;
    padding: 46px 40px;
    border-radius: 28px;
    background: var(--tool-gradient-hero);
    color: #fff3da;
    box-shadow: var(--tool-shadow-lift);
    isolation: isolate;
}

.tool-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    opacity: .4;
    mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}

.tool-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #ffe8b0;
}

.tool-hero h1 {
    margin: 0 0 14px;
    max-width: 720px;
    font-size: clamp(30px, 4.4vw, 48px);
    line-height: 1.1;
    color: #fff;
}

.tool-hero p {
    max-width: 640px;
    margin: 0;
    font-size: 17px;
    color: #ffe4c2;
}

.tool-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 22px;
    color: #ffe8b0;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.tool-hero__back .mmtl-icon {
    width: 16px;
    height: 16px;
    transform: rotate(180deg);
}

.tool-hero__grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 28px;
    align-items: center;
}

.tool-hero__figure {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    max-width: 220px;
    margin-left: auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(2px);
}

.tool-hero__figure .mmtl-icon {
    width: 92px;
    height: 92px;
    stroke: #ffe8b0;
    stroke-width: 1.3;
}

/* ---------- Icon mặc định của bộ mmtl_icon: line-style, kế thừa currentColor ---------- */
.mmtl-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Trang hub /cong-cu/ ---------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin: 0 0 48px;
}

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    border-radius: var(--tool-radius);
    background: var(--tool-surface);
    border: 1px solid var(--tool-line);
    box-shadow: var(--tool-shadow);
    text-decoration: none;
    color: var(--tool-ink);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.tool-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--tool-gradient-gold);
    opacity: .14;
    transition: opacity .22s ease, transform .22s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--tool-shadow-lift);
    border-color: #f3c675;
}

.tool-card:hover::before {
    opacity: .28;
    transform: scale(1.15);
}

.tool-card__icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff1d6, #ffe0a3);
    color: var(--mmtl-red);
}

.tool-card__icon .mmtl-icon {
    width: 28px;
    height: 28px;
    stroke-width: 1.6;
}

.tool-card h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.3;
    color: #5a2d14;
}

.tool-card p {
    margin: 0;
    color: var(--tool-muted);
    font-size: 15px;
    line-height: 1.55;
}

.tool-card small {
    display: block;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid #f0dfc4;
    color: #8a6556;
    font-size: 13px;
    line-height: 1.55;
}

.tool-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: var(--mmtl-red);
    font-size: 14px;
}

.tool-card__cta .mmtl-icon {
    width: 16px;
    height: 16px;
    transition: transform .18s ease;
}

.tool-card:hover .tool-card__cta .mmtl-icon {
    transform: translateX(4px);
}

.tools-note {
    display: flex;
    gap: 14px;
    padding: 20px 22px;
    border-radius: var(--tool-radius);
    background: #fff3df;
    border: 1px dashed #e9c073;
    color: #7c4a12;
    font-size: 14.5px;
    line-height: 1.6;
}

.tools-note .mmtl-icon {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--mmtl-red);
}

.tools-hub-page .mmtl-hero {
    margin-top: 0 !important;
    padding: 38px 0 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 16%, rgba(40, 183, 174, .23), transparent 26%),
        radial-gradient(circle at 9% 20%, rgba(255, 214, 111, .24), transparent 22%),
        linear-gradient(135deg, #fff4df 0%, #f6b850 42%, #b90510 100%) !important;
    color: #fff;
}

.tools-hub-page .mmtl-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(148, 6, 14, .88), rgba(148, 6, 14, .58) 44%, rgba(148, 6, 14, .12)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 92px);
}

.tools-hub-page .mmtl-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -130px;
    width: 410px;
    height: 410px;
    pointer-events: none;
    border: 1px solid rgba(255, 230, 166, .28);
    border-radius: 50%;
    box-shadow: inset 0 0 0 42px rgba(255, 255, 255, .05), inset 0 0 0 84px rgba(37, 244, 238, .05);
}

.tools-hub-page .mmtl-hero__grid {
    position: relative;
    z-index: 1;
    min-height: 304px;
    grid-template-columns: minmax(0, 570px) minmax(360px, 1fr);
}

.tools-hub-page .mmtl-hero__copy h1 {
    max-width: 590px;
    font-size: clamp(36px, 4vw, 58px);
    text-shadow: 0 10px 28px rgba(76, 0, 5, .24);
}

.tools-hub-page .mmtl-hero__copy p {
    color: #fff8dc;
}

.tools-hub-page .mmtl-hero__kicker {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .12);
    color: #fff8cf;
}

.tools-hub-page .mmtl-hero__figure {
    position: relative;
}

.tools-hub-page .mmtl-hero__figure::before {
    content: "";
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 24px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 26px 60px rgba(64, 4, 9, .18);
}

.tools-hub-page .mmtl-hero__figure img {
    height: 286px;
    border-radius: 18px;
    object-position: center right;
    box-shadow: 0 18px 42px rgba(66, 7, 12, .18);
}

.tools-hub-page .mmtl-hero__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
    padding: 0;
    list-style: none;
}

.tools-hub-page .mmtl-hero__facts li {
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
    backdrop-filter: blur(8px);
}

.tools-hub-page .mmtl-hero__facts strong,
.tools-hub-page .mmtl-hero__facts span {
    display: block;
}

.tools-hub-page .mmtl-hero__facts strong {
    color: #fff0a8;
    font-size: 24px;
    line-height: 1;
}

.tools-hub-page .mmtl-hero__facts span {
    margin-top: 5px;
    color: #fff2d5;
    font-size: 13px;
    font-weight: 800;
}

.tools-hub-page .mmtl-hero + .site-shell {
    margin-top: 30px;
}

.tools-hub-guide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    padding: 26px;
    border: 1px solid #efd8af;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(255, 245, 224, .88));
    box-shadow: 0 16px 38px rgba(114, 34, 12, .08);
}

.tools-hub-guide__kicker {
    color: var(--mmtl-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tools-hub-guide h2 {
    margin: 7px 0 9px;
    color: #542718;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.tools-hub-guide p {
    max-width: 660px;
    margin: 0;
    color: #73594a;
    line-height: 1.65;
}

.tools-hub-guide__list {
    display: grid;
    gap: 10px;
}

.tools-hub-guide__list span {
    padding: 12px 14px;
    border: 1px solid #efd4a5;
    border-radius: 12px;
    background: #fff;
    color: #63311f;
    font-size: 14px;
    font-weight: 800;
}

/* ---------- Panel dùng chung (khung công cụ) ---------- */
.tool-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 30px;
    border-radius: var(--tool-radius);
    background: var(--tool-surface);
    border: 1px solid var(--tool-line);
    box-shadow: var(--tool-shadow);
}

.tool-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tool-panel__head h2 {
    margin: 0;
    font-size: 20px;
    color: #5a2d14;
}

.tool-panel__head span {
    color: var(--tool-muted);
    font-size: 14px;
}

/* ---------- Đếm ngược Tết ---------- */
.tet-today-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(190px, .55fr) minmax(220px, .7fr);
    gap: 16px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid #efd4a4;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 247, 230, .93)),
        #fffaf2;
    box-shadow: 0 12px 30px rgba(114, 34, 12, .08);
}

.tet-today-card__main,
.tet-today-card__lunar,
.tet-today-card__meta > div {
    border-radius: 14px;
}

.tet-today-card__main {
    padding: 22px;
    background: linear-gradient(135deg, #8e050b, #c60814);
    color: #fff4dc;
}

.tet-today-card__eyebrow,
.tet-today-card__lunar span,
.tet-today-card__meta small {
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tet-today-card__eyebrow {
    color: #ffe09a;
}

.tet-today-card__main strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(26px, 3.2vw, 40px);
    line-height: 1.08;
}

.tet-today-card__main p {
    margin: 8px 0 0;
    color: #ffe5c2;
    font-size: 17px;
    font-weight: 700;
}

.tet-today-card__lunar {
    display: grid;
    place-content: center;
    padding: 20px;
    border: 1px solid #e9c17a;
    background: #fff2d9;
    text-align: center;
}

.tet-today-card__lunar span,
.tet-today-card__meta small {
    color: #9a5a12;
}

.tet-today-card__lunar strong {
    display: block;
    margin-top: 6px;
    color: var(--mmtl-red);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1;
}

.tet-today-card__lunar p {
    margin: 8px 0 0;
    color: #5f3524;
    font-weight: 800;
}

.tet-today-card__meta {
    display: grid;
    gap: 10px;
}

.tet-today-card__meta > div {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 15px 16px;
    border: 1px solid #efd8af;
    background: #fff;
}

.tet-today-card__meta strong {
    color: #542718;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}

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

.countdown__unit {
    position: relative;
    padding: 22px 8px 16px;
    border-radius: 18px;
    background: linear-gradient(160deg, #2b1712, #4a231a);
    color: #fff3da;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(43, 23, 18, .28);
}

.countdown__unit::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, .12);
}

.countdown__value {
    display: block;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--tool-gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.countdown__label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #e9c88a;
}

.countdown__caption {
    text-align: center;
    color: var(--tool-muted);
    font-size: 15px;
    margin: -8px 0 6px;
}

.countdown__caption strong {
    color: var(--mmtl-red);
}

.countdown__done {
    display: none;
    text-align: center;
    padding: 26px;
    border-radius: var(--tool-radius);
    background: var(--tool-gradient-gold);
    color: #5a2d14;
    font-size: 22px;
    font-weight: 800;
}

.countdown-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 26px;
}

/* ---------- Form: input, select, chip picker ---------- */
.tool-field {
    display: grid;
    gap: 8px;
}

.tool-field label {
    font-weight: 700;
    font-size: 14px;
    color: #5a2d14;
}

.tool-field input[type="number"],
.tool-field select {
    height: 52px;
    padding: 0 16px;
    border-radius: var(--tool-radius-sm);
    border: 1.5px solid var(--tool-line);
    background: #fffaf1;
    font-size: 17px;
    font-variant-numeric: tabular-nums;
    color: var(--tool-ink);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.tool-field input[type="number"]:focus,
.tool-field select:focus {
    outline: none;
    border-color: var(--mmtl-gold);
    box-shadow: 0 0 0 4px rgba(214, 154, 25, .18);
}

.tool-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.tool-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--tool-radius-sm);
    background: linear-gradient(135deg, var(--mmtl-red), #8a0a10);
    color: #fff;
    font-weight: 800;
    font-size: 15.5px;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(183, 7, 16, .28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.tool-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(183, 7, 16, .34);
}

.tool-submit:active {
    transform: translateY(0);
}

.tool-error {
    display: none;
    padding: 12px 16px;
    border-radius: var(--tool-radius-sm);
    background: #fdecec;
    border: 1px solid #f3b9b9;
    color: #a3231c;
    font-size: 14px;
    font-weight: 600;
}

.tool-error.is-visible {
    display: block;
}

/* ---------- Chip group (chọn người nhận / ngân sách) ---------- */
.tool-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--tool-line);
    background: #fffaf1;
    color: var(--tool-ink);
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    transition: all .15s ease;
}

.tool-chip:hover {
    border-color: #f3c675;
    background: #fff3df;
}

.tool-chip.is-active {
    border-color: var(--mmtl-red);
    background: var(--mmtl-red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(183, 7, 16, .28);
}

/* ---------- Kết quả tra cứu ---------- */
.tool-result {
    display: none;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px;
    margin-top: 4px;
    border-radius: var(--tool-radius);
    background: linear-gradient(180deg, #fff8ea, #fff);
    border: 1px solid var(--tool-line);
}

.tool-result.is-visible {
    display: grid;
    animation: tool-reveal .35s ease;
}

@keyframes tool-reveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-result__top {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.tool-result__badge {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--tool-gradient-gold);
    color: #5a2d14;
    font-weight: 900;
    font-size: 22px;
    flex: none;
    box-shadow: 0 10px 22px rgba(214, 154, 25, .35);
}

.tool-result__heading strong {
    display: block;
    font-size: 24px;
    color: #5a2d14;
}

.tool-result__heading span {
    color: var(--tool-muted);
    font-size: 14.5px;
}

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

.tool-fact {
    padding: 14px 16px;
    border-radius: var(--tool-radius-sm);
    background: #fff;
    border: 1px solid var(--tool-line);
}

.tool-fact small {
    display: block;
    color: var(--tool-muted);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.tool-fact strong {
    font-size: 16.5px;
    color: var(--tool-ink);
}

.tool-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-swatch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px 7px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--tool-line);
    font-size: 13.5px;
    font-weight: 700;
}

.tool-swatch__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .12);
}

.tool-swatch--ky {
    opacity: .7;
}

.tool-result__note {
    padding: 14px 16px;
    border-radius: var(--tool-radius-sm);
    background: #fff3df;
    border: 1px dashed #e9c073;
    color: #7c4a12;
    font-size: 14px;
    line-height: 1.6;
}

.tool-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--tool-radius-sm);
    text-decoration: none;
    font-weight: 800;
    font-size: 14.5px;
}

.tool-btn--primary {
    background: linear-gradient(135deg, var(--mmtl-red), #8a0a10);
    color: #fff;
    box-shadow: 0 12px 24px rgba(183, 7, 16, .26);
}

.tool-btn--ghost {
    background: #fff;
    border: 1.5px solid var(--tool-line);
    color: var(--mmtl-red);
}

.tool-btn .mmtl-icon {
    width: 16px;
    height: 16px;
}

/* ---------- Vòng chọn con giáp ---------- */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.zodiac-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--tool-radius-sm);
    border: 1.5px solid var(--tool-line);
    background: #fffaf1;
    cursor: pointer;
    text-align: center;
    transition: all .15s ease;
}

.zodiac-tile__emoji {
    font-size: 30px;
    line-height: 1;
}

.zodiac-tile strong {
    font-size: 14px;
    color: var(--tool-ink);
}

.zodiac-tile small {
    color: var(--tool-muted);
    font-size: 12px;
}

.zodiac-tile:hover {
    border-color: #f3c675;
    transform: translateY(-3px);
}

.zodiac-tile.is-active {
    border-color: var(--mmtl-red);
    background: linear-gradient(180deg, #fff3df, #fff);
    box-shadow: 0 10px 22px rgba(183, 7, 16, .16);
}

.zodiac-tile.is-active strong {
    color: var(--mmtl-red);
}

/* ---------- Wizard quà Tết theo ngân sách (2 bước) ---------- */
.tool-steps {
    display: grid;
    gap: 26px;
}

.tool-step__label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 800;
    color: #5a2d14;
}

.tool-step__label b {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mmtl-red);
    color: #fff;
    font-size: 13px;
}

/* ---------- Trang tin tưởng chéo giữa các công cụ ---------- */
.tools-cross {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--tool-line);
}

.tools-cross h2 {
    margin: 0 0 16px;
    font-size: 19px;
    color: #5a2d14;
}

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

.tools-cross-grid a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--tool-radius-sm);
    background: #fff;
    border: 1px solid var(--tool-line);
    text-decoration: none;
    color: var(--tool-ink);
    font-weight: 700;
    font-size: 14.5px;
    transition: all .15s ease;
}

.tools-cross-grid a:hover {
    border-color: #f3c675;
    transform: translateY(-2px);
}

.tools-cross-grid .mmtl-icon {
    color: var(--mmtl-red);
    flex: none;
}

/* ---------- Tool pages using page-builder hero ---------- */
.tools-page .mmtl-hero {
    margin: 0;
    padding: 42px 0 34px;
    background:
        radial-gradient(80% 130% at 84% 18%, rgba(255, 211, 128, .28), transparent 48%),
        linear-gradient(120deg, #94070d 0%, #bd0712 50%, #8c2a0d 100%);
}

.tools-page .mmtl-hero__grid {
    min-height: 292px;
    grid-template-columns: minmax(0, 600px) minmax(300px, 1fr);
    gap: 34px;
    align-items: center;
}

.tools-page .mmtl-hero__copy {
    max-width: 640px;
}

.tools-page .mmtl-hero__copy h1 {
    max-width: 620px;
    margin-bottom: 14px;
    font-size: clamp(32px, 4.1vw, 52px);
    line-height: 1.08;
}

.tools-page .mmtl-hero__copy p {
    max-width: 560px;
    font-size: 17px;
    line-height: 1.65;
    color: #ffe6bf;
}

.tools-page .mmtl-hero__figure {
    justify-self: end;
    width: min(100%, 520px);
}

.tools-page .mmtl-hero__figure img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 24px 58px rgba(53, 5, 3, .28);
}

.tools-page .mmtl-hero + .site-shell {
    margin-top: 34px;
}

.tools-page .tool-panel {
    position: relative;
    padding: 34px;
    border-radius: 18px;
    border-color: #edcf9c;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 250, 241, .96)),
        #fff;
    box-shadow: 0 18px 46px rgba(114, 34, 12, .12);
}

.tools-page .tool-panel__head {
    padding-bottom: 18px;
    border-bottom: 1px solid #f0dfc4;
}

.tools-page .tool-field input[type="number"],
.tools-page .tool-field select,
.tools-page .tool-field input[type="text"] {
    border-radius: 12px;
    background: #fffaf2;
    border-color: #e8c892;
}

.tools-page .tool-field input[type="number"]:focus,
.tools-page .tool-field select:focus,
.tools-page .tool-field input[type="text"]:focus {
    border-color: var(--mmtl-red);
    box-shadow: 0 0 0 4px rgba(183, 7, 16, .1);
    outline: none;
}

.tools-page .tools-cross {
    margin-top: 44px;
    padding: 26px;
    border: 1px solid #efd8af;
    border-radius: 18px;
    background: rgba(255, 255, 255, .62);
}

@media (max-width: 980px) {
    .tools-hub-page .mmtl-hero__grid,
    .tools-hub-guide {
        grid-template-columns: 1fr;
    }

    .tools-hub-page .mmtl-hero__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tools-page .mmtl-hero {
        padding: 34px 0 30px;
    }

    .tools-page .mmtl-hero__grid {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tools-page .mmtl-hero__figure {
        justify-self: stretch;
        width: 100%;
    }

    .tools-page .mmtl-hero__figure img {
        height: 220px;
    }

    .tools-page .mmtl-hero + .site-shell {
        margin-top: 28px;
    }

    .tool-hero__grid {
        grid-template-columns: 1fr;
    }

    .tool-hero__figure {
        display: none;
    }

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

    .tool-form-row {
        grid-template-columns: 1fr;
    }

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

    .zodiac-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .tools-cross-grid {
        grid-template-columns: 1fr;
    }

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

    .tet-today-card {
        grid-template-columns: 1fr 1fr;
    }

    .tet-today-card__main {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .tools-hub-page .mmtl-hero {
        padding-top: 26px;
    }

    .tools-hub-page .mmtl-hero__copy h1 {
        font-size: 34px;
    }

    .tools-hub-page .mmtl-hero__facts,
    .tools-hub-page .tools-grid {
        grid-template-columns: 1fr;
    }

    .tet-today-card {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .tet-today-card__main,
    .tet-today-card__lunar,
    .tet-today-card__meta > div {
        padding: 16px;
    }

    .tools-hub-guide {
        padding: 18px;
    }

    .tools-page .mmtl-hero {
        padding: 28px 0 26px;
    }

    .tools-page .mmtl-hero__copy h1 {
        font-size: 30px;
    }

    .tools-page .mmtl-hero__figure img {
        height: 180px;
        border-radius: 12px;
    }

    .tools-page .mmtl-hero + .site-shell {
        margin-top: 22px;
    }

    .tools-page .tool-panel,
    .tools-page .tools-cross {
        padding: 20px;
        border-radius: 14px;
    }

    .tool-hero {
        padding: 32px 22px;
        border-radius: 20px;
    }

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

    .tool-result__facts {
        grid-template-columns: 1fr 1fr;
    }
}
