/* AI Brief - Stylesheet
   Designed for comfortable long-form reading. */

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

body {
    font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
                 Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    line-height: 1.95;
    color: #2c2c2c;
    background: #f7f6f1;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ── Navigation ────────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #d8d6cf;
    font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC",
                 "Helvetica Neue", sans-serif;
    font-size: 0.85rem;
}

.site-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.site-nav .nav-home {
    color: #aaa;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s;
}

.site-nav .nav-home:hover {
    color: #666;
}

.site-nav .nav-sep {
    color: #ccc;
    font-size: 0.85rem;
}

.site-nav .nav-title {
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: 0.05em;
}

.site-nav .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.site-nav .nav-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.15s;
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a.active {
    color: #1a1a1a;
}

.site-nav .nav-links a.active {
    font-weight: 600;
}

/* ── Article Header ────────────────────── */
header {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
}

header .brand {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.5rem;
}

header h1 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

header .meta {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.88rem;
    color: #999;
}

header .divider {
    width: 60px;
    height: 3px;
    background: #c23028;
    margin: 1.4rem auto 0;
}

/* ── Main Content ──────────────────────── */
main {
    background: #fffffe;
    padding: 3rem 3rem;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Section headings */
main h2 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 3rem 0 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #eee;
    letter-spacing: 0.03em;
}

main h2:first-child {
    margin-top: 0;
}

/* Paper titles */
main h3 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #b82a22;
    margin: 2.2rem 0 0.5rem;
    line-height: 1.55;
}

main h3:first-child {
    margin-top: 0;
}

main p {
    margin: 0.85rem 0;
    color: #3a3a3a;
    font-size: 1.05rem;
    line-height: 2;
}

main strong {
    font-weight: 700;
    color: #1a1a1a;
}

/* Links */
main a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
    transition: border-color 0.15s;
}

main a:hover {
    border-bottom-color: #2563eb;
}

/* Blockquotes */
main blockquote {
    border-left: 3px solid #d8d6cf;
    padding: 0.5rem 1.2rem;
    margin: 1rem 0;
    color: #666;
    font-size: 0.95rem;
    background: #faf9f5;
}

/* Lists */
main ul, main ol {
    padding-left: 1.5rem;
    margin: 0.85rem 0;
}

main li {
    margin: 0.6rem 0;
    font-size: 1.05rem;
    color: #3a3a3a;
    line-height: 1.9;
}

main li strong {
    color: #1a1a1a;
}

/* Horizontal rules - between papers */
main hr {
    border: none;
    border-top: 1px solid #e8e6df;
    margin: 2.5rem 0;
}

/* Inline code */
main code {
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    font-size: 0.85em;
    background: #f5f4ef;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

/* ── Index Page: Article Cards ─────────── */
.article-list {
    list-style: none;
    padding: 0;
}

.article-card {
    background: #fffffe;
    padding: 1.8rem 2.2rem;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    transition: box-shadow 0.15s;
}

.article-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.09);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card .card-date {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 0.3rem;
}

.article-card .card-title {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
    transition: color 0.15s;
}

.article-card:hover .card-title {
    color: #2563eb;
}

.article-card .card-type {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.card-type.daily {
    background: #e8f4f8;
    color: #1a7fa0;
}

.card-type.weekly {
    background: #fdf2e9;
    color: #b85c1f;
}

.article-card .card-excerpt {
    font-size: 0.98rem;
    color: #666;
    line-height: 1.8;
    margin-top: 0.5rem;
}

/* ── Archive Page ──────────────────────── */
.archive-section {
    margin-bottom: 2.5rem;
}

.archive-section h2 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #eee;
}

.archive-list {
    list-style: none;
    padding: 0;
}

.archive-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.archive-list a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}

.archive-list a:hover {
    border-bottom-color: #2563eb;
}

.archive-list .type-tag {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.type-tag.daily {
    background: #e8f4f8;
    color: #1a7fa0;
}

.type-tag.weekly {
    background: #fdf2e9;
    color: #b85c1f;
}

/* ── Subscribe Form ────────────────────── */
.subscribe-box {
    background: #fffffe;
    padding: 1.8rem 2.2rem;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subscribe-box h3 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #1a1a1a;
}

.subscribe-box p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.subscribe-box form {
    display: flex;
    gap: 0.5rem;
    max-width: 420px;
    margin: 0 auto;
}

.subscribe-box input[type="email"] {
    flex: 1;
    padding: 0.55rem 0.9rem;
    border: 1px solid #d8d6cf;
    border-radius: 3px;
    font-size: 0.92rem;
    font-family: inherit;
}

.subscribe-box input[type="email"]:focus {
    outline: none;
    border-color: #2563eb;
}

.subscribe-box button {
    padding: 0.55rem 1.3rem;
    background: #c23028;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    transition: background 0.15s;
}

.subscribe-box button:hover {
    background: #a32520;
}

/* ── Page Title (index/archive) ────────── */
.page-header {
    text-align: center;
    padding: 2.5rem 0 1.8rem;
}

.page-header h1 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
}

.page-header p {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.92rem;
    color: #999;
}

/* ── Page Subtitle (index) ────────────── */
.page-subtitle {
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.95rem;
    color: #888;
    font-weight: 400;
}

/* ── What's New Page ──────────────────── */
.whatsnew-content {
    background: #fffffe;
    padding: 2.5rem 2.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.whatsnew-content h2 {
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #eee;
}

.whatsnew-content h2:first-child {
    margin-top: 0;
}

.whatsnew-content h2:not(:first-child) {
    margin-top: 2.5rem;
}

.whatsnew-content p {
    font-size: 0.95rem;
    color: #3a3a3a;
    line-height: 1.9;
    margin: 0.5rem 0;
}

.whatsnew-content hr {
    border: none;
    border-top: 1px solid #e8e6df;
    margin: 2rem 0;
}

/* ── Article Nav (prev/next) ───────────── */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding: 1.2rem 0;
    border-top: 1px solid #e8e6df;
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.88rem;
}

.article-nav-link {
    color: #666;
    text-decoration: none;
    transition: color 0.15s;
    max-width: 48%;
}

.article-nav-link:hover {
    color: #2563eb;
}

.article-nav-link.next {
    margin-left: auto;
    text-align: right;
}

/* ── Footer ────────────────────────────── */
footer {
    text-align: center;
    padding: 3.5rem 0 1.5rem;
    font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
    font-size: 0.8rem;
    color: #aaa;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    padding-top: 2rem;
    border-top: 1px solid #e8e6df;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #666;
}

.footer-dot {
    color: #ccc;
}

.footer-copyright {
    color: #bbb;
}

/* ── Responsive ────────────────────────── */
@media (max-width: 740px) {
    body { font-size: 1.05rem; }
    .container { padding: 1rem; }
    main { padding: 2rem 1.5rem; }
    header { padding: 2rem 0 1.5rem; }
    .article-card { padding: 1.4rem 1.5rem; }
    .subscribe-box form { flex-direction: column; }
}

/* ── Print ─────────────────────────────── */
@media print {
    body { background: #fff; }
    .container { padding: 0; }
    main { box-shadow: none; padding: 0; }
    .site-nav, .subscribe-box { display: none; }
}
