/* Nohena trade glossary (nohena.com/glossary): the help centre's layout and type (help.css), plus the parts only a
   reference has: the definition, the A to Z, links between terms, the "In Nohena" note and the sources. */

/* term page: the definition reads first, as one block */
.gt__def { margin: 0 0 12px; padding: 16px 18px 17px; border-left: 3px solid var(--green-600); background: var(--stone-0); border-radius: 0 10px 10px 0; font-size: 18.5px; line-height: 1.55; color: var(--text-primary); }
.gt__aka { font-family: var(--display); font-weight: 600; color: var(--text-secondary); }
.gt .ha__meta a { color: var(--green-700); text-decoration: none; font-weight: 600; }
.gt .ha__meta a:hover { text-decoration: underline; }

/* links to other terms inside a definition: quiet, so the text still reads as text */
a.gl { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--green-300); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a.gl:hover { color: var(--green-700); text-decoration-color: var(--green-600); }

/* where the term shows up in Nohena */
.gt__noh { margin-top: 30px; padding: 16px 18px; border-radius: 12px; background: var(--green-50); border: 1px solid var(--green-100); font-size: 15.5px; color: var(--text-secondary); }
.gt__noh b { display: block; font-family: var(--display); font-size: 15.5px; color: var(--text-primary); margin-bottom: 4px; }
.gt__noh p { margin: 0; }
.gt__help { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px !important; }
.gt__help a { text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--green-700); padding: 5px 10px; border-radius: 8px; background: var(--stone-0); border: 1px solid var(--green-100); }
.gt__help a:hover { border-color: var(--green-400); }

/* sources */
.gt__src { margin-top: 36px; border-top: var(--rule-2); padding-top: 22px; }
.gt__src h2 { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.015em; margin: 0 0 8px; }
.gt__src ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; }
.gt__src li { padding: 9px 0; border-bottom: var(--rule); font-size: 15px; display: grid; gap: 1px; min-width: 0; }
.gt__src li a { color: var(--green-700); font-weight: 600; text-decoration: none; }
.gt__src li a:hover { text-decoration: underline; }
.gt__src li span { font-family: var(--mono); font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.gt__src > p { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* hub: A to Z */
.gz { padding-block: 40px clamp(56px, 7vw, 96px); }
.gz__h { position: sticky; top: 60px; z-index: 5; display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding: 12px 0; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: var(--rule); }
.gz__h h2 { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 0; }
.gz__bar { display: flex; flex-wrap: wrap; gap: 4px; }
.gz__bar a { min-width: 30px; height: 30px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 7px; text-decoration: none; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--text-secondary); border: var(--rule); background: var(--stone-0); }
.gz__bar a:hover { color: var(--green-700); border-color: var(--green-400); }
.gz__l { scroll-margin-top: 130px; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 0 24px; border-top: var(--rule-2); padding-top: 18px; margin-top: 26px; }
.gz__l h3 { font-family: var(--display); font-weight: 600; font-size: 34px; letter-spacing: -0.03em; line-height: 1; margin: 2px 0 0; color: var(--green-700); }
.gz__l ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.gz__l li a { display: grid; gap: 2px; padding: 10px 0; border-bottom: var(--rule); text-decoration: none; height: 100%; }
.gz__l li a:hover b { color: var(--green-700); }
.gz__l li b { font-weight: 600; font-size: 15px; line-height: 1.4; }
.gz__l li span { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .gz__l { grid-template-columns: 1fr; } .gz__l h3 { font-size: 28px; margin-bottom: 4px; } .gz__l ul { grid-template-columns: 1fr; } .gz__h { position: static; } }

/* hub: the topics grid has 13 cards; four columns leave one alone, so use three that it fills more evenly */
.gx-hub .hc__g { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .gx-hub .hc__g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gx-hub .hc__g { grid-template-columns: 1fr; } }
.gx-hub .hc__c:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
@media (max-width: 900px) { .gx-hub .hc__c:last-child:nth-child(3n + 1) { grid-column: auto; } .gx-hub .hc__c:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 520px) { .gx-hub .hc__c:last-child:nth-child(odd) { grid-column: auto; } }

/* topic page list: two columns on a wide screen */
.gx { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 8px; }
.gx li a { height: 100%; }
@media (max-width: 700px) { .gx { grid-template-columns: 1fr; } }

/* search results on the hub show the topic */
.hr a i { font-style: normal; font-size: 12.5px; color: var(--green-700); }

/* phone: topics as a compact list (name and count), so the A to Z is reached quickly */
@media (max-width: 520px) {
  .gx-hub .hc__g { gap: 0; border: var(--rule-2); border-radius: 12px; overflow: hidden; background: var(--stone-0); }
  .gx-hub .hc__c { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 13px 14px; border: 0; border-bottom: var(--rule); border-radius: 0; }
  .gx-hub .hc__c:last-child { border-bottom: 0; }
  .gx-hub .hc__c span { display: none; }
  .gx-hub .hc__c b { font-size: 15.5px; }
  .gx-hub .hc__c i { margin: 0; white-space: nowrap; }
}
