/* =====================================================================
   在线工具箱 · 前台样式（2026-11-09）
   ---------------------------------------------------------------------
   设计基调与网址导航一致：白卡片 + 淡蓝底 + 蓝色主色，圆角 12px。
   栅格：PC 4 列 / 平板 3 列 / 手机 2 列；推荐区大卡 PC 4 列、手机 2 列。
   ===================================================================== */

:root {
    --tl-blue: #2563eb;
    --tl-blue-d: #1d4ed8;
    --tl-blue-l: #eef4ff;
    --tl-ink: #1f2937;
    --tl-sub: #5b667a;
    --tl-mute: #8b95a5;
    --tl-line: #e6ebf3;
    --tl-soft: #f6f8fc;
    --tl-card: #ffffff;
    --tl-bg: #f4f7fc;
    --tl-radius: 12px;
    --tl-shadow: 0 2px 10px rgba(31, 61, 120, .05);
    --tl-shadow-h: 0 10px 26px rgba(31, 61, 120, .10);
}

* { box-sizing: border-box; }

.tl-body {
    margin: 0;
    background: var(--tl-bg);
    color: var(--tl-ink);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.tl-body a { color: inherit; text-decoration: none; }
.tl-body img { vertical-align: middle; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.tl-skip {
    position: absolute; left: -9999px; top: 0; z-index: 99;
    background: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.tl-skip:focus { left: 0; }

/* ---------------- 顶栏 ---------------- */
.tl-topbar { background: #fff; border-bottom: 1px solid var(--tl-line); font-size: 13px; color: var(--tl-sub); }
.tl-topbar-in { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 12px; }
.tl-top-left, .tl-top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-top-left span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-top-date { color: var(--tl-mute); }
.tl-top-dot { color: #cfd8e6; }
.tl-top-link:hover { color: var(--tl-blue); }
.tl-top-user { color: var(--tl-blue); font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 公告 */
.tl-notice { background: #fff8e8; border-bottom: 1px solid #f6e3b8; color: #8a5a10; font-size: 13px; }
.tl-notice .wrap { padding-top: 7px; padding-bottom: 7px; }
.tl-notice a { color: #8a5a10; text-decoration: underline; }

/* ---------------- 头部 ---------------- */
.tl-header { background: #fff; border-bottom: 1px solid var(--tl-line); }
.tl-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.tl-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: .3px; }
/* logo.svg 是 500×240 的横版图，按高度缩放、宽度自适应，避免被拉成正方形 */
.tl-brand img { height: 56px; width: auto; max-width: 200px; }
.tl-brand:hover { color: var(--tl-blue); }
.tl-nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--tl-sub); }
.tl-nav-links a:hover { color: var(--tl-blue); }

/* ---------------- Hero / 搜索 ---------------- */
.tl-hero { padding: 38px 0 26px; text-align: center; }
.tl-h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.tl-sub { margin: 10px 0 22px; color: var(--tl-sub); font-size: 14px; }

.tl-search {
    position: relative;
    display: flex; align-items: center;
    max-width: 620px; margin: 0 auto;
    background: #fff; border: 1px solid var(--tl-line);
    border-radius: 999px; box-shadow: var(--tl-shadow);
    transition: border-color .2s, box-shadow .2s;
}
.tl-search:focus-within { border-color: #bed3ff; box-shadow: 0 8px 24px rgba(37, 99, 235, .10); }
.tl-search input {
    flex: 1; min-width: 0; height: 50px; padding: 0 8px 0 46px;
    border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--tl-ink);
    border-radius: 999px;
}
.tl-search input::-webkit-search-cancel-button { display: none; }
.tl-search-ico {
    position: absolute; left: 18px; width: 16px; height: 16px;
    border: 2px solid #9aa8bd; border-radius: 50%;
}
.tl-search-ico::after {
    content: ""; position: absolute; right: -5px; bottom: -4px;
    width: 7px; height: 2px; background: #9aa8bd; transform: rotate(45deg); border-radius: 2px;
}
.tl-search-clear {
    display: none; width: 34px; height: 34px; margin-right: 8px;
    border: 0; border-radius: 50%; background: var(--tl-soft);
    color: var(--tl-mute); font-size: 18px; line-height: 1; cursor: pointer;
}
.tl-search-clear:hover { background: #e8eef8; color: var(--tl-ink); }
.tl-search.has-val .tl-search-clear { display: block; }

/* 最近使用 */
.tl-recent { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--tl-mute); }
.tl-recent[hidden] { display: none; }
.tl-recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-recent-list a {
    padding: 4px 12px; background: #fff; border: 1px solid var(--tl-line);
    border-radius: 999px; color: var(--tl-sub);
}
.tl-recent-list a:hover { border-color: #bed3ff; color: var(--tl-blue); }

/* ---------------- 区块 ---------------- */
.tl-sec { padding-top: 8px; padding-bottom: 18px; }
.tl-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 14px; }
.tl-sec-hd h2 { margin: 0; font-size: 17px; font-weight: 700; }
.tl-sec-hd h2::before {
    content: ""; display: inline-block; width: 4px; height: 15px; margin-right: 9px;
    background: var(--tl-blue); border-radius: 3px; vertical-align: -2px;
}
.tl-sec-note { color: var(--tl-mute); font-size: 12px; }

/* ---------------- 推荐大卡 ---------------- */
.tl-featured { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tl-fcard {
    position: relative; display: flex; align-items: center; gap: 14px;
    padding: 18px 18px 18px 16px; background: var(--tl-card);
    border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
    box-shadow: var(--tl-shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tl-fcard:hover { transform: translateY(-2px); box-shadow: var(--tl-shadow-h); border-color: #cfe0ff; }
.tl-fcard.is-primary { border-color: #bcd6ff; background: linear-gradient(180deg, #f7fbff, #fff 60%); }
.tl-fcard-bd { min-width: 0; flex: 1; }
.tl-fcard-bd strong { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.tl-fcard-bd p { margin: 4px 0 0; color: var(--tl-sub); font-size: 12px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-fcard-go { color: #c3cfe2; font-size: 16px; transition: color .2s, transform .2s; }
.tl-fcard:hover .tl-fcard-go { color: var(--tl-blue); transform: translateX(3px); }

/* ---------------- 工具网格 ---------------- */
.tl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tl-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 15px 16px; background: var(--tl-card);
    border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tl-card:hover { transform: translateY(-2px); box-shadow: var(--tl-shadow-h); border-color: #cfe0ff; }
.tl-card-bd { min-width: 0; }
.tl-card-bd strong { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.tl-card-bd p {
    margin: 3px 0 0; color: var(--tl-mute); font-size: 12px; line-height: 1.5;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* 图标 */
.tl-ico {
    flex: 0 0 auto; display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 11px;
    color: #fff; font-size: 15px; font-weight: 700; font-style: normal;
    letter-spacing: -.3px; box-shadow: 0 4px 10px rgba(37, 99, 235, .16);
}
.tl-fcard .tl-ico { width: 46px; height: 46px; font-size: 16px; }

/* 角标 */
.tl-badge {
    display: inline-block; padding: 0 6px; border-radius: 4px;
    background: var(--tl-blue-l); color: var(--tl-blue-d);
    font-size: 11px; font-style: normal; font-weight: 600; line-height: 17px;
}
.tl-badge.is-hot { background: #fff1e6; color: #c2410c; }

/* 空态 */
.tl-empty, .tl-noresult {
    padding: 46px 20px; text-align: center; color: var(--tl-mute);
    background: #fff; border: 1px dashed var(--tl-line); border-radius: var(--tl-radius);
}
.tl-noresult { margin: 10px 0 30px; }

/* ---------------- 页脚 ---------------- */
.tl-footer { margin-top: 26px; padding: 26px 0 34px; background: #fff; border-top: 1px solid var(--tl-line); text-align: center; color: var(--tl-mute); font-size: 13px; }
.tl-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin: 0 0 10px; }
.tl-footer-links a:hover { color: var(--tl-blue); }
.tl-footer-copy { margin: 0; }
.tl-footer-beian { margin: 6px 0 0; }
.tl-footer-beian a { color: var(--tl-mute); }
.tl-footer-note { margin: 10px 0 0; font-size: 12px; color: #a6b0c0; }

/* ---------------- 弹层 ---------------- */
.tl-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tl-modal[hidden] { display: none; }
.tl-modal-mask { position: absolute; inset: 0; background: rgba(17, 28, 48, .45); backdrop-filter: blur(2px); }
.tl-modal-box {
    position: relative; width: 100%; max-width: 640px; max-height: 86vh;
    display: flex; flex-direction: column;
    background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 30, 60, .25);
    animation: tl-pop .18s ease-out;
}
@keyframes tl-pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.tl-modal-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--tl-line); }
.tl-modal-hd h3 { margin: 0; font-size: 16px; font-weight: 700; }
.tl-modal-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--tl-soft); color: var(--tl-sub); font-size: 20px; line-height: 1; cursor: pointer; }
.tl-modal-x:hover { background: #e8eef8; color: var(--tl-ink); }
.tl-modal-bd { padding: 18px 20px 22px; overflow: auto; }

/* 弹层内部元素 */
.tl-field { margin-bottom: 14px; }
.tl-field label { display: block; margin-bottom: 6px; color: var(--tl-sub); font-size: 13px; }
.tl-input, .tl-textarea, .tl-select {
    width: 100%; padding: 10px 12px; font-size: 14px; color: var(--tl-ink);
    background: #fff; border: 1px solid var(--tl-line); border-radius: 9px; outline: 0;
    font-family: inherit;
}
.tl-textarea { min-height: 130px; resize: vertical; font-family: ui-monospace, Consolas, Monaco, "Courier New", monospace; font-size: 13px; line-height: 1.6; }
.tl-input:focus, .tl-textarea:focus, .tl-select:focus { border-color: #b9d1ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.tl-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tl-row > .tl-input { flex: 1 1 220px; width: auto; }
.tl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: 1px solid transparent; border-radius: 9px;
    background: var(--tl-blue); color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background .18s;
}
.tl-btn:hover { background: var(--tl-blue-d); }
.tl-btn.is-ghost { background: #fff; border-color: var(--tl-line); color: var(--tl-sub); font-weight: 500; }
.tl-btn.is-ghost:hover { background: var(--tl-soft); color: var(--tl-ink); }
.tl-btn[disabled] { opacity: .6; cursor: not-allowed; }
.tl-tip { margin: 10px 0 0; color: var(--tl-mute); font-size: 12px; line-height: 1.7; }
.tl-err { margin: 10px 0 0; padding: 9px 12px; border-radius: 8px; background: #fff1f0; color: #b42318; font-size: 13px; }
.tl-err[hidden] { display: none; }

/* DNS 结果 */
.tl-dns-out { margin-top: 16px; }
.tl-dns-group { margin-bottom: 14px; }
.tl-dns-group h4 { margin: 0 0 7px; font-size: 13px; color: var(--tl-sub); font-weight: 600; }
.tl-dns-group h4 span { margin-left: 6px; color: var(--tl-mute); font-weight: 400; }
.tl-dns-list { border: 1px solid var(--tl-line); border-radius: 9px; overflow: hidden; }
.tl-dns-item { display: flex; gap: 10px; padding: 9px 12px; font-size: 13px; }
.tl-dns-item + .tl-dns-item { border-top: 1px solid var(--tl-line); }
.tl-dns-item code { flex: 1; min-width: 0; word-break: break-all; font-family: ui-monospace, Consolas, Monaco, monospace; color: var(--tl-ink); }
.tl-dns-item em { flex: 0 0 auto; color: var(--tl-mute); font-style: normal; font-size: 12px; }

/* 工具面板通用 */
.tl-panel-hint { margin: 0 0 14px; color: var(--tl-sub); font-size: 13px; line-height: 1.7; }
.tl-out {
    margin-top: 12px; padding: 12px; background: var(--tl-soft); border-radius: 9px;
    font-family: ui-monospace, Consolas, Monaco, monospace; font-size: 13px;
    word-break: break-all; min-height: 44px; white-space: pre-wrap;
}
.tl-out:empty { display: none; }
.tl-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--tl-sub); }
.tl-checks label { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.tl-range { display: flex; align-items: center; gap: 12px; }
.tl-range input[type="range"] { flex: 1; accent-color: var(--tl-blue); }
.tl-range b { min-width: 26px; text-align: right; font-size: 15px; color: var(--tl-blue); }

/* 二维码 */
.tl-qr-wrap { margin-top: 16px; text-align: center; }
.tl-qr-wrap[hidden] { display: none; }
.tl-qr-wrap canvas {
    display: block; margin: 0 auto; max-width: 100%; height: auto;
    background: #fff; border: 1px solid var(--tl-line); border-radius: 10px;
    image-rendering: pixelated;
}
.tl-qr-info { margin: 10px 0 0; color: var(--tl-mute); font-size: 12px; }

/* 键值结果表 */
.tl-kv { margin-top: 14px; border: 1px solid var(--tl-line); border-radius: 10px; overflow: hidden; }
.tl-kv-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; }
.tl-kv-row + .tl-kv-row { border-top: 1px solid var(--tl-line); }
.tl-kv-row > span { flex: 0 0 132px; color: var(--tl-sub); }
.tl-kv-row > b { flex: 1; min-width: 0; font-weight: 600; color: var(--tl-ink); word-break: break-all; }
.tl-kv-4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 0; gap: 8px; margin-top: 12px; }
.tl-kv-4 .tl-kv-row { flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--tl-line); border-radius: 9px; padding: 8px 10px; }
.tl-kv-4 .tl-kv-row > span { flex: none; font-size: 12px; }
.tl-mono { font-family: ui-monospace, Consolas, Monaco, "Courier New", monospace; }
.tl-break { word-break: break-all; }
.tl-copy-mini {
    flex: 0 0 auto; border: 1px solid var(--tl-line); background: #fff; color: var(--tl-sub);
    border-radius: 6px; padding: 2px 8px; font-size: 12px; line-height: 1.7; cursor: pointer;
}
.tl-copy-mini:hover { color: var(--tl-blue); border-color: #b9d1ff; }

/* 颜色转换 */
.tl-color-pick { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--tl-line); border-radius: 9px; background: #fff; cursor: pointer; }
.tl-color-preview {
    margin-top: 14px; height: 74px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; letter-spacing: 1px; font-family: ui-monospace, Consolas, monospace;
}

/* 密码强度 */
.tl-meter { height: 10px; border-radius: 6px; background: #eef2f8; overflow: hidden; margin: 4px 0 10px; }
.tl-meter-bar { height: 100%; width: 0; border-radius: 6px; transition: width .25s, background .25s; }
.tl-ps-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--tl-sub); }
.tl-ps-head b { font-size: 16px; }
.tl-tips { margin: 10px 0 0; padding-left: 18px; color: var(--tl-sub); font-size: 13px; line-height: 1.9; }
.tl-check-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--tl-sub); white-space: nowrap; cursor: pointer; }
.tl-chip { padding: 6px 12px; font-size: 12px; font-weight: 400; }

/* 公共 DNS */
.tl-dns-table { border: 1px solid var(--tl-line); border-radius: 10px; overflow: hidden; }
.tl-dns-table th { background: var(--tl-soft); text-align: left; padding: 9px 12px; font-size: 12px; color: var(--tl-sub); font-weight: 600; }
.tl-dns-table td { padding: 9px 12px; font-size: 13px; border-top: 1px solid var(--tl-line); vertical-align: top; }
.tl-dns-line { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 2px 0; }
.tl-dns-line code { flex: 0 1 auto; min-width: 0; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .tl-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .wrap { padding: 0 14px; }
    .tl-topbar-in { font-size: 12px; }
    .tl-top-left .tl-top-dot, .tl-top-left span:last-child { display: none; }
    .tl-header-in { padding-top: 11px; padding-bottom: 11px; justify-content: center; }
    .tl-brand img { height: 56px; width: auto; }
    .tl-nav-links { display: none; }
    .tl-kv-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl-kv-row > span { flex-basis: 104px; }
    .tl-kv-4 .tl-kv-row > span { flex-basis: auto; }
    .tl-hero { padding: 26px 0 18px; }
    .tl-h1 { font-size: 23px; }
    .tl-sub { margin: 8px 0 16px; font-size: 13px; }
    .tl-search input { height: 46px; font-size: 14px; }
    .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tl-card { padding: 12px; gap: 10px; }
    .tl-card .tl-ico { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
    .tl-card-bd strong { font-size: 13px; }
    /* 卡片标题本来就窄，移动端不再挤「自研」角标，避免标题折成两行 */
    .tl-card .tl-badge { display: none; }
    .tl-card-bd p { font-size: 11.5px; -webkit-line-clamp: 2; }
    .tl-fcard { padding: 13px 12px; gap: 9px; }
    .tl-fcard .tl-ico { width: 34px; height: 34px; border-radius: 9px; font-size: 13px; }
    .tl-fcard-bd strong { font-size: 13.5px; gap: 4px; }
    .tl-fcard-bd p { font-size: 11px; -webkit-line-clamp: 2; }
    .tl-fcard-go { display: none; }
    .tl-badge { font-size: 10px; padding: 0 4px; line-height: 15px; }
    .tl-footer { padding: 20px 0 26px; font-size: 12px; }
    .tl-footer-links { gap: 12px; }
    .tl-modal { padding: 12px; align-items: flex-end; }
    .tl-modal-box { max-height: 90vh; border-radius: 14px 14px 0 0; }
}
@media (max-width: 380px) {
    .tl-grid { grid-template-columns: minmax(0, 1fr); }
    .tl-featured { grid-template-columns: minmax(0, 1fr); }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   第二批 34 个内置工具（2026-11-13）
   沿用上面的 CSS 变量与 .tl-* 组件，不引入外部字体 / 图标。
   ===================================================================== */
.tlx-grid2, .tlx-grid3 { display: grid; gap: 0 14px; }
.tlx-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tlx-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tlx-grid2 > .tl-field, .tlx-grid3 > .tl-field { min-width: 0; }
.tlx-h4 { margin: 18px 0 10px; font-size: 14px; color: var(--tl-ink); }
.tlx-big {
    margin: 6px 0 12px; font-size: 30px; font-weight: 700; color: var(--tl-blue);
    font-family: ui-monospace, Consolas, Monaco, monospace; word-break: break-all;
}
.tlx-big span { font-size: 15px; font-weight: 500; color: var(--tl-sub); font-family: inherit; }
.tlx-big-cn { font-family: inherit; font-size: 24px; color: var(--tl-ink); }

.tlx-table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--tl-line); border-radius: 9px; }
.tlx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tlx-table th, .tlx-table td {
    padding: 8px 10px; text-align: left; vertical-align: top;
    border-bottom: 1px solid var(--tl-line); word-break: break-word;
}
.tlx-table th { position: sticky; top: 0; z-index: 1; background: var(--tl-soft); color: var(--tl-sub); font-weight: 600; }
.tlx-table tr:last-child td { border-bottom: 0; }

.tlx-diff { border: 1px solid var(--tl-line); border-radius: 9px; overflow: hidden; font-size: 12.5px; font-family: ui-monospace, Consolas, Monaco, monospace; }
.tlx-diff-row { display: flex; gap: 8px; padding: 4px 10px; white-space: pre-wrap; word-break: break-all; }
.tlx-diff-row.is-add { background: #eafaf0; color: #116b3a; }
.tlx-diff-row.is-del { background: #fff0ef; color: #b42318; }
.tlx-diff-row.is-same { color: var(--tl-sub); }
.tlx-diff-sign { flex: 0 0 14px; font-weight: 700; }
.tlx-diff-no { flex: 0 0 34px; color: var(--tl-mute); text-align: right; }
.tlx-diff-text { flex: 1; min-width: 0; }

.tlx-md { min-height: 220px; max-height: 420px; overflow: auto; padding: 12px 16px; background: #fff; border: 1px solid var(--tl-line); border-radius: 9px; line-height: 1.8; }
.tlx-md h1, .tlx-md h2, .tlx-md h3, .tlx-md h4 { margin: 14px 0 8px; line-height: 1.4; }
.tlx-md h1 { font-size: 21px; } .tlx-md h2 { font-size: 18px; } .tlx-md h3 { font-size: 16px; }
.tlx-md p { margin: 8px 0; }
.tlx-md ul, .tlx-md ol { margin: 8px 0; padding-left: 22px; }
.tlx-md blockquote { margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--tl-blue); background: var(--tl-soft); color: var(--tl-sub); }
.tlx-md pre { margin: 10px 0; padding: 10px; background: #f4f6fa; border-radius: 8px; overflow: auto; }
.tlx-md code { padding: 1px 4px; background: var(--tl-soft); border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.tlx-md pre code { padding: 0; background: none; }
.tlx-md a { color: var(--tl-blue); }
.tlx-md hr { border: 0; border-top: 1px solid var(--tl-line); margin: 14px 0; }
.tlx-md .tlx-table { margin: 10px 0; }
.tlx-md .tlx-table th, .tlx-md .tlx-table td { border: 1px solid var(--tl-line); }

.tlx-preview { margin-top: 12px; padding: 10px; text-align: center; background: var(--tl-soft); border: 1px dashed var(--tl-line); border-radius: 9px; }
.tlx-preview[hidden] { display: none; }
.tlx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tlx-tile { text-align: center; min-width: 0; }
.tlx-tile img { display: block; width: 100%; background: #fff; border: 1px solid var(--tl-line); border-radius: 6px; }
.tlx-tile .tl-chip { margin-top: 6px; }
.tlx-clock-now { margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--tl-blue); }
.tlx-laps { margin-top: 10px; }
.tlx-lap-list { margin: 0; padding-left: 24px; color: var(--tl-sub); font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

@media (max-width: 640px) {
    .tlx-grid2, .tlx-grid3 { grid-template-columns: minmax(0, 1fr); }
    .tlx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tlx-big { font-size: 24px; }
    .tlx-big-cn { font-size: 20px; }
    .tlx-md { max-height: 320px; }
}

/* 2026-11-16 审计 P2：iOS 聚焦 <16px 输入框会放大整页，移动端统一 16px */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* =====================================================================
   手机版模板（v1.4.0）
   ---------------------------------------------------------------------
   电脑版 / 手机版共用同一套工具数据与面板，只换外壳：
   PC 四列网格 + 顶栏导航；手机 两列卡片 + 分类快捷条 + 底部 Tab。
   ===================================================================== */

/* 分类快捷条：只在手机版出现 */
.tl-chips { display: none; }

body.m .tl-hero { padding: 20px 0 10px; text-align: left; }
body.m .tl-h1 { font-size: 22px; letter-spacing: .2px; }
body.m .tl-sub { margin: 6px 0 14px; font-size: 12.5px; }
body.m .tl-search { max-width: none; margin: 0; }
body.m .tl-search input { height: 46px; font-size: 14px; padding-left: 44px; }
body.m .tl-search-ico { left: 16px; }
body.m .tl-recent { justify-content: flex-start; margin-top: 12px; gap: 8px; font-size: 12px; }
body.m .tl-recent-list { gap: 6px; }

body.m .tl-chips {
    display: flex; gap: 8px; overflow-x: auto;
    margin: 14px -20px 0; padding: 0 20px 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
@media (max-width: 640px) {
    body.m .tl-chips { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}
body.m .tl-chips::-webkit-scrollbar { display: none; }
body.m .tl-chips a {
    flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; background: #fff;
    border: 1px solid var(--tl-line); font-size: 12.5px; color: var(--tl-sub); white-space: nowrap;
}
body.m .tl-chips a:active { background: var(--tl-blue-l); border-color: #bed3ff; color: var(--tl-blue-d); }

body.m .tl-sec { padding-top: 2px; padding-bottom: 12px; }
body.m .tl-sec-hd { margin: 16px 0 10px; }
body.m .tl-sec-hd h2 { font-size: 15.5px; }
body.m .tl-sec-hd h2::before { height: 13px; margin-right: 7px; }
body.m .tl-sec-note { font-size: 11.5px; }

body.m .tl-featured { grid-template-columns: 1fr; gap: 9px; }
body.m .tl-fcard { padding: 12px 13px; gap: 11px; }
body.m .tl-fcard .tl-ico { width: 38px; height: 38px; font-size: 14px; }
body.m .tl-fcard-bd strong { font-size: 14px; }
body.m .tl-fcard-bd p { font-size: 11.5px; }
body.m .tl-fcard-go { display: block; font-size: 14px; }

body.m .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
body.m .tl-card {
    flex-direction: column; align-items: flex-start; gap: 9px;
    padding: 13px 12px 14px; min-height: 0;
}
body.m .tl-card .tl-ico { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
body.m .tl-card-bd { width: 100%; }
body.m .tl-card-bd strong { font-size: 13px; line-height: 1.4; }
body.m .tl-card-bd p { font-size: 11.5px; margin-top: 3px; }
body.m .tl-card .tl-badge { display: none; }

body.m .tl-empty, body.m .tl-noresult { padding: 34px 16px; font-size: 13px; }
body.m .tl-modal-box { max-height: 92vh; }
body.m .tl-modal-bd { padding: 16px; }

@media (max-width: 360px) {
    body.m .tl-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   自研网络工具页（SSL / HTTP / 端口 / 延迟 / 备案 / 死链 / DNS / robots）
   ===================================================================== */
.tl-tool-hero { padding: 22px 0 8px; }
.tl-crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--tl-mute); margin-bottom: 14px; }
.tl-crumb a:hover { color: var(--tl-blue); }
.tl-tool-hd { display: flex; align-items: flex-start; gap: 14px; }
.tl-tool-ico {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px;
    display: grid; place-items: center; color: #fff; font-size: 19px;
    box-shadow: 0 6px 16px rgba(31, 61, 120, .16);
}
.tl-tool-hd-bd h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-tool-hd-bd p { margin: 0; color: var(--tl-sub); font-size: 13.5px; line-height: 1.75; max-width: 760px; }
.tl-badge.is-own { background: #ecfdf5; color: #059669; }

.tl-tool-card { background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); box-shadow: var(--tl-shadow); padding: 18px 20px; }
.tl-tool-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.tl-tool-form .tl-field { grid-column: 1 / -1; margin-bottom: 8px; }
.tl-tool-form .tl-field.is-half { grid-column: span 1; }
.tl-tool-form .tl-check { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; color: var(--tl-sub); font-size: 13.5px; margin: 4px 0 2px; cursor: pointer; }
.tl-tool-form .tl-check input { width: 16px; height: 16px; accent-color: var(--tl-blue); }
.tl-tip-inline { grid-column: 1 / -1; margin: 0 0 6px !important; }
.tl-form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.tl-err-lg { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; }

/* 结果卡片 */
.tl-res { margin-top: 16px; background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); box-shadow: var(--tl-shadow); overflow: hidden; }
.tl-res-hd { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--tl-line); background: var(--tl-soft); }
.tl-res-hd.is-ok { background: #f2fbf7; border-bottom-color: #cdeee0; }
.tl-res-hd.is-warn { background: #fffbf0; border-bottom-color: #f6e6bf; }
.tl-res-hd.is-bad { background: #fff5f5; border-bottom-color: #f6d5d5; }
.tl-res-ico { flex: 0 0 auto; font-size: 22px; line-height: 1; color: var(--tl-mute); }
.tl-res-hd.is-ok .tl-res-ico { color: #059669; }
.tl-res-hd.is-warn .tl-res-ico { color: #d97706; }
.tl-res-hd.is-bad .tl-res-ico { color: #dc2626; }
.tl-res-hd-bd strong { display: block; font-size: 16px; }
.tl-res-hd-bd p { margin: 4px 0 0; color: var(--tl-sub); font-size: 12.5px; word-break: break-all; }

.tl-res-bullets { margin: 0; padding: 14px 20px 0 38px; color: #b42318; font-size: 13px; }
.tl-res-bullets li { margin-bottom: 4px; }

.tl-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 4px 20px 6px; }
.tl-kv-row { display: flex; gap: 12px; padding: 10px 8px 10px 0; border-bottom: 1px dashed var(--tl-line); min-width: 0; }
.tl-kv-row:nth-last-child(-n+2) { border-bottom: 0; }
.tl-kv-row .k { flex: 0 0 92px; color: var(--tl-mute); font-size: 12.5px; }
.tl-kv-row .v { flex: 1 1 auto; min-width: 0; font-size: 13px; word-break: break-all; }
.tl-kv-row .v.mono { font-family: ui-monospace, Consolas, Monaco, monospace; font-size: 12.5px; }

.tl-chipbox { padding: 4px 20px 14px; }
.tl-chiprow { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--tl-line); }
.tl-chiprow .k { flex: 0 0 128px; color: var(--tl-mute); font-size: 12.5px; }
.tl-chipvals { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tl-chipvals em { font-style: normal; background: var(--tl-soft); border: 1px solid var(--tl-line); border-radius: 7px; padding: 2px 8px; font-size: 11.5px; color: var(--tl-sub); word-break: break-all; }

.tl-table-wrap { padding: 6px 20px 14px; }
.tl-table-hd { font-size: 12.5px; color: var(--tl-mute); margin: 6px 0 8px; }
.tl-table-scroll { overflow-x: auto; border: 1px solid var(--tl-line); border-radius: 10px; }
.tl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 480px; }
.tl-table th, .tl-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--tl-line); vertical-align: top; }
.tl-table th { background: var(--tl-soft); color: var(--tl-sub); font-weight: 600; white-space: nowrap; }
.tl-table tr:last-child td { border-bottom: 0; }
.tl-table td { word-break: break-all; }

.tl-raw { padding: 6px 20px 16px; }
.tl-raw-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 8px; color: var(--tl-mute); font-size: 12.5px; }
.tl-btn.is-sm { padding: 6px 12px; font-size: 12.5px; }
.tl-raw textarea { min-height: 210px; }

.tl-res-note { padding: 0 20px 18px; margin: 0 !important; }

.tl-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tl-related-card { display: flex; align-items: center; gap: 9px; padding: 13px 14px; background: #fff; border: 1px solid var(--tl-line); border-radius: 11px; font-size: 13px; box-shadow: var(--tl-shadow); transition: .18s; }
.tl-related-card:hover { transform: translateY(-2px); box-shadow: var(--tl-shadow-h); border-color: #cfe0ff; color: var(--tl-blue); }
.tl-related-card i { font-size: 15px; }

@media (max-width: 900px) {
    .tl-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .tl-tool-hero { padding: 16px 0 6px; }
    .tl-tool-hd-bd h1 { font-size: 20px; }
    .tl-tool-ico { width: 40px; height: 40px; border-radius: 11px; font-size: 16px; }
    .tl-tool-card { padding: 14px; }
    .tl-tool-form { grid-template-columns: 1fr; }
    .tl-tool-form .tl-field.is-half { grid-column: 1 / -1; }
    .tl-kv { grid-template-columns: 1fr; padding: 2px 14px 4px; }
    .tl-kv-row { padding: 9px 0; }
    .tl-kv-row:nth-last-child(-n+2) { border-bottom: 1px dashed var(--tl-line); }
    .tl-kv-row:last-child { border-bottom: 0; }
    .tl-res-hd { padding: 14px; }
    .tl-chipbox, .tl-table-wrap, .tl-raw { padding-left: 14px; padding-right: 14px; }
    .tl-chiprow { flex-direction: column; gap: 6px; }
    .tl-chiprow .k { flex: none; }
    .tl-related { grid-template-columns: 1fr 1fr; }
}
