@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --bg: #eef3f8;
    --card: #ffffff;
    --line: #d6deea;
    --ink: #132033;
    --muted: #5f7490;
    --accent: #005f73;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at 14% 8%, rgba(0,95,115,.12), transparent 26%),
        radial-gradient(circle at 84% 12%, rgba(238,155,0,.15), transparent 24%),
        var(--bg);
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(130deg, #021326 0%, #0b3954 52%, #005f73 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}
.brand img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    padding: 4px;
}
.site-header h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    letter-spacing: .3px;
}
.site-header p {
    margin: 4px 0 0;
    opacity: .84;
}
.site-header a {
    color: #fef3c7;
    text-decoration: none;
}
.meta { text-align: right; font-size: 14px; }
.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #c9f0ff;
}

.container { max-width: 1160px; margin: 24px auto; padding: 0 16px; }

.edition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}
.edition-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(14, 34, 59, 0.08);
}
.edition-card h3 {
    margin: 0 0 7px;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
}
.edition-card p { margin: 0 0 10px; color: var(--muted); }
.edition-card a {
    display: inline-block;
    border-radius: 10px;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(130deg, #005f73, #0a9396);
}

.mode-switch { display: flex; gap: 8px; margin-bottom: 10px; }
.mode-btn {
    border: 1px solid #c9d8ea;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 700;
    color: #27415e;
    background: #fff;
    cursor: pointer;
}
.mode-btn.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(130deg, #005f73, #0a9396);
}

.paper-page {
    width: 1000px;
    min-height: 1414px;
    border: 1px solid #cad5e5;
    border-radius: 4px;
    margin: 16px auto;
    background: #fff;
    position: relative;
    box-shadow: 0 18px 40px rgba(14, 31, 51, 0.16);
}
.paper-page,
.paper-page * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}
.paper-header,
.paper-footer { position: relative; }
.paper-header { border-bottom: 2px solid #111827; }
.paper-sub-header { position: relative; border-bottom: 1px solid #cbd5e1; }
.paper-footer { border-top: 2px solid #111827; }
.paper-body {
    position: relative;
    overflow: hidden;
}
.paper-item {
    position: absolute;
    box-sizing: border-box;
    overflow: hidden;
}
.paper-item.item-box .box-label {
    display: inline-block;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    color: #475569;
    text-transform: uppercase;
}
.paper-item.item-text {
    padding: 6px;
}
.paper-item.item-text .item-text-content {
    width: 100%;
    height: 100%;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}
.paper-item.item-text .item-text-content .text-copy {
    white-space: pre-wrap;
}
.paper-item.item-text .item-text-content .text-list {
    margin: 0;
    padding-left: 22px;
}
.paper-item.item-text .item-text-content .text-list li {
    margin: 0 0 6px;
}
.paper-item.item-text .item-text-content .text-wrap-spacer {
    display: block;
    clear: both;
    width: 100%;
}
.paper-item.item-text .item-text-content::after {
    content: "";
    display: block;
    clear: both;
}
.paper-item.item-text .item-text-content .text-wrap-image {
    max-width: calc(100% - 8px);
    height: auto;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    margin-bottom: 8px;
}
.paper-item.item-text .item-text-content .text-wrap-image.wrap-left {
    float: left;
    margin-right: 10px;
}
.paper-item.item-text .item-text-content .text-wrap-image.wrap-right {
    float: right;
    margin-left: 10px;
}
.paper-item.item-text .item-text-content .text-wrap-block {
    display: block;
    border: 0;
    background: transparent;
    margin-bottom: 8px;
}
.paper-item.item-text .item-text-content .text-wrap-block.wrap-left {
    float: left;
    margin-right: 10px;
}
.paper-item.item-text .item-text-content .text-wrap-block.wrap-right {
    float: right;
    margin-left: 10px;
}
.paper-item.item-text .item-text-content .text-wrap-title {
    display: block;
    font-family: "Playfair Display", serif;
    font-weight: 800;
    line-height: 1.1;
    color: #831843;
}
.paper-item.item-text .item-text-content .text-wrap-title.wrap-left {
    float: left;
}
.paper-item.item-text .item-text-content .text-wrap-title.wrap-right {
    float: right;
}
.paper-item.item-text .item-text-content .text-wrap-title.wrap-middle {
    float: none;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.paper-item.item-image img {
    width: 100%;
    height: 100%;
    display: block;
}
.paper-item.item-image .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #475569;
}
.clip {
    position: absolute;
    border: 1px solid #95a8c2;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    overflow: hidden;
}
.clip img {
    width: 100%;
    height: 44%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-bottom: 6px;
}
.clip h3 {
    margin: 0 0 6px;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
}
.clip p { margin: 0; font-size: 14px; line-height: 1.35; }
.clip .clip-ribbon,
.clip .clip-label,
.clip .clip-head,
.clip .sports-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.clip .clip-ribbon { display: inline-block; background: #0f172a; color: #fff; padding: 2px 6px; border-radius: 4px; }
.clip .clip-split { display: grid; grid-template-columns: 40% 1fr; gap: 8px; height: 100%; }
.clip .clip-split img { height: 100%; object-fit: cover; margin: 0; }
.clip.variant-strip { border-left: 4px solid #ef4444; }
.clip.variant-quote { border-left: 5px solid #3b82f6; }
.clip.variant-quote .quote-mark { font-size: 34px; line-height: 1; color: #3b82f6; margin-bottom: 4px; }
.clip.variant-business .clip-ribbon { background: #92400e; }
.clip.variant-sports .sports-header { background: #166534; color: #fff; display: inline-block; padding: 2px 6px; border-radius: 4px; }
.clip.variant-sports img { height: 38%; }
.clip.variant-ad { border-style: dashed; border-color: #0ea5e9; background: #e0f2fe; }
.clip.variant-ad .ad-box { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }

.jpeg-page {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.jpeg-page h3 {
    width: 100%;
}
.jpeg-page img {
    width: auto;
    max-width: min(100%, 1000px);
    margin: 0 auto;
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.site-footer {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    background: #fff;
    color: #4a607e;
    padding: 14px 22px;
    font-size: 14px;
}

.hidden { display: none !important; }

@media (max-width: 1100px) {
    .site-header { flex-direction: column; align-items: flex-start; }
    .meta { text-align: left; }
    .paper-page { width: 100%; min-height: auto; }
}
