/*
Theme Name: KoiSteel Hub
Author: KoiSteel
Description: Editorial theme for koi pond, Nishikigoi care, and pond engineering guides.
Version: 1.0.0
Text Domain: koisteel-hub
*/

:root {
    --ink: #16201c;
    --muted: #66756f;
    --paper: #ffffff;
    --soft: #f4f8f5;
    --line: #dfe8e2;
    --water: #165c63;
    --water-dark: #0d3c42;
    --koi: #d94b26;
    --gold: #c8962d;
    --leaf: #557c55;
    --shadow: 0 12px 30px rgba(13, 60, 66, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    color: var(--ink);
    background: var(--soft);
    font-family: Inter, "Noto Sans JP", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

a {
    color: var(--water);
    text-decoration: none;
}

a:hover {
    color: var(--koi);
}

img {
    max-width: 100%;
    height: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.ks-container {
    width: min(1180px, calc(100vw - 40px));
    margin: 0 auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.35rem;
}

.brand span {
    color: var(--koi);
}

.tagline {
    color: var(--muted);
    font-size: 0.88rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
    font-weight: 700;
}

.nav a {
    color: var(--ink);
}

.nav a:hover {
    color: var(--koi);
}

.site-main {
    padding: 44px 0 70px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.content-panel,
.sidebar-panel,
.post-card,
.article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.article {
    padding: 36px;
}

.entry-header {
    margin-bottom: 26px;
}

.breadcrumbs {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.entry-title {
    margin: 0 0 14px;
    max-width: 900px;
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1.16;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.entry-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.featured-image {
    overflow: hidden;
    border-radius: 8px;
    margin: 26px 0;
}

.featured-image img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.entry-content h2 {
    margin: 34px 0 12px;
    font-size: 1.55rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.entry-content h3 {
    margin: 26px 0 10px;
    font-size: 1.18rem;
    overflow-wrap: anywhere;
}

.entry-content p,
.entry-content li {
    color: #26352f;
    overflow-wrap: anywhere;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fbfdfb;
    border: 1px solid var(--line);
}

.entry-content th,
.entry-content td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.entry-content th {
    color: var(--water-dark);
    background: #eaf3ee;
}

.note-box {
    margin: 28px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--koi);
    background: #fff7f2;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    overflow: hidden;
}

.post-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card-body {
    padding: 20px;
}

.post-card h2,
.post-card h3 {
    margin: 0 0 10px;
    font-size: 1.08rem;
    line-height: 1.38;
    overflow-wrap: anywhere;
}

.post-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.sidebar-panel {
    padding: 22px;
}

.sidebar-panel h2 {
    margin: 0 0 14px;
    font-size: 1.08rem;
}

.sidebar-list {
    display: grid;
    gap: 12px;
}

.sidebar-list a {
    display: block;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    line-height: 1.45;
}

.site-footer {
    padding: 34px 0;
    color: rgba(255,255,255,0.78);
    background: var(--water-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner a {
    color: #fff;
}

@media (max-width: 900px) {
    .header-inner,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ks-container {
        width: min(362px, calc(100vw - 28px));
        margin-left: 14px;
        margin-right: auto;
    }

    .nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .article {
        padding: 22px 18px;
    }

    .entry-title {
        font-size: 1.68rem;
        line-height: 1.2;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}
