:root {
    color-scheme: dark;
    --primary-color: #ff5a1f;
    --text-primary: #f6f2ff;
    --text-secondary: #c8c0d6;
    --text-muted: #aaa1ba;
    --bg-primary: #0a0910;
    --bg-secondary: #16131f;
    --border-color: #2e2740;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 2rem; }

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
}

a { color: var(--primary-color); text-underline-offset: 0.25em; }
a:hover { color: #ff956d; }
a:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 6px; border-radius: 3px; }
::selection { background: #ff5a1f; color: #0a0910; }

.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    padding: 0.6rem 1rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--border-color); }
.site-header-inner, .footer-inner {
    width: min(1120px, calc(100% - 3rem));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-header-inner { min-height: 88px; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 750;
    letter-spacing: -0.04em;
    text-decoration: none;
}
.brand img { display: block; width: 36px; height: 36px; border-radius: 10px; }
.header-label { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.03em; }

.container { width: min(800px, calc(100% - 3rem)); margin-inline: auto; padding: 3rem 0 5rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 2.5rem; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.back-link::before { content: "\2190"; color: var(--primary-color); }
.header { margin-bottom: 2rem; }
h1 { margin: 0 0 0.7rem; font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: 1.12; letter-spacing: -0.055em; font-weight: 750; }
.subtitle { margin: 0; color: var(--text-muted); }
.last-updated { display: inline-block; margin-bottom: 2rem; padding: 0.5rem 0.9rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.8rem; color: var(--text-muted); }
.last-updated strong { color: var(--text-secondary); font-weight: 600; }

.section { margin-block: 2.5rem; }
h2 { margin: 0 0 1.25rem; padding-top: 0.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); font-size: 1.4rem; line-height: 1.35; letter-spacing: -0.025em; }
h3 { margin: 1.75rem 0 0.75rem; font-size: 1.05rem; line-height: 1.5; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.section p, .section li, .contact-info p, .contact-info li { color: var(--text-secondary); }
strong { color: var(--text-primary); font-weight: 650; }
ul, ol { margin: 1rem 0; padding-left: 1.4rem; }
li { padding-left: 0.2rem; margin-bottom: 0.65rem; }
li::marker { color: var(--text-muted); }

.highlight-box, .warning-box, .important-notice, .contact-info {
    margin-block: 2rem;
    padding: 1.5rem 1.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.highlight-box, .warning-box, .important-notice { border-left: 3px solid var(--primary-color); }
.highlight-box h3, .warning-box h3, .important-notice h3, .contact-info h3 { margin-top: 0; }
.highlight-box p, .warning-box p, .important-notice p { color: var(--text-secondary); }
.highlight-box p:last-child, .warning-box p:last-child, .important-notice p:last-child, .contact-info p:last-child { margin-bottom: 0; }

.data-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; line-height: 1.6; }
.data-table th, .data-table td { padding: 1rem; text-align: left; vertical-align: top; border: 1px solid var(--border-color); }
.data-table th { background: var(--bg-secondary); color: var(--text-primary); font-size: 0.8rem; font-weight: 650; }
.data-table td { color: var(--text-secondary); }
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 43%; }

.site-footer { border-top: 1px solid var(--border-color); }
.footer-inner { min-height: 104px; padding-block: 1.5rem; }
.footer-brand { color: var(--text-muted); font-size: 0.8rem; }
.footer-brand strong { display: block; margin-bottom: 0.2rem; font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; }
.footer-nav a:hover { color: var(--text-primary); }

.error-page { display: flex; min-height: 100vh; flex-direction: column; }
.error-main { flex: 1; display: grid; align-items: center; padding: 5rem 0; }
.error-content { max-width: 610px; }
.error-code { margin: 0 0 1.25rem; color: var(--primary-color); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.16em; }
.error-content h1 { max-width: 550px; }
.error-description { max-width: 420px; margin: 1.5rem 0 2rem; color: var(--text-muted); font-size: 1.05rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; min-height: 48px; padding: 0.8rem 1.4rem; border-radius: 7px; background: var(--primary-color); color: var(--bg-primary); font-weight: 700; font-size: 0.95rem; text-decoration: none; }
.button:hover { background: #ff794a; color: var(--bg-primary); }

@media (max-width: 600px) {
    .site-header-inner, .footer-inner, .container { width: calc(100% - 2.5rem); }
    .site-header-inner { min-height: 76px; }
    .header-label { font-size: 0.7rem; }
    .container { padding-block: 2rem 3rem; }
    .back-link { margin-bottom: 2rem; }
    .section { margin-block: 2rem; }
    h2 { font-size: 1.25rem; }
    .highlight-box, .warning-box, .important-notice, .contact-info { padding: 1.25rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.65rem 0.5rem; }
    .data-table th { font-size: 0.75rem; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .footer-nav { gap: 1.5rem; }
    .error-main { padding-block: 4rem; }
}

@media print {
    :root { color-scheme: light; --text-primary: #111; --text-secondary: #333; --text-muted: #444; --bg-primary: #fff; --bg-secondary: #f5f5f5; --border-color: #ccc; --primary-color: #a8300a; }
    .site-header, .site-footer, .back-link { display: none; }
    .container { width: 100%; padding: 0; }
    .highlight-box, .warning-box, .important-notice, .contact-info, tr { break-inside: avoid; }
    h2, h3 { break-after: avoid; }
}
