/* ================================================
   SelectNote — Bold Newspaper
   Black body × Yellow accent × Syne
   ================================================ */

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

:root {
    --yellow: #fbbf24;
    --black:  #111;
    --white:  #fff;
    --bg:     #f5f3ee;
    --card:   #fff;
    --muted:  #555;
    --border: #ddd;
    --max-w:  1120px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Hiragino Sans', 'Meiryo', sans-serif;
    background: var(--bg);
    color: var(--black);
    font-size: 15px;
    line-height: 1.85;
}

/* ---- Container ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== TICKER ===== */
.news-ticker {
    background: var(--yellow);
    padding: 8px 0;
    overflow: hidden;
    border-bottom: 2px solid #000;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}
.ticker-label {
    background: #000;
    color: var(--yellow);
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 3px 12px;
    white-space: nowrap;
    margin-right: 16px;
    flex-shrink: 0;
}
.ticker-text {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    color: #000;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== HEADER ===== */
.site-header {
    background: #000;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--yellow);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 24px;
}
.site-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -.02em;
    line-height: 1;
}
.site-logo:hover { opacity: .85; }
.site-logo .logo-select { color: #fff; }
.site-logo .logo-note   { color: var(--yellow); }

.search-form { display: flex; gap: 0; flex: 1; max-width: 300px; }
.search-input {
    flex: 1;
    padding: 8px 14px;
    border: 2px solid #333;
    border-right: none;
    font-size: .875rem;
    outline: none;
    background: #1a1a1a;
    font-family: inherit;
    color: var(--white);
}
.search-input::placeholder { color: #555; }
.search-input:focus { border-color: var(--yellow); background: #111; }
.search-btn {
    background: var(--yellow);
    border: 2px solid var(--yellow);
    color: #000;
    padding: 8px 18px;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    transition: background .1s;
}
.search-btn:hover { background: #e6c000; border-color: #e6c000; }

/* ===== BODY LAYOUT ===== */
.site-body {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    padding: 24px;
    max-width: var(--max-w);
    margin: 0 auto;
}
@media (max-width: 800px) {
    .site-body { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
    .sidebar-col { order: 2; }
}

/* ===== ARTICLE CARDS ===== */
.article-card {
    background: var(--card);
    border: 1px solid #ccc;
    padding: 24px 28px;
    margin-bottom: 12px;
    position: relative;
    transition: box-shadow .15s;
}
.article-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: transparent;
    transition: background .15s;
}
.article-card:hover { box-shadow: 3px 3px 0 var(--yellow); border-color: #aaa; }
.article-card:hover::before { background: var(--yellow); }

.article-meta {
    font-family: 'DM Mono', monospace;
    font-size: .73rem;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    letter-spacing: .04em;
}
.article-category {
    background: #000;
    color: var(--yellow);
    padding: 3px 10px;
    font-family: 'DM Mono', monospace;
    font-size: .68rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.article-category:hover { background: var(--yellow); color: #000; }

.article-card h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: -.02em;
}
.article-card h2 a { color: #111; text-decoration: none; }
.article-card h2 a:hover { color: #333; }
.article-excerpt { color: var(--muted); font-size: .875rem; margin-bottom: 14px; line-height: 1.75; }
.read-more {
    font-family: 'DM Mono', monospace;
    color: #111;
    font-weight: 700;
    font-size: .75rem;
    text-decoration: none;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 1px;
}
.read-more:hover { background: var(--yellow); }

/* ===== SINGLE ARTICLE ===== */
.article-single {
    background: var(--card);
    border: 1px solid #ccc;
    border-top: 4px solid var(--yellow);
    padding: 40px 44px;
}
@media (max-width: 600px) { .article-single { padding: 22px 18px; } }

.article-single h1 {
    font-family: 'Syne', sans-serif;
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 18px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #000;
}

.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.tag-badge {
    background: transparent;
    border: 1px solid #ccc;
    color: var(--muted);
    padding: 3px 10px;
    font-size: .72rem;
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    letter-spacing: .05em;
    transition: .1s;
}
.tag-badge:hover { background: var(--yellow); color: #000; border-color: var(--yellow); }

/* ===== ARTICLE BODY ===== */
.article-body {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid #000;
    font-size: 15.5px;
    line-height: 1.95;
}
.article-body h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    margin: 2.2em 0 .9em;
    padding: 12px 16px;
    background: var(--yellow);
    border-left: 5px solid #000;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #000;
}
.article-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    margin: 1.8em 0 .7em;
    padding-bottom: 6px;
    border-bottom: 2px solid #000;
    font-weight: 800;
    letter-spacing: -.01em;
}
.article-body h4 { font-family: 'Syne', sans-serif; font-size: .95rem; margin: 1.4em 0 .5em; font-weight: 800; }
.article-body p { margin-bottom: 1.3em; }
.article-body ul, .article-body ol { margin: .9em 0 1.3em 1.6em; }
.article-body li { margin-bottom: .5em; }
.article-body a { color: #000; font-weight: 600; border-bottom: 2px solid var(--yellow); text-decoration: none; }
.article-body a:hover { background: var(--yellow); }
.article-body strong { font-weight: 700; }
.article-body blockquote {
    border-left: 5px solid var(--yellow);
    border: 1px solid #ccc;
    border-left: 5px solid var(--yellow);
    padding: 14px 22px;
    margin: 1.8em 0;
    color: var(--muted);
    background: #f9f9f9;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: .9rem; }
.article-body th, .article-body td { padding: 10px 16px; border: 1px solid #ccc; text-align: left; }
.article-body th { background: #000; color: var(--yellow); font-family: 'DM Mono', monospace; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.article-body tr:nth-child(even) td { background: #f9f9f9; }
.article-body pre { background: #000; color: var(--yellow); padding: 22px 24px; overflow-x: auto; margin: 1.8em 0; font-size: .85rem; line-height: 1.7; font-family: 'DM Mono', monospace; }
.article-body code { background: #f5f5f5; padding: 2px 6px; font-size: .85em; border: 1px solid #ddd; font-family: 'DM Mono', monospace; }
.article-body pre code { background: none; padding: 0; border: none; color: var(--yellow); }
.article-body img { max-width: 100%; height: auto; border: 1px solid #ccc; }
.article-body hr { border: none; border-top: 2px solid #000; margin: 2.4em 0; }

/* ===== RELATED ARTICLES ===== */
.related-articles { margin-top: 36px; padding-top: 24px; border-top: 2px solid #000; }
.related-articles h3 { font-family: 'DM Mono', monospace; font-size: .7rem; font-weight: 700; color: #888; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 14px; }
.related-list { list-style: none; }
.related-list li { padding: 9px 0; border-bottom: 1px solid #eee; }
.related-list a { color: #111; text-decoration: none; font-size: .9rem; font-weight: 600; }
.related-list a:hover { border-bottom: 2px solid var(--yellow); }

/* ===== BREADCRUMB ===== */
.breadcrumb { font-family: 'DM Mono', monospace; font-size: .71rem; color: #888; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; letter-spacing: .04em; }
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { color: var(--yellow); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 16px; text-decoration: none; border: 1px solid #ccc; color: #111; font-size: .85rem; font-weight: 700; font-family: 'DM Mono', monospace; letter-spacing: .04em; transition: .1s; }
.pagination a:hover { background: var(--yellow); border-color: var(--yellow); color: #000; }
.pagination .current { background: #000; color: var(--yellow); border-color: #000; }

/* ===== SIDEBAR ===== */
.widget {
    background: var(--card);
    border: 1px solid #ccc;
    margin-bottom: 12px;
    overflow: hidden;
}
.widget-title {
    background: #000;
    color: var(--yellow);
    font-family: 'Syne', sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 10px 18px;
    border-bottom: 2px solid #000;
}
.widget-body { padding: 14px 18px; }
.category-list { list-style: none; }
.category-list li { padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: .875rem; }
.category-list li:last-child { border-bottom: none; }
.category-list a { color: #111; text-decoration: none; display: flex; justify-content: space-between; font-weight: 600; }
.category-list a:hover { color: #555; }
.category-list a span { color: #aaa; font-weight: 400; font-family: 'DM Mono', monospace; font-size: .8rem; }
.recent-list { list-style: none; }
.recent-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: .875rem; }
.recent-list li:last-child { border-bottom: none; }
.recent-list a { color: #111; text-decoration: none; font-weight: 600; line-height: 1.5; display: block; }
.recent-list a:hover { color: #555; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-link { background: #f5f5f5; border: 1px solid #ddd; color: #555; padding: 3px 10px; font-family: 'DM Mono', monospace; font-size: .72rem; text-decoration: none; letter-spacing: .04em; transition: .1s; }
.tag-link:hover { background: var(--yellow); color: #000; border-color: var(--yellow); }

/* ===== FOOTER ===== */
.site-footer {
    background: #000;
    color: rgba(255,255,255,.4);
    text-align: center;
    padding: 24px 20px;
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    margin-top: 0;
    letter-spacing: .08em;
    border-top: 4px solid var(--yellow);
}
.site-footer a { color: rgba(255,255,255,.4); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }

/* ===== PAGE HEADER ===== */
.page-header { background: var(--card); border: 1px solid #ccc; border-top: 4px solid var(--yellow); padding: 24px 28px; margin-bottom: 14px; }
.page-header h1 { font-family: 'Syne', sans-serif; font-size: 1.4rem; color: #000; font-weight: 800; letter-spacing: -.02em; }
.page-header p { color: var(--muted); font-size: .875rem; margin-top: 6px; }

/* ===== 404 ===== */
.not-found { text-align: center; padding: 100px 20px; }
.not-found h1 { font-family: 'Syne', sans-serif; font-size: 8rem; color: var(--yellow); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.not-found p { color: rgba(255,255,255,.5); margin-top: 16px; }
.not-found a { color: var(--yellow); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--yellow); }
