.hostillaToolsPage .hostillaDictionaryMain {
    max-width: 1240px;
}

.hostillaToolsApp {
    color: #142231;
}

.hostillaToolsApp *,
.hostillaToolsApp *::before,
.hostillaToolsApp *::after {
    box-sizing: border-box;
}

.hostillaToolsHero {
    min-height: 0;
    padding-bottom: 30px;
}

.hostillaToolsHero h1 {
    max-width: 760px;
}

.hostillaToolsChooser {
    margin: 34px 0 22px;
}

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

.hostillaToolTile {
    appearance: none;
    display: flex;
    min-width: 0;
    min-height: 132px;
    padding: 18px 14px;
    border: 1px solid #dce8d7;
    border-radius: 8px;
    background: #fff;
    color: #172432;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5px;
    box-shadow: 0 5px 18px rgba(24, 48, 29, .06);
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.hostillaToolTile:hover,
.hostillaToolTile:focus-visible {
    border-color: #d7b74d;
    background: #fffdf4;
    color: #172432;
    box-shadow: 0 8px 22px rgba(63, 82, 35, .11);
    outline: 2px solid rgba(215, 183, 77, .3);
    outline-offset: 2px;
    transform: translateY(-1px);
}

.hostillaToolTile.is-active {
    border-color: #58a92d;
    background: #f5fbf1;
    box-shadow: inset 0 0 0 1px rgba(88, 169, 45, .2), 0 8px 22px rgba(48, 100, 28, .1);
}

.hostillaToolIcon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #edf7e7;
    color: #3d8c1f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.hostillaToolTile strong {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.25;
}

.hostillaToolTile small {
    color: #647080;
    font-size: 12px;
    line-height: 1.4;
}

.hostillaToolsWorkspace {
    min-height: 360px;
}

.hostillaToolPanel {
    padding: 30px;
    border: 1px solid #dce8d7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(26, 48, 32, .07);
}

.hostillaToolPanel[hidden],
.hostillaCsrPane[hidden],
.hostillaCsrOutputs[hidden] {
    display: none !important;
}

.hostillaToolPanelHead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 8px;
}

.hostillaToolPanelHead h2 {
    margin: 0;
    color: #152331;
    font-size: 25px;
    line-height: 1.2;
}

.hostillaToolPanelHead > a {
    flex: 0 0 auto;
    color: #3e8e22;
    font-weight: 700;
    text-decoration: none;
}

.hostillaToolPanelHead > a:hover,
.hostillaToolPanelHead > a:focus-visible {
    color: #6f5a0d;
    text-decoration: underline;
}

.hostillaToolKicker {
    margin: 0 0 6px !important;
    color: #4f992d !important;
    font-size: 12px !important;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hostillaToolPanel > p {
    max-width: 880px;
    margin: 10px 0 24px;
    color: #596675;
    line-height: 1.65;
}

.hostillaToolForm {
    max-width: 920px;
    margin: 18px 0 0;
}

.hostillaToolForm > label,
.hostillaCsrPane > label,
.hostillaCsrGrid label,
.hostillaCsrOutputs label {
    display: block;
    margin-bottom: 7px;
    color: #263442;
    font-size: 13px;
    font-weight: 700;
}

.hostillaToolInputRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: stretch;
}

.hostillaToolInputRowSelect {
    grid-template-columns: minmax(0, 1fr) minmax(145px, 190px) auto;
}

.hostillaToolsApp input[type="text"],
.hostillaToolsApp input[type="url"],
.hostillaToolsApp input[type="email"],
.hostillaToolsApp select,
.hostillaToolsApp textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #ccd7c8;
    border-radius: 6px;
    background: #fff;
    color: #152331;
    font: inherit;
}

.hostillaToolsApp input[type="text"],
.hostillaToolsApp input[type="url"],
.hostillaToolsApp input[type="email"],
.hostillaToolsApp select {
    min-height: 46px;
    padding: 10px 13px;
}

.hostillaToolsApp textarea {
    min-height: 150px;
    padding: 12px;
    resize: vertical;
}

.hostillaToolsApp input:focus,
.hostillaToolsApp select:focus,
.hostillaToolsApp textarea:focus {
    border-color: #75ae50;
    box-shadow: 0 0 0 3px rgba(104, 166, 67, .14);
    outline: 0;
}

.hostillaToolInputRow button,
.hostillaToolFormCompact > button,
.hostillaCsrTabs button,
.hostillaCsrOutputs button {
    appearance: none;
    min-height: 46px;
    padding: 10px 20px;
    border: 1px solid #459420;
    border-radius: 6px;
    background: #4fa925;
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.hostillaToolInputRow button:hover,
.hostillaToolInputRow button:focus-visible,
.hostillaToolFormCompact > button:hover,
.hostillaToolFormCompact > button:focus-visible,
.hostillaCsrOutputs button:hover,
.hostillaCsrOutputs button:focus-visible {
    border-color: #367d18;
    background: #3f8d1e;
    outline: 2px solid rgba(215, 183, 77, .42);
    outline-offset: 2px;
}

.hostillaToolSecondaryButton {
    border-color: #8eae7c !important;
    background: #fff !important;
    color: #357b1b !important;
}

.hostillaToolSecondaryButton:hover,
.hostillaToolSecondaryButton:focus-visible {
    border-color: #d7b74d !important;
    background: #fffdf4 !important;
}

.hostillaToolFormCompact {
    display: flex;
    width: fit-content;
}

.hostillaToolResult {
    max-width: 100%;
    margin-top: 22px;
    overflow-wrap: anywhere;
}

.hostillaToolResult:empty {
    margin-top: 0;
}

.hostillaToolResultAction {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #459420;
    border-radius: 6px;
    align-items: center;
    background: #4fa925;
    color: #fff;
    font-weight: 750;
    text-decoration: none;
}

.hostillaToolResultAction:hover,
.hostillaToolResultAction:focus-visible {
    border-color: #d7b74d;
    background: #3f8d1e;
    color: #fff;
    outline: 2px solid rgba(215, 183, 77, .32);
    outline-offset: 2px;
}

.hostillaToolsLoading,
.hostillaToolsNotice,
.hostillaToolsMessage {
    padding: 15px 17px;
    border: 1px solid #dbe7d6;
    border-radius: 6px;
    background: #f7fbf5;
    color: #31422f;
    line-height: 1.55;
}

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

.hostillaToolsLoading::before {
    width: 18px;
    height: 18px;
    border: 2px solid #c9dec0;
    border-top-color: #4fa925;
    border-radius: 50%;
    content: "";
    animation: hostillaToolsSpin .75s linear infinite;
}

@keyframes hostillaToolsSpin {
    to { transform: rotate(360deg); }
}

.hostillaToolsError,
.hostillaToolsMessage.is-bad {
    border-color: #efc4c0;
    background: #fff6f5;
    color: #8d2922;
}

.hostillaToolsMessage.is-warn {
    border-color: #ead795;
    background: #fffbed;
    color: #725d11;
}

.hostillaToolsMessage.is-good {
    border-color: #bcdcae;
    background: #f4fbf1;
    color: #2d6f19;
}

.hostillaToolsResultTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.hostillaToolsResultTable th,
.hostillaToolsResultTable td {
    padding: 11px 12px;
    border-bottom: 1px solid #e4ebe1;
    color: #273442;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.hostillaToolsResultTable th {
    background: #f4f8f2;
    color: #315428;
    font-size: 12px;
}

.hostillaToolsRecordGroup {
    margin-top: 16px;
    border: 1px solid #dce7d8;
    border-radius: 6px;
    overflow: hidden;
}

.hostillaToolsRecordGroup h3 {
    margin: 0;
    padding: 11px 13px;
    background: #f4f8f2;
    color: #294422;
    font-size: 15px;
}

.hostillaToolsStatus {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    align-items: center;
    background: #edf1eb;
    color: #4b5848;
    font-size: 12px;
    font-weight: 750;
}

.hostillaToolsStatus.is-good { background: #e8f6e0; color: #2b7416; }
.hostillaToolsStatus.is-warn { background: #fff3c9; color: #745d0b; }
.hostillaToolsStatus.is-bad { background: #fde5e2; color: #982d24; }

.hostillaPasswordOptions {
    display: flex;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #dde8d8;
    border-radius: 6px;
    background: #f8fbf6;
    flex-wrap: wrap;
    gap: 14px 22px;
}

.hostillaPasswordOptions label {
    display: inline-flex;
    min-height: 28px;
    margin: 0;
    align-items: center;
    gap: 7px;
    color: #31402f;
    font-size: 13px;
}

.hostillaPasswordOptions label:first-child {
    width: 100%;
    max-width: 470px;
    flex-direction: column;
    align-items: stretch;
}

.hostillaCsrTabs {
    display: flex;
    margin: 20px 0;
    gap: 8px;
}

.hostillaCsrTabs button {
    min-height: 40px;
    border-color: #d3ded0;
    background: #fff;
    color: #42513e;
}

.hostillaCsrTabs button.is-active {
    border-color: #4fa925;
    background: #edf8e8;
    color: #33791a;
}

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

.hostillaCsrGrid label,
.hostillaCsrOutputs label {
    margin: 0;
}

.hostillaCsrGrid input,
.hostillaCsrOutputs textarea {
    margin-top: 7px;
}

.hostillaCsrOutputs {
    display: grid;
    margin-top: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hostillaCsrOutputs button {
    min-height: 38px;
    margin-top: 8px;
    padding: 7px 13px;
}

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

.hostillaCodeLinks a {
    display: grid;
    min-height: 115px;
    padding: 20px;
    border: 1px solid #dce7d8;
    border-radius: 7px;
    color: #1b2a37;
    text-decoration: none;
    gap: 5px;
}

.hostillaCodeLinks a:hover,
.hostillaCodeLinks a:focus-visible {
    border-color: #d7b74d;
    background: #fffdf4;
    outline: 2px solid rgba(215, 183, 77, .28);
}

.hostillaCodeLinks span { color: #4d972b; font-size: 12px; font-weight: 800; }
.hostillaCodeLinks small { color: #677483; }

.hostillaToolsSupportCta {
    margin-top: 32px;
}

.hostillaToolsContextLinks {
    display: flex;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 9px;
}

.hostillaToolsContextLinks a {
    padding: 8px 12px;
    border: 1px solid #d7e4d2;
    border-radius: 6px;
    background: #fff;
    color: #397f20;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.hostillaToolsContextLinks a:hover,
.hostillaToolsContextLinks a:focus-visible {
    border-color: #d7b74d;
    background: #fffdf4;
    color: #6f5a0d;
    outline: 2px solid rgba(215, 183, 77, .24);
    outline-offset: 2px;
}

/* Existing PageSpeed and mail result fragments embedded in the hub. */
.hostillaToolResult .psiResultWrap,
.hostillaToolResult .mailCheckResultWrap {
    max-width: 100%;
    margin: 0;
}

.hostillaToolResult .psiResultGrid,
.hostillaToolResult .mailCheckSummaryGrid,
.hostillaToolResult .mailBlacklistGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hostillaToolResult .psiDeviceCard,
.hostillaToolResult .mailCheckSection,
.hostillaToolResult .mailTransferBox,
.hostillaToolResult .mailSummaryCard,
.hostillaToolResult .mailBlacklistItem {
    min-width: 0;
    overflow-wrap: anywhere;
}

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

@media (max-width: 720px) {
    .hostillaToolsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hostillaToolTile { min-height: 120px; padding: 15px 12px; }
    .hostillaToolPanel { padding: 22px 16px; }
    .hostillaToolPanelHead { flex-direction: column; gap: 8px; }
    .hostillaToolPanelHead h2 { font-size: 21px; }
    .hostillaToolInputRow,
    .hostillaToolInputRowSelect { grid-template-columns: minmax(0, 1fr); }
    .hostillaToolInputRow button { width: 100%; }
    .hostillaCsrGrid,
    .hostillaCsrOutputs,
    .hostillaCodeLinks,
    .hostillaToolResult .psiResultGrid,
    .hostillaToolResult .mailCheckSummaryGrid,
    .hostillaToolResult .mailBlacklistGrid { grid-template-columns: minmax(0, 1fr); }
    .hostillaToolsResultTable { table-layout: auto; }
    .hostillaToolsResultTable thead { display: none; }
    .hostillaToolsResultTable tr { display: block; padding: 8px 0; border-bottom: 1px solid #dfe7dc; }
    .hostillaToolsResultTable td { display: block; padding: 5px 10px; border: 0; }
}

@media (max-width: 390px) {
    .hostillaToolsGrid { grid-template-columns: minmax(0, 1fr); }
    .hostillaToolTile { min-height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    .hostillaToolTile { transition: none; }
    .hostillaToolsLoading::before { animation-duration: 1.8s; }
}
