/* «Історія в літературі» — стрічка часу: твори шкільної програми на тлі історії України. Усі класи з префіксом zih-. (mu-plugins/zno-istoriia.php) */

/* сторінка стрічки на всю ширину: без бічної колонки */
.zno-istoriia-page #secondary { display: none; }
body.zno-istoriia-page .content-area,
body.zno-istoriia-page .site-main { float: none; width: auto; max-width: none; }

.zih { --red: #ff2b2b; --red-ink: #b0281c; --ink: #1f2328; --muted: #5b6470; --bg: #f6f9fc; --panel: #fff; --line: #d6e3ee;
  --k-theme: #d9412f; --k-allegory: #7d4fc9; --k-context: #1f7fbf; --k-fate: #b87400; --love: #d6336c;
  --ep-a: #eaf1f8; --ep-b: #f7f9fc; --ev: #5b6470; --sel: #f5b301;
  max-width: 860px; margin: 1.2em auto 2em; color: var(--ink); line-height: 1.5; -webkit-hyphens: manual; hyphens: manual; }
.zih *, .zih *::before, .zih *::after { box-sizing: border-box; }
.zih ul, .zih ol, .entry-content .zih ul, .entry-content .zih ol { margin: 0; padding: 0; list-style: none; }
.zih li, .entry-content .zih li { margin: 0; }
.zih p { margin: 0; }
.zih a, .entry-content .zih a { color: var(--red-ink); box-shadow: none; border: 0; }
.zih h2 { margin: 0 0 .5em; padding: 0; border: 0; font: 500 1.3em/1.25 Oswald, sans-serif; }
.zih h3 { margin: 0; padding: 0; border: 0; font: 500 1.08em/1.3 Oswald, sans-serif; }

/* the theme paints every button:hover/:focus — reset */
.zih button { width: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; line-height: inherit;
  text-transform: none; letter-spacing: normal; text-align: inherit; box-shadow: none; transition: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.zih button:hover, .zih button:focus { background: none; color: inherit; border: 0; box-shadow: none; outline: none; }
.zih button:focus-visible, .zih [tabindex]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.zih-lead { font-size: 1.02em; margin-bottom: 1em !important; }

/* tabs */
.zih-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.zih .zih-tab { font: 500 16px/1.2 Oswald, sans-serif; letter-spacing: .02em; padding: 9px 16px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); color: var(--ink); }
.zih .zih-tab:hover { background: var(--bg); border: 1px solid #b9cbdb; }
.zih .zih-tab[aria-selected="true"], .zih .zih-tab[aria-selected="true"]:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* legend + filters */
.zih-filters { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 0 0 10px; font-size: 14px; }
.zih-filters__label { color: var(--muted); margin-right: 2px; }
.zih .zih-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 14px; line-height: 1.3; color: var(--ink); }
.zih .zih-chip:hover { border: 1px solid #9fb4c7; background: #fff; }
.zih .zih-chip[data-kind][aria-pressed="false"] { opacity: .45; }
.zih .zih-chip--love[aria-pressed="true"], .zih .zih-chip--love[aria-pressed="true"]:hover { background: var(--love); color: #fff; border-color: var(--love); }
.zih .zih-chip--love[aria-pressed="true"] .zih-heart { color: #fff; }
.zih-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.zih-dot--theme { background: var(--k-theme); } .zih-dot--allegory { background: var(--k-allegory); }
.zih-dot--context { background: var(--k-context); } .zih-dot--fate { background: var(--k-fate); }
.zih-heart { color: var(--love); font-size: 13px; line-height: 1; }

/* chart */
.zih-chart { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 0 4px; scroll-margin-top: 76px; }
.zih-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.zih-scroll svg { display: block; width: 100%; min-width: 760px; height: auto; }
.zih-chart__hint { display: none; font-size: 12px; color: var(--muted); text-align: center; padding: 2px 0 4px; }
@media (max-width: 800px) { .zih-chart__hint { display: block; } }
.zih svg text { font-family: Roboto, system-ui, sans-serif; }
.zih-ep { stroke: none; }
.zih-ep--a { fill: var(--ep-a); } .zih-ep--b { fill: var(--ep-b); }
.zih-ep-name { font-size: 11px; fill: #44505c; font-weight: 500; }
.zih-axis { stroke: #b8c6d3; stroke-width: 1; }
.zih-tick { font-size: 11px; fill: var(--muted); }
.zih-lane-name { font-size: 10px; fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.zih-ev { fill: var(--ev); cursor: pointer; }
.zih-ev:hover, .zih-ev.is-hl { fill: var(--ink); }
.zih-ev.is-sel { fill: var(--sel); stroke: var(--ink); stroke-width: 1.5; }
.zih-set { fill: var(--sel); opacity: .35; }
.zih-arc { fill: none; stroke-width: 1.3; opacity: .28; pointer-events: none; }
.zih-arc.is-sel { opacity: 1; stroke-width: 2.4; }
.zih-w { cursor: pointer; stroke: #fff; stroke-width: 1.5; }
.zih-w--theme { fill: var(--k-theme); } .zih-w--allegory { fill: var(--k-allegory); }
.zih-w--context { fill: var(--k-context); } .zih-w--fate { fill: var(--k-fate); }
.zih-arc--theme { stroke: var(--k-theme); } .zih-arc--allegory { stroke: var(--k-allegory); }
.zih-arc--context { stroke: var(--k-context); } .zih-arc--fate { stroke: var(--k-fate); }
.zih-w:hover { stroke: var(--ink); }
.zih-w.is-sel { stroke: var(--ink); stroke-width: 2.5; }
.zih-w.is-off, .zih-arc.is-off { opacity: .12; }
.zih-w.is-off { pointer-events: none; }
.zih-wl { font-size: 10.5px; fill: var(--ink); pointer-events: none; }
.zih-guide { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; }

/* tooltip */
.zih-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.35;
  padding: 6px 9px; border-radius: 8px; max-width: 260px; transform: translate(-50%, calc(-100% - 10px)); white-space: normal; }
.zih-tip[hidden] { display: none; }
.zih-tip b { font-weight: 500; }

/* detail panel and cards */
.zih-panel { margin: 12px 0 0; }
.zih-empty { padding: 14px 16px; border: 1px dashed #b9cbdb; border-radius: 12px; color: var(--muted); font-size: 15px; }
.zih-card { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--kc, var(--line)); border-radius: 12px; padding: 14px 16px; }
.zih-card--theme { --kc: var(--k-theme); } .zih-card--allegory { --kc: var(--k-allegory); }
.zih-card--context { --kc: var(--k-context); } .zih-card--fate { --kc: var(--k-fate); }
.zih-card--event { --kc: var(--ev); }
.zih-card__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.zih-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: #33404c; }
.zih-badge--kind { color: #fff; background: var(--kc); }
.zih-badge--love { color: var(--love); background: #fde7ef; }
.zih-badge--int { background: #fff3d6; color: #7a5200; }
.zih-card__title { font: 500 1.2em/1.25 Oswald, sans-serif; }
.zih-card__author { color: var(--muted); }
.zih-years { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 10px; font-size: 14px; }
.zih-years b { font-weight: 500; }
.zih-gap { color: #7a5200; }
.zih-card dl { margin: 0; }
.zih-card dt { font-weight: 500; font-size: 14px; color: #33404c; margin-top: 8px; }
.zih-card dd { margin: 2px 0 0; }
.zih-quote { margin: 10px 0 2px !important; padding: 4px 0 4px 12px !important; border-left: 3px solid var(--kc); font-style: italic; color: #2c333a; background: none !important; font-size: 1em !important; }
.zih-quote::before, .zih-quote::after { content: none !important; }
.zih-quote small { font-style: normal; color: var(--muted); font-size: 12px; }
.zih-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.zih .zih-evlink { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.zih .zih-evlink:hover { border: 1px solid #9fb4c7; background: var(--bg); }
.zih-card__foot { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* list by epochs */
.zih-list { margin-top: 26px; }
.zih-list__head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.zih-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14px; }
.zih .zih-seg button { padding: 5px 11px; background: #fff; }
.zih .zih-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.zih-epoch { margin-top: 18px; }
.zih-epoch__head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding-bottom: 4px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.zih-epoch__years { color: var(--muted); font-size: 14px; }
.zih-epoch__events { font-size: 14px; color: #33404c; margin-bottom: 8px; }
.zih-epoch__events li { display: inline; }
.zih-epoch__events li + li::before { content: " · "; color: var(--muted); }
.zih-rows { display: grid; gap: 8px; }
.zih .zih-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-left: 4px solid var(--kc); border-radius: 10px; background: #fff; text-align: left; }
.zih .zih-row:hover { border-color: #9fb4c7; border-left-color: var(--kc); background: #fff; }
.zih-row--theme { --kc: var(--k-theme); } .zih-row--allegory { --kc: var(--k-allegory); }
.zih-row--context { --kc: var(--k-context); } .zih-row--fate { --kc: var(--k-fate); }
.zih-row__y { font: 500 15px/1.3 Oswald, sans-serif; }
.zih-row__y small { display: block; font: 12px/1.3 Roboto, sans-serif; color: var(--muted); }
.zih-row__t { font-weight: 500; }
.zih-row__a { color: var(--muted); font-size: 14px; }
.zih-row__w { display: block; font-size: 14px; color: #33404c; margin-top: 2px; }

/* authors view */
.zih-al { font-size: 11.5px; fill: var(--ink); }
.zih-anames__bg { fill: var(--panel); }
.zih-anames.is-moved { filter: drop-shadow(4px 0 3px rgba(0, 0, 0, .06)); }
.zih-life { stroke: #9fb0c0; stroke-width: 2; }
.zih-aguide { stroke: #b4c2cf; stroke-width: 1; stroke-dasharray: 2 3; }
.zih-start { cursor: pointer; }
.zih-start line { stroke: #9fb0c0; stroke-width: 2; }
.zih-start text { font-size: 10.5px; fill: #7a8693; }
.zih-m--prison { stroke: #8f1d14; stroke-width: 6; stroke-linecap: butt; }
.zih-m--emig { stroke: #1f7fbf; stroke-width: 4; stroke-dasharray: 4 3; }
.zih-m--silence { stroke: #9aa5b1; stroke-width: 6; stroke-dasharray: 2 2; }
.zih-m--arrest { fill: #8f1d14; }
.zih-end { cursor: pointer; }
.zih-end line { stroke: #5b6470; stroke-width: 2; }
.zih-end text { font-size: 11px; fill: #5b6470; }
.zih-end--violent line { stroke: #c62828; stroke-width: 3; }
.zih-end--violent text { fill: #b0281c; font-weight: 700; }
.zih-akey__end { font: 400 12px Roboto, system-ui, sans-serif; color: #5b6470; border-left: 2px solid #5b6470; padding-left: 4px; }
.zih-akey__end--violent { color: #b0281c; font-weight: 700; border-left: 3px solid #c62828; }
.zih-m--note { fill: #fff; stroke: #33404c; stroke-width: 1.5; }
.zih-m { cursor: pointer; }
.zih-keyline { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; opacity: .35; }
.zih-keylabel { font-size: 10px; fill: var(--muted); }
.zih-akey { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #33404c; margin: 0 0 10px; }
.zih-akey span { display: inline-flex; align-items: center; gap: 6px; }
.zih-akey i { display: inline-block; width: 22px; height: 6px; }

/* quiz */
.zih-quiz { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.zih-q__n { color: var(--muted); font-size: 14px; }
.zih-q__text { font: 500 1.15em/1.35 Oswald, sans-serif; margin: 6px 0 12px !important; }
.zih-opts { display: grid; gap: 8px; }
.zih .zih-opt { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; width: 100%; }
.zih .zih-opt:hover { background: #fff; border: 1px solid #9fb4c7; }
.zih .zih-opt.is-ok, .zih .zih-opt.is-ok:hover { background: #dcf5e3; border-color: #1a7f37; }
.zih .zih-opt.is-bad, .zih .zih-opt.is-bad:hover { background: #fde2e2; border-color: #c62828; }
.zih .zih-opt:disabled { cursor: default; color: var(--ink); }
.zih-q__why { margin-top: 12px !important; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 15px; }
.zih-q__nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.zih .zih-btn { font: 500 16px/1.2 Oswald, sans-serif; letter-spacing: .03em; border-radius: 10px; padding: 10px 20px;
  background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-ink); }
.zih .zih-btn:hover, .zih .zih-btn:focus { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-ink); }
.zih-score { font: 500 1.4em Oswald, sans-serif; }

.zih-about { margin-top: 28px; font-size: 15px; color: #33404c; }
.zih-about p + p { margin-top: .6em; }
/* статичний список для читачів без JS (JS його замінює) */
.zih-static h3 { margin: 1em 0 .3em; font: 500 1.1em/1.3 Oswald, sans-serif; }
.zih-static li { margin: .35em 0; }

@media (max-width: 520px) {
  .zih-card { padding: 12px; }
  .zih .zih-row { grid-template-columns: 58px 1fr; padding: 8px 10px; }
  .zih .zih-tab { padding: 8px 12px; font-size: 15px; }
}
