/* f7 tools extras, on top of the paste f7 style.css */
.faint { color: var(--faint); }
.hint.ok { color: var(--accent-text); display: flex; align-items: center; gap: 6px; }
.hint.bad { color: var(--danger); display: flex; align-items: center; gap: 6px; }

/* home */
.hero { text-align: center; padding: 26px 0 8px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -1.4px; margin-bottom: 10px; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero .sub { font-size: 16.5px; max-width: 620px; margin: 0 auto 26px; }
.hero-stats { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin: 18px 0 6px; color: var(--muted); font-size: 13.5px; }
.hero-stats b { font-family: var(--mono); color: var(--text); font-size: 15px; margin-right: 5px; }
.home-short { max-width: 820px; margin: 0 auto; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 44px 0 14px; }
.section-title h2 { margin: 0; font-size: 20px; }
.cat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); margin: 22px 0 10px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; animation: tin .35s ease-out backwards; animation-delay: calc(var(--i, 0) * 25ms); }
.tool-card:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.tool-card .t-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.tool-card .t-ic .ic { width: 19px; height: 19px; }
.tool-card b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.tool-card span { color: var(--muted); font-size: 13px; line-height: 1.45; display: block; }
.tool-card.big { grid-column: span 2; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .tool-card { animation: none; } }

.feature-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.feature { padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.feature .ic { color: var(--accent-text); width: 20px; height: 20px; margin-bottom: 8px; }
.feature b { display: block; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* the shortener */
.shorten { padding: 18px; }
.sh-main { display: flex; gap: 10px; }
.sh-url { flex: 1; position: relative; min-width: 0; }
.sh-url > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.sh-url input { padding: 14px 14px 14px 42px; font-size: 16px; }
.sh-go { padding: 0 22px; font-size: 15px; }
.sh-opts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.sh-more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.sh-more summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; list-style: none; }
.sh-more summary::-webkit-details-marker { display: none; }
.sh-more summary:hover { color: var(--text); }
.sh-more[open] summary { margin-bottom: 12px; }
.sh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sh-grid .field { margin: 0; }
.sh-free { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2);
  color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sh-free .ic { color: var(--accent-text); margin-top: 2px; }
.sh-free b { color: var(--text); font-weight: 600; }
.sh-result { margin-top: 14px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); animation: pop .18s ease-out; }
.sh-done { display: flex; gap: 14px; align-items: center; }
.sh-check { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.sh-check .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.sh-short { display: block; font-size: clamp(17px, 3vw, 22px); font-weight: 700; color: var(--accent-text); word-break: break-all; margin: 2px 0 4px; }
.sh-dest { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-dest .ic { width: 13px; height: 13px; margin-right: 5px; }

.recent-list .item .title { font-family: var(--mono); }
.recent-list .item .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* links table on the account page */
.links-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.links-bar input[type=search] { max-width: 300px; }
table.t td.lk { max-width: 340px; }
.lk-short { font-family: var(--mono); font-weight: 600; font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-dest { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.lk-name { font-size: 12.5px; color: var(--text); }
td.n, th.n { text-align: right; font-family: var(--mono); }
.badge.ok { border-color: color-mix(in srgb, var(--accent-text) 50%, transparent); color: var(--accent-text); }
.badge.off { border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn); }
.badge.bad { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.stat-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.stat-cols h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.mini-stats.three { grid-template-columns: repeat(3, 1fr); }

/* the link page (preview, password, gone) */
.link-card { max-width: 520px; margin: 40px auto; }
.link-card .big-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin: 0 0 14px; background: var(--accent-soft); color: var(--accent-text); }
.link-card .big-ic.warn { background: var(--warn-soft); color: var(--warn); }
.link-card .big-ic.bad { background: var(--danger-soft); color: var(--danger); }
.link-card .big-ic .ic { width: 26px; height: 26px; }
.dest-box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--mono); font-size: 13.5px;
  word-break: break-all; margin: 12px 0 16px; }
.dest-box .host { color: var(--accent-text); font-weight: 700; }

/* tool pages */
.tool-head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.tool-head .t-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.tool-head .t-ic .ic { width: 23px; height: 23px; }
.tool-head h1 { margin: 0; font-size: 26px; }
.tool-head p { margin: 2px 0 0; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.tool-side { position: sticky; top: 76px; }
.tool-side .list .item { grid-template-columns: auto 1fr; align-items: center; padding: 9px 12px; font-size: 13.5px; }
.tool-side .list .item .ic { color: var(--muted); }
.tool-side .list .item.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.tool-side .list .item.on .ic { color: var(--accent-text); }
.io { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.io textarea, .tool-card-body textarea { min-height: 240px; }
.out { background: var(--code-bg, var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-family: var(--mono);
  font-size: 13.5px; white-space: pre-wrap; word-break: break-all; min-height: 44px; position: relative; }
.out.big { font-size: 18px; letter-spacing: .3px; }
.out-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.out-row .out { flex: 1; margin: 0; display: flex; align-items: center; }
.kv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.kv-table tr:first-child td { border-top: 0; }
.kv-table td:first-child { color: var(--muted); width: 34%; white-space: nowrap; }
.kv-table td.mono { word-break: break-all; }
.kv-table .btn { float: right; margin-left: 8px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { font-family: var(--mono); font-weight: 700; min-width: 34px; text-align: right; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 16px; }
.meter { height: 8px; border-radius: 9px; background: var(--panel-3); overflow: hidden; margin: 10px 0 4px; }
.meter i { display: block; height: 100%; border-radius: 9px; transition: width .2s, background .2s; }
.pw-list { display: flex; flex-direction: column; gap: 6px; }
.err-box { color: var(--danger); font-size: 13.5px; margin-top: 8px; font-family: var(--mono); }
.ok-box { color: var(--accent-text); font-size: 13.5px; margin-top: 8px; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.counts div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.counts b { display: block; font-family: var(--mono); font-size: 22px; }
.counts span { color: var(--muted); font-size: 12.5px; }
.swatch-big { height: 120px; border-radius: var(--radius); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.color-in { display: flex; gap: 10px; align-items: center; }
.color-in input[type=color] { width: 54px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); padding: 3px; cursor: pointer; flex: none; }
.contrast-demo { padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); margin-top: 10px; }
.pass-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.pass-chip.y { background: var(--accent-soft); color: var(--accent-text); }
.pass-chip.n { background: var(--danger-soft); color: var(--danger); }
.diff-out { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; max-height: 560px; background: var(--code-bg, var(--bg-2)); }
.diff-out div { padding: 1px 10px; white-space: pre-wrap; word-break: break-word; }
.diff-out .add { background: color-mix(in srgb, #2ea043 18%, transparent); }
.diff-out .del { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.diff-out .add::before { content: '+ '; color: #2ea043; }
.diff-out .del::before { content: '- '; color: var(--danger); }
.diff-out .same::before { content: '  '; }
.diff-out .same { color: var(--muted); }
.rx-out { font-family: var(--mono); font-size: 13.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.rx-out mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 1px 0; outline: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.rx-out mark:nth-of-type(even) { background: color-mix(in srgb, var(--link) 30%, transparent); outline-color: color-mix(in srgb, var(--link) 55%, transparent); }
.qr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.qr-prev { text-align: center; }
.qr-prev .qr-holder { display: inline-block; line-height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.qr-prev .qr-holder canvas { width: 260px; height: 260px; image-rendering: pixelated; }
.jwt-part { border-left: 3px solid var(--accent); padding-left: 12px; margin-bottom: 14px; }
.jwt-part.p2 { border-color: var(--link); }
.jwt-part.p3 { border-color: var(--warn); }
.jwt-part h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

/* staff */
.staff-main .table-wrap { margin-bottom: 12px; }

@media (max-width: 860px) {
  .tool-layout, .qr-wrap { grid-template-columns: 1fr; }
  .tool-side { position: static; order: 2; }
  .feature-row { grid-template-columns: 1fr; }
  .stat-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sh-main { flex-direction: column; }
  .sh-go { padding: 12px; }
  .sh-opts, .sh-grid, .io { grid-template-columns: 1fr; }
  .tool-card.big { grid-column: auto; }
  .sh-done { align-items: flex-start; }
}
.shorten .prefix-input span { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
@media (max-width: 640px) { .shorten .prefix-input span { max-width: 55%; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 640px) { .section-title > .muted { display: none; } }

/* "More tools" dropdown in the top bar */
.nav-more { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 6px 2px; }
.nav-more:hover, .nav-more[aria-expanded="true"] { color: var(--text); }
.nav-more .ic { width: 16px; height: 16px; }
.nav-more .ic:last-child { width: 14px; height: 14px; opacity: .7; }
.more-pop { position: absolute; z-index: 90; width: min(540px, calc(100vw - 16px)); max-height: 72vh; overflow-y: auto; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); padding: 8px; animation: pop .14s ease-out;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.mp-group { grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); padding: 12px 10px 4px; }
.mp-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.mp-item:hover { background: var(--panel-2); text-decoration: none; }
.mp-item > .ic { width: 18px; height: 18px; color: var(--accent-text); flex: none; margin-top: 1px; }
.mp-item b { display: block; font-size: 13.5px; font-weight: 600; }
.mp-item em { display: block; font-style: normal; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 1px; }
@media (max-width: 560px) { .more-pop { grid-template-columns: 1fr; } .mp-item em { display: none; } }
