/* ThinkRepo — stili essenziali, si adattano al tema tramite variabili. */
.thinkrepo-catalog, .thinkrepo-plugin, .thinkrepo-modal, .thinkrepo-access {
	--thinkrepo-accent: #2563eb;
	--thinkrepo-text: inherit;
	--thinkrepo-muted: #6b7280;
	--thinkrepo-line: rgba(127, 127, 127, .25);
	--thinkrepo-bg: #fff;
	--thinkrepo-radius: 12px;
}
.thinkrepo-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--thinkrepo-min, 260px)), 1fr)); gap: 20px; }
.thinkrepo-tile { border: 1px solid var(--thinkrepo-line); border-radius: var(--thinkrepo-radius); transition: border-color .15s, transform .15s; }
.thinkrepo-tile:hover { border-color: var(--thinkrepo-accent); transform: translateY(-2px); }
.thinkrepo-tile-link { display: flex; gap: 16px; padding: 18px; color: inherit; text-decoration: none; height: 100%; }
.thinkrepo-icon img, .thinkrepo-icon-ph { width: 64px; height: 64px; border-radius: 14px; display: block; object-fit: cover; }
.thinkrepo-icon-ph { background: var(--thinkrepo-accent); color: #fff; font: 600 28px/64px system-ui, sans-serif; text-align: center; }
.thinkrepo-tile-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.thinkrepo-tile-name { font-size: 1.05em; }
.thinkrepo-tile-text { color: var(--thinkrepo-muted); font-size: .92em; line-height: 1.45; }
.thinkrepo-badge { align-self: flex-start; font-size: .75em; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--thinkrepo-line); color: var(--thinkrepo-muted); }

.thinkrepo-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 1.5em; padding: 16px; border: 1px solid var(--thinkrepo-line); border-radius: var(--thinkrepo-radius); }
.thinkrepo-meta dt { font-size: .75em; text-transform: uppercase; letter-spacing: .04em; color: var(--thinkrepo-muted); margin: 0; }
.thinkrepo-meta dd { margin: 2px 0 0; font-weight: 600; }
.thinkrepo-meta code { font-size: .85em; }
.thinkrepo-signed { font-size: .75em; padding: 1px 6px; border-radius: 6px; background: #dcfce7; color: #166534; }

.thinkrepo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 1.5em 0; }
.thinkrepo-gallery figure { margin: 0; }
.thinkrepo-gallery img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--thinkrepo-line); display: block; }
.thinkrepo-gallery figcaption { font-size: .85em; color: var(--thinkrepo-muted); margin-top: 4px; }

.thinkrepo-download { margin: 1.5em 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.thinkrepo-note { flex-basis: 100%; margin: 0; font-size: .85em; color: var(--thinkrepo-muted); }
.thinkrepo-sha-link { font-size: .85em; }
.thinkrepo-btn { display: inline-block; font-size: 1rem; font-family: inherit; padding: 10px 20px; border-radius: 8px; border: 0; background: var(--thinkrepo-accent); color: #fff !important; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; }
.thinkrepo-btn:hover { filter: brightness(1.08); }
.thinkrepo-btn[disabled] { opacity: .6; cursor: wait; }
.thinkrepo-btn-ghost { background: transparent; color: var(--thinkrepo-accent) !important; border: 1px solid currentColor; }

.thinkrepo-changelog details { border-top: 1px solid var(--thinkrepo-line); padding: 10px 0; }
.thinkrepo-changelog summary { cursor: pointer; }
.thinkrepo-changelog summary span { color: var(--thinkrepo-muted); font-size: .9em; margin-left: 6px; }

.thinkrepo-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.thinkrepo-modal-box { position: relative; width: 100%; max-width: 420px; background: var(--thinkrepo-bg); color: #111827; border-radius: var(--thinkrepo-radius); padding: 28px 24px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.thinkrepo-modal-box h3 { margin: 0 0 12px; font-size: 1.2em; }
.thinkrepo-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--thinkrepo-muted); }
.thinkrepo-step { display: flex; flex-direction: column; gap: 8px; }
.thinkrepo-step[hidden] { display: none !important; }
.thinkrepo-step label { font-size: .9em; font-weight: 600; }
.thinkrepo-step input { padding: 10px 12px; border: 1px solid var(--thinkrepo-line); border-radius: 8px; font-size: 1em; width: 100%; box-sizing: border-box; }
.thinkrepo-step input[inputmode="numeric"] { letter-spacing: .4em; font-size: 1.3em; text-align: center; }
.thinkrepo-links { font-size: .85em; margin: 4px 0 0; }
.thinkrepo-msg { min-height: 1.2em; font-size: .9em; margin: 10px 0 0; color: var(--thinkrepo-muted); }
.thinkrepo-msg.is-error { color: #b91c1c; }
.thinkrepo-access { padding: 18px; border: 1px solid var(--thinkrepo-line); border-radius: var(--thinkrepo-radius); max-width: 460px; }
.thinkrepo-ok { margin: 0 0 10px; }
