/* --- Base Container & Resets --- */
.crig-grp, .crig-grp * { box-sizing: border-box; }
.crig-grp { font-family: Georgia, "Times New Roman", serif; font-size: 13px; line-height: 1.25; color: #111; background: #fff; margin: 0; padding: 0; }
.crig-grp .invisible, .crig-grp .tab-header-label { display: none !important; }

/* Make buttons and tabs non-selectable */
.crig-tab, .crig-nav { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.crig-grp { margin-bottom: 0; width: 100%; }

/* --- Navigation & Tabs --- */
.crig-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: 4px; display: inline-block; vertical-align: middle; font-size: 0.95em; color: #888; cursor: pointer; align-self: center; flex-shrink: 0; height: auto; max-height: 35px; line-height: 1; white-space: nowrap; }
.crig-nav:hover { opacity: 1; }
.crig-nav span { padding: 4px 8px; margin: 0 1px; border-radius: 3px; cursor: pointer; transition: background 0.1s ease, color 0.1s ease; display: inline-block; line-height: 1; }
.crig-nav span:hover { background: #e6e6e6; color: #0052a4; }
.crig-nav span:active { color: #002b5e; }

.crig-bar { display: inline; background-color: inherit!important; }
.crig-tab { display: inline-block; vertical-align: middle; cursor: pointer; font-family: Arial, sans-serif; font-size: 11px; font-weight: bold; color: #555; text-transform: uppercase; padding: 2px 8px; margin-right: 2px; margin-bottom: 2px; background: #f4f4f4; border-radius: 8px; white-space: nowrap; align-self: flex-end; height: auto; max-height: 28px; line-height: normal; }
.crig-tab:last-of-type { margin-right: 0; }
.crig-tab:hover { background: #e6e6e6; color: #0052a4; }
.crig-tab.active { background: #0052a4; color: #fff; }

/* --- Content Panels --- */
.crig-cnt { display: none; margin-bottom: 12px; animation: fadeIn 0.2s ease-in; clear: both; }
.crig-cnt.active { display: block; }
.crig-cnt:after { content: ""; display: block; width: 100%; height: 3px; background-color: gray; border: none; }
.crig-cnt .crig-cnt:after { height: 0; background-color: transparent; border-bottom: 2px solid brown; margin-top: 10px; }

/* Tab Labels */
.crig-cnt:not(.crig-use-el-label)::before { content: attr(tab); white-space: pre-wrap; color: gray; float: right; font-weight: bold; }
.crig-cnt:not(.crig-use-el-label) > .crig-cnt-label { display: none !important; }
.crig-cnt-label { white-space: pre-wrap; color: gray; float: right; font-weight: bold; }

/* Inplace Tabs Styling */
.crig-inplace-btn-grp { clear: both; padding-top: 4px; }
.crig-inplace-btn { display: inline-block; margin-right: 2px; margin-bottom: 2px; cursor: pointer; }
.crig-inplace-cnt { display: none; margin-bottom: 12px; clear: both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Tab Tally Stats --- */
.crig-stats { font-family: sans-serif; margin: 0.5em; background: #fff; color: #111; display: block; }
.crig-stats-h1 { font-size: 1.3em; border-bottom: 2px solid #0052a4; color: #0052a4; padding-bottom: 3px; margin-top: 0; }
.crig-stats-h2 { font-size: 1.1em; margin-top: 0.75em; color: #333; }
.crig-stats-table { border-collapse: collapse; width: 100%; margin-bottom: 1em; }
.crig-stats-th, .crig-stats-td { border: 1px solid #ccc; padding: 4px; text-align: left; vertical-align: top; }
.crig-stats-th { background: #f4f4f4; }
.crig-stats-td-count { font-weight: bold; color: #b22222; text-align: center; width: 45px; font-size: 1em; }
.crig-stats-hw-list { line-height: 1.4; word-break: break-word; }
.crig-stats-hw-list a { text-decoration: none; color: #0052a4; margin-right: 6px; white-space: nowrap; display: inline-block; }
.crig-stats-hw-list a:hover { text-decoration: underline; }
.crig-stats-container { padding: 5px; }
.crig-stats-container .crig-stats-h2 { color: #0052a4; border-bottom: 2px solid #0052a4; padding-bottom: 2px; margin-top: 0; }
.crig-stats-container .crig-stats-hw-list { font-size: 13px; line-height: 1.4; }

/*********************************************************************************************************/
/************************************* 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;
}

crig.crig * { box-sizing: border-box; }
crig.crig { font-family: FontAwesome, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 12.5px; line-height: 1.25; letter-spacing: 0.5px; color: #1a1a1a; margin: 0; }
.page-definition { margin: 0 auto; background: #ffffff; border-radius: 4px; display: block; }

/* =========================================
   2. TYPOGRAPHY & SHARED STYLES
   ========================================= */
.hword, h1.hword, h3.hword { font-weight: 700; margin: 0 !important; padding: 0; color: #000; display: inline; line-height: 1; }
.hword { font-size: 17px; letter-spacing: -0.25px; }
h1.hword { font-size: 1.6rem !important; vertical-align: bottom; }
h3.hword { font-size: 1.3rem !important; vertical-align: bottom; }
h3.hword > sup { font-size: 50%; }

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: 110%; margin-top: 0.5em; padding-top: 0.5em; }

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: 12px; color: #0056b3; text-decoration: none; font-weight: 500; }
em.mw_t_it { padding: 0 0.2em; }

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; }

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: 0.95rem; }
a.mw_t_et_link { color: #0056b3; }

/* =========================================
   3. DICTIONARY & ENTRY BLOCKS
   ========================================= */
/* HEADER FIXES (Nullify defaults and utility classes causing giant gaps) */
.entry-header-content { display: flex; align-items: baseline; gap: 6px; margin: 0 0 2px 0 !important; padding: 0; }
h5.parts-of-speech { margin: 0 !important; padding: 0 0 0 0.5rem; line-height: 1; }
.entry-header-content .badge { margin-top: 0 !important; margin-bottom: 0 !important; }

.entry-attr { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }

.prons-entries-list-inline { display: flex; align-items: center; gap: 3px; }
.prons-entry-list-item { text-decoration: none; color: #6c757d; cursor: pointer; }
a.mwu-playpron { padding: 0 3px; font-size: 0.95rem; color: black; }
.play-pron-v2 { font-size: 0.9rem; filter: grayscale(100%); opacity: 0.7; padding: 1px 4px; border: 1px solid gray; border-radius: 8px; }
.play-pron-v2:hover { opacity: 1; filter: none; }
a.play-pron-v2 + a.play-pron-v2 { padding-left: 0.5rem; }

.dtText { display: inline; color: #212529; background-color: white; }
.uns svg { opacity: 0.6; margin-right: 3px; }

.content-section-header h2 { font-size: 11.5px; font-weight: 700; color: #495057; margin: 8px 0 3px 0; border-bottom: 1px solid #dee2e6; padding-bottom: 2px; text-transform: uppercase; }
.content-section-sub-header { font-weight: 700; font-size: 10px; color: #868e96; margin: 4px 0 1px 0; }

.ex-sent, span.freshness-examples>span { display: block !important; margin: 2px 0 3px 0; padding-left: 8px; color: #6c757d; border-left: 2px solid #ced4da !important; text-indent: 0; }
.sub-content-thread { display: block !important; margin: 2px 0; text-indent: 0; }
.sub-content-thread:before { content: none; }
.sub-content-thread .ex-sent { margin: 0; }
span.ex-sent-group { color: gray; }
.t { display: inline; color: #212529; }
.aq { display: block; font-size: 11px; color: #6c757d; margin-top: 2px; }

crig.crig ul { list-style-type: none; margin: 0; padding-left: 0.5rem; column-gap: 6px; }
crig.crig 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: 8px; }
ul.vis li { margin: 0; padding: 0; line-height: 1.15; }
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 0.5em; margin: 0; }
.mw-list::before { content: "⚪ "; }
.mw-list li { display: inline-block; white-space: nowrap; margin-right: 3px; }

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; }

div.vg { font-size: 0.95rem; margin-left: 0; margin-top: 0.5em; }
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.25rem; padding-left: 1.2rem; text-indent: -1.2rem; display: block; }
div.sense-content { display: inline!important; }

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: 0.5rem; color: gray; }

.etymology-content-section p, .first-known-content-section p { margin: 0 0 3px 0; color: #343a40; }
.time-travel-content-section { font-size: 11px; }

.nearby-entries-word-item { display: inline-block; margin: 0 6px 2px 0; font-size: 11.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; }

div.custom-accordion { cursor: pointer; margin-top: 4px; }
div.custom-accordion.closed .section-content { display: none; }
div.custom-accordion .section-content { cursor: auto; }

.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.15; }
.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; }

div.uro { font-size: 0.95rem; }
div.entry-uros { padding-top: 0.5em; }
span.ex-header { display: block; margin: 0.5em; }
.important-blue-link { margin-left: 0.4rem; color:#4A7D95!important; font-weight: bold!important; font-size: 0.95rem!important; }
span.badge, span.entry-attr>span { margin-left: 0.4rem; margin-top: 0 !important; margin-bottom: 0 !important; }
li.has-cite { margin-top: 0.25rem; border-top: 1px solid #dee2e6; padding-top: 0.25rem; display: block; }
div.last-updated-date { margin-top: 0.5rem; }
div.dxnls-links span.dxnls-link-item.has-separator:after { content: ", "; }
span.dxnls-label { font-weight: bold; font-size: 0.95rem; }
ul.freshness-examples, ul.freshness-examples li { column-count: 1!important; }
a.freshness-link { font-size: 0.95em; font-weight: bold; }
div.freshness_block { margin: 0.5rem; border-top: 1px solid #dee2e6; padding: 0.5rem; }
span.thes-list { padding: 0.5em; margin: 0.5em; }
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%; }

/* =========================================
   4. THESAURUS RELEVANCE COLORS & LISTS
   ========================================= */
li.thes-word-list-item { margin-bottom: 0.2rem; }
div.tooltip-variants { font-size: 9px; color: #64748b; margin-top: 1px; text-transform: none; }

/* Grouped Lozenge Base Styles */
.sense .thes-list .opp-list-scored-container .lozenge, 
.sense .thes-list.sim-list-scored .lozenge {
  padding: 1px 4px; border-radius: 3px; font-weight: 600; font-size: 10px; display: inline-block;
}

/* Antonyms (Cool Blue/Teal Scale) */
.sense .thes-list .opp-list-scored-container .lozenge.color-1 { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.sense .thes-list .opp-list-scored-container .lozenge.color-2 { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.sense .thes-list .opp-list-scored-container .lozenge.color-3 { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.sense .thes-list .opp-list-scored-container .lozenge.color-4 { background: #2563eb; color: #ffffff; border: 1px solid #2563eb; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2); }

/* Synonyms (Warm Orange/Amber Scale) */
.sense .thes-list.sim-list-scored .lozenge.color-1 { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.sense .thes-list.sim-list-scored .lozenge.color-2 { background: #ffedd5; color: #b45309; border: 1px solid #fde68a; }
.sense .thes-list.sim-list-scored .lozenge.color-3 { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.sense .thes-list.sim-list-scored .lozenge.color-4 { background: #ea580c; color: #ffffff; border: 1px solid #ea580c; box-shadow: 0 1px 2px rgba(234, 88, 12, 0.2); }