/*
 * חתך — WordPress-only styles. chatakh.css is the prototype's compiled CSS; this file covers the places where
 * WordPress markup differs from the prototype's React markup:
 *   1. two-state icons the PHP prints both of (ticker pause/play, search open/close)
 *   2. article bodies made of core blocks (numbered chapters, FIG numbers, boxes as core/group)
 *   3. legal bodies made of core blocks (§ numbers, placeholders)
 *   4. links where the prototype has buttons (archive spectrum, empty state), admin bar, editor
 */

/* ── 1. Two-state icons ─────────────────────────────────────────────────── */
.ticker__pause .is-play, .ticker__pause[aria-pressed='true'] .is-pause { display: none; }
.ticker__pause[aria-pressed='true'] .is-play { display: block; }
.sigbar__icon .is-open, .sigbar__icon[aria-expanded='true'] .is-closed { display: none; }
.sigbar__icon[aria-expanded='true'] .is-open { display: block; }
.ticker__item a { color: inherit; }
.ticker__item a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; }
#chatakh-icons { display: none; }

/* ── 2. Article body (post content) ─────────────────────────────────────── */
.atext { counter-reset: sec fig; }
.atext > .wp-block-heading.asec__h { counter-increment: sec; scroll-margin-top: 90px; }
.atext > .wp-block-heading.asec__h:not(:first-child) { margin-top: clamp(48px, 5vw, 76px); }
.atext > .wp-block-heading.asec__h::before {
  content: counter(sec, decimal-leading-zero); flex: none; align-self: flex-start; margin-top: 6px;
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--paper); background: var(--ink); padding: 3px 7px;
}
.atext--inv > .wp-block-heading.asec__h::before { content: 'CH.' counter(sec, decimal-leading-zero); }
.atext > h3.wp-block-heading { margin: 28px 0 12px; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 26px; color: var(--ink); }

/* Figures: core/image.ab-fig with a caption, numbered FIG.01… */
.atext .wp-block-image.ab-fig { counter-increment: fig; margin: 36px 0; }
.atext .wp-block-image.ab-fig img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.atext .wp-block-image.ab-fig figcaption, .atext .wp-block-image figcaption {
  display: flex; gap: 12px; margin: 0; padding-top: 10px; border-top: 1px solid var(--ink);
  font-size: 14px; line-height: 1.5; text-align: start; color: var(--slate);
}
.atext .wp-block-image.ab-fig figcaption::before { content: 'FIG.' counter(fig, decimal-leading-zero); flex: none; direction: ltr; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.atext .wp-block-image.scan { background: none; }

/* Quote */
.atext .wp-block-quote.ab-quote { margin: 40px 0; padding: 4px 0; padding-inline-start: 24px; border: 0; border-inline-start: 6px solid var(--signal); }
.atext .wp-block-quote.ab-quote cite { display: block; font-style: normal; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--slate); }

/* Boxes are core/group blocks: the group div carries the class */
.atext .wp-block-group.ab-list ul, .atext .wp-block-group.ab-list .wp-block-list { padding: 0; }
.atext .wp-block-group.ab-steps ol { counter-reset: step; }
.atext .wp-block-group.ab-steps li { counter-increment: step; position: relative; display: block; padding: 16px 0; padding-inline-start: 64px; }
.atext .wp-block-group.ab-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; inset-inline-start: 0; top: 14px; font-family: var(--display); font-stretch: 62.5%; font-weight: 900; font-size: 40px; line-height: 0.8; color: var(--ink); }
.atext .wp-block-group.ab-steps li strong { display: block; margin-bottom: 4px; }
.atext .wp-block-group.ab-cmp .wp-block-table { margin: 0; overflow-x: auto; }
.atext .wp-block-group.ab-cmp .wp-block-table table { width: 100%; min-width: 520px; border-collapse: collapse; }
.atext .wp-block-group.ab-cmp .wp-block-table :is(td, th) { border: 0; border-bottom: 1px solid var(--rule); padding: 12px 14px; text-align: start; vertical-align: top; }
.atext .wp-block-group.ab-cmp .wp-block-table thead { border: 0; }
.atext .wp-block-group.ab-cmp .wp-block-table thead th { background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 13px; }
.atext .wp-block-group.ab-cmp .wp-block-table tbody td:first-child { font-weight: 600; color: var(--ink); }
.atext .wp-block-group.ab-q .wp-block-list { padding: 0; list-style: none; }
.atext .wp-block-group.ab-q li { list-style: none; }
.atext .wp-block-group.ab-claim .ab-claim__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.atext .wp-block-group.ab-alert .wp-block-list { padding-inline-start: 20px; }
.atext .ab-alert__sos a { font-family: var(--mono); color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.atext .wp-block-group { margin-block: 32px; }
.atext .wp-block-group > :last-child { margin-bottom: 0; }

/* ── 3. Legal body (post content) ───────────────────────────────────────── */
.ldoc__body { counter-reset: par; }
.ldoc__body > .wp-block-heading { counter-increment: par; display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; scroll-margin-top: 90px; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(26px, 2.2vw, 36px); line-height: 1.1; color: var(--ink); }
.ldoc__body > .wp-block-heading::before { content: '§' counter(par); direction: ltr; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--slate); }
.ldoc__body > .wp-block-heading:not(:first-child) { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.ldoc__body > p, .ldoc__body > .wp-block-list, .ldoc__body > .wp-block-group p, .ldoc__body > .wp-block-group .wp-block-list { margin: 0 0 12px; font-size: 17px; line-height: 1.7; color: var(--paper-text); }
.ldoc__body > .wp-block-list { padding-inline-start: 22px; display: grid; gap: 6px; }
.ldoc__body > p.ldoc__note { padding: 12px 16px; background: var(--paper-2); border-inline-start: 4px solid var(--ink); }
.ldoc__body > p.tbd { color: var(--ink); }
.ldoc__body .ldoc__feat .wp-block-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); padding: 0; list-style: none; }
.ldoc__body .ldoc__feat li { padding: 14px 0; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5; }
.ldoc__body .ldoc__feat li strong { display: block; font-size: 16px; color: var(--ink); }
.ldoc__body .axform { counter-increment: par; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--rule); }
.ldoc__body .axform h2::before { content: '§' counter(par); direction: ltr; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--slate); margin-inline-end: 12px; }
.ldoc__grid--plain { grid-template-columns: minmax(0, 760px); padding-block: var(--band); }
@media (max-width: 767px) { .ldoc__body .ldoc__feat .wp-block-list { grid-template-columns: minmax(0, 1fr); } }

/* ── 4. Links where the prototype has buttons; WordPress chrome ─────────── */
.xempty__try a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--ink); font-weight: 600; color: var(--ink); }
.xempty__try a:hover { background: var(--ink); color: var(--paper); }
.xspec .is-off { pointer-events: none; }
.xmore .btn { text-decoration: none; }
.chatakh-missing { margin: 24px auto; max-width: 760px; padding: 12px 16px; border: 1px dashed var(--alert); color: var(--paper); font-family: var(--mono); font-size: 13px; }

/* Sticky bars sit under the WordPress admin bar for logged-in users */
body.admin-bar .ihead, body.admin-bar .snav-bar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ihead, body.admin-bar .snav-bar { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .ihead, body.admin-bar .snav-bar { top: 0; } }

/* Block editor: give article content the reading column look */
.editor-styles-wrapper .ab-alert { background: var(--ink); color: var(--fog); padding: 22px; }
.editor-styles-wrapper .ab-q { background: var(--ink); color: var(--paper); padding: 22px; }
