/* von Soden's cross-reference mark - the AHw arrow, <lbl>#V</lbl> in the data.
   A circle with a stem tangent to its right edge (the "q and d combined" shape).

   Drawn as inline SVG rather than set in the LAD_vonSoden webfont. That font's
   outline was cut against a normal-weight reference - a 118u stem and a 101u
   MONOLINE ring on a 1000u em - while .ahw-entry renders Noto Serif at weight
   200, whose stems are 42u and whose hairlines are 31u. The mark therefore came
   out about three times the weight of the text it sits in, and because the ring
   is unmodulated (a serif bowl thins from 43u at the sides to 31u top and
   bottom) it read as a highlight rather than as a character. As SVG the weight
   is a single number - see --ahw-arrow-weight below.

   Geometry is in units of 1/100 em, measured off the printed volume (AHw p.180,
   snippet ahw_e_auto-page_0001-010, "ebbutum (Abstr. zu <arrow> ebbu 7)"). The
   box is one em tall and vertical-align drops it 0.21em, so the text baseline
   falls at y=79 - the -210 descent the font used. In print:

     - the bowl is EXACTLY x-height: its top touches the x-height line and its
       underside rests on the baseline. Measured 34px against a 34px x-height.
       So with Noto Serif's x-height of 543/1000, the bowl's outer diameter is
       54.3u: cy 51.85 +/- (r 25.35 + half the stroke) spans y 24.7 to y 79.
       The first cut here made the bowl 58.2u - taller than any lowercase letter
       - which is what made it loom.
     - the stem runs ascender to descender, not edge to edge: 47px above the
       baseline (the ascender, 760/1000 -> y 3) and 14px below (the descender,
       210/1000 -> y 100).
     - the stem is centred on the bowl's right tangent, so the two merge. */
:root {
  /* Stroke weight of the AHw arrow, in 1/100 em - the same units per 1000-em as
     the measurements above, divided by ten. 3.6 (36u) sits between the text's
     31u hairline and its 42u stem, which is where a monoline mark has to land
     to read as the same colour as modulated type.
     RETUNED 2026-09-16 when .ahw-entry moved from Noto Serif 200 to 300. The stems
     nearly double across that step - measured in a browser at 1000px: hairline
     31u -> 40u, stem 43u -> 68u (the 200 figures reproduce the values derived
     above, which is what validates the method). The mark has to move with them or
     it drops back to looking like a hairline scratch. Midpoint 54u -> 5.4.
     Alternates, kept so the decision can be revisited without re-deriving it:
       4.0  the text's own hairline at 300 - lightest that still reads
       5.4  IN USE (midpoint of hairline and stem, as before)
       6.8  the text's own stem at 300; a monoline at stem weight reads slightly
            heavy, having no thin parts to relieve it, but it is the sturdy option
     The weight-200 values were 3.1 / 3.6 / 4.2 if .ahw-entry ever goes back. */
  --ahw-arrow-weight: 5.4;

  /* ...and the same mark inside the XML editor, which needs its own value
     because editor-xml.html loads neither page.css nor page/core/variables.css.
     --ahw-font-family and --font-weight-extralight are therefore UNDEFINED
     there, so .ahw-entry's font-family and font-weight both fall back and the
     editor renders AHw in its own face at normal weight (~94u stems) instead of
     Noto Serif 200 (42u stems). A stroke tuned for 42u stems is invisible
     beside 94u ones. 7.0 sits between the ratio the printed volume uses (a mark
     ~0.7 of the text stem -> 6.6) and the ratio chosen for the entry view
     (36/42 -> 8.0). Tune freely; it changes nothing outside the editor.
     The real fix is to load variables.css in the editor, which would also
     restore the typeface - a bigger change than this knob, so it is left open.
     Alternates:
       6.6  the ratio the printed volume uses (mark ~0.7 of the text stem)
       7.0  IN USE
       8.0  the ratio chosen for the entry view (36/42), i.e. the heaviest
            option that is still internally consistent - use this if the mark
            ever needs to carry more in the editor */
  --ahw-arrow-weight-editor: 7;
}

.custom-icon {
  height: 1em;
  width: .60em;
  vertical-align: -.21em;
  stroke-width: var(--ahw-arrow-weight, 3.6);
  /* Softened terminals. A round cap adds half the stroke width beyond each
     endpoint - 1.8u at the entry weight, i.e. 0.018em - so the corners lose
     their hard edge without the mark reading as rounded. The stem's endpoints
     are pulled in by that much in the markup (y 4.8 -> 98.2) so the CAP, not
     the line, lands on the ascender and the descender. */
  stroke-linecap: round;
  /* ...and the caps therefore sit a hair outside the viewBox at the heavier
     editor weight. Without this they would be clipped flat, which is exactly
     the corner the round cap is there to remove. */
  overflow: visible;
  /* The webfont carried this gap inside its advance width (1010u advance, ink
     ending at 648u). Reproduced so replacing the glyph does not silently
     re-space ~40,000 cross-references. NB print spacing cannot settle whether
     it is right: AHw is set justified, so its inter-word gaps vary per line. */
  margin-right: .36em;
}

/* Editor variant. See --ahw-arrow-weight-editor above for why it exists. */
.custom-icon-edit {
  stroke-width: var(--ahw-arrow-weight-editor, 7);
}

/* von Soden's second mark: the cross-shaped sign on the liver, printed where a
   liver omen describes parts lying across one another ("ahnl. v Leberteilen KAR
   454, 30f. (wie <cross>)", egeru, AHw p.190). Not a symmetric cross - measured
   off snippet ahw_e_auto-page_0011-003 it is a horizontal bar crossed by a steep
   diagonal that leans right as it descends, about 31 degrees off vertical,
   meeting the bar at 60% of its width. 44px wide by 40px tall against a 34px
   x-height, sitting 2px above the x-height line and 3px below the baseline -
   hence a box 0.73em wide, the bar at y 52.5 and the diagonal from (24, 21.5)
   to (62, 84). Wider than it is tall, and wider than the arrow. No trailing
   margin: unlike the arrow it inherits no sidebearing from a font, and it is
   normally set inside parentheses. */
.custom-icon-liver {
  width: .73em;
  margin-right: 0;
}

/* von Soden's third mark, the Glossenkeil (AHw I p. IV, Abs. 6): two parallel strokes
   falling to the right at ~36 degrees, from just above the x-height line to just below
   the baseline. Traced off vol. I p. VI. It stands between two words, so the gaps come
   from the stylesheet and the arrow's margin is not wanted. */
.custom-icon-glossenkeil {
  width: .63em;
  margin-right: 0;
}

/* Wrapper that hangs the site tooltip off the liver sign in the entry view.
   .tooltip-container is display:inline-block, so left alone it would build its
   own line box around the mark: the strut would add its descent below the SVG
   and could push the AHw line apart. line-height:0 collapses that strut, so the
   box is exactly the 1em SVG, and the wrapper then takes over the baseline shift
   the mark itself normally carries - net effect on the line is identical to the
   bare <svg>. .tooltip-text sets its own line-height (1.4) in tooltips.css, so
   collapsing it here does not reach the tooltip's own wrapped text. */
.custom-icon-tip {
  line-height: 0;
  vertical-align: -.21em;
}

.custom-icon-tip > .custom-icon {
  vertical-align: 0;
}


.ahw-etym .definition {
    display: inline;
}

.lang-he, .lang-ar {
    font-style: italic;
}

.ahw-root {
    font-style: italic;
}


.ahw-lexical-section,
.ahw-sense,
.ahw-head,
.ahw-senses,
.ahw-related-entries {
    display: inline;
}

/* Inline senses for stem-only general sense (no definition) */
.ahw-senses-inline {
    display: inline;
}

/* Make stem senses inline when in an inline senses container */
.ahw-senses-inline .ahw-stem-sense {
    display: inline;
    text-indent: 0;
}

/* Punctuation character elements */
.ahw-pc {
    display: inline;
}

/* Section-break space (<pc type="section" n="1|2|3"/>). The element already
   contains the right number of literal spaces - 4 for a section, 2 for both a
   subsection and the Greek sub-subsection level - so all this rule has to do
   is stop HTML from collapsing them into one. No width is set: the gap is
   exactly N spaces of whatever font the entry is rendered in. */
.ahw-section-space {
    white-space: pre;
}

/* Related entries section with Abl. label - block with indentation like stem senses */
.ahw-ableitungen {
    display: block;
    text-indent: 1em;
}

.ahw-head .ahw-lemma,
.ahw-section-head .ahw-lemma {
    font-weight: 700;
    font-style: normal;
}

/* AHw prints a thinly attested headword in italic rather than bold - 7 374 of them,
   against 9 252 bold. Bold is the default because it is the majority; this marks the
   others. Lighter than .ahw-lemma-uncertain (300) because it is a weaker signal than
   editorial uncertainty, and it composes with the @cert classes rather than replacing
   them. Added 2026-08-24. */
.ahw-head .ahw-lemma-not-well-attested,
.ahw-section-head .ahw-lemma-not-well-attested {
    font-weight: 200;
    font-style: italic;
}

/* Editor keeps normal weight: the 200 is a front-face reading cue, and in the editing
   surface a hairline headword is hard to read and to click. Same treatment the editor
   already gives .ahw-lemma-uncertain / -medium / -deprecated. 2026-08-24 */
.ahw-editor-mode .ahw-head .ahw-lemma-not-well-attested,
.ahw-editor-mode .ahw-section-head .ahw-lemma-not-well-attested {
    font-weight: normal;
}

/* orth[@ana="unattested"]: AHw's asterisk before an unattested or reconstructed headword
   (*šināšim, "kein Beleg"). The asterisk is the print's mark, not part of the lemma, so the
   data keeps the lemma clean and the asterisk is drawn here - upright, as AHw sets it.
   Rule of 2026-11-02 (Luis). */
.ahw-head .ahw-lemma-unattested::before,
.ahw-section-head .ahw-lemma-unattested::before {
    content: "*";
    font-style: normal;
}

.ahw-head .ahw-lemma-uncertain {
    font-weight: 300;
    font-style: italic;
}

/* Editor mode: uncertain lemma with normal weight */
.ahw-editor-mode .ahw-head .ahw-lemma-uncertain {
    font-weight: normal;
}

/* Lemma withdrawn by von Soden (@ana="deprecated"): italic, light weight (300) for frontend, in brackets */
.ahw-head .ahw-lemma-deprecated {
    font-weight: 300;
    font-style: italic;
}

/* Editor mode: withdrawn lemma with normal weight */
.ahw-editor-mode .ahw-head .ahw-lemma-deprecated {
    font-weight: normal;
}

.ahw-head .ahw-lemma-reference,
.ahw-section-head .ahw-lemma-reference {
    font-weight: var(--font-weight-light);
    font-style: italic;
}

.no-italic {
    font-style: normal;
}

/* ＜ ＞ used to come from a wide CJK fallback font and were pulled together with negative
   margins here. LAD No Italic (fonts.css) draws them as a normal-width < >, so the margins
   would make them overlap: removed 2026-10-21. The classes stay on the spans. */

/* The reference row: form badge (plaintext / Raw Content), page reference, quality
   badge. They sit together as one centred group, each badge immediately beside the
   page reference rather than pinned to the column edges. */
.ahw-page-ref {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5rem;
}

/* An empty side zone is taken out of the flow: left in, it would still take a flex
   gap and nudge the group off centre. */
.ahw-page-ref-left:empty,
.ahw-page-ref-right:empty {
    display: none;
}

/* The badges were inline in a centred line and carried a left margin to separate
   them from the page number. In the zones they sit against the edge instead. */
.ahw-page-ref-left > span,
.ahw-page-ref-right > span {
    margin-left: 0;
}

.ahw-entry {
    font-family: var(--ahw-font-family) !important;
    font-size: 18px;
    padding: 0px 10px;
    margin-top: 1rem;
    font-weight: var(--font-weight-light);   /* 300; was 200, which read washed out beside LAD's Noto Sans 400 (editors, 2026-09-16). Changing this REQUIRES retuning --ahw-arrow-weight - see the top of this file. */
    hyphens: auto;
    text-align: justify;
}

.ahw-sense-number{
    font-weight: 600;
    
}

.ahw-sub-sense-letter {
    font-weight: 600;

}

.excluded-citation {
  opacity: 0.5;
  text-decoration: line-through;
  color: #999;
}

/* Excluded sub-entry in referenceEntryMult - strikethrough styling */
.excluded-sub-entry {
  opacity: 0.5;
  text-decoration: line-through;
  color: #999;
}

/* Excluded sense - strikethrough styling */
.excluded-sense {
  opacity: 0.5;
  text-decoration: line-through;
  color: #999;
}

/* Ensure tooltip containers inside excluded elements inherit strikethrough */
.excluded-sub-entry .tooltip-container,
.excluded-sense .tooltip-container,
.excluded-sub-entry .tooltip-container *,
.excluded-sense .tooltip-container * {
  text-decoration: line-through;
  color: inherit;
}

/* Exclude the tooltip text itself from strikethrough */
.excluded-sub-entry .tooltip-text,
.excluded-sense .tooltip-text,
.excluded-sub-entry .tooltip-text *,
.excluded-sense .tooltip-text * {
  text-decoration: none;
  color: var(--tooltip-text-color);
  opacity: 1;
}

/* Homophone variant - underlined vowel indicates spelling variants (e.g., u/ú) */
.ahw-homophone-variant {
    text-decoration: underline;
}

/* Verb stem senses */
.ahw-stem-sense {
    display: block;
    text-indent: 1em;
}

/* Uncertain entries (cert="low"): all senses inline */
.ahw-uncertain-entry .ahw-stem-sense {
    display: inline;
    text-indent: 0;
}

/* Lexical sense nested inside stem sense */
.ahw-stem-lexical-sense {
    display: inline;
}

/* Numbered sense nested inside stem sense (e.g., sense_g_1) */
.ahw-stem-numbered-sense {
    display: inline;
    margin-left: 1.5em;
}

.ahw-stem-label {
    font-weight: 600;
    cursor: pointer;
}

.ahw-vowel-class {
    font-style: italic;
}

.ahw-usg {
    cursor: pointer;
}

.ahw-temporal-usage,
.ahw-geographic-usage {
    display: inline;
}

.ahw-place-abbrev {
    cursor: pointer;
}

.ahw-place-unknown {
    color: var(--warning-color, #b45309);
}

.ahw-quote {
    display: inline;
}

.ahw-akkadian {
    font-family: var(--lad-font-editor);
    font-style: italic;
}

.ahw-variant-form {
    display: inline;
}

.ahw-frequency {
    display: inline;
}

.ahw-sumerian {
    letter-spacing: var(--sumerian-letter-spacing, 1px);
}

.ahw-german {
    font-style: normal;
}

.ahw-sumerian-gloss {
    font-size: 0.7em;
    letter-spacing: var(--sumerian-letter-spacing, 1px);
}

.ahw-logogram {
    letter-spacing: var(--sumerian-letter-spacing, 1px);
}

/* Determinatives sit low (Luis 2026-10-29): not at superscript height but just above the baseline -
   the determinative starts at about 20% of the letter height. vertical-align as a length is measured in
   the element's own (0.7em) size, so 0.2em = 0.14em of the text. Both views (ahw.css is loaded by the
   entry page and the XML editor). One number to tune. */
.ahw-determinative {
    font-size: 0.7em;
    vertical-align: var(--ahw-determinative-raise, 0.2em);
    line-height: 1;
}

.ahw-col-break {
    display: inline-block;
    background-color: #e0e0e0;
    color: #555;
    font-size: 0.75em;
    font-style: normal;
    font-weight: 500;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    margin: 0 0.3em;
    vertical-align: middle;
    line-height: 1.2;
}

.ahw-segment {
    display: inline;
}

.ahw-arabic {
    font-family: "Noto Naskh Arabic", "Traditional Arabic", serif;
}

.ahw-hebrew {
    font-family: "SBL Hebrew", "Times New Roman", serif;
}

.ahw-transliteration {
    font-style: italic;
}

.ahw-bibl {
    display: inline;
}

/* See-also citation (bibliographic reference with cross-references) */
.ahw-see-also {
    display: inline;
}

.ahw-bibl-ref {
    display: inline;
    cursor: pointer;
}

.ahw-bibl-ref:hover {
    text-decoration: underline;
}

.ahw-bibl-title {
    display: inline;
}

.ahw-bibl-cited-range {
    display: inline;
}

.ahw-bibl-author {
    display: inline;
}

.ahw-sense-note {
    display: inline;
}

.ahw-lbl {
    display: inline;
}

.ahw-ref {
    text-decoration: none;
    color: inherit;
}

.ahw-ref:hover {
    text-decoration: underline;
}

/* External source references (eBL, CDLI, etc.) - frontend: inherit color */
.ahw-ref.source-ref {
    color: inherit;
}

.ahw-ref.source-ref:hover {
    color: var(--link-hover-color, #1d4ed8);
    text-decoration: underline;
}

/* Editor mode: source refs show as blue links */
.ahw-editor-mode .ahw-ref.source-ref {
    color: var(--link-color, #2563eb);
}

.ahw-editor-mode .ahw-ref.source-ref:hover {
    color: var(--link-hover-color, #1d4ed8);
}

/* Editorial source references (added by LAD, not in original) */
/* Editor mode: show editorial refs inline with gray background */
.ahw-editor-mode .editorial-source-ref {
    display: inline;
    background-color: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

.ahw-editor-mode .editorial-source-ref .editorial-link {
    color: var(--link-color, #2563eb);
    text-decoration: none;
}

.ahw-editor-mode .editorial-source-ref .editorial-link:hover {
    color: var(--link-hover-color, #1d4ed8);
    text-decoration: underline;
}

.ahw-def-note {
    display: inline;
}

/* Editor mode styles */
.ahw-editor-mode .ahw-has-tooltip {
    cursor: pointer;
}

/* Bibliography reference validation */
.bibl-ref {
    cursor: pointer;
}

.bibl-found {
    color: #008000;
}

.bibl-missing {
    color: #f44336;
}

/* ========== Draft/Raw Content Styles ========== */

/* Badges - matching xmlEditorialCore.js colors */
.ahw-draft-badge,
.ahw-raw-badge,
.ahw-review-badge,
.ahw-ready-badge,
.ahw-published-badge,
.ahw-imported-badge,
.ahw-deleted-badge,
.ahw-status-badge {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
}

.ahw-draft-badge {
    background-color: #ff4444;
    color: white;
}

.ahw-review-badge {
    background-color: #ffaa00;
    color: white;
}

.ahw-ready-badge {
    background-color: #00aa00;
    color: white;
}

.ahw-published-badge {
    background-color: #0066cc;
    color: white;
}

.ahw-imported-badge {
    background-color: #ff8800;
    color: white;
}

.ahw-deleted-badge {
    background-color: #888888;
    color: white;
}

.ahw-status-badge {
    background-color: #5bc0de;
    color: white;
}

.ahw-raw-badge {
    background-color: #888888;
    color: white;
    margin-left: 0;
    margin-right: 6px;
}

/* Front-face raw content display */
.ahw-raw-text {
    display: block;
}

/* Editor raw content reference box (like working notes) */
.ahw-raw-reference {
    margin-top: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
}

.ahw-raw-reference-header {
    padding: 8px 12px;
    background: #e9ecef;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.ahw-raw-reference-label {
    font-weight: 600;
    font-size: 0.85em;
    color: #666;
    margin-right: 8px;
}

.ahw-raw-reference-content {
    padding: 12px;
    line-height: 1.5;
    font-family: inherit;
    color: #333;
}

/* New-entry boundary marker — review aid shown in the editor raw-content box
   only (rendered from <seg type="newEntry"/>). A contrast-colour SVG diamond
   marking where the split-to-entries converter will cut the draft into a
   separate nested entry. */
.ahw-new-entry-marker {
    display: inline-block;
    width: 12px;
    height: 1.1em;
    margin: 0 0.35em;
    vertical-align: middle;
    cursor: help;
    user-select: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpolygon%20points='8,1%2015,8%208,15%201,8'%20fill='%23e5383b'/%3E%3C/svg%3E");
}

/* Rights credit under every AHw entry, emitted by ahw:render-on-demand in
   modules/ahw.xqm. Matches .cad-preview-notice in cad.css so the two external
   dictionaries carry their attributions identically: deliberately quiet, since
   it is a credit and not a call to action, and it must not compete with the
   entry text above it. No rule above it - a line would read as a section break.

   Unlike the CAD notice this one is not about truncation: the AHw text is shown
   in full and the credit is simply the condition of showing it. */
.ahw-credit-notice {
    margin: 1.25em auto 0;
    /* Side gutter. max-width alone leaves the text running into the edges once the
       column is narrower than 34em - on a small laptop it was almost touching the
       border. box-sizing is border-box globally (page/core/base.css), so this sits
       inside the max-width rather than widening the block. */
    padding: 0 1.5rem;
    max-width: 34em;
    text-align: center;
    text-align-last: center;
    hyphens: none;
    font-size: 0.85em;
    font-style: italic;
    color: var(--note-text-color, #6c757d);
}

/* The publisher's name links to them, but quietly: a rights credit should read as
   a sentence, not as navigation. The underline only appears on hover or keyboard
   focus. It is a transparent border rather than text-decoration so revealing it
   cannot shift the line. */
.ahw-credit-notice a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.ahw-credit-notice a:hover,
.ahw-credit-notice a:focus-visible {
    color: var(--link-hover-color, #333);
    border-bottom-color: currentColor;
}

/* von Soden's fractions - numerator over denominator with a HORIZONTAL bar, built by
   resources/scripts/entry/ahw-fractions.js (no font the site ships has the
   stacked-fractions feature). Measured off AHw p. 1447a, ūṭûm "lú-½-kùš", in em of the
   surrounding text, from its baseline:

     numerator baseline +0.36   bar centre +0.28, 0.047 thick   denominator baseline -0.22
     digits 0.58 em             figure 0.53 em wide (0.72 for a two-digit ⅒)

   In print the denominator hangs below the line.

   --frac-lift raises the whole figure, keeping those proportions. In print the bar sits
   on the hyphen's height; in Noto Serif 300 the hyphen's ink runs from +0.234 to +0.313 em,
   so at +0.28 the bar ran straight through it and "-½-" read as one line (editors,
   2026-10-19: the bar must sit slightly ABOVE the hyphen). Lifted 0.10 em: bar 0.357-0.404,
   0.044 em clear of the hyphen; numerator baseline +0.46, denominator baseline -0.12, still
   below the line. Changing the entry face or weight means re-measuring the hyphen
   (C:\tmp\lad-repro\frac-hyphen-metrics.mjs).

   The digits are ::before / ::after, in the entry's own face, weight and colour, and
   never copied. vertical-align: <length> moves an inline-block's BASELINE that far from
   the parent's baseline, so the two offsets hold in any face. Lengths on the digit boxes
   are in THEIR em (0.58 of the text), hence the divisions. The bar is an SVG whose
   viewBox has y = 0 on the text baseline (units 1/100 em) before the lift. All three
   overlap in one 0.53em advance: each later box steps back by the figure width. */
/* --frac-digit-stretch widens the digits only (editors, 2026-10-19: "slightly wider"). A
   transform, because Noto Serif's width axis runs 62.5-100 - font-stretch cannot go wider -
   and because it leaves the layout alone: the bar and the advance stay as measured. */
.frac {
    --frac-w: 0.53;
    --frac-lift: 0.10;
    --frac-digit-stretch: 1.12;
    white-space: nowrap;
}

.frac-wide {
    --frac-w: 0.72;
}

.frac::before,
.frac::after {
    display: inline-block;
    width: calc(var(--frac-w) / 0.58 * 1em);
    font-size: 0.58em;
    font-style: normal;
    line-height: 1;
    text-align: center;
    text-indent: 0;
    letter-spacing: 0;
    transform: scaleX(var(--frac-digit-stretch));
    transform-origin: center;
    pointer-events: none;
}

.frac::before {
    content: attr(data-n);
    vertical-align: calc((0.36 + var(--frac-lift)) / 0.58 * 1em);
}

.frac::after {
    content: attr(data-d);
    vertical-align: calc((-0.22 + var(--frac-lift)) / 0.58 * 1em);
    margin-left: calc(var(--frac-w) / -0.58 * 1em);
}

.frac svg {
    width: calc(var(--frac-w) * 1em);
    height: 0.99em;
    margin-left: calc(var(--frac-w) * -1em);
    vertical-align: calc((-0.22 + var(--frac-lift)) * 1em);
    overflow: visible;
    fill: currentColor;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

/* The real character: invisible and zero-width, but still selected, copied and found by
   find-on-page. A zero-width, zero-height inline-block with transparent text - NOT
   font-size: 0. Under .ahw-entry's text-align: justify, Chromium still widened a
   0-size character that comes from a fallback font (⅙ by 6.7px, ⅚ by 5.7px at 36px; Noto
   Serif has only ½ ¼ ¾), which pushed the denominator off the numerator. An inline-block
   of width 0 cannot be stretched. display: none / visibility: hidden would drop it from
   the clipboard and from find; overflow: hidden makes Chromium leave it out of the copy. */
.frac-src {
    display: inline-block;
    width: 0;
    height: 0;
    line-height: 0;
    vertical-align: top;
    color: transparent;
    overflow: visible;
}

/* In a letter-spaced (Sumerian) word the character carried the spacing after it; the
   inline-block does not, so the figure takes it back. */
.ahw-sumerian .frac,
.ahw-sumerian-gloss .frac,
.ahw-logogram .frac {
    margin-right: var(--sumerian-letter-spacing, 1px);
}

/* The arrow's copy text (ahw-arrow template, both trees): the SVG carries no text, so a copied
   passage lost the arrow. This character is laid out but clipped to nothing - invisible, taking no
   space - and is still part of the selection, so the clipboard gets "↑". 2026-10-29 */
.ahw-copy-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: pre;   /* "↑ ": the copy keeps the gap the SVG's margin draws */
  border: 0;
}

/* A pointer inside a bold headword ("ajjaraḫḫu II (↑ I)", jarahhu_ahw): AHw prints it in normal
   weight. 2026-10-29 */
.ahw-lemma .ahw-lemma-pointer {
  font-weight: normal;
}
