/* Free tools: one shared look for /tools and every tool page. */
.tl { padding-top: 112px; padding-bottom: 24px; }
.tl .wrap { max-width: 1120px !important; margin: 0 auto; }
.tl-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--v-mut); margin: 0 0 18px; }
.tl-crumbs a { color: var(--v-mut); text-decoration: none; }
.tl-crumbs a:hover { color: var(--v-ink); text-decoration: underline; text-underline-offset: 3px; }
.tl-crumbs span[aria-hidden] { opacity: .5; }
.tl h1 { margin: 0 0 10px; font-size: clamp(36px, 5vw, 56px); line-height: 1.04; letter-spacing: -.035em; font-weight: 600; }
.tl .tl-lead { margin: 0 0 26px; max-width: 62ch; font-size: 18px; line-height: 1.55; color: var(--v-mut); }

/* The tool itself */
.tl-app { background: #fff; border: 1px solid var(--v-line); border-radius: 22px; box-shadow: 0 30px 60px -44px rgba(26,23,19,.35); padding: 20px; }
.tl-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.tl-row input[type=url], .tl-row input[type=text] { flex: 1 1 320px; min-width: 0; height: 50px; padding: 0 16px; border: 1px solid var(--v-line); border-radius: 13px; background: #FAF9F7; font: 400 16px Inter, system-ui, sans-serif; color: var(--v-ink); }
.tl-row input:focus { outline: 2px solid #C24A08; outline-offset: 1px; background: #fff; }
.tl-code:focus { outline: 2px solid #C24A08; outline-offset: 1px; }
.tl-btn { height: 50px; padding: 0 22px; border: 0; border-radius: 13px; background: #C24A08; color: #fff; font: 600 15.5px Inter, system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: background .15s, transform .15s; }
.tl-btn:hover { background: #A93F06; transform: translateY(-1px); }
.tl-btn:disabled { opacity: .55; cursor: default; transform: none; }
.tl-btn--ghost { background: #fff; color: var(--v-ink); border: 1px solid var(--v-line); }
.tl-btn--ghost:hover { background: #F7F5F1; color: var(--v-ink); }
.tl-msg { margin: 10px 2px 0; font-size: 14px; color: var(--v-mut); min-height: 20px; }
.tl-msg.bad { color: #A12C1F; }
.tl-ts { margin-top: 10px; min-height: 0; }
.tl-try { background: 0; border: 0; padding: 0; font: 500 14px Inter, system-ui, sans-serif; color: var(--v-mut); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-try:hover { color: var(--v-ink); }
.tl-tabs { display: inline-flex; gap: 3px; background: #F2F0EC; border-radius: 11px; padding: 3px; }
.tl-tabs button { border: 0; background: none; padding: 8px 13px; border-radius: 9px; font: 500 14px Inter, system-ui, sans-serif; color: var(--v-mut); cursor: pointer; }
.tl-tabs button[aria-pressed="true"] { background: #fff; color: var(--v-ink); box-shadow: 0 1px 2px rgba(26,23,19,.1); }
.tl-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 16px; }
.tl-code { width: 100%; height: clamp(560px, calc(100vh - 230px), 920px); min-height: 0; resize: vertical; border: 1px solid var(--v-line); border-radius: 14px; background: #1A1713; color: #F3EFE8; padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; tab-size: 2; }
.tl-frame { width: 100%; height: clamp(560px, calc(100vh - 230px), 920px); border: 1px solid var(--v-line); border-radius: 14px; background: #fff; display: block; }
.tl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.tl-bar small { color: var(--v-mut); font-size: 13px; }

/* Hand-off into HTMLAnnotate, under every result */
.tl-hand { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 18px; border-radius: 16px; background: #FFF6EE; border: 1px solid rgba(194,74,8,.18); }
.tl-hand b { display: block; font-size: 15.5px; }
.tl-hand span { font-size: 14px; color: var(--v-mut); }
.tl-hand[hidden] { display: none; }

/* Results */
.tl-res { margin-top: 18px; }
.tl-res[hidden] { display: none; }
.tl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tl-stat { border: 1px solid var(--v-line); border-radius: 14px; padding: 14px; background: #FAF9F7; }
.tl-stat b { display: block; font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tl-stat span { font-size: 13px; color: var(--v-mut); }
.tl-stat.bad b { color: #A12C1F; }
.tl-stat.warn b { color: #8A5A00; }
.tl-stat.ok b { color: #2C6B33; }
.tl-list { border: 1px solid var(--v-line); border-radius: 14px; overflow: hidden; }
.tl-list h3 { margin: 0; padding: 12px 14px; font-size: 14.5px; background: #FAF9F7; border-bottom: 1px solid var(--v-line); }
.tl-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--v-line2); font-size: 14px; align-items: baseline; }
.tl-item:last-child { border-bottom: 0; }
.tl-item a { color: var(--v-ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-item > div { min-width: 0; }
.tl-item small { display: block; color: var(--v-mut); font-size: 12.5px; }
.tl-code-chip { display: inline-block; font: 600 12px/1.6 Inter, system-ui, sans-serif; border-radius: 6px; padding: 1px 7px; text-align: center; }
.tl-code-chip.bad { background: #FBE7E4; color: #A12C1F; }
.tl-code-chip.warn { background: #FFF1D6; color: #7A4E00; }
.tl-code-chip.ok { background: #E8F3E6; color: #2C6B33; }
.tl-code-chip.mut { background: #F2F0EC; color: var(--v-mut); }
.tl-gap { height: 14px; }
.tl-skel { height: 120px; border-radius: 14px; background: linear-gradient(90deg, #F2F0EC 25%, #F8F6F2 50%, #F2F0EC 75%); background-size: 200% 100%; animation: tlShimmer 1.2s infinite; }
@keyframes tlShimmer { to { background-position: -200% 0; } }

/* Responsive checker */
.tl-devices { display: flex; gap: 18px; align-items: flex-start; overflow-x: auto; padding: 6px 2px 12px; }
.tl-dev { flex: none; }
.tl-dev figcaption { font-size: 13px; color: var(--v-mut); margin: 0 0 8px; }
.tl-dev__box { position: relative; overflow: hidden; border: 1px solid var(--v-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 40px -28px rgba(26,23,19,.35); }
.tl-dev__box iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }
.tl-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FFF1D6; color: #6B4600; font-size: 14px; }
.tl-note[hidden] { display: none; }

/* Link preview cards */
.lp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lp-card h4 { margin: 0 0 8px; font-size: 13px; color: var(--v-mut); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.lp { border: 1px solid #DADDE1; border-radius: 10px; overflow: hidden; background: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.lp__img { aspect-ratio: 1.91 / 1; background: #EEF0F2 center / cover no-repeat; display: grid; place-items: center; color: #8A8D91; font-size: 13px; }
.lp__b { padding: 10px 12px 12px; }
.lp__host { font-size: 12px; color: #65676B; text-transform: uppercase; }
.lp__t { font-size: 15px; font-weight: 600; color: #1C1E21; margin: 3px 0; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp__d { font-size: 13.5px; color: #65676B; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp--x { border-radius: 16px; border-color: #CFD9DE; }
.lp--x .lp__img { position: relative; }
.lp--slack { display: grid; grid-template-columns: 4px 1fr; gap: 12px; border: 0; border-radius: 0; background: transparent; }
.lp--slack::before { content: ""; background: #DDDDDD; border-radius: 4px; }
.lp--slack .lp__img { border-radius: 8px; max-width: 360px; margin-top: 8px; }
.lp--wa { background: #DCF8C6; border: 0; border-radius: 10px; padding: 6px; }
.lp--wa .lp__inner { display: grid; grid-template-columns: 84px 1fr; gap: 10px; background: rgba(0,0,0,.05); border-radius: 8px; overflow: hidden; }
.lp--wa .lp__img { aspect-ratio: 1; }
.lp-tags { margin-top: 16px; }
.lp-tags .tl-item { grid-template-columns: 170px minmax(0, 1fr); }

/* Page content below the tool */
.tl-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.tl-switch a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--v-line); background: #fff; color: var(--v-mut); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s, border-color .15s; }
.tl-switch a:hover { color: var(--v-ink); border-color: #CFCAC0; }
.tl-switch a[aria-current] { background: var(--v-ink); border-color: var(--v-ink); color: #F6F3EC; }
/* Same width as the header: grids use all of it, reading text keeps a comfortable line length on the same left edge. */
.tl-body { max-width: none; margin: 72px 0 0; }
.tl-body > h2, .tl-body > h3, .tl-body > p, .tl-body > ul, .tl-body > ol, .tl-body > .tl-faq { max-width: 760px; }
.tl-body h2 { margin: 2.2em 0 .6em; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.025em; line-height: 1.15; }
.tl-body h2:first-child { margin-top: 0; }
.tl-body h3 { margin: 1.4em 0 .4em; font-size: 18px; letter-spacing: -.015em; }
.tl-body p, .tl-body li { font-size: 17px; line-height: 1.7; }
.tl-body p { margin: 0 0 1.1em; }
.tl-body ul, .tl-body ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.tl-body li { margin: 0 0 .45em; }
.tl-steps { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: st; }
.tl-steps li { counter-increment: st; background: #fff; border: 1px solid var(--v-line); border-radius: 16px; padding: 18px; font-size: 15px !important; line-height: 1.55 !important; }
.tl-steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #C24A08; color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.tl-steps b { display: block; margin-bottom: 4px; }
.tl-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 1.2em; }
.tl-feats div { background: #fff; border: 1px solid var(--v-line); border-radius: 14px; padding: 16px; }
.tl-feats b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.tl-feats span { font-size: 14.5px; line-height: 1.55; color: var(--v-mut); }
.tl-faq details { border-bottom: 1px solid var(--v-line); padding: 14px 0; }
.tl-faq summary { cursor: pointer; font-weight: 600; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tl-faq summary::-webkit-details-marker { display: none; }
.tl-faq summary::after { content: "+"; color: var(--v-mut); font-weight: 400; font-size: 22px; line-height: 1; }
.tl-faq details[open] summary::after { content: "\2212"; }
.tl-faq details p { margin: 10px 0 0; font-size: 16px; color: var(--v-mut); }
.tl-more { margin: 72px 0 0; }
.tl-more h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 16px; }
.tl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tl-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--v-line); border-radius: 18px; padding: 20px; text-decoration: none; color: var(--v-ink); transition: transform .2s, box-shadow .2s; }
.tl-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -30px rgba(26,23,19,.45); color: var(--v-ink); }
.tl-card i { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #FFF1E6; color: #C24A08; font-style: normal; }
.tl-card i svg { width: 20px; height: 20px; }
.tl-card b { font-size: 17px; letter-spacing: -.015em; }
.tl-card span { font-size: 14.5px; line-height: 1.55; color: var(--v-mut); }
.tl-card em { margin-top: auto; padding-top: 4px; font-style: normal; font-weight: 600; font-size: 14.5px; }
.tl-card em::after { content: "\2192"; margin-left: 7px; display: inline-block; transition: transform .18s; }
.tl-card:hover em::after { transform: translateX(3px); }

@media (max-width: 900px) {
  .tl-split { grid-template-columns: 1fr; }
  .tl-code, .tl-frame { min-height: 0; height: 320px; }
  .tl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-grid, .tl-feats, .tl-steps, .tl-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tl { padding-top: 96px; }
  .tl-app { padding: 14px; border-radius: 18px; }
  .tl-btn { width: 100%; justify-content: center; }
  .tl-item { grid-template-columns: 70px minmax(0, 1fr); }
  .lp-tags .tl-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tl-skel { animation: none; } }

/* Toolbar icons and full screen */
.tl-icons { display: flex; gap: 6px; }
.tl-ico { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--v-line); background: #fff; color: var(--v-ink); cursor: pointer; transition: background .15s, border-color .15s; }
.tl-ico:hover { background: #F7F5F1; border-color: #CFCAC0; }
.tl-ico svg { width: 18px; height: 18px; }
.tl-pane { background: #F2F0EC; border-radius: 14px; display: flex; justify-content: center; overflow: auto; }
.tl-app.is-full { position: fixed; inset: 0; z-index: 2000; border-radius: 0; padding: 14px 16px; overflow: auto; }
.tl-app.is-full .tl-code, .tl-app.is-full .tl-frame { height: calc(100vh - 150px); }
.tl-app.is-full .tl-hand { display: none; }
.tl-split.is-stacked { grid-template-columns: 1fr; }
.tl-split.is-stacked .tl-code { height: 300px; }
@media (max-width: 900px) { .tl-feats { grid-template-columns: 1fr; } }
