/*
Theme Name: Casinolle Media
Theme URI: https://casinolle.net/
Author: Casinolle Media
Description: Riippumattoman suomenkielisen verkkomedian responsiivinen uutisteema.
Version: 1.2.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: casinolle-media
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
:root{--green:#6cff4f;--forest:#0f8f3c;--bg:#0b0e0d;--surface:#1d2326;--ink:#f4f6f2;--muted:#b2bcb7;--line:#2a3730;--radius:14px;--max:1220px;--head:Manrope,Inter,system-ui,sans-serif;--body:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.65 var(--body);overflow-wrap:anywhere}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}img{max-width:100%;height:auto;display:block}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--green);outline-offset:4px}h1,h2,h3,h4{font-family:var(--head);line-height:1.18;letter-spacing:-.035em;margin:0 0 .6em;font-weight:800}h1{font-size:clamp(2rem,4.3vw,3.6rem)}h2{font-size:clamp(1.5rem,2.5vw,2rem)}h3{font-size:1.22rem}p{margin:0 0 1em}ul,ol{padding-left:1.4em}.wrap{width:min(var(--max),calc(100% - 48px));margin-inline:auto}.site-header{background:#070b09;border-bottom:1px solid var(--line);position:relative;z-index:3}.header-row{min-height:82px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;flex:0 0 auto;color:var(--ink);font-weight:800;font-size:1.6rem}.brand img,.custom-logo{width:220px;max-height:61px;object-fit:contain}.primary-nav{margin-left:auto}.primary-nav ul{display:flex;align-items:center;gap:24px;list-style:none;padding:0;margin:0}.primary-nav a{font-weight:650;color:var(--ink);font-size:.91rem;white-space:nowrap}.primary-nav a:hover,.primary-nav .current-menu-item>a{color:var(--green)}.header-search{position:relative;margin-left:auto}.header-search summary{list-style:none;cursor:pointer;color:var(--green);display:flex;align-items:center;padding:10px}.header-search summary::-webkit-details-marker{display:none}.header-search[open] .search-form{position:absolute;right:0;top:100%;width:min(340px,85vw);background:var(--surface);padding:12px;border:1px solid var(--line);border-radius:10px}.icon{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.menu-toggle{display:none;background:none;color:var(--ink);border:0;padding:8px}.skip-link{position:absolute;left:12px;top:-100px;background:var(--green);color:var(--bg);padding:10px;z-index:100}.skip-link:focus{top:8px}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hero{min-height:440px;position:relative;display:grid;align-items:center;isolation:isolate;background:radial-gradient(ellipse at 80% 25%,#12371f 0%,#0b0e0d 64%);border-bottom:1px solid var(--line);overflow:hidden}.hero-media{position:absolute;inset:0 0 0 40%;z-index:-2;width:60%;height:100%;object-fit:cover;object-position:center}.hero:after{position:absolute;inset:0;content:"";z-index:-1;background:linear-gradient(90deg,#0b0e0d 0%,rgba(11,14,13,.98) 29%,rgba(11,14,13,.83) 44%,rgba(11,14,13,.25) 74%,rgba(11,14,13,.12))}.hero-body{padding-block:58px;max-width:650px}.hero h1{font-size:clamp(2.25rem,4.25vw,3.7rem);line-height:1.05;max-width:620px;margin:18px 0}.hero p{max-width:520px;color:#dce4df;font-size:1.04rem;line-height:1.6;margin-bottom:24px}.hero h1 a{color:inherit}.tag{display:inline-block;border-radius:6px;background:var(--green);color:#0b0e0d;font-size:.68rem;line-height:1.2;font-weight:800;text-transform:uppercase;letter-spacing:.035em;padding:6px 9px}.btn,.search-submit{display:inline-flex;align-items:center;justify-content:center;gap:10px;color:var(--bg);background:var(--green);font-weight:750;border:1px solid var(--green);padding:11px 18px;border-radius:8px;line-height:1.3;font-size:.91rem}.btn:hover,.search-submit:hover{background:#a0ff8d;text-decoration:none}.btn-outline{background:transparent;color:var(--green);border-color:#416849}.btn-outline:hover{background:#183c23;color:var(--ink)}.accent{color:var(--green)}.section{padding:35px 0}.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:18px;margin-bottom:16px}.section-head h2{margin:0}.section-head a{font-size:.9rem;font-weight:650}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.news-card{background:linear-gradient(150deg,#18211d,#111715);border:1px solid #233028;border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;min-width:0;transition:transform .2s,border-color .2s}.news-card:hover{transform:translateY(-3px);border-color:#477847}.card-image{position:relative;display:block;aspect-ratio:16/9;background:radial-gradient(ellipse at 68% 18%,#17432a,#12201a 48%,#0b100d 95%);overflow:hidden}.card-image img{width:100%;height:100%;object-fit:cover}.image-fallback{position:absolute;inset:0;display:grid;place-items:center;color:#6cac6b;opacity:.5}.image-fallback .icon{width:48px;height:48px}.card-body{padding:18px;display:flex;flex:1;flex-direction:column;align-items:flex-start}.card-body .tag{margin-top:-31px;position:relative;margin-bottom:13px;border:2px solid #121b15}.card-body h3{margin:0 0 12px;font-size:1.14rem;line-height:1.35}.card-body h3 a{color:var(--ink)}.card-body p{color:var(--muted);font-size:.9rem}.meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:.77rem;margin-top:auto}.meta .icon{width:15px;height:15px;color:var(--green)}.dot{color:var(--green)}.weekly{background:linear-gradient(100deg,#10391c,#101f16 80%);border:1px solid #24492d;border-radius:var(--radius);padding:26px 30px;display:flex;align-items:center;gap:22px;margin-block:8px 20px}.weekly>.icon{width:48px;height:48px;color:var(--green)}.weekly h2{margin:0 0 4px;font-size:1.65rem}.weekly p{margin:0;color:#d3ddd5;font-size:.92rem}.weekly .btn{margin-left:auto;white-space:nowrap}.category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.category-tile{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:24px 12px;background:#111916;border:1px solid var(--line);border-radius:12px;color:var(--ink)}.category-tile:hover{border-color:var(--green);text-decoration:none}.category-tile .icon{width:30px;height:30px;color:var(--green)}.category-tile strong{font-family:var(--head);font-size:1.05rem}.category-tile small{color:var(--muted);line-height:1.45}.site-footer{border-top:1px solid var(--line);margin-top:32px;background:#080c0a;padding:38px 0 24px}.footer-row{display:flex;justify-content:space-between;gap:36px}.footer-intro{max-width:430px}.footer-intro img{width:190px;margin-bottom:15px}.footer-intro p,.footer-bottom{font-size:.86rem;color:var(--muted)}.footer-nav ul{list-style:none;padding:0;margin:0;display:grid;gap:8px}.footer-nav a{color:var(--ink);font-size:.9rem}.footer-bottom{margin-top:28px;padding-top:16px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap}.archive-head{padding:46px 0 12px}.archive-head p{color:var(--muted)}.article-wrap{max-width:860px;margin:auto;padding-top:48px}.article-wrap h1{margin-top:14px;line-height:1.12}.article-wrap .meta{margin:16px 0 24px}.article-lead{font-size:1.22rem;color:#d3dfd7;line-height:1.55}.article-cover{margin:26px 0;border-radius:14px;overflow:hidden}.article-cover img{width:100%}.article-cover figcaption{font-size:.82rem;color:var(--muted);padding:8px 0}.entry-content{font-size:1.06rem;line-height:1.85;max-width:760px;margin:0 auto 40px}.entry-content h2,.entry-content h3{margin:1.6em 0 .7em}.entry-content a{text-decoration:underline}.entry-content blockquote{border-left:3px solid var(--green);margin:1.5em 0;padding:.6em 1.2em;background:#121d16}.entry-content img{border-radius:8px}.entry-content table{border-collapse:collapse;width:100%}.entry-content td,.entry-content th{border:1px solid var(--line);padding:8px}.entry-content pre{overflow:auto;background:#18231d;padding:16px}.entry-content .alignwide{max-width:100%}.article-cats{display:flex;gap:8px;flex-wrap:wrap}.article-cats a{border:1px solid var(--line);border-radius:6px;padding:4px 9px;font-size:.83rem}.search-form{display:flex;gap:8px}.search-field{min-width:0;width:100%;color:var(--ink);background:#101713;border:1px solid #3e5245;padding:10px 12px;border-radius:7px}.pagination{margin:32px 0}.nav-links{display:flex;gap:10px;flex-wrap:wrap}.page-numbers{display:inline-flex;padding:7px 12px;border:1px solid var(--line);border-radius:7px}.page-numbers.current{background:var(--green);color:var(--bg)}.empty{background:#121b16;border:1px solid var(--line);border-radius:12px;padding:25px;color:var(--muted)}.ad-slot{margin:22px auto;text-align:center;min-height:0}.ad-slot:empty{display:none}.ad-label{color:var(--muted);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase}.wp-block-image figcaption{color:var(--muted)}.wp-block-embed iframe{max-width:100%}.aligncenter{margin-left:auto;margin-right:auto}.alignleft{float:left;margin:0 1rem 1rem 0}.alignright{float:right;margin:0 0 1rem 1rem}.wp-caption{max-width:100%}.gallery-caption,.bypostauthor,.sticky{color:inherit}.comment-list{padding-left:1.25rem}.comment-form textarea{max-width:100%;width:100%;color:var(--ink);background:var(--surface);border:1px solid var(--line)}.comment-form input{max-width:100%;color:var(--ink);background:var(--surface);border:1px solid var(--line);padding:8px}.comment-form .submit{background:var(--green);color:var(--bg);border:0;padding:10px 18px;border-radius:7px}
@media(max-width:1000px){.header-row{gap:16px}.brand img,.custom-logo{width:185px}.primary-nav ul{gap:15px}.primary-nav a{font-size:.83rem}.hero-body{max-width:560px}.grid{gap:13px}}@media(max-width:780px){.wrap{width:calc(100% - 32px)}.header-row{min-height:68px;flex-wrap:wrap;gap:0}.header-search{margin-left:auto}.menu-toggle{display:block}.primary-nav{display:none;order:4;width:100%;margin:0;padding:0 0 16px}.primary-nav.is-open{display:block}.primary-nav ul{display:flex;flex-direction:column;align-items:flex-start;gap:0}.primary-nav li{width:100%}.primary-nav a{display:block;padding:9px 0;font-size:1rem}.hero{min-height:410px}.hero-media{inset:0;width:100%;height:100%;opacity:.62}.hero:after{background:linear-gradient(90deg,rgba(11,14,13,.97),rgba(11,14,13,.62)),linear-gradient(0deg,#0b0e0d,transparent 40%)}.hero-body{padding-block:42px}.hero h1{font-size:clamp(2rem,7vw,3rem)}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.weekly{padding:22px;flex-wrap:wrap;gap:12px}.weekly>.icon{width:35px;height:35px}.weekly .btn{margin-left:0}.footer-row{flex-direction:column;gap:18px}.article-wrap{padding-top:32px}}@media(max-width:480px){.grid{grid-template-columns:1fr;gap:18px}.card-body{padding:17px}.section{padding:26px 0}.section-head h2{font-size:1.35rem}.section-head a{font-size:.8rem}.brand img,.custom-logo{width:170px}.hero p{font-size:.95rem}.hero{min-height:380px}.category-tile{padding:18px 9px}.article-wrap h1{font-size:2.1rem}.weekly h2{font-size:1.35rem}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Version 1.1: approved centered homepage layout. */
.wrap{width:calc(100% - 64px);max-width:1220px;margin-inline:auto}
.site-header .header-row{min-height:78px;gap:24px}.primary-nav{margin-left:auto}.header-search{margin-left:10px}
.cm-home{width:100%;max-width:none;margin:0 auto;padding-top:24px}
.cm-home .hero{display:grid;align-items:center;width:calc(100% - 64px);max-width:1220px;margin:0 auto;min-height:420px;border:1px solid #27372e;border-radius:14px;background:radial-gradient(ellipse at 75% 25%,#12371f,#0b0e0d 70%)}
.cm-home .hero .wrap{width:100%;max-width:none;margin:0}
.cm-home .hero-media{inset:0 0 0 auto;width:62%;height:100%;object-position:50% 50%;mask-image:linear-gradient(90deg,transparent 0%,#000 33%);-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 33%)}
.cm-home .hero:after{background:linear-gradient(90deg,#0b0e0d 0%,#0b0e0d 30%,rgba(11,14,13,.96) 38%,rgba(11,14,13,.5) 54%,rgba(11,14,13,.12) 78%,rgba(11,14,13,.04) 100%)}
.cm-home .hero-body{padding:46px 36px;max-width:59%}.cm-home .hero h1{font-size:clamp(2.15rem,3.8vw,3.5rem);max-width:620px;line-height:1.09}.cm-home .hero p{max-width:490px}
.cm-home .section{padding:28px 0}.cm-home .grid{width:100%;gap:18px}.cm-home .news-card{height:100%}.cm-home .card-body h3{font-size:1.15rem}.cm-home .weekly{padding:22px 26px;margin-top:0;margin-bottom:0}
@media(max-width:1000px){.wrap,.cm-home .hero{width:calc(100% - 40px)}.cm-home .hero-body{padding:36px 24px;max-width:65%}.site-header .header-row{gap:12px}.cm-home .grid{gap:12px}}
@media(max-width:780px){.wrap,.cm-home .hero{width:calc(100% - 32px)}.site-header .header-row{gap:0;min-height:68px}.header-search{margin-left:auto}.cm-home{padding-top:16px}.cm-home .hero-media{width:100%;inset:0;opacity:.56;mask-image:none;-webkit-mask-image:none}.cm-home .hero:after{background:linear-gradient(90deg,rgba(11,14,13,.96),rgba(11,14,13,.5)),linear-gradient(0deg,#0b0e0d,transparent 40%)}.cm-home .hero-body{max-width:100%;padding:44px 24px}.cm-home .weekly{padding:20px}}
@media(max-width:480px){.cm-home .hero{min-height:0}.cm-home .hero h1{font-size:2rem}.cm-home .hero-body{padding:32px 18px}.cm-home .grid{gap:18px}}


/* Casinolle Media 1.2.0 — article typography and accessible wide tables.
   Homepage, branding, headers and theme options inherited unchanged from 1.1. */

/* Maintain an easy-to-read column even for long research articles. */
.article-wrap { max-width: 910px; }
.article-wrap > header { max-width: 840px; margin-inline: auto; }
.article-wrap > header h1 {
  font-size: clamp(2.15rem, 3.6vw, 3.14rem);
  line-height: 1.13;
  letter-spacing: -.038em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.article-wrap .article-lead {
  max-width: 800px;
  font-size: clamp(1.08rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}
.article-wrap > header .meta { row-gap: 6px; }
.article-cover { max-width: 910px; margin: 30px auto 34px; }
.article-cover img { width: 100%; height: auto; }
.entry-content {
  max-width: 760px;
  font-size: 1.075rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote { margin-bottom: 1.35em; }
.entry-content h2 {
  font-size: clamp(1.5rem, 2.05vw, 1.9rem);
  line-height: 1.28;
  margin: 2em 0 .68em;
  overflow-wrap: break-word;
}
.entry-content h3 {
  font-size: clamp(1.17rem, 1.55vw, 1.36rem);
  line-height: 1.36;
  margin: 1.65em 0 .58em;
  overflow-wrap: break-word;
}
.entry-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* The JS enhancement wraps tables without rewriting their WordPress content.
   On desktop the report table can break out of the narrow reading column;
   on mobile only the table scrolls horizontally, never the entire page. */
.entry-content .cm-table-frame {
  width: min(1080px, calc(100vw - 48px));
  max-width: none;
  margin: 2rem 0 2.4rem 50%;
  transform: translateX(-50%);
  min-width: 0;
  overflow-wrap: normal;
}
.entry-content .cm-table-scroller {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid #304338;
  border-radius: 12px;
  background: #0e1511;
  scrollbar-color: #487957 #0e1511;
  scrollbar-width: thin;
}
.entry-content .cm-table-scroller:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
.entry-content .cm-table-scroller > figure.wp-block-table,
.entry-content .cm-table-scroller > div.wp-block-table {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
}
.entry-content .cm-table-scroller table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 940px;
  margin: 0;
  table-layout: auto;
  font-size: .91rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: normal;
}
.entry-content .cm-table-scroller th,
.entry-content .cm-table-scroller td {
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #304038;
  border-right: 1px solid #304038;
  vertical-align: top;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
}
.entry-content .cm-table-scroller th:last-child,
.entry-content .cm-table-scroller td:last-child { border-right: 0; }
.entry-content .cm-table-scroller tbody tr:last-child > * { border-bottom: 0; }
.entry-content .cm-table-scroller th {
  background: #15241b;
  color: #f4f6f2;
  font-weight: 800;
  line-height: 1.45;
}
.entry-content .cm-table-scroller td { color: #e0e9e2; }
.entry-content .cm-table-scroller tbody tr:nth-child(even) { background: #111b15; }
.entry-content .cm-table-scroller tbody tr:hover { background: #18251c; }
.entry-content .cm-license-table th:first-child,
.entry-content .cm-license-table td:first-child { min-width: 188px; }
.entry-content .cm-license-table th:nth-child(2),
.entry-content .cm-license-table td:nth-child(2) {
  min-width: 156px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.entry-content .cm-license-table th:nth-child(3),
.entry-content .cm-license-table td:nth-child(3) { min-width: 265px; }
.entry-content .cm-license-table th:nth-child(4),
.entry-content .cm-license-table td:nth-child(4) { min-width: 230px; }
.entry-content .cm-table-scroller figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: .85rem;
}
.cm-table-hint {
  display: none;
  margin: 8px 0 0;
  color: #b8cbbd;
  font-size: .81rem;
  line-height: 1.5;
  text-align: left;
}
@media (max-width: 780px) {
  .article-wrap { padding-top: 30px; }
  .article-wrap > header h1 { font-size: clamp(1.95rem, 6.5vw, 2.65rem); }
  .entry-content { font-size: 1.02rem; line-height: 1.85; }
  .entry-content .cm-table-frame {
    width: calc(100vw - 32px);
    margin-top: 1.5rem;
    margin-bottom: 2rem;
  }
  .entry-content .cm-table-scroller table { min-width: 900px; font-size: .89rem; }
  .cm-table-hint { display: block; }
}
@media (max-width: 480px) {
  .article-wrap > header h1 { font-size: clamp(1.86rem, 7.9vw, 2.2rem); line-height: 1.16; }
  .article-wrap .article-lead { font-size: 1.06rem; }
  .article-cover { margin-top: 22px; margin-bottom: 26px; }
  .entry-content { font-size: 1rem; line-height: 1.83; }
  .entry-content h2 { font-size: 1.48rem; }
  .entry-content h3 { font-size: 1.19rem; }
  .entry-content .cm-table-scroller th,
  .entry-content .cm-table-scroller td { padding: 11px 12px; }
}
