:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-hover: #1a1a25;
    --text: #e0e0e5;
    --text-dim: #7a7a85;
    --accent: #00d4aa;
    --accent-dim: #00d4aa44;
    --border: #22222e;
    --code-bg: #0d0d14;
    --warn: #ffb86b;
    --icon-filter: invert(1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.badge {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.version-line {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.version-line a {
    color: var(--accent);
    text-decoration: none;
}

.license-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.license-box h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-box h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.license-box p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.license-box a,
.section a,
.notice a,
.deed a {
    color: var(--accent);
    text-decoration: none;
}

.license-text {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-bottom: 24px;
}

.license-text .keyword {
    color: var(--accent);
}

.deed {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.deed-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.deed-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.deed p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin: 20px 0 8px;
}

.deed ul {
    margin: 0 0 4px 22px;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.deed li {
    margin-bottom: 8px;
}

.deed strong {
    color: var(--text);
}

.deed-note {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.deed-note p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 0 0 8px;
}

.deed-note p:last-child {
    margin-bottom: 0;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--text);
}

.section p {
    color: var(--text-dim);
    margin-bottom: 12px;
}

.section ul {
    margin: 0 0 12px 20px;
    color: var(--text-dim);
}

.section li {
    margin-bottom: 6px;
}

.comparison {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.comparison th,
.comparison td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison tr:hover td {
    background: var(--surface-hover);
}

.comparison td:first-child {
    color: var(--text);
}

.yes { color: var(--accent); }
.no { color: #ff6b6b; }

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
}

.code-block pre {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}

.code-block .lang-tag {
    display: inline-block;
    font-size: 11px;
    color: var(--text-dim);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.note {
    background: var(--surface);
    border-left: 3px solid var(--warn);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.note strong {
    color: var(--warn);
}

.pd-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cc-icon {
    width: 32px;
    height: 32px;
    display: block;
    opacity: 0.8;
    filter: var(--icon-filter);
}

.pd-text {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.pd-text strong {
    color: var(--text);
}

.notice {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.notice h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.notice p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.notice p:last-child {
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

@media (max-width: 600px) {
    h1 { font-size: 1.8rem; }
    .license-box, .deed { padding: 20px; }
    .container { padding: 40px 16px; }
    .comparison th, .comparison td { padding: 8px 10px; font-size: 0.8rem; }
}

/* Light mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f5f5f7;
        --surface: #ffffff;
        --surface-hover: #f0f0f2;
        --text: #1a1a1f;
        --text-dim: #6a6a75;
        --accent: #008f6b;
        --accent-dim: #008f6b22;
        --border: #e0e0e5;
        --code-bg: #f0f0f2;
        --warn: #b45309;
        --icon-filter: none;
    }
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    z-index: 100;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--surface-hover);
}
