/**
 * Адвокат Бургас — the bridge layer.
 *
 * Three stylesheets ship, in this order:
 *
 *   1. assets/fonts/fonts.css                 @font-face, self-hosted, Cyrillic first
 *   2. assets/css/advokatburgas-tokens.css    every --advb-* custom property
 *   3. assets/css/advokatburgas.css           the 20 design-system components
 *   4. this file                              WordPress block output → those components
 *
 * The first three are generated by @inkblot-studio/advokatburgas-ds and are
 * never edited here — regenerate them from the token repo instead. This file is
 * the only hand-written CSS in the theme, and it exists for one reason: the
 * design system describes hand-written markup, while a block theme renders
 * `.wp-block-*`. Everything below translates between the two.
 *
 * The rule that governs every line: no literal colour, size, shadow or duration.
 * If a value is not a --advb-* token, it does not belong here. Where a block
 * needs the exact treatment a component already carries, prefer adding the
 * component class to the block's markup (or via a render_block filter in
 * inc/design-system.php) over restating the rules.
 *
 * Contents
 *   1  Document          5  Blocks             9  Redesign components
 *   2  Masthead + nav    6  Article & prose   10  Editor-facing niceties
 *   3  Drawer            7  Query loops       11  Print
 *   4  Footer            8  Contact + form
 */

/* ========================================================= 1  document */

/*
 * Nothing here sets `overflow-x: hidden` on the body.
 *
 * It is the usual reflex for a stray horizontal scrollbar, and it costs more
 * than it fixes: it makes <body> the scroll container, which breaks
 * `position: sticky` on the masthead and stops `scroll-margin` working for the
 * skip link. The right fix is for nothing to overflow in the first place —
 * every wide thing on this site (tables, the map, the practice grid) is inside
 * its own container, and `.advb-container` is border-box so its gutter cannot
 * push it past 100%.
 */

/*
 * `wp-site-blocks` is the wrapper WordPress prints around every template. It
 * gets the root padding from theme.json, which would double up with the gutter
 * .advb-container already applies. Sections own their own gutters.
 */
.wp-site-blocks > * {
	margin-block: 0;
}

.advb-root .wp-site-blocks {
	padding-left: 0;
	padding-right: 0;
}

/* Restore the constraint that theme.json's root padding used to provide, but
   only for blocks that opted into a constrained layout. */
.advb-root :where(.is-layout-constrained) > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: var(--advb-semantic-layout-measure);
	margin-inline: auto;
}

.advb-root :where(.is-layout-constrained) > .alignwide {
	max-width: var(--advb-semantic-layout-content);
}

/*
 * Full-width bands sit flush against each other.
 *
 * WordPress's flow layout puts `margin-block-start: var(--wp--style--block-gap)`
 * on every child after the first, which on this site meant a 24px strip of
 * page background between the hero and the band under it — a white seam across
 * a design whose sections are supposed to butt together. Each band carries its
 * own padding; the gap between them is that padding, not a margin.
 *
 * Scoped to the section wrappers. Inside an article the flow margins are what
 * space the paragraphs, and those are left alone.
 */
.advb-root .entry-content > *,
.advb-root #advb-main > * {
	margin-block: 0;
}

/* The skip link ships in the component layer; it only needs to be first. */
.advb-skip-link {
	position: fixed;
}

/*
 * Visually hidden, still announced. Core ships this class with the block
 * library stylesheet, which a block theme may or may not enqueue on a given
 * page — the nav toggle's label cannot depend on that.
 */
.advb-root .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: 0;
}

/* ==================================================== 2  masthead + nav */

/*
 * The navigation block renders <nav class="advb-nav"><ul class="…__container">.
 * .advb-nav's own flex rules therefore land on the <nav>, not on the list that
 * actually holds the items — so the list is given the same treatment here.
 * The item anchors get .advb-nav__link added in inc/design-system.php, so their
 * typography, colour, hover and active rule all come from the component layer
 * rather than being restated.
 */
/*
 * The masthead actually sticks.
 *
 * The design system has declared `position: sticky; top: 0` on .advb-masthead
 * since the beginning, and it has never once stuck. A sticky box can only
 * travel inside its own parent, and WordPress wraps a template part in a
 * <header class="wp-block-template-part"> whose height is exactly the
 * masthead's -- 113px of parent for a 113px child, so there is nowhere to go.
 * The rule was true and inert.
 *
 * The wrapper is what has to stick, because its parent is .wp-site-blocks and
 * that is the whole page.
 *
 * The z-index is the drawer's, not the masthead's, and deliberately. A sticky
 * box establishes a stacking context whatever its z-index, so everything in
 * the header part -- the drawer at 40, its backdrop at 30, the skip link at
 * 100 -- is now sealed inside this one box and ordered relative to it. At the
 * masthead's own level of 20 the drawer would have been trapped underneath the
 * sticky contact bar, which is also 20 and comes later in the document. Taking
 * the wrapper to 40 keeps every one of those relationships as it was.
 */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: var(--advb-z-index-drawer);
}

/*
 * An anchor lands below the bar, not behind it.
 *
 * The skip link and every in-page jump would otherwise scroll their target to
 * y=0, which is now under the masthead. The value is the masthead's height
 * rounded up: 96px on a phone, 112px from the tablet stop.
 */
:root {
	/*
	 * Plus the bar's own bottom border. 96 and 112 were the lockup and its
	 * padding and nothing else, which left the target's first pixel row under
	 * the hairline -- the one direction the rounding must not go.
	 */
	scroll-padding-top: calc(var(--advb-spacing-24) + 1px);
}

@media (min-width: 768px) {
	:root {
		scroll-padding-top: calc(var(--advb-spacing-24) + var(--advb-spacing-4) + 1px);
	}
}

/*
 * The page edge answers for the notch, now that the viewport covers it.
 *
 * `viewport-fit=cover` is what gives `env(safe-area-inset-*)` a value at all
 * (see functions.php), and the price of asking for it is that the page also
 * runs under the notch in landscape. `max()` means the gutter is the larger of
 * the two on every device: unchanged at 20 -> 48px where there is no inset,
 * and pushed clear of the sensor housing where there is.
 */
.advb-container {
	padding-inline:
		max(var(--advb-semantic-layout-gutter), env(safe-area-inset-left, var(--advb-spacing-0)))
		max(var(--advb-semantic-layout-gutter), env(safe-area-inset-right, var(--advb-spacing-0)));
}

.advb-masthead__inner {
	position: relative;
	flex-wrap: wrap;
}

/*
 * The bar keeps its height when the page scrolls.
 *
 * The obvious refinement is to shrink the lockup once the page has moved, and
 * the hook is already there -- site.js sets data-scrolled for the shadow. It
 * is deliberately not done: the design system confines motion to colour,
 * border and opacity, and says so at the top of its own stylesheet. A height
 * that animates would be the first exception; a height that jumps without a
 * transition reads as a bug. If the 113px ever has to come down, the honest
 * fix is a shorter bar at every scroll position, not a bar that moves.
 */

/*
 * The lockup's boxes wrap the image exactly.
 *
 * The site-logo block renders a div around an anchor around the image, and
 * neither wrapper sizes itself to a taller image — the div stayed 56px while
 * the image inside grew to 80, so the mark hung out of the bottom of the row
 * and sat twelve pixels below the menu it was supposed to line up with.
 * Making both wrappers flex boxes gives them the image's height.
 */
.advb-masthead .wp-block-site-logo,
.advb-masthead .wp-block-site-logo a {
	display: flex;
	align-items: center;
	margin: 0;
	line-height: 0;
	/* The component layer caps .advb-masthead__logo at the system's 56px. That
	   cap is on the wrapper, so a taller image simply hung out of it. */
	height: auto;
}

/*
 * The lockup, larger than the system's masthead default.
 *
 * `size.logo.header` is 56px, which suits a wordmark. This firm's mark is a
 * heraldic lion above three lines of type, and at 56px the type under the lion
 * is unreadable — the mark stops being a mark and becomes a smudge. 64px on a
 * phone and 80px from the tablet breakpoint give it room without pushing the
 * masthead past a comfortable height.
 */
.advb-masthead .wp-block-site-logo img {
	height: var(--advb-spacing-16);
	width: auto;
	max-width: none;
}

@media (min-width: 768px) {
	.advb-masthead .wp-block-site-logo img {
		height: var(--advb-spacing-20);
	}
}

/*
 * Element-qualified on purpose.
 *
 * WordPress copies a navigation block's className onto BOTH the <nav> and the
 * <ul> inside it, so `.advb-nav` and `.advb-masthead__nav` each match two
 * elements. A bare `.advb-masthead__nav { display: block }` therefore also
 * lands on the list and flattens the row into a column — which is exactly the
 * bug this qualifier prevents.
 */
nav.advb-nav {
	display: block;
	font-size: inherit;
}

.advb-nav .wp-block-navigation__container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--advb-spacing-6);
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * In the masthead the list never wraps. The bar is only shown at widths where
 * the whole row fits (see the note on the 1240px stop), and a wrapped menu
 * there is a fault rather than a fallback — the drawer is the fallback.
 */
nav.advb-masthead__nav .wp-block-navigation__container {
	flex-wrap: nowrap;
}

/*
 * Every item on the same line, at the same height.
 *
 * As a block box the item's height is a line box, and the one item that owns a
 * submenu carries an extra inline box for it — so "Практики" sat ten pixels
 * lower than its five siblings. A flex row with centred items has no baseline
 * to disagree about.
 */
.advb-nav .wp-block-navigation-item {
	position: relative;
	display: flex;
	align-items: center;
}

/* A label never breaks mid-word, and the row never wraps: both would put an
   item on a second line, which is what the bar exists to avoid. */
.advb-nav .wp-block-navigation-item__content {
	white-space: nowrap;
}

/* WordPress ships its own gap; the list above owns spacing here. */
.advb-nav.wp-block-navigation .wp-block-navigation__container.wp-block-navigation__container {
	column-gap: var(--advb-spacing-6);
	row-gap: var(--advb-spacing-1);
}

/*
 * No caret in the masthead.
 *
 * The bar has one submenu and it opens on hover, on focus and on tap, so the
 * arrow was decoration that cost a notch in an otherwise even row of labels.
 * The drawer keeps its caret: there it is the control that opens the list.
 *
 * The block is set to showSubmenuIcon:false, and this hides the icon as well,
 * so a navigation saved from the Site Editor with the arrow switched back on
 * still renders a clean bar.
 */
.advb-masthead__nav .wp-block-navigation__submenu-icon {
	display: none;
}

/*
 * Core wins this one on specificity, so it has to be met on its own terms.
 *
 * WordPress ships `.wp-block-navigation .wp-block-navigation-item__content
 * { display: block }` -- two classes. The design system's `.advb-nav__link`
 * is one, so every menu anchor was a block box with a 48px floor and no way
 * to centre anything inside it: the label sat at the top of that box and the
 * active rule at the bottom. That is one bug wearing two faces -- the menu
 * read high against the lockup, and the underline floated a line and a half
 * beneath its own word.
 */
.advb-nav .wp-block-navigation-item__content.advb-nav__link {
	display: inline-flex;
	align-items: center;
	line-height: var(--advb-semantic-typography-nav-primary-line-height);
}

/*
 * The rule belongs to the word, not to the tap target, and it arrives from the
 * left.
 *
 * 48px is a hit area and it stays, but a border drawn on its edge leaves
 * fifteen pixels of nothing between a label and the mark that is supposed to
 * belong to it. The rule moves onto the label itself, four pixels under the
 * text; the anchor keeps its height and gives up its border.
 *
 * It grows from the left edge to the right rather than fading in. A reader
 * scans a menu bar horizontally, so a mark that travels the same way the eye
 * already is confirms the target without asking for a second look, and its
 * left end is planted before the animation finishes -- the boundary of the
 * thing you are aiming at is legible immediately, which is the part that
 * matters when the pointer is still moving. 120ms, the system's `fast`: long
 * enough to read as a response, short enough that nobody waits for it.
 */
.advb-nav .advb-nav__link {
	border-bottom: var(--advb-border-width-none);
}

.advb-nav .wp-block-navigation-item__label {
	position: relative;
	display: inline-block;
	padding-top: calc(var(--advb-spacing-1) + var(--advb-border-width-medium));
	padding-bottom: var(--advb-spacing-1);
	transition: var(--advb-semantic-motion-interactive);
}

.advb-nav .advb-nav__link .wp-block-navigation-item__label::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: var(--advb-border-width-medium);
	background-color: var(--advb-semantic-color-border-accent);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--advb-duration-fast) var(--advb-easing-standard);
}

.advb-nav .advb-nav__link:hover .wp-block-navigation-item__label::after,
.advb-nav .advb-nav__link:focus-visible .wp-block-navigation-item__label::after,
.advb-nav .advb-nav__link[aria-current="page"] .wp-block-navigation-item__label::after {
	transform: scaleX(1);
}

/*
 * The page you are on is not the page you are pointing at.
 *
 * Both used to be one filled row, which meant the menu could tell you where
 * the pointer was or where you were, but never both at once, and the two
 * states were literally the same declaration. They are separated here: the
 * current page carries the accent in its own colour and keeps its rule
 * whether or not anything is hovering it; hover is the rule arriving. One is
 * a fact about the site, the other is a fact about the cursor.
 */
.advb-nav .advb-nav__link[aria-current="page"] .wp-block-navigation-item__label {
	color: var(--advb-semantic-color-action-link);
}

/*
 * The dropdown, and the same separation inside it.
 *
 * A submenu row is wide, so the two states get the width to be different in
 * kind rather than in degree: hovering fills the row, and the page you are on
 * is marked down its leading edge and set in the accent colour. Neither can
 * be mistaken for the other, and an item that is both -- you are on it and
 * pointing at it -- reads as both without either treatment fighting the other.
 */
.advb-nav .advb-nav__submenu .wp-block-navigation-item__label {
	padding-block: var(--advb-spacing-0);
}

.advb-nav .advb-nav__submenu .wp-block-navigation-item__label::after {
	content: none;
}

.advb-nav__submenu a {
	position: relative;
	transition:
		background-color var(--advb-duration-fast) var(--advb-easing-standard),
		color var(--advb-duration-fast) var(--advb-easing-standard),
		padding-inline-start var(--advb-duration-fast) var(--advb-easing-standard);
}

/*
 * Every row keeps a hanging indent whether it is pointed at or not, so the rule
 * grows into space that is already there and no label ever moves.
 */
.advb-nav__submenu a::after {
	content: '';
	position: absolute;
	inset-inline-start: var(--advb-spacing-5);
	top: 50%;
	width: 0;
	height: var(--advb-border-width-rule);
	margin-top: calc(var(--advb-border-width-rule) / -2);
	background-color: var(--advb-semantic-color-border-accent);
	transition: width var(--advb-duration-fast) var(--advb-easing-standard);
}

.advb-nav__submenu a:hover::after,
.advb-nav__submenu a:focus-visible::after {
	width: var(--advb-spacing-3);
}

/* No fill. The rule is the whole of the answer. */
.advb-nav__submenu a:hover {
	background-color: transparent;
	color: var(--advb-semantic-color-action-link);
}

/*
 * The rows arrive one after another, over the panel's own 200ms.
 *
 * The same idea as the drawer's list, at a third of the distance because this
 * panel is a fifth of the height. Six steps of 20ms: the last row is in place
 * before the panel has finished fading, so nobody waits for a menu.
 */
.advb-nav.wp-block-navigation .advb-nav__submenu > .wp-block-navigation-item {
	opacity: 0;
	transform: translateY(calc(var(--advb-spacing-1) * -1));
	transition:
		opacity var(--advb-duration-fast) var(--advb-easing-entrance),
		transform var(--advb-duration-fast) var(--advb-easing-entrance);
}

.advb-nav.wp-block-navigation .wp-block-navigation-item:hover > .advb-nav__submenu > .wp-block-navigation-item,
.advb-nav.wp-block-navigation .wp-block-navigation-item:focus-within > .advb-nav__submenu > .wp-block-navigation-item,
.advb-nav.wp-block-navigation .wp-block-navigation-item.is-open > .advb-nav__submenu > .wp-block-navigation-item {
	opacity: 1;
	transform: translateY(0);
}

.advb-nav__submenu > .wp-block-navigation-item:nth-child(1) { transition-delay: calc(var(--advb-duration-fast) * 0.1); }
.advb-nav__submenu > .wp-block-navigation-item:nth-child(2) { transition-delay: calc(var(--advb-duration-fast) * 0.25); }
.advb-nav__submenu > .wp-block-navigation-item:nth-child(3) { transition-delay: calc(var(--advb-duration-fast) * 0.4); }
.advb-nav__submenu > .wp-block-navigation-item:nth-child(4) { transition-delay: calc(var(--advb-duration-fast) * 0.55); }
.advb-nav__submenu > .wp-block-navigation-item:nth-child(5) { transition-delay: calc(var(--advb-duration-fast) * 0.7); }

/* Current: a mark down the leading edge, and the accent colour. No fill. */
.advb-nav__submenu a[aria-current='page'] {
	background-color: transparent;
	color: var(--advb-semantic-color-action-link);
	font-weight: var(--advb-typography-font-weight-medium);
}

.advb-nav__submenu a[aria-current='page']::before {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: var(--advb-border-width-rule);
	background-color: var(--advb-semantic-color-border-accent);
}

/*
 * The crimson box that appeared on a menu item after an ordinary click.
 *
 * It was never the design system's focus ring, which is why nothing aimed at
 * `:focus-visible` ever moved it. WordPress builds its own global stylesheet
 * from theme.json, and `elements.link` / `elements.button` there each carry a
 * `:focus` outline — two solid crimson pixels, emitted as
 *
 *   :root :where(a:where(:not(.wp-element-button)):focus) { outline: … }
 *
 * theme.json has no `:focus-visible` to declare: WordPress accepts a fixed
 * list of pseudo-selectors and that is not one of them. So the outline fires
 * on plain `:focus` — which a mouse click sets, every time, on every link in
 * the menu. It carried no halo and did not match `:focus-visible`, which is
 * exactly what the element that finally got measured showed.
 *
 * `:focus:not(:focus-visible)` is the one case that should never have been
 * painted: focused, but by something the browser judges not to warrant an
 * indicator — a pointer. Keyboard focus still matches `:focus-visible`, keeps
 * theme.json's outline and the design system's ring both, and loses nothing.
 * `:where()` contributes no specificity, so the rule this overrides scores
 * (0,1,0) and this clears it comfortably.
 */
:focus:not(:focus-visible) {
	outline: none;
}

/* The submenu caret. Colour comes from the link it sits inside. */
.advb-nav .wp-block-navigation__submenu-icon {
	display: inline-flex;
	align-items: center;
	margin-left: var(--advb-spacing-1);
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
}

.advb-nav .wp-block-navigation__submenu-icon svg {
	width: var(--advb-size-icon-sm);
	height: var(--advb-size-icon-sm);
	fill: currentColor;
}

/*
 * Dropdowns.
 *
 * Core collapses a closed submenu with four properties at once —
 * `height: 0; width: 0; overflow: hidden; visibility: hidden` — so opening one
 * means undoing all four. Setting visibility alone leaves a zero-sized box and
 * the menu never appears, which is the trap this comment exists to record.
 *
 * The panel's own look (surface, border, shadow) comes from .advb-nav__submenu
 * in the component layer, but core's `:not(.has-background)` rule is three
 * classes deep and would paint it white with a hairline border, so the surface
 * is restated here at a specificity that can win.
 */
/*
 * The panel is kept at its full size in both states.
 *
 * Core collapses a closed submenu to `width: 0; height: 0; overflow: hidden`,
 * and a box with no size cannot fade or move: it was appearing and vanishing
 * on the same frame. Undoing the collapse in both states leaves opacity,
 * transform and visibility to do the work, and those three can be timed.
 * `visibility` is what keeps the invisible panel out of the way of the
 * pointer and out of the tab order; it is delayed on the way out so the fade
 * has time to finish, and immediate on the way in so the panel is focusable
 * as it starts to arrive.
 */
.advb-nav.wp-block-navigation .wp-block-navigation__submenu-container {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: var(--advb-z-index-dropdown);
	width: auto;
	height: auto;
	overflow: visible;
	opacity: 0;
	visibility: hidden;
	transform: translateY(calc(var(--advb-spacing-2) * -1));
	transition:
		opacity var(--advb-duration-fast) var(--advb-easing-exit),
		transform var(--advb-duration-fast) var(--advb-easing-exit),
		visibility var(--advb-duration-instant) linear var(--advb-duration-fast);
	background-color: var(--advb-semantic-color-surface-page);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	color: var(--advb-semantic-color-text-heading);
	box-shadow: var(--advb-semantic-elevation-dropdown);
}

/*
 * Focus opens the panel as well as hover. Without :focus-within the submenu is
 * unreachable by keyboard — the component contract calls this out explicitly.
 */
@media (min-width: 1025px) {
	.advb-nav.wp-block-navigation .wp-block-navigation-item:hover > .wp-block-navigation__submenu-container,
	.advb-nav.wp-block-navigation .wp-block-navigation-item:focus-within > .wp-block-navigation__submenu-container,
	.advb-nav.wp-block-navigation .wp-block-navigation-item.is-open > .wp-block-navigation__submenu-container {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition:
			opacity var(--advb-duration-normal) var(--advb-easing-entrance),
			transform var(--advb-duration-normal) var(--advb-easing-entrance),
			visibility var(--advb-duration-instant) linear var(--advb-duration-instant);
	}
}

.advb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: 100%;
}

/*
 * The panel is paper, and the mark is on the row rather than on the edge.
 *
 * A hairline border and a drop shadow are two ways of saying the same thing;
 * the border was the one that made this read as the block library's default,
 * so it went. What replaced it, a brass rule across the top of the panel, was
 * worse in a different way: a heavy band under a crimson underline, two accent
 * colours stacked an inch apart, and a lid on a thing that is meant to hang.
 *
 * The panel says nothing now. It is the subtle surface rather than white, so it
 * separates from the bar above it without drawing anything to do it, and its
 * shadow is the only thing holding it off the page.
 *
 * The mark moved to where the reader is looking: a short rule that grows from
 * nothing beside the row under the pointer, in the crimson the bar's own
 * underline uses. Brass was tried there and it is the wrong register: brass is
 * this site's ornament, the mark on an eyebrow or a list item, and it says
 * „here is a heading". Crimson is the colour of everything that answers a
 * pointer, and answering a pointer is the whole of what this mark does.
 *
 * It is a different shape from the mark on the current page, which is a full
 * height bar down the leading edge, so the two never read as the same thing:
 * one says where you are, the other says where you are pointing.
 */
.advb-nav.wp-block-navigation .advb-nav__submenu {
	border: 0;
	padding-block: var(--advb-spacing-3);
	background-color: var(--advb-semantic-color-surface-subtle);
}

.advb-nav.wp-block-navigation .advb-nav__submenu a {
	padding-inline-end: var(--advb-spacing-5);
	/* The indent the brass rule grows into: its own inset, its length, and a
	   gap. Constant, so pointing at a row never moves its label. */
	padding-inline-start: calc(var(--advb-spacing-5) + var(--advb-spacing-3) + var(--advb-spacing-3));
}


/* ========================================================== 3  drawer */

/*
 * There are two navigations in the DOM, both rendering the same menu: the row
 * in the masthead and the drawer. Only ever one of them is displayed, so only
 * one is in the accessibility tree — `display: none` removes the other
 * outright, rather than leaving a screen reader to read the menu twice.
 *
 * The alternative — one nav that becomes fixed below 1025px — means restating
 * the drawer's width, shadow and motion here. .advb-drawer already carries
 * them, and a component the system owns should not be re-implemented in a
 * bridge file.
 */
/*
 * The full bar starts at 1240px, not at the system's 1025px desktop stop.
 *
 * Measured: at 1025px the row has 943px to spend and needs about 1170 — a
 * lockup, six Bulgarian navigation labels, a language switch and a call to
 * action. Something has to give, and every alternative is worse than a menu
 * button. Shrinking the type breaks the scale; dropping the language switch
 * strands English readers between 1025 and 1240; letting the list wrap puts
 * „Контакти“ alone on a second line, which reads as a fault rather than a
 * layout. So the drawer — which is a good, complete navigation — stays in
 * charge until the bar genuinely fits.
 *
 * 1240px is --advb-breakpoint-lg, the width at which the content container
 * reaches its maximum, so this is a stop the system already knows about.
 */
nav.advb-masthead__nav {
	display: none;
}

@media (min-width: 1240px) {
	nav.advb-masthead__nav {
		display: block;
	}

	.advb-drawer,
	.advb-drawer__backdrop {
		display: none;
	}
}

/*
 * The backdrop fades. It used to be switched on with `display`, which paints a
 * 70% black sheet over the whole page between two frames: that is the flash on
 * a phone, and it is the one thing a panel that slides for 250ms should not do.
 *
 * `hidden` is gone from the markup for the same reason -- the attribute carries
 * `display: none` from the user agent, and nothing that is display:none can
 * fade. It cost nothing to remove: the element is an empty decorative div, so
 * `visibility` is all a screen reader needs.
 */
.advb-drawer__backdrop {
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--advb-duration-normal) var(--advb-easing-standard),
		visibility var(--advb-duration-instant) linear var(--advb-duration-normal);
}

[data-advb-drawer='open'] .advb-drawer__backdrop {
	opacity: 1;
	visibility: visible;
	transition:
		opacity var(--advb-duration-normal) var(--advb-easing-standard),
		visibility var(--advb-duration-instant) linear var(--advb-duration-instant);
}

/*
 * The design system hides the menu button from 1025px, because that is where
 * its own bar takes over. This site's bar starts at 1240px, so the button has
 * to stay visible in between — otherwise there is no navigation at all there.
 */
@media (min-width: 1025px) and (max-width: 1239px) {
	.advb-nav-toggle {
		display: inline-flex;
	}
}

/*
 * The menu button becomes the cross, and does not move while it does.
 *
 * There were two controls: this one, and another inside the drawer, a
 * different size in a different corner, which appeared beside the one that had
 * just been pressed. Now the bar stays above the drawer and the same button
 * turns into the cross under the cursor that opened it. Fitts again: the
 * closest target to the pointer is the one it just used, so closing costs no
 * travel at all.
 *
 * Three elements rather than two swapped icons, because a shape can only
 * become another shape if it is the same shape throughout. The outer bars
 * translate to the middle and cross; the centre one fades. Every distance is
 * derived from the icon box, so nothing here is a number somebody has to keep
 * in step with the size.
 */
/*
 * No box around the mark.
 *
 * The system draws the toggle as a pill with a hairline, which is right for a
 * button that has to be found on a crowded bar. On this bar it is the only
 * control, three centimetres from a logo, and the outline read as a frame
 * around a cross rather than as a button. The target stays 48px; what goes is
 * the border, and the mark grows into the space it was using.
 *
 * The whole mark turns as it crosses. The bars alone crossing is a shape
 * change; the box turning with them is the gesture, and it is what makes
 * opening and closing feel like the same movement run in two directions.
 */
.advb-nav-toggle {
	position: relative;
	z-index: var(--advb-z-index-popover);
	border-color: transparent;
	border-radius: var(--advb-semantic-radius-control);
}

.advb-nav-toggle:hover .advb-nav-toggle__bars,
.advb-nav-toggle:focus-visible .advb-nav-toggle__bars {
	color: var(--advb-semantic-color-action-link);
}

.advb-nav-toggle__bars {
	position: relative;
	display: block;
	width: var(--advb-size-icon-lg);
	height: var(--advb-size-icon-lg);
	color: inherit;
	transition: transform var(--advb-duration-normal) var(--advb-easing-standard);
}

.advb-nav-toggle[aria-expanded='true'] .advb-nav-toggle__bars {
	transform: rotate(180deg);
}

.advb-nav-toggle__bars span {
	position: absolute;
	inset-inline: 0;
	height: var(--advb-border-width-medium);
	background-color: currentColor;
	transition:
		transform var(--advb-duration-normal) var(--advb-easing-standard),
		opacity var(--advb-duration-fast) var(--advb-easing-standard);
}

.advb-nav-toggle__bars span:nth-child(1) {
	top: 0;
}

.advb-nav-toggle__bars span:nth-child(2) {
	top: calc((var(--advb-size-icon-lg) - var(--advb-border-width-medium)) / 2);
}

.advb-nav-toggle__bars span:nth-child(3) {
	bottom: 0;
}

.advb-nav-toggle[aria-expanded='true'] .advb-nav-toggle__bars span:nth-child(1) {
	transform: translateY(calc((var(--advb-size-icon-lg) - var(--advb-border-width-medium)) / 2)) rotate(45deg);
}

.advb-nav-toggle[aria-expanded='true'] .advb-nav-toggle__bars span:nth-child(2) {
	opacity: 0;
}

.advb-nav-toggle[aria-expanded='true'] .advb-nav-toggle__bars span:nth-child(3) {
	transform: translateY(calc((var(--advb-size-icon-lg) - var(--advb-border-width-medium)) / -2)) rotate(-45deg);
}

/*
 * The panel crosses the bar, and the bar gets out of its way.
 *
 * The drawer is fixed to all four edges already; it was the JavaScript that
 * pushed its top down to the height of the masthead, so the panel arrived from
 * the top of the page down instead of from the right across. That offset is
 * gone.
 *
 * The bar still sits above the panel, because the button that opened it has to
 * stay in the same place to close it. What it gives up while the panel is open
 * is its own surface: no background, no rule, no shadow, so the only things
 * left in that strip are the lockup on the left and the cross on the right,
 * floating over a panel that now reaches the top of the screen.
 */
.advb-masthead {
	z-index: var(--advb-z-index-popover);
	transition:
		background-color var(--advb-duration-normal) var(--advb-easing-standard),
		border-color var(--advb-duration-normal) var(--advb-easing-standard);
}

[data-advb-drawer='open'] .advb-masthead {
	background-color: transparent;
	border-bottom-color: transparent;
	box-shadow: none;
}

/*
 * And the bar goes under the panel, lockup and all.
 *
 * It used to stay above, because the button that opened the panel had to be
 * pressable to close it, and that lifted everything else in the bar with it:
 * the logo sat on top of the open menu on a phone where the panel is 88% of
 * the screen. A stacking context cannot be entered halfway, so the logo could
 * not be lowered on its own; hiding it was tried and is worse, because a logo
 * that vanishes reads as a bug rather than as a layer.
 *
 * The panel carries its own cross now, so the bar has no reason to be above
 * anything. It drops below, keeps its surface, and is simply covered.
 */
[data-advb-drawer='open'] .advb-masthead {
	z-index: var(--advb-z-index-sticky);
}

/*
 * The lockup leaves the screen while the panel is open.
 *
 * Four attempts kept it there and every one of them was wrong, because the
 * white box was in the picture rather than in the CSS: the artwork is a JPEG
 * and a JPEG has no alpha channel. Fading it faded the drawing and the plate
 * together, so the plate stayed and only got paler. `mix-blend-mode: multiply`
 * could not reach it, because the bar is a sticky element with a z-index and
 * therefore an isolated group. Swapping in a transparent version took the box
 * away and left a mark that had nothing to say on a page nobody is reading.
 *
 * The panel is the whole subject while it is open. The lockup is not competing
 * with it; it fades out and comes back when the panel closes, which is what the
 * hamburger two elements over already does, for the same reason.
 *
 * `visibility`, not `display`: the bar keeps its height, so nothing below it
 * moves, and the fade has something to animate.
 */
.advb-masthead .wp-block-site-logo {
	transition:
		opacity var(--advb-duration-normal) var(--advb-easing-standard),
		visibility var(--advb-duration-instant) linear var(--advb-duration-instant);
}

/* Hidden after the fade, back the moment the panel starts closing. */
[data-advb-drawer='open'] .advb-masthead .wp-block-site-logo {
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--advb-duration-normal) var(--advb-easing-standard),
		visibility var(--advb-duration-instant) linear var(--advb-duration-normal);
}

/* One control on screen at a time, in one place: the bar's opens, the panel's
   closes, and the bar's is behind the panel while the panel is open. */
[data-advb-drawer='open'] .advb-nav-toggle:not(.advb-drawer__close) {
	visibility: hidden;
}

/*
 * The panel's cross sits where the hamburger sits: the same 48px box, the same
 * distance from the top and the right edge of the bar, so the mark reads as
 * having changed rather than as having moved.
 */
.advb-drawer__close {
	position: absolute;
	top: var(--advb-spacing-6);
	/* The page gutter, which is what the hamburger is inset by, not the
	   panel padding, which is larger. Same distance from the same edge. */
	inset-inline-end: var(--advb-semantic-layout-gutter);
	z-index: var(--advb-z-index-raised);
}

.advb-drawer__close .advb-nav-toggle__bars {
	transform: rotate(90deg);
	transition: transform var(--advb-duration-slow) var(--advb-easing-entrance);
}

.advb-drawer[data-open='true'] .advb-drawer__close .advb-nav-toggle__bars {
	transform: rotate(180deg);
}

/* Drawn as the cross from the start; only the turn is animated. */
.advb-nav-toggle__bars--cross span:nth-child(1) {
	transform: translateY(calc((var(--advb-size-icon-lg) - var(--advb-border-width-medium)) / 2)) rotate(45deg);
}

.advb-nav-toggle__bars--cross span:nth-child(2) {
	opacity: 0;
}

.advb-nav-toggle__bars--cross span:nth-child(3) {
	transform: translateY(calc((var(--advb-size-icon-lg) - var(--advb-border-width-medium)) / -2)) rotate(-45deg);
}

/* The first menu row clears the cross above it. */
.advb-drawer .wp-block-navigation {
	margin-top: var(--advb-semantic-layout-touch-target);
}

.advb-drawer {
	padding-top: var(--advb-spacing-6);
	/*
	 * The panel is the full height of the viewport, so its last menu row ends
	 * where the home indicator begins. The bar one component over already
	 * cleared it; this is the same inset for the same reason.
	 */
	padding-bottom: calc(var(--advb-spacing-8) + env(safe-area-inset-bottom, var(--advb-spacing-0)));
}

/*
 * The list arrives, rather than being there already.
 *
 * Each row is offset a little and fades up, one after the next, over the
 * drawer's own 250ms. It is the smallest amount of motion that makes the panel
 * read as having opened; anything longer and the reader is waiting for a menu.
 */
.advb-drawer .wp-block-navigation__container > .wp-block-navigation-item {
	opacity: 0;
	transform: translateY(var(--advb-spacing-2));
	transition:
		opacity var(--advb-duration-normal) var(--advb-easing-entrance),
		transform var(--advb-duration-normal) var(--advb-easing-entrance);
}

.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item {
	opacity: 1;
	transform: translateY(0);
}

.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(1) { transition-delay: calc(var(--advb-duration-fast) * 0.25); }
.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(2) { transition-delay: calc(var(--advb-duration-fast) * 0.5); }
.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(3) { transition-delay: calc(var(--advb-duration-fast) * 0.75); }
.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(4) { transition-delay: var(--advb-duration-fast); }
.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(5) { transition-delay: calc(var(--advb-duration-fast) * 1.25); }
.advb-drawer[data-open='true'] .wp-block-navigation__container > .wp-block-navigation-item:nth-child(6) { transition-delay: calc(var(--advb-duration-fast) * 1.5); }

.advb-drawer .wp-block-navigation__container {
	flex-direction: column;
	align-items: stretch;
	gap: var(--advb-spacing-1);
}

/*
 * The label takes the row and leaves the caret beside it. `width: 100%` here
 * would push the caret — a sibling, not a child — onto a line of its own.
 */
/*
 * The chevron belongs to the word, not to the edge of the panel.
 *
 * The row's content was `flex: 1 1 auto`, so the label stretched the full
 * width of the drawer and pushed the caret against the right rule: a mark
 * eleven centimetres from the thing it opens, which reads as an unrelated
 * control. Shrunk to its text, the caret sits where the label ends.
 */
.advb-drawer .wp-block-navigation-item__content {
	flex: 0 1 auto;
	padding-block: var(--advb-spacing-2);
}

/*
 * A chevron, drawn, not the block library's filled triangle.
 *
 * Two strokes meeting at a point, rotated a half turn when the list opens, at
 * the same 200ms the list itself takes so the two read as one movement. Drawn
 * from a border rather than shipped as an icon, because it is two lines and an
 * icon is a network request.
 */
.advb-drawer .wp-block-navigation__submenu-icon svg {
	display: none;
}

.advb-drawer .wp-block-navigation__submenu-icon::before {
	content: '';
	width: var(--advb-size-icon-sm);
	height: var(--advb-size-icon-sm);
	background-color: currentColor;
	clip-path: polygon(
		12% 30%, 50% 62%, 88% 30%,
		100% 44%, 50% 82%, 0% 44%
	);
	transition: transform var(--advb-duration-normal) var(--advb-easing-standard);
}

.advb-drawer .wp-block-navigation-item.is-open > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon::before,
.advb-drawer .wp-block-navigation-item.is-open .wp-block-navigation__submenu-icon::before {
	transform: rotate(180deg);
}

/*
 * In a drawer a dropdown has nothing to drop over: the submenu is an in-flow
 * accordion instead, and it opens rather than switching on.
 *
 * `display: none` was the toggle before, which is the one property that cannot
 * be animated at all: six links appeared between two frames and pushed
 * everything below them down with no explanation. A height that runs from zero
 * gives the movement a cause, and the rows fade in behind it a little faster
 * so the panel reads as opening rather than as growing.
 *
 * The ceiling is deliberately above what six rows need, because two of the
 * labels wrap to a second line on a narrow drawer and a ceiling that clipped
 * them would be a bug that only appears on one phone.
 */
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container:focus-within {
	position: static;
	display: block;
	opacity: 0;
	visibility: hidden;
	width: auto;
	height: auto;
	max-height: 0;
	min-width: 0;
	overflow: hidden;
	pointer-events: none;
	transform: none;
	margin-left: var(--advb-spacing-4);
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	color: inherit;
	transition:
		max-height var(--advb-duration-normal) var(--advb-easing-exit),
		opacity var(--advb-duration-fast) var(--advb-easing-standard);
}

.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child.is-open > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child.is-open:hover > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child.is-open:focus-within > .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation-item.has-child.is-open > .wp-block-navigation__submenu-container:focus-within {
	max-height: calc(var(--advb-semantic-layout-touch-target) * 10);
	opacity: 1;
	visibility: visible;
	overflow: hidden;
	pointer-events: auto;
	transition:
		max-height var(--advb-duration-normal) var(--advb-easing-entrance),
		opacity var(--advb-duration-normal) var(--advb-easing-standard);
}

/* The caret turns with the panel, not before it. */
.advb-drawer .wp-block-navigation__submenu-icon svg {
	transition: transform var(--advb-duration-normal) var(--advb-easing-standard);
}

/*
 * The submenu parent is a real page. First tap opens the list, the second
 * follows the link — the behaviour the live site taught its readers, kept
 * deliberately. site.js implements it; the caret rotates to show the state.
 */
/*
 * No JavaScript: the drawer can never open and the toggle does nothing, so the
 * menu falls back to a plain list in the masthead at every width.
 */
.no-js nav.advb-masthead__nav {
	display: block;
}

.no-js .advb-nav-toggle,
.no-js .advb-drawer,
.no-js .advb-drawer__backdrop {
	display: none;
}

@media (max-width: 1024px) {
	.no-js .advb-masthead__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.no-js .advb-nav .wp-block-navigation__submenu-container {
		position: static;
		display: block;
		opacity: 1;
		visibility: visible;
		border: 0;
		box-shadow: none;
	}
}

/* ========================================================== 4  footer */

/*
 * A footer menu is a column of destinations, not a masthead row. Core lays the
 * navigation block out as a centred flex row, so the direction, the alignment
 * and the size all have to be restated — and the size in particular, because
 * core sets 20px on the <nav> and every item inherits it.
 */
.advb-footer .wp-block-navigation {
	font-size: var(--advb-semantic-typography-body-small-font-size);
}

.advb-footer .wp-block-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--advb-spacing-1);
}

/*
 * Core pins every navigation link to `color: inherit` with a doubled class,
 * which out-ranks `.advb-footer a`. Without this the footer menu renders in the
 * body ink colour while the office phone numbers beside it are links — two
 * treatments for the same thing, three columns apart.
 */
.advb-footer .wp-block-navigation .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
	color: var(--advb-ink-color-action-link);
}

.advb-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--advb-ink-color-action-link-hover);
}

/*
 * Core lays every navigation item out as a flex *row*, which puts an open
 * submenu beside its parent rather than under it. In a footer — and in the
 * drawer — the submenu belongs on the next line, indented.
 *
 * Wrapping rather than switching to a column, because the parent's label and
 * its caret are siblings: a column would drop the caret onto its own line
 * under the word it belongs to. `flex-basis: 100%` on the panel is how core's
 * own always-open variant does the same thing.
 */
.advb-footer .wp-block-navigation .wp-block-navigation-item,
.advb-drawer .wp-block-navigation .wp-block-navigation-item {
	/* `display: flex` restated because the masthead rule above sets these items
	   to `block`, where flex-wrap and align-items are inert. */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.advb-footer .wp-block-navigation .wp-block-navigation__submenu-container,
.advb-drawer .wp-block-navigation .wp-block-navigation__submenu-container {
	flex-basis: 100%;
}

/*
 * A menu label in the drawer wraps, and the item shrinks to the panel.
 *
 * core sets `white-space: nowrap` on the item content, which is what a
 * horizontal menu bar needs and the opposite of what a 266px column needs.
 * „АДВОКАТ НЕДВИЖИМИ ИМОТИ" is 274px on one line, so the item could not shrink
 * to the panel: it sized itself to its longest word run, 322px against 266
 * available, and the last two words ran off the right edge of the drawer. The
 * open-state box went off with them, because that border belongs to the item
 * rather than to the label.
 *
 * `min-width: 0` is the other half. A flex item refuses to shrink below its
 * content, so wrapping alone would not have been enough; and the submenu panel
 * takes `flex-basis: 100%` of the item, so an item 56px too wide made an
 * indented panel 56px too wide underneath it.
 */
.advb-drawer .wp-block-navigation .wp-block-navigation-item,
.advb-drawer .wp-block-navigation .wp-block-navigation-item__content,
.advb-drawer .wp-block-navigation .wp-block-navigation__submenu-container {
	min-width: 0;
}

.advb-drawer .wp-block-navigation .wp-block-navigation-item__content,
.advb-drawer .wp-block-navigation .wp-block-navigation-item__label {
	white-space: normal;
	overflow-wrap: break-word;
	/*
	 * The navigation line-height is 1, which is what puts the hover rule
	 * tight under a word in the masthead bar. A label that now runs to two
	 * lines needs air between them, and the drawer is the only place a label
	 * does.
	 */
	line-height: var(--advb-typography-line-height-snug);
}

/*
 * A footer submenu has no reason to hide: the whole point of a footer menu is
 * that every destination is visible at once. It renders as an indented list.
 */
.advb-footer .wp-block-navigation .wp-block-navigation__submenu-container {
	position: static;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	opacity: 1;
	visibility: visible;
	width: auto;
	height: auto;
	min-width: 0;
	overflow: visible;
	margin-left: var(--advb-spacing-4);
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
	color: inherit;
}

.advb-footer .wp-block-navigation .wp-block-navigation__submenu-container a {
	min-height: var(--advb-semantic-layout-touch-target);
	padding: 0;
	background: none;
	color: var(--advb-ink-color-action-link);
}

.advb-footer .wp-block-navigation .wp-block-navigation__submenu-container a:hover {
	background: none;
	color: var(--advb-ink-color-action-link-hover);
}

.advb-footer .wp-block-navigation__submenu-icon {
	display: none;
}

.advb-footer .wp-block-site-logo img {
	height: var(--advb-size-logo-footer);
	width: auto;
}

/*
 * The legal bar is full-bleed, so it must escape the content flow WordPress
 * puts template parts in.
 */
.advb-legal {
	width: 100%;
	/* A paragraph now, so it arrives with margins the div it replaced had none of. */
	margin: 0;
	/* Full-bleed, so it takes the notch insets the container takes. */
	padding-inline:
		max(var(--advb-semantic-layout-gutter), env(safe-area-inset-left, var(--advb-spacing-0)))
		max(var(--advb-semantic-layout-gutter), env(safe-area-inset-right, var(--advb-spacing-0)));
}

/* ========================================================== 5  blocks */

/*
 * Core blocks that appear inside page content. Each is pointed at the component
 * that already describes it rather than given a look of its own.
 */

.advb-root .wp-block-button__link {
	border-radius: var(--advb-semantic-radius-control);
	min-height: var(--advb-semantic-layout-control-height);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-root .wp-block-button__link:hover {
	text-decoration: none;
}

.advb-root .wp-block-buttons {
	gap: var(--advb-spacing-4);
}

/* Outlined secondary — the reference set's standard second action. */
.advb-root .is-style-outline > .wp-block-button__link {
	background-color: transparent;
	color: var(--advb-semantic-color-action-secondary-text);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-strong);
}

.advb-root .is-style-outline > .wp-block-button__link:hover {
	background-color: var(--advb-semantic-color-action-secondary-hover);
	border-color: var(--advb-semantic-color-border-control);
}

[data-surface='ink'] .wp-block-button__link {
	background-color: transparent;
	color: var(--advb-ink-color-action-outline);
	border: var(--advb-border-width-hairline) solid var(--advb-ink-color-action-outline);
}

[data-surface='ink'] .wp-block-button__link:hover {
	background-color: var(--advb-ink-color-action-outline);
	color: var(--advb-ink-color-surface-page);
}

.advb-root .wp-block-separator {
	border: 0;
	border-top: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	opacity: 1;
	margin-block: var(--advb-semantic-layout-stack);
}

.advb-root .wp-block-image {
	margin-block: 0;
}

.advb-root .wp-block-image img {
	border-radius: var(--advb-semantic-radius-media);
}

.advb-root .wp-block-image figcaption {
	margin-top: var(--advb-spacing-3);
	font-size: var(--advb-typography-font-size-base);
	color: var(--advb-semantic-color-text-muted);
	text-align: left;
}

.advb-root .wp-block-embed iframe,
.advb-root .wp-block-video video {
	max-width: 100%;
}

/*
 * Lists inside content read as prose, not as a form.
 *
 * A list that carries a class from this theme is a component, not prose: the
 * chips under „КАК РАБОТИМ", the footer columns, the panel of points beside an
 * article, the breadcrumb. Each of those sets its own padding and its own
 * spacing, and each of them was written as hand-made HTML until the sections
 * became editable blocks. The moment they became core lists they picked up
 * `wp-block-list`, and these two rules -- which outrank a single class --
 * indented every one of them by 24px and pushed every item after the first down
 * by 12. In a grid that reads as three chips falling down a staircase.
 *
 * So: prose only. A list with a class of its own is left to it.
 */
.advb-root .wp-block-list:not([class*="advb-"]) {
	padding-left: var(--advb-spacing-6);
}

.advb-root .wp-block-list:not([class*="advb-"]) li + li {
	margin-top: var(--advb-spacing-3);
}

/* The details block is what the accordion component is built on. Giving it the
   component classes in markup would mean editing every FAQ by hand, so the
   block's own selectors inherit the same treatment. */
.advb-root .wp-block-details {
	border-bottom: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	padding-block: var(--advb-spacing-2);
}

.advb-root .wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--advb-spacing-4);
	min-height: var(--advb-semantic-layout-touch-target);
	padding-block: var(--advb-spacing-3);
	font-family: var(--advb-semantic-typography-heading-5-font-family);
	font-size: var(--advb-semantic-typography-heading-5-font-size);
	font-weight: var(--advb-semantic-typography-heading-5-font-weight);
	line-height: var(--advb-semantic-typography-heading-5-line-height);
	color: var(--advb-semantic-color-text-heading);
	cursor: pointer;
	list-style: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-root .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.advb-root .wp-block-details summary:hover {
	color: var(--advb-semantic-color-action-link);
}

.advb-root .wp-block-details summary::after {
	content: '+';
	flex: none;
	font-size: var(--advb-typography-font-size-xl);
	line-height: 1;
	color: var(--advb-semantic-color-accent-seal);
}

.advb-root .wp-block-details[open] summary::after {
	content: '−';
}

.advb-root .wp-block-details > :not(summary) {
	padding-bottom: var(--advb-spacing-4);
	color: var(--advb-semantic-color-text-default);
}

/* Tables scroll inside their own box; the page body never scrolls sideways. */
.advb-root .wp-block-table {
	overflow-x: auto;
}

.advb-root .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--advb-semantic-typography-body-small-font-size);
}

.advb-root .wp-block-table th,
.advb-root .wp-block-table td {
	padding: var(--advb-spacing-3) var(--advb-spacing-4);
	border-bottom: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	text-align: left;
}

.advb-root .wp-block-table th {
	background-color: var(--advb-semantic-color-surface-sunken);
	color: var(--advb-semantic-color-text-heading);
	font-weight: var(--advb-typography-font-weight-medium);
}

/*
 * The cover block is how a hero reaches page content. The scrim is part of the
 * hero component, so a cover used as one carries .advb-hero and lets the
 * component paint it; this only supplies what the block's own markup needs.
 */
.advb-root .advb-hero.wp-block-cover {
	/*
	 * Core's .wp-block-cover is display:flex with a 430px floor and its own
	 * padding, and it is the same specificity as .advb-hero — whichever
	 * stylesheet loads last wins. Restated here so the outcome does not depend
	 * on enqueue order.
	 */
	display: grid;
	padding: 0;

	/*
	 * One column, the full width of the band — so the gutter is the
	 * container's business, the way it is in every other section.
	 *
	 * Core also ships `justify-content: center` on the cover, and with an
	 * implicit auto-sized track that centres a column measured to its own
	 * content. The effect is a hero whose left edge is set by the length of
	 * its longest line: the front page's headline is two words, so its block
	 * was 854px wide and its text began 253px in, while the practice pages ran
	 * to 1001px and began at 180px. Neither agreed with the other, and neither
	 * agreed with the page underneath, whose container starts every section at
	 * 48px. A hero that moves depending on how much it has to say is not a
	 * grid the eye can follow down the page.
	 *
	 * A single 1fr track fills the band, and .advb-hero__inner — which already
	 * carries .advb-container, its max-width and its gutter — places the text
	 * exactly where the sections below place theirs.
	 */
	grid-template-columns: minmax(0, 1fr);
}

/*
 * A hero opens at the top of its band, and every hero opens at the same point.
 *
 * The component anchors hero content to the bottom (advokatburgas.css, .advb-hero),
 * which makes the gap *below* the button identical on every page and lets the
 * gap above float with the length of the headline. Across the ten pages and the
 * article template that meant the breadcrumb starting anywhere between 112px and
 * 292px down the band at 1440 — the front page lowest, because „АДВОКАТ БУРГАС"
 * is the shortest headline on the site. A visitor moving between two pages saw
 * the whole opening block jump.
 *
 * Anchored to the top it cannot: the breadcrumb, the eyebrow and the headline are
 * fixed-height rows, so all three begin at exactly the same point on every page
 * and at every width, and the top padding reads as one frame with the 48px
 * sides. What floats instead is the gap beneath the button, against the edge
 * where the band meets the next section — the place a reader is least likely to
 * be measuring.
 *
 * Both shapes are covered: the cover-block hero every page uses, and the plain
 * group advb_rc_hero() falls back to when a page has no photograph on file.
 */
.advb-root .advb-hero.wp-block-cover,
.advb-root .advb-hero {
	align-items: start;
}

/*
 * Every hero on the site is one height, front page included.
 *
 * It was two: a tall one on the home page and a shorter one everywhere else,
 * which meant a visitor moving from the front page to a practice page saw the
 * masthead land in a different place each time. There is no reason for the
 * front page to open differently from the page a visitor actually came for.
 *
 * One height also means one crop ratio, so a 2600x1080 source is right for
 * every page rather than right for one and stretched on the rest.
 */
/*
 * `dvh` second, `vh` kept as the fallback.
 *
 * On iOS Safari `vh` is the *large* viewport -- the height the page would have
 * with the toolbars retracted, which is not the height anyone is looking at.
 * A 60vh hero measured 506px of a 659px visible screen on an iPhone 14, so the
 * band opened taller than intended and the first line of the page below it was
 * never on screen. `dvh` is the height that is actually there; browsers that
 * do not know the unit keep the line above it.
 */
.advb-root .advb-hero.wp-block-cover,
.advb-root .advb-hero {
	min-height: 60vh;
	min-height: 60dvh;
}

@media (min-width: 768px) {
	.advb-root .advb-hero.wp-block-cover,
	.advb-root .advb-hero {
		min-height: 86vh;
		min-height: 86dvh;
	}
}

/*
 * The front page carries no hero rule of its own.
 *
 * It briefly had two — a shorter band, then a centred block — both written to
 * chase the gap above its headline. The gap had two real causes and neither
 * was the front page's height: it was missing the breadcrumb and eyebrow every
 * other hero opens with, which is fixed in the page's own content now, and the
 * cover's column was sized to its content and centred, which is fixed for
 * every hero above. With both of those right, a front-page exception is one
 * more way for the ten heroes to drift apart, and the reference hero
 * (нашите-адвокати) anchors its content to the bottom like all the others.
 */

/*
 * Hero photographs crop from the upper third, not the middle.
 *
 * A compact hero is a wide, shallow window — roughly 4:1 on a desktop — and a
 * centred crop of the firm's own photographs takes a band out of the middle:
 * the crest sign disappears above the frame and the attorney portraits get cut
 * across the face. Everything worth seeing in these particular pictures is in
 * the top half.
 */
.advb-root .advb-hero .wp-block-cover__image-background {
	object-position: 50% 30%;
}

/*
 * The figures centre until they are a row.
 *
 * Four numbers across a desktop are a strip, and a strip shares the left edge
 * of the prose above it. Stacked one per line on a phone that edge is the only
 * thing on the screen, and „1998" hanging off it reads as a list item rather
 * than a figure. They centre at every width below the one where the grid is
 * four across, which is the design system's own 1025px.
 */
@media (max-width: 1024px) {
	.advb-root .advb-stats > * {
		text-align: center;
	}
}

/*
 * The trail at the top of a hero is on a photograph, and takes its colours.
 *
 * The component sets it from --a-text-muted and its links from the page link
 * colour, both of which are chosen against cream. On the practice list, where
 * the photograph is a bright glass atrium, that put a #ad2a56 link and #5f5c5a
 * text on a composited #494a4d ground: 1.38:1 and 1.35:1 against a required
 * 4.5. Legible in the mock-up, invisible on the page.
 *
 * The eyebrow one line below was already correct — it is set from the brass
 * on-image token. This is the same idea applied to the line above it.
 */
.advb-root .advb-hero .advb-breadcrumb {
	color: var(--advb-semantic-color-text-on-image-muted);
}

.advb-root .advb-hero .advb-breadcrumb a {
	color: var(--advb-semantic-color-text-on-image);
}

.advb-root .advb-hero .advb-breadcrumb li + li::before {
	color: var(--advb-semantic-color-text-on-image-muted);
}

/*
 * Lift the scrim above the photograph.
 *
 * The component draws the scrim as .advb-hero::before at the base z-index, on
 * the assumption that the picture is a background-image. In a cover block the
 * picture is a real <img>, and core pins it with
 *
 *   body:not(.editor-styles-wrapper) .wp-block-cover:not(:has(…)) .wp-block-cover__image-background { z-index: 0 }
 *
 * — six classes and an element, which no reasonable selector here outranks. At
 * an equal z-index the img wins on document order and the headline ends up on
 * bare photography, which is the one thing the hero contract forbids. Raising
 * the scrim instead sidesteps the fight: the inner container is also `raised`
 * and still paints above it, because it comes later in the tree.
 */
.advb-root .advb-hero.wp-block-cover::before {
	z-index: var(--advb-z-index-raised);
}

/*
 * A band never makes the page wider than the phone it is on.
 *
 * core/cover centres its inner container as a flex item, and a flex item's
 * default `min-width` is `auto`, which resolves to min-content. So at 320px
 * the longest word in a statement band -- "СЧЕТОВОДИТЕЛИ" at the hero type's
 * 48px floor -- decided how wide the band was, and pushed the whole thing,
 * breadcrumb included, past both edges of the screen -- which on a phone is a
 * horizontal scrollbar on every page, and a headline whose second half is off
 * to the right of it.
 */
.advb-root .advb-hero .wp-block-cover__inner-container {
	width: 100%;
	min-width: 0;
}

/*
 * No word is ever cut in half, at any width.
 *
 * This used to hyphenate. The browser does it by the language on <html>, which
 * is correct Bulgarian hyphenation and still reads as a defect: „практика в
 * Бур-гас" in a headline looks like the page broke, not like typesetting. It
 * goes, everywhere, at every resolution.
 *
 * `overflow-wrap` stays as the silent backstop. It only acts on a word that is
 * genuinely wider than its line, and it breaks without printing a hyphen, so
 * the alternative it guards against is a headline hanging off the side of a
 * 320px screen and taking the document's scroll width with it. `text-wrap:
 * pretty` lets a browser that supports it balance the last line rather than
 * leaving one word alone under a full one.
 */
.advb-root .advb-hero__title,
.advb-root .advb-hero__desc {
	hyphens: manual;
	overflow-wrap: break-word;
	text-wrap: pretty;
}

/*
 * And every other heading, for the same reason.
 *
 * A Bulgarian heading can be one word wider than a phone. „административното"
 * is sixteen characters, and at the h2 size in the 225px column a 320px screen
 * leaves it is 301px on its own line with nothing to break at. It did not
 * wrap: it stuck out, and took the page's scroll width with it, so a 320px
 * viewport reported a 341px document. The heading itself was the only element
 * over the edge — everything above it in the tree was just carrying it.
 */
.advb-root h1,
.advb-root h2,
.advb-root h3,
.advb-root h4,
.advb-root h5,
.advb-root h6 {
	hyphens: manual;
	overflow-wrap: break-word;
	text-wrap: pretty;
}

/* WordPress paints its own dim layer; the hero's scrim replaces it. */
.advb-root .advb-hero .wp-block-cover__background {
	display: none;
}

/* ================================================= 6  article & prose */

/*
 * Page and post bodies are given .advb-article in markup, which caps them at
 * the measure. What the component cannot know is that WordPress puts alignwide
 * and alignfull children inside that same flow — they break out here.
 */
.advb-article > .alignwide {
	max-width: var(--advb-semantic-layout-content);
}

.advb-article > .alignfull {
	max-width: none;
	width: 100%;
}

.advb-article > .wp-block-buttons {
	margin-top: var(--advb-semantic-layout-stack);
}

/* The lede is the first paragraph of a page, set larger. */
.advb-lede + * {
	margin-top: var(--advb-semantic-layout-stack);
}

/*
 * A heading's own bottom margin is sized for body copy. A lede is 22px, so
 * against one the same gap reads as the two being crammed together.
 */
.advb-root h2 + .advb-lede,
.advb-root h1 + .advb-lede {
	margin-top: var(--advb-spacing-5);
}

/* ================================================ 7  query loops (news) */

.advb-root .wp-block-query {
	width: 100%;
}

.advb-root .wp-block-post-template {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.advb-root .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.advb-root .wp-block-post-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.advb-root .wp-block-post-template > li {
	display: flex;
}

.advb-root .wp-block-post-template .advb-card {
	width: 100%;
}

/*
 * Three cards in a row are one block, not three of slightly different heights.
 *
 * Two things were needed. The card fills its grid cell -- and the cell has to
 * be the same as its neighbours', which it was not: WordPress marks the post
 * template `is-layout-flow` even though core's own CSS lays it out as a grid,
 * so the flow rule `> * + *` put a 24px top margin on the second and third
 * cards and none on the first. In a grid that margin does not separate rows;
 * it pushes two items down inside their own row and leaves the first standing
 * a clear 24px taller than the other two. Which is exactly what it looked
 * like.
 */
.advb-root .wp-block-post-template > li {
	margin-block: 0;
}

.advb-root .wp-block-post-template .advb-card {
	height: 100%;
}

/*
 * The card's media slot.
 *
 * Square, not the 3:2 the practice cards use. Most of the news thumbnails are
 * portraits of people — 200×300 — and a 3:2 crop of a portrait takes a band
 * out of the middle, which on these particular photographs meant a sweater and
 * a chin. Square shows far more of a tall image, and the crop is pulled up to
 * the top quarter, which is where a face is in a portrait. Landscape
 * illustrations lose a little at the sides instead, which costs nothing.
 */
.advb-root .advb-card .wp-block-post-featured-image {
	margin: 0 0 var(--advb-spacing-2);
}

.advb-root .advb-card .wp-block-post-featured-image img {
	aspect-ratio: var(--advb-grid-aspect-square);
	object-fit: cover;
	object-position: 50% 25%;
	width: 100%;
	border-radius: var(--advb-semantic-radius-media);
}

/*
 * Three lines of excerpt, whatever the post runs to, so the cards in a row
 * line up on the same baselines instead of each ending where its own sentence
 * happens to stop.
 */
.advb-root .advb-card .wp-block-post-excerpt p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

/* The date sits directly under the title; the excerpt takes the space left. */
.advb-root .advb-card .wp-block-post-excerpt {
	margin-top: auto;
}

.advb-root .advb-card .wp-block-post-title {
	font-family: var(--advb-semantic-typography-heading-4-font-family);
	font-size: var(--advb-semantic-typography-heading-4-font-size);
	font-weight: var(--advb-semantic-typography-heading-4-font-weight);
	line-height: var(--advb-semantic-typography-heading-4-line-height);
	color: var(--advb-semantic-color-text-heading);
	margin: 0;
}

.advb-root .advb-card .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.advb-root .advb-card .wp-block-post-title a:hover {
	color: var(--advb-semantic-color-action-link);
	text-decoration: underline;
	text-underline-offset: var(--advb-typography-underline-offset-default);
}

.advb-root .advb-card .wp-block-post-date,
.advb-root .advb-card .advb-news-meta {
	font-family: var(--advb-semantic-typography-body-meta-font-family);
	font-size: var(--advb-semantic-typography-body-meta-font-size);
	letter-spacing: var(--advb-semantic-typography-body-meta-letter-spacing);
	color: var(--advb-semantic-color-text-muted);
	margin: 0;
}

.advb-root .advb-card .wp-block-post-excerpt {
	margin: 0;
}

.advb-root .advb-card .wp-block-post-excerpt p {
	color: var(--advb-semantic-color-text-muted);
	margin: 0;
}

.advb-root .advb-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* Pagination reads as a row of controls, not as prose links. */
.advb-root .wp-block-query-pagination {
	gap: var(--advb-spacing-2);
	margin-top: var(--advb-semantic-layout-stack);
}

.advb-root .wp-block-query-pagination a,
.advb-root .wp-block-query-pagination .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--advb-semantic-layout-touch-target);
	min-height: var(--advb-semantic-layout-touch-target);
	padding-inline: var(--advb-spacing-3);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	color: var(--advb-semantic-color-text-heading);
	text-decoration: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-root .wp-block-query-pagination a:hover {
	border-color: var(--advb-semantic-color-border-accent);
	color: var(--advb-semantic-color-action-link);
}

.advb-root .wp-block-query-pagination .current {
	border-color: var(--advb-semantic-color-border-accent);
	color: var(--advb-semantic-color-action-link);
}

/* ============================================ 8  contact page + form */

/*
 * The form's fields carry .advb-field / .advb-label / .advb-input from the
 * component layer. What is left is the honeypot, the submit row and the
 * confirmation notice — none of which the design system knows about because
 * they belong to this site's PHP handler, not to the system.
 */
.advb-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.advb-contact-form {
	max-width: var(--advb-semantic-layout-measure);
}

/*
 * Изпрати centres on the form's own measure, not the band around it.
 *
 * `.advb-btn` is `inline-flex` — shrink-wrapped already, but an inline-level
 * box ignores auto margins, so it just sits at the form's left edge. `flex`
 * keeps every property the component layer gives the button (the icon gap,
 * the centred label) and turns it block-level; `fit-content` stops that block
 * from doing what block boxes do by default and stretching to fill the
 * form, which is the one extra step a plain `display: flex` would be missing
 * here. What centres it is the auto margins either side of that shrunk box —
 * within `.advb-contact-form`'s own max-width, never the wider band it sits
 * in, and the same at every width because nothing here is behind a query.
 */
.advb-contact-form .advb-btn {
	margin-top: var(--advb-semantic-layout-stack);
	display: flex;
	width: fit-content;
	margin-inline: auto;
}

/*
 * inc/contact-form.php prepends this to the whole of `the_content`, so it lands
 * above the page's hero rather than beside the form. That is the right place —
 * it is the first thing anyone who just pressed Изпрати needs to see — but it
 * means it has to bring its own container, because nothing wraps it.
 */
.advb-form-notice {
	width: 100%;
	max-width: var(--advb-semantic-layout-content);
	margin-inline: auto;
	margin-block: var(--advb-semantic-layout-stack);
	padding: var(--advb-spacing-4) var(--advb-spacing-6);
	border-left: var(--advb-border-width-rule) solid var(--advb-semantic-color-feedback-success);
	background-color: var(--advb-semantic-color-feedback-success-surface);
	color: var(--advb-semantic-color-text-default);
}

.advb-form-notice--error {
	border-left-color: var(--advb-semantic-color-feedback-error);
	background-color: var(--advb-semantic-color-feedback-error-surface);
}

/* The embedded office map. Ratio rather than a fixed height, so it never
   letterboxes on a phone. */
/*
 * One map per office, and nothing around them.
 *
 * The page used to embed a Google "My Maps" project, which arrives wearing a
 * grey toolbar with the project's name in it, a star, a share button, a
 * fullscreen button and a line of small print crediting My Maps. It also
 * showed both pins at once, which at that zoom is a map of Bulgaria: a visitor
 * looking for a door in Burgas got the Rhodopes.
 *
 * Two plain place embeds instead. Each is a real map of one office at street
 * zoom, with the address beside it and a link that opens directions in
 * whatever the visitor uses for maps. No frame, no chrome.
 */
.advb-map {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--advb-semantic-layout-grid-gap);
}

@media (min-width: 768px) {
	.advb-map {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.advb-map__frame {
	width: 100%;

	/*
	 * Taller on a phone. A wide map on a narrow screen is a letterbox with a
	 * pin in it and no context around the pin; the portrait ratio gives back
	 * the street either side of the door.
	 */
	aspect-ratio: var(--advb-grid-aspect-square);
}

@media (min-width: 768px) {
	.advb-map__frame {
		aspect-ratio: var(--advb-grid-aspect-card);
	}
}

.advb-map__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.advb-map__meta {
	margin-top: var(--advb-spacing-4);
}

.advb-map__meta address {
	font-style: normal;
	color: var(--advb-semantic-color-text-muted);
}

.advb-map__go {
	margin-top: var(--advb-spacing-4);
	margin-bottom: 0;
}

/*
 * The office label in the closing band. `.advb-footer__heading` used to do this
 * job, but that class is brass on indigo — correct in the footer, and on the
 * warm panel the band now uses it would be brass on cream at 3.08:1, which the
 * system permits for large text only. The eyebrow treatment is the right one
 * here and it is already tracked and sized for a label.
 */
.advb-office__label {
	font-family: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-family);
	font-size: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-size);
	font-weight: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-weight);
	letter-spacing: var(--advb-semantic-typography-display-eyebrow-cyrillic-letter-spacing);
	text-transform: var(--advb-semantic-typography-display-eyebrow-cyrillic-text-transform);
	color: var(--advb-semantic-color-text-heading);
	margin: 0 0 var(--advb-spacing-3);
}

/* Two offices side by side from tablet up; stacked below. */
.advb-offices {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.advb-offices {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * The search block: core renders an input and a button that know nothing about
 * the control height or the square corners this system uses everywhere else.
 */
.advb-root .wp-block-search__input {
	min-height: var(--advb-semantic-layout-control-height);
	padding: var(--advb-spacing-3) var(--advb-spacing-4);
	font-family: var(--advb-semantic-typography-body-default-font-family);
	font-size: var(--advb-semantic-typography-body-default-font-size);
	color: var(--advb-semantic-color-text-default);
	background-color: var(--advb-semantic-color-surface-page);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-control);
	border-radius: var(--advb-semantic-radius-control);
}

.advb-root .wp-block-search__button {
	min-height: var(--advb-semantic-layout-control-height);
	padding-inline: var(--advb-spacing-6);
	font-family: var(--advb-semantic-typography-button-font-family);
	font-size: var(--advb-semantic-typography-button-font-size);
	font-weight: var(--advb-semantic-typography-button-font-weight);
	letter-spacing: var(--advb-semantic-typography-button-letter-spacing);
	text-transform: var(--advb-semantic-typography-button-text-transform);
	color: var(--advb-semantic-color-action-primary-text);
	background-color: var(--advb-semantic-color-action-primary);
	border: 0;
	border-radius: var(--advb-semantic-radius-control);
	transition: var(--advb-semantic-motion-interactive);
}

.advb-root .wp-block-search__button:hover {
	background-color: var(--advb-semantic-color-action-primary-hover);
}

/*
 * Post meta — a date, a category — is set in the meta treatment wherever it
 * appears, not only inside a card.
 */
.advb-root .advb-meta a {
	color: inherit;
}

/* The sticky contact bar sits at the bottom on a phone; keep the last section
   clear of it. */
/* Nothing is fixed over the foot of the page any more, so the legal bar only
   has to clear the home indicator. */
@media (max-width: 767px) {
	.advb-legal {
		padding-bottom: calc(var(--advb-spacing-5) + env(safe-area-inset-bottom, var(--advb-spacing-0)));
	}
}

/* ====================================== 9  sections added by the redesign

   Components the design system does not ship yet. Each is written from
   --advb-* tokens only, so it can be lifted into the token repo unchanged
   once it has proved itself here. docs/new-components.md describes what each
   one is for and the markup it expects.
   ------------------------------------------------------------------------ */

/* ---------------------------------------------------------- 9.1  bento */

/*
 * The practice grid.
 *
 * An asymmetric grid rather than seven identical boxes: tax law and company
 * registration are the two services this firm leads with, and a grid that
 * says so is doing navigation work a uniform row cannot. The hierarchy is
 * carried by tile size and whitespace, never by shadow — nothing floats.
 *
 * Four columns on a desktop, two on a tablet, one on a phone. The feature
 * tile stops spanning as soon as spanning would squeeze its neighbours.
 */
.advb-bento {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
}

/*
 * Seven tiles, all the same.
 *
 * This started as an asymmetric grid with tax law twice the size of its
 * neighbours. On the page that read as one practice shouting over six others
 * rather than as hierarchy, and the tall tile left a well of empty panel under
 * two lines of text. Equal tiles, equal rows, and the order does the ranking.
 */
@media (min-width: 768px) {
	.advb-bento {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1240px) {
	.advb-bento {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.advb-bento__tile {
	display: flex;
	flex-direction: column;
	gap: var(--advb-spacing-3);
	padding: var(--advb-spacing-8);
	background-color: var(--advb-semantic-color-surface-page);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	border-radius: var(--advb-semantic-radius-surface);
	transition: var(--advb-semantic-motion-interactive);
}

.advb-bento__tile:hover {
	border-color: var(--advb-semantic-color-border-accent);
}

/*
 * The tile index, in the brass serif the stat figures use. It is ordering,
 * not content, so the markup hides it from assistive technology.
 */
.advb-bento__index {
	font-family: var(--advb-semantic-typography-display-section-font-family);
	font-size: var(--advb-typography-font-size-xl);
	line-height: 1;
	color: var(--advb-semantic-color-accent-seal);
}

.advb-bento__title {
	font-family: var(--advb-semantic-typography-heading-4-font-family);
	font-size: var(--advb-semantic-typography-heading-4-font-size);
	font-weight: var(--advb-semantic-typography-heading-4-font-weight);
	line-height: var(--advb-semantic-typography-heading-4-line-height);
	color: var(--advb-semantic-color-text-heading);
	margin: 0;
	/* Bulgarian practice names are long compound words. Let them break rather
	   than push a tile wider than its column. */
	overflow-wrap: break-word;
}

.advb-bento__title a {
	color: inherit;
	text-decoration: none;
}

.advb-bento__title a:hover {
	color: var(--advb-semantic-color-action-link);
	text-decoration: underline;
	text-underline-offset: var(--advb-typography-underline-offset-default);
}

/*
 * A card title that happens to fit on one line is a 29px tap target, and a
 * title that wraps is 58px — the size of the hit box was being decided by the
 * length of the practice name. Padding grows the box to the 48px floor and an
 * equal negative margin puts the type back exactly where it was, so nothing
 * moves and every title is the same target.
 */
.advb-bento__title a,
.advb-card__title a {
	display: inline-block;
	padding-block: var(--advb-spacing-3);
	margin-block: calc(var(--advb-spacing-3) * -1);
}

.advb-bento__body {
	color: var(--advb-semantic-color-text-muted);
	margin: 0;
}

.advb-bento__foot {
	margin-top: auto;
	padding-top: var(--advb-spacing-4);
}

/*
 * Every tile is the same height as the tallest in its row, so the coverage
 * line sits at the top and the link at the bottom whatever the copy runs to.
 * That is what makes seven different practice descriptions read as one set.
 */
.advb-bento__tile {
	height: 100%;
}

/* ---------------------------------------------------------- 9.2  steps */

/*
 * A numbered process.
 *
 * Built for the tax page, whose copy already describes four phases of a
 * revision defence in order and renders them as four flat paragraphs. The
 * number is the whole ornament: no connecting line, nothing that animates.
 */
.advb-steps {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.advb-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.advb-steps__item {
	padding-top: var(--advb-spacing-5);
	border-top: var(--advb-border-width-rule) solid var(--advb-semantic-color-border-seal);
}

.advb-steps__number {
	display: block;
	font-family: var(--advb-semantic-typography-display-section-font-family);
	font-size: var(--advb-typography-font-size-3xl);
	line-height: 1;
	color: var(--advb-semantic-color-accent-seal);
	margin-bottom: var(--advb-spacing-3);
}

.advb-steps__title {
	font-family: var(--advb-semantic-typography-heading-5-font-family);
	font-size: var(--advb-semantic-typography-heading-5-font-size);
	font-weight: var(--advb-semantic-typography-heading-5-font-weight);
	line-height: var(--advb-semantic-typography-heading-5-line-height);
	color: var(--advb-semantic-color-text-heading);
	margin: 0 0 var(--advb-spacing-3);
}

.advb-steps__body {
	color: var(--advb-semantic-color-text-default);
	margin: 0;
}

/* --------------------------------------------------------- 9.3  glance */

/*
 * The at-a-glance panel on a practice page.
 *
 * The most valuable thing this redesign adds to those pages: today a visitor
 * reads about seven hundred words before finding out what the firm will
 * actually do for them. It sticks beside the article on a desktop and sits
 * above it below 1025px, where a sticky aside would eat a third of the screen.
 */
.advb-with-glance {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
	align-items: start;
}

/*
 * Above the article, not after it.
 *
 * The panel is written second in the markup, because that is where it belongs
 * beside a two-column article. Stacked, source order put it at the foot of
 * seven hundred words -- past the point it exists to save the reader. One
 * column and one `order` puts it first, and changes nothing from 1025px up
 * where the grid takes over again.
 */
@media (max-width: 1024px) {
	.advb-with-glance {
		display: flex;
		flex-direction: column;
	}

	.advb-with-glance > .advb-glance {
		order: -1;
	}
}

@media (min-width: 1025px) {
	.advb-with-glance {
		grid-template-columns: minmax(0, var(--advb-semantic-layout-measure)) minmax(0, 1fr);
		gap: var(--advb-semantic-layout-stack);
	}

	.advb-glance {
		position: sticky;
		/*
		 * Clear of the sticky masthead, measured from what the bar is actually
		 * made of: the lockup's own height at this width plus the padding above
		 * and below it, plus its bottom border. The old value was a control
		 * height and a spacing step that happened to add up to 100px against a
		 * bar that is 113 -- so the panel slid under it by thirteen pixels every
		 * time the page scrolled.
		 */
		top: calc(var(--advb-spacing-20) + var(--advb-spacing-4) + var(--advb-spacing-4) + 1px + var(--advb-spacing-6));
	}
}

.advb-glance {
	padding: var(--advb-spacing-8);
	background-color: var(--advb-semantic-color-surface-subtle);
	border-top: var(--advb-border-width-rule) solid var(--advb-semantic-color-border-seal);
}

.advb-glance__title {
	font-family: var(--advb-semantic-typography-heading-5-font-family);
	font-size: var(--advb-semantic-typography-heading-5-font-size);
	font-weight: var(--advb-semantic-typography-heading-5-font-weight);
	color: var(--advb-semantic-color-text-heading);
	margin: 0 0 var(--advb-spacing-4);
}

.advb-glance ul {
	list-style: none;
	margin: 0 0 var(--advb-spacing-6);
	padding: 0;
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-text-default);
}

.advb-glance li {
	display: flex;
	align-items: baseline;
	gap: var(--advb-spacing-3);
}

.advb-glance li + li {
	margin-top: var(--advb-spacing-3);
}

/*
 * A short brass rule instead of a bullet: these are things the firm does, not
 * a list of topics. Baseline alignment keeps it level with the first line of
 * an item that wraps onto three, and the offset is the rule's own width — no
 * hand-picked value that drifts the moment the body size changes.
 */
.advb-glance li::before {
	content: "";
	flex: none;
	width: var(--advb-spacing-3);
	height: var(--advb-border-width-rule);
	background-color: var(--advb-semantic-color-accent-seal);
	transform: translateY(calc(var(--advb-border-width-rule) * -2));
}

.advb-glance__meta {
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-text-muted);
	margin: 0 0 var(--advb-spacing-6);
}

/* -------------------------------------------------------- 9.4  related */

/*
 * The related-practices block. The cards are .advb-card in a three-column
 * grid; what this adds is the rule separating it from the article above.
 */
.advb-related {
	padding-top: var(--advb-semantic-layout-stack);
	border-top: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
}

/* ----------------------------------------------------- 9.5  lang strip */

/*
 * The languages the firm works in. Facts, not links — the site states in
 * three separate places that its attorneys work in English, Russian, German,
 * French and Spanish, and this is where that belongs.
 */
.advb-lang-strip {
	display: flex;
	flex-wrap: wrap;
	gap: var(--advb-spacing-3);
	list-style: none;
	margin: 0;
	padding: 0;
}

.advb-lang-strip li {
	padding: var(--advb-spacing-2) var(--advb-spacing-5);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	font-family: var(--advb-semantic-typography-label-font-family);
	font-size: var(--advb-semantic-typography-label-font-size);
	color: var(--advb-semantic-color-text-default);
}

[data-surface="ink"] .advb-lang-strip li {
	border-color: var(--advb-ink-color-border-strong);
	color: var(--advb-ink-color-text-default);
}

/* --------------------------------------------------- 9.6  scroll reveal */

/*
 * One gentle reveal, and only one.
 *
 * The rule that makes it safe: the hidden state is scoped to `.advb-js`,
 * which site.js puts on <html> only after confirming IntersectionObserver
 * exists and the visitor has not asked for reduced motion. With no
 * JavaScript, or under `prefers-reduced-motion`, that class is never added
 * and every section is simply visible — there is no state in which a script
 * that failed to run can leave content hidden.
 *
 * Never applied to the hero, which must paint immediately.
 */
.advb-js .advb-reveal {
	opacity: 0;
	transform: translateY(var(--advb-spacing-2));
	transition:
		opacity var(--advb-duration-slow) var(--advb-easing-entrance),
		transform var(--advb-duration-slow) var(--advb-easing-entrance);
}

.advb-js .advb-reveal.is-revealed {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.advb-js .advb-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------------------------------------------- 9.7  masthead additions */

/*
 * The right-hand cluster: language switch, then one primary call to action.
 * The header had no CTA at all, which on a law firm's site is the most
 * expensive omission on the page.
 */
.advb-masthead__actions {
	display: none;
	align-items: center;
	gap: var(--advb-spacing-5);
}

@media (min-width: 1240px) {
	.advb-masthead__actions {
		display: flex;
		flex: none;
	}

	/*
	 * The masthead row does not wrap.
	 *
	 * With a logo, six Bulgarian navigation labels, a language switch and a
	 * call to action, the items' natural widths add up to more than the row
	 * even when their rendered widths do not — so the flex container wrapped
	 * and dropped the CTA onto a line of its own under the menu. The
	 * navigation is the one item that can afford to give: it shrinks, and its
	 * own list wraps inside it if it ever has to.
	 */
	.advb-masthead__inner {
		flex-wrap: nowrap;
	}

	.advb-masthead__inner .wp-block-site-logo {
		flex: none;
	}

	nav.advb-masthead__nav {
		flex: 1 1 auto;
		min-width: 0;
	}

	/*
	 * Three parts, evenly weighted: lockup left, menu centred in the space
	 * between, actions right. Right-aligning the menu bunched it against the
	 * language switch and left a hole after the lockup.
	 */
	.advb-nav .wp-block-navigation__container {
		justify-content: center;
	}

	/*
	 * Six Bulgarian navigation labels, a language switch and a call to action
	 * is a lot of row. Between 1025px and 1440px the gaps tighten so the menu
	 * stays on one line; above that they return to the system's spacing.
	 */
	.advb-masthead__inner {
		gap: var(--advb-spacing-4);
	}

	.advb-nav.wp-block-navigation .wp-block-navigation__container.wp-block-navigation__container {
		column-gap: var(--advb-spacing-3);
	}

	/*
	 * The masthead's call to action is tighter than a button in the page.
	 *
	 * `.advb-btn` is padded for a standalone control — 40px of air each side.
	 * In a row that also carries a lockup, six labels and a language switch
	 * that is 80px spent on nothing, and it was 80px the larger lockup needed.
	 * The label, the height and the target are unchanged.
	 */
	.advb-masthead__actions .advb-btn {
		padding-inline: var(--advb-spacing-5);
	}

	/*
	 * One height for everything in the row.
	 *
	 * `.advb-btn--sm` is 44px, the WCAG floor, which is right for a button
	 * sitting in a paragraph. Here it shared a line with six 48px menu items
	 * and a 48px language switch, and being four pixels shorter than its
	 * neighbours made it read as a different kind of thing rather than a
	 * smaller one.
	 */
	.advb-masthead__actions .advb-btn {
		min-height: var(--advb-semantic-layout-touch-target);
	}

	/* Same reasoning, smaller sum: the switch is two two-letter words. */
	.advb-lang-switch a {
		padding-inline: var(--advb-spacing-1);
	}
}

@media (min-width: 1440px) {
	.advb-masthead__inner {
		gap: var(--advb-spacing-8);
	}

	.advb-nav.wp-block-navigation .wp-block-navigation__container.wp-block-navigation__container {
		column-gap: var(--advb-spacing-6);
	}
}

/*
 * Nothing in the masthead row carries a margin.
 *
 * Every part of it — the menu button, the actions cluster — is a core/html
 * block, so WordPress gives each one the flow gap, and the language switch
 * inside the cluster is a <p> that brings a paragraph's bottom margin as well.
 * The result was a row whose items sat at three different heights: the button
 * and the cluster twelve pixels below the lockup and the menu.
 *
 * Centring can only line up boxes that agree on where their middle is.
 */
.advb-masthead__inner > *,
.advb-masthead__actions > *,
.advb-drawer__actions > * {
	margin-block: 0;
}

.advb-lang-switch {
	display: flex;
	align-items: center;
	gap: var(--advb-spacing-1);
	font-family: var(--advb-semantic-typography-nav-primary-font-family);
	font-size: var(--advb-semantic-typography-nav-primary-font-size);
	letter-spacing: var(--advb-semantic-typography-nav-primary-letter-spacing);
}

.advb-lang-switch a {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
	padding-inline: var(--advb-spacing-2);
	color: var(--advb-semantic-color-text-muted);
	text-decoration: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-lang-switch a:hover,
.advb-lang-switch a[aria-current="true"] {
	color: var(--advb-semantic-color-action-link);
}

.advb-lang-switch span {
	color: var(--advb-semantic-color-border-strong);
}

/* The drawer carries the same two controls, stacked, below the menu. */
.advb-drawer__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--advb-spacing-4);
	margin-top: var(--advb-spacing-8);
	padding-top: var(--advb-spacing-6);
	border-top: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
}

/* ------------------------------------------------ 9.8  footer additions */

/*
 * Four columns from 1025px, two from 768px, one below. The design system's
 * own footer grid is three; this site has four things to say: who the firm is,
 * what it does, where to go, and how to reach it.
 *
 * The first column is wider than the other three. It carries the mark and two
 * sentences of prose, and prose set to the same width as a list of one-word
 * links reads as a narrow gutter of text with a ragged edge.
 */
@media (min-width: 768px) {
	.advb-footer__grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.advb-footer__grid--4 {
		grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
	}
}

/*
 * The mark, in the footer.
 *
 * assets/logo-light.png rather than the site logo: the lockup ships as a JPEG
 * on a solid white ground, which on indigo is a white rectangle. The light
 * version is the same mark with its luminance moved into the alpha channel.
 */
/*
 * Two class names, because one is not enough to hold the gap.
 *
 * The mark is a core image block now, so that the footer can be edited rather
 * than read out of a code box, and an image block arrives with two rules that
 * zero its margins: the theme's own `.advb-root .wp-block-image`, and the
 * layout rule the parent group emits to stop core spacing its children. Both
 * outrank a single class, so the lockup sat directly on the sentence beneath it.
 */
.advb-footer .advb-footer__logo {
	display: inline-flex;
	margin-block-end: var(--advb-spacing-5);
}

/*
 * The lockup, at the size it can actually be read at.
 *
 * The file used to carry 24px of transparent padding down its left edge and 32
 * top and bottom, which did two things at once: it held the mark away from the
 * column's left edge while the paragraphs under it started at the true edge,
 * so nothing lined up, and it spent a third of the declared height on nothing,
 * so the mark rendered far smaller than the number here suggested. The file is
 * cropped to the artwork now, which fixes the alignment and makes the same
 * height render the whole mark. The height goes up from there.
 */
.advb-footer__logo img {
	height: var(--advb-spacing-20);
	width: auto;
}

@media (min-width: 768px) {
	.advb-footer__logo img {
		height: var(--advb-spacing-24);
	}
}

/*
 * Two numbers with nothing to tell them apart is not a contact block.
 *
 * The column listed a landline, a mobile and an email as three identical
 * lines, so the only way to know which number was which was to dial one. The
 * label sits above its number, small and quiet, in the muted ink tone.
 */
/*
 * The mark replaces the word.
 *
 * „ТЕЛ." „МОБ." „ИМЕЙЛ" stacked above their own numbers turned three lines
 * into six, in a column of a footer where every other entry is one line. A
 * handset, a phone and an envelope say the same three things in the space the
 * numbers were already using, and the row reads left to right instead of top
 * to bottom.
 *
 * The word is still there for anyone who cannot see the mark: each row carries
 * a visually hidden „Телефон" / „Мобилен" / „Имейл" that a screen reader
 * announces, which is the whole reason the labels were added in the first
 * place. Icons are Lucide, inlined rather than fetched, because a footer must
 * not wait on a network request to say what a number is.
 */
.advb-footer__list--labelled li {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: var(--advb-spacing-3);
}

/*
 * The mark is drawn by the stylesheet, not written into the list.
 *
 * It used to be an inlined Lucide SVG per row, which meant those three rows had
 * to be a Custom HTML block, which meant the footer opened in the editor as a
 * code box. A mask keeps the drawing and gives the markup back: each row is an
 * ordinary list item with an ordinary link in it, and inc/onpage.php marks it
 * phone, mobile or mail from the href it carries.
 *
 * A mask rather than a background image, so the mark takes the colour of the
 * text beside it and follows the ink palette the way the SVG's `currentColor`
 * used to.
 */
.advb-footer__row::before {
	content: "";
	flex: none;
	width: var(--advb-size-icon-sm);
	height: var(--advb-size-icon-sm);
	background-color: var(--advb-ink-color-text-muted);
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
}

.advb-footer__row--phone::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.advb-footer__row--mobile::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='20' x='5' y='2' rx='2' ry='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
}

.advb-footer__row--mail::before {
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}

/*
 * A last line carrying one word is a fault the reader notices.
 *
 * „...Юридическа практика / от 1998 година." and „...Bulgarian Law /
 * Practice." both left a single word stranded under a full line. `pretty`
 * lets the browser move a word up from the last line to even the block out,
 * which is exactly the judgement a typesetter would make by hand.
 */
.advb-footer__brand p {
	text-wrap: pretty;
}

.advb-footer__brand p {
	color: var(--advb-ink-color-text-muted);
	font-size: var(--advb-semantic-typography-body-small-font-size);
}

.advb-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.advb-footer__list a {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
	font-size: var(--advb-semantic-typography-body-small-font-size);
}

/* A paragraph following prose or a list needs air the components do not set,
   because the design system's own footer gives each of these its own column. */
.advb-footer__brand p + p,
.advb-footer__list + p {
	margin-top: var(--advb-spacing-5);
}

/* ------------------------------------------------------ 9.9  hero parts */

/* One button under a hero headline; the closing band adds the telephone. */
.advb-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--advb-spacing-4);
	margin-top: var(--advb-semantic-layout-stack);
}

/*
 * The outlined CTA is the design system's prestige button and it is scoped to
 * [data-surface="ink"], because that is the only place the system puts a dark
 * ground. A hero is the other one: it is a photograph behind a scrim, not an
 * ink section, so the same treatment has to be granted here explicitly.
 * Without this the secondary button on the front page renders as bare crimson
 * text on a dark photograph — the one combination the palette forbids.
 */
.advb-hero .advb-btn--outline {
	background-color: transparent;
	color: var(--advb-ink-color-action-outline);
	border: var(--advb-border-width-hairline) solid var(--advb-ink-color-action-outline);
}

.advb-hero .advb-btn--outline:hover {
	background-color: var(--advb-ink-color-action-outline);
	color: var(--advb-ink-color-surface-page);
}

/* --------------------------------------------- 9.10b  the ink surface */

/*
 * Body copy on a dark band.
 *
 * theme.json makes WordPress emit `:root :where(p) { color: var(--wp--preset--
 * color--text) }`, and that preset is a fixed light-mode grey. `:where()`
 * contributes nothing but `:root` is a class-weight selector, so it outranked
 * the alias the component layer sets -- and on the ink surface every paragraph
 * stayed #4a4746 on #17172d. Contrast 1.91:1, against a required 4.5. The
 * heading beside it was fine, because headings carry their colour through
 * `--a-heading`, which the surface rebinds.
 *
 * This restores the alias at a weight the preset cannot beat. Two things about
 * the shape of it. It is scoped to the statement band rather than to every ink
 * surface, because the footer is also ink and its brand paragraphs are
 * deliberately muted, and a rule that outranked the preset would outrank that
 * too. And it skips paragraphs carrying a component class, because the first
 * version of this took the brass off the eyebrow: `.advb-eyebrow` is one class
 * and could not win either.
 */
/*
 * The statement band carries a stone texture, not a flat fill.
 *
 * A full-width block of one indigo is the flattest thing on the page, and it
 * sits between two lit photographs. The texture is a photograph of cut stone
 * multiplied into the indigo: it reads as grain rather than as a picture, and
 * because it multiplies it can only darken — nothing it does can lift a pixel
 * toward the white text on top, so the contrast measured for the flat colour
 * still holds.
 *
 * It ships with the theme rather than the media library, like the footer's
 * lockup. It is chrome, and a URL that moves between environments is a URL
 * that breaks on one of them.
 */
.advb-root .advb-band--ink {
	background-image: url('../texture-stone.jpg');
	background-size: cover;
	background-position: center;
	background-blend-mode: multiply;
}

.advb-band--ink p:not([class*='advb-']) {
	color: var(--a-text);
}

.advb-band--ink .advb-lede {
	color: var(--a-heading);
}

/* ----------------------------------------------------- 9.10c  statement */

/*
 * A statement band: the claim on the left, what it means on the right.
 *
 * The guarantee band used to be one sentence centred in 173px of vertical
 * padding -- a lot of dark for eighteen words, and a measure the eye had to
 * hunt across. Two columns give the heading its own weight and the prose a
 * proper measure, and the band earns its height.
 */
.advb-statement {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
}

@media (min-width: 1025px) {
	.advb-statement {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--advb-semantic-layout-stack);
		align-items: start;
	}
}

.advb-statement__head > :last-child,
.advb-statement__body > :last-child {
	margin-bottom: 0;
}

/* ----------------------------------------------------------- 9.10d  CTA */

/*
 * The band every page closes on.
 *
 * It carries the firm's own walnut crest at full width, on the hero's
 * machinery: the scrim, the padding, and the two fixes that band needed. What
 * it adds is a centred column and two ways to act rather than one.
 */
/*
 * The closing band is a band, not a strip.
 *
 * It inherited `--compact` and then shrank to whatever its three lines needed:
 * 284px, a 4.7:1 letterbox cut out of a 3:2 photograph. At that ratio a
 * photograph is a texture, and the band read as an afterthought under every
 * page on the site. Given a height of its own it crops like the heroes do and
 * closes the page with the same weight it opens on.
 */
.advb-root .advb-cta,
.advb-root .advb-cta.wp-block-cover {
	min-height: 52vh;
	min-height: 52dvh;
	text-align: center;
}

@media (min-width: 768px) {
	.advb-root .advb-cta,
	.advb-root .advb-cta.wp-block-cover {
		min-height: 46vh;
		min-height: 46dvh;
	}
}

/*
 * The hero's title is capped at 18ch and left-set, which is right under a
 * photograph and wrong for the line that is the whole point of the band.
 *
 * And it drops from the hero size to the section-display size. At 88px this
 * heading ran to three lines straight across the carved letters in the
 * photograph, so the two fought each other; at 64px it is two lines and the
 * crest reads around it.
 */
.advb-root .advb-cta .advb-hero__title {
	font-size: var(--advb-semantic-typography-display-section-font-size);
}

.advb-root .advb-cta .advb-hero__title,
.advb-root .advb-cta .advb-hero__desc {
	max-width: var(--advb-semantic-layout-measure);
	margin-inline: auto;
}

/*
 * The crop sits above the middle of the plate, where the lion is and the
 * carved type is not. The default centre put the largest letters directly
 * behind the heading.
 */
.advb-root .advb-cta .wp-block-cover__image-background {
	object-position: 50% 20%;
}

.advb-root .advb-cta .advb-hero__desc {
	margin-bottom: var(--advb-semantic-layout-stack);
}

/*
 * Two actions, not one.
 *
 * The form and the telephone. Someone who has just read a page about a tax
 * audit does not want to fill in a form, and a number set at display size is
 * the difference between a call and a closed tab. They wrap onto separate
 * lines on a phone, where the number is the more likely of the two.
 */
.advb-cta__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--advb-semantic-layout-stack);
	margin: 0;
}

.advb-cta__phone {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-size-touch-target-comfortable);
	font-family: var(--advb-semantic-typography-display-section-font-family);
	font-size: var(--advb-semantic-typography-heading-3-font-size);
	color: var(--advb-semantic-color-text-on-image);
	text-decoration: none;
	border-bottom: var(--advb-border-width-medium) solid var(--advb-semantic-color-border-accent);
	transition: var(--advb-semantic-motion-interactive);
}

.advb-cta__phone:hover,
.advb-cta__phone:focus-visible {
	color: var(--advb-semantic-color-border-accent);
}

/* ----------------------------------------------------- 9.10f  reach row */

/*
 * Three ways in, on one line, at the top of the contact page: the telephone,
 * the email, the two addresses. The page used to open on two address panels
 * and nothing else, which buried the number a visitor came for under a street
 * name they did not need yet.
 */
/*
 * Every value carries the label that says what it is.
 *
 * The card used to print a number, a line, another number, another line, and
 * the two lines were different kinds of thing: the street address under the
 * first, the word „МОБ" under the second. So the landline was captioned with
 * an address and the mobile with an abbreviation, and the only way to learn
 * which number was which was to ring one. It is a description list now, which
 * is what it always was.
 *
 * The numbers step down from the old heading-3. Three labelled rows in a card
 * need the room, and a telephone number set as large as a section title was
 * competing with the page's own headings for attention it does not need.
 */
.advb-reach__rows {
	margin: 0;
}

.advb-reach__rows dt {
	font-family: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-family);
	font-size: var(--advb-semantic-typography-legal-font-size);
	letter-spacing: var(--advb-semantic-typography-display-eyebrow-cyrillic-letter-spacing);
	text-transform: uppercase;
	color: var(--advb-semantic-color-text-muted);
}

/*
 * A row is prose; the thing you can act on is the exception.
 *
 * This was the other way round -- every dd set in the display serif at
 * heading-4 -- with the address exempted afterwards. That left the one row
 * that is neither a number nor an address, „Кога / По всяко време", set like a
 * telephone number: the largest thing in the card, in the serif, next to an
 * address in body text. It read as though it mattered more than the address
 * above it, which it does not.
 *
 * So the default is prose and the promotion is on the link. The numbers and
 * the email are the two things a visitor came to this card to press, and they
 * are the two things that carry the display treatment.
 */
.advb-reach__rows dd {
	margin: var(--advb-spacing-0) var(--advb-spacing-0) var(--advb-spacing-4);
	font-family: var(--advb-semantic-typography-body-default-font-family);
	font-size: var(--advb-semantic-typography-body-default-font-size);
	color: var(--advb-semantic-color-text-default);

	/*
	 * `info@advokatburgas.eu` is one unbreakable word as far as the browser is
	 * concerned, and at the old size it set the panel's minimum width and
	 * pushed the page wider than a 320px screen. It may break.
	 */
	overflow-wrap: anywhere;
}

.advb-reach__rows dd:last-child {
	margin-bottom: var(--advb-spacing-0);
}

.advb-reach__rows dd a {
	font-family: var(--advb-semantic-typography-display-section-font-family);
	font-size: var(--advb-semantic-typography-heading-4-font-size);
	text-decoration: none;
}

/* <address> is italic by default and this one is a postal address, not an aside. */
.advb-reach__rows dd address {
	font-style: normal;
}

.advb-reach .advb-panel > :last-child {
	margin-bottom: 0;
}

/*
 * On a tablet specifically, the email card is the row's odd one out — the
 * two office numbers fill a two-column grid, and ИМЕЙЛ is left alone in the
 * first column of the row beneath, flush left with an empty second column
 * beside it. Spanning the row and setting an explicit width the same as one
 * of those two columns, then centring that width with auto margins, sits it
 * under the row above without stretching it to fill the span or shrinking it
 * down from its neighbours — same card, same left-aligned title and text,
 * just not pinned to the grid's own left-hand track.
 *
 * `grid-auto-rows: 1fr` is what makes it the same card in the other
 * direction too. Rows are content-sized by default, and this one holds three
 * short lines against the office cards' six, so matching their width still
 * left it visibly shorter than them. Equal rows settle to the tallest, which
 * is the same thing the two office cards already do to each other across a
 * single row — Sofia has one number to Burgas's two and is not a shorter
 * card for it.
 */
@media (min-width: 768px) and (max-width: 1024px) {
	.advb-reach {
		grid-auto-rows: 1fr;
	}

	.advb-reach .advb-panel:nth-child(3) {
		grid-column: 1 / -1;
		width: calc((100% - var(--advb-semantic-layout-grid-gap)) / 2);
		margin-inline: auto;
	}
}

/* --------------------------------------------------- 9.10e  jump index */

/*
 * A contents row for a page you arrive at with one question.
 *
 * The nine answers used to run one after another under four plain headings,
 * so the only way to reach the one you came for was to read past the others.
 * Each chip carries the count, because "Данъчно право 2" tells you whether it
 * is worth the jump and a bare label does not.
 */
.advb-jump {
	display: flex;
	flex-wrap: wrap;
	gap: var(--advb-spacing-3);
	list-style: none;
	margin: 0;
	padding: 0;
}

.advb-jump a {
	display: inline-flex;
	align-items: center;
	gap: var(--advb-spacing-3);
	min-height: var(--advb-semantic-layout-touch-target);
	padding-inline: var(--advb-spacing-5);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	color: var(--advb-semantic-color-text-heading);
	text-decoration: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-jump a:hover,
.advb-jump a:focus-visible {
	border-color: var(--advb-semantic-color-border-accent);
	color: var(--advb-semantic-color-action-link);
}

/*
 * A section that is only a heading.
 *
 * "КАК РАБОТИМ ?" introduces the three blocks under it and nothing else, so it
 * gets the section's top padding and almost none of its bottom: a heading with
 * a section's worth of air beneath it reads as a section with its content
 * missing.
 */
.advb-root .advb-section--head {
	padding-bottom: var(--advb-spacing-6);
}

/*
 * „КАК РАБОТИМ" is a divider, and it is the only band on the page in this tone.
 *
 * It was an eyebrow reading „Как работим", then a heading reading „КАК РАБОТИМ
 * ?", then the three chips, then a section's worth of empty white before the
 * first block: the same two words twice, and nothing under them. The eyebrow
 * and the question mark went.
 *
 * It was tried on the ink band next, and that was wrong for a reason the band
 * itself could not show: the section directly above it is dark as well, so the
 * two ran together into one long dark stretch with a heading floating in the
 * middle of it. Then the warm brass panel, which separated properly and kept
 * the ink surface stamped on the block underneath, so the heading stayed white
 * and sat on beige at about 1.4:1.
 *
 * It is the alternating band the rest of the page uses, the same one
 * „Дружеството" sits on, with the heading in the ordinary heading colour and
 * its eyebrow back above it. The separation it needed was never a new colour:
 * it was not being the same white as the section before it.
 *
 * Three chips, three equal columns. Sized to their own labels they were three
 * different widths under a heading, which is the thing the practice grid two
 * sections up was fixed for.
 */
.advb-root .advb-how {
	padding-bottom: var(--advb-semantic-layout-section-y-tight);
	background-color: var(--advb-semantic-color-surface-subtle);
}

.advb-how .advb-jump {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--advb-spacing-3);
	/* The section reset zeroes flow margins, so the gap under the heading has
	   to be stated. Without it the chips sat on the baseline of the word. */
	margin-top: var(--advb-semantic-layout-stack);
}

@media (min-width: 768px) {
	.advb-how .advb-jump {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/*
 * On brass, the chip is drawn in brass. A hairline in the default border grey
 * disappears against this ground; the seal is the line this tone belongs to.
 */
.advb-how .advb-jump a {
	/* The base rule sets `inline-flex`, which is right for chips in a row and
	   wrong in a grid: three equal columns held three chips sized to their own
	   labels. */
	display: flex;
	width: 100%;
	background-color: var(--advb-semantic-color-surface-page);
}

.advb-how .advb-jump a:hover,
.advb-how .advb-jump a:focus-visible {
	border-color: var(--advb-semantic-color-border-accent);
	color: var(--advb-semantic-color-action-link);
}

/* The index number leads the chip, so it wants the accent, not the muted grey
   it had when it trailed as a count. */
.advb-jump .advb-jump__count {
	font-family: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-family);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-border-accent);
}

/* ------------------------------------------------- 9.10e  centred rows */

/*
 * A centred block whose eyebrow rule follows it.
 *
 * The rule under an eyebrow is an ::after with a fixed width, so centring the
 * text on its own leaves the rule hard against the left edge, which reads as a
 * mistake rather than as a detail.
 */
.advb-langs {
	text-align: center;
}

.advb-langs .advb-eyebrow::after {
	margin-inline: auto;
}

.advb-langs .advb-lang-strip {
	justify-content: center;
}

/*
 * A standfirst is capped at the measure, which in a centred block leaves the
 * text centred inside a box that is itself sitting on the left.
 *
 * `text-wrap: balance` evens the two lines out as well. Centred text that
 * breaks long-then-short reads as ragged even when the block itself is
 * exactly centred, which is the half of this that the eye actually notices.
 */
.advb-langs .advb-lede {
	margin-inline: auto;
	text-wrap: balance;
}

/* ------------------------------------------------------- 9.11  partner */

/*
 * The firm has one attorney with both a photograph and a biography. Presented
 * as a card in a three-column grid that read as two people missing; as a split
 * panel it reads as what it is — the partner you will be dealing with.
 */
.advb-partner__portrait {
	width: 100%;
	aspect-ratio: var(--advb-grid-aspect-portrait);
	object-fit: cover;
	object-position: 50% 20%;
	border-radius: var(--advb-semantic-radius-media);
}

.advb-partner__name {
	margin-top: 0;
	margin-bottom: var(--advb-spacing-4);
}

/*
 * A number needs the word it counts sitting next to it.
 *
 * „28" over „Години юридическа практика" made the reader carry the number down
 * a line to find out what it was. The unit goes beside the figure, at the size
 * a heading is, on the same baseline; the line underneath stops repeating the
 * unit and says something the number does not.
 */
.advb-stat__figure {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: var(--advb-spacing-2);
}

.advb-stat__unit {
	font-family: var(--advb-semantic-typography-display-section-font-family);
	font-size: var(--advb-semantic-typography-heading-4-font-size);
	line-height: var(--advb-semantic-typography-heading-4-line-height);
	color: var(--advb-semantic-color-accent-seal);
}

.advb-partner__areas {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: var(--advb-spacing-2);
	margin: 0 0 var(--advb-spacing-6);
	padding: 0;
}

/*
 * Four links, four equal cells.
 *
 * Three practice links sized to their own labels sat in a row, with a wider
 * button on a line of its own underneath: four controls, four widths, two
 * kinds. They are four links to four pages, so they are one grid. The cells
 * stretch to the tallest, which is what makes the block read as a block.
 */
.advb-partner__areas--quad {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--advb-spacing-3);
}

@media (min-width: 768px) {
	.advb-partner__areas--quad {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.advb-partner__areas a {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
	padding-inline: var(--advb-spacing-4);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	text-decoration: none;
}

.advb-partner__areas a:hover {
	border-color: var(--advb-semantic-color-border-accent);
}

/*
 * A cell fills its column.
 *
 * The base rule above sets the link to `inline-flex`, which is right for chips
 * that sit in a row and shrink to their labels. In the grid it made each cell
 * as wide as its own words, so four equal columns held four different buttons.
 * It has to come after the rule it corrects, which is the whole reason this
 * block is down here rather than beside the grid it belongs to.
 */
.advb-partner__areas--quad a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: var(--advb-spacing-4);
	text-align: center;
}

/* The panel's own last paragraph is the CTA; it should not add a gap under it. */
.advb-partner > div > :last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------- 9.12  split figure */

/*
 * Copy on one side, a real photograph on the other. The firm's own story on
 * the home page and on /kantorata/ — which is where the office photography
 * that has been sitting unused in the media library belongs.
 */
.advb-split {
	display: grid;
	gap: var(--advb-semantic-layout-grid-gap);
	grid-template-columns: 1fr;
	align-items: center;
}

@media (min-width: 1025px) {
	.advb-split {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--advb-semantic-layout-stack);
	}
}

/*
 * The picture is the grid item, not the figure around it.
 *
 * The image used to be a bare <img> written into a Custom HTML block. It is a
 * core image block now, so that the section can be edited rather than read out
 * of a textarea, and a core image block ships inside a <figure>. That figure
 * would take the grid column and leave the picture sizing itself inside it.
 *
 * `display: contents` takes the figure out of the box tree without taking it
 * out of the document: the <img> becomes the grid item, which is exactly what
 * it was, and every rule below goes on addressing the picture directly.
 */
.advb-split > .wp-block-image {
	display: contents;
}

.advb-split img {
	width: 100%;
	aspect-ratio: var(--advb-grid-aspect-card);
	object-fit: cover;
	border-radius: var(--advb-semantic-radius-media);
}

/*
 * The same split, holding a person rather than a room.
 *
 * A portrait cropped to the 3:2 the office photographs use takes a band out of
 * the middle of a face. This keeps the 4:5 the attorney portraits are shot at
 * and gives the picture the narrower column, because a half-page photograph of
 * one man is a monument, not an introduction.
 */
@media (min-width: 1025px) {
	.advb-split.advb-split--portrait {
		grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	}
}

.advb-split.advb-split--portrait img {
	aspect-ratio: var(--advb-grid-aspect-portrait);
	object-position: 50% 20%;
}

/* A standfirst inside a split already has a column for a measure. Capping it
   again wrapped it three lines short of the paragraph beneath it, which reads
   as a mistake rather than as emphasis. */
.advb-split .advb-lede,
.advb-statement__body .advb-lede {
	max-width: none;
}

/* =========================================== 10  editor-facing helpers */

/*
 * `advb-visual-bold` keeps the original page's visual emphasis without adding a
 * second semantic <strong> around a phrase the SEO checks already count once.
 */
.advb-visual-bold {
	font-weight: var(--advb-typography-font-weight-bold);
}

/* ========================================================== 11  print */

@media print {
	.advb-drawer,
	.advb-drawer__backdrop,
	.advb-masthead__nav,
	.advb-masthead__actions,
	.advb-bento__foot,
	.advb-related {
		display: none !important;
	}

	/* A sticky aside pins itself to the top of every printed page. */
	.advb-glance {
		position: static !important;
	}

	/* Nothing arrives late on paper. */
	.advb-js .advb-reveal {
		opacity: 1 !important;
		transform: none !important;
	}

	/* The bento is a navigation device; on paper it is seven boxes of links
	   between the reader and the article they printed. One column, no chrome. */
	.advb-bento {
		grid-template-columns: 1fr !important;
	}
}

/*
 * A filled button is never also underlined.
 *
 * The footer underlines its links on hover, which is right for a list of
 * links and wrong for the one link in that column shaped like a button: it
 * arrived with a background, a border and a rule drawn under its label, which
 * is three ways of saying the same thing and none of them agreeing. A button
 * says what it is by being a button.
 */
.advb-root .advb-btn,
.advb-root .advb-btn:hover,
.advb-root .advb-btn:focus-visible,
.advb-footer .advb-btn:hover {
	text-decoration: none;
}

/*
 * Square images in square cards.
 *
 * The system's default radius is none, and says so: sections, cards, panels,
 * images. The one exception it allows is 4px on media, and taking it put a
 * rounded photograph inside a card with hard corners, which reads as a
 * mistake rather than as a detail: at the top left of every news card the
 * image curved away from the border wrapping it. Either both are round with
 * the outer radius computed from the inner one plus the padding, or both are
 * sharp. This site is sharp everywhere else, so they are sharp.
 */
.advb-root .advb-card .wp-block-post-featured-image img,
.advb-root .advb-card img,
.advb-root .advb-panel img {
	border-radius: var(--advb-semantic-radius-surface);
}

/* ------------------------------------------ 9.10c  the article's panel */

/*
 * The article column, once it sits in a grid cell of its own.
 *
 * core/post-content carries `has-global-padding`, which is 48px of inset meant
 * for a block sitting directly on the page. Inside the grid the cell already
 * is the measure, so that padding was 48px of the reading column spent on
 * nothing and 48px of misalignment between the text and anything set beside
 * it.
 */
.advb-with-glance > .advb-article {
	padding-inline: var(--advb-spacing-0);
	max-width: none;
}

/*
 * The panel on an article carries an index rather than a list of services, so
 * its rows are links and they wrap.
 */
.advb-glance--article .advb-glance__index {
	list-style: none;
	margin: var(--advb-spacing-0) var(--advb-spacing-0) var(--advb-spacing-6);
	padding: var(--advb-spacing-0);
}

/*
 * The brass rule is the marker, and the only marker.
 *
 * .advb-glance li::before already draws it, so the border this rule used to add
 * down the left of every link was a second bullet for the same item: a gold
 * dash and then a grey bar, one indented from the other. The index reads like
 * the list on a practice page now, because it is the same list.
 */
.advb-glance--article .advb-glance__index a {
	font-size: var(--advb-semantic-typography-body-small-font-size);
	line-height: var(--advb-semantic-typography-body-small-line-height);
	color: var(--advb-semantic-color-text-default);
	text-decoration: none;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-glance--article .advb-glance__index a:hover,
.advb-glance--article .advb-glance__index a:focus-visible {
	color: var(--advb-semantic-color-action-link);
}

/* The date and the rubric close the panel, set as the small print they are. */
.advb-glance--article .advb-glance__facts {
	padding-top: var(--advb-spacing-4);
	border-top: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
}

.advb-glance--article .advb-glance__facts .advb-glance__meta {
	margin: var(--advb-spacing-0);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-text-muted);
}

.advb-glance--article .advb-glance__facts .advb-glance__meta + .advb-glance__meta {
	margin-top: var(--advb-spacing-1);
}

/* --------------------------------------------- 9.11  article typography */

/*
 * An article gets its vertical rhythm back.
 *
 * `.advb-root .entry-content > *` zeroed every flow margin in the main column.
 * Its own comment says "inside an article the flow margins are what space the
 * paragraphs, and those are left alone" -- but the article body carries
 * .entry-content, so the rule was zeroing exactly what it claimed to protect.
 * The result was measurable and awful: every gap between every heading and
 * every paragraph on every article was 0px. The page was one unbroken wall of
 * text with headings buried in it, which is why it read as though nobody had
 * looked at it.
 *
 * The reset stays, because it is right for the section wrappers it was written
 * for. Prose inside the article is given its spacing back explicitly, which
 * also means the rhythm is stated here rather than inherited from whatever
 * WordPress's block gap happens to be.
 *
 * A heading takes much more space above than below, so it belongs to the text
 * that follows it rather than floating between two blocks equally.
 */
/*
 * Every child, not a list of the ones that were thought of.
 *
 * It used to name p, ul, ol, figure, blockquote and table, which left anything
 * else at the zero the reset above set: a raw <div> out of an html block, a
 * <pre>, a <dl>, a separator. Those rendered flush against the paragraph after
 * them, and the gap that was missing was exactly the one this section exists to
 * put back. The headings below override it, which is the only exception there
 * ever was.
 */
.advb-root .advb-article > * {
	margin-block: var(--advb-spacing-0) var(--advb-spacing-6);
}

.advb-root .advb-article > h2 {
	margin-block: var(--advb-spacing-12) var(--advb-spacing-4);
}

.advb-root .advb-article > h3 {
	margin-block: var(--advb-spacing-10) var(--advb-spacing-3);
}

.advb-root .advb-article > h4,
.advb-root .advb-article > h5,
.advb-root .advb-article > h6 {
	margin-block: var(--advb-spacing-8) var(--advb-spacing-3);
}

/* Nothing hangs off the top or the bottom of the column. */
.advb-root .advb-article > *:first-child {
	margin-block-start: var(--advb-spacing-0);
}

.advb-root .advb-article > *:last-child {
	margin-block-end: var(--advb-spacing-0);
}

/* A list needs its own indent back, for the same reason. */
.advb-root .advb-article > ul,
.advb-root .advb-article > ol {
	padding-inline-start: var(--advb-spacing-6);
}

.advb-root .advb-article > ul > li,
.advb-root .advb-article > ol > li {
	margin-block-end: var(--advb-spacing-2);
}

/* --------------------------------- 9.11a  a button is not a visited link */

/*
 * THE BUG BEHIND „the buttons are still wrong".
 *
 * The component layer carries `:where(.advb-root) a:visited { color:
 * var(--a-link-visited) }`, which resolves to crimson.800, #691934. `:where()`
 * contributes nothing, so that selector weighs (0,1,1) -- and `.advb-btn--primary`
 * weighs (0,1,0). Every button on this site is an <a>. So the first time a
 * visitor had been to /адвокат-бургас-контакти/, every „ЗА КОНТАКТ С НАС" on
 * every page repainted its label #691934 on a #cc3366 fill: 2.3:1, the muddy
 * grey-mauve that kept coming back in screenshots.
 *
 * „ОБАДЕТЕ СЕ" stayed white throughout, which is what made it look like two
 * different buttons. It is a `tel:` link, and a telephone number is never in
 * the browser's history.
 *
 * It is invisible to measurement: getComputedStyle reports the *unvisited*
 * colour by design, because leaking history through CSS is a privacy hole. The
 * button measured `rgb(255,255,255)` on twelve instances across five pages
 * while rendering wrong on all of them. Only the eye can see this one.
 *
 * Every variant restates the colour it already has. Colour is one of the few
 * properties :visited is permitted to set, so this is the whole of the fix.
 */
.advb-root .advb-btn--primary:visited,
.advb-root .advb-btn--primary:visited:hover {
	color: var(--a-cta-text);
}

.advb-root .advb-btn--secondary:visited {
	color: var(--advb-semantic-color-action-secondary-text);
}

.advb-root .advb-btn--ghost:visited {
	color: var(--a-link);
}

.advb-root .advb-hero .advb-btn--outline:visited {
	color: var(--advb-ink-color-action-outline);
}

.advb-root .wp-block-button__link:visited {
	color: var(--advb-semantic-color-action-primary-text);
}

/*
 * The menu is the same defect, one component over: a visited page's label went
 * #691934 while every other label stayed at the body colour, so the bar told
 * you where you had been rather than where you are. Where you are is what
 * [aria-current] says, in the accent, and it is the only thing the menu should
 * be colouring.
 */
.advb-root .advb-nav a:visited,
.advb-root .advb-nav a:visited .wp-block-navigation-item__label {
	color: inherit;
}

.advb-root .advb-nav .advb-nav__link[aria-current='page']:visited .wp-block-navigation-item__label {
	color: var(--advb-semantic-color-action-link);
}

/* ------------------------------------- 9.11b  one filled button, one hover */

/*
 * A filled button darkens on hover, on every ground.
 *
 * The design system brightens it on a dark band instead -- crimson.500 to
 * crimson.400 -- and states why: on ink, brightening is the direction that
 * reads as "closer". It is right in the abstract and wrong here, because this
 * site puts the same crimson button on a photograph, on white and on ink, and
 * a control that darkens in two places and lightens in the third is three
 * controls. The one on the Контакти hero is the one everybody has been
 * looking at, so its behaviour is the site's.
 *
 * Nothing renders a filled button on an ink band today. This is so that the
 * next one cannot be the exception, which is the only way the last one
 * happened.
 */
[data-surface='ink'],
.advb-footer,
.advb-band--ink {
	--a-cta-hover: var(--advb-semantic-color-action-primary-hover);
	--a-cta-active: var(--advb-semantic-color-action-primary-active);
}

/* ------------------------------------- 9.12  the hero button on a phone */

/*
 * The hero keeps its button at every width.
 *
 * It used to be hidden below 768px, because a fixed bar at the bottom of the
 * screen was already offering the same two actions and the first screen was
 * asking twice. The bar is gone -- it spent 51px of a 659px viewport on every
 * page, sat over the last field of the contact form, and meant the page a
 * visitor landed on had no call to action of its own. Full width, because at
 * this size a shrink-wrapped button in a column of full-width text is the odd
 * one out.
 */
@media (max-width: 767px) {
	.advb-root .advb-hero .advb-hero__actions .advb-btn {
		display: flex;
		width: 100%;
	}
}

/* ------------------------------------------- 9.13  the enquiry, in steps */

/*
 * One question at a time.
 *
 * The disclosure that used to hold the optional half of the form is gone: with
 * one question on screen there is nothing left to hide, and the two optional
 * fields sit under the question they belong to, marked optional by their own
 * labels rather than by being folded away.
 *
 * Everything here is scoped to [data-advb-steps='on'], which site.js sets only
 * once it has taken charge. Without JavaScript the form is the plain column it
 * always was, every field visible, and it posts identically.
 */
.advb-form-progress {
	display: flex;
	align-items: center;
	gap: var(--advb-spacing-4);
	margin: var(--advb-spacing-0) var(--advb-spacing-0) var(--advb-spacing-6);
}

.advb-form-progress__count {
	flex: none;
	font-family: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-family);
	font-size: var(--advb-semantic-typography-legal-font-size);
	letter-spacing: var(--advb-semantic-typography-display-eyebrow-cyrillic-letter-spacing);
	color: var(--advb-semantic-color-text-muted);
}

.advb-form-progress__track {
	flex: 1 1 auto;
	height: var(--advb-border-width-medium);
	background-color: var(--advb-semantic-color-border-default);
}

/* The brass rule again, this time measuring how far there is left to go. */
.advb-form-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background-color: var(--advb-semantic-color-accent-seal);
	transition: width var(--advb-duration-normal) var(--advb-easing-standard);
}

/*
 * A step is as tall as the tallest one, so the buttons under it do not jump
 * from question to question. Measured against the message step, which is a
 * textarea and a text field; the others are shorter and take the difference as
 * air under the control rather than as movement.
 */
[data-advb-steps='on'] .advb-step {
	display: flex;
	flex-direction: column;
	gap: var(--advb-spacing-5);
	min-height: calc(var(--advb-semantic-layout-touch-target) * 5);
}

[data-advb-steps='on'] .advb-step[hidden] {
	display: none;
}

/*
 * The label is the question, so it is set as one: the size of a lede rather
 * than of a form label, because it is the only thing being asked.
 */
[data-advb-steps='on'] .advb-step .advb-label {
	font-family: var(--advb-semantic-typography-heading-5-font-family);
	font-size: var(--advb-semantic-typography-heading-5-font-size);
	line-height: var(--advb-semantic-typography-heading-5-line-height);
	color: var(--advb-semantic-color-text-heading);
	margin-bottom: var(--advb-spacing-3);
}

/* The optional field under the question is quieter than the question. */
[data-advb-steps='on'] .advb-step .advb-field + .advb-field .advb-label {
	font-family: var(--advb-semantic-typography-body-default-font-family);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-text-muted);
}

/*
 * The first question is answered with a tap, not with typing.
 *
 * A stranger describing a legal problem to a firm they have not met opens on a
 * blank text field, which is the highest bar the form has, placed first. It
 * opens on seven choices instead: the six practices the site is built around,
 * read from the same array the menu and the practice grid are read from, and
 * „Друго". One tap answers it and the form moves on by itself, so the writing
 * is the last thing asked rather than the first.
 *
 * Radios, not buttons: they post as `subject` exactly the way the text field
 * did, so inc/contact-form.php never learns this happened, and without
 * JavaScript they are a plain, working list of options.
 */
.advb-pick {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--advb-spacing-3);
	margin-top: var(--advb-spacing-4);
}

@media (min-width: 480px) {
	.advb-pick {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.advb-pick__option {
	display: flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
	padding: var(--advb-spacing-3) var(--advb-spacing-4);
	background-color: var(--advb-semantic-color-surface-page);
	border: var(--advb-border-width-hairline) solid var(--advb-semantic-color-border-default);
	color: var(--advb-semantic-color-text-heading);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	cursor: pointer;
	transition: var(--advb-semantic-motion-interactive);
}

.advb-pick__option:hover {
	border-color: var(--advb-semantic-color-border-accent);
	color: var(--advb-semantic-color-action-link);
}

/* The radio itself is not drawn: the option is the control. */
.advb-pick__option input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.advb-pick__option:has(input:checked) {
	border-color: var(--advb-semantic-color-border-accent);
	background-color: var(--advb-semantic-color-surface-accent-subtle);
	color: var(--advb-semantic-color-action-link);
}

/* Focus has to be visible on a control whose input is not. */
.advb-pick__option:has(input:focus-visible) {
	outline: var(--advb-border-width-medium) solid var(--advb-semantic-color-border-focus);
	outline-offset: var(--advb-spacing-1);
}

.advb-fieldset .advb-label {
	display: block;
	padding: var(--advb-spacing-0);
}

/*
 * The last step shows what is about to be sent.
 *
 * It was a consent checkbox alone in a box five rows tall, which is a lot of
 * empty page to end a conversation on, and the checkbox read as a formality
 * rather than as the last thing between the visitor and a stranger reading
 * their problem. The summary is built from the form's own values, so nothing
 * here is stored twice or can fall out of step with what posts.
 */
.advb-summary {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	gap: var(--advb-spacing-2) var(--advb-spacing-5);
	margin: var(--advb-spacing-5) var(--advb-spacing-0);
	padding: var(--advb-spacing-5);
	background-color: var(--advb-semantic-color-surface-page);
	border-left: var(--advb-border-width-rule) solid var(--advb-semantic-color-accent-seal);
}

.advb-summary dt {
	font-family: var(--advb-semantic-typography-display-eyebrow-cyrillic-font-family);
	font-size: var(--advb-semantic-typography-legal-font-size);
	letter-spacing: var(--advb-semantic-typography-display-eyebrow-cyrillic-letter-spacing);
	text-transform: uppercase;
	color: var(--advb-semantic-color-text-muted);
	padding-top: var(--advb-spacing-1);
}

.advb-summary dd {
	margin: var(--advb-spacing-0);
	font-size: var(--advb-semantic-typography-body-small-font-size);
	color: var(--advb-semantic-color-text-default);
	overflow-wrap: anywhere;
}

/*
 * The submit sits in the row with Назад, not on a line of its own beneath it.
 * On the last step there are two things to do, going back and sending, and two
 * things to do belong side by side.
 */
.advb-form-nav {
	display: flex;
	gap: var(--advb-spacing-3);
	margin: var(--advb-spacing-6) var(--advb-spacing-0) var(--advb-spacing-0);
}

.advb-form-nav [hidden],
.advb-contact-form .advb-form-submit[hidden] {
	display: none;
}

/*
 * The submit is the width of the form, and so is the last step's button.
 *
 * A shrink-wrapped control at the end of a column of full-width fields is the
 * one thing on the page that does not line up with anything, and at this point
 * in the form it is the only thing left to press.
 */
.advb-contact-form .advb-form-submit,
.advb-form-nav .advb-btn {
	flex: 1 1 auto;
	width: auto;
}

@media (min-width: 768px) {
	.advb-form-nav .advb-btn {
		flex: 0 1 auto;
		min-width: calc(var(--advb-semantic-layout-touch-target) * 3);
	}
}

/* ------------------------------------------------- 9.14  touch targets */

/*
 * Three controls on this site were too small to hit with a thumb.
 *
 * Measured at 390px: the drawer's submenu caret was 10px tall, the breadcrumb
 * links 15px, and the telephone numbers on the contact page 32px. The caret is
 * the worst of them, because it is the control that opens the practice list and
 * it is a 10px box next to a 48px row.
 *
 * 44px is the floor everyone cites and the one the design system already uses
 * for .advb-btn--sm. The visible size of each of these stays exactly as it is:
 * what grows is the area that answers the tap, which is padding on the link and
 * a min-height on the button, so nothing moves on screen.
 */
.advb-drawer .wp-block-navigation__submenu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--advb-semantic-layout-touch-target);
	min-height: var(--advb-semantic-layout-touch-target);
	color: var(--advb-semantic-color-text-muted);
}

.advb-drawer .wp-block-navigation-item.is-open > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon {
	color: var(--advb-semantic-color-action-link);
}

/*
 * The numbers are the reason somebody opened this page on a phone. They are
 * links, so they get a link's target.
 */
.advb-reach__rows dd a {
	display: inline-flex;
	align-items: center;
	min-height: var(--advb-semantic-layout-touch-target);
}

/*
 * A breadcrumb stays small to read and grows to be tapped.
 *
 * A `min-height` was the first attempt and it was the wrong tool: the crumbs
 * are flex items, so a 48px box made the trail itself 48px, and every hero on
 * the site opened with its headline pushed a line further down. The target has
 * to grow without the row growing with it, which is padding the layout takes
 * straight back out again: 16px each way puts a 20px line over the 48px floor,
 * and the equal negative margin means the flex line is still measured at 20.
 * Nothing moves on screen; the area that answers the tap is two and a half
 * times what it was.
 */
@media (max-width: 1024px) {
	.advb-breadcrumb a {
		display: inline-block;
		padding-block: var(--advb-spacing-4);
		margin-block: calc(var(--advb-spacing-4) * -1);
	}
}

/*
 * The link that closes each practice tile, at a size a thumb can hit.
 *
 * "Научете повече" is the only way out of a tile and it measured 22px on a
 * phone. Same text, same position, twice the target.
 */
@media (max-width: 1024px) {
	.advb-bento__foot a {
		display: inline-flex;
		align-items: center;
		min-height: var(--advb-semantic-layout-touch-target);
	}
}
