/* RankCortex free tools. Built on skin.css tokens (colors, fonts, radii). */
.t-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--bg); border: 1px solid var(--accent); border-radius: var(--radius); }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* header / footer */
.t-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.t-head__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.t-head .logo { font-size: 15px; }
.t-nav { display: flex; gap: 4px; margin-right: auto; }
.t-nav a { padding: 6px 12px; border-radius: var(--radius-pill); font-size: 15px; color: var(--text); }
.t-nav a:hover, .t-nav a[aria-current="page"] { color: var(--text-strong); background: var(--bg-muted); }
.t-head__actions { display: flex; gap: 8px; }
.t-head__actions .btn { height: 38px; padding: 0 16px; }
.t-head__actions .btn--primary { box-shadow: var(--shadow-cta); }
.t-foot { margin-top: 96px; border-top: 1px solid var(--border); background: var(--bg-subtle); padding: 56px 0 32px; font-size: 14px; }
.t-foot__grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.t-foot p { font-size: 14px; line-height: 22px; margin: 12px 0 0; max-width: 360px; }
.t-foot h2 { padding: 0; margin: 0 0 12px; font-size: 13px; line-height: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-family: var(--font-sans); font-weight: 600; }
.t-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.t-foot a:hover { color: var(--accent); }
.t-foot__legal { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); max-width: none !important; }

/* hero */
.t-hero { padding: 40px 0 24px; }
.t-hero h1 { margin: 8px 0 12px; font-size: clamp(34px, 5vw, 52px); }
.t-hero .lead { max-width: 760px; font-size: 18px; line-height: 28px; color: var(--text); margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }

/* index */
.t-index { display: grid; gap: 40px; }
.t-group h2 { padding: 0 0 12px; }
.t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.t-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); transition: border-color .15s; }
.t-card:hover { border-color: var(--accent); }
.t-card h3 { margin: 0; font: 700 20px/1.2 var(--font-display); color: var(--text-strong); }
.t-card p { margin: 0; font-size: 15px; line-height: 23px; }
.t-card__go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 14px; }
.t-note { padding: 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.t-note h2 { padding: 0 0 6px; font-size: 20px; }
.t-note p { margin: 0; font-size: 16px; }

/* tool panel */
.t-panel { background: var(--bg-code); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 8px 24px 20px; }
.t-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 -24px 20px; padding: 0 20px; overflow-x: auto; }
.t-tabs button { padding: 12px 14px; font-size: 15px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.t-tabs button[aria-selected="true"] { color: var(--text-strong); border-color: var(--accent); }
.t-urlrow { display: flex; gap: 8px; }
.t-urlrow input, .t-row input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text-strong); font: 16px var(--font-sans); }
.t-urlrow .btn { height: 48px; padding: 0 24px; font-size: 16px; box-shadow: var(--shadow-cta); }
.t-panel input:focus, .t-panel textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.t-pane > label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-strong); font-size: 15px; }
.t-pane textarea { width: 100%; min-height: 220px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: var(--text-strong); font: 13px/1.5 var(--font-mono); resize: vertical; }
.t-row { display: grid; gap: 6px; margin-top: 12px; }
.t-row input { height: 42px; font-size: 15px; }
.t-inline { font-size: 14px; color: var(--text-muted); }
.t-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.t-actions .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.t-hint { margin: 10px 0 0; font-size: 13px; line-height: 20px; color: var(--text-muted); }
.t-actions .t-hint { margin: 0; }
.t-drop { display: grid; place-items: center; gap: 6px; padding: 36px 16px; text-align: center; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); cursor: pointer; color: var(--text); }
.t-drop:hover, .t-drop.is-over { border-color: var(--accent); background: var(--bg-active); }
.t-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-drop:focus-within { border-color: var(--accent); }
.t-drop small { color: var(--text-muted); font-size: 13px; }
.t-status { margin: 12px 0 0; min-height: 24px; font-size: 15px; }
.t-status.is-err { color: var(--err); }
.t-status .spin { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: t-spin .8s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .t-status .spin { animation: none; } }

/* results */
.t-results { margin-top: 24px; display: grid; gap: 20px; scroll-margin-top: 80px; }
.r-card { scroll-margin-top: 80px; }
.r-card { background: var(--bg-code); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; min-width: 0; }
.r-card h2 { padding: 0 0 12px; font-size: 20px; line-height: 28px; }
.r-card h3 { margin: 18px 0 8px; font-size: 15px; color: var(--text-strong); }
.r-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.r-ring { position: relative; width: 150px; height: 150px; }
.r-ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.r-ring circle { fill: none; stroke-width: 12; }
.r-ring .bg { stroke: var(--bg-muted); }
.r-ring .fg { stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.r-ring__num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.r-ring__num b { display: block; font: 800 44px/1 var(--font-display); color: var(--text-strong); }
.r-ring__num small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.r-top h2 { padding: 0; margin: 0 0 4px; font-size: 22px; }
.r-top .r-url { font: 13px var(--font-mono); color: var(--text-muted); overflow-wrap: anywhere; margin: 0 0 14px; }
.r-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 20px; }
.r-bar { font-size: 13px; }
.r-bar div { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--text-strong); }
.r-bar i { display: block; height: 6px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.r-bar i b { display: block; height: 100%; border-radius: 3px; }
.c-ok { background: var(--ok); color: var(--ok); } .c-warn { background: var(--warn); color: var(--warn); } .c-err { background: var(--err); color: var(--err); }
.r-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.r-actions .btn { height: 34px; padding: 0 12px; font-size: 14px; }
.r-note { margin: 0 0 8px; font-size: 13px; line-height: 20px; color: var(--text-muted); }

.r-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.r-issues li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.r-issues b { display: block; color: var(--text-strong); font-size: 15px; }
.r-issues span { font-size: 14px; line-height: 21px; }
.pill { display: inline-block; min-width: 46px; text-align: center; padding: 1px 8px; border-radius: var(--radius-pill); font: 600 11px/20px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; height: 22px; }
.pill--fail { background: var(--err-soft); color: var(--err); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--pass { background: var(--ok-soft); color: var(--ok); }
.pill--info { background: var(--bg-muted); color: var(--text-muted); }
details.r-passed summary { cursor: pointer; font-weight: 500; color: var(--text-strong); padding: 6px 0; }

.r-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -8px -24px 16px; padding: 0 16px; overflow-x: auto; }
.r-tabs button { padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.r-tabs button[aria-selected="true"] { color: var(--text-strong); border-color: var(--accent); }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 14px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }
.kv dd small { display: block; color: var(--text-muted); }
.r-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.r-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.r-table th { text-align: left; font-weight: 500; color: var(--text-muted); padding: 8px 10px; background: var(--bg-subtle); border-bottom: 1px solid var(--border); white-space: nowrap; }
.r-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; color: var(--text-strong); }
.r-table tr:last-child td { border-bottom: 0; }
.r-table .mono { font-family: var(--font-mono); font-size: 12px; }
.r-table .muted { color: var(--text-muted); }
.r-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.r-stat { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.r-stat b { display: block; font: 700 20px/1.2 var(--font-display); color: var(--text-strong); }
.outline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.outline li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); color: var(--text-strong); }
.outline li i { flex: none; font: 600 11px/20px var(--font-mono); color: var(--accent); width: 26px; font-style: normal; }
.outline li.is-empty { color: var(--err); }
.social-card { max-width: 520px; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.social-card img { display: block; width: 100%; aspect-ratio: 1.91; object-fit: cover; background: var(--bg-muted); }
.social-card div { padding: 10px 14px; font-size: 13px; }
.social-card b { display: block; color: var(--text-strong); font-size: 15px; }
.r-fail { border-color: var(--warn); }
.r-fail h2 { color: var(--text-strong); }
.r-fail .btn { height: 38px; padding: 0 14px; }
.r-fail ul { margin: 8px 0 14px; padding-left: 20px; }

/* docs */
.t-docs { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; margin-top: 56px; align-items: start; }
.t-article section + section { margin-top: 8px; }
.t-article h2 { padding: 24px 0 8px; font-size: 26px; line-height: 34px; }
.t-article p, .t-article li { font-size: 17px; line-height: 28px; }
.t-article ul { padding-left: 22px; margin: 0 0 20px; }
.t-article li { margin-bottom: 6px; }
.t-article--solo { max-width: 780px; }
.t-faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.t-faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--text-strong); font-size: 17px; }
.t-faq details p { margin: 0 0 14px; }
.t-aside { display: grid; gap: 16px; position: sticky; top: 88px; }
.t-box { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-subtle); }
.t-box h2 { padding: 0 0 8px; font-size: 18px; line-height: 24px; }
.t-box p { font-size: 15px; line-height: 23px; margin: 0 0 14px; }
.t-box .btn { height: 40px; padding: 0 16px; }
.t-box--cta { background: var(--bg-active); border-color: var(--accent-border); }
.t-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-links a, .t-more { color: var(--accent); font-weight: 500; }
.t-code { padding: 14px 16px; background: var(--bg-muted); border-radius: var(--radius); font: 13px/1.6 var(--font-mono); color: var(--text-strong); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .t-docs { grid-template-columns: minmax(0, 1fr); }
  .t-aside { position: static; }
  .t-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .t-wrap { padding: 0 16px; }
  .t-nav { display: none; }
  .t-head__actions { margin-left: auto; }
  .t-head__actions .btn--outline { display: none; }
  .t-panel { padding: 8px 16px 16px; }
  .t-tabs { margin: 0 -16px 16px; padding: 0 8px; }
  .t-urlrow { flex-direction: column; }
  .t-urlrow .btn { width: 100%; justify-content: center; }
  .r-card { padding: 18px; }
  .r-tabs { margin: -4px -18px 14px; padding: 0 8px; }
  .r-top { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .t-foot__grid { grid-template-columns: minmax(0, 1fr); }
}
