/* /dictionary: AsicProfit's own layout (A–Z with topic filters), theme tokens from app.css */
.dict [hidden] { display: none !important; }   /* filtered-out terms and letters (the cards set their own display) */
.dict { padding-top: 28px; padding-bottom: 48px; }
.dict-kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--primary)); margin: 0 0 6px; }
.dict-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.dict-hero .lead { max-width: 640px; }
.dict-search input { width: 100%; height: 48px; margin-top: 14px; padding: 0 16px; font-size: 16px; border: 1px solid hsl(var(--field-border, var(--input))); border-radius: 10px; background: hsl(var(--background)); color: inherit; }
.dict-search input:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 0; border-color: transparent; }
.dict-tod { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 14px; background: var(--gray-50); border: 1px solid var(--gray-200); }
.dict-tod b { font-size: 20px; }
.dict-tod p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dict-tod a { margin-top: auto; font-weight: 600; color: hsl(var(--primary)); text-decoration: none; }

.dict-bar { position: sticky; top: 64px; z-index: 5; margin: 24px 0 8px; padding: 12px 0 10px; background: hsl(var(--background)); border-bottom: 1px solid var(--gray-200); display: grid; gap: 10px; }
.dict-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.dict-topics button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gray-200); background: none; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.dict-topics button b { font-weight: 500; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.dict-topics button[aria-pressed="true"] { background: hsl(var(--foreground)); color: hsl(var(--background)); border-color: hsl(var(--foreground)); }
.dict-topics button[aria-pressed="true"] b { color: inherit; opacity: .7; }
.dict-az { display: flex; flex-wrap: wrap; gap: 2px; font-size: 13px; font-weight: 600; }
.dict-az a, .dict-az span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; text-decoration: none; color: inherit; }
.dict-az a:hover { background: var(--gray-50); color: hsl(var(--primary)); }
.dict-az span, .dict-az a.off { color: hsl(var(--muted-foreground)); opacity: .4; pointer-events: none; }

.dict-letter { scroll-margin-top: 150px; margin-top: 22px; }
.dict-letter h2 { font-size: 28px; margin: 0 0 10px; color: hsl(var(--primary)); }
.dict-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dt { scroll-margin-top: 160px; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--gray-200); border-radius: 12px; background: hsl(var(--background)); transition: border-color .2s, box-shadow .2s; }
.dt.hit { border-color: hsl(var(--primary) / .5); }
.dt.target { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--primary) / .18); }
.dt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dt h3 { margin: 0; font-size: 17px; }
.dt h3 a { color: inherit; text-decoration: none; }
.dt h3 a:hover { color: hsl(var(--primary)); }
.dt-tag { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.dt-tag::before, .dict-topics button:not([data-topic=""])::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tc); }
.t-basics { --tc: #2a78d6; } .t-hardware { --tc: #eb6834; } .t-profit { --tc: #1baf7a; } .t-buying { --tc: #eda100; } .t-hosting { --tc: #e87ba4; } .t-algos { --tc: #4a3aa7; } .t-gpucpu { --tc: #0b8a9a; }
.dt-aka { margin: -2px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.dt-body { margin: 0; font-size: 14px; line-height: 1.55; }
.dt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: auto; padding-top: 6px; font-size: 13px; }
.dt-see { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dt-see a { color: hsl(var(--muted-foreground)); text-decoration: underline; text-decoration-color: var(--gray-200); text-underline-offset: 3px; }
.dt-see a:hover { color: hsl(var(--foreground)); }
.dt-use { font-weight: 600; color: hsl(var(--primary)); text-decoration: none; white-space: nowrap; }
.dt-use:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .dict-hero { grid-template-columns: 1fr; }
  .dict-grid { grid-template-columns: 1fr; }
  .dict-bar { top: 56px; }
  .dict-az { flex-wrap: nowrap; overflow-x: auto; }
  .dict-az a, .dict-az span { width: 34px; height: 34px; flex: none; }
}
:root[data-theme="dark"] .t-basics { --tc: #3987e5; } :root[data-theme="dark"] .t-hardware { --tc: #d95926; } :root[data-theme="dark"] .t-profit { --tc: #199e70; }
:root[data-theme="dark"] .t-buying { --tc: #c98500; } :root[data-theme="dark"] .t-hosting { --tc: #d55181; } :root[data-theme="dark"] .t-algos { --tc: #9085e9; } :root[data-theme="dark"] .t-gpucpu { --tc: #22b3c4; }
/* phones (16 Oct): three lines per term, tap to read the rest; search hits and linked terms open in full */
@media (max-width: 640px) {
  .dt { padding: 12px 14px; gap: 4px; cursor: pointer; }
  .dt-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .dt.open .dt-body, .dt.hit .dt-body, .dt.target .dt-body { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .dt:not(.open):not(.hit):not(.target) .dt-foot { display: none; }
  .dict-letter { margin-top: 14px; }
  .dict-letter h2 { font-size: 22px; margin-bottom: 6px; }
  .dict-grid { gap: 8px; }
}
/* phones (16 Oct): closed terms even shorter: two lines, the "Also:" line only when opened */
@media (max-width: 640px) {
  .dt { padding: 10px 12px; gap: 3px; }
  .dt h3 { font-size: 15.5px; }
  .dt-body { font-size: 13.5px; line-height: 1.45; -webkit-line-clamp: 2; }
  .dt:not(.open):not(.hit):not(.target) .dt-aka { display: none; }
  .dict-grid { gap: 6px; }
}
