/* Blog as a news page (proposal 18.10). Tokens and fonts come from the theme (style.css :root); nothing new
   except layout. Motion: one-time reveal via the theme's [data-reveal] + .is-in, every hidden state gated by
   .js:not(.k-calm) so calm / no-JS shows everything still. */

.k-news { max-width: var(--wide); margin: 0 auto; padding: 0 var(--side) 72px; color: var(--ink); }
.k-news a { color: inherit; text-decoration: none; }
.k-news a:hover .k-n-title { -webkit-text-stroke: var(--hover-stroke, .05em currentColor); }
.k-news a:focus-visible .k-n-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.k-news .k-crumbs { padding-top: 20px; }

/* masthead */
.k-n-mast { position: relative; padding: 28px 0 22px; border-bottom: 2px solid var(--ink); margin-bottom: 28px; isolation: isolate; }
.k-n-mast::before { /* aqua wash that slides in from the start edge */
	content: ""; position: absolute; z-index: -1; inset: 0 calc(-1 * var(--side)) 0 auto; width: min(62%, 640px);
	background: radial-gradient(120% 140% at 100% 0%, var(--accent-wash-2), transparent 62%);
	transform-origin: right; transition: transform .9s var(--ease-out), opacity .9s var(--ease-out);
}
.k-n-mast h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); line-height: 1; letter-spacing: -0.02em; margin: 0 0 12px; font-weight: 700; }
.k-n-mast .k-n-intro { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--muted); max-width: 46ch; margin: 0; }
.k-n-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.k-n-filter button {
	font: 500 0.9375rem/1 inherit; font-family: inherit; color: var(--ink); background: var(--white);
	border: 1.5px solid var(--rule); border-radius: var(--r-pill); min-height: 44px; padding: 0 18px; cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.k-n-filter button:hover { border-color: var(--accent); }
.k-n-filter button:active { transform: scale(.97); }
.k-n-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.k-n-filter .k-n-count { display: inline-block; margin-inline-start: 6px; font-size: 0.8125rem; font-weight: 400; } /* full ink, not opacity .7 (3.89:1, sprint 5 contrast scan) */

/* section heading: a ruled line with the name, newspaper style */
.k-n-sec { margin-top: 56px; }
.k-n-sec > h2 { display: flex; align-items: center; gap: 14px; font-size: 1.375rem; margin: 0 0 20px; }
.k-n-sec > h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); transform-origin: right; transition: transform .8s var(--ease-out) .15s; }

/* kind label (text, not a pill on an image) */
.k-n-kind { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 8px; }
.k-n-kind.is-market { color: var(--ink); }
.k-n-date { font-size: 0.875rem; color: var(--muted); }
.k-n-ex { color: var(--muted); margin: 8px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* lead: big guide + side column */
.k-n-lead { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; align-items: stretch; }
.k-n-lead > div > .k-pend, .k-n-lead > div { height: 100%; } /* Gil 19.10: both columns end on one line */
.k-n-hero { display: flex; flex-direction: column; height: 100%; border: 1.5px solid var(--rule); border-radius: var(--r-card); background: var(--accent-wash); overflow: hidden; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .k-n-hero:hover { transform: translateY(-3px); box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 14%, transparent); } }
.k-n-hero-art { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; gap: 2%; padding: 7% 6%; }
.k-n-hero-art::after { display: none; content: ""; position: absolute; inset: 50% 6% auto 6%; height: 3px; border-radius: 3px; background: var(--highlight); transform-origin: right; transition: transform 1.4s var(--ease-out) .3s; z-index: 0; }
.k-n-hero-art img { position: relative; z-index: 1; width: 100%; height: auto; transition: transform .7s var(--ease-out), opacity .7s var(--ease-out); transition-delay: calc(var(--i) * 110ms + 200ms); }
.k-n-hero-body { flex: 1; padding: 22px 26px 26px; background: var(--white); } /* Gil 19.10: thin grey frame on the card (border above) */
.k-n-hero .k-n-title { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2; margin: 0; }
.k-n-hero .k-n-tag { font-size: 1.125rem; color: var(--muted); margin: 10px 0 0; }
.k-n-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; color: var(--accent-ink); }
.k-n-more::after { content: "←"; transition: transform .25s var(--ease-out); }
a:hover .k-n-more::after { transform: translateX(-4px); }

.k-n-side { display: grid; gap: 20px; align-content: start; }
.k-n-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding: 20px; border-radius: var(--r-card); border: 1.5px solid var(--rule); background: var(--white); transition: border-color .25s ease, transform .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .k-n-card:hover { border-color: var(--accent); transform: translateY(-2px); } }
.k-n-card .k-n-title { font-size: 1.1875rem; line-height: 1.3; margin: 0; }
.k-n-card img { width: 64px; height: 64px; }
.k-news .k-n-latest { padding: 20px; border-radius: var(--r-card); background: var(--ink); color: var(--white); display: block; position: relative; overflow: hidden; }
.k-n-latest .k-n-kind, .k-n-latest .k-n-date, .k-n-latest .k-n-ex { color: color-mix(in srgb, var(--white) 82%, var(--ink)); }
.k-n-latest .k-n-month { font-size: 2.125rem; font-weight: 700; line-height: 1; margin: 4px 0 2px; }
.k-n-latest .k-n-month span { color: var(--highlight); }
.k-n-latest::after { /* slow chart line: the market-review motif */
	content: ""; position: absolute; inset: auto 0 0 0; height: 46px; opacity: .35;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 34 L20 30 L40 32 L60 22 L80 25 L100 16 L120 20 L140 10 L160 14 L180 6 L200 8' fill='none' stroke='%23FFC95B' stroke-width='2'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	transform-origin: right; transition: transform 1.2s var(--ease-out) .4s;
}

/* market reviews: a horizontal rail of month tiles, grouped by year */
.k-n-railwrap { position: relative; }
.k-n-rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.k-n-year { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; writing-mode: horizontal-tb; padding: 0 4px; font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.k-n-tile { flex: 0 0 clamp(200px, 24vw, 250px); scroll-snap-align: start; display: flex; flex-direction: column; padding: 18px; border-radius: var(--r-card); background: var(--sunk); min-height: 210px; transition: background .25s ease, transform .2s var(--ease-out), opacity .6s var(--ease-out); transition-delay: 0s, 0s, calc(var(--i) * 70ms); }
@media (hover: hover) and (pointer: fine) { .k-n-tile:hover { background: var(--highlight-wash); transform: translateY(-3px); } }
.k-n-tile .k-n-month { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.k-n-tile .k-n-ex { -webkit-line-clamp: 4; font-size: 0.9375rem; flex: 1; }
.k-n-tile .k-n-date { margin-top: 10px; }
.k-n-railnav { position: absolute; top: -52px; inset-inline-end: 0; display: flex; gap: 8px; }
.k-n-railnav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--white); color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.k-n-railnav button:hover { border-color: var(--accent); }
.k-n-railnav button:disabled { opacity: .35; cursor: default; }

/* insurance and pension pieces: rows with a looping service animation */
.k-n-topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.k-n-topic { display: grid; grid-template-rows: auto 1fr; gap: 12px; padding-top: 18px; border-top: 3px solid var(--ink); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i) * 120ms); }
.k-n-topic .k-n-vid { aspect-ratio: 16 / 9; border-radius: var(--r-card); background: var(--accent-wash); display: grid; place-items: center; overflow: hidden; }
.k-n-topic .k-n-vid > * { grid-area: 1 / 1; }
.k-n-topic video { width: 46%; height: auto; opacity: 0; transition: opacity .4s ease; }
.k-n-topic .k-n-vid img { width: 34%; height: auto; transition: opacity .4s ease; }
.k-n-topic .is-playing video { opacity: 1; }
.k-n-topic .is-playing img { opacity: 0; }
.k-n-topic .k-n-title { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.k-n-topic:hover .k-n-vid { background: var(--accent-wash-2); }

/* filter: hidden items and empty sections */
.k-news [data-kind][hidden], .k-n-sec[hidden] { display: none; }

/* reveal states (theme pattern) */
.js:not(.k-calm) .k-n-mast:not(.is-in)::before { transform: scaleX(.2); opacity: 0; }
.js:not(.k-calm) .k-n-mast:not(.is-in) h1 { opacity: 0; transform: translateY(14px); }
.k-n-mast h1 { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js:not(.k-calm) .k-n-sec:not(.is-in) > h2::after { transform: scaleX(0); }
.js:not(.k-calm) .k-n-hero:not(.is-in) .k-n-hero-art img { opacity: 0; transform: translateY(26px) scale(.92); }
.js:not(.k-calm) .k-n-hero:not(.is-in) .k-n-hero-art::after { transform: scaleX(0); }
.js:not(.k-calm) .k-n-latest:not(.is-in)::after { transform: scaleX(0); }
.js:not(.k-calm) .k-n-rail:not(.is-in) .k-n-tile { opacity: 0; transform: translateX(-24px); }
.js:not(.k-calm) .k-n-topics:not(.is-in) .k-n-topic { opacity: 0; transform: translateY(20px); }
.k-calm .k-n-hero, .k-calm .k-n-card, .k-calm .k-n-tile { transition: none; transform: none !important; }

/* pre-launch: unapproved items keep the theme's dashed frame */
.is-prelaunch .k-news .k-pend { padding: 30px 10px 10px; margin: 0; }

@media (max-width: 900px) {
	.k-n-lead { grid-template-columns: 1fr; }
	.k-n-topics { grid-template-columns: 1fr; gap: 28px; }
	.k-n-topic { grid-template-columns: 120px 1fr; grid-template-rows: auto; align-items: start; }
	.k-n-topic .k-n-vid { aspect-ratio: 1; }
	.k-n-topic video { width: 80%; }
	.k-n-topic .k-n-vid img { width: 64%; }
	.k-n-railnav { display: none; }
}
@media (max-width: 560px) {
	.k-n-hero-art { padding: 6% 4%; gap: 3%; }
	.k-n-hero-body { padding: 18px; }
	.k-n-topic { grid-template-columns: 88px 1fr; }
	.k-n-sec { margin-top: 44px; }
}
