/* ============================================================
   tacteam / rbx — shared stylesheet
   Editorial dark theme. Muted olive accents.
   ------------------------------------------------------------
   This file is the single source of visual truth for the site.
   Page-specific styles should live in a <style> block on the
   page itself, NOT in here — keep this file for the shared
   chrome only.
   ============================================================ */

:root {
    --bg:           #0f1210;   /* page background */
    --bg-elev:      #161a17;   /* section panels */
    --bg-elev-2:    #1d221e;   /* hover / focus elevation */
    --line:         #2a302b;   /* hairlines */
    --line-bright:  #3a433c;   /* hover border, top accent rule */
    --ink:          #e8ebe5;   /* primary text */
    --ink-dim:      #9ba39a;   /* secondary text */
    --ink-faint:    #60685f;   /* labels, metadata, placeholders */
    --accent:       #b8c99a;   /* muted sage */
    --accent-deep:  #7d8f61;   /* deeper sage — focus rings */
    --warn:         #d4a574;   /* warm amber — classification only */
    --radius:       2px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: "Inter", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    padding: 0 1.25rem 4rem;
    font-size: 14px;
    line-height: 1.5;
    background-image:
            radial-gradient(ellipse at top, rgba(184, 201, 154, 0.04), transparent 60%),
            radial-gradient(ellipse at bottom right, rgba(125, 143, 97, 0.03), transparent 50%);
    background-attachment: fixed;
}

.wrap {
    max-width: 780px;
    margin: 0 auto;
}

/* ============================================================
   Navigation bar
   ------------------------------------------------------------
   Sits above the header. Full-width strip with the site
   wordmark on the left and category menus on the right.
   ============================================================ */

.nav {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(15, 18, 16, 0.85);
}
.nav-inner {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--ink);
}
.nav-brand img {
    width: 22px; height: 22px;
    display: block;
    filter: brightness(0.9);
}
.nav-brand-text {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
}
.nav-brand-text em {
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu > li {
    position: relative;
}
.nav-link {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--accent); background: var(--bg-elev-2); }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::before {
    content: "";
    width: 4px; height: 4px;
    background: var(--accent);
    margin-right: 0.3rem;
    display: inline-block;
}
.nav-caret {
    width: 8px; height: 5px;
    display: inline-block;
    background: currentColor;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    opacity: 0.7;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    padding: 0.35rem 0;
    display: none;
    flex-direction: column;
    z-index: 60;
}
.nav-dropdown.is-open { display: flex; }
.nav-dropdown a {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: none;
    color: var(--ink-dim);
    text-decoration: none;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-dropdown a:hover { color: var(--accent); background: var(--bg-elev-2); }
.nav-dropdown a.is-active { color: var(--accent); }
.nav-dropdown a .nav-dropdown-hint {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* mobile: collapse the menu behind a single toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    border-radius: var(--radius);
}
.nav-toggle:hover { border-color: var(--line-bright); color: var(--ink); }

@media (max-width: 560px) {
    .nav-toggle { display: inline-block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--line);
        padding: 0.35rem 0;
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu > li { width: 100%; }
    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 0.7rem 1.25rem;
    }
    .nav-dropdown {
        position: static;
        border: none;
        border-top: 1px solid var(--line);
        background: var(--bg);
        padding: 0.15rem 0;
    }
    .nav-dropdown a { padding-left: 2.25rem; }
}

/* ============================================================
   Header
   ============================================================ */

header.page-header {
    border-top: 1px solid var(--line-bright);
    border-bottom: 1px solid var(--line);
    padding: 1.25rem 0;
    margin: 2.5rem 0 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}
.classification {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--warn);
    text-transform: uppercase;
}
.classification::before { content: "— "; }
.title {
    font-family: "Fraunces", serif;
    font-weight: 500;
    font-size: 2rem;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0.35rem 0 0;
    color: var(--ink);
}
.title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}
.meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    text-transform: uppercase;
    text-align: right;
    line-height: 1.6;
}
.meta span { color: var(--ink-dim); }

/* ============================================================
   Sections
   ============================================================ */

section {
    border: 1px solid var(--line);
    background: var(--bg-elev);
    padding: 1.5rem 1.75rem 1.75rem;
    margin-bottom: 1.25rem;
    position: relative;
}
section::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 1.75rem;
    background: var(--accent-deep);
}
section h2 {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-dim);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
section h2::before {
    content: attr(data-num);
    color: var(--accent);
    font-weight: 700;
}
section h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ============================================================
   Form grid
   ============================================================ */

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}
.grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 500;
}

input, select, textarea {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 0.85rem;
    color: var(--ink);
    font-family: "Inter", sans-serif;
    font-size: 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-bright); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-deep);
    background: var(--bg-elev-2);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ba39a' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2rem;
}
select:disabled { color: var(--ink-faint); cursor: not-allowed; }

/* ============================================================
   Output / data display blocks
   ============================================================ */

.output-block {
    margin-bottom: 0.9rem;
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    align-items: stretch;
    transition: border-color 0.2s ease;
}
.output-block:last-child { margin-bottom: 0; }
.output-block:hover { border-color: var(--accent-deep); }
.output-body {
    flex: 1;
    padding: 1rem 1.25rem;
    min-width: 0;
}
.output-tag {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.output-tag .dot {
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}
.output-text {
    font-family: "JetBrains Mono", monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    word-break: break-word;
    line-height: 1.5;
}
.output-text.empty { color: var(--ink-faint); font-style: italic; font-weight: 400; }

.copy-btn {
    background: transparent;
    border: none;
    border-left: 1px solid var(--line);
    padding: 0 1.25rem;
    color: var(--ink-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    align-self: stretch;
}
.copy-btn:hover { background: var(--bg-elev-2); color: var(--accent); }
.copy-btn.copied { color: var(--accent); background: var(--bg-elev-2); }

/* ============================================================
   Tool cards (used on the index page)
   ============================================================ */

.tool-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 560px) { .tool-list { grid-template-columns: 1fr; } }

.tool-card {
    border: 1px solid var(--line);
    background: var(--bg);
    padding: 1rem 1.1rem 1.1rem;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
}
.tool-card:hover {
    border-color: var(--accent-deep);
    background: var(--bg-elev-2);
}
.tool-card-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tool-card-meta .dot {
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
}
.tool-card-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
}
.tool-card-desc {
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    color: var(--ink-dim);
    line-height: 1.5;
}
.tool-card-arrow {
    position: absolute;
    top: 1rem; right: 1.1rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--ink-faint);
    transition: color 0.15s ease, transform 0.15s ease;
}
.tool-card:hover .tool-card-arrow {
    color: var(--accent);
    transform: translateX(2px);
}

.empty-state {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-faint);
    font-style: italic;
    padding: 0.5rem 0;
}

/* ============================================================
   Footer
   ============================================================ */

footer.page-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ============================================================
   Entrance animation
   ============================================================ */

@keyframes rise {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
header.page-header, section, footer.page-footer {
    animation: rise 0.5s ease-out both;
}
section:nth-of-type(1) { animation-delay: 0.05s; }
section:nth-of-type(2) { animation-delay: 0.10s; }
section:nth-of-type(3) { animation-delay: 0.15s; }
section:nth-of-type(4) { animation-delay: 0.20s; }
section:nth-of-type(5) { animation-delay: 0.25s; }
footer.page-footer     { animation-delay: 0.30s; }