.tools-shell {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.tools-page,
.tool-detail {
    overflow: clip;
}

.tools-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 78% 25%, rgb(8 127 140 / 8%), transparent 34%),
        var(--bg-primary);
}

.tools-hero::after {
    position: absolute;
    right: -180px;
    bottom: -420px;
    width: 720px;
    height: 720px;
    border: 1px solid rgb(8 127 140 / 13%);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tools-hero__inner {
    position: relative;
    z-index: 1;
    min-height: 490px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
    gap: clamp(38px, 7vw, 90px);
    padding: 54px 0 65px;
}

.tools-back-link,
.tools-breadcrumb a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.tools-back-link {
    display: inline-block;
    margin-bottom: 28px;
}

.tools-back-link:hover,
.tools-breadcrumb a:hover {
    color: var(--essayfi-teal);
}

.tools-hero__copy > .eyebrow {
    margin-bottom: 17px;
}

.tools-hero h1,
.tool-detail__heading h1 {
    max-width: 730px;
    margin: 0;
    font-size: clamp(2.8rem, 6.3vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.075em;
    line-height: 1.01;
}

.tools-hero h1 span {
    color: var(--essayfi-teal);
}

.tools-hero__copy > p:not(.eyebrow) {
    max-width: 610px;
    margin: 21px 0 27px;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.8;
}

.tools-button {
    min-height: 49px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 19px;
    border-radius: 5px;
    background: var(--essayfi-teal);
    color: #FFFFFF;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.tools-button:hover {
    background: #075E6B;
    transform: translateY(-1px);
}

.tools-hero__art {
    position: relative;
    min-height: 320px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 14px 14px 42px 14px;
    background:
        radial-gradient(circle at 50% 44%, rgb(247 243 234 / 88%), transparent 34%),
        color-mix(in srgb, var(--essayfi-teal) 8%, var(--bg-elevated));
    box-shadow: var(--shadow-soft);
}

.tools-hero__art::before,
.tools-hero__art::after {
    position: absolute;
    width: 210px;
    height: 275px;
    border: 1px solid color-mix(in srgb, var(--essayfi-teal) 25%, var(--border-color));
    border-radius: 4px;
    background: color-mix(in srgb, var(--bg-elevated) 84%, transparent);
    content: "";
    transform: rotate(-10deg) translate(-36px, 8px);
}

.tools-hero__art::after {
    transform: rotate(8deg) translate(39px, 15px);
    background: transparent;
}

.tools-hero__art-label,
.tools-hero__art-note {
    position: absolute;
    z-index: 1;
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.tools-hero__art-label {
    top: 26px;
    left: 26px;
}

.tools-hero__art-note {
    right: 26px;
    bottom: 25px;
}

.tools-hero__art-mark {
    position: relative;
    z-index: 1;
    color: var(--essayfi-teal);
    font-family: "Cabin Condensed", sans-serif;
    font-size: clamp(7rem, 14vw, 11rem);
    font-weight: 700;
    letter-spacing: -0.1em;
    line-height: 1;
    text-shadow: 0 8px 24px rgb(8 127 140 / 12%);
}

.tools-library {
    padding: 75px 0 88px;
}

.tools-section-heading {
    margin-bottom: 28px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.tools-section-heading .eyebrow {
    margin-bottom: 11px;
}

.tools-section-heading h2 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(1.9rem, 3.7vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 1.1;
}

.tools-section-heading > p {
    max-width: 310px;
    margin: 0 0 4px;
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.7;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tool-card {
    min-height: 250px;
    padding: clamp(22px, 3.4vw, 34px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--essayfi-teal) 7%, transparent), transparent 34%),
        var(--bg-elevated);
    box-shadow: var(--shadow-soft);
    color: inherit;
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover,
.tool-card:focus-visible {
    border-color: var(--essayfi-teal);
    box-shadow: 0 16px 34px rgb(32 33 36 / 9%);
    transform: translateY(-3px);
}

.tool-card:focus-visible,
.tools-button:focus-visible,
.tool-clear:focus-visible,
.tool-file-drop input:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--essayfi-teal) 40%, transparent);
    outline-offset: 3px;
}

.tool-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.tool-card__icon,
.tool-workspace__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--essayfi-teal) 10%, var(--bg-primary));
    color: var(--essayfi-teal);
    font-family: "Cabin Condensed", sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.tool-card h3 {
    margin: 22px 0 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    letter-spacing: -0.045em;
}

.tool-card > p {
    max-width: 470px;
    margin: 10px 0 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.75;
}

.tool-card__action {
    margin-top: auto;
    padding-top: 17px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    color: var(--essayfi-teal);
    font-size: 0.78rem;
    font-weight: 800;
}

.tools-integrity-note {
    margin-top: 24px;
    padding: 20px 23px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-left: 3px solid var(--essayfi-teal);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.83rem;
    line-height: 1.7;
}

.tools-integrity-note > span {
    color: var(--essayfi-teal);
    font-size: 1.2rem;
}

.tools-integrity-note p {
    margin: 0;
}

.tools-integrity-note strong {
    color: var(--text-primary);
}

.tool-detail {
    padding-bottom: 80px;
}

.tools-breadcrumb {
    padding-top: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.tools-breadcrumb > span[aria-hidden="true"] {
    color: var(--essayfi-teal);
    font-weight: 800;
}

.tools-breadcrumb > span[aria-current="page"] {
    max-width: min(480px, 100%);
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-detail__heading {
    max-width: 870px;
    margin: 56px auto 34px;
    text-align: center;
}

.tool-detail__heading .eyebrow {
    margin-bottom: 16px;
}

.tool-detail__heading h1 {
    margin: 0 auto;
    font-size: clamp(2.45rem, 5.8vw, 4.5rem);
}

.tool-detail__heading > p:last-child {
    max-width: 710px;
    margin: 18px auto 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.tool-workspace {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(22px, 4.5vw, 42px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--essayfi-teal) 6%, transparent), transparent 32%),
        var(--bg-elevated);
    box-shadow: 0 18px 50px rgb(32 33 36 / 7%);
}

.tool-workspace__top {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-workspace__top .tool-workspace__icon {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 1.25rem;
}

.tool-workspace__eyebrow {
    margin: 0 0 5px;
    color: var(--essayfi-teal);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.tool-workspace__top h2 {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    letter-spacing: -0.055em;
}

.tool-field-label,
.tool-form-grid label,
.tool-adviser-grid label {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
}

.tool-workspace textarea,
.tool-form-grid input,
.tool-form-grid select,
.tool-adviser-grid select {
    width: 100%;
    min-height: 49px;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    outline: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tool-workspace textarea {
    min-height: 230px;
    resize: vertical;
    line-height: 1.7;
}

.tool-workspace textarea:focus,
.tool-form-grid input:focus,
.tool-form-grid select:focus,
.tool-adviser-grid select:focus {
    border-color: var(--essayfi-teal);
    box-shadow: 0 0 0 3px rgb(8 127 140 / 10%);
}

.tool-file-drop {
    margin-top: 16px;
    padding: 17px 19px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px dashed var(--border-strong);
    border-radius: 7px;
    background: color-mix(in srgb, var(--bg-primary) 65%, transparent);
}

.tool-file-drop__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--essayfi-teal) 10%, var(--bg-primary));
    color: var(--essayfi-teal);
    font-size: 1.35rem;
    font-weight: 800;
}

.tool-file-drop label {
    color: var(--text-primary);
    font-size: 0.81rem;
    font-weight: 800;
    cursor: pointer;
}

.tool-file-drop p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.71rem;
    line-height: 1.5;
}

.tool-file-drop input {
    width: min(260px, 46%);
    margin-left: auto;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.74rem;
}

.tool-results {
    margin-top: 23px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.tool-results > div {
    min-width: 0;
    padding: 18px 12px;
    text-align: center;
}

.tool-results > div + div {
    border-left: 1px solid var(--border-color);
}

.tool-results span,
.tool-results small {
    display: block;
}

.tool-results span {
    color: var(--essayfi-teal);
    font-size: clamp(1.35rem, 4vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

.tool-results small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.tool-status {
    min-height: 1.5em;
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.tool-clear {
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.76rem;
    text-decoration: underline;
    cursor: pointer;
}

.tool-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tool-adviser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tool-answer {
    margin-top: 24px;
    padding: 20px 22px;
    border-left: 3px solid var(--essayfi-teal);
    border-radius: 0 7px 7px 0;
    background: color-mix(in srgb, var(--essayfi-teal) 6%, var(--bg-primary));
}

.tool-answer__label {
    color: var(--text-muted);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.tool-answer p {
    margin: 7px 0 0;
    color: var(--text-primary);
    font-size: clamp(1rem, 2vw, 1.22rem);
    font-weight: 800;
    line-height: 1.55;
}

.tool-workspace__note {
    margin: 15px 0 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.65;
}

.tool-detail__guide {
    max-width: 900px;
    margin: 48px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 34px;
}

.tool-detail__guide article h2 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3.6vw, 2.35rem);
    letter-spacing: -0.06em;
    line-height: 1.12;
}

.tool-detail__guide article h3 {
    margin: 28px 0 8px;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}

.tool-detail__guide article > p:not(.eyebrow) {
    margin: 12px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.tool-reference-table {
    margin: 16px 0 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 7px;
}

.tool-reference-table > div {
    padding: 12px 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.83rem;
}

.tool-reference-table > div:first-child {
    border-top: 0;
    background: color-mix(in srgb, var(--essayfi-teal) 6%, var(--bg-primary));
    color: var(--text-primary);
}

.tool-caveat {
    margin-top: 20px !important;
    padding: 16px 18px;
    border-left: 3px solid var(--essayfi-teal);
    background: var(--bg-elevated);
}

.tool-caveat strong {
    color: var(--text-primary);
}

.tool-faq {
    margin-top: 34px;
}

.tool-faq h2 {
    margin: 0 0 13px;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
}

.tool-faq details {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
}

.tool-faq summary {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.55;
    cursor: pointer;
}

.tool-faq details p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.75;
}

.tool-sidebar {
    position: sticky;
    top: 120px;
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-soft);
}

.tool-sidebar__mark {
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--essayfi-teal) 9%, var(--bg-primary));
    color: var(--essayfi-teal);
    font-size: 1.3rem;
}

.tool-sidebar .eyebrow {
    margin: 0 0 9px;
}

.tool-sidebar h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.05em;
}

.tool-sidebar > p:not(.eyebrow) {
    margin: 10px 0 19px;
    color: var(--text-muted);
    font-size: 0.81rem;
    line-height: 1.7;
}

.tool-sidebar > a {
    min-height: 42px;
    margin-top: 9px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.tool-sidebar > a:hover {
    border-color: var(--essayfi-teal);
    color: var(--essayfi-teal);
}

@media (max-width: 800px) {
    .tools-hero__inner {
        grid-template-columns: minmax(0, 1fr) minmax(230px, 0.8fr);
        gap: 30px;
    }

    .tools-section-heading {
        align-items: flex-start;
    }

    .tool-detail__guide {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 22px;
    }

    .tool-adviser-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tools-shell {
        width: min(100% - 34px, 560px);
    }

    .tools-hero__inner {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 33px 0 44px;
    }

    .tools-back-link {
        margin-bottom: 22px;
    }

    .tools-hero h1 {
        font-size: clamp(2.65rem, 12vw, 4.1rem);
    }

    .tools-hero__art {
        min-height: 230px;
        margin: 0 8px;
    }

    .tools-hero__art::before,
    .tools-hero__art::after {
        width: 160px;
        height: 190px;
    }

    .tools-library {
        padding: 52px 0 60px;
    }

    .tools-section-heading {
        display: block;
    }

    .tools-section-heading > p {
        margin-top: 11px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .tool-card {
        min-height: 220px;
    }

    .tools-integrity-note {
        align-items: flex-start;
        padding: 16px;
    }

    .tool-detail {
        padding-bottom: 55px;
    }

    .tool-detail__heading {
        margin: 38px auto 25px;
        text-align: left;
    }

    .tool-detail__heading h1 {
        font-size: clamp(2.35rem, 10vw, 3.35rem);
    }

    .tool-detail__heading > p:last-child {
        margin-top: 13px;
        font-size: 0.91rem;
    }

    .tool-workspace {
        padding: 21px 17px;
    }

    .tool-workspace__top {
        margin-bottom: 22px;
        align-items: flex-start;
    }

    .tool-workspace__top .tool-workspace__icon {
        width: 47px;
        height: 47px;
        flex-basis: 47px;
        font-size: 1rem;
    }

    .tool-workspace textarea {
        min-height: 190px;
    }

    .tool-file-drop {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 15px;
    }

    .tool-file-drop input {
        width: 100%;
        margin: 6px 0 0;
    }

    .tool-results > div {
        padding: 14px 5px;
    }

    .tool-results small {
        font-size: 0.55rem;
    }

    .tool-form-grid,
    .tool-detail__guide {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tool-card,
    .tools-button {
        transition: none;
    }
}
