/* Deeger — Dark Brutalist Industrial */

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0a0a0a;
    --bg-surface: #000000;
    --bg-elevated: #111111;
    --accent: #00d4ff;
    --accent-dim: #00d4ff44;
    --accent-hover: #00b8d9;
    --text: #e0e0e0;
    --text-heading: #ffffff;
    --text-muted: #808080;
    --border: 2px solid #00d4ff44;
    --border-heavy: 4px solid #00d4ff;
    --radius: 0;
    --font: 'SF Mono', 'Consolas', 'Monaco', 'Liberation Mono', 'Courier New', monospace;
    --shadow: 8px 8px 0 #00d4ff44;
    --shadow-sm: 4px 4px 0 #00d4ff22;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 2.4rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.3rem; }

p { margin-bottom: 1rem; }
small { font-size: 0.85em; color: var(--text-muted); }

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}
a:hover { opacity: 0.8; }

code {
    font-family: var(--font);
    background: var(--bg-surface);
    color: var(--accent);
    padding: 2px 6px;
    font-size: 0.9em;
    border: 1px solid var(--accent-dim);
}

pre {
    background: var(--bg-surface);
    border: var(--border);
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
}

hr {
    border: none;
    border-top: 1px solid var(--accent-dim);
    margin: 1.5rem 0;
}

/* ===== Layout ===== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== Navigation ===== */
nav.topnav {
    background: var(--bg-surface);
    border-bottom: var(--border-heavy);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav.topnav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav.topnav .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

nav.topnav .brand img {
    width: 24px;
    height: 24px;
}

nav.topnav .nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

nav.topnav .nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.15s;
}
nav.topnav .nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid var(--accent-dim);
}

/* ===== Buttons ===== */
button, .btn, [role="button"] {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    background: var(--bg-surface);
    color: var(--accent);
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

button:hover, .btn:hover, [role="button"]:hover {
    background: var(--accent);
    color: var(--bg-surface);
    box-shadow: var(--shadow);
}

button.primary, .btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
button.primary:hover, .btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow);
}

button.outline, .btn-outline {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--accent-dim);
}
button.outline:hover, .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
    box-shadow: none;
}

button.danger {
    color: #ff4444;
    border-color: #ff444444;
}
button.danger:hover {
    background: #ff4444;
    color: var(--bg);
    border-color: #ff4444;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Forms ===== */
label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, select, textarea {
    font-family: var(--font);
    font-size: 0.95rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-surface);
    color: var(--text);
    border: var(--border);
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

select option {
    background: var(--bg-surface);
    color: var(--text);
}

fieldset {
    border: var(--border);
    padding: 1rem;
    margin-bottom: 1rem;
}

fieldset label {
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    color: var(--text);
    font-size: 0.9rem;
}

input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
    accent-color: var(--accent);
}

/* ===== Grid ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.grid label {
    margin-bottom: 0;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

thead {
    border-bottom: var(--border-heavy);
}

th {
    text-align: left;
    padding: 0.7rem 0.8rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #ffffff0a;
    font-size: 0.9rem;
}

tfoot td {
    border-top: var(--border);
    font-weight: 600;
}

tr.highlight {
    background: #00d4ff0d;
    border-left: var(--border-heavy);
}

tr:hover {
    background: #ffffff05;
}

/* ===== Cards / Articles ===== */
article, .card {
    background: var(--bg-surface);
    border: var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

article:hover, .card:hover {
    box-shadow: var(--shadow-sm);
}

article header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent-dim);
}

article footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ffffff0a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Badges ===== */
.scope-badge {
    display: inline-block;
    font-size: 0.75em;
    font-family: var(--font);
    background: #00d4ff15;
    color: var(--accent);
    padding: 2px 8px;
    border: 1px solid var(--accent-dim);
    margin: 1px 2px;
}

.status-active {
    color: #00ff88;
    font-weight: 700;
}

.status-expired {
    color: var(--text-muted);
}

.status-revoked {
    color: #ff4444;
}

.category-badge {
    display: inline-block;
    font-size: 0.8em;
    background: #00d4ff15;
    color: var(--accent);
    padding: 2px 8px;
    border: 1px solid var(--accent-dim);
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--accent), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ===== Tabs / Nav Pills ===== */
.tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--accent-dim);
}

.tab-nav a {
    padding: 0.6rem 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}

.tab-nav a:hover {
    color: var(--text);
    opacity: 1;
}

.tab-nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ===== Details / Accordion ===== */
details {
    margin-bottom: 1rem;
}

summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

summary:hover {
    opacity: 0.8;
}

/* ===== Messages ===== */
.message {
    background: #00d4ff0d;
    border: var(--border);
    border-left: var(--border-heavy);
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ===== Footer ===== */
footer.site-footer {
    border-top: 1px solid var(--accent-dim);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer.site-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ===== Price ===== */
.price {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--accent);
}

/* ===== Stripe Elements ===== */
.StripeElement {
    background: var(--bg-surface);
    border: var(--border);
    padding: 0.7rem 0.8rem;
    margin-bottom: 1rem;
    transition: border-color 0.15s;
}

.StripeElement--focus {
    border-color: var(--accent);
}

.StripeElement--invalid {
    border-color: #ff4444;
}

#card-errors {
    color: #ff4444;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 1.2em;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.inline { display: inline; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2rem;
    }
    nav.topnav .nav-links {
        gap: 0.5rem;
    }
    .container {
        padding: 0 1rem;
    }
}

/* ===== HGroup ===== */
hgroup {
    margin-bottom: 1.5rem;
}
hgroup p {
    color: var(--text-muted);
    margin-top: 0.3rem;
}
