
/* --- Base Container & Resets --- */
.jfmg-grp, .jfmg-grp * { box-sizing: border-box; }
.jfmg-grp {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    background: #fff;
    margin: 0;
    padding: 0;
}

.jfmg-grp .invisible, .jfmg-grp .tab-header-label { display: none !important; }

/* Make buttons and tabs non-selectable */
.jfmg-tab, .jfmg-nav {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* --- Nested Groups --- */
.jfmg-grp { margin-bottom: 0; width: 100%; }

/* --- Navigation & Tabs --- */

.jfmg-nav {
    margin-right:1em!important;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(204, 204, 204, 0.5);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    opacity: 0.4;
    transition: opacity 0.2s ease;
    border-radius: 6px;
    display: none!important;
    vertical-align: middle;
    font-size: 1em;
    color: #888;
    cursor: pointer;
    align-self: center; /* Prevents flexbox parents from stretching the nav vertically */
    flex-shrink: 0;
    height: auto;
    max-height: 45px; /* Rigid fallback constraint to prevent vertical pillars */
    line-height: 1; /* Normalizes internal button spacing */
    white-space: nowrap; /* Prevents arrows from wrapping and stacking vertically */
}
.jfmg-nav:hover {
    opacity: 1;
}

.jfmg-nav span {
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    display: inline-block;
    line-height: 1;
}
.jfmg-nav span:hover { background: #e6e6e6; color: #0052a4; }
.jfmg-nav span:active { color: #002b5e; }

.jfmg-bar {
    display: inline;
    background-color: inherit!important;
}
.jfmg-tab {
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
    padding: 4px 10px;
    margin-right: 4px;
    margin-bottom: 4px;
    background: #f4f4f4;
    /* border-radius: 4px 4px 0 0; */
    border-radius: 12px;
    white-space: nowrap;
    align-self: flex-end;
    height: auto;
    max-height: 35px;
    line-height: normal;
    user-select: none;
}
.jfmg-tab:last-of-type { margin-right: 0; }
.jfmg-tab:hover { background: #e6e6e6; color: #0052a4; }
.jfmg-tab.active { background: #0052a4; color: #fff; }


/* --- Content Panels --- */
.jfmg-cnt { display: none; margin-bottom: 24px; animation: fadeIn 0.2s ease-in; clear: both; }
.jfmg-cnt.active { display: block; }
.jfmg-cnt:after {
    content: "";
    display: block;
    width: 100%;
    height: 5px;
    background-color: gray;
    border: none;
}
.jfmg-cnt .jfmg-cnt:after {
    height: 0;
    background-color: transparent;
    border-bottom: 2px brown; /* Use bottom instead of top */
    margin-top: 20px;
}

/* Default Tab Label Display using attr(tab) to avoid element-level float limitations */
.jfmg-cnt:not(.jfmg-use-el-label)::before {
    content: attr(tab);
    white-space: pre-wrap;
    color: gray;
    float: right;
    font-weight: bold;
}

/* Hide fallback element when attr(tab) default is used */
.jfmg-cnt:not(.jfmg-use-el-label) > .jfmg-cnt-label {
    display: none !important;
}

/* Legacy Element Approach (opt-in with .jfmg-use-el-label) */
.jfmg-cnt-label {
    
    white-space: pre-wrap;
    color:gray;
    float:right;
    font-weight: bold;
}

/* Inplace Tabs Styling */
.jfmg-inplace-btn-grp {
    clear: both;
    padding-top: 8px;
}
.jfmg-inplace-btn {
    display: inline-block;
    margin-right: 4px;
    margin-bottom: 4px;
    cursor: pointer;
}
.jfmg-inplace-cnt {
    display: none;
    margin-bottom: 24px;
    clear: both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Tab Tally Stats --- */
.jfmg-stats { font-family: sans-serif; margin: 1em; background: #fff; color: #111; display: block; }
.jfmg-stats-h1 { font-size: 1.5em; border-bottom: 2px solid #0052a4; color: #0052a4; padding-bottom: 5px; margin-top: 0; }
.jfmg-stats-h2 { font-size: 1.2em; margin-top: 1.5em; color: #333; }
.jfmg-stats-table { border-collapse: collapse; width: 100%; margin-bottom: 2em; }
.jfmg-stats-th, .jfmg-stats-td { border: 1px solid #ccc; padding: 8px; text-align: left; vertical-align: top; }
.jfmg-stats-th { background: #f4f4f4; }
.jfmg-stats-td-count { font-weight: bold; color: #b22222; text-align: center; width: 60px; font-size: 1.1em; }
.jfmg-stats-hw-list { line-height: 1.6; word-break: break-word; }
.jfmg-stats-hw-list a { text-decoration: none; color: #0052a4; margin-right: 8px; white-space: nowrap; display: inline-block; }
.jfmg-stats-hw-list a:hover { text-decoration: underline; }
.jfmg-stats-container { padding: 10px; }
.jfmg-stats-container .jfmg-stats-h2 { color: #0052a4; border-bottom: 2px solid #0052a4; padding-bottom: 4px; margin-top: 0; }
.jfmg-stats-container .jfmg-stats-hw-list { font-size: 14px; line-height: 1.8; }

/*********************************************************************************************************/
/************************************* START dictionary specific CSS *************************************/
/*********************************************************************************************************/


/* =========================================
   1. FONTS & BASE SETUP
   ========================================= */
@font-face {
  font-family: FontAwesome;
  src: url(fonts/fontawesome-webfont.eot);
  src: url(fonts/fontawesome-webfont.eot) format("embedded-opentype"),
       url(fonts/fontawesome-webfont.woff2) format("woff2"),
       url(fonts/fontawesome-webfont.woff) format("woff"),
       url(fonts/fontawesome-webfont.ttf) format("truetype"),
       url(fonts/fontawesome-webfont.svg) format("svg");
  font-weight: 400;
  font-style: normal;
}

jfmg.jfmg * {
  box-sizing: border-box;
}

jfmg.jfmg {
  font-family: FontAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.75px;
  color: #1a1a1a;
  /* background: #e9ecef; */
  margin: 0;
}

.page-definition {
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  /*padding: 12px 16px;*/
  display: block;
}

/* =========================================
   2. TYPOGRAPHY & SHARED STYLES
   ========================================= */
/* Headers & H-Words */
.hword, h1.hword, h3.hword {
  font-weight: 700;
  margin: 0;
  padding: 0;
  color: #000;
  display: inline;
}
.hword { font-size: 20px; letter-spacing: -0.5px; }
h1.hword { font-size: 2rem !important; vertical-align: bottom; }
h3.hword { font-size: 1.5rem !important; vertical-align: bottom; }
h3.hword > sup { font-size: 50%; }

/* Bold Elements */
p.function-label, p.hword, .important-blue-link, .ex-header,
span.drp, span.vr-custom, span.va, strong.mw_t_bc, span.if, span.ure,
.word-syllables-entry {
  font-weight: bold;
}
.mw_t_bc { color: #0056b3; margin-right: 4px; }
span.drp, span.vr-custom { font-size: 120%; margin-top: 1em; padding-top: 1em; }

/* Italic Elements */
span.vl, span.sl, span.il, span.plural, span.or,
.auth, .parts-of-speech a, em.mw_t_it {
  font-style: italic;
}
span.vl, span.sl { font-size: 90%; color: gray; letter-spacing: 0; }
.parts-of-speech a { font-size: 13px; color: #0056b3; text-decoration: none; font-weight: 500; }
em.mw_t_it { padding: 0 0.5em; }

/* Uppercase Utilities */
span.text-uppercase, a.mw_t_sc, a.sa-link, a.sc, a.mw_t_mat, a.cxt, a.mw_t_et_link,
ul.mw-list > li > a, span.wva, a.mw_t_d_link, div.collegiate-synonyms-widget dd a, a.mw_t_a_link, a.cat,
.content-section-sub-header, a.freshness-link {
  text-transform: uppercase;
  text-decoration: none;
  font-size: 70%;
  vertical-align: middle;
  color: gray!important;
}

/* Links (Muted / Gray) */
a.see-more, a.mw-btn-mustard, a[rel="noopener"], a.mw-btn-outline-blue,
a.text-capitalize, a.teaser-content-box, a.story-card-list-item, a.text-decoration-none,
a.mw_t_sx {
  color: gray;
  text-decoration: none;
}
a.teaser-content-box h3 { font-size: 1rem; }
a.mw_t_et_link { color: #0056b3; }

/* =========================================
   3. DICTIONARY & ENTRY BLOCKS
   ========================================= */
/* Header & Attributes */
.entry-header-content { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.entry-attr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* Pronunciation */
.prons-entries-list-inline { display: flex; align-items: center; gap: 4px; }
.prons-entry-list-item { text-decoration: none; color: #6c757d; cursor: pointer; }
a.mwu-playpron { padding: 0 5px; font-size: 1rem; color: black; }
.play-pron-v2 { font-size: 1rem; filter: grayscale(100%); opacity: 0.7; padding: 2px 5px; border: 1px solid gray; border-radius: 12px;}
.play-pron-v2:hover { opacity: 1; filter: none; }
a.play-pron-v2 + a.play-pron-v2 { padding-left: 1rem; }
a.play-pron-v2[onclick] { display: none!important; }

/* Definition Block */
.dtText {
  display: inline; /* FIX: Restored to inline so it flows naturally after numbers */
  color: #212529;
  background-color: white;
}
.uns svg { opacity: 0.6; margin-right: 4px; }

/* Section Headers */
.content-section-header h2 {
  font-size: 12px;
  font-weight: 700;
  color: #495057;
  margin: 14px 0 6px 0;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 3px;
  text-transform: uppercase;
}
.content-section-sub-header {
  font-weight: 700;
  font-size: 10.5px;
  color: #868e96;
  margin: 8px 0 2px 0;
}

/* Example Sentences (Fixed margins and borders) */
.ex-sent, span.freshness-examples>span {
  display: block !important;
  margin: 4px 0 6px 0;
  padding-left: 12px;
  color: #6c757d;
  border-left: 3px solid #ced4da !important; /* Made darker so it's visible */
  text-indent: 0;
}
.sub-content-thread {
  display: block !important;
  margin: 4px 0;
  text-indent: 0;
}
.sub-content-thread:before {
  content: none;
}
.sub-content-thread .ex-sent {
  margin: 0; /* Prevents double gaps if nested */
}
span.ex-sent-group { color: gray; }
.t { display: inline; color: #212529; }
.aq { display: block; font-size: 11.5px; color: #6c757d; margin-top: 3px; }

/* Lists & Semicolons */
jfmg.jfmg ul { list-style-type: none; margin: 0; padding-left: 1rem; column-gap: 10px; }
jfmg.jfmg ul li:not(.has-cite, .thes-word-list-item) { max-width: 20%; }
jfmg.jfmg ul li a { color: black; text-decoration: none; text-transform: uppercase; font-size: 80%; }
ul.d-flex { column-count: 3; display: block; }

ul.vis, ul.examples { list-style: none; margin: 0; padding-left: 15px; }
ul.vis li { margin: 0; padding: 0; line-height: 1.2; }
ul.vis li span.t, ul.vis li span.ts { display: inline-block; vertical-align: top; }

.mw-list { display: inline-block; list-style: none; padding: 0 0 0 1em; margin: 0; }
.mw-list::before { content: "⚪ "; }
.mw-list li { display: inline-block; white-space: nowrap; margin-right: 4px; }

/* Numbers & Letters (Fixed inline flow) */
span.sn, span.num, span.letter, span.sub-num, div.vg-sseq-entry-item-label {
  display: inline !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0.2rem;
  font-weight: bold;
}
span.num {
  font-weight: bold;
  color: #d71920;
}
span.sub-num {
  color: RosyBrown;
}
span.letter {
  font-weight: bold;
  color: brown;
}
span.letter::before {
  content: "\A";
  white-space: pre;
}
div.vg div.has-num, div.dro div.has-num { padding-top: 0; }
div.dro span.num { color: gray; }

/* Layout & Structure */
div.vg { font-size: 1rem; margin-left: 0px; margin-top: 1em; }
div.row { margin-left: 0; }
div.vg div:not(.vg-sseq-entry-item):not(.sub-content-thread) { display: inline !important; }

div.vg-sseq-entry-item {
  margin-top: 0.5rem;
  padding-left: 1.5rem; /* Creates the main flush left line for definition text */
  text-indent: -1.5rem; /* Automatically pulls the number/letter perfectly into the gutter */
  display: block;
}
div.sense-content { display: inline!important; }

/* Word Origin Block */
div[data-id="origin"] { color: #555; background-color: #f9f9f9; }
div[data-id="origin"] p, div[data-id="origin"] div { padding: 0; margin: 0; display: inline !important; }
div[data-id="origin"] p + p::before { content: "📅 "; }
div[data-id="origin"] p + p { margin-left: 1rem; color: gray; }

/* Word History */
.etymology-content-section p, .first-known-content-section p { margin: 0 0 6px 0; color: #343a40; }
.time-travel-content-section { font-size: 12px; }

/* Nearby Entries */
.nearby-entries-word-item { display: inline-block; margin: 0 10px 4px 0; font-size: 12.5px; }
.nearby-entries-word-item a { color: #0056b3; text-decoration: none; }
.nearby-entries-word-item.active .b-link { font-weight: 700; color: #000; pointer-events: none; }

/* Custom Accordion */
div.custom-accordion { cursor: pointer; margin-top: 10px; }
div.custom-accordion.closed .section-content { display: none; }
div.custom-accordion .section-content { cursor: auto; }

/* Misc & Utilities */
.mw_t_wi { border-bottom: 1px dotted gray; }
p.syn > strong { display: block; }
p.vd { margin: 0; padding: 0; }
p.vd em { font-weight: bold; }
div.thes-list p { padding: 0; margin: 0; display: inline; }
.thes-list-header { margin-bottom: 2px; }
.thes-list-content { line-height: 1.2; }
.function-label { margin: 0; padding: 0; }
.mw-mdash-gold svg rect { fill: #c5a332; }

.d-inline { display: inline; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }

/* hackery */
div.uro {  font-size: 1rem; }
div.entry-uros { padding-top: 1em; }
span.ex-header { display: block; margin: 1em;}
.important-blue-link { margin-left: 0.5rem; color:#4A7D95!important; font-weight: bold!important; font-size: 1rem!important; }
span.badge, span.entry-attr>span { margin-left: 0.5rem; }
li.has-cite { margin-top: 0.5rem; border-top: 1px solid #dee2e6; padding-top: 0.5rem; display: block;}
div.last-updated-date { margin-top: 1rem; }
div.dxnls-links span.dxnls-link-item.has-separator:after { content: ", "; }
span.dxnls-label { font-weight: bold; font-size: 1rem; }
h5.parts-of-speech {padding-left: 1rem;}
ul.freshness-examples, ul.freshness-examples li { column-count: 1!important;}
a.freshness-link { font-size: 1em; font-weight: bold; }
div.freshness_block { margin 1rem; border-top: 1px solid #dee2e6; padding: 1rem;}
span.thes-list { padding: 1em; margin: 1em; }
a.text-decoration-none { text-decoration: none; }
div.vg-sseq-entry-item ul, div.vg-sseq-entry-item li { text-indent: 0!important; }
span.syl { text-transform: none!important; }
div.tooltip-wsls { font-style: italic; font-size: 70%; }