/* Approved homepage design. */
body[data-main-home] {
    --sample-accent:var(--g-primary,var(--portal-primary,var(--c-accent,#21664c)));
    --sample-ink:var(--g-text,var(--portal-text,var(--c-text,#222b29)));
    --sample-paper:var(--g-surface,var(--portal-surface,var(--c-surface,#fff)));
    --sample-line:var(--g-border,var(--portal-border,var(--c-border,#e2e7e4)));
    background:var(--g-bg,#f4f6f5); color:var(--sample-ink);
}
body[data-main-home="ahoj"] { background:#f3f6fa; --sample-line:#dde5ef; }
body[data-main-home="szia"] { background:#f2f5f1; --sample-line:#dce6dd; }
body[data-main-home] :is(.gn_board_layout,.portal_main_grid) { gap:28px; align-items:flex-start; }
body[data-main-home] :is(.gn_hero,.main_banner,#main_bn_box) { border-radius:16px; box-shadow:none; margin-bottom:22px; }
body[data-main-home] :is(.gn_news,.kh_home .gn_news) { border:1px solid var(--sample-line); border-top:3px solid var(--sample-accent); border-radius:0 0 14px 14px; box-shadow:none; padding:22px; }
body[data-main-home] .gn_news .gn_section_head { border-bottom:1px solid var(--sample-line); padding-bottom:14px; }
body[data-main-home] .gn_news_item { min-height:46px; }
body[data-main-home] :is(.gn_news_clock,.gn_news_meta) { font-variant-numeric:tabular-nums; }
body[data-main-home] :is(.gn_news_more,.gn_section_more,.gn_more,.kh_tabs_more,.kh_panel_head>a,.lt_more) { font-weight:600; }
.sample_directory { display:flex; align-items:center; gap:22px; margin:22px 0 26px; padding:20px 0; border-top:1px solid var(--sample-line); border-bottom:1px solid var(--sample-line); }
.sample_directory_title { flex:0 0 auto; }
.sample_directory_title span { display:block; font-size:10px; font-weight:700; letter-spacing:.15em; color:var(--sample-accent); margin-bottom:5px; }
.sample_directory_title h2 { font-size:20px; font-weight:800; letter-spacing:-.04em; margin:0; }
.sample_directory nav { flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; min-width:0; }
.sample_directory nav a { min-height:48px; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:6px; padding:10px 12px; border-radius:9px; background:var(--sample-paper); border:1px solid var(--sample-line); color:var(--sample-ink); font-size:12px; font-weight:650; text-decoration:none; }
.sample_directory nav a span { color:var(--sample-accent); font-size:16px; }
.sample_directory nav a:hover { border-color:var(--sample-accent); color:var(--sample-accent); }
body[data-main-home] :is(.gn_section,.gn_tabs,.kh_panel) { border:1px solid var(--sample-line); box-shadow:none; border-radius:14px; background:var(--sample-paper); }
body[data-main-home] :is(.gn_section_head,.kh_panel_head) h2 { font-size:19px; letter-spacing:-.04em; }
body[data-main-home] .gn_section_head { border-bottom:1px solid var(--sample-line); padding-bottom:10px; }
body[data-main-home] .gn_section { padding:22px; }
body[data-main-home] .kh_panel { padding:22px; }
body[data-main-home] .kh_panel_desc { color:#64748b; font-size:12px; }
body[data-main-home] :is(.gn_half_row,.kh_rows) { gap:20px; margin-bottom:22px; }
body[data-main-home] :is(.gn_tab_nav,.kh_tabs_head) { background:transparent; border-bottom-color:var(--sample-line); }
body[data-main-home] .gn_tab_nav { padding:0 18px; gap:8px; }
body[data-main-home] .gn_tab_nav button { padding:16px 10px; font-size:15px; }
body[data-main-home] :is(.gn_widget_box,.widget_box,#ol_before,#ol_after,.ahoj_settle,.settle_box) { box-shadow:none; border-color:var(--sample-line); border-radius:14px; }
body[data-main-home] :is(.mk_thumb,.biz_thumb) { border-radius:9px; }
body[data-main-home] :is(.mk_card,.biz_card) { transition:border-color .15s; }
body[data-main-home] .kh_cards_biz { border-top:3px solid var(--sample-accent); }
/* Szia keeps its own sidebar; the study gives business and market their own rows. */
body[data-main-home="szia"] #container { background:transparent; box-shadow:none; border:0; padding:0; }
body[data-main-home="szia"] .idx_cnt { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
body[data-main-home="szia"] .idx_cnt::after { display:none; }
body[data-main-home="szia"] .idx_cnt>.lt_li { float:none; width:auto; margin:0; min-width:0; }
body[data-main-home="szia"] .idx_cnt>.lt_li:has(.lt_biz),body[data-main-home="szia"] .idx_cnt>.lt_li:has(.lt_market) { grid-column:1/-1; }
body[data-main-home="szia"] .idx_cnt>.lt_li>.lt,body[data-main-home="szia"] .idx_cnt>.lt_tab { margin:0; height:100%; border:1px solid var(--sample-line); border-radius:14px; background:#fff; padding:20px; box-shadow:none; }
body[data-main-home="szia"] .idx_cnt .lt_title { font-size:19px; letter-spacing:-.04em; }
body[data-main-home="szia"] .lt_tab_pane .lt { border:0; box-shadow:none; padding:0; margin:0; }
body[data-main-home="szia"] .lt_tab_nav button { font-size:16px; }
body[data-main-home="szia"] .lt_market .mk_grid_latest { grid-template-columns:repeat(4,minmax(0,1fr)); }
body[data-main-home="szia"] .idx_stat_bar { margin-top:22px; }
@media(max-width:1023px) {
    .sample_directory { gap:16px; }
    body[data-main-home] :is(.gn_board_side,.grid_right) { gap:18px; }
}
@media(max-width:640px) {
    body[data-main-home] :is(.gn_hero,.main_banner,#main_bn_box) { border-radius:12px; margin-bottom:16px; }
    body[data-main-home] :is(.gn_news,.kh_home .gn_news,.gn_section,.kh_panel) { padding:16px; border-radius:12px; }
    .sample_directory { display:block; margin:18px 0 20px; padding:16px 0; }
    .sample_directory_title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
    .sample_directory_title span { font-size:9px; margin:0; order:1; }
    .sample_directory_title h2 { font-size:18px; }
    .sample_directory nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .sample_directory nav a { min-height:46px; font-size:13px; }
    body[data-main-home] :is(.gn_section_head,.kh_panel_head) h2 { font-size:18px; }
    body[data-main-home] .gn_tab_nav { padding:0 8px; gap:0; }
    body[data-main-home] .gn_tab_nav button { font-size:13px; padding:13px 9px; }
    body[data-main-home="szia"] .idx_cnt { grid-template-columns:minmax(0,1fr); gap:16px; }
    body[data-main-home="szia"] .idx_cnt>.lt_li>.lt,body[data-main-home="szia"] .idx_cnt>.lt_tab { padding:16px; }
    body[data-main-home="szia"] .lt_market .mk_grid_latest { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce) { body[data-main-home] * { transition:none!important; } }

/* Main card sections: breathing room around headings and between rows. */
body[data-main-home] :is(.gn_section,.gn_tabs,.kh_cards):has(.home_roll,.hd_roll){margin-bottom:28px}
body[data-main-home] :is(.gn_section,.kh_cards):has(.home_roll,.hd_roll){padding:26px}
body[data-main-home="szia"] .idx_cnt>.lt_li:has(.home_roll)>.lt{padding:26px}
@media(max-width:640px){
 body[data-main-home] :is(.gn_section,.gn_tabs,.kh_cards):has(.home_roll,.hd_roll){margin-bottom:20px}
 body[data-main-home] :is(.gn_section,.kh_cards):has(.home_roll,.hd_roll),body[data-main-home="szia"] .idx_cnt>.lt_li:has(.home_roll)>.lt{padding:18px}
}

/* Main sidebar: members level 9 and above, desktop and mobile. */
body[data-main-home] .home_recent_posts { margin:0 0 20px; padding:16px; border:1px solid var(--sample-line,#e2e7e3); border-radius:14px; background:var(--sample-paper,#fff); min-width:0; }
body[data-main-home] .home_recent_head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
body[data-main-home] .home_recent_head h2 { margin:0; font-size:15px; font-weight:700; color:var(--sample-ink,#24332a); }
body[data-main-home] .home_recent_head>a { display:inline-flex; align-items:center; min-height:36px; font-size:12px; color:var(--sample-accent,#286b50); }
body[data-main-home] .home_recent_posts ul { list-style:none; margin:0; padding:0; }
body[data-main-home] .home_recent_posts li+li { border-top:1px solid var(--sample-line,#e2e7e3); }
body[data-main-home] .home_recent_posts li>a { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; padding:10px 0; text-decoration:none; }
body[data-main-home] .home_recent_board { grid-column:1/-1; font-size:11px; color:var(--sample-accent,#286b50); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body[data-main-home] .home_recent_subject { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; color:var(--sample-ink,#24332a); }
body[data-main-home] .home_recent_posts time { font-size:11px; color:#78817b; }
body[data-main-home] .home_recent_posts a:hover .home_recent_subject { text-decoration:underline; }
body[data-main-home] .home_recent_empty { padding:16px 0; font-size:13px; color:#78817b; }
body[data-main-home] .home_recent_posts { width:100%; box-sizing:border-box; flex:0 0 auto; }

/* Five homepage statistics; keep the final item balanced on phones. */
@media (max-width: 768px) {
    body[data-main-home] .gn_stat_bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    body[data-main-home] .gn_stat_item { min-width:0; border-left:0; }
    body[data-main-home] .gn_stat_item:nth-child(even) { border-left:1px solid var(--sample-line,#e2e7e3); }
    body[data-main-home] .gn_stat_item:nth-child(n+3) { border-top:1px solid var(--sample-line,#e2e7e3); }
    body[data-main-home] .gn_stat_item:last-child { grid-column:1/-1; }
}

/* Compact main text lists; single padding layer for each clickable row. */
body[data-main-home="genau"] .gn_half_row{gap:16px;margin-bottom:16px;align-items:flex-start}
body[data-main-home="genau"] .gn_half_col>.gn_section{flex:0 0 auto;padding:18px 20px 12px}
body[data-main-home="genau"] .gn_section_head{margin-bottom:8px;padding-bottom:8px}
body[data-main-home="genau"] :is(.gn_section,.gn_tab_panel) .pl_item{min-height:44px;padding:0;gap:10px}
body[data-main-home="genau"] :is(.gn_section,.gn_tab_panel) .pl_link{box-sizing:border-box;min-height:44px;padding:10px 0;line-height:1.5}
body[data-main-home="genau"] :is(.gn_section,.gn_tab_panel) .pl_more{padding:8px 0;line-height:1.5}
body[data-main-home="genau"] .gn_tab_panel:has(>.pl_list){padding:0 20px 12px}
@media(max-width:640px){
 body[data-main-home="genau"] .gn_half_col>.gn_section{padding:16px 18px 10px}
 body[data-main-home="genau"] .gn_tab_panel:has(>.pl_list){padding:0 18px 10px}
}