/* Image compressor tool */
/* People come here to use the tool, so the page header stays short and the tool stays near the top */
.ph.ph--small { min-height: 0; padding-top: clamp(100px, 11vw, 130px); padding-bottom: clamp(24px, 3vw, 40px); }
.ph--small .ph__t { font-size: clamp(32px, 4.2vw, 60px); }
.ph--small .ph__art { width: min(14vw, 170px); bottom: clamp(20px, 3vw, 36px); }
@media (max-width: 860px) {
  .ph.ph--small .ph__art { display: none; }
}
.cz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 12px; align-items: stretch; }
.cz-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 320px; padding: 28px 20px; border: 2px dashed rgba(0, 0, 0, .22); border-radius: 20px; background: #fff; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.cz-drop:hover, .cz-drop.on, .cz-drop:focus-within { border-color: var(--red); background: #fff5f4; }
.cz-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cz-drop b { font-size: clamp(24px, 2.6vw, 36px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
.cz-drop small { color: var(--mute); font-size: 14.5px; }
.cz-drop__px { display: grid; grid-template-columns: repeat(4, 12px); gap: 3px; margin-bottom: 10px; }
.cz-drop__px i { height: 12px; border-radius: 2px; background: var(--red); }
.cz-drop__px i:nth-child(3n) { background: var(--ink); }
.cz-opts { display: flex; flex-direction: column; gap: 22px; padding: 24px; border-radius: 20px; background: var(--dark); color: #fff; }
.cz-opts legend { padding: 0; margin-bottom: 10px; font-size: 14.5px; font-weight: 500; }
.cz-opts fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.cz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-chips label { position: relative; }
.cz-chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cz-chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 99px; font-size: 14.5px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); transition: background .2s; }
.cz-chips label:hover span { background: rgba(255, 255, 255, .1); }
.cz-chips input:checked + span { background: var(--red); box-shadow: none; }
.cz-chips input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.cz-custom { display: none; align-items: center; gap: 8px; margin-top: 10px; font-size: 14.5px; }
.cz-custom.on { display: flex; }
.cz-custom input { width: 110px; min-height: 44px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; background: transparent; color: #fff; font: inherit; }
.cz-note { margin-top: auto; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .68); }
.cz-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; scroll-margin-top: 90px; }
.cz-tools[hidden] { display: none; }
.cz-tools .btn { min-height: 44px; }
.cz-tools .btn[hidden] { display: none; }
.cz-status { margin: 0 auto 0 0; font-weight: 500; min-height: 1.4em; }
.cz-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.cz-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "thumb name get" "thumb meta get"; gap: 2px 14px; align-items: center; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 14px; background: #fff; }
.cz-row__thumb { grid-area: thumb; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.cz-row__name { grid-area: name; align-self: end; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.cz-row__meta { grid-area: meta; align-self: start; color: var(--mute); font-size: 14px; line-height: 1.35; }
.cz-row__get { grid-area: get; min-height: 44px; }
.cz-row.is-err .cz-row__meta { color: #b3261e; }
.cz-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cz-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; background: #fff; font-size: 14.5px; font-weight: 500; transition: background .2s, color .2s; }
.cz-links a:hover, .cz-links a[aria-current] { background: var(--red); color: #fff; }
@media (max-width: 860px) {
  .cz { grid-template-columns: 1fr; }
  .cz-drop { min-height: 220px; }
}
@media (max-width: 560px) {
  .cz-row { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "thumb name" "thumb meta" "get get"; padding-right: 10px; }
  .cz-row__thumb { width: 48px; height: 48px; }
  .cz-row__get { width: 100%; margin-top: 8px; }
}

/* Shared tool parts */
.tl-opts label.tl-f, .tl-f { display: grid; gap: 6px; font-size: 14.5px; font-weight: 500; }
.tl-f small { font-weight: 400; color: var(--mute); }
.cz-opts .tl-f small { color: rgba(255, 255, 255, .68); }
.tl-f input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--red); }
.tl-row { display: flex; justify-content: space-between; gap: 10px; }
.tl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-acts .btn { min-height: 44px; }
.tl-acts .btn[hidden], .tl-stage[hidden], .tl-out[hidden], .tl-msg[hidden] { display: none; }
.tl-stage { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 14px; border-radius: 20px; background: repeating-conic-gradient(#ececef 0 25%, #fff 0 50%) 0 0 / 22px 22px; overflow: hidden; }
.tl-stage canvas, .tl-stage img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.tl-stage canvas.px { image-rendering: pixelated; }
.tl-msg { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff; font-size: 14.5px; line-height: 1.4; }
.tl-msg.is-err { color: #b3261e; }
.tl-left { display: grid; gap: 12px; min-width: 0; align-content: start; }
.tl-swatches { display: flex; flex-wrap: wrap; gap: 3px; min-height: 14px; }
.tl-swatches i { width: 14px; height: 14px; border-radius: 3px; }
.tl-input, .tl-text { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(0, 0, 0, .2); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; }
.tl-text { min-height: 180px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.45; word-break: break-all; }
.tl-input:focus-visible, .tl-text:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
.tl-panel { display: grid; gap: 14px; min-width: 0; padding: clamp(18px, 2vw, 24px); border-radius: 20px; background: #fff; }
.tl-panel h2 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.tl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0; }
.tl-facts dt { color: var(--mute); font-size: 13.5px; }
.tl-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.tl-canvas-drag { cursor: grab; touch-action: none; }
.tl-canvas-drag:active { cursor: grabbing; }
.tl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tl-span { grid-column: 1 / -1; }
.tl-rep { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--bg); }
.tl-rep__x { justify-self: end; min-height: 44px; padding: 0 12px; border: 0; background: none; color: #b3261e; font: inherit; font-size: 14px; cursor: pointer; }
.tl-days { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-days label { position: relative; }
.tl-days input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tl-days span { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 500; }
.tl-days input:checked + span { background: var(--dark); color: #fff; }
.tl-days input:focus-visible + span { outline: 2px solid var(--red); }
.sg { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sg-out { position: sticky; top: 90px; display: grid; gap: 12px; min-width: 0; padding: clamp(18px, 2vw, 24px); border-radius: 20px; background: var(--dark); color: #fff; }
.sg-out h2 { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.sg-code { max-height: 58vh; margin: 0; padding: 14px; overflow: auto; border-radius: 12px; background: rgba(255, 255, 255, .07); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-checks { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.35; }
.sg-checks li::before { content: "■ "; font-size: 10px; vertical-align: 1px; color: #5ad27b; }
.sg-checks li.bad::before { color: #ff6b5e; }
.sg-checks li.warn::before { color: #f4c84a; }
.sg-out a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.og-card { max-width: 520px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .14); border-radius: 12px; background: #fff; }
.og-card__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1.91; background: var(--bg); color: var(--mute); font-size: 14px; overflow: hidden; }
.og-card__img img { width: 100%; height: 100%; object-fit: cover; }
.og-card__txt { display: grid; gap: 3px; padding: 12px 14px; overflow-wrap: anywhere; }
.og-card__txt small { color: var(--mute); text-transform: uppercase; font-size: 12px; }
.og-card__txt b { font-weight: 600; line-height: 1.25; }
.og-card__txt span { color: var(--mute); font-size: 14px; line-height: 1.35; }
.og-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.og-list li { padding-left: 18px; position: relative; line-height: 1.4; font-size: 15px; overflow-wrap: anywhere; }
.og-list li::before { content: ""; position: absolute; left: 0; top: .42em; width: 10px; height: 10px; border-radius: 2px; background: #2e9e57; }
.og-list li.bad::before { background: #d33a2f; }
.og-list li.warn::before { background: #e0a91e; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.th-card { display: grid; gap: 8px; align-content: start; min-height: 170px; padding: 22px; border-radius: 20px; background: #fff; transition: background .2s, color .2s; }
.th-card b { font-size: 22px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.th-card span { color: var(--mute); font-size: 15px; line-height: 1.4; transition: color .2s; }
.th-card:hover { background: var(--dark); color: #fff; }
.th-card:hover span { color: rgba(255, 255, 255, .7); }
@media (max-width: 860px) {
  .sg { grid-template-columns: 1fr; }
  .sg-out { position: static; }
}
@media (max-width: 560px) {
  .tl-grid2 { grid-template-columns: 1fr; }
}
.tl-root [hidden] { display: none !important; }

/* Tables in tool page explainers (blog tables are styled only inside articles) */
.prose .wp-block-table { margin: 1.4em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hair); }
.prose .wp-block-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.prose .wp-block-table th, .prose .wp-block-table td { border: 0; padding: 14px 16px; text-align: left; vertical-align: top; }
.prose .wp-block-table thead th { background: var(--ink); color: #fff; font-weight: 500; }
.prose .wp-block-table tbody td { border-top: 1px solid var(--hair); }
.prose .wp-block-table tbody tr:nth-child(even) td { background: #fafafa; }
.prose .wp-block-table tbody td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
