/* CrawlKit - site styles. Colours, spacing and layout follow the original single-page design. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
a {
    color: inherit;
    text-decoration: none;
}
[hidden] {
    display: none !important;
}
:focus-visible {
    outline: 3px solid #64ffda;
    outline-offset: 2px;
}
code {
    font-family: 'Courier New', Courier, monospace;
    background: #eef1f7;
    color: #1a237e;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #1a237e;
    color: #fff;
    padding: 10px 15px;
    z-index: 2000;
    border-radius: 0 0 6px 0;
}
.skip-link:focus {
    left: 0;
}

/* Header & navigation */
header {
    background: #1a237e;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
}
.logo a {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s;
}
.logo a:hover {
    color: #64ffda;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background: transparent;
    border: none;
}
.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}
#nav-bar ul {
    display: flex;
    list-style: none;
}
#nav-bar ul li {
    margin-left: 20px;
}
#nav-bar ul li a {
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}
#nav-bar ul li a:hover,
#nav-bar ul li a.active {
    color: #64ffda;
    background: rgba(255,255,255,0.1);
}

/* Main container */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
    animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}
.breadcrumb a {
    color: #1a237e;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* Generator widget */
.generator-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}
.generator-box h1 {
    color: #1a237e;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}
.generator-box .lead {
    color: #555;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}
.form-group select,
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="search"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
    transition: border 0.3s;
}
.form-group select:focus,
.form-group textarea:focus,
.form-group input:focus {
    border-color: #1a237e;
    outline: none;
}
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
}
.btn-primary {
    background: #1a237e;
    color: #fff;
}
.btn-primary:hover {
    background: #0d1b60;
}
.btn-secondary {
    background: #00c853;
    color: #fff;
}
.btn-secondary:hover {
    background: #00b248;
}
.btn-outline {
    background: #fff;
    color: #1a237e;
    border: 2px solid #1a237e;
    padding: 10px 23px;
}
.btn-outline:hover {
    background: #eef1f7;
}
.output-box {
    margin-top: 25px;
}
.output-box label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}
.output-box textarea {
    width: 100%;
    height: 180px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    background: #263238;
    color: #eceff1;
    border-radius: 6px;
    resize: vertical;
    border: none;
    font-size: 14px;
}
.tool-note {
    font-size: 14px;
    color: #777;
    margin-top: 15px;
}

/* Article & static pages */
.article-section,
.static-page {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: justify;
    margin-bottom: 30px;
}
.article-section h2,
.static-page h1 {
    color: #1a237e;
    font-size: 32px;
    margin-bottom: 20px;
    border-bottom: 3px solid #1a237e;
    padding-bottom: 10px;
    text-align: left;
}
.article-section h3,
.static-page h2 {
    color: #283593;
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}
.article-section p,
.static-page p {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}
.article-section ul,
.article-section ol,
.static-page ul,
.static-page ol {
    margin-left: 25px;
    margin-bottom: 20px;
}
.article-section li,
.static-page li {
    margin-bottom: 8px;
    color: #555;
    font-size: 15px;
}
.article-section a,
.static-page a {
    color: #1a237e;
    text-decoration: underline;
}
.article-section a:hover,
.static-page a:hover {
    color: #0d1b60;
}
.static-page a.btn {
    text-decoration: none;
    color: #fff;
}
.meta-line {
    color: #777;
    font-size: 14px;
}
.article-section pre {
    background: #263238;
    color: #eceff1;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: left;
}
.article-section pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* Contact form */
.contact-form {
    max-width: 600px;
    margin-top: 20px;
    text-align: left;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background: #fafafa;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #1a237e;
    outline: none;
}
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    text-align: left;
}
.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.alert-error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}
.alert ul {
    margin: 8px 0 0 20px;
}

/* Footer */
footer {
    background: #111640;
    color: #bbb;
    padding: 30px 20px;
    margin-top: auto;
    border-top: 4px solid #64ffda;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    margin: 0 15px;
    font-size: 14px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: #64ffda;
}
.footer-text {
    font-size: 14px;
    text-align: center;
    line-height: 1.8;
}
.footer-brand {
    color: #64ffda;
    font-weight: 600;
}

/* Mobile & tablet */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -8px);
    }
    #nav-bar {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #1a237e;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    #nav-bar.show-menu {
        display: block;
    }
    #nav-bar ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    #nav-bar ul li {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }
    #nav-bar ul li a {
        display: block;
        padding: 12px 0;
        font-size: 16px;
        border-radius: 0;
    }
    .main-content {
        margin: 15px auto;
        padding: 0 10px;
    }
    .generator-box,
    .article-section,
    .static-page {
        padding: 20px 15px;
        border-radius: 8px;
        margin-bottom: 25px;
        text-align: left;
    }
    .generator-box h1,
    .article-section h2,
    .static-page h1 {
        font-size: 22px;
    }
    .article-section h3,
    .static-page h2 {
        font-size: 18px;
    }
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    .btn {
        width: 100%;
        padding: 14px;
    }
    .footer-links {
        gap: 10px;
    }
    .footer-links a {
        margin: 0 5px;
    }
}

/* Guides: hub grid, article furniture and ad slots */
.static-page h3 {
    color: #283593;
    font-size: 19px;
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: left;
}
.static-page pre {
    background: #263238;
    color: #eceff1;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: left;
}
.static-page pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.static-page table,
.article-section table,
.generator-box table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
    text-align: left;
}
.static-page th,
.static-page td,
.article-section th,
.article-section td,
.generator-box th,
.generator-box td {
    border: 1px solid #dde1ea;
    padding: 10px 12px;
    color: #555;
    vertical-align: top;
}
.static-page th,
.article-section th,
.generator-box th {
    background: #eef1f7;
    color: #1a237e;
    font-weight: 600;
}
.table-scroll {
    overflow-x: auto;
    margin-bottom: 20px;
}
.table-scroll table {
    margin-bottom: 0;
}

/* Hub grid */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
    text-align: left;
}
.guide-card {
    background: #fff;
    border: 1px solid #e3e7ef;
    border-left: 4px solid #1a237e;
    border-radius: 10px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.guide-card:hover {
    box-shadow: 0 6px 18px rgba(26,35,126,0.12);
    transform: translateY(-2px);
}
.guide-card h3 {
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.35;
}
.guide-card h3 a {
    color: #1a237e;
    text-decoration: none;
}
.guide-card h3 a:hover {
    text-decoration: underline;
}
.guide-card p {
    color: #555;
    font-size: 15px;
    margin-bottom: 14px;
    flex-grow: 1;
}
.guide-card .guide-meta {
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* Key takeaways box */
.key-points {
    background: #eef1f7;
    border-left: 4px solid #1a237e;
    border-radius: 0 8px 8px 0;
    padding: 18px 22px;
    margin: 0 0 25px;
    text-align: left;
}
.key-points h2 {
    font-size: 16px !important;
    margin: 0 0 10px !important;
    border: none !important;
    padding: 0 !important;
    color: #1a237e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.key-points ul {
    margin-bottom: 0 !important;
}
.key-points li {
    font-size: 15px;
}

/* Related reading */
.related-guides {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e3e7ef;
    text-align: left;
}
.related-guides h2 {
    font-size: 20px !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
}
.related-guides ul {
    list-style: none;
    margin-left: 0 !important;
}
.related-guides li {
    margin-bottom: 10px;
}
.related-guides a {
    color: #1a237e;
    font-weight: 600;
}

/* Ad slots: reserved space so content does not jump when an ad loads */
.ad-slot {
    margin: 30px auto;
    text-align: center;
    min-height: 100px;
    overflow: hidden;
}
.ad-slot ins {
    display: block;
}

@media (max-width: 768px) {
    .static-page h3 {
        font-size: 17px;
    }
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .guide-card {
        padding: 18px;
    }
    .key-points {
        padding: 15px 18px;
    }
}

/* Cookie consent banner */
.footer-link-btn {
    margin: 0 15px;
    font-size: 14px;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s;
}
.footer-link-btn:hover {
    color: #64ffda;
}
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    background: #fff;
    border-top: 4px solid #1a237e;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.18);
    padding: 22px 20px;
}
.cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}
.cookie-copy {
    flex: 1 1 420px;
    min-width: 0;
}
.cookie-copy h2 {
    color: #1a237e;
    font-size: 18px;
    margin-bottom: 6px;
}
.cookie-copy p {
    color: #555;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}
.cookie-copy a {
    color: #1a237e;
    text-decoration: underline;
}
.cookie-choices {
    flex: 1 1 100%;
    border-top: 1px solid #e3e7ef;
    padding-top: 15px;
    display: grid;
    gap: 10px;
}
.cookie-choice,
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}
.cookie-choice input,
.check-item input {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: #1a237e;
    cursor: pointer;
}
.cookie-choice input:disabled,
.check-item input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
.cookie-choice strong,
.check-item strong {
    color: #1a237e;
}
.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.cookie-actions .btn {
    padding: 11px 20px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 18px 15px;
        max-height: 85vh;
        overflow-y: auto;
    }
    .cookie-inner {
        gap: 15px;
    }
    .cookie-copy h2 {
        font-size: 17px;
    }
    .cookie-actions {
        width: 100%;
    }
    .cookie-actions .btn {
        flex: 1 1 140px;
        width: auto;
    }
    .footer-link-btn {
        margin: 0 5px;
    }
}

/* Tools: shared form, result and verdict styling */
.form-group textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
    font-family: 'Courier New', Courier, monospace;
}
.form-group .field-help {
    font-size: 13px;
    color: #777;
    margin-top: 6px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0 20px;
}
.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 20px;
    margin-bottom: 20px;
}
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: #b71c1c;
}
.form-group.has-error select,
.form-group.has-error textarea,
.form-group.has-error input {
    border-color: #ef9a9a;
    background: #fff8f8;
}
.alert-warn {
    background: #fff8e1;
    color: #7a4f01;
    border: 1px solid #ffd54f;
}
.alert-info {
    background: #e8eaf6;
    color: #1a237e;
    border: 1px solid #9fa8da;
}

/* Verdict banner: the headline answer a tool gives back */
.verdict {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
.verdict-allowed {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.verdict-blocked {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}
.verdict-unknown {
    background: #fff8e1;
    color: #7a4f01;
    border: 1px solid #ffd54f;
}
.verdict-icon {
    font-size: 24px;
    line-height: 1;
}

/* Result blocks inside a tool box */
.result-block {
    margin-top: 25px;
}
.result-block h3 {
    color: #283593;
    font-size: 18px;
    margin: 25px 0 12px;
}
.rule-hit {
    font-family: 'Courier New', Courier, monospace;
    background: #eef1f7;
    color: #1a237e;
    padding: 2px 6px;
    border-radius: 4px;
}
.row-blocked td:first-child {
    border-left: 3px solid #b71c1c;
}
.row-allowed td:first-child {
    border-left: 3px solid #00c853;
}

.output-box.is-tall textarea  { height: 340px; }
.output-box.is-short textarea { height: 110px; }

.guide-card.is-tool {
    border-left-color: #00c853;
}

@media (max-width: 768px) {
    .check-grid {
        grid-template-columns: 1fr;
    }
    .verdict {
        font-size: 16px;
        padding: 15px;
    }
}

/* Author box */
.author-box {
    margin-top: 35px;
    padding: 22px 25px;
    background: #eef1f7;
    border-left: 4px solid #1a237e;
    border-radius: 0 8px 8px 0;
    text-align: left;
}
.author-box h2 {
    font-size: 16px !important;
    margin: 0 0 12px !important;
    border: none !important;
    padding: 0 !important;
    color: #1a237e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.author-box p {
    font-size: 15px;
    margin-bottom: 12px;
}
.author-box p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .author-box {
        padding: 18px;
    }
}

/* SERP preview. The font-family override is load-bearing: the global * reset at
   the top of this file would otherwise apply Segoe UI to the preview while the
   canvas measures Arial, and the rendered text would disagree with the numbers. */
.serp-preview,
.serp-preview * {
    font-family: Arial, Helvetica, sans-serif;
}
.serp-preview {
    background: #fff;
    border: 1px solid #e3e7ef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.serp-preview.is-mobile {
    max-width: 440px;
}
.serp-url {
    font-size: 14px;
    color: #202124;
    line-height: 1.3;
}
.serp-crumb {
    color: #4d5156;
    word-break: break-word;
}
.serp-title {
    font-size: 20px;
    line-height: 1.3;
    color: #1a0dab;
    margin: 4px 0 3px;
    font-weight: 400;
    word-break: break-word;
}
.serp-preview.is-mobile .serp-title {
    font-size: 18px;
}
.serp-desc {
    font-size: 14px;
    line-height: 1.58;
    color: #4d5156;
    word-break: break-word;
}

/* Width meter under the title field */
.meter {
    height: 6px;
    background: #e3e7ef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.meter span {
    display: block;
    height: 100%;
    width: 0;
    background: #00c853;
    transition: width 0.15s linear;
}
.meter.is-near span {
    background: #f9a825;
}
.meter.is-over span {
    background: #b71c1c;
}
.counter {
    font-size: 13px;
    color: #777;
    margin-top: 6px;
}

/* Device toggle */
.device-toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.device-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    color: #555;
    cursor: pointer;
}
.device-toggle input {
    accent-color: #1a237e;
    cursor: pointer;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e3e7ef;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.tab:hover {
    color: #1a237e;
}
.tab[aria-selected="true"] {
    color: #1a237e;
    border-bottom-color: #1a237e;
}

@media (max-width: 768px) {
    .tab {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Repeatable rows, used by the schema builder */
.repeat-row {
    border: 1px solid #e3e7ef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}
.repeat-row .form-group:last-child {
    margin-bottom: 0;
}
.repeat-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #b71c1c;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
}
.repeat-remove:hover {
    text-decoration: underline;
}
