/* ==========================================================================
   TU Web Tools - main stylesheet
   Brand rebuild of the WordPress/Elementor design in plain CSS.
   ========================================================================== */

:root {
    --brand:        #12a0ea;
    --brand-dark:   #0b7fc4;
    --brand-soft:   #e7f4fd;
    --action:       #1b6fd8;
    --action-dark:  #1558ad;
    --navy:         #07203f;
    --navy-soft:    #0d2e56;
    --ink:          #12263f;
    --body:         #4a5b6e;
    --muted:        #7a8a9c;
    --surface:      #f2f8fd;
    --surface-2:    #ffffff;
    --line:         #dfe9f3;
    --success:      #14a37f;
    --danger:       #d64545;
    --warning:      #e0a03a;

    --cat-text:      #2f80ed;
    --cat-developer: #e17055;
    --cat-seo:       #00b894;
    --cat-utility:   #6c5ce7;

    --radius:    12px;
    --radius-lg: 18px;
    --shadow:    0 4px 18px rgba(16, 47, 84, .07);
    --shadow-lg: 0 14px 40px rgba(16, 47, 84, .12);

    --font-head: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --wrap: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--body);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.85rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1rem + .7vw, 1.5rem); }
h4 { font-size: 1.12rem; }

p { margin: 0 0 1rem; }

a { color: var(--action); text-decoration: none; }
a:hover { color: var(--action-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: var(--brand); color: #fff; }

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

/* --- Layout helpers ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; }
.section { padding: 68px 0; }
.section-sm { padding: 44px 0; }
.section-tint { background: var(--surface); }
.section-brand-tint { background: linear-gradient(180deg, #eaf5fe 0%, #f7fbff 100%); }

.eyebrow {
    display: block;
    color: var(--brand);
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
    margin-bottom: .5rem;
}

.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-head p { color: var(--body); margin: 0; }
.lead { font-size: 1.06rem; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 1.2rem; }
.mb-3 { margin-bottom: 1.2rem; }
.mt-4 { margin-top: 2rem; }
.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;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: .95rem;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-dark); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--action); border-color: var(--action); }
.btn-outline:hover { background: var(--action); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--action); }
.btn-light:hover { background: #f0f6ff; color: var(--action-dark); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 15px 32px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Header -------------------------------------------------------------- */
.site-header {
    background: var(--brand);
    position: sticky;
    top: 0;
    z-index: 60;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 74px;
}
.brand-logo { display: flex; align-items: center; }
.brand-logo img { height: 46px; width: auto; }
.brand-logo:hover { text-decoration: none; }

.main-nav { margin-left: auto; }
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: #fff;
    font-family: var(--font-head);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.is-active {
    text-decoration: none;
    border-bottom-color: #fff;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    line-height: 0;
}
.header-cta {
    border: 1px solid rgba(255, 255, 255, .85);
    color: #fff;
    border-radius: 6px;
    padding: 10px 20px;
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.header-cta:hover { background: #fff; color: var(--brand); text-decoration: none; }

.nav-toggle { display: none; }

/* header search drawer */
.header-search {
    display: none;
    background: #fff;
    border-top: 1px solid rgba(255, 255, 255, .3);
    padding: 16px 0;
}
.header-search.is-open { display: block; }
.header-search form { display: flex; gap: 10px; }
.header-search input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 16px;
    font: inherit;
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
    background: linear-gradient(180deg, #eaf4fd 0%, #f7fbff 100%);
    padding: 64px 0 56px;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 48px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: var(--action);
    color: #fff;
    font-family: var(--font-head);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.hero h1 { margin-bottom: 16px; }
.hero p { max-width: 56ch; }

.hero-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    position: relative;
}
.hero-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow);
}
.hero-card .ic { font-size: 1.4rem; line-height: 1; margin-bottom: 10px; }
.hero-card h3 { font-size: .98rem; margin-bottom: 4px; }
.hero-card p { font-size: .84rem; margin: 0; color: var(--muted); }
.hero-card-logo {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 8px 0;
}
.hero-card-logo img { max-width: 210px; opacity: .95; }

/* --- Stat strip ---------------------------------------------------------- */
.stat-strip {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 26px 20px;
    margin-top: -34px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.stat {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 0 12px;
    border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat .ic { color: var(--brand); font-size: 1.5rem; line-height: 1; }
.stat strong { display: block; font-family: var(--font-head); color: var(--ink); font-size: 1.05rem; }
.stat span { font-size: .85rem; color: var(--muted); }

/* --- Cards --------------------------------------------------------------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tool-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow);
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
}
.tool-icon {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .82rem;
    background: var(--brand);
}
.tool-card h3 { font-size: 1rem; margin: 0 0 4px; }
.tool-card p { font-size: .85rem; margin: 0; color: var(--muted); line-height: 1.5; }

.feature-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    height: 100%;
}
.feature-card .ic {
    width: 52px; height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
}
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { font-size: .88rem; margin: 0; }

/* --- Check list ---------------------------------------------------------- */
.check-list { list-style: none; margin: 0 0 20px; padding: 0; }
.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    color: var(--ink);
    font-size: .95rem;
}
.check-list li::before {
    content: "";
    position: absolute;
    left: 0; top: .35em;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* --- Dark category panel ------------------------------------------------- */
.cat-panel {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 38px 34px;
    color: #cfe0f2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.cat-panel h3 {
    color: #fff;
    font-size: 1.12rem;
    border-bottom: 2px solid rgba(255, 255, 255, .35);
    padding-bottom: 8px;
    display: inline-block;
}
.cat-panel .cat-note { color: #fff; font-weight: 500; font-size: .92rem; margin-bottom: 14px; }
.cat-panel ul { list-style: none; margin: 0; padding: 0; }
.cat-panel li { margin-bottom: 8px; font-size: .9rem; }
.cat-panel a { color: #cfe0f2; }
.cat-panel a:hover { color: #fff; }

/* --- Accordion ----------------------------------------------------------- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.accordion + .accordion { margin-top: 14px; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; }
.acc-trigger {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 16px 44px 16px 18px;
    font-family: var(--font-head);
    font-size: .95rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    position: relative;
}
.acc-trigger::after {
    content: "";
    position: absolute;
    right: 18px; top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
}
.acc-trigger[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
.acc-panel { padding: 0 18px 18px; font-size: .92rem; }
.acc-panel[hidden] { display: none; }
.acc-panel p:last-child { margin-bottom: 0; }
.acc-panel ul { margin: 0 0 0 18px; padding: 0; }

/* --- Tabs ---------------------------------------------------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 26px;
}
.tab {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 16px;
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--body);
    cursor: pointer;
    text-decoration: none;
}
.tab:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.tab.is-active { background: var(--action); border-color: var(--action); color: #fff; }

/* --- Post cards ---------------------------------------------------------- */
.post-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-thumb { aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.post-body h3 a { color: var(--action); }
.post-meta { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.post-meta a { color: var(--muted); }
.post-body p { font-size: .88rem; color: var(--body); }
.post-more { margin-top: auto; font-size: .85rem; font-weight: 500; }

/* --- Newsletter ---------------------------------------------------------- */
.newsletter-form input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-radius: 6px;
    padding: 11px 14px;
    margin-bottom: 10px;
    font: inherit;
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, .75); }
.newsletter-form button {
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .6);
    color: #fff;
    font-family: var(--font-head);
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .78rem;
    padding: 11px 22px;
    border-radius: 6px;
    cursor: pointer;
}
.newsletter-form button:hover { background: #fff; color: var(--brand); }
.form-note { font-size: .82rem; margin-top: 8px; min-height: 1.2em; }
.form-note.is-error { color: #ffd7d7; }
.form-note.is-success { color: #d8ffe9; }

/* --- CTA band ------------------------------------------------------------ */
.cta-band {
    background: linear-gradient(135deg, #d9edfd 0%, #eff7fe 100%);
    border-radius: var(--radius-lg);
    padding: 54px 32px;
    text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); }
.cta-note { font-size: .88rem; color: var(--body); margin-top: 18px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
    background: var(--brand);
    color: #eaf5ff;
    padding: 54px 0 0;
    font-size: .88rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.3fr;
    gap: 28px;
}
.site-footer h4 {
    color: #fff;
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #eaf5ff; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-contact { margin-top: 16px; font-size: .84rem; color: #dcefff; }
.footer-sep { border-top: 1px solid rgba(255, 255, 255, .25); margin-top: 34px; }
.footer-bottom { padding: 18px 0 26px; text-align: center; font-size: .84rem; }
.footer-bottom p { margin: 4px 0; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.social-row a {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

/* Each network in its own brand colour. */
.social-row a.social-fb { background: #1877F2; }
.social-row a.social-x  { background: #000000; }
.social-row a.social-yt { background: #FF0000; }
.social-row a.social-tg { background: #26A5E4; }
.social-row a.social-ig {
    background: radial-gradient(circle at 30% 107%,
        #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-row a:hover,
.social-row a:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
}

/* The X tile is black, so give it a rim to stay visible on the dark footer. */
.social-row a.social-x { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.social-row a.social-x:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 6px 14px rgba(0, 0, 0, .3); }

@media (prefers-reduced-motion: reduce) {
    .social-row a { transition: none; }
    .social-row a:hover, .social-row a:focus-visible { transform: none; }
}

/* --- Breadcrumbs --------------------------------------------------------- */
.breadcrumbs {
    font-size: .82rem;
    color: var(--muted);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li::after { content: "/"; margin-left: 6px; color: var(--line); }
.breadcrumbs li:last-child::after { content: ""; }

/* --- Page banner --------------------------------------------------------- */
.page-banner {
    background: var(--navy);
    color: #d6e6f7;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    margin: 32px 0;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 32px;
    align-items: center;
}
.page-banner h1 { color: #6cc4ff; margin-bottom: 12px; }
.page-banner .kicker { color: #fff; font-family: var(--font-head); margin-bottom: 4px; }
.page-banner p { margin: 0; text-align: justify; }

.badge-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #dbeeff;
    border-radius: var(--radius);
    padding: 14px 18px;
    justify-content: space-between;
}
.badge-strip span {
    font-family: var(--font-head);
    color: var(--ink);
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- Article ------------------------------------------------------------- */
.article { max-width: 780px; }
.article-hero { margin: 0 0 26px; border-radius: var(--radius-lg); overflow: hidden; }
.article-content { font-size: 1.02rem; color: #3d4f63; }
.article-content h2 { margin-top: 2em; font-size: 1.5rem; }
.article-content h3 { margin-top: 1.6em; font-size: 1.2rem; }
.article-content ul, .article-content ol { padding-left: 1.3rem; }
.article-content li { margin-bottom: .5rem; }
.article-content img { border-radius: var(--radius); margin: 1.4rem 0; }
.article-content blockquote {
    margin: 1.5rem 0;
    padding: 14px 20px;
    border-left: 4px solid var(--brand);
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.article-content table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.article-content th { background: var(--surface); }
.article-content code {
    font-family: var(--font-mono);
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
}
.article-content pre {
    background: var(--navy);
    color: #d7e9ff;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
}
.article-content pre code { background: none; color: inherit; padding: 0; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.sidebar { position: sticky; top: 96px; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.widget h3 { font-size: 1rem; margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 10px; font-size: .9rem; }

/* --- Forms --------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-family: var(--font-head);
    font-size: .85rem;
    color: var(--ink);
    margin-bottom: 6px;
    font-weight: 500;
}
.field input[type="text"], .field input[type="email"], .field input[type="url"],
.field input[type="password"], .field input[type="number"], .field select, .field textarea,
.input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 14px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--brand);
    outline: 2px solid rgba(18, 160, 234, .18);
    outline-offset: 0;
}
.field-error { color: var(--danger); font-size: .82rem; margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

.alert {
    border-radius: 8px;
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: .92rem;
    border: 1px solid transparent;
}
.alert-success { background: #e6f8f2; border-color: #b7ead9; color: #0e6b52; }
.alert-error { background: #fdecec; border-color: #f6c9c9; color: #a12c2c; }
.alert-info { background: var(--brand-soft); border-color: #bfe2f8; color: #0b5f8f; }

/* --- Tool page ----------------------------------------------------------- */
.tool-hero {
    background: linear-gradient(180deg, #eaf4fd 0%, #f8fcff 100%);
    padding: 40px 0 34px;
    border-bottom: 1px solid var(--line);
}
.tool-hero h1 { margin-bottom: 10px; }
.tool-hero .tool-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pill {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: .8rem;
    color: var(--body);
}

.tool-app {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin: -28px 0 0;
    position: relative;
    z-index: 2;
}
.tool-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pane label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-head);
    font-size: .85rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}
.pane textarea {
    width: 100%;
    min-height: 260px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    font: inherit;
    font-size: .92rem;
    resize: vertical;
    background: #fff;
    color: var(--ink);
}
.pane textarea.mono { font-family: var(--font-mono); font-size: .85rem; }
.pane textarea:focus { border-color: var(--brand); outline: 2px solid rgba(18, 160, 234, .18); }
.pane textarea[readonly] { background: #f9fcff; }

.tool-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin: 20px 0;
}
.tool-options .opt label {
    display: block;
    font-family: var(--font-head);
    font-size: .8rem;
    color: var(--ink);
    margin-bottom: 5px;
    font-weight: 500;
}
.tool-options select, .tool-options input[type="text"], .tool-options input[type="number"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 11px;
    font: inherit;
    font-size: .88rem;
    background: #fff;
}
.opt-check { display: flex; align-items: center; gap: 8px; padding-top: 20px; }
.opt-check input { width: 17px; height: 17px; accent-color: var(--brand); }
.opt-check label { margin: 0 !important; font-weight: 400 !important; font-size: .86rem !important; }
.opt-range input[type="range"] { width: 100%; accent-color: var(--brand); }
.opt-range output { font-family: var(--font-mono); color: var(--action); font-weight: 600; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool-actions .spacer { flex: 1; }
.tool-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: .85rem;
    color: var(--muted);
}
.tool-stats b { color: var(--ink); font-family: var(--font-head); }
.tool-message { margin-top: 14px; font-size: .9rem; }
.tool-message.is-error { color: var(--danger); }
.tool-message.is-success { color: var(--success); }

.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.step .num {
    font-family: var(--font-head);
    color: var(--ink);
    font-weight: 600;
    font-size: .95rem;
}
.step p { margin: 0; font-size: .84rem; }
.step .arrow {
    flex: 0 0 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
}

.use-cases { columns: 2; column-gap: 40px; list-style: none; padding: 0; margin: 0; }
.use-cases li {
    padding-left: 22px;
    position: relative;
    margin-bottom: 10px;
    break-inside: avoid;
}
.use-cases li::before {
    content: "";
    position: absolute;
    left: 4px; top: .6em;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

/* result tables used by meta checker / url decoder */
.result-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: 8px; }
.result-table th, .result-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.result-table th { background: var(--surface); width: 190px; font-family: var(--font-head); font-weight: 500; color: var(--ink); }
.result-table td { word-break: break-word; }
.tag-ok, .tag-warn, .tag-bad {
    display: inline-block;
    font-size: .72rem;
    padding: 2px 9px;
    border-radius: 100px;
    font-family: var(--font-head);
    margin-left: 6px;
}
.tag-ok { background: #e3f7f0; color: #0e6b52; }
.tag-warn { background: #fdf3e3; color: #8a6116; }
.tag-bad { background: #fdecec; color: #a12c2c; }

.strength-meter { height: 10px; border-radius: 100px; background: var(--line); overflow: hidden; margin: 14px 0 8px; }
.strength-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s ease, background-color .25s ease; }

.drop-zone {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    padding: 34px 20px;
    text-align: center;
    background: var(--surface);
    cursor: pointer;
}
.drop-zone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.qr-preview { max-width: 260px; margin: 18px auto 0; border-radius: var(--radius); }
#qr-video { width: 100%; max-width: 420px; border-radius: var(--radius); margin: 0 auto; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.stat-card b { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--action); line-height: 1.2; }
.stat-card span { font-size: .8rem; color: var(--muted); }

/* --- Pagination ---------------------------------------------------------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-family: var(--font-head);
    font-size: .88rem;
    color: var(--body);
    background: #fff;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination .is-current { background: var(--action); border-color: var(--action); color: #fff; }
.pagination .gap { border: 0; background: none; }

/* --- Misc ---------------------------------------------------------------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.copy-btn { font-size: .78rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.link-list { list-style: none; margin: 0; padding: 0; columns: 2; }
.link-list li { margin-bottom: 8px; break-inside: avoid; }

.skip-link {
    position: absolute;
    left: -9999px;
    background: #fff;
    color: var(--ink);
    padding: 10px 16px;
    z-index: 200;
}
.skip-link:focus { left: 16px; top: 10px; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .grid-5, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-panel { grid-template-columns: repeat(2, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .stat { border-right: 0; }
    .step-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 880px) {
    .nav-toggle {
        display: inline-flex;
        background: none;
        border: 0;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        margin-left: auto;
        padding: 4px 8px;
        line-height: 1;
    }
    .main-nav {
        display: none;
        position: absolute;
        left: 0; right: 0;
        top: 100%;
        background: var(--brand-dark);
        padding: 12px 20px 20px;
        margin: 0;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
    .main-nav li { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .18); }
    .main-nav a { display: block; padding: 12px 0; border: 0; }
    .site-header { position: relative; }
    .header-inner { position: relative; flex-wrap: wrap; }
    .header-cta { display: none; }
    .hero-grid, .two-col, .page-banner, .tool-panes, .field-row { grid-template-columns: 1fr; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .use-cases, .link-list { columns: 1; }
    .section { padding: 46px 0; }
}

@media (max-width: 620px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .grid-5, .cat-panel, .step-grid, .stat-strip { grid-template-columns: 1fr; }
    .hero-cards { grid-template-columns: 1fr; }
    .tool-app { padding: 16px; }
    .cta-band { padding: 36px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
    .site-header, .site-footer, .tool-app, .pagination, .breadcrumbs { display: none !important; }
    body { color: #000; }
}

/* ---------------------------------------------------------------- author box */

.author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: 34px;
    padding: 22px;
    background: var(--tint, #f2f8fd);
    border: 1px solid var(--line, #dfe7ee);
    border-radius: 12px;
}

.author-box img { flex: 0 0 auto; border-radius: 10px; }
.author-box p { margin: 0 0 6px; }
.author-name { font-weight: 600; color: var(--ink, #16202b); }
.author-bio { font-size: .92rem; }
.author-links { font-size: .88rem; }

@media (max-width: 560px) {
    .author-box { flex-direction: column; gap: 12px; }
}
