/* Motif Glossary's own look, on top of the suite's css/motif.css (the palette, fonts, app bar, menus, dialogs and toasts). */

.small { font-size: 12px; }
.linkish { padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }

/* App bar: the source pill and the progress bar under it */
.pill .text { overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.progress { flex: none; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 40% 100% no-repeat; animation: slide 1.1s linear infinite; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* The page scrolls under the bar, and reads a little looser than the suite's chrome */
.scroll { flex: 1; min-height: 0; overflow: auto; scroll-padding-top: 16px; line-height: 1.5; }

/* Start: the four ways in */
.start { max-width: 880px; margin: 0 auto; padding: 48px 20px 40px; }
.start h1 { margin: 0 0 8px; color: var(--ink); font-size: 26px; font-weight: 600; letter-spacing: -.015em; }
.start .lead { margin: 0 0 24px; font-size: 14px; max-width: 680px; }
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.way { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--card); text-align: left; white-space: normal; color: var(--text); }
button.way:hover { border-color: var(--accent); }
.way svg.i { width: 22px; height: 22px; color: var(--accent); margin-bottom: 2px; }
.way b { color: var(--ink); font-size: 15px; font-weight: 600; }
.repo-form { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.repo-form input { flex: 1; min-width: 0; font: inherit; color: var(--ink); background: var(--canvas); border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 9px; height: 32px; }
.repo-form input:focus, .paste-box:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* The Review */
.review { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.review-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.review-head h1 { margin: 0 0 4px; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -.015em; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 600; }
.stats .accent b, .stats .accent { color: var(--accent); }
.controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.repo-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); font-weight: 500; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 30px; height: 18px; border-radius: 9px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bar); box-shadow: 0 1px 2px rgba(15,23,42,.25); transition: transform .15s; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(12px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle:has(input:disabled) { opacity: .45; cursor: default; }

.kinds { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.kinds a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--bar); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 12.5px; }
.kinds a:hover { border-color: var(--accent); color: var(--ink); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 600; }

.intro { margin: 6px 0 4px; color: var(--muted); }
.intro summary { cursor: pointer; width: fit-content; padding: 4px 0; }
.intro p { margin: 6px 0; max-width: 820px; }

.group { padding-top: 18px; }
.group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; align-items: start; }

.term { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 12px; scroll-margin-top: 16px; }
.term.proposed { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.term.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.term.proposed.flash { animation: flash-proposed 1.2s ease-out; }
@keyframes flash-proposed { 0% { box-shadow: inset 3px 0 0 var(--accent), 0 0 0 3px var(--accent); } 100% { box-shadow: inset 3px 0 0 var(--accent), 0 0 0 3px transparent; } }
.term header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.term h3 { margin: 0 4px 0 0; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 500; }
.tag.proposed { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.def { margin: 0 0 6px; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.fields dt { color: var(--muted); font-size: 11.5px; font-weight: 500; padding-top: 1px; }
.fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.avoid { display: flex; flex-wrap: wrap; gap: 4px; }
.avoid-word { display: inline-block; padding: 0 7px; border-radius: 5px; background: var(--hover); color: var(--ink); font-size: 12px; line-height: 20px; }
.avoid-word .w { text-decoration: line-through; text-decoration-color: var(--problem); text-decoration-thickness: 1.5px; }
.avoid-word small { color: var(--muted); font-size: 11.5px; }
.sketch { display: flex; flex-direction: column; gap: 2px; }
.sketch-ref { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sketch-ref b { color: var(--ink); font-weight: 500; }
.sketch-ref code { color: var(--muted); font-size: 11.5px; }
.sketch-ref.missing code { color: var(--banner-ink); background: var(--banner); padding: 0 4px; border-radius: 4px; }
.dead-link { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 2px; }

.notes, .no-term { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.notes li, .no-term li { display: flex; align-items: flex-start; gap: 6px; padding: 5px 8px; border-radius: 6px; background: var(--banner); color: var(--banner-ink); font-size: 12px; }
.notes svg.i, .no-term svg.i { width: 14px; height: 14px; margin-top: 2px; }
.no-term { max-width: 640px; }
.no-term li { align-items: center; color: var(--banner-ink); }
.no-term li b { color: var(--banner-ink); font-weight: 600; }
.no-term li .muted, .no-term li code { color: var(--banner-ink); opacity: .85; }
.empty-note { color: var(--muted); padding: 24px 0; }

/* Drag and drop */
.drop-overlay { position: absolute; inset: 0; z-index: 35; display: grid; place-items: center; background: rgba(15,23,42,.18); pointer-events: none; }
.drop-overlay div { padding: 22px 28px; border-radius: 12px; border: 2px dashed var(--accent); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 500; box-shadow: var(--shadow); }

/* Dialogs */
.dialog.wide-dialog { width: min(720px, 100%); }
.paste-box { display: block; width: 100%; height: min(52vh, 420px); resize: vertical; font: 12px/1.5 "IBM Plex Mono", Consolas, monospace; color: var(--ink); background: var(--canvas); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; margin-bottom: 12px; }

@media (max-width: 599px) {
  /* Just the source's name: the kit leaves a pill's .long text to each tool */
  .pill { max-width: 120px; } .pill .long { display: none; }
  /* A review's bar has no room for the ways in: Start again leads to them */
  .appbar.reviewing .way-in { display: none; }
  .ways { grid-template-columns: 1fr; }
  .start { padding-top: 28px; }
  .review { padding: 16px 12px 48px; }
}
