/* Dictionary */

.dict { max-width: 980px; gap: 22px; }

.dict__search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 6px 6px 6px 20px;
}
.dict__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-arabic), var(--font-sans);
  font-size: clamp(22px, 4vw, 30px);
  padding: 8px 0;
  outline: none;
}
.dict__input::placeholder { color: var(--text-faint); font-family: var(--font-sans); font-size: 18px; }
.dict__input::-webkit-search-cancel-button { display: none; }
.dict__search:focus-within { box-shadow: 0 0 0 3px var(--green-soft); }
.dict__clear { color: var(--text-muted); font-size: 14px; padding: 10px; }
.dict__clear:hover { color: var(--ink); }

.dict__try { font-size: 13px; color: var(--text-muted); }
.dict__chips { display: contents; list-style: none; }
.dict__chips li { display: contents; }
.dict__chip {
  background: var(--sand);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 18px;
  color: var(--ink);
}
.dict__chip:not(.ar) { font-size: 14px; padding: 7px 12px; }
.dict__chip:hover { background: var(--sand-hover); color: var(--ink); text-decoration: none; }

.dict__notice { display: flex; flex-direction: column; gap: 6px; padding: 28px; }
.dict__notice-title { font-size: 17px; font-weight: 700; margin: 0; }
.dict__notice .body-text { margin: 0; font-size: 15px; }

/* A result */
.dict__entry { display: flex; flex-direction: column; gap: 16px; padding: 26px; }
.dict__entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dict__headword { font-size: 48px; line-height: 1.2; margin: 0; }

.dict__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.dict__fact {
  border-top: 2px solid var(--ink);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dict__fact h3, .dict__study h4 { margin: 0; }
.dict__fact--root { border-top-color: var(--green); }
.dict__fact--context { border-top-color: var(--clay); }
.dict__meaning { font-size: 26px; line-height: 1.15; }
.dict__pos { font-size: 14px; color: var(--text-body); }
.dict__root { font-size: 24px; color: var(--ink); align-self: flex-start; }
.dict__root--link:hover { color: var(--clay); }
.dict__family { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dict__family li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.dict__family .ar { font-size: 19px; color: var(--ink); }
.dict__family .ar:hover { color: var(--clay); text-decoration: none; }
.dict__example { font-size: 21px; line-height: 1.6; margin: 0; text-align: left; }
.dict__example-en { font-size: 14px; color: var(--text-body); font-style: italic; margin: 0; }

/* Word study (Pro) and its teaser (free) */
.dict__locked {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.dict__study-title { font-size: 26px; line-height: 1; margin: 0; }
.dict__locked-text { font-size: 14px; color: var(--text-body); margin: 0; }
.dict__locked-teaser { font-size: 13px; color: var(--text-muted); margin: 0; }
.dict__locked-teaser .ar { font-size: 18px; color: var(--ink); }

.dict__study {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dict__study .dict__study-title { font-size: 30px; }

.dict__study-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
  margin: 0;
}
.dict__study-fact {
  background: var(--sand-hover);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dict__study-fact dt { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.dict__study-fact dd { margin: 0; font-size: 15px; line-height: 1.4; }
.dict__study-fact dd.dict__study-fact-ar { font-size: 22px; text-align: left; }

.dict__senses { list-style: none; counter-reset: sense; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dict__senses li { counter-increment: sense; display: flex; gap: 12px; font-size: 15px; line-height: 1.5; }
.dict__senses li::before {
  content: counter(sense);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.2;
  color: var(--clay);
  width: 18px;
  flex-shrink: 0;
}

.dict__syns {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dict__syns li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  align-items: start;
}
.dict__syns li + li { border-top: 1px solid var(--line-soft); }
.dict__syns li.is-current { background: var(--clay-soft); }
.dict__syns strong { font-size: 15px; }
.dict__syn-ar { font-size: 26px; line-height: 1.3; text-align: right; }
.dict__syn-nuance { font-size: 14px; color: var(--text-body); line-height: 1.5; }

.dict__study-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.dict__colls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dict__colls li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 6px;
}
.dict__colls .ar { font-size: 21px; }
.dict__note { margin: 0; font-size: 15px; line-height: 1.6; text-wrap: pretty; }

@media (max-width: 600px) {
  .dict__search { padding-left: 14px; }
  .dict__search .btn { padding: 8px 12px; }
  .dict__entry { padding: 20px; }
  .dict__headword { font-size: 40px; }
  .dict__syns li { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
  .dict__syn-ar { font-size: 22px; }
}

/* Root card (query is a root) */
.dict__root-card { gap: 6px; }
.dict__root-card-letters { font-size: 44px; color: var(--peach); line-height: 1.3; }
.dict__root-card-meta { font-size: 14px; color: var(--text-on-dark-muted); }

/* Dictionary sources: Lane's Lexicon, Lisan al-Arab, English–Arabic */
.dict__source { display: flex; flex-direction: column; gap: 12px; }
.dict__source-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dict__source-title { font-size: 28px; line-height: 1.1; display: flex; align-items: baseline; gap: 10px; }
.dict__source-ar { font-size: 22px; color: var(--clay); }
.dict__source-note { font-size: 13px; color: var(--text-muted); }
.dict__source-actions { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dict__source-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dict__source-list li + li { border-top: 1px solid var(--line-soft); }

.dict__lane summary, .dict__lisan summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}
.dict__lane summary::-webkit-details-marker, .dict__lisan summary::-webkit-details-marker { display: none; }
.dict__lane summary::after, .dict__lisan summary::after { content: "+"; margin-left: auto; color: var(--clay); font-size: 20px; line-height: 1; }
.dict__lane[open] summary::after, .dict__lisan[open] summary::after { content: "–"; }
.dict__lane-head { font-size: 24px; min-width: 0; }
.dict__lane-gloss { font-size: 15px; color: var(--text-body); min-width: 0; }
.dict__lane-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  padding: 0 0 14px;
  overflow-wrap: anywhere;
}
.dict__lane-body .ar { font-family: var(--font-arabic); font-size: 1.25em; color: var(--ink); }
.dict__lane-body i { color: var(--ink); }

.dict__lisan + .dict__lisan { border-top: 1px solid var(--line-soft); }
.dict__lisan-body { font-size: 20px; line-height: 1.9; color: var(--text-body); padding-bottom: 14px; }

.dict__english { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dict__english li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; }
.dict__english li + li { border-top: 1px solid var(--line-soft); }
.dict__english-word { font-size: 16px; font-weight: 600; }
.dict__english-ar { font-size: 22px; text-align: right; }

.dict__maybe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
