/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
    --bg: #eef1f6;
    --surface: #ffffff;
    --surface-2: #f6f8fb;
    --ink: #18203a;
    --muted: #5d6680;
    --line: #d7dce6;
    --accent: #3346d3;
    --accent-ink: #ffffff;
    --accent-soft: #e4e8ff;
    --allow: #177a4e;
    --allow-soft: #e1f3ea;
    --deny: #b4322a;
    --deny-soft: #fbe6e3;
    --warn: #9a6200;
    --warn-soft: #fdf1d8;

    /* "Окно" с файлом всегда тёмное: это главный визуальный акцент */
    --code-bg: #141b33;
    --code-bar: #1c2442;
    --code-ink: #dfe4f3;
    --code-dim: #6c7699;
    --tok-key: #9fb0ff;
    --tok-allow: #6fdcaa;
    --tok-deny: #ff8f84;
    --tok-meta: #f3c969;
    --tok-comment: #6c7699;

    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --radius-lg: 18px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgb(24 32 58 / .06), 0 8px 24px -12px rgb(24 32 58 / .18);
    --container: 1200px;

    color-scheme: light;
}

:root:lang(ru) { --font-display: "Onest", "IBM Plex Sans", system-ui, sans-serif; }

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1222;
        --surface: #151b31;
        --surface-2: #1a213b;
        --ink: #e6e9f2;
        --muted: #98a1ba;
        --line: #283152;
        --accent: #8796ff;
        --accent-ink: #0d1222;
        --accent-soft: #232c55;
        --allow: #55cc94;
        --allow-soft: #15322a;
        --deny: #ff7e72;
        --deny-soft: #3a1d1f;
        --warn: #f0be5a;
        --warn-soft: #362a12;
        --code-bg: #0a0f1e;
        --code-bar: #121931;
        --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -14px rgb(0 0 0 / .6);
        color-scheme: dark;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 400 1rem/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }

code { font-family: var(--font-mono); font-size: .92em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 100;
    background: var(--accent); color: var(--accent-ink);
    padding: .5rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--muted); }

.section-title {
    font: 700 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1.2 var(--font-display);
    letter-spacing: -.01em;
    margin: 0 0 1.25rem;
}

/* ==========================================================================
   Buttons & inputs
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; min-height: 48px; padding: 0 1.4rem;
    border: 0; border-radius: var(--radius);
    font: 600 1rem/1 var(--font-body);
    cursor: pointer; text-decoration: none;
    transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

input[type="text"] {
    width: 100%; min-height: 46px; padding: 0 .9rem;
    background: var(--surface); color: var(--ink);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font: 400 1rem var(--font-body);
}
input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 20;
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex; align-items: center; gap: 1.25rem;
    min-height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; }
.brand__mark svg rect { fill: var(--accent); }
.brand__mark svg path { stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; fill: none; }
.brand__name { font: 800 1.15rem/1 var(--font-display); letter-spacing: -.02em; }

.header-search { display: flex; gap: .4rem; flex: 1; max-width: 420px; margin-left: auto; }
.header-search input { min-height: 38px; font-size: .95rem; }
.header-search button {
    min-height: 38px; padding: 0 .9rem; border: 0; border-radius: var(--radius-sm);
    background: var(--ink); color: var(--bg); font: 600 .9rem var(--font-body); cursor: pointer;
}

.site-nav { display: flex; gap: .25rem; margin-left: auto; }
.header-search + .site-nav { margin-left: 0; }
.site-nav a {
    padding: .45rem .75rem; border-radius: var(--radius-sm);
    color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }

.lang-switch {
    display: inline-flex; padding: 3px; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.lang-switch a {
    padding: .2rem .6rem; border-radius: 999px;
    font: 600 .8rem/1.4 var(--font-body); color: var(--muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--bg); }

@media (max-width: 720px) {
    .site-header__inner { flex-wrap: wrap; padding-block: .6rem; gap: .6rem 1rem; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; }
    .site-nav a:not([aria-current]) { display: none; }
}

/* ==========================================================================
   Main / Footer
   ========================================================================== */
.site-main { flex: 1; padding-bottom: 4rem; }

.flash { margin: 1.25rem 0 0; padding: .85rem 1rem; border-radius: var(--radius-sm); font-weight: 500; }
.flash--error { background: var(--deny-soft); color: var(--deny); }
.flash--warn { background: var(--warn-soft); color: var(--warn); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__inner {
    display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 2rem;
    align-items: start; padding-block: 2.5rem;
}
.site-footer__about p { margin: .6rem 0 0; color: var(--muted); max-width: 40ch; font-size: .95rem; }
.site-footer__links { display: flex; flex-direction: column; gap: .4rem; }
.site-footer__links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__copy { margin: 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 720px) {
    .site-footer__inner { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ==========================================================================
   Robots file window (shared)
   ========================================================================== */
.window {
    background: var(--code-bg);
    color: var(--code-ink);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.window__bar {
    display: flex; align-items: center; gap: .9rem;
    padding: .7rem 1rem; background: var(--code-bar);
}
.window__dots { display: inline-flex; gap: 6px; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a4468; }
.window__title { font: 500 .82rem var(--font-mono); color: var(--code-dim); }
.window__scroll { max-height: 70vh; overflow: auto; }

.rfile {
    list-style: none; margin: 0; padding: .9rem 0;
    font: 400 .9rem/1.75 var(--font-mono);
    counter-reset: none;
    overflow-x: auto;
}
.rfile__line {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, auto) 1fr;
    align-items: baseline;
    padding-right: 1.25rem;
    min-height: 1.75em;
}
.rfile__line:target { background: rgb(135 150 255 / .16); }
.rfile__n {
    padding-right: 1rem; text-align: right;
    color: var(--code-dim); text-decoration: none; user-select: none;
}
a.rfile__n:hover { color: var(--code-ink); }
.rfile__code { white-space: pre; font-size: 1em; }

.tok-key { color: var(--tok-key); }
.tok-sep { color: var(--code-dim); }
.rfile__line--allow .tok-key, .rfile__line--allow .tok-val { color: var(--tok-allow); }
.rfile__line--disallow .tok-key, .rfile__line--disallow .tok-val { color: var(--tok-deny); }
.rfile__line--meta .tok-key { color: var(--tok-meta); }
.rfile__line--agent .tok-val { color: #fff; font-weight: 500; }
.rfile__line--unknown .rfile__code { color: var(--code-dim); text-decoration: wavy underline rgb(255 143 132 / .5); }
.tok-comment { color: var(--tok-comment); font-style: italic; }

/* Пояснения на главной */
.rfile__note {
    margin-left: 1.25rem; padding-left: .9rem;
    border-left: 2px solid #2d3760;
    font: 400 .82rem/1.4 var(--font-body);
    color: #aab3d1;
}

/* ==========================================================================
   Home
   ========================================================================== */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4.5rem); }
.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.hero__title {
    margin: 0 0 1.1rem;
    font: 800 clamp(2.2rem, 1.4rem + 3.4vw, 3.9rem)/1.02 var(--font-display);
    letter-spacing: -.035em;
    max-width: 14ch;
    text-wrap: balance;
}
.hero__lead { margin: 0 0 2rem; font-size: 1.12rem; color: var(--muted); max-width: 46ch; }
.hero__examples { margin: 1rem 0 0; color: var(--muted); font-size: .95rem; }
.hero__file { margin: 0; }

/* Единственное «оркестрованное» движение: строки файла проявляются по очереди при загрузке */
@media (prefers-reduced-motion: no-preference) {
    .page-home .hero__file .rfile__line {
        opacity: 0; transform: translateX(-6px);
        animation: line-in .45s cubic-bezier(.2, .7, .2, 1) forwards;
    }
    .page-home .hero__file .rfile__line:nth-child(1) { animation-delay: .10s; }
    .page-home .hero__file .rfile__line:nth-child(2) { animation-delay: .17s; }
    .page-home .hero__file .rfile__line:nth-child(3) { animation-delay: .24s; }
    .page-home .hero__file .rfile__line:nth-child(4) { animation-delay: .31s; }
    .page-home .hero__file .rfile__line:nth-child(5) { animation-delay: .38s; }
    .page-home .hero__file .rfile__line:nth-child(6) { animation-delay: .45s; }
    .page-home .hero__file .rfile__line:nth-child(7) { animation-delay: .52s; }
    .page-home .hero__file .rfile__line:nth-child(8) { animation-delay: .59s; }
    .page-home .hero__file .rfile__line:nth-child(9) { animation-delay: .66s; }
    .page-home .hero__file .rfile__line:nth-child(10) { animation-delay: .73s; }
}
@keyframes line-in { to { opacity: 1; transform: none; } }

.domain-form { display: flex; gap: .6rem; max-width: 560px; }
.domain-form__field {
    flex: 1; display: flex; align-items: center; min-width: 0;
    background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
    padding-inline: .9rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.domain-form__field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.domain-form__field input {
    border: 0; box-shadow: none !important; min-height: 54px; padding: 0 .2rem;
    font: 500 1.08rem var(--font-mono); background: transparent; min-width: 0;
}
.domain-form__prefix, .domain-form__suffix { font: 400 .95rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.domain-form .btn { min-height: 57px; }

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__title { max-width: 18ch; }
}
@media (max-width: 560px) {
    .domain-form { flex-direction: column; }
    .domain-form__suffix { display: none; }
    .rfile__note { display: none; }
}

.features { padding-top: 1rem; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature {
    padding: 1.6rem; background: var(--surface);
    border-radius: var(--radius-lg); border: 1px solid var(--line);
}
.feature h3 { margin: 1rem 0 .4rem; font: 700 1.15rem/1.3 var(--font-display); }
.feature p { margin: 0; color: var(--muted); }
.feature__icon {
    width: 44px; height: 44px; border-radius: var(--radius);
    display: grid; place-items: center;
}
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature__icon--agent { background: var(--accent-soft); color: var(--accent); }
.feature__icon--check { background: var(--allow-soft); color: var(--allow); }
.feature__icon--map { background: var(--warn-soft); color: var(--warn); }

@media (max-width: 900px) { .features__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Open-source library (home card + domain page note)
   ========================================================================== */
.library {
    margin-top: 3rem; padding: 2rem;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; align-items: center;
    background:
        radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
        var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.library__eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; margin: 0;
    padding: .3rem .7rem; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
    font: 600 .8rem/1 var(--font-body); letter-spacing: .03em; text-transform: uppercase;
}
.library__eyebrow svg, .library-note svg, .btn__icon {
    width: 16px; height: 16px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.library__title {
    margin: .9rem 0 .6rem;
    font: 700 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1.25 var(--font-display); letter-spacing: -.01em;
}
.library__title code { font: 500 .85em var(--font-mono); color: var(--accent); overflow-wrap: anywhere; }
.library__text { margin: 0 0 1rem; color: var(--muted); max-width: 52ch; }
.library__points { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .45rem; }
.library__points li { position: relative; padding-left: 1.6rem; }
.library__points li::before {
    content: ""; position: absolute; left: 0; top: .2em;
    width: 1.05rem; height: 1.05rem; border-radius: 50%;
    background: var(--allow-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23177a4e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.library__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.library__demo { margin: 0; }
.library__code {
    margin: 0; padding: 1rem 1.2rem; overflow-x: auto;
    font: 400 .85rem/1.75 var(--font-mono); color: var(--code-ink);
}
.tok-str { color: var(--tok-allow); }

.library-note {
    margin: 1rem 0 0; padding: .8rem 1rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem;
    border: 1px dashed var(--line); border-radius: var(--radius);
    color: var(--muted); font-size: .92rem;
}
.library-note svg { color: var(--accent); }
.library-note a { color: var(--accent); }
.library-note code { font: 500 .9em var(--font-mono); }
.library-note__cta { margin-left: auto; font-weight: 600; text-decoration: none; white-space: nowrap; }
.library-note__cta:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .library { grid-template-columns: 1fr; padding: 1.4rem; }
}
@media (max-width: 560px) {
    .library__actions .btn { flex: 1 1 auto; }
    .library-note__cta { margin-left: 0; }
    .library-note svg { display: none; }
}

/* ==========================================================================
   Domain page
   ========================================================================== */
.domain-head { padding-block: clamp(2rem, 4vw, 3.25rem) 2.5rem; }
.domain-head__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}
.domain-head__title {
    margin: 0;
    font: 800 clamp(2rem, 1.3rem + 3vw, 3.4rem)/1.05 var(--font-display);
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}
.domain-head__file { color: var(--muted); font-weight: 500; }
.domain-head__punycode { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.domain-head__punycode code { font-size: .95em; }
.domain-head__url { margin: .5rem 0 1.5rem; font: 400 .92rem var(--font-mono); overflow-wrap: anywhere; }
.domain-head__url a { color: var(--muted); }
.domain-head__summary {
    margin: 1.5rem 0 0; max-width: 62ch;
    font-size: 1.05rem; line-height: 1.7; color: var(--ink);
}

/* Site screenshot in a browser frame */
/* Thumbnails are 320x240: keep them close to native size so they stay sharp. */
.shot {
    margin: 0;
    width: min(100%, 384px);
    transform: rotate(1.2deg);
    transition: transform .25s ease;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.shot__bar {
    display: flex; align-items: center; gap: .8rem;
    padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.shot__bar .window__dots i { background: var(--line); }
.shot__url {
    flex: 1; min-width: 0; padding: .15rem .7rem;
    background: var(--surface); border-radius: 999px;
    font: 400 .8rem var(--font-mono); color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shot:hover { transform: rotate(0); }

/* Fixed width, not min(100%, …): the grid column is auto-sized and long text would otherwise stretch it. */
.domain-head__aside { width: 384px; max-width: 100%; display: grid; gap: 1rem; }
.domain-head__aside .shot { width: 100%; }

/* Home page title / description under the screenshot */
.site-meta {
    padding: .9rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
    overflow-wrap: anywhere;
}
.site-meta--appear { animation: site-meta-in .35s ease-out; }
@keyframes site-meta-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .site-meta--appear { animation: none; } }
.site-meta__title { margin: 0; font: 600 1rem/1.4 var(--font-body); color: var(--ink); }
.site-meta__desc { margin: .35rem 0 0; font-size: .92rem; line-height: 1.55; color: var(--muted); }
/* Clamping only kicks in with JS (the controller adds .is-clamped), so without JS the full text is visible. */
.site-meta.is-clamped:not(.is-expanded) :is(.site-meta__title, .site-meta__desc) {
    display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.site-meta.is-clamped:not(.is-expanded) .site-meta__title { -webkit-line-clamp: 2; line-clamp: 2; }
.site-meta.is-clamped:not(.is-expanded) .site-meta__desc { -webkit-line-clamp: 3; line-clamp: 3; }
.site-meta__foot {
    margin-top: .5rem;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.site-meta__updated { font-size: .75rem; color: var(--muted); opacity: .75; }
.site-meta__more {
    margin-left: auto; padding: .35rem 0; min-height: 32px;
    border: 0; background: none; cursor: pointer;
    font: 600 .85rem var(--font-body); color: var(--accent);
}
.site-meta__more:hover { text-decoration: underline; }
.site-meta__more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.shot__frame { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.shot__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

@media (max-width: 900px) {
    .domain-head__grid { grid-template-columns: minmax(0, 1fr); }
    .shot { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .shot, .shot:hover { transform: none; transition: none; }
}

.facts { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.fact {
    padding: .7rem 1rem; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius);
    min-width: 120px;
}
.fact dt { font-size: .8rem; color: var(--muted); }
.fact dd { margin: .15rem 0 0; font: 600 1.05rem var(--font-body); }

.status { display: inline-block; padding: .05rem .5rem; border-radius: 6px; font-family: var(--font-mono); font-size: .95rem; }
.status--ok { background: var(--allow-soft); color: var(--allow); }
.status--warn { background: var(--warn-soft); color: var(--warn); }
.status--bad { background: var(--deny-soft); color: var(--deny); }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}
.layout__main { display: grid; gap: 2.5rem; min-width: 0; }
.layout__aside { display: grid; gap: 1rem; position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); }

@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .layout__aside { position: static; }
}

.panel {
    padding: 1.4rem; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.panel p { margin: 0; overflow-wrap: anywhere; }
.panel__title { margin: 0 0 .8rem; font: 700 1.05rem/1.3 var(--font-display); }
.panel--warn { background: var(--warn-soft); border-color: transparent; }

/* Grid children default to min-width: auto, so one long token could widen the whole column. */
.layout__aside > * { min-width: 0; }
.link-list, .plain-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.link-list a, .plain-list li { font-size: .9rem; overflow-wrap: anywhere; }

/* URL check */
.url-check { padding: 1.6rem; }
.url-check__form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.input-group { display: grid; gap: .35rem; min-width: 160px; }
.input-group--grow { flex: 1 1 280px; }
.input-group label { font-size: .85rem; font-weight: 500; color: var(--muted); }
.input-group input { font-family: var(--font-mono); font-size: .95rem; }
.url-check__form .btn { min-height: 46px; }

.verdict {
    display: flex; gap: 1rem; align-items: center;
    margin-top: 1.25rem; padding: 1rem 1.2rem;
    border-radius: var(--radius);
    animation: verdict-in .3s ease;
}
.verdict p { margin: 0; display: grid; gap: .1rem; }
.verdict strong { font: 700 1.2rem/1.2 var(--font-display); }
.verdict span { overflow-wrap: anywhere; }
.verdict__icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.verdict--allow { background: var(--allow-soft); color: var(--allow); }
.verdict--allow .verdict__icon { background: var(--allow); }
.verdict--deny { background: var(--deny-soft); color: var(--deny); }
.verdict--deny .verdict__icon { background: var(--deny); }
.verdict code { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .verdict { animation: none; } }
@keyframes verdict-in { from { opacity: 0; transform: translateY(4px); } }

/* Groups */
.group {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
}
.group + .group { margin-top: 1rem; }
.group__head {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.group__agents { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; font: inherit; }
.agent {
    padding: .25rem .65rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line);
    font: 500 .88rem var(--font-mono);
}
.agent--all { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.group__counts { margin: 0; display: flex; gap: .9rem; font-size: .85rem; }
.count--allow { color: var(--allow); }
.count--deny { color: var(--deny); }
.group__empty { margin: 0; padding: 1rem 1.25rem; color: var(--muted); }

.rules { list-style: none; margin: 0; padding: .4rem 0; max-height: 520px; overflow-y: auto; }
.rule {
    display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); align-items: baseline; gap: .75rem;
    padding: .4rem 1.25rem;
}
.rule:hover { background: var(--surface-2); }
.rule__type { font: 600 .78rem/1.8 var(--font-body); padding: 0 .5rem; border-radius: 6px; justify-self: start; }
.rule--allow .rule__type { background: var(--allow-soft); color: var(--allow); }
.rule--disallow .rule__type { background: var(--deny-soft); color: var(--deny); }
.rule__path { overflow-wrap: anywhere; }

.group__params {
    display: grid; gap: .75rem; margin: 0;
    padding: .9rem 1.25rem; border-top: 1px solid var(--line); font-size: .9rem;
}
.group__param {
    display: grid; grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: .35rem .75rem; align-items: baseline;
}
.group__param dt { color: var(--muted); }
.group__param dd {
    margin: 0; min-width: 0;
    display: flex; flex-wrap: wrap; gap: .35rem;
    max-height: 14rem; overflow-y: auto; /* very long Clean-param lists scroll instead of stretching the page */
}
.group__param code {
    min-width: 0; max-width: 100%;
    padding: .1rem .45rem; border-radius: 6px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: .85rem; line-height: 1.5;
    overflow-wrap: anywhere; white-space: normal;
}
@media (max-width: 560px) {
    .group__param { grid-template-columns: minmax(0, 1fr); }
}

/* Notice (404 / errors) */
.notice {
    max-width: 680px; padding: 2rem; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--line);
    border-left: 6px solid var(--warn);
}
.notice--bad { border-left-color: var(--deny); }
.notice h2 { margin: 0 0 .5rem; font: 700 1.5rem/1.2 var(--font-display); }
.notice p { margin: 0 0 1.25rem; color: var(--muted); }
.notice__detail { font: .85rem var(--font-mono); overflow-wrap: anywhere; }

/* Source */
.source { margin-top: 3rem; }
.source__details summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; }
.source__details summary::-webkit-details-marker { display: none; }
.source__details summary::after {
    content: ""; width: .6rem; height: .6rem; margin-bottom: 1.25rem;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s ease;
}
.source__details:not([open]) summary::after { transform: rotate(-45deg); }

.panel__hint { margin: -.4rem 0 .8rem !important; font-size: .85rem; color: var(--muted); }

/* Recently checked */
.recent { margin-top: 3rem; }
.recent__list {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem;
}
.recent__item {
    display: flex; align-items: center; gap: .6rem; min-width: 0;
    padding: .55rem .75rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--ink); text-decoration: none; font: 500 .92rem/1.3 var(--font-mono);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: border-color .15s ease, transform .15s ease;
}
.recent__item:hover { border-color: var(--accent); transform: translateY(-1px); }
.recent__letter {
    flex: none; width: 28px; height: 28px; border-radius: 8px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent);
    font: 800 .9rem/1 var(--font-display);
}
@media (prefers-reduced-motion: reduce) { .recent__item:hover { transform: none; } }

/* "Showing N of M" under a cut list */
.limit-note {
    margin: .75rem 0 0; padding: .55rem .8rem;
    border-left: 3px solid var(--warn); border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--surface-2); color: var(--muted); font-size: .88rem;
}
.limit-note a { color: var(--ink); margin-left: .25rem; }
.agent--more { background: transparent; color: var(--muted); }

/* Section lead */
.section-lead { margin: -.75rem 0 1.25rem; color: var(--muted); max-width: 62ch; }

/* Crawler access */
.crawlers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.crawler {
    display: grid; gap: .15rem;
    padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    border-top: 4px solid var(--allow);
    color: var(--ink); text-decoration: none;
    transition: border-color .15s ease;
}
.crawler:hover { border-color: var(--ink); }
.crawler--partial { border-top-color: var(--warn); }
.crawler--blocked { border-top-color: var(--deny); }
.crawler__name { font: 700 1.05rem/1.3 var(--font-display); }
.crawler__type { font-size: .8rem; color: var(--muted); }
.crawler__status { margin-top: .5rem; font-weight: 600; font-size: .92rem; color: var(--allow); }
.crawler--partial .crawler__status { color: var(--warn); }
.crawler--blocked .crawler__status { color: var(--deny); }
.crawler__group { font: 400 .78rem var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }

/* FAQ */
.faq { margin-top: 3rem; max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1rem 0; font: 600 1.05rem/1.4 var(--font-body);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: ""; flex: none; width: .55rem; height: .55rem;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg); }
.faq__item p { margin: 0 0 1.1rem; color: var(--muted); max-width: 70ch; overflow-wrap: anywhere; }
