:root {
    --wtb-bg: #fff7f9;
    --wtb-surface: #ffffff;
    --wtb-text: #2f1720;
    --wtb-muted: #7c5b66;
    --wtb-border: #f0d7df;
    --wtb-soft: #fff1f4;
    --wtb-primary: #9F1239;
    --wtb-primary-hover: #881337;
    --wtb-shadow: 0 14px 38px rgba(75, 18, 39, .07);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--wtb-bg);
}

body {
    margin: 0;
    background: var(--wtb-bg);
    color: var(--wtb-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.wtb-shell {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.wtb-header {
    position: relative;
    z-index: 40;
    border-bottom: 1px solid var(--wtb-border);
    background: rgba(255, 255, 255, .96);
}

.wtb-header__inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.wtb-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #3b1020;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.wtb-brand__mark {
    width: 28px;
    height: 28px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    border-radius: 8px;
    background: var(--wtb-primary);
}

.wtb-brand__mark span {
    display: block;
    border-radius: 2px;
    background: #fff;
    opacity: .93;
}

/* language menu */
.language-menu {
    position: relative;
    flex: 0 0 auto;
}

.language-menu__trigger {
    min-height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ead5dc;
    border-radius: 9px;
    background: #fff;
    color: #5f3947;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.language-menu__trigger:hover {
    border-color: #d9aebb;
    background: #fffafb;
}

.language-menu__globe,
.language-menu__chevron,
.language-menu__check {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.language-menu__globe {
    width: 17px;
    height: 17px;
}

.language-menu__chevron {
    width: 14px;
    height: 14px;
}

.language-menu__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 210px;
    padding: 7px;
    display: none;
    border: 1px solid #ead5dc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(75, 18, 39, .12);
}

.language-menu.is-open .language-menu__dropdown {
    display: grid;
}

.language-menu__option {
    min-height: 38px;
    padding: 0 9px;
    display: grid;
    grid-template-columns: 30px 1fr 18px;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    color: #76515e;
    text-decoration: none;
    font-size: 12px;
}

.language-menu__option:hover,
.language-menu__option.is-active {
    background: #fff1f4;
    color: #3b1020;
}

.language-menu__code {
    color: #a0828d;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.language-menu__check {
    width: 16px;
    height: 16px;
}

/* hero */
.wtb-hero {
    padding: 84px 0 80px;
    border-bottom: 1px solid var(--wtb-border);
    background:
        radial-gradient(circle at 50% 0, rgba(159, 18, 57, .08), transparent 46%),
        linear-gradient(180deg, #fff 0%, #fffafb 100%);
}

.wtb-hero__inner {
    text-align: center;
}

.wtb-hero__eyebrow,
.wtb-section-heading > p,
.wtb-content-page__header > p {
    margin: 0 0 9px;
    color: #a17483;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
}

.wtb-hero h1 {
    margin: 0;
    color: #3b1020;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.wtb-hero__lead {
    margin: 22px 0 0;
    color: #4c1c2c;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 750;
}

.wtb-hero__description {
    margin: 14px 0 0;
    color: var(--wtb-muted);
    font-size: 14px;
    line-height: 1.9;
}

/* tools */
.wtb-tools {
    padding: 72px 0 78px;
}

.wtb-section-heading {
    margin-bottom: 30px;
    text-align: center;
}

.wtb-section-heading h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.03em;
}

.wtb-section-heading span {
    display: block;
    margin-top: 8px;
    color: var(--wtb-muted);
    font-size: 13px;
}

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

.wtb-tool-card {
    --card-accent: #7b4559;
    min-height: 390px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wtb-border);
    border-top: 4px solid var(--card-accent);
    border-radius: 15px;
    background: var(--wtb-surface);
    box-shadow: 0 4px 18px rgba(40, 51, 70, .035);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.wtb-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wtb-shadow);
}

.wtb-tool-card--imgtools { --card-accent: #9f1239; }
.wtb-tool-card--devtools { --card-accent: #315a91; }
.wtb-tool-card--utilitytools { --card-accent: #147d73; }
.wtb-tool-card--trace { --card-accent: #7252a3; }

.wtb-tool-card__top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wtb-tool-card__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--card-accent) 9%, white);
    color: var(--card-accent);
}

.wtb-tool-card__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wtb-tool-card--utilitytools .wtb-tool-card__icon svg path {
    fill: currentColor;
    stroke: none;
}

.wtb-tool-card__category {
    margin: 0 0 2px;
    color: #a17483;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.wtb-tool-card h3 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.025em;
}

.wtb-tool-card__copy {
    margin: 20px 0 0;
    color: #4c1c2c;
    font-size: 15px;
    font-weight: 700;
}

.wtb-tool-card ul {
    margin: 18px 0 25px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 15px;
    list-style: none;
}

.wtb-tool-card li {
    position: relative;
    padding-left: 15px;
    color: #7c5b66;
    font-size: 12px;
}

.wtb-tool-card li::before {
    content: "";
    position: absolute;
    top: .78em;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--card-accent);
    transform: translateY(-50%);
}

.wtb-tool-card__button {
    min-height: 44px;
    margin-top: auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid color-mix(in srgb, var(--card-accent) 24%, white);
    border-radius: 9px;
    background: color-mix(in srgb, var(--card-accent) 5%, white);
    color: var(--card-accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.wtb-tool-card__button:hover {
    background: color-mix(in srgb, var(--card-accent) 10%, white);
}

/* benefits */
.wtb-benefits {
    padding: 68px 0 74px;
    border-top: 1px solid var(--wtb-border);
    background: #fffafb;
}

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

.wtb-benefit {
    padding: 30px 24px;
    border: 1px solid var(--wtb-border);
    border-radius: 13px;
    background: #fff;
    text-align: center;
}

.wtb-benefit__icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff1f4;
    color: var(--wtb-primary);
    font-size: 21px;
    font-weight: 800;
}

.wtb-benefit__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wtb-benefit h3 {
    margin: 0;
    font-size: 16px;
}

.wtb-benefit p {
    margin: 8px 0 0;
    color: var(--wtb-muted);
    font-size: 12px;
}

/* footer */
.wtb-footer {
    padding: 27px 0 0;
    border-top: 1px solid var(--wtb-border);
    background: #fffafb;
}

.wtb-footer__links {
    padding: 0 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #76515e;
    font-size: 12px;
    white-space: nowrap;
}

.wtb-footer__links a {
    text-decoration: none;
}

.wtb-footer__links a:hover {
    color: var(--wtb-primary);
    text-decoration: underline;
}

.wtb-footer__links span {
    color: #dcbec7;
}

.wtb-footer__copyright {
    padding: 18px 0 20px;
    border-top: 1px solid var(--wtb-border);
    color: #9a7d87;
    text-align: center;
    font-size: 11px;
}

/* content pages */
.wtb-content-page {
    min-height: 64vh;
    padding: 62px 0 72px;
}

.wtb-content-page__inner {
    max-width: 900px;
}

.wtb-content-page__header {
    margin-bottom: 24px;
    text-align: center;
}

.wtb-content-page__header h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -.035em;
}

.wtb-content-page__header span {
    display: block;
    margin-top: 8px;
    color: var(--wtb-muted);
    font-size: 13px;
}

.wtb-content-card {
    padding: 34px;
    border: 1px solid var(--wtb-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(75, 18, 39, .05);
}

.wtb-content-card h2 {
    margin: 30px 0 9px;
    font-size: 18px;
}

.wtb-content-card h2:first-child {
    margin-top: 0;
}

.wtb-content-card p {
    margin: 0;
    color: #76515e;
    font-size: 13px;
}

.wtb-simple-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wtb-simple-links a {
    padding: 15px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--wtb-border);
    border-radius: 9px;
    text-decoration: none;
}

.wtb-simple-links a:hover {
    border-color: #d9aebb;
    background: #fffafb;
}

.wtb-simple-links strong {
    font-size: 14px;
}

.wtb-simple-links span {
    color: var(--wtb-muted);
    font-size: 11px;
}

.wtb-legal h2:not(:first-child) {
    padding-top: 5px;
    border-top: 1px solid #edf0f4;
}

.wtb-contact-card {
    max-width: 720px;
    margin-inline: auto;
}

.wtb-contact-form {
    display: grid;
    gap: 18px;
}

.wtb-honeypot {
    position: absolute;
    left: -9999px;
}

.wtb-form-field {
    display: grid;
    gap: 7px;
}

.wtb-form-field > span,
.wtb-form-check {
    color: #5f3947;
    font-size: 12px;
    font-weight: 700;
}

.wtb-form-field small {
    color: #a17483;
    font-weight: 500;
}

.wtb-form-field strong {
    color: #a92145;
    font-size: 10px;
}

.wtb-form-field input,
.wtb-form-field select,
.wtb-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7dee7;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    color: #3b1020;
    font-size: 13px;
}

.wtb-form-field input,
.wtb-form-field select {
    min-height: 43px;
}

.wtb-form-field textarea {
    resize: vertical;
}

.wtb-form-field input:focus,
.wtb-form-field select:focus,
.wtb-form-field textarea:focus {
    border-color: var(--wtb-primary);
    box-shadow: 0 0 0 3px rgba(159, 18, 57, .08);
}

.wtb-form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 500;
}

.wtb-form-check input {
    margin-top: 5px;
}

.wtb-form-check a {
    color: var(--wtb-primary);
}

.wtb-primary-button {
    min-height: 46px;
    border: 0;
    border-radius: 9px;
    background: var(--wtb-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

.wtb-primary-button:hover {
    background: var(--wtb-primary-hover);
}

.wtb-form-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 12px;
}

.wtb-form-message--success {
    border: 1px solid #b8dccb;
    background: #eff9f4;
    color: #21654a;
}

.wtb-form-message--error {
    border: 1px solid #e7bdc8;
    background: #fff4f6;
    color: #8e2944;
}

@media (max-width: 780px) {
    .wtb-shell {
        width: min(100% - 28px, 1160px);
    }

    .wtb-header__inner {
        min-height: 66px;
    }

    .wtb-brand {
        font-size: 18px;
    }

    .wtb-brand__mark {
        width: 25px;
        height: 25px;
    }

    .language-menu__current {
        display: none;
    }

    .wtb-hero {
        padding: 62px 0 58px;
    }

    .wtb-tools,
    .wtb-benefits {
        padding: 54px 0;
    }

    .wtb-tool-grid,
    .wtb-benefit-grid,
    .wtb-simple-links {
        grid-template-columns: 1fr;
    }

    .wtb-tool-card {
        min-height: 0;
        padding: 23px;
    }

    .wtb-tool-card ul {
        grid-template-columns: 1fr 1fr;
    }

    .wtb-footer__links {
        gap: 8px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-inline: 5px;
    }

    .wtb-content-page {
        padding: 45px 0 56px;
    }

    .wtb-content-card {
        padding: 23px 20px;
    }
}

@media (max-width: 500px) {
    .wtb-hero__description br {
        display: none;
    }

    .wtb-tool-card ul {
        grid-template-columns: 1fr;
    }

    .wtb-footer__links {
        font-size: 11px;
    }
}


/* v0.1.1 - align Web ToolBox with the existing MMR tool family */
.wtb-tools {
    background: var(--wtb-bg);
}

.wtb-section-heading h2,
.wtb-content-page__header h1,
.wtb-content-card h2,
.wtb-simple-links strong,
.wtb-benefit h3 {
    color: #3b1020;
}

.wtb-tool-card {
    border-color: #ead5dc;
}

.wtb-tool-card:hover {
    border-color: #dfbcc7;
}

.wtb-tool-card__button {
    border-radius: 9px;
}

.wtb-header {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(10px);
}

.wtb-brand__mark {
    box-shadow: 0 5px 14px rgba(159, 18, 57, .15);
}


/* v0.1.2 - service cards are the links */
.wtb-tool-card {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.wtb-tool-card:focus-visible {
    outline: 3px solid rgba(159, 18, 57, .22);
    outline-offset: 3px;
}

.wtb-tool-card__button {
    pointer-events: none;
}

.wtb-tool-card:hover .wtb-tool-card__button,
.wtb-tool-card:focus-visible .wtb-tool-card__button {
    background: color-mix(in srgb, var(--card-accent) 10%, white);
}

.wtb-tool-card:hover .wtb-tool-card__button span,
.wtb-tool-card:focus-visible .wtb-tool-card__button span {
    transform: translateX(3px);
}

.wtb-tool-card__button span {
    transition: transform .18s ease;
}

/* v0.1.3 */
.wtb-tool-card {
    min-height: 330px;
}
.wtb-tool-card ul {
    margin-bottom: 0;
}


/* v0.1.5 - list all global menu items */
.wtb-tool-card--imgtools ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .wtb-tool-card--imgtools ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .wtb-tool-card--imgtools ul {
        grid-template-columns: 1fr;
    }
}


/* v0.1.6 - use the shared favicon as the Web ToolBox brand mark */
.wtb-brand__mark {
    display: none;
}

.wtb-brand__favicon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: block;
    object-fit: contain;
}

@media (max-width: 780px) {
    .wtb-brand__favicon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
}
