*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:        #FFFFEE;
    --bg-reply:  #F0E0D6;
    --bg-dark:   #FFFFEE;
    --border:    #D6D6D6;
    --border-lt: #CCCCCC;
    --text:      #000000;
    --text-dim:  #555555;
    --link:      #0000EE;
    --link-hov:  #0000CC;
    --link-visited: #551A8B;
    --green:     #789922;
    --red:       #CC0000;
    --yellow:    #FFFF00;
    --purple:    #551A8B;
}

html { scroll-behavior: auto; }

body {
    font-family: 'Courier New', Courier, monospace;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--link-hov); text-decoration: underline; }

::selection { background: var(--link); color: var(--bg); }

/* ── Header / Nav ──────────────────────────────────────── */
.site-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
}

.header-inner { max-width: 1200px; margin: 0 auto; display:flex; flex-direction:column; gap:6px; }

.header-top {
    display:flex;
    align-items:center;
    gap:10px;
    font-size: 18px;
    font-weight: bold;
    color: var(--text);
    letter-spacing: -0.5px;
}
.header-top a { color: var(--text); text-decoration: none; display:flex; align-items:center; gap:8px; }
.header-top a:hover { color: var(--link); }
.site-logo {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.main-nav {
    font-size: 12px;
    line-height: 1.8;
    word-break: break-word;
}
.main-nav a {
    color: var(--link);
    text-decoration: none;
    margin: 0 4px;
}
.main-nav a:hover { color: var(--link-hov); text-decoration: underline; }
.main-nav a.active { color: var(--text); font-weight: bold; text-decoration: underline; }
.main-nav .sep { color: var(--text-dim); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    background: var(--bg-reply);
    border-bottom: 1px solid var(--border);
    padding: 40px 16px;
    text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}
.hero h1 span { color: var(--green); }
.hero p {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
    background: var(--green);
    color: var(--bg);
    font-size: 12px;
    font-weight: bold;
    padding: 6px 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-block;
}
.btn-primary:hover { background: #5a7a1a; color: var(--bg); text-decoration: none; }

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: bold;
    padding: 5px 14px;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    display: inline-block;
}
.btn-outline:hover { background: var(--bg); text-decoration: none; }

/* ── Layout ────────────────────────────────────────────── */
.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

/* ── Section Titles ────────────────────────────────────── */
.section-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}
.section-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* ── Services Grid ─────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.service-card {
    background: var(--bg);
    padding: 12px 10px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text);
}
.service-card:hover { background: var(--bg-reply); }

.card-code {
    font-size: 9px;
    font-weight: bold;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}
.card-title {
    font-size: 12px;
    font-weight: bold;
    color: var(--text);
}
.card-desc {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    flex: 1;
}
.card-link {
    font-size: 10px;
    color: var(--link);
    margin-top: 4px;
}

/* ── Service Page Layout ───────────────────────────────── */
.service-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.service-main { flex: 1; min-width: 0; }
.service-sidebar { width: 240px; flex-shrink: 0; }

.breadcrumb {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.breadcrumb a { color: var(--link); }
.breadcrumb .sep { color: var(--text-dim); margin: 0 4px; }

.service-hero {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 16px;
    margin-bottom: 12px;
}
.service-hero h1 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text);
}
.service-hero h1 span { color: var(--green); }
.service-hero p {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 10px;
    line-height: 1.5;
}

.content-panel {
    border: 1px solid var(--border);
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg);
}
.content-panel h2 {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
}
.content-panel h3 {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text);
    margin-top: 10px;
}
.content-panel p {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 6px;
    line-height: 1.5;
}
.content-panel ul {
    padding-left: 0;
    margin-bottom: 8px;
    list-style: none;
}
.content-panel ul li {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 3px;
    line-height: 1.4;
    padding-left: 14px;
    position: relative;
}
.content-panel ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: bold;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.related-link {
    font-size: 11px;
    color: var(--link);
    background: var(--bg);
    padding: 2px 6px;
    text-decoration: none;
    border: 1px solid var(--border);
}
.related-link:hover { background: var(--bg-reply); color: var(--link-hov); text-decoration: none; }

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar-box {
    border: 1px solid var(--border);
    margin-bottom: 8px;
    background: var(--bg);
}
.sidebar-box-head {
    background: var(--bg-reply);
    color: var(--text);
    font-size: 11px;
    font-weight: bold;
    padding: 6px 10px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
.sidebar-box-body { padding: 10px; }

.sidebar-contact-method {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.sidebar-method-row { display: flex; flex-direction: column; gap: 1px; }
.sidebar-method-label {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-dim);
}
.sidebar-method-val {
    font-size: 11px;
    font-weight: bold;
    color: var(--green);
    word-break: break-all;
}
.sidebar-note {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-top: 4px;
}

.sidebar-links { list-style: none; }
.sidebar-links li a {
    display: block;
    padding: 3px 0;
    font-size: 11px;
    color: var(--link);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}
.sidebar-links li:last-child a { border-bottom: none; }
.sidebar-links li a:hover { color: var(--link-hov); text-decoration: underline; }
.sidebar-links li a.active { color: var(--text); font-weight: bold; }

/* ── FAQ (pure CSS with details/summary) ───────────────── */
.faq-section { margin-bottom: 20px; }
.faq-list { max-width: 800px; }
.faq-item {
    border: 1px solid var(--border);
    margin-bottom: 2px;
    background: var(--bg);
}
.faq-item summary {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '[+]';
    color: var(--text-dim);
    font-size: 10px;
    flex-shrink: 0;
}
.faq-item[open] summary::before { content: '[-]'; }
.faq-item summary:hover { background: var(--bg-reply); }
.faq-answer {
    padding: 0 12px 10px 30px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    border-top: 1px solid var(--border);
}

/* ── Greentext ─────────────────────────────────────────── */
.greentext { color: var(--green); }
.quote {
    border-left: 2px solid var(--green);
    padding-left: 8px;
    margin: 6px 0;
    color: var(--text-dim);
}

/* ── Post style ────────────────────────────────────────── */
.post {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px 12px;
    margin-bottom: 6px;
}
.post-header {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.post-header .name { color: var(--text); font-weight: bold; }
.post-header .subject { color: var(--text); font-weight: bold; }
.post-header .date { color: var(--text-dim); }
.post-body {
    font-size: 12px;
    color: var(--text);
    line-height: 1.5;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: 20px 16px;
    font-size: 11px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.footer-col-title {
    font-size: 11px;
    font-weight: bold;
    color: var(--text);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.footer-col a {
    display: block;
    color: var(--link);
    margin-bottom: 3px;
    font-size: 11px;
    text-decoration: none;
}
.footer-col a:hover { color: var(--link-hov); text-decoration: underline; }
.footer-keywords {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 12px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.footer-copy { font-size: 10px; color: var(--text-dim); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .service-layout { flex-direction: column; }
    .service-sidebar { width: 100%; }
    .hero { padding: 20px 12px; }
    .hero h1 { font-size: 16px; }
    .services-grid { grid-template-columns: 1fr; }
    .page-wrap { padding: 12px 12px 30px; }
}